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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032914
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2016-05-10 12:592016-06-17 19:37
ReporterpsanjuanView Statuspublic 
Assigned Toaferraz 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision036fbe5f521c
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionProfessional ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Review Assigned Tovmromanos
Web browser
ModulesCore
Regression levelPackaging and release
Regression date2016-01-13
Regression introduced in releasemain
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/cac91026199d [^]
Triggers an Emergency PackNo
Summary

0032914: Wrong payment status as well payment in details when partially paying a Reversed Sales Invoice

DescriptionWrong payment status as well payment details when partially paying a Reversed Sales Invoice
Steps To Reproduce- Go to Sales Invoice window. Create a new one for F&B España, Alimentos BP.
- Change document type to "Reversed Sales Invoice".
- Save it

- Go to lines and create a new one.
** Product = Agua sin Gas 1
** Invoiced Quantity = -500
- Complete it. (If there is any credit available, do NOT use it).

- Press Add Payment.
- Change Actual Payment amount to -500.00
- Make sure only the reversed sales invoice just created is selected. Change its amount from -925.65 to -500.00 (see Issue 32914_Image 1).
- Press Done

- Realize that Payment Complete status of the invoice has turned into Yes (which is not correct).

- Go to Payment Plan tab and check neither received amount, outstanding amount are correct.

- Navigate to the payment in created and realize that not only the total reversed sales invoice amount has been paid, but also some credit amount has been generated. (see Issue32914_Image2)

Take note that same error is happening in purchase.
Proposed SolutionPayment Complete status should not turn into Yes because the reverse sales invoice has been partially paid.

Payment Plan should be updated properly

Payment In created should be the correct one base on actual payment entered.
TagsNo tags attached.
Attached Filespng file icon 32914_image1.png [^] (72,078 bytes) 2016-05-10 13:08


png file icon Issue32914_Image2.png [^] (115,307 bytes) 2016-05-10 13:09


? file icon Payment_Details_Issue32914.ods [^] (49,272 bytes) 2016-05-20 15:20

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0032959 closedaferraz Not possible to add more than one partial payment to a negative purchase order 
depends on backport 00329163.0PR16Q2 closedaferraz Wrong payment status as well payment in details when partially paying a Reversed Sales Invoice 
caused by defect 0031457 closedAtulOpenbravo Invoice with negative amount with an order with lower amount is set as not paid. Positive and negative schedule details pending 
related to defect 0032915 scheduledcollazoandy4 Not correct distribution while partially paying a reversed sales invoice. 
related to design defect 0033026 newTriage Finance Outstanding amount pending to be settle in the order while booking a prepayment 

-  Notes
(0086413)
AtulOpenbravo (developer)
2016-05-12 15:59
edited on: 2016-05-20 10:16

Test Plan 1 - Verified

- Go to Sales Invoice window. Create a new one for F&B España, Alimento BP.
- Go to lines and enter two lines for different products, any invoiced quantity.
- Complete the invoice.Do not use credit if any.
- Press Add Payment. Enter some partial payments for the invoice, at least two.
- Verify that invoice payment complete status does not change to Yes until the invoice is fully paid.
- Verify that payment plan lines and payment details are correct.

Repeat same test as above for:
- positive purchase invoice
- negative sales invoice
- negative purchase invoice
- two positive invoices
- two negative invoices with a not single payment terms but 30-60 for instance.
- two invoices, one positive and the other one negative

Test Plan 2 - Verified.

- Go to Sales Invoice window. Create a new one for F&B España, Alimentos BP.
- Change document type to "Reversed Sales Invoice".
- Save it.

- Go to lines and create a new one.
  - Product = Agua sin Gas 1
  - Invoiced Quantity = -500
- Complete it. (If there is any credit available, do not use it).

- Press Add Payment.
  - Change Actual Payment amount to -500.00
  - Make sure only the reversed sales invoice just created is selected. Change its amount from -925.65 to -500.00
- Press Done.

- Check that Payment Complete status of the invoice is No.

- Go to Payment Plan tab and check received amount is -500, outstanding amount is -425.65, both are correct.


- Press Add Payment.
  - Change Actual Payment amount to -200.00
  - Make sure only the reversed sales invoice just created is selected. Change its amount to -200.00
- Press Done.

- Check that Payment Complete status of the invoice is No.

- Go to Payment Plan tab and check that Received amount is -700, outstanding amount is -225.65, both are correct.

- Press Add Payment.
  - Pay invoice remaining amount.
- Press Done.

- Check that Payment Complete status of the invoice is now Yes.

- Go to Payment Plan tab and check that a new received amount is -925.65, outstanding amount is 0.00, both are correct.

Repeat same test as above (Test Plan 2) for a negative AR Invoice, and for a Return Material Sales Invoice.

Repeat same test as above (Test Plan 2) for purchase invoice

Repeat same test as above (Test Plan 2) for Reverse purchase invoice and Reverse sales invoice but:
- including more than 1 negative invoice
- including a not single payment term but 30-60 for instance, therefore more than one payment plan line is created and therefore can be paid.

(0086418)
AtulOpenbravo (developer)
2016-05-12 16:26
edited on: 2016-05-20 09:15

Test Plan 3 - Verified.

- Go to Purchase Order window. Create a new one for F&B España, and Business Partner as "Bebidas Alegres, S.L.".
- Keep document type as "Standard Order".
- Save it.

- Go to lines and create a new one.
  - Product = Vino Blanco
  - Ordered Quantity = -500
  - Price = 1
  - Tax = Compras Exentas
- Complete it.

- Press Add Payment.
- Make sure only the Purchase Order just created is selected. Change its amount from -500 to -200.00
- Check that Actual Amount sets as -200.
- Press Done.

- Go to Payment Plan tab and check received amount is -200, outstanding amount is -300, both are correct.

- Try to add one additional payment to this order. Check that "Add Payment " button is not there.

It is not possible to add multiple partial payments to an order, see issue related: 32959

Repeat same test as above for Sales Order.

(0086419)
AtulOpenbravo (developer)
2016-05-12 16:28
edited on: 2016-05-20 15:12

Test Plan 4 - Verified

- Login as F&B International Group Admin Role.
- Create a Purchase Order
   Add a product with a negative quantity -200.00, VAT exempt, price = 1.00
   (Total gross amount:= -200). Book the order.
- Create a purchase invoice header.
   Add the previously created order.
   Add a positive line for another product, Invoiced qty = 50, VAT exempt, price = 1.00. Complete the invoice.
   (Total gross amount:= -150.00)
   Complete it. Do not use credit if any.

- Add a payment to it from the Purchase Invoice window for -50.00
- Check purchase invoice payment plan is:
* Expected Amount = -150
* Paid Amount = -50.00
* Outstanding Amount = -100.00
- Check purchase invoice payment details are:
* Line 1 - Received Amount = -100.00 Amount = -150.00
* Line 2 - Received Amount = 50.00 Amount = -150.00

- Go to the purchase order and verify Payment Plan as below:
* Expected Amount = -200.00
* Paid Amount = -100.00
* Outstanding Amount = -100.00

All of the above is correct, as order and invoice outstanding amounts are the same.

- Add another payment in the purchase invoice for -25.50

- Add another payment for the remaining amount -74.50

- Check purchase invoice payment plan is:
* Expected Amount = -150
* Paid Amount = -150
* Outstanding Amount = 0.00
- Check purchase invoice payment details are:
* Line 1 - Received Amount = -100.00 Amount = -150.00
* Line 2 - Received Amount = 50.00 Amount = -150.00
* Line 3 - Received Amount = -25.50 Amount = -150.00
* Line 4 - Received Amount = -74.50 Amount = -150.00

- Go to the purchase order and verify Payment Plan as below:
* Expected Amount = -200.00
* Paid Amount = -200.00
* Outstanding Amount = 0.00

All of the above is correct.

For additional test on this (invoice amount do not equal to order amount), see excel sheet attached, verified for both Sales and Purchase cycle.

(0086580)
psanjuan (manager)
2016-05-19 15:40
edited on: 2016-05-20 09:11

Issue 31457 related Test Plan - Verified.

- Login as F&B International Group Admin Role.
- Go to BP window and remove basic discount for Alimentos BP.
- Create a Sales Order for F&B España, Alimentos BP, set it as Invoice Terms = Immediate
   Add a product with a negative quantity. Enter a net unit price = 1.00 and select an exempt Tax. Book it
   (Total gross amount:= -200)
- Create a sales invoice header for F&B España, Alimentos BP.
   Add the previously created order.
   Add a positive line for any other product with invoiced qty = 50, unit price =1.00 and an exempt Tax.
   (Total gross amount:= -150)
   Complete it.
- Add a payment to it from the Sales Invoice window for the total amount of the invoice (-150).
- Verify that payment complete field = Yes.
- Go to Payment Plan tab and verify there is no outstanding amount to be paid, same as in Payment details tab. Expected amount = Received Amount = -150
- Go to Sales order, payment plan tab and check that Outstanding amount = 0.00. Expected Amount = Received Amount = -200.00

- Launch the payment report and check that the invoice is shown only once with "Deposited Not Cleared" status or "Payment Received", depending on payment method configuration; but it is not shown as "Awaiting Payment". Transaction amount and Base amount = -150.00

Repeat same test for Purchase flow - Verified.

- Launch the payment report and check that the invoice is shown only once with "Withdrawn Not Cleared" status or "Payment Made", depending on payment method configuration; but it is not shown as "Awaiting Payment". Transaction amount and Base amount = 150.00

(0086631)
psanjuan (manager)
2016-05-20 15:17

Test plan above verified.

issue can be code reviewed and closed.
(0086654)
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
---
(0086656)
vmromanos (developer)
2016-05-23 13:44

Code review OK
(0087550)
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
2016-05-10 12:59 psanjuan New Issue
2016-05-10 12:59 psanjuan Assigned To => Triage Finance
2016-05-10 12:59 psanjuan Modules => Core
2016-05-10 12:59 psanjuan Regression introduced in release => main
2016-05-10 12:59 psanjuan Triggers an Emergency Pack => No
2016-05-10 13:08 psanjuan Regression level => Packaging and release
2016-05-10 13:08 psanjuan Steps to Reproduce Updated View Revisions
2016-05-10 13:08 psanjuan Proposed Solution updated
2016-05-10 13:08 psanjuan File Added: 32914_image1.png
2016-05-10 13:09 psanjuan File Added: Issue32914_Image2.png
2016-05-10 13:09 psanjuan Summary Wrong payment status as well payment details when partially paying a Reversed Sales Invoice => Wrong payment status as well payment in details when partially paying a Reversed Sales Invoice
2016-05-10 13:12 psanjuan Steps to Reproduce Updated View Revisions
2016-05-10 14:02 psanjuan Relationship added related to 0032915
2016-05-10 14:14 aferraz Relationship added caused by 0031457
2016-05-10 14:18 aferraz Regression date => 2016-01-13
2016-05-10 14:18 aferraz Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/cac91026199d [^]
2016-05-10 14:19 aferraz Status new => scheduled
2016-05-10 14:19 aferraz Assigned To Triage Finance => AtulOpenbravo
2016-05-12 15:59 AtulOpenbravo Note Added: 0086413
2016-05-12 16:26 AtulOpenbravo Note Added: 0086418
2016-05-12 16:28 AtulOpenbravo Note Added: 0086419
2016-05-12 16:30 AtulOpenbravo Note Added: 0086420
2016-05-13 13:03 psanjuan Note Edited: 0086413 View Revisions
2016-05-13 13:08 psanjuan Note Edited: 0086418 View Revisions
2016-05-13 13:09 psanjuan Note Edited: 0086418 View Revisions
2016-05-13 13:29 psanjuan Note Edited: 0086413 View Revisions
2016-05-13 13:39 psanjuan Note Edited: 0086413 View Revisions
2016-05-13 13:45 psanjuan Note Edited: 0086413 View Revisions
2016-05-13 13:45 psanjuan Note Edited: 0086413 View Revisions
2016-05-13 13:57 psanjuan Note Edited: 0086413 View Revisions
2016-05-13 14:30 psanjuan Note Edited: 0086419 View Revisions
2016-05-13 14:41 psanjuan Note Edited: 0086419 View Revisions
2016-05-13 14:51 psanjuan Note Edited: 0086419 View Revisions
2016-05-13 14:52 psanjuan Note Edited: 0086420 View Revisions
2016-05-13 15:05 psanjuan Note Edited: 0086418 View Revisions
2016-05-13 15:07 psanjuan Note Edited: 0086419 View Revisions
2016-05-13 15:07 psanjuan Note Edited: 0086420 View Revisions
2016-05-13 15:13 psanjuan Note Edited: 0086418 View Revisions
2016-05-13 15:14 psanjuan Relationship added related to 0032959
2016-05-13 15:21 psanjuan Note Edited: 0086419 View Revisions
2016-05-16 15:09 psanjuan Note Edited: 0086419 View Revisions
2016-05-16 15:11 psanjuan Note Edited: 0086419 View Revisions
2016-05-16 15:20 psanjuan Note Edited: 0086419 View Revisions
2016-05-18 10:21 psanjuan Note Edited: 0086413 View Revisions
2016-05-18 12:22 psanjuan Note Edited: 0086413 View Revisions
2016-05-19 15:40 psanjuan Note Added: 0086580
2016-05-19 15:46 psanjuan Note Edited: 0086580 View Revisions
2016-05-19 15:49 psanjuan Note Edited: 0086580 View Revisions
2016-05-20 08:59 psanjuan Note Edited: 0086580 View Revisions
2016-05-20 09:11 psanjuan Note Edited: 0086580 View Revisions
2016-05-20 09:15 psanjuan Note Edited: 0086418 View Revisions
2016-05-20 09:49 psanjuan Note Edited: 0086413 View Revisions
2016-05-20 10:07 psanjuan Note Edited: 0086413 View Revisions
2016-05-20 10:10 psanjuan Note Edited: 0086413 View Revisions
2016-05-20 10:16 psanjuan Note Edited: 0086413 View Revisions
2016-05-20 15:09 psanjuan Note Edited: 0086419 View Revisions
2016-05-20 15:12 psanjuan Note Edited: 0086419 View Revisions
2016-05-20 15:12 psanjuan Note Edited: 0086419 View Revisions
2016-05-20 15:17 psanjuan Note Deleted: 0086420
2016-05-20 15:17 psanjuan Note Added: 0086631
2016-05-20 15:17 psanjuan File Added: Payment_Details.ods
2016-05-20 15:20 psanjuan File Deleted: Payment_Details.ods
2016-05-20 15:20 psanjuan File Added: Payment_Details_Issue32914.ods
2016-05-23 10:07 aferraz Assigned To AtulOpenbravo => aferraz
2016-05-23 13:43 hgbot Checkin
2016-05-23 13:43 hgbot Note Added: 0086654
2016-05-23 13:43 hgbot Status scheduled => resolved
2016-05-23 13:43 hgbot Resolution open => fixed
2016-05-23 13:43 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/036fbe5f521cf65b516c065463160fe59d6b9ef3 [^]
2016-05-23 13:44 vmromanos Review Assigned To => vmromanos
2016-05-23 13:44 vmromanos Note Added: 0086656
2016-05-23 13:44 vmromanos Status resolved => closed
2016-05-23 13:59 vmromanos Severity critical => major
2016-05-23 15:14 psanjuan Relationship added related to 0033026
2016-06-17 19:37 hudsonbot Checkin
2016-06-17 19:37 hudsonbot Note Added: 0087550


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker