Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039386Openbravo ERP07. Sales managementpublic2018-10-02 08:192019-03-28 14:55
AtulOpenbravo 
Triage Omni OMS 
normalmajoralways
closedfixed 
5
 
3.0PR19Q2 
dmiguelez
Core
No
0039386: Goods Shipment IsCompletelyInvoiced flag is not properly updated when voiding Sales Invoice
Goods Shipment IsCompletelyInvoiced flag is not properly updated when voiding Sales Invoice. Because of this Goods shipment does not appear in the Sales Invoice, Create From Shipment P&E.
1. Create a Goods Shipment with one line with quantity 10.
2. Book the Goods Shipment.
3. Create sales invoice header.
4. Press button Create Lines from Shipment.
5. Select the line created in the Goods Shipment.
6. Book the sales invoice.
7. Go to the Goods Shipment, check IsCompletelyInvoiced flag is set as Yes.
8. Void the Sales Invoice, check IsCompletelyInvoiced flag is till set as Yes. Because of this Goods shipment does not appear in the Sales Invoice, Create From Shipment P&E.
No tags attached.
related to design defect 0037357 closed AtulOpenbravo Create Lines From popup on Invoice windows slow with high number of shipments 
related to defect 0039330pi closed AtulOpenbravo Invoice status field in Goods Shipment don't work appropietly 
related to defect 0049449 closed gsalas The "Fully Invoiced" check is not checked on some delivery notes. 
Issue History
2018-10-02 08:19AtulOpenbravoNew Issue
2018-10-02 08:19AtulOpenbravoAssigned To => Triage Finance
2018-10-02 08:19AtulOpenbravoModules => Core
2018-10-02 08:19AtulOpenbravoTriggers an Emergency Pack => No
2018-10-02 08:59AtulOpenbravoRelationship addedrelated to 0037357
2018-10-02 09:08AtulOpenbravoRelationship addedrelated to 0039330
2018-10-02 09:11PracticsIssue Monitored: Practics
2018-10-04 06:11AtulOpenbravoStatusnew => scheduled
2018-10-04 06:11AtulOpenbravoNote Added: 0107147
2018-10-04 06:18AtulOpenbravoNote Added: 0107148
2019-01-17 09:18dmiguelezNote Added: 0108986
2019-01-17 09:28hgbotCheckin
2019-01-17 09:28hgbotNote Added: 0108987
2019-01-17 09:28hgbotStatusscheduled => resolved
2019-01-17 09:28hgbotResolutionopen => fixed
2019-01-17 09:28hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f56c59c75e26e38d8c737ec3d0a92909a84b9de9 [^]
2019-01-17 09:30dmiguelezReview Assigned To => dmiguelez
2019-01-17 09:30dmiguelezNote Added: 0108989
2019-01-17 09:30dmiguelezStatusresolved => closed
2019-01-17 09:30dmiguelezFixed in Version => 3.0PR19Q2
2019-03-28 14:55hudsonbotCheckin
2019-03-28 14:55hudsonbotNote Added: 0110734
2022-06-14 13:46aferrazRelationship addedrelated to 0049449

Notes
(0107147)
AtulOpenbravo   
2018-10-04 06:11   
Test Plan

1. Create a Goods Shipment with one line with quantity 10.
2. Book the Goods Shipment.
3. Create sales invoice header.
4. Press button Create Lines from Shipment.
5. Select the line created in the Goods Shipment.
6. Book the sales invoice.
7. Go to the Goods Shipment, check IsCompletelyInvoiced flag is set as Yes.
8. Void the Sales Invoice, check IsCompletelyInvoiced flag is set as No.
9. Create a Sales Invoice header for same business partner as above. Click on Create Lines From Shipment P&E, check that previous Goods shipment appear in the list again.
(0107148)
AtulOpenbravo   
2018-10-04 06:18   
Test Plan:

- Create a Goods shipment with any product having stock.
- Set Movement Qty = 10.
- Process the Goods Shipment.
- Create a First Sales Invoice, using Create Lines From Shipment choose above shipment line.
- Set Quantity = 6
- Complete the Invoice.
- Check the Invoice Status in Goods Shipment is set as 60%
- Create Second Sales Invoice, using Create Lines From Shipment choose previous shipment.
- Check Qty is 4.
- Complete the Invoice.
- Check the Invoice Status in Goods Shipment is set as 100%
- Void the First Sales Invoice.
- Check the Invoice Status in Goods Shipment is set as 40% (After the fix for issue 39330).
- Create again Sales Invoice with previously created transaction business partner.
- Click on Create Lines From Shipment P&E, realize that previous Goods Shipment (with invoice status 40%) appears in the list, select and create invoice line.
- Complete the Sales Invoice.
- Check invoice status of previous goods shipment again it is set as 100%.
(0108986)
dmiguelez   
2019-01-17 09:18   
Note about data:

This issue might have created inconsistent data.
There is a module script (UpdateIsCompletelyInvoiced) that fixes this data, but it is possible that for some clients this modulescript was already executed before. In this case it won't be executed again.

Also, this modulescript is quite heavy and takes some time to execute it.

So, the recommenadation, for the clients that have this problem, is to run it manually, but filtering only for the invoices voided after the module script was executed
(0108987)
hgbot   
2019-01-17 09:28   
Repository: erp/devel/pi
Changeset: f56c59c75e26e38d8c737ec3d0a92909a84b9de9
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Oct 04 01:14:57 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/f56c59c75e26e38d8c737ec3d0a92909a84b9de9 [^]

Fixes Issue 39386: Goods Shipment IsCompletelyInvoiced
flag is not properly updated when voiding Sales Invoice

IsCompletelyInvoiced flag is set to No for the shipments
that have shipment line linked with the invoice lines of
the invoice that is being voided.

---
M src-db/database/model/functions/C_INVOICE_POST.xml
---
(0108989)
dmiguelez   
2019-01-17 09:30   
Code Review + Testing Ok
(0110734)
hudsonbot   
2019-03-28 14:55   
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/b2fbc1588df4 [^]
Maturity status: Test