Bug Report: Something Wrong With The Supplier And Supplier Id

Something Wrong With The Supplier And Supplier Id

I cant add product with same supplier for now. I have 2 product with same supplier if i leave the "Supplier item id" empty it keep giving me error like in the screenshot. Product A with

EH

Einnlleinhatt Ha

Reported
I cant add product with same supplier for now. I have 2 product with same supplier if i leave the "Supplier item id" empty it keep giving me error like in the screenshot.

Product A with supplier id PA
Product B with supplier id PB

But it i leave the supplier empty i can add product.
  • EH

    Einnlleinhatt Ha

    Answered
    Sorry forgot to upload the screenshot. Here are the error for my live site.
  • EH

    Einnlleinhatt Ha

    Answered
    I tried on the demo site but it give me different warning but still cant save the new product with same supplier but different supplier item id.
  • MS

    Mian Saleem

    Answered
    Hello,

    I have checked. The `supplier_id` and `supplier_item_id` has unique index. The supplier id meant to be index not unique. For you can modify it on your database by running following query

    ```sql
    ALTER TABLE `items` DROP INDEX `items_supplier_id_unique`, ADD INDEX `items_supplier_id_index` (`supplier_id`) USING BTREE;
    ```

    Thank you
  • EH

    Einnlleinhatt Ha

    Answered
    **[Mian Saleem](/u/saleem)** Thankyou, this fixed the issue.
  • Login to Reply