Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038769Openbravo ERP09. Financial managementpublic2018-06-15 14:352018-06-26 13:47
maite 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q3 
Sandrahuguet
Core
No
0038769: "Suspense balancing" account used when invoice's total is zero and negative prepayment exists
In case a negative 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 setting negative qty 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 0038487 closed AtulOpenbravo "Suspense balancing" account used when invoice's total is zero and prepayment exists 
related to defect 0039415 closed AtulOpenbravo Payment Plan should not be removed from a sales invoice of 0 that includes a prepaid order 
Issue History
2018-06-15 14:35maiteNew Issue
2018-06-15 14:35maiteAssigned To => Triage Finance
2018-06-15 14:35maiteModules => Core
2018-06-15 14:35maiteResolution time => 1530828000
2018-06-15 14:35maiteTriggers an Emergency Pack => No
2018-06-15 14:35maiteIssue Monitored: networkb
2018-06-15 14:35maiteRelationship addedrelated to 0038487
2018-06-19 12:41dmiguelezAssigned ToTriage Finance => AtulOpenbravo
2018-06-21 04:00AtulOpenbravoStatusnew => scheduled
2018-06-21 17:58AtulOpenbravoNote Added: 0105315
2018-06-21 18:02AtulOpenbravoNote Edited: 0105315bug_revision_view_page.php?bugnote_id=0105315#r17333
2018-06-21 18:07AtulOpenbravoNote Added: 0105320
2018-06-22 10:17hgbotCheckin
2018-06-22 10:17hgbotNote Added: 0105329
2018-06-22 10:17hgbotStatusscheduled => resolved
2018-06-22 10:17hgbotResolutionopen => fixed
2018-06-22 10:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8fe325ebf59054b15bc0e28cbbecde879bdf4c88 [^]
2018-06-22 10:17SandrahuguetReview Assigned To => Sandrahuguet
2018-06-22 10:17SandrahuguetNote Added: 0105330
2018-06-22 10:17SandrahuguetStatusresolved => closed
2018-06-22 10:17SandrahuguetFixed in Version => 3.0PR18Q3
2018-06-26 13:47hudsonbotCheckin
2018-06-26 13:47hudsonbotNote Added: 0105450
2018-10-05 12:08ngarciaRelationship addedrelated to 0039415

Notes
(0105315)
AtulOpenbravo   
2018-06-21 17:58   
(edited on: 2018-06-21 18:02)
Test Plan

- 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. (1 EUR = 1.23 USD)
- Register Purchase Order for Bebidas Alegres bp. Add any line setting negative qty and process the order.
  Product: Cerveza Ale 0,5L
  Ordered Qty: 10
  Unit Price: 1.36
  Tax: Adquisiciones IVA 21%
  Line Net Amount: 13.60
  Tax Amount: 2.86
  Total Gross Amount:16.46
- Run "Add payment" process to register prepayment for the order.
- 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=-10, to ensure that total invoice's amount is 0.00
- Process invoice and post it.
- Realize that posting is correct as below:-

General Ledger

A. F&B Espana, S.A US/A/EURO

Account 40000 - Proveedores (euros) a corto plazo DEBIT 16.46
Account 60000 - Compras de mercaderías DEBIT 13.60
Account 40700 - Anticipos a proveedores CREDIT 16.46
Account 60000 - Compras de mercaderías CREDIT 13.60

B. F&B Intenational Group US/A/US Dollar

Account 2110 - Accounts Payables DEBIT 20.25
Account 5360 - Product Expense DEBIT 16.73
Account 1410 - Vendor prepayment CREDIT 20.25
Account 5360 - Product Expense CREDIT 16.73

(0105320)
AtulOpenbravo   
2018-06-21 18:07   
Test Plan

- 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. (1 EUR = 1.23 USD)
- Register Purchase Order for Bebidas Alegres bp. Add any line setting negative qty and process the order.
  Product: Cerveza Ale 0,5L
  Ordered Qty: -10
  Unit Price: 1.36
  Tax: Adquisiciones IVA 21%
  Line Net Amount: -13.60
  Tax Amount: -2.86
  Total Gross Amount:-16.46
- Run "Add payment" process to register prepayment for the order.
- 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=10, to ensure that total invoice's amount is 0.00.
- Process invoice and post it.
- Realize that posting is correct as below:-

General Ledger

A. F&B Espana, S.A US/A/EURO

Account 40700 - Anticipos a proveedores DEBIT 16.46
Account 60000 - Compras de mercaderías DEBIT 13.60
Account 40000 - Proveedores (euros) a corto plazo CREDIT 16.46
Account 60000 - Compras de mercaderías CREDIT 13.60

B. F&B Intenational Group US/A/US Dollar

Account 1410 - Vendor prepayment DEBIT 20.25
Account 5360 - Product Expense DEBIT 16.73
Account 2110 - Accounts Payables CREDIT 20.25
Account 5360 - Product Expense CREDIT 16.73
(0105329)
hgbot   
2018-06-22 10:17   
Repository: erp/devel/pi
Changeset: 8fe325ebf59054b15bc0e28cbbecde879bdf4c88
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Fri Jun 22 01:59:44 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/8fe325ebf59054b15bc0e28cbbecde879bdf4c88 [^]

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

Difference amount in between gross amount and prepayment amount
should have proper sign. In case of negative prepayment & 0 gross
amount, it was wrongly set negative value instead of positive value.

---
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
---
(0105330)
Sandrahuguet   
2018-06-22 10:17   
Code review + testing OK
(0105450)
hudsonbot   
2018-06-26 13:47   
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/0f403f60ff29 [^]
Maturity status: Test