Question: Oversale Checkout With Zero Inventory Crashes

Oversale Checkout With Zero Inventory Crashes

If I try to create a checkout for a item that has zero stock, it causes a 500 crash in Checkoverselling.php [2022-01-26 09:39:56] production.ERROR: Attempt to read property "name" on nul

GP

Geoffrey Pan

Asked

If I try to create a checkout for a item that has zero stock, it causes a 500 crash in Checkoverselling.php

[2022-01-26 09:39:56] production.ERROR: Attempt to read property “name” on null {“userId”:1,“exception”:"[object] (ErrorException(code: 0): Attempt to read property "name" on null at /var/www/html/app/Helpers/CheckOverSelling.php:48)

  • MS

    Mian Saleem

    Answered

    Hello,

    Do the item has assigned any unit?

    Please let me know the site link with login details in private reply to have look.

    Thank you

  • GP

    Geoffrey Pan

    Answered

    Hi, updating the items with units does fix this issue. Unit should probably be a mandatory field on checkout creation?

  • MS

    Mian Saleem

    Answered

    Hello,

    The default unit should be auto selected on adding the item to checkin/out. I will check this again before next update.

    Thank you

  • Login to Reply