Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020771Openbravo ERP09. Financial managementpublic2012-06-14 13:282012-06-27 05:28
mirurita 
naiaramartinez 
normalmajoralways
closedfixed 
20Community Appliance
pi 
3.0MP13 
Advanced Payables and Receivables Mngmt
No
0020771: Automatic payment completing the invoice: two orders in same invoice creates incorrect payment
Configure the payment method of the invoice to generate automatically the payment.
Put in the same invoice two orders and complete the invoice.
The expected result is to have only one payment for the total of the invoice.
But the result is to have as many payments as orders.
1) Create a Sales Order (SO1) for Alimentos. Total= 46.5€
2) Create a Sales Order (SO2) for Alimentos. Total= 4.9€
3) Configure payment method for Alimentos to create automatically the payment when completing the invoice.
4) Create a Sales Invoice (SI1) for Alimentos. Invoice both orders. Total= 51.4€
5) Complete the Invoice
6) Go to Payment In
7) Realize that TWO payments have been created.
   It should have created only one payment for the total of the invoice.
   PAY1: 46.5
   PAY2: 4.9
No tags attached.
related to defect 0020799 closed eduardo_Argal Reactivate Payment: credit is generated and used in the same payment (it does not allow to reactivate the payment) 
related to defect 0020798 closed eduardo_Argal Reactivate Payment: TADPI.FIN_PAYMENT_ORIGSCHEDDETAIL violated - child record found 
png Payment_Complete_Invoice1.png (24,235) 2012-06-14 13:28
https://issues.openbravo.com/file_download.php?file_id=5299&type=bug
png
Issue History
2012-06-14 13:28miruritaNew Issue
2012-06-14 13:28miruritaAssigned To => mirurita
2012-06-14 13:28miruritaFile Added: Payment_Complete_Invoice1.png
2012-06-14 13:28miruritaModules => Advanced Payables and Receivables Mngmt
2012-06-14 17:21naiaramartinezAssigned Tomirurita => naiaramartinez
2012-06-15 14:53naiaramartinezNote Added: 0049859
2012-06-15 14:54naiaramartinezStatusnew => scheduled
2012-06-15 14:54naiaramartinezfix_in_branch => pi
2012-06-19 17:07eduardo_ArgalRelationship addeddepends on 0020799
2012-06-19 17:07eduardo_ArgalRelationship deleteddepends on 0020799
2012-06-19 17:07eduardo_ArgalRelationship addedrelated to 0020799
2012-06-19 17:08eduardo_ArgalRelationship addedrelated to 0020798
2012-06-21 09:57hgbotCheckin
2012-06-21 09:57hgbotNote Added: 0049961
2012-06-21 09:57hgbotStatusscheduled => resolved
2012-06-21 09:57hgbotResolutionopen => fixed
2012-06-21 09:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f06b2e72932e559d23aac7793e43239d5ec47d13 [^]
2012-06-21 09:57miruritaNote Added: 0049962
2012-06-21 09:57miruritaStatusresolved => closed
2012-06-21 09:57miruritaFixed in Version => 3.0MP13
2012-06-27 05:28hudsonbotCheckin
2012-06-27 05:28hudsonbotNote Added: 0050135

Notes
(0049859)
naiaramartinez   
2012-06-15 14:53   
Test Plan:
 1) Create a Sales Order (SO1) for Alimentos. Total= 46.5€
 2) Create a Sales Order (SO2) for Alimentos. Total= 4.9€
 3) Configure payment method for Alimentos to create automatically the payment when completing the invoice.
 4) Create a Sales Invoice (SI1) for Alimentos. Invoice both orders. Total= 51.4€
 5) Complete the Invoice
 6) Go to Payment In

  Realize that only one payment has been created.
(0049961)
hgbot   
2012-06-21 09:57   
Repository: erp/devel/pi
Changeset: f06b2e72932e559d23aac7793e43239d5ec47d13
Author: Naiara Martinez <naiara.martinez <at> openbravo.com>
Date: Tue Jun 19 16:18:44 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f06b2e72932e559d23aac7793e43239d5ec47d13 [^]

Fixed bug 20771: automatic payment completing the invoice not working properly

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml
---
(0049962)
mirurita   
2012-06-21 09:57   
code review + testing OK

Testing Plan I
1) Configure "Transferencia" payment method for "Alimentos y Supermercados, S.A" to generate the payemnt automatically when completing the invoice.
2) Create Sales Order (SO1), total=5€
3) Create Sales Invoice (SI1) for previous order
4) Complete the invoice --> a new payment is created
5) Refresh the invoice and check:
    - Payment Complete = Yes
    - Payment Plan
       * Number of payments = 1
       * Expected Amount = Received Amount
       * Outstanding = 0
7) Go to the Payment In and search previously created payment. Check:
    - Description
             Invoice No.: SI1
             Order No.: SO1
    - Amount = Invoice total gross amount

Testing Plan II
1) Configure "Transferencia" payment method for "Alimentos y Supermercados, S.A" to generate the payemnt automatically when completing the invoice.
2) Create Sales Order (SO1), total=5€
3) Create Sales Order (SO2), total=5€
4) Create Sales Invoice for both orders
5) Complete the invoice --> a new payment is created
6) Refresh the invoice and check:
    - Payment Complete = Yes
    - Payment Plan
       * Number of payments = 1
       * Expected Amount = Received Amount
       * Outstanding = 0
7) Go to the Payment In and search previously created payment. Check:
    - Description
             Invoice No.: SI1
             Order No.: SO1, SO2
    - Amount = Invoice total gross amount

Testing Plan III
1) Configure "Transferencia" payment method for "Alimentos y Supermercados, S.A" to generate the payemnt automatically when completing the invoice.
2) Create Sales Order (SO1), total=5€
3) Pay fully previous order. (create a new payment in).
4) Create Sales Invoice (SI1) for previous order
5) Complete the invoice --> as the order has been fully paid NO payment is generated
6) Refresh the invoice and check:
    - Payment Complete = Yes
    - Payment Plan
       * Number of payments = 1
       * Expected Amount = Received Amount
       * Outstanding = 0

Testing Plan IV
1) Configure "Transferencia" payment method for "Alimentos y Supermercados, S.A" to generate the payemnt automatically when completing the invoice.
2) Create Sales Order (SO1), total=5€
3) Pay partially previous order. (create a new payment in of 3€).
4) Create Sales Invoice (SI1) for previous order
5) Complete the invoice --> a new payment is created for the difference (2€)
6) Refresh the invoice and check:
    - Payment Complete = Yes
    - Payment Plan
       * Number of payments = 2
       * Expected Amount = Received Amount
       * Outstanding = 0
7) Go to the Payment In and search previously created payment. Check:
    - Description
             Invoice No.: SI1
             Order No.: SO1
    - Amount = 2€
(0050135)
hudsonbot   
2012-06-27 05:28   
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/cf3a7135839f [^]

Maturity status: Test