Jump to content

Error You don't have enough usable quantity.


Hacktronics India

Recommended Posts

When having a warehouse as weighted average, I see I can add products but that will increase both the usable and physical quantity.

But we have a scenario, where the physical quantity will be always much smaller than the actual usage quantity, that the customer can purchase, as we can arrange any required quantity from the distributors.

But in order to manage the actual quantity in hand, we have to delete the physical quantity, but it does not allow to do that.

In the file StockManager.php

            // check quantity if we want to decrement unusable quantity
            if (!$is_usable) {
                $quantity_in_stock = $physical_quantity_in_stock - $usable_quantity_in_stock;
            } else {
                $quantity_in_stock = $usable_quantity_in_stock;
            }

            // checks if it's possible to remove the given quantity
            if ($quantity_in_stock < $quantity) {
                return $return;
            }

This if condition actually stops from deleting physical products, which is wrong, there should not be any such checks.

Link to comment
Share on other sites

  • 1 month later...

When having a warehouse as weighted average, I see I can add products but that will increase both the usable and physical quantity.

But we have a scenario, where the physical quantity will be always much smaller than the actual usage quantity, that the customer can purchase, as we can arrange any required quantity from the distributors.

But in order to manage the actual quantity in hand, we have to delete the physical quantity, but it does not allow to do that.

In the file StockManager.php

            // check quantity if we want to decrement unusable quantity
            if (!$is_usable) {
                $quantity_in_stock = $physical_quantity_in_stock - $usable_quantity_in_stock;
            } else {
                $quantity_in_stock = $usable_quantity_in_stock;
            }

            // checks if it's possible to remove the given quantity
            if ($quantity_in_stock < $quantity) {
                return $return;
            }

This if condition actually stops from deleting physical products, which is wrong, there should not be any such checks.

 

Some news with this problem? we've too!! :(

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...