Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038657Openbravo ERP09. Financial managementpublic2018-05-30 11:372018-06-22 12:40
maite 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q3 
Sandrahuguet
Core
No
0038657: Wrong cashvat posting when several orders are partially invoiced in same invoice and invoice is fully paid
Wrong cashvat posting when several orders are partially invoiced in same invoice and invoice is fully paid
0. Install last Cash VAT Management version 1.0.400 and follow configuration guide: http://wiki.openbravo.com/wiki/Cash_VAT_Management/User_Documentation#Cash_VAT_Tax_Rate_configuration [^]
1. Register Sales Order for any Org and BP. Set Invoice Terms=Immediate and Cash vat=Y. Add line for any product and set qty=10. Ensure that tax set in order line is configured as Cash Vat=Y. Process Order
2. Register Sales Order for SAME Org and BP. Set Invoice Terms=Immediate and Cash vat=Y. Add line for SAME product and set qty=20. Ensure that tax set in order line is configured as Cash Vat=Y. Process Order
3. Register Sales Invoice for SAME Org and BP. Run "Create lines from" process and select previous orders. Edit order lines to set lower qtys (for example 5 units and 10 units). Process Invoice. Post invoice and realize that Tax Amount is properly posted to transitory account
4. Run Add Payment process to fully paid the invoice. Post payment document and realize that Tax Amount is not correct as only amount corresponding with one order is being moved from transitory account to tax account
No tags attached.
Issue History
2018-05-30 11:37maiteNew Issue
2018-05-30 11:37maiteAssigned To => Triage Finance
2018-05-30 11:37maiteModules => Core
2018-05-30 11:37maiteResolution time => 1529445600
2018-05-30 11:37maiteTriggers an Emergency Pack => No
2018-05-30 11:38maiteIssue Monitored: networkb
2018-05-31 16:34dmiguelezAssigned ToTriage Finance => AtulOpenbravo
2018-06-11 23:34AtulOpenbravoStatusnew => scheduled
2018-06-21 03:59AtulOpenbravoNote Added: 0105289
2018-06-21 04:00AtulOpenbravoNote Edited: 0105289bug_revision_view_page.php?bugnote_id=0105289#r17329
2018-06-22 08:36hgbotCheckin
2018-06-22 08:36hgbotNote Added: 0105324
2018-06-22 08:36hgbotStatusscheduled => resolved
2018-06-22 08:36hgbotResolutionopen => fixed
2018-06-22 08:36hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9a1c5f99b2d1edee927ef4e8c0c8796888d4a777 [^]
2018-06-22 08:41SandrahuguetReview Assigned To => Sandrahuguet
2018-06-22 08:41SandrahuguetNote Added: 0105325
2018-06-22 08:41SandrahuguetStatusresolved => closed
2018-06-22 08:41SandrahuguetFixed in Version => 3.0PR18Q3
2018-06-22 12:40hudsonbotCheckin
2018-06-22 12:40hudsonbotNote Added: 0105338

Notes
(0105289)
AtulOpenbravo   
2018-06-21 03:59   
(edited on: 2018-06-21 04:00)
Test Plan

- Install last Cash VAT Management version 1.0.400 and follow configuration guide: http://wiki.openbravo.com/wiki/Cash_VAT_Management/User_Documentation#Cash_VAT_Tax_Rate_configuration [^] [^]
for eg: Tax Name: Cash VAT 10%, Rate = 10.
- Register Sales Order for any Org and BP. Set Invoice Terms=Immediate and Cash vat=Y. Add line for any product and set qty=10, Unit Price 100. Ensure that tax set in order line is configured as Cash Vat=Y. Process Order
Total Gross Amount = 1100.
- Register Sales Order for SAME Org and BP. Set Invoice Terms=Immediate and Cash vat=Y. Add line for SAME product and set qty=20, Unit Price 200. Ensure that tax set in order line is configured as Cash Vat=Y. Process Order
Total Gross Amount = 2200.
- Register Sales Invoice for SAME Org and BP. Run "Create lines from" process and select previous orders. Edit order lines to set lower qtys (for example 5 units and 10 units). Process Invoice.
Total Gross Amount = 1650, Total Net Amount:1500, Line 1:500, Line 2:1000
- Post invoice and realize that Tax Amount is properly posted to transitory
account.

Account 43000 DEBIT 1650 (Account Receivables)
Account 70000 CREDIT 1000 (Product Revenue)
Account 70000 CREDIT 0500 (Product Revenue)
Account 47701 CREDIT 0150 (Cash Vat Due)

- Run Add Payment process to fully paid the invoice.
Post payment document and realize that Tax Amount is correct and amount corresponding with both order is being moved from transitory account to tax account.

Account 57200 DEBIT 1650 (Account Receivables)
Account 47701 DEBIT 0150 (Cash Vat Due) [100 from one Order, 50 from second order = 100+50 = 150]
Account 43000 CREDIT 1650 (Product Revenue)
Account 47700 CREDIT 0150 (Product Revenue)

Similar flow tested by posting PAYMENT IN / OUT, FINANCIAL ACCOUNT TRANSACTION, RECONCILIATION

(0105324)
hgbot   
2018-06-22 08:36   
Repository: erp/devel/pi
Changeset: 9a1c5f99b2d1edee927ef4e8c0c8796888d4a777
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Fri Jun 22 01:56:11 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/9a1c5f99b2d1edee927ef4e8c0c8796888d4a777 [^]

Fixes Issue 0038657: Wrong cashvat posting when several orders
are partially invoiced in same invoice and invoice is fully paid

Along with BigDecimal.ONE value check for merged payment detail,
NotEmpty check for MergedPaymentDetailId is done while posting
Payment, Financial Account Transaction and Reconciliation

---
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
---
(0105325)
Sandrahuguet   
2018-06-22 08:41   
Code review + testing OK
(0105338)
hudsonbot   
2018-06-22 12:40   
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/31731ad72b18 [^]
Maturity status: Test