Skip to content
View in the app

A better way to browse. Learn more.

thirty bees forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Supply Orders > Pending receipt. Bug associated to the front office.

Featured Replies

Hello.

I want to share with you a bug that I have detected.

[Conditions] - Advanced Stock Management: Activated.

To reproduce the bug just follow the steps:

  1. Create a supply order. Add a product with quantity equal 0 and choose for example order 2 new products. Current instant state: Physical quantity = 0 | Usable quantity = 0 | Real quantity = 0
  2. Change the status to Order Validated. Current instant state: Physical quantity = 0 | Usable quantity = 0 | Real quantity = 0
  3. Change the status to Pending Receipt. Current instant state: Physical quantity = 0 | Usable quantity = 0 | Real quantity = 2 0_1489175062741_upload-b28121e7-8c59-4236-9126-839b3a441a1a
  4. Go to the front office. You can see that there are 2 items to be ordered when you haven't received the products: 0_1489175125523_upload-2f008731-2f50-4230-baa5-56426b3c37bf

I guess is a heritated bug from Prestashop. But I think can produce severe problems in many stores. If the supplier needs 5 days to deliver your order, you can be in serious troubles with your customers :)

I have been taking a look in the code, and I think the problem must be in the AdminSupplyOrdersController.php line 1223:

``` // create stock entry if not exist when order is in pendingreceipt if ($newstate->pendingreceipt) { $supplyorderdetails = $supplyorder->getEntries(); foreach ($supplyorderdetails as $supplyorderdetail) { $ispresent = Stock::productIsPresentInStock($supplyorderdetail['idproduct'], $supplyorderdetail['idproductattribute'], $supplyorder->idwarehouse); if (!$is_present) { $stock = new Stock();

                                            $stock_params = array(
                                                'id_product_attribute' => $supply_order_detail['id_product_attribute'],
                                                'id_product' => $supply_order_detail['id_product'],
                                                'physical_quantity' => 0,
                                                'price_te' => $supply_order_detail['price_te'],
                                                'usable_quantity' => 0,
                                                'id_warehouse' => $supply_order->id_warehouse
                                            );

                                            // saves stock in warehouse
                                            $stock->hydrate($stock_params);
                                            $stock->add();
                                        }
                                    }

``` I hope this can help to fix the bug.

Thank you very much and regards.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.