Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0017966Openbravo ERP09. Financial managementpublic2011-07-12 12:532011-08-10 09:14
psanjuan 
gorkaion 
urgentmajoralways
closedfixed 
20Ubuntu 8.04.1
 
3.0MP2 
Mozilla Firefox
Advanced Payables and Receivables Mngmt
No
0017966: Payment Plan not properly created in the case of several line payment terms and an Invoice created from an Order.
Payment Plan not properly created in the case of several line payment terms and an Invoice created from an Order
Case 1: Order invoiced using a payment term with several payments
Create below payment terms:
(1) 50-50 (lines) - 2 lines for a 50% of the amount. The first 50% in 30 days and the second 50% in 60 days. Rest flag = no

(2) 50-50 (cabecera-lineas) - 1 line for a 50% in 30 days, and in the header overdue Payment days rule field = 60 days, which implies that the header contains the second 50% in 60 days.

Create a sales order for an amount of 2800 for a customer and then a sales invoice by using "Create Lines From" option, for both payment terms.

Once done press "Add Payment In/Out" button and realize that it is not right. See screen attached.

In our example FV/62 was created by using 50-50 lines payment term. See first screen attached.

In our example FV/66 was created by using 50-50 (cabecera-lineas) payment term. See second screen attached.


Case 2: Several orders completely invoiced on a single invoice with an invoiced amount lower than the amount of the orders:

Create 2 Sales Orders with 1500€ amount each one (1000 units at 1.50€ and tax exempt)

Create 1 Invoice using the Create lines from and change the price of both orders to 0.5€ so the total amount of the invoice is 1000€.

Currently we get the following payment details when clicking the Add PAymetn:
SO1 & SI for 1500€
--- & SI for -500€
But we expect:
SO1 & SI for 1500€
SO2 & SI for 1500€
--- & SI for -2000€
No tags attached.
depends on backport 00180913.0MP2 closed gorkaion Payment Plan not properly created in the case of several line payment terms and an Invoice created from an Order. 
png 17966-1.png (95,986) 2011-07-12 12:58
https://issues.openbravo.com/file_download.php?file_id=4327&type=bug
png

png 17966-2.png (100,138) 2011-07-12 12:58
https://issues.openbravo.com/file_download.php?file_id=4328&type=bug
png
Issue History
2011-07-12 12:53psanjuanNew Issue
2011-07-12 12:53psanjuanAssigned To => gorkaion
2011-07-12 12:53psanjuanWeb browser => Mozilla Firefox
2011-07-12 12:53psanjuanModules => Advanced Payables and Receivables Mngmt
2011-07-12 12:58psanjuanFile Added: 17966-1.png
2011-07-12 12:58psanjuanFile Added: 17966-2.png
2011-07-27 10:34gorkaionWeb browserMozilla Firefox => Mozilla Firefox
2011-07-27 10:34gorkaionSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=2509#r2509
2011-07-27 10:34gorkaionStatusnew => scheduled
2011-07-27 10:34gorkaionfix_in_branch => pi
2011-07-27 10:42hgbotCheckin
2011-07-27 10:42hgbotNote Added: 0039425
2011-07-27 10:42hgbotStatusscheduled => resolved
2011-07-27 10:42hgbotResolutionopen => fixed
2011-07-27 10:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7a0507ddc41287623ede896a57cd2d51dd88bb91 [^]
2011-07-27 11:52hgbotCheckin
2011-07-27 11:52hgbotNote Added: 0039437
2011-08-01 14:21hudsonbotCheckin
2011-08-01 14:21hudsonbotNote Added: 0039701
2011-08-01 14:21hudsonbotCheckin
2011-08-01 14:21hudsonbotNote Added: 0039705
2011-08-10 09:14miruritaNote Added: 0040060
2011-08-10 09:14miruritaStatusresolved => closed

Notes
(0039425)
hgbot   
2011-07-27 10:42   
Repository: erp/devel/pi
Changeset: 7a0507ddc41287623ede896a57cd2d51dd88bb91
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Wed Jul 27 10:37:43 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7a0507ddc41287623ede896a57cd2d51dd88bb91 [^]

Fixed issue 17966.Add checkings to know if we are processing the last payment schedule.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml
---
(0039437)
hgbot   
2011-07-27 11:52   
Repository: erp/devel/pi
Changeset: 3bf7e8a8b2db36570c43303250b95b5fb97e1c69
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Wed Jul 27 11:49:56 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3bf7e8a8b2db36570c43303250b95b5fb97e1c69 [^]

Related to issue 17966.Fixed postgresql issue.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml
---
(0039701)
hudsonbot   
2011-08-01 14:21   
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/cf2afed6e8ef [^]

Maturity status: Test
(0039705)
hudsonbot   
2011-08-01 14:21   
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/cf2afed6e8ef [^]

Maturity status: Test
(0040060)
mirurita   
2011-08-10 09:14   
Verified.