Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019534Openbravo ERP07. Sales managementpublic2012-01-20 11:282012-01-26 18:26
psarobe 
gorkaion 
immediatemajoralways
closedfixed 
5
pi 
3.0MP8 
Core
No
0019534: Qty ordered gets updated to qty delivered even when the qty invoiced is bigger than qty delivered when closing the order
When the qty invoiced is bigger than the qty delivered and you close the sales order, the qty ordered gets updated to qty delivered and the total gross amount as well

This can only happens when the invoice rule is immediate otherwise you cannot invoice more than what you have delivered
1. Login as Openbravo/openbravo
2. Change the role to QA testing admin
3. Go to Sales order window. click new
4. Select the Customer A and change the invoice rule to immediate. Save
5. Create a line and select the product Final Good A and quantity 5. Save
6. Click Book. Total gross amount= 10,35
5. Go to Sales invoice and click new. Select Customer A. Save
6. Click the button create lines from and select the above sales order
7. Click the complete button
8. Go back to the above sales order and close the order
The qty ordered will be updated to the max (qty delivered, qty invoiced)
No tags attached.
blocks defect 0019532 closed gorkaion Payment schedule detail does not get updated when you close the order 
Issue History
2012-01-20 11:28psarobeNew Issue
2012-01-20 11:28psarobeAssigned To => jonalegriaesarte
2012-01-20 11:28psarobeModules => Core
2012-01-20 11:29psarobeRelationship addedblocks 0019532
2012-01-23 10:41gorkaionAssigned Tojonalegriaesarte => gorkaion
2012-01-24 17:27gorkaionNote Added: 0044519
2012-01-24 17:44hgbotCheckin
2012-01-24 17:44hgbotNote Added: 0044520
2012-01-24 17:44hgbotStatusnew => resolved
2012-01-24 17:44hgbotResolutionopen => fixed
2012-01-24 17:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/331403eece14ad5f1a585cc8680a60f8e368ed4f [^]
2012-01-24 17:44hgbotCheckin
2012-01-24 17:44hgbotNote Added: 0044521
2012-01-24 17:44hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/331403eece14ad5f1a585cc8680a60f8e368ed4f [^] => http://code.openbravo.com/erp/devel/pi/rev/8f2bc6078c775a1a85fdb1d0d505283621731f59 [^]
2012-01-25 11:04psarobeProposed Solution updated
2012-01-25 18:04hudsonbotCheckin
2012-01-25 18:04hudsonbotNote Added: 0044582
2012-01-25 18:04hudsonbotCheckin
2012-01-25 18:04hudsonbotNote Added: 0044583
2012-01-26 09:58psarobeNote Added: 0044595
2012-01-26 18:25psarobeNote Edited: 0044595bug_revision_view_page.php?bugnote_id=0044595#r3099
2012-01-26 18:26psarobeNote Added: 0044618
2012-01-26 18:26psarobeStatusresolved => closed
2012-01-26 18:26psarobeFixed in Version => 3.0MP8

Notes
(0044519)
gorkaion   
2012-01-24 17:27   
Developer steps to test the fix available in issue 0019532

https://issues.openbravo.com/view.php?id=19532#c44518 [^]
(0044520)
hgbot   
2012-01-24 17:44   
Repository: erp/devel/pi
Changeset: 331403eece14ad5f1a585cc8680a60f8e368ed4f
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Tue Jan 24 17:41:26 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/331403eece14ad5f1a585cc8680a60f8e368ed4f [^]

Fixed issue 19534.Set greatest of invoiced or delivered qty.

---
M src-db/database/model/functions/C_ORDER_POST1.xml
---
(0044521)
hgbot   
2012-01-24 17:44   
Repository: erp/devel/pi
Changeset: 8f2bc6078c775a1a85fdb1d0d505283621731f59
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Tue Jan 24 17:42:28 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8f2bc6078c775a1a85fdb1d0d505283621731f59 [^]

Fixed issue 19534.Properly update grand total difference on psds after close.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_ORD.xml
M modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml
---
(0044582)
hudsonbot   
2012-01-25 18:04   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/e66cf6210386 [^]

Maturity status: Test
(0044583)
hudsonbot   
2012-01-25 18:04   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/e66cf6210386 [^]

Maturity status: Test
(0044595)
psarobe   
2012-01-26 09:58   
(edited on: 2012-01-26 18:25)
Test plan:

1.Create a sales order Qty Ordered: 5 units, Qty delivered: 0, Qty invoiced: 3, close it. Qty ordered: 3
2.Create a sales order Qty Ordered: 5 units, Qty delivered: 2, Qty invoiced: 3, close it. Qty ordered: 3
3.Create a sales order Qty Ordered: 5 units, Qty delivered: 3, Qty invoiced: 0, close it. Qty ordered: 3
4.Create a sales order Qty Ordered: 5 units, Qty delivered: 4, Qty invoiced: 2, close it. Qty ordered: 4
5.Create a sales order Qty Ordered: 5 units, Qty delivered: 3, Qty invoiced: 1. The payment method creates a payment. Close it. Qty ordered: 3 but amount received 1 and the payment methods gets updated

And more test cases with Purchase orders, Purchase invoices, Payment Out

(0044618)
psarobe   
2012-01-26 18:26   
Works fine