Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036705
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Z. Othersmajoralways2017-08-23 12:252017-09-21 16:49
ReporterngarciaView Statuspublic 
Assigned Tomarkmm82 
PriorityurgentResolutionfixedFixed in Version3.0PR17Q4
StatusclosedFix in branchFixed in SCM revisionf9e08035b10d
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036705: More than one pending payment plan detail for same invoice payment plan

DescriptionMore than one pending payment plan detail for same invoice payment plan

If these payment plan details are included in a remittance, you could not reactivate that remittance as the following error is raised

ERROR: update or delete on table "fin_payment_scheduledetail" violates foreign key constraint "rem_remline_finpayschdet" on table "rem_remittanceline" Detail: Key (fin_payment_scheduledetail_id)=(<>) is still referenced from table "rem_remittanceline".
Steps To ReproduceChange the Format.xml to accept 3 decimals in prices

As System Admin role:
   Set Price Precision of EUR currency to 3

   Create a new sales price list, do not set it as Price Includes Tax
   Add 5 products to it with the following prices:
      101.15
      176.715
      8.33
      35.105
      0
   Create new Payment Terms
   Set Overdue Payment Days Rule to 60 in header
   Add a line to it
   Set Percentage due to 50 and Overdue Payment Days Rule to 30
   Set Next Business Day in both header and lines

   Create a Sales Order
   Set the previously created payment terms and price list
   Add the previously created 5 products (one unit of each, 2 units of the one with 101.15 price)
   Complete it
   Set its Invoice Terms as Immediate

   Create a Sales Invoice
   Set the previously created payment terms and price list
   Add the 4 lines of the sales order with a price different from 0
   Complete it and check two payment plans have been created for the invoice (255.59 each). Check through database two payment plan details of 0.01, one of 255.59 and one of 255.58 have been created. Is this correct?

   Create a new Sales Invoice
   Add the line with 0 price
   Complete it

   Reactivate the sales order
   Check through database two payment plan details exist for the same invoice payment plan. This is wrong

   Complete the sales order
   Check through database two payment plan details exist for the same invoice and order payment plans. This is wrong
   
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on defect 0036776 closedmarkmm82 Amounts in Invoice lines and taxes are rounded to price precision instead of standard precision in Create Lines From process 

-  Notes
(0098834)
hgbot (developer)
2017-09-05 13:57

Repository: erp/devel/pi
Changeset: f9e08035b10d25c70314392e4e2b42906c298021
Author: Mark <markmm82 <at> gmail.com>
Date: Mon Sep 04 15:09:05 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/f9e08035b10d25c70314392e4e2b42906c298021 [^]

Fixes issue 36705: More than one pending payment plan detail for same invoice
payment plan

When the payment schedule details were generated it was comparing the invoiced
amount of related order with the sum of lineNetAmt + taxAmt of it lines, as tax
calculation can be done at document level, and this sum is done at line level it
is possible that exists differences between this sum and totals already rounded
in the invoice.

Also was considered an order completely invoiced if it dosn't has lines with ordered
quatities different than invoiced. When exists orders with lines with lineNetAmt = 0
it was taking it as completed invoiced and then the whole amount of the psd was included
in the invoice and it generates a difference between the total of document and the sum of the
lines that was created as a new payment schedule detail.

To avoid this situation, only are considered order lines with lineNetAmt different than zero
to use the whole amount of the psd or to re-calculate the correct amounts from Payment
Schedule and Payment Schedule Details related to the order and invoices.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml
---
(0098835)
hgbot (developer)
2017-09-05 13:57

Repository: erp/devel/pi
Changeset: 40185fb2080e1d1879914f830261c7e53bb3a001
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Sep 05 13:38:02 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/40185fb2080e1d1879914f830261c7e53bb3a001 [^]

Related to issue 36705: Code review improvements

Apply same fix in purchase flow.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml
---
(0098926)
aferraz (manager)
2017-09-11 09:50

Waiting for customer environment to fix wrong data.
(0099138)
aferraz (manager)
2017-09-19 11:38

Code review + Testing OK
(0099359)
hudsonbot (developer)
2017-09-21 16:49

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/9750b78d3e5c [^]
Maturity status: Test
(0099360)
hudsonbot (developer)
2017-09-21 16:49

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/9750b78d3e5c [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-08-23 12:25 ngarcia New Issue
2017-08-23 12:25 ngarcia Assigned To => Triage Finance
2017-08-23 12:25 ngarcia Modules => Core
2017-08-23 12:25 ngarcia Resolution time => 1505253600
2017-08-23 12:25 ngarcia Triggers an Emergency Pack => No
2017-08-23 12:26 ngarcia Issue Monitored: networkb
2017-08-25 10:58 aferraz Assigned To Triage Finance => markmm82
2017-08-25 16:07 markmm82 Status new => acknowledged
2017-08-29 19:52 markmm82 Status acknowledged => scheduled
2017-09-04 11:50 ngarcia Relationship added depends on 0036776
2017-09-05 13:57 hgbot Checkin
2017-09-05 13:57 hgbot Note Added: 0098834
2017-09-05 13:57 hgbot Status scheduled => resolved
2017-09-05 13:57 hgbot Resolution open => fixed
2017-09-05 13:57 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f9e08035b10d25c70314392e4e2b42906c298021 [^]
2017-09-05 13:57 hgbot Checkin
2017-09-05 13:57 hgbot Note Added: 0098835
2017-09-11 09:50 aferraz Status resolved => new
2017-09-11 09:50 aferraz Resolution fixed => open
2017-09-11 09:50 aferraz Note Added: 0098926
2017-09-11 09:50 aferraz Assigned To markmm82 => ngarcia
2017-09-11 09:50 aferraz Status new => feedback
2017-09-19 11:37 aferraz Assigned To ngarcia => markmm82
2017-09-19 11:37 aferraz Status feedback => new
2017-09-19 11:38 aferraz Status new => scheduled
2017-09-19 11:38 aferraz Status scheduled => resolved
2017-09-19 11:38 aferraz Fixed in Version => 3.0PR17Q4
2017-09-19 11:38 aferraz Resolution open => fixed
2017-09-19 11:38 aferraz Review Assigned To => aferraz
2017-09-19 11:38 aferraz Note Added: 0099138
2017-09-19 11:38 aferraz Status resolved => closed
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099359
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099360


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker