dolibarr-bugtrack
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-bugtrack] [bug #18592] stock movement issues


From: Franky Van Liedekerke
Subject: [Dolibarr-bugtrack] [bug #18592] stock movement issues
Date: Wed, 27 Dec 2006 20:52:21 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.8.1) Gecko/20060601 Firefox/2.0 (Ubuntu-edgy)

Follow-up Comment #1, bug #18592 (project dolibarr):

I found the fix for the second problem:
- when shipping an ordered product, the available stock gets again subtracted
by 5 (the ordered number) when validating the order.

==> The reason for this: the available stock is calculated as the real stock
minus the commanded items, so if the real stock decreases, so does the
available stock.

==> Solution: we adjust the items ordered upon shipping the item. This is
done in the file expedition/expedition.class.php, at around line 337, below
the call $mouvS->livraison(). There I add the following 3 lines to correct
the ordered items:

                $product = new Product($this->db);
                $product->id = $obj->fk_product;
                $product->ajust_stock_commande($obj->qty, 1);

after this everything works ok for this problem.

The first problem can be worked around by first deleting all items for a
canceled order, and then deleting the order itself, but it should be fixed
though ...

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?18592>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]