Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0008524Openbravo ERP07. Sales managementpublic2009-04-09 10:302009-10-06 00:00
networkb 
rafaroda 
normalminoralways
closedno change required 
30
2.50beta 
2.40MP4 
Core
No
0008524: Duplicate lines are added to sales invoice, when the user create's Sales order (POS) for a product which has negative inventory
Duplicate line items are added to the sales invoice, if a product has negative inventory in warehouse and create a Sales order for the same product with document type as POS.



Step 1) Run the stock report to verify the inventory of the warehouse. identify any product which has positive qty(i.e., Hammer qty = N)

Step 2) Move to Sales Management and complete a sales order with document type as POS (Sales Management || Transactions || Sales Order || Header)
with BP = <any business partner> and product = hammer , Qty = N+1 and click complete button 'Process completed successfully' with Receipt id & Invoice id

Step 3) Create another Sales order with document type as POS and select the same BP, Product = hammer and Qty = 10 and click complete button. 'Process completed successfully' message appears with Receipt id & invoice id.

Open the above created sales invoice and check the line item details.

Actual result: you can find 3 line items instead of one line item




250 final review
related to defect 0008405 closed gorkaion A POS order (sales order) can not be reactivated more than once 
related to defect 0008266 closed gorkaion Function M_INOUT_CREATE (Create/Generate Shipments) delivers from locators where the quantity is negative 
depends on backport 0008525 closed rafaroda Duplicate lines are added to sales invoice, when the user create's Sales order (POS) for a product which has negative inventory 
depends on backport 00106722.35MP16 closed rafaroda Duplicate lines are added to sales invoice, when the user create's Sales order (POS) for a product which has negative inventory 
jpg Need to check the line items in Sales invoice, if the inventory is in negative.JPG (136,807) 2009-04-09 10:30
https://issues.openbravo.com/file_download.php?file_id=1156&type=bug
jpg
Issue History
2009-04-09 10:30sureshbabuNew Issue
2009-04-09 10:30sureshbabuAssigned To => rafaroda
2009-04-09 10:30sureshbabuFile Added: Need to check the line items in Sales invoice, if the inventory is in negative.JPG
2009-04-09 10:30sureshbabuRegression testing => No
2009-04-09 10:30sureshbabuTag Attached: 250 final review
2009-04-09 10:34sureshbabuSummaryDuplicate line is added in sales invoice, If a product has negative inventory, and if the user create's Sales order (POS) => Duplicate lines are added to sales invoice, when the user create's Sales order (POS) for a product which has negative inventory
2009-04-09 10:34sureshbabuDescription Updated
2009-04-09 10:36rafarodaAssigned Torafaroda => gorkaion
2009-04-09 10:37rafarodaStatusnew => scheduled
2009-04-09 10:37rafarodafix_in_branch => pi
2009-04-09 10:37rafarodaRelationship addedrelated to 0008405
2009-04-23 18:57hgbotCheckin
2009-04-23 18:57hgbotNote Added: 0015638
2009-04-23 18:57hgbotStatusscheduled => resolved
2009-04-23 18:57hgbotResolutionopen => fixed
2009-04-23 18:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.40/rev/d930f7e2bfdfed340ab9fd07d682e96bbc963e68 [^]
2009-04-23 19:04gorkaionStatusresolved => new
2009-04-23 19:04gorkaionResolutionfixed => open
2009-04-23 19:04gorkaionStatusnew => scheduled
2009-04-23 19:05gorkaionFixed in SCM revisionhttp://code.openbravo.com/erp/stable/2.40/rev/d930f7e2bfdfed340ab9fd07d682e96bbc963e68 [^] =>
2009-04-23 19:05gorkaionfix_in_branchpi =>
2009-04-23 19:08jpabloaeNote Deleted: 0015638
2009-09-21 09:44rafarodaIssue cloned0010672
2009-09-21 09:44rafarodaRelationship addeddepends on 0010672
2009-10-01 13:30rafarodaRelationship addedrelated to 0008266
2009-10-01 14:25rafarodaNote Added: 0020627
2009-10-01 14:25rafarodaReportersureshbabu => networkb
2009-10-01 14:25rafarodaAssigned Togorkaion => rafaroda
2009-10-01 14:27rafarodaNote Edited: 0020627
2009-10-02 14:34rafarodaNote Added: 0020668
2009-10-05 08:02rafarodaStatusscheduled => closed
2009-10-05 08:02rafarodaResolutionopen => no change required
2009-10-06 00:00anonymoussf_bug_id0 => 2873172

Notes
(0020627)
rafaroda   
2009-10-01 14:25   
(edited on: 2009-10-01 14:27)
The current behaviour in pi and 2.40 when allowing negative stock is the following:

1) Run stock report and see the quantity stocked of Hats: 499 units in ML1 (Warehouse Management || Analysis Tools || Stock Report)
2) Create Hat stock for ML2 (101 units) and ML3 (50 units) locators and process it (Warehouse Management || Transactions || Physical Inventory || Header)
3) If you run the stock report for Hats, you have now:
* 499 Units in ML1
* 101 Units in ML2
* 50 Units in ML3
* Total = 650
4) Create an POS Sales Order of 670 Hats and complete it.
5) The Shipment created has 4 lines, which is correct:
* 499 Units movement in ML1
* 50 Units movement in ML3
* 101 Units movement in ML2
* 20 Units movement in ML1
6) Run the stock report: you have now -20 Units in ML1
7) The Invoice created has 4 lines: each line is linked with the corresponding shipment line which is the regular behaviour of Openbravo ERP.

Openbravo ERP 2.3x branch is missing the fix of issue 0008266 Function M_INOUT_CREATE (Create/Generate Shipments) delivers from locators where the quantity is negative. With this fix the behaviour will be the same as in 2.40 and pi.

If you want to display the invoice lines grouped when printing the invoice, the report will have to be customized.

(0020668)
rafaroda   
2009-10-02 14:34   
It has being agreed that this is the regular behaviour of Openbravo ERP.

Backport to 2.3x branch of issue 0008266 can be found at 0010842