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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0031457
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Z. Othersmajoralways2015-11-12 18:422016-06-17 19:37
ReporterngarciaView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisioncac91026199d
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesAdvanced Payables and Receivables Mngmt
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0031457: Invoice with negative amount with an order with lower amount is set as not paid. Positive and negative schedule details pending

DescriptionInvoice with negative amount with an order with lower amount is set as not paid. Positive and negative schedule details pending
Steps To ReproduceAs group admin role:
   Create a Sales Order, set it as Invoice Terms = Immediate
   Add a product with a negative quantity and book it (Total gross amount: -200)
   Create a sales invoice header
   Add the previously created order
   Add a positive line (50) in order the total amount to remain negative (Total gross amount: -150)
   Complete it
   Add a payment to it from the Sales Invoice window for the total amount of the invoice (-150)
   Launch the payment report and check the invoice is shown with Awaiting Payment status and an amount of 0
   Check through database two schedule details are pending and associated to the invoice
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
causes defect 0032914 closedaferraz Wrong payment status as well payment in details when partially paying a Reversed Sales Invoice 

-  Notes
(0083041)
AtulOpenbravo (developer)
2015-12-29 11:19
edited on: 2016-05-19 17:34

Test Plan
- Login as F&B International Group Admin Role.
- Create a Sales Order, set it as Invoice Terms = Immediate
   Add a product with a negative quantity and book it
   (Total gross amount:= -200)
- Create a sales invoice header.
   Add the previously created order.
   Add a positive line (50) in order the total amount to remain negative
   (Total gross amount:= -150)
   Complete it.
- Add a payment to it from the Sales Invoice window for the total amount of the invoice (-150).
- Launch the payment report and check the invoice is shown with Deposited Not Cleared status.
- Check with the following query only two payment schedule details have been created, both related with created payment, one with an amount of -200 related with both the order and the invoice and the other one with an amount of 50 related only with the invoice:

select i.grandtotal, ps.amount, ps.paidamt, ps.outstandingamt, psd.amount, psd.fin_payment_schedule_order, psd.fin_payment_schedule_invoice, psd.fin_payment_detail_id
from c_invoice i
join fin_payment_schedule ps
on i.c_invoice_id = ps.c_invoice_id
join fin_payment_scheduledetail psd
on ps.fin_payment_schedule_id = psd.fin_payment_schedule_invoice
where i.documentno = '<invoice_number>'

Purchase flow verified.

(0083267)
hgbot (developer)
2016-01-13 18:25

Repository: erp/devel/pi
Changeset: cac91026199ded604ae3830c114d42ee26bcc690
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Dec 29 15:37:32 2015 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/cac91026199ded604ae3830c114d42ee26bcc690 [^]

Fixes Issue 31457:Invoice with negative amount with an order with lower
amount is set as not paid. Positive and negative schedule details pending

Negative amount comparison in Add Payment Action Handler changed.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentActionHandler.java
---
(0083268)
dmiguelez (developer)
2016-01-13 18:26

Code Review + Testing Ok
(0085043)
hudsonbot (developer)
2016-03-17 10:54

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/b22fb0500156 [^]
Maturity status: Test
(0086650)
hgbot (developer)
2016-05-23 13:43

Repository: erp/backports/3.0PR16Q2
Changeset: 4d626559c58861630878ffafd67e9b0380166625
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu May 19 15:15:02 2016 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR16Q2/rev/4d626559c58861630878ffafd67e9b0380166625 [^]

Fixes issue 32916: Fix properly issue 31457

Change getOrderedPaymentScheduleDetails method in AddPaymentActionHandler class to order by absolute value of FIN_PaymentScheduleDetail.PROPERTY_AMOUNT property.
Change also the manage negative amounts check to recalculate remainingAmount if it is lower than outstandingAmount in case remainingAmount is negative.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentActionHandler.java
---
(0086653)
hgbot (developer)
2016-05-23 13:43

Repository: erp/devel/pi
Changeset: 036fbe5f521cf65b516c065463160fe59d6b9ef3
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu May 19 15:15:02 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/036fbe5f521cf65b516c065463160fe59d6b9ef3 [^]

Fixes issue 32914: Fix properly issue 31457

Change getOrderedPaymentScheduleDetails method in AddPaymentActionHandler class to order by absolute value of FIN_PaymentScheduleDetail.PROPERTY_AMOUNT property.
Change also the manage negative amounts check to recalculate remainingAmount if it is lower than outstandingAmount in case remainingAmount is negative.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentActionHandler.java
---
(0087551)
hudsonbot (developer)
2016-06-17 19:37

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

- Issue History
Date Modified Username Field Change
2015-11-12 18:42 ngarcia New Issue
2015-11-12 18:42 ngarcia Assigned To => Triage Finance
2015-11-12 18:42 ngarcia Modules => Core
2015-11-12 18:42 ngarcia Triggers an Emergency Pack => No
2015-11-12 18:43 ngarcia Resolution time => 1450652400
2015-11-12 18:44 ngarcia Issue Monitored: networkb
2015-11-12 18:45 ngarcia Modules Core => Advanced Payables and Receivables Mngmt
2015-11-12 19:38 heccam Issue Monitored: heccam
2015-12-09 12:02 AtulOpenbravo Assigned To Triage Finance => AtulOpenbravo
2015-12-09 12:02 AtulOpenbravo Status new => scheduled
2015-12-29 11:19 AtulOpenbravo Note Added: 0083041
2015-12-29 11:19 AtulOpenbravo Note Edited: 0083041 View Revisions
2015-12-29 11:21 AtulOpenbravo Note Edited: 0083041 View Revisions
2016-01-13 18:25 hgbot Checkin
2016-01-13 18:25 hgbot Note Added: 0083267
2016-01-13 18:25 hgbot Status scheduled => resolved
2016-01-13 18:25 hgbot Resolution open => fixed
2016-01-13 18:25 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/cac91026199ded604ae3830c114d42ee26bcc690 [^]
2016-01-13 18:26 dmiguelez Review Assigned To => dmiguelez
2016-01-13 18:26 dmiguelez Note Added: 0083268
2016-01-13 18:26 dmiguelez Status resolved => closed
2016-03-17 10:54 hudsonbot Checkin
2016-03-17 10:54 hudsonbot Note Added: 0085043
2016-05-10 14:14 aferraz Relationship added causes 0032914
2016-05-19 17:34 aferraz Note Edited: 0083041 View Revisions
2016-05-23 13:43 hgbot Checkin
2016-05-23 13:43 hgbot Note Added: 0086650
2016-05-23 13:43 hgbot Checkin
2016-05-23 13:43 hgbot Note Added: 0086653
2016-06-17 19:37 hudsonbot Checkin
2016-06-17 19:37 hudsonbot Note Added: 0087551


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker