Support Hours: Mon-Fri 8:00-14:00 CET - If and when our partners and kids allow, we may reply to your posts outside these hours :)

Okay
  Public Ticket #1809476
Issues with Raw Materials Stock Updates on Order Cancellation
Closed

Comments

  • Alexandre Saglier started the conversation

    Hello,

    First of all, thank you for this awesome plugin, it covers my clients business needs very well.

    However, I need help with some strange behaviours I'd like to run by you.

    These behaviours exist both on my staging full website and on a clean minimalist website so I'll give you the latter's setup :

    • Wordpress v4.9.8
    • Woocommerce v3.5.2
    • ATUM Inventory Management v1.4.18.2
    • ATUM Product Levels v1.2.11
    • Theme : TwentySeventeen

    Now for the behaviour, I'll try to be give you an explanation as complete as possible.

    • There are only 2 products in the shop, a Simple Product and a Raw Material. The Simple Product is composed of 5 units of the Raw Material.
    • The Simple product has a stock of 0 but backorders are allowed.
    • The Raw Material has a Stock of 1000.
    • When buying a product via an indirect payment option (i.e. Check Payments), the order is put "On Hold" until payment is received and the stock of both the simple product (-1) and the raw material (-5) are decreased.
    • So now the Raw Material has a Stock of 995 and the Simple Product has a Stock of (-1) because he has 1 Back-Order / Stock on Hold.
    • If the order is then paid by the client and is "Processing", then everything is fine since the stocks won't change after that.
    • However, in case of a cancellation when the order gets "Cancelled", the behaviour is actually very dangerous. The Simple Product correctly cancels its Back-Order / Stock on Hold and recovers its Stock of 0. But the Raw Material actually has another stock decrease and now gets a stock of 990.

    This behaviour is extremely problematic for my client's logistics.

    Could you please help me with this issue ?

    Regards,

    Alexandre

  •  90
    Pavel replied

    HI Alexander,

    Thank you very much for your ticket.

    mm, very strange, but I will surely give it to our dev to try out.

    Can you tell me the exact steps or make a quick recording of this behaviour? If you want to hide the private data from your site, turn this ticket to private so your info stays protected from others.

    Pavel

  • Alexandre Saglier replied

    Hi Pavel,

    Thank you so much for your quick answer.

    This video should cover everything but please let me know if there's any additionnal info you'd like to know.

    Regards,

    Alexandre

  •  90
    Pavel replied

    Hi Alexander,

    Thank you very much, great stuff.

    Our guys will have a look at it first thing tomorrow morning and we will let you know the findings as soon as we can.

    Pavel

  • Alexandre Saglier replied

    Hi Pavel,

    Thanks for assigning dev time on this issue on such short notice, that's really appreciated.

    I've continued my investigation into this issue. I'm sure more digestible info can only speed up the process.

    To this end, I have created a second test Simple Product called Product From Raw 2. This other Simple Product is also composed of 5 units of the Raw Material. The difference is that this one is actually pre-manufactured so as to present more data on its stock consumption.

    You'll find a video on the same order cancellation process enclosed in this reply but here are the key differences seen on the raw material Stock :

    • Before order : Commited = 75, Free to Use = 925, Total in Warehouse = 1000
    • After order : Commited = 70, Free to Use = 925, Total in Warehouse = 995
    • After cancellation : Commited = 75, Free to Use = 915, Total in Warehouse = 990

    I hope this additional data will prove useful to your devs. I'll continue the investigation on my end and will get back to you with any relevant finding.

    Regards,

    Alexandre

  •  90
    Pavel replied

    Excellent, thank you Alex.

    I am sure will have a fix in the next version if it proves core code related. And if not will fix you pr site.


    Pavel

  • Alexandre Saglier replied

    Hello Pavel,

    Has your team been able to reproduce the behaviour ?

    We haven't yet been able to find additional useful data on our end but we're still researching.

    Regards,

    Alex

  •  90
    Pavel replied

    Hi Alex,

    It will take us little longer to get to the bottom of this.

    You do not have to do anything. We will take care of it, but please, give us couple of working days. We will ask for details if we need any or give you straight out solution.

    Thank you,

    Pavel

  • Alexandre Saglier replied

    Hi Pavel,

    Any progress on this issue ?  Have you been able to reproduce it ?

    Regards,

    Alex

  •  90
    Pavel replied

    Hi Alex, 

    Very sorry, but still on it. 

    I am sorry it's taking this long.

    We are trying to speed things up.

    Pavel

  •  90
    Pavel replied

    Hi Alex.

    We've found and fixed the issue with Order Cancellation and BOM Material. We're right now testing it, and we have the launch planned for tomorrow morning (european time).

    Hope this helps.


    Best Regards,

    José Andrés

  • Alexandre Saglier replied

    Hi José,

    Nicely done, thank you very much. We're currently testing it.

    Best Regards,

    Alex

  • Alexandre Saglier replied

    Hi José,

    Thanks again for your answer, it does indeed help. The second raw material stock decrease is indeed fixed. However, the behaviour still isn't logical. The logical behaviour would be for the raw material stock to return to its original value before the order was first created.

    As it stands, when the order gets cancelled, no product or raw material has effectively left the warehouse. The Product using raw material in its BOM has the same stock as before the order so that's logical. However, the raw material quantity itself is not increased again.

    So, since no raw material has in effect been used, the quantity on the website still doesn't match the quantity in the warehouse. The quantity in the warehouse is the same as it was before the order (since nothing was shipped to client) but is now lower on the website (since the raw material stock has decreased).

    To be clear, we now have this situation :

    • Before order : Commited = 75, Free to Use = 925, Total in Warehouse = 1000
    • After order : Commited = 70, Free to Use = 925, Total in Warehouse = 995
    • After cancellation : Commited = 75, Free to Use = 920Total in Warehouse = 995

    It is indeed an improvement but the logical behaviour would be :

    • Before order : Commited = 75, Free to Use = 925, Total in Warehouse = 1000
    • After order : Commited = 70, Free to Use = 925, Total in Warehouse = 995
    • After cancellation : Commited = 75, Free to Use = 925Total in Warehouse = 1000

    Could you help me with this ?

    Best Regards,

    Alex

  •  90
    Pavel replied

    Hi Alexander,

    There was an error in how PL was processing the WooCommerce Orders status change, so, as you said, the result wasn't logical.

    We've fixed the problem and it seems to be working properly in our dev servers. We are preparing a new PL version and it will include the patch.

    Hope this helps.

    Best Regards,

    José Andrés

  • Alexandre Saglier replied

    Hi José,

    That would be nice, thanks a lot!

    We'll keep an eye out for the new PL version.

    Best Regards,

    Alex


  • Alexandre Saglier replied

    Hi José,

    We've tested it extensively and we can confirm the issue is fixed.

    Thanks a lot to the whole team for your work.

    Best Regards & Happy Holidays,

    Alex

  •  90
    Pavel replied

    Magic, enjoy.

    Pavel and the Team ATUM