Bug Report: Error 500 Update Items

Error 500 Update Items

I'm trying to update a product and I get this error, can you check?

AM

Abdias Muñoz

Reported

I’m trying to update a product and I get this error, can you check?

  • MS

    Mian Saleem

    Answered

    Hello,

    Yes, the variation foreign keys are causing the issue. I will fix this in the next update.

    For now, you can run the follow queries after selecting your database.

    alter table `modifier_options` drop foreign key `modifier_options_variation_id_foreign`;
    alter table `portion_items` drop foreign key `portion_items_variation_id_foreign`;
    alter table `portion_essentials` drop foreign key `portion_essentials_variation_id_foreign`;
    alter table `portion_choosable_items` drop foreign key `portion_choosable_items_variation_id_foreign`;
    alter table `sale_item_variation` drop foreign key `sale_item_variation_variation_id_foreign`;
    alter table `purchase_item_variation` drop foreign key `purchase_item_variation_variation_id_foreign`;
    alter table `recurring_sale_item_variation` drop foreign key `recurring_sale_item_variation_variation_id_foreign`;
    alter table `stock_transfer_item_variation` drop foreign key `stock_transfer_item_variation_variation_id_foreign`;
    alter table `return_order_item_variation` drop foreign key `return_order_item_variation_variation_id_foreign`;
    alter table `quotation_item_variation` drop foreign key `quotation_item_variation_variation_id_foreign`;
    alter table `delivery_item_variation` drop foreign key `delivery_item_variation_variation_id_foreign`;
    alter table `stock_adjustment_item_variation` drop foreign key `stock_adjustment_item_variation_variation_id_foreign`;
    

    Thank you

  • AM

    Abdias Muñoz

    Answered

    I ran the query but the problem is with another foreign key (stock_trails_variation_id_foreign), delete it too?

  • MS

    Mian Saleem

    Answered

    Yes, you can delete that too. I will be checking and update this before the next update. Thank you

  • AM

    Abdias Muñoz

    Answered

    I am trying to enter a stock trim and I have this error, what should be the solution?

  • MS

    Mian Saleem

    Answered

    Hello,

    I am sorry for the late reply. I didn’t understand about stock trim. Can you please explain and let me know the steps to replicate the bug? It will help me find the cause.

    Thank you

  • AM

    Abdias Muñoz

    Answered

    Sure, from the steps you followed, you encountered some snags. I create a product to which I add variants, it already allows me to save, however in the update nothing is modified, I think your product update is wrong. Then I go to stock in order to have availability of each of the product variants, that is where I get the error, I checked the database and the stock adjustment information is saved, what is not saved is the information in the stock detail table in the variants, I don’t know if I’m explaining myself. This prevents product availability from appearing in the POS and I cannot make sales. As additional information, I tried to enter a product without variants and that stock is maintained in order to generate sales.

  • MS

    Mian Saleem

    Answered

    Thank you very much for sharing the details. I will check tomorrow morning and will update you.

  • AM

    Abdias Muñoz

    Answered

    Very good, I await your response.

  • MS

    Mian Saleem

    Answered

    Hello,

    I have tried to follow the step. There was an issue with quantity sync, so I removed the quantity column on the variants. Not quantity can be set on locations tab only. I have added the migration to drop the foreign keys. I am not sure if this issue was related but you can try the demo.

    I have updated the live demo and will release the fixed next week.

    Thank you

  • Login to Reply