Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0031873 | Openbravo ERP | 09. Financial management | public | 2016-01-13 13:48 | 2019-06-18 11:15 |
|
Reporter | maite | |
Assigned To | vmromanos | |
Priority | immediate | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | 3.0PR16Q2 | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | dmiguelez |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0031873: Wrong multicurrency accounting entry when posting partial invoice related to a prepaid order |
Description | Wrong multicurrency accounting entry when posting partial invoice related to a prepaid order |
Steps To Reproduce | 0. Define conversion rate for today between EUR and USD
0. Define Prepayment account for Bebidas Alegres business partner in Vendor Accounting tab
1. Register Purchase Order for "España" org and "Bebidas Alegres" BP. Add any line setting qty=2 and process
2. Register Payment related with the order prepaying it completely
3. Register Purchase Invoice for "España" org and "Bebidas Alegres" BP. Run "Create lines from" and select previous order. Edit qty to set 1 and process
4. Post invoice and realize that entry generated for International Group ledger (in USD) is not correct as balance of prepayment account is not the invoice gross amount converted |
Proposed Solution | Problem is that "selectPrepayments" method is also considering the prepaid amount related with the order but not only the part corresponding with the invoice |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0029403 | 3.0PR15Q3 | closed | vmromanos | Openbravo ERP | Invoice's entry generated against Currency Balancing account instead of Vendor Prepayment account | related to | defect | 0031895 | | new | Triage Omni OMS | Openbravo ERP | Invoice prepayment amount field is not right when the invoice is cheaper than the related order | related to | defect | 0031917 | | new | Triage Omni OMS | Openbravo ERP | Account Payables account used instead of Vendor Prepayment account in case of rounding differences caused by a prepayment | related to | defect | 0031894 | | new | Triage Omni OMS | Openbravo ERP | Order's Payment plan is not clear when there is a prepayment linked to a cheaper invoice | related to | defect | 0041114 | | closed | rqueralta | Retail Modules | Invoicing an Order with a prepayment in a different currency shows inconsistent Received Amounts in the Payment Plan of Order |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2016-01-13 13:48 | maite | New Issue | |
2016-01-13 13:48 | maite | Assigned To | => Triage Finance |
2016-01-13 13:48 | maite | Modules | => Core |
2016-01-13 13:48 | maite | Resolution time | => 1455490800 |
2016-01-13 13:48 | maite | Triggers an Emergency Pack | => No |
2016-01-13 13:49 | maite | Issue Monitored: networkb | |
2016-01-14 10:55 | psanjuan | Note Added: 0083279 | |
2016-01-14 11:01 | psanjuan | Note Edited: 0083279 | bug_revision_view_page.php?bugnote_id=0083279#r10615 |
2016-01-14 11:04 | psanjuan | Note Edited: 0083279 | bug_revision_view_page.php?bugnote_id=0083279#r10616 |
2016-01-14 11:11 | psanjuan | Note Edited: 0083279 | bug_revision_view_page.php?bugnote_id=0083279#r10617 |
2016-01-14 11:25 | psanjuan | Note Edited: 0083279 | bug_revision_view_page.php?bugnote_id=0083279#r10618 |
2016-01-14 11:34 | psanjuan | Note Edited: 0083279 | bug_revision_view_page.php?bugnote_id=0083279#r10619 |
2016-01-14 11:36 | psanjuan | Note Edited: 0083279 | bug_revision_view_page.php?bugnote_id=0083279#r10620 |
2016-01-14 11:38 | psanjuan | Note Edited: 0083279 | bug_revision_view_page.php?bugnote_id=0083279#r10621 |
2016-01-14 11:42 | psanjuan | Note Edited: 0083279 | bug_revision_view_page.php?bugnote_id=0083279#r10628 |
2016-01-14 12:09 | psanjuan | Note Edited: 0083279 | bug_revision_view_page.php?bugnote_id=0083279#r10632 |
2016-01-14 12:09 | psanjuan | Note Edited: 0083279 | bug_revision_view_page.php?bugnote_id=0083279#r10633 |
2016-01-14 12:47 | psanjuan | Note Edited: 0083279 | bug_revision_view_page.php?bugnote_id=0083279#r10634 |
2016-01-14 13:40 | vmromanos | Assigned To | Triage Finance => vmromanos |
2016-01-14 13:40 | vmromanos | Status | new => acknowledged |
2016-01-14 17:25 | vmromanos | Relationship added | related to 0029403 |
2016-01-14 17:37 | vmromanos | Relationship added | related to 0031894 |
2016-01-14 17:42 | vmromanos | Relationship added | related to 0031895 |
2016-01-14 21:51 | heccam | Issue Monitored: heccam | |
2016-01-15 11:56 | vmromanos | Status | acknowledged => scheduled |
2016-01-15 11:56 | vmromanos | Note Added: 0083343 | |
2016-01-15 12:17 | psanjuan | Summary | Wrong multicurrency accounting entry when posting partial invoice related with prepaid order => Wrong multicurrency accounting entry when posting partial invoice related to a prepaid order |
2016-01-15 12:17 | psanjuan | Description Updated | bug_revision_view_page.php?rev_id=10644#r10644 |
2016-01-15 12:38 | psanjuan | Note Edited: 0083343 | bug_revision_view_page.php?bugnote_id=0083343#r10646 |
2016-01-15 12:42 | psanjuan | Note Edited: 0083343 | bug_revision_view_page.php?bugnote_id=0083343#r10647 |
2016-01-15 12:48 | psanjuan | Note Edited: 0083343 | bug_revision_view_page.php?bugnote_id=0083343#r10648 |
2016-01-15 13:02 | psanjuan | Note Edited: 0083343 | bug_revision_view_page.php?bugnote_id=0083343#r10651 |
2016-01-15 13:40 | psanjuan | Note Edited: 0083343 | bug_revision_view_page.php?bugnote_id=0083343#r10652 |
2016-01-15 13:48 | psanjuan | Note Edited: 0083343 | bug_revision_view_page.php?bugnote_id=0083343#r10653 |
2016-01-15 13:56 | psanjuan | Note Edited: 0083343 | bug_revision_view_page.php?bugnote_id=0083343#r10654 |
2016-01-15 14:08 | psanjuan | Note Edited: 0083343 | bug_revision_view_page.php?bugnote_id=0083343#r10655 |
2016-01-15 14:23 | psanjuan | Note Edited: 0083343 | bug_revision_view_page.php?bugnote_id=0083343#r10656 |
2016-01-15 14:30 | psanjuan | Note Edited: 0083343 | bug_revision_view_page.php?bugnote_id=0083343#r10657 |
2016-01-15 14:47 | psanjuan | Note Edited: 0083343 | bug_revision_view_page.php?bugnote_id=0083343#r10658 |
2016-01-15 14:54 | psanjuan | Note Added: 0083354 | |
2016-01-15 14:55 | psanjuan | Relationship added | related to 0031917 |
2016-01-18 17:28 | hgbot | Checkin | |
2016-01-18 17:28 | hgbot | Note Added: 0083383 | |
2016-01-18 17:28 | hgbot | Status | scheduled => resolved |
2016-01-18 17:28 | hgbot | Resolution | open => fixed |
2016-01-18 17:28 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/165f2247f1d08f9bbcec935df2dea282756c4daf [^] |
2016-01-18 17:31 | dmiguelez | Review Assigned To | => dmiguelez |
2016-01-18 17:31 | dmiguelez | Note Added: 0083384 | |
2016-01-18 17:31 | dmiguelez | Status | resolved => closed |
2016-02-19 11:52 | aferraz | Note Added: 0084357 | |
2016-03-17 10:54 | hudsonbot | Checkin | |
2016-03-17 10:54 | hudsonbot | Note Added: 0085051 | |
2016-04-08 10:59 | hgbot | Checkin | |
2016-04-08 10:59 | hgbot | Note Added: 0085515 | |
2019-06-18 11:15 | inaki_garcia | Issue cloned | 0041114 |
2019-06-18 11:15 | inaki_garcia | Relationship added | related to 0041114 |
Notes |
|
(0083279)
|
psanjuan
|
2016-01-14 10:55
(edited on: 2016-01-14 12:47) |
|
Issue Verified. Find details below followed in livebuils pi-pgsql:
0. 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
1. Define Prepayment account for Bebidas Alegres business partner in Vendor Accounting tab, correct ledger account is: 1410 Vendor Prepayment.
2. 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.
3. Check amounts below are:
Total Gross Amount = 3.29 €
Total Net Amount = 2.72 €
Tax Amount = 0.57 €
Add any line setting qty=2 and process
4. Register a Payment dated on todays's date (14-01-2016), related to the order by prepaying it completely. Prepayment Amount = 3.29 €.
5. 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 €
5. Post the payment and check payment posting looks like:
F&B International Group /US Dollar:
3.59 USD (1410) Vendor prepayment - DEBIT
3.59 USD (1110) Checking Account - CREDIT
(3.29 EUR * 1.09 = 3.59 USD)
F&B España EURO
3.29 € (40700) Anticipos proveedores - DEBIT
3.29 € (57200) Bancos - CREDIT
which is correct
6. 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.
7. Check below data:
Payment Complete = Yes
Prepayment Amount = 3.29 (this is not correct, as the prepaid amount of the invoice should be equal to the total gross amount of the invoice = 1.65)
Total Gross Amount 1.65 €
Total Net Amount = 1.36 €
Total Tax Amount = 0.29 €
9. Navigate to the Payment out and check that there are two lines.
First line related to the order shows now Invoice Amount = Expected Amount = 3.29 but Paid Amount = 1.64
Second line related to the invoice shows Invoice Amount = Expected Amount = Paid Amount = 1.65, that is correct.
10. Navigate to the purchase order, Payment Details tab. The number of payments there is 2 with is NOT correct as it should be 1.
Payment details are:
Invoice line related - Expected Amount = 1.65 = Paid Amount
Order line related - Expected Amount = 3.29 not equal to Paid Amount = 1.64
This information is confusing because there is no info about the invoice there.
11. Post the invoice and check that the data shown in there is NOT correct for International Group /Dollar General Ledger :
F&B España EURO
1.36 € (6000) Compra Mercaderias DEBIT
0.29 € (47200) HP IVA soportado DEBIT
1.65 € (40700) Anticipo a proveedores CREDIT
this posting is correct, but
F&B International Group DOLLAR
1.79 usd (8255) Currency Balancing DEBIT
1.48 usd (5360) Product Expense DEBIT
0.32 usd (7410) Tax Expense DEBIT
3.59 usd (1410) Vendor Prepayment CREDIT
this posting is not correct.
Correct posting should be:
1.36 € x 1.09 = 1.48 usd (5360) Product Expense DEBIT
0.29 € x 1.09 = 0.32 usd (7410) Tax Expense DEBIT
1.65 € x 1.09 = 1.79 usd (1410) Vendor Prepayment CREDIT
At this point there is a pending balance in vendor prepayment account as only 1 unit of the order has been invoiced, therefore another invoice for 1 unit remaining can be created.
12. 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.
13. Check below data:
Payment Complete = Yes
Prepayment Amount = 3.29 (this is NOT correct, as the prepaid amount of the invoice should be equal to the total gross amount of the invoice = 1.65)
Total Gross Amount 1.65 €
Total Net Amount = 1.36 €
Total Tax Amount = 0.29 €
14. Post the invoice and check that the data shown in there is NOT correct for International Group /Dollar General Ledger :
F&B España EURO
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 - this one should be a rounding ledger account
this posting is partially correct, but
F&B International Group DOLLAR
1.80 usd (8255) Currency Balancing DEBIT
1.48 usd (5360) Product Expense DEBIT
0.32 usd (7410) Tax Expense DEBIT
3.59 usd (1410) Vendor Prepayment CREDIT
0.01 usd (2110) Account Payables CREDIT
this posting is not correct.
Correct posting should be:
1.36 € x 1.09 = 1.48 usd (5360) Product Expense DEBIT
0.29 € x 1.09 = 0.32 usd (7410) Tax Expense DEBIT
1.64 € x 1.09 = 1.79 usd (1410) Vendor Prepayment CREDIT
0.01 usd ( ) rounding account CREDIT
|
|
|
(0083343)
|
vmromanos
|
2016-01-15 11:56
(edited on: 2016-01-15 14:47) |
|
Test plan I: Purchase Invoice amount smaller than purchase order amount. Use of system conversion rate.
0. Check conversion rate between EUR and USD. For the test below, conversion rates used are:
01-01-2015 to 31-12-2016 EUR to USD 1.5
1. Define Prepayment account for Bebidas Alegres business partner in Vendor Accounting tab, correct ledger account is: 1410 Vendor Prepayment.
2. 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 = 10. Book the order.
3. Register a Payment dated on todays's date (14-01-2016), related to the order by prepaying it completely. Prepayment Amount = 16.46 €. Amount converted to USD = 24.69 usd (exchange rate used 1.5 EUR to USD)
4. 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.
5. Verify following accounting entries are shown:
F&B España EURO
1.36 € (6000) Compra Mercaderias DEBIT
0.29 € (47200) HP IVA soportado DEBIT
1.65 € (40700) Anticipo a proveedores CREDIT
F&B International Group DOLLAR
2.04 usd (1.36 * 1.5) (5360) Product Expense DEBIT
0.44 usd (0.29 * 1.5) (7410) Tax Expense DEBIT
2.48 usd (1.65 * 1.5) (1410) Vendor Prepayment CREDIT
6. Create another invoice for the same order, change qty to 1 and post it.
7. Verify following accounting entries are shown:
F&B España EURO
1.36 € (6000) Compra Mercaderias DEBIT
0.29 € (47200) HP IVA soportado DEBIT
1.65 € (40700) Anticipo a proveedores CREDIT
F&B International Group DOLLAR
2.04 usd (1.36 * 1.5) (5360) Product Expense DEBIT
0.44 usd (0.29 * 1.5) (7410) Tax Expense DEBIT
2.48 usd (1.65 * 1.5) (1410) Vendor Prepayment CREDIT
8. Create another invoice for the same order, change qty to 5 and post it.
9. Verify following accounting entries are shown:
F&B España EURO
6.80 € (6000) Compra Mercaderias DEBIT
1.43 € (47200) HP IVA soportado DEBIT
8.23 € (40700) Anticipo a proveedores CREDIT
F&B International Group DOLLAR
10.20 usd (6.80 * 1.5) (5360) Product Expense DEBIT
2.15 usd (1.43 * 1.5) (7410) Tax Expense DEBIT
12.35 usd (8.23 * 1.5) (1410) Vendor Prepayment CREDIT
10. Create another invoice for the same order, to invoice remaining qty that is 3 units.
11. Verify following accounting entries are shown:
F&B España EURO
4.08 € (6000) Compra Mercaderias DEBIT
0.86 € (47200) HP IVA soportado DEBIT
4.93 € (40700) Anticipo a proveedores CREDIT
0.01 € (40000) Proveedores CREDIT
F&B International Group DOLLAR
6.12 usd (4.08 * 1.5) (5360) Product Expense DEBIT
1.29 usd (0.86 * 1.5) (7410) Tax Expense DEBIT
0.01 USD (8255) Currency Balancing DEBIT
7.40 usd (4.93 * 1.5) (1410) Vendor Prepayment CREDIT
0.02 usd (0.01 * 1.5) (2110) Account Payables CREDIT
12. Go back to the any of the invoices with qty=1 previously created. Unpost and post it again.
13. Verify the accounting entries are exactly the same as before.
Test plan II: Purchase Invoice amount smaller than purchase order amount. Use of invoice conversion rate set to 1.35 for instance.
Repeat same steps as above but the use of the invoice conversion rate set to 1.35 (EUR to USD).
Post purchase order payment, by using system conversion rate EUR to USD (1.5), therefore prepayment posting looks like:
F&B España EURO
16.46 € (40700) Anticipos a Proveedores DEBIT
16.46 € (57200) Bancos CREDIT
F&B International Group DOLLAR
24.69 usd (16.46 * 1.5) (1410) Vendor Prepayment DEBIT
24.69 usd (16.46 * 1.5) (1110) Checking Account CREDIT
After that, create each purchase invoice from the prepaid order (Invoice option: Create Lines From) and enter an exchange rate = 1.35 (EUR to USD). Complete and Post the invoices.
Invoice 1 and Invoice 2 posting for 1 unit each:
F&B España EURO
1.36 € (6000) Compra Mercaderias DEBIT
0.29 € (47200) HP IVA soportado DEBIT
1.65 € (40700) Anticipo a proveedores CREDIT
F&B International Group DOLLAR
1.84 usd (1.36 * 1.35) (5360) Product Expense DEBIT
0.39 usd (0.29 * 1.35) (7410) Tax Expense DEBIT
0.25 usd ([1.65*1.50]-[1.65*1.35]) Bank Revaluation Loss DEBIT
2.48 usd (1.65 * 1.50) (1410) Vendor Prepayment CREDIT
Invoice 3 for 5 units:
F&B España EURO
6.80 € (6000) Compra Mercaderias DEBIT
1.43 € (47200) HP IVA soportado DEBIT
8.23 € (40700) Anticipo a proveedores CREDIT
F&B International Group DOLLAR
9.18 usd (6.80 * 1.35) (5360) Product Expense DEBIT
1.93 usd (1.43 * 1.35) (7410) Tax Expense DEBIT
1.24 usd ([8.23*1.50]-[8.23*1.35]) Bank Revaluation Loss DEBIT
12.35 usd (8.23 * 1.50) (1410) Vendor Prepayment CREDIT
Invoice 4 for 3 units:
F&B España EURO
4.08 € (6000) Compra Mercaderias DEBIT
0.86 € (47200) HP IVA soportado DEBIT
4.93 € (40700) Anticipo a proveedores CREDIT
0.01 € (40000) Proveedores CREDIT
F&B International Group DOLLAR
5.51 usd (4.08 * 1.35) (5360) Product Expense DEBIT
1.16 usd (0.86 * 1.35) (7410) Tax Expense DEBIT
0.74 usd ([4.93*1.50]-[4.93*1.35]) Bank Revaluation Loss DEBIT
7.40 usd (4.93 * 1.50) (1410) Vendor Prepayment CREDIT
0.01 usd (2110) Account Payables CREDIT
Test plan III:
Repeat the same steps as the ones for Test Plan I and II above for Sales flow
to get same amounts, take into account that:
- sales unit price needs to be changed to 1.36
- invoice terms needs to be changed to "Immediate"
- and Basic Discounts (10%) needs to be removed
Be aware that sales accounting is opposite to purchase account (Debit - Credit).
Test Plan IV : Purchase Invoice amount higher than Purchase Order amount. Use of system conversion rate.
2. 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 = 10. Book the order.
3. Register a Payment dated on todays's date (14-01-2016), related to the order by prepaying it completely. Prepayment Amount = 16.46 €. Amount converted to USD = 24.69 usd (exchange rate used 1.5 EUR to USD)
4. 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 20. Complete and Post the Invoice.
5. Verify following accounting entries are shown:
F&B España EURO
27.20 € (6000) Compra Mercaderias DEBIT
5.71 € (47200) HP IVA soportado DEBIT
16.46 € (40700) Anticipo a proveedores CREDIT
16.45 € (4000) Proveedores CREDIT
F&B International Group DOLLAR
40.80 usd (27.20 * 1.5) (5360) Product Expense DEBIT
8.57 usd (5.71 * 1.5) (7410) Tax Expense DEBIT
24.69 usd (16.46 * 1.5) (1410) Vendor Prepayment CREDIT
24.68 usd (16.45 * 1.50) (2110) Account Payables CREDIT.
Check that remaining amount is posted to the Account Payables account.
Test Plan V : Purchase Invoice amount higher than Purchase Order amount. Use of invoice conversion rate.
2. 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 = 10. Book the order.
3. Register a Payment dated on todays's date (14-01-2016), related to the order by prepaying it completely. Prepayment Amount = 16.46 €. Amount converted to USD = 24.69 usd (exchange rate used 1.5 EUR to USD)
4. 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 20. Enter an exchange rat of 1.35 EUR to USD. Complete and Post the Invoice.
5. Verify following accounting entries are shown:
F&B España EURO
27.20 € (6000) Compra Mercaderias DEBIT
5.71 € (47200) HP IVA soportado DEBIT
16.46 € (40700) Anticipo a proveedores CREDIT
16.45 € (4000) Proveedores CREDIT
F&B International Group DOLLAR
36.72 usd (27.20 * 1.35) (5360) Product Expense DEBIT
7.71 usd (5.71 * 1.35) (7410) Tax Expense DEBIT
2.47 usd ([16.46 * 1.5] - [16.46 * 1.35] Bank Revaluation Loss DEBIT
24.69 usd (16.46 * 1.5) (1410) Vendor Prepayment CREDIT
22.21 usd (16.45 * 1.35) (2110) Account Payables CREDIT.
Check that remaining amount is posted to the Account Payables account, and that the correct conversion rates are used.
Test plan VI:
Repeat the same steps as the ones for Test Plan IV and V above for Sales flow
to get same amounts, take into account that:
- sales unit price needs to be changed to 1.36
- invoice terms needs to be changed to "Immediate"
- and Basic Discounts (10%) needs to be removed
- after using "Create Lines From" to select the order, create a new sales invoice line to add 10 units more at a unit price of 1.36
|
|
|
|
Test Plan above verified.
New issue related created 31917.
Issue can be closed after technical review. |
|
|
(0083383)
|
hgbot
|
2016-01-18 17:28
|
|
Repository: erp/devel/pi
Changeset: 165f2247f1d08f9bbcec935df2dea282756c4daf
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Jan 14 18:16:17 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/165f2247f1d08f9bbcec935df2dea282756c4daf [^]
Fixed bug 31873:Multicurrency accounting posting partial invoice with prepayment
The selectPrepayments query, used only for foreign currency accounting schemas, was wrongly taken into account all the payment details linked to the order.
In case of an invoice linked to a prepaid order, when the invoice's amount is lower than the order's amount, the system automatically creates 2 payment details both linked to the order, and one of them linked to the invoice too.
After the fix, the query only takes into account the payment details linked to both the order and the invoice being posted.
---
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
M src/org/openbravo/erpCommon/ad_forms/DocInvoice_data.xsql
---
|
|
|
|
|
|
|
|
|
|
|
|
(0085515)
|
hgbot
|
2016-04-08 10:59
|
|
Repository: tools/automation/int
Changeset: 49f5641180085b630b0c8b8168ee1a3391903fdd
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Feb 17 13:02:32 2016 +0100
URL: http://code.openbravo.com/tools/automation/int/rev/49f5641180085b630b0c8b8168ee1a3391903fdd [^]
Related to issue 31873: Added some automated tests
---
M src-test/com/openbravo/test/integration/erp/data/procurement/transactions/purchaseorder/PaymentDetailsData.java
M src-test/com/openbravo/test/integration/erp/data/sales/transactions/salesorder/PaymentDetailsData.java
M src-test/com/openbravo/test/integration/erp/gui/procurement/transactions/purchaseorder/PurchaseOrderHeaderTab.java
M src-test/com/openbravo/test/integration/erp/gui/sales/transactions/salesorder/HeaderTab.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/PRO_RegressionSuite.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/build.xml
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SAL_RegressionSuite.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/build.xml
M src-test/com/openbravo/test/integration/erp/testscripts/procurement/transactions/PurchaseOrder.java
M src-test/com/openbravo/test/integration/erp/testscripts/sales/transactions/SalesOrder.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/PRORegression31873Out1.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/PRORegression31873Out2.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/PRORegression31873Out3.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/PRORegression31873Out4.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SALRegression31873In1.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SALRegression31873In2.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SALRegression31873In3.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SALRegression31873In4.java
---
|
|