Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038487Openbravo ERP09. Financial managementpublic2018-05-03 16:472018-05-14 13:09
maite 
AtulOpenbravo 
normalmajoralways
closedfixed 
5
 
3.0PR18Q3 
aferraz
Core
No
0038487: "Suspense balancing" account used when invoice's total is zero and prepayment exists
In case an order is prepaid and invoiced in an invoice with total amount 0.00, then Suspense Balancing account is used when posting the invoice
0. Access Vendor Accounting tab of Business Partner "Bebidas Alegres" and ensure that Prepayment account is defined for both schemas
1. Ensure that Conversion Rate is defined between EUR and USD
2. Register Purchase Order for Bebidas Alegres bp. Add any line and process
3. Run "Add payment" process to register prepayment for the order
4. Register Purchase Invoice for Bebidas Alegres bp. Run "Create lines from" and select previous order. Add another invoice line manually selecting same product and setting qty=-1, to ensure that total invoice's amount is 0.00
5. Process invoice and post it. Realize that Suspense Balancing account is used when it should not
No tags attached.
related to defect 00275803.0PR15Q1 closed Sandrahuguet Wrong journal entries when you void a sales invoice under some circumstances 
related to defect 0038769 closed AtulOpenbravo "Suspense balancing" account used when invoice's total is zero and negative prepayment exists 
Issue History
2018-05-03 16:47maiteNew Issue
2018-05-03 16:47maiteAssigned To => Triage Finance
2018-05-03 16:47maiteModules => Core
2018-05-03 16:47maiteTriggers an Emergency Pack => No
2018-05-03 16:47maiteIssue Monitored: networkb
2018-05-03 16:47maiteResolution time => 1527112800
2018-05-03 18:27dmiguelezAssigned ToTriage Finance => AtulOpenbravo
2018-05-07 11:17AtulOpenbravoStatusnew => scheduled
2018-05-08 19:16AtulOpenbravoNote Added: 0104338
2018-05-09 14:33psanjuanNote Edited: 0104338bug_revision_view_page.php?bugnote_id=0104338#r17104
2018-05-09 16:09psanjuanNote Edited: 0104338bug_revision_view_page.php?bugnote_id=0104338#r17105
2018-05-09 21:51AtulOpenbravoNote Added: 0104440
2018-05-10 20:41AtulOpenbravoNote Added: 0104465
2018-05-11 12:33aferrazRelationship addedrelated to 0027580
2018-05-11 13:58hgbotCheckin
2018-05-11 13:58hgbotNote Added: 0104477
2018-05-11 13:58hgbotStatusscheduled => resolved
2018-05-11 13:58hgbotResolutionopen => fixed
2018-05-11 13:58hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/19590151cbb2cb9647055ac1cf7bd55b87ccf684 [^]
2018-05-11 14:10aferrazReview Assigned To => AugustoMauch
2018-05-11 14:10aferrazNote Added: 0104482
2018-05-11 14:10aferrazStatusresolved => closed
2018-05-11 14:10aferrazFixed in Version => 3.0PR18Q3
2018-05-11 14:11aferrazReview Assigned ToAugustoMauch => aferraz
2018-05-14 13:09hudsonbotCheckin
2018-05-14 13:09hudsonbotNote Added: 0104497
2018-06-15 14:35maiteRelationship addedrelated to 0038769
2018-06-21 17:14AtulOpenbravoNote Edited: 0104465bug_revision_view_page.php?bugnote_id=0104465#r17331

Notes
(0104338)
AtulOpenbravo   
2018-05-08 19:16   
(edited on: 2018-05-09 16:09)
Test Plan

- Login as F&B International Group Admin.
- Access Vendor Accounting tab of Business Partner "Bebidas Alegres" and ensure that Prepayment account is defined for both schemas.
- Ensure that Conversion Rate is defined between EUR and USD.
- Register Purchase Order for Bebidas Alegres bp.
  Add line with product Vino Blanco, Qty 100, Price 3.55, Tax = 21%.
- Book the Order.
- Run "Add payment" process to register prepayment for the order.
- Post the payment:

For General Ledger = F&B International Group US/A/US Dollar

528.35 (Vendor prepayment) DEBIT
528.35 (Bank checking ) CREDIT

For General Ledger = F&B España, S.A. US/A/Euro

429.35 (40700) Anticipos a proveedores DEBIT
429.35 (57200) Bancos instituciones de crédito CREDIT


- Register Purchase Invoice for Bebidas Alegres bp. Run "Create lines from" and
  select previous order.
  Add another invoice line manually selecting same product and setting qty=-100, Price = 3.55, Tax = 21%.
- Ensure that total invoice's amount is 0.00
- Process invoice and post it.
- Realize that posting of the invoice is as below

For General Ledger = F&B International Group US/A/US Dollar

1. (Vendo Liability) Accounts Payable 2110 = Debit = 528.35
2. Product Expense 5360 = Debit = 436.65
3. Vendor Prepayment Acct xxxx = Credit = 528.35
4. Product Expense 5360 = Credit = 436.65

For General Ledger = F&B España, S.A. US/A/Euro

1.40000 - (Vendo Liability) Proveedores (euros) a corto plazo = Debit 429.55
2.60000 - Compras de mercaderías = Debit = 355.00
3.40700 - Anticipos a proveedores = Credit 429.55
4.60000 - Compras de mercaderías = Credit = 355.00

(0104440)
AtulOpenbravo   
2018-05-09 21:51   
Test Plan

- Login as F&B International Group Admin.
- Access Customer Accounting tab of Business Partner "Hoteles Buenas Noches, S.A."
  and ensure that Prepayment account is defined for both schemas.
- Ensure that Conversion Rate is defined between EUR and USD.
- Register Sales Order for Hoteles Buenas Noches, S.A. bp.
  Add line with product Vino Blanco, Qty 100, Price 5.33, Tax = 21%.
- Book the Order.
- Run "Add payment" process to register prepayment for the order.
- Post the payment:

For General Ledger = F&B International Group US/A/US Dollar

793.26 (1110) Checking Account DEBIT
793.26 (2450) Customer Prepayments CREDIT

For General Ledger = F&B España, S.A. US/A/Euro

644.93 (57200) Bancos e instituciones de crédito c/c vista euros DEBIT
644.93 (43800) 438. Anticipos de clientes CREDIT


- Register Sales Invoice for Hoteles Buenas Noches, S.A. bp. Run "Create lines from" and
  select previous order.
- Add another invoice line manually selecting same product
  and set qty=-100, Price = 5.33, Tax = 21%.
- Ensure that total invoice's amount is 0.00
- Process invoice and post it.
- Realize that posting of the invoice is as below

For General Ledger = F&B International Group US/A/US Dollar

793.26 (2450) Customer Prepayments DEBIT
655.59 (4100) Revenue - Product DEBIT
793.26 (1110) Accounts Receivable CREDIT
655.59 (4100) Revenue - Product CREDIT

For General Ledger = F&B España, S.A. US/A/Euro

644.93 (43800) 438. Anticipos de clientes DEBIT
533.00 (70000) Ventas de mercaderías DEBIT
644.93 (43000) Clientes (euros) a corto plazo CREDIT
533.00 (70000) Ventas de mercaderías CREDIT
(0104465)
AtulOpenbravo   
2018-05-10 20:41   
(edited on: 2018-06-21 17:14)
Test Plan

- Check that the conversion rate set between EUR and USD from 01-01-2016 to 31-03-2016 is:
EUR to USD 1.09
USD to EUR 0.917431

- Define Prepayment account for Bebidas Alegres business partner in Vendor Accounting tab, correct ledger account is: 1410 Vendor Prepayment.

- Register Purchase Order dated on todays's date (14-01-2016) for "F&B España" org and "Bebidas Alegres" BP. Product "Cerveza Ale 0.5L". Ordered Quantity = 2. Book the order.

- Register a Payment dated on todays's date (14-01-2016), related to the order by prepaying it completely. Prepayment Amount = 3.29 €.

- Navigate to the payment out created and check that only the order is shown in there with a line that shows: Invoice Amount = Expected Amount = Paid Amount = 3.29 €

- Post the payment and check payment posting looks like:

For F&B International Group /US Dollar: Ledger
3.59 USD (1410) Vendor prepayment - DEBIT
3.59 USD (1110) Checking Account - CREDIT
(3.29 EUR * 1.09 = 3.59 USD)

For F&B España EURO Ledger
3.29 € (40700) Anticipos proveedores - DEBIT
3.29 € (57200) Bancos - CREDIT

- Register a Purchase Invoice for "F&B España" org and "Bebidas Alegres" BP, dated on todays's date (14-01-2016). Run "Create lines from" and select the order. Edit Invoiced Quantity field and change it to 1. Complete and Post the Invoice.

- Post the invoice and check that the data is shown as

For F&B España EURO Ledger.
1.36 € (6000) Compra Mercaderias DEBIT
0.29 € (47200) HP IVA soportado DEBIT
1.65 € (40700) Anticipo a proveedores CREDIT

For F&B International Group DOLLAR Ledger.

1.48 usd (5360) Product Expense DEBIT
0.32 usd (7410) Tax Expense DEBIT
1.80 usd (1410) Vendor Prepayment CREDIT

- Register another Purchase Invoice for "F&B España" org and "Bebidas Alegres" BP, dated on todays's date (14-01-2016). Run "Create lines from" and select the order. Check that only 1 unit is now shown in "Create from invoice" window. Select the order and press OK.

Complete the Invoice.

- Post the invoice and check that the data is shown as

For F&B España EURO Ledger.
1.36 € (6000) Compra Mercaderias DEBIT
0.29 € (47200) HP IVA soportado DEBIT
1.64 € (40700) Anticipo a proveedores CREDIT
0.01 € (4000) Proveedores a cp CREDIT

For F&B International Group DOLLAR Ledger.

1.48 usd (5360) Product Expense DEBIT
0.32 usd (7410) Tax Expense DEBIT
1.79 usd (1410) Vendor Prepayment CREDIT
0.01 usd (2110) Account Payables CREDIT

(0104477)
hgbot   
2018-05-11 13:58   
Repository: erp/devel/pi
Changeset: 19590151cbb2cb9647055ac1cf7bd55b87ccf684
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue May 08 22:32:12 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/19590151cbb2cb9647055ac1cf7bd55b87ccf684 [^]

Fixes Issue 0038487:"Suspense balancing" account used when
invoice's total is zero and prepayment exists

Prepayment Amount and Different amount should be posted to
respective customer / vendor prepayment and receivable/payable
accounts when there is difference in between invoice grossamt
(grandtotal) and prepayment amount. Prior to this solution it
was done only when grossamt is greater than prepayment amt.

---
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
---
(0104482)
aferraz   
2018-05-11 14:10   
Code review + Testing OK
(0104497)
hudsonbot   
2018-05-14 13:09   
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/ed385e0e027b [^]
Maturity status: Test