Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018091Openbravo ERP09. Financial managementpublic2011-07-12 12:532011-08-10 09:15
psanjuan 
gorkaion 
urgentmajoralways
closedfixed 
20Ubuntu 8.04.1
 
3.0MP2 
Mozilla Firefox
Advanced Payables and Receivables Mngmt
No
0018091: 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.
blocks defect 00179663.0MP2 closed gorkaion Payment Plan not properly created in the case of several line payment terms and an Invoice created from an Order. 
Issue History
2011-07-27 10:34gorkaionTypedefect => backport
2011-07-27 10:34gorkaionfix_in_branch => 2.50
2011-07-27 19:02hgbotCheckin
2011-07-27 19:02hgbotNote Added: 0039459
2011-07-27 19:02hgbotStatusscheduled => resolved
2011-07-27 19:02hgbotResolutionopen => fixed
2011-07-27 19:02hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.advpaymentmngt/rev/3b390099113faa339da62ae7592ebb845f071def [^]
2011-08-10 09:15miruritaStatusresolved => closed

Notes
(0039459)
hgbot   
2011-07-27 19:02   
Repository: erp/pmods/org.openbravo.advpaymentmngt
Changeset: 3b390099113faa339da62ae7592ebb845f071def
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Wed Jul 27 18:41:53 2011 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.advpaymentmngt/rev/3b390099113faa339da62ae7592ebb845f071def [^]

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

---
M src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml
---