Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034038Openbravo ERP03. Procurement managementpublic2016-09-20 15:502016-10-13 11:31
psanjuan 
umartirena 
urgentmajoralways
closedfixed 
30Professional Appliance
 
3.0PR16Q43.0PR16Q4 
aferraz
Core
No
0034038: Payments created with amount 0.00 need to be numbered as *R* (same as netting payment from cancel and replace)
Payments created with amount 0.00 need to be numbered as *R* (same as netting payment from cancel and replace)
Create a vendor named Vendor Credito in F&B España.
Assign a purchase price list in EUR (Tarifa Bebidas Alegres).
Payment Method Transferencia set up to allow making payments in other currencies.
Financial account Cuenta de Banco.
Enter a payment term and a location.
Save it.

Go to Payment Out window and create a new one. Select the new vendor, enter a Generated Credit amount of 100.00 €. Press Add Details. Do not select any invoice but just leave the credit to be used later. Press Done.

Go to business partner window and select the vendor. Run Set New Currency process. Enter USD as new currency and enter also a conversion rate and a G/L item. Press Ok.

Go to payment out window and realize that the payment in USD with an amount of 0.00 does not have a number with *R*
This kind of payments are not netting payments, anyway if a 0.00 amount payment is created, regardless generated credit amount, it will have to be numbered with *R

No tags attached.
causes defect 0034207 closed asiermartirena Document no. sequence is no longer respected when Payment with "Amount = 0.00" is involved 
png Issue_34038.png (140,269) 2016-09-20 15:51
https://issues.openbravo.com/file_download.php?file_id=9840&type=bug
png
Issue History
2016-09-20 15:50psanjuanNew Issue
2016-09-20 15:50psanjuanAssigned To => Triage Finance
2016-09-20 15:50psanjuanModules => Core
2016-09-20 15:50psanjuanTriggers an Emergency Pack => No
2016-09-20 15:51psanjuanFile Added: Issue_34038.png
2016-09-28 10:06hgbotCheckin
2016-09-28 10:06hgbotNote Added: 0090334
2016-09-28 10:06hgbotStatusnew => resolved
2016-09-28 10:06hgbotResolutionopen => fixed
2016-09-28 10:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fb555f365d96943f26be6062dbf88ff2930ddf07 [^]
2016-09-28 13:16psanjuanNote Added: 0090345
2016-09-28 13:18psanjuanNote Edited: 0090345bug_revision_view_page.php?bugnote_id=0090345#r13258
2016-09-28 13:18psanjuanNote Edited: 0090345bug_revision_view_page.php?bugnote_id=0090345#r13259
2016-09-28 13:20psanjuanNote Added: 0090346
2016-09-28 13:24psanjuanNote Added: 0090347
2016-09-28 13:30psanjuanNote Edited: 0090345bug_revision_view_page.php?bugnote_id=0090345#r13260
2016-09-29 00:02hudsonbotCheckin
2016-09-29 00:02hudsonbotNote Added: 0090362
2016-09-30 12:30hgbotCheckin
2016-09-30 12:30hgbotNote Added: 0090416
2016-09-30 14:05psanjuanNote Edited: 0090346bug_revision_view_page.php?bugnote_id=0090346#r13299
2016-09-30 14:06psanjuanNote Edited: 0090346bug_revision_view_page.php?bugnote_id=0090346#r13300
2016-09-30 14:06psanjuanNote Edited: 0090346bug_revision_view_page.php?bugnote_id=0090346#r13301
2016-09-30 14:10psanjuanNote Edited: 0090347bug_revision_view_page.php?bugnote_id=0090347#r13303
2016-09-30 14:13psanjuanNote Added: 0090432
2016-09-30 14:15psanjuanNote Added: 0090435
2016-09-30 14:26psanjuanSummaryPayment out created with amount 0.00 and Generate Credit are numbered as *R* (netting payment) => Payments created with amount 0.00 need to be numbered as *R* (same as netting payment from cancel and replace)
2016-09-30 14:26psanjuanDescription Updatedbug_revision_view_page.php?rev_id=13305#r13305
2016-09-30 14:26psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13307#r13307
2016-09-30 14:26psanjuanProposed Solution updated
2016-09-30 14:27aferrazAssigned ToTriage Finance => umartirena
2016-09-30 19:07hudsonbotCheckin
2016-09-30 19:07hudsonbotNote Added: 0090443
2016-10-04 12:33psanjuanNote Edited: 0090345bug_revision_view_page.php?bugnote_id=0090345#r13323
2016-10-04 12:36psanjuanNote Edited: 0090346bug_revision_view_page.php?bugnote_id=0090346#r13324
2016-10-04 12:38psanjuanNote Edited: 0090347bug_revision_view_page.php?bugnote_id=0090347#r13325
2016-10-04 12:40psanjuanNote Edited: 0090435bug_revision_view_page.php?bugnote_id=0090435#r13327
2016-10-04 12:47psanjuanNote Edited: 0090435bug_revision_view_page.php?bugnote_id=0090435#r13328
2016-10-04 12:57psanjuanNote Edited: 0090435bug_revision_view_page.php?bugnote_id=0090435#r13329
2016-10-04 12:58psanjuanNote Added: 0090473
2016-10-04 14:07psanjuanNote Edited: 0090473bug_revision_view_page.php?bugnote_id=0090473#r13331
2016-10-04 14:27psanjuanNote Added: 0090474
2016-10-05 14:32hgbotCheckin
2016-10-05 14:32hgbotNote Added: 0090496
2016-10-05 19:35hudsonbotCheckin
2016-10-05 19:35hudsonbotNote Added: 0090504
2016-10-11 14:13hgbotCheckin
2016-10-11 14:13hgbotNote Added: 0090531
2016-10-11 14:14aferrazTarget Version => 3.0PR16Q4
2016-10-11 14:14aferrazReview Assigned To => aferraz
2016-10-11 14:14aferrazNote Added: 0090532
2016-10-11 14:14aferrazStatusresolved => closed
2016-10-11 14:14aferrazFixed in Version => 3.0PR16Q4
2016-10-13 11:31hudsonbotCheckin
2016-10-13 11:31hudsonbotNote Added: 0090551
2016-10-18 11:24aferrazRelationship addedcauses 0034207

Notes
(0090334)
hgbot   
2016-09-28 10:06   
Repository: erp/devel/pi
Changeset: fb555f365d96943f26be6062dbf88ff2930ddf07
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Tue Sep 27 15:39:11 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/fb555f365d96943f26be6062dbf88ff2930ddf07 [^]

Fixes issue 34038: All payments of amount Zero will have *R* concatenated as part of the document number

---
M src/org/openbravo/event/FINPaymentEventHandler.java
---
(0090345)
psanjuan   
2016-09-28 13:16   
(edited on: 2016-10-04 12:33)
Test Plan

Test case 1 - Credit generation.

As F&B International Group Admin role, go to Business Partner window.
Create a new one setup as Supplier, select a Purchase Price List in EUR.

Go to Payment Out window and create a new one for F&B España and the new business partner. Enter 100.00 in the field "Generated Credit". Press Add Details and do not select anything but just process the payment and leave the credit to be used later.

Check that a payment out has been created for an amount of 100.00 and a generated credit = 100.00, numbered WITHOUT *R*

This is correct.

Repeat same test for a "Customer " business partner. Same result is obtained.

(0090346)
psanjuan   
2016-09-28 13:20   
(edited on: 2016-10-04 12:36)
Test case 2 - Run Set New Currency Process.

Go to the business partner create and run Set New Currency Process. Select USD and a G/L item. Press Done.

Go to payment out window and select all the payment for this business partner.

Check that all the payments there are numbered normally but last one for an amount = 0.00, and a generated credit of 113.00 USD. This last one is numbered as: 1000621*Z* (Zero Amount payment).

This is correct.

Repeat same test for a "Customer " business partner. Same result is obtained.

(0090347)
psanjuan   
2016-09-28 13:24   
(edited on: 2016-10-04 12:38)
Test case 3 - Purchase Invoice voiding.

Go to purchase invoice window and create a new one for this new business partner. Select any product and complete the invoice. Void the invoice.

Check that a payment out has been created to "automatically" pay invoice being voided and void invoice.

Check that payment amount is 0.00, Generated Credit is 0.00 and document number does include a *Z* (Zero amount payment).

Repeat same test for a sales invoice do not paid being voided.

(0090362)
hudsonbot   
2016-09-29 00:02   
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/2cd54ee6264a [^]
Maturity status: Test
(0090416)
hgbot   
2016-09-30 12:30   
Repository: erp/devel/pi
Changeset: 25781f9999942d59c02a11c90d4a083b6e0ed799
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Thu Sep 29 10:27:32 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/25781f9999942d59c02a11c90d4a083b6e0ed799 [^]

Related to issue 34038: Fix issue when updating payments to quantity Zero

---
M src/org/openbravo/event/FINPaymentEventHandler.java
---
(0090432)
psanjuan   
2016-09-30 14:13   
Test Plan above verified. Issue can be close.
(0090435)
psanjuan   
2016-09-30 14:15   
(edited on: 2016-10-04 12:57)
Test Case 4 - Zero Amount payments reactivated.

Reactivate and delete lines of any of the amount 0 payments created above numbered as *Z*. Add an amount of 100 € and select an invoice or an order to pay.
Process the payment. Check that the *Z* is removed from payment number.

Reactivate and delete lines of any of the amount 0 payments created above numbered as *Z. Add an amount of -100.00 € and select an invoice or an order to pay. Process the payment. Check that the *Z* is removed from payment number.

(0090443)
hudsonbot   
2016-09-30 19:07   
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/538700cbd709 [^]
Maturity status: Test
(0090473)
psanjuan   
2016-10-04 12:58   
(edited on: 2016-10-04 14:07)
Test Case 5 - Reversed Payment

1. As System Admin user go to Module window and search by ""Advanced Payables and Receivables Mngmt""
2. Set it as In Development = Yes. Save.
3. Go to Windows, Tabs and Fields window and search ""Payment In"" window. Go to Tab ""Header"" and then to Field ""Reverse Payment"".
4. Edit it and set is as Displayed = Yes. Save.
4. Repeat same as before por Payment Out window.
6. Log out and compile
7. Go to Sales Invoice window and create a new one for F&BEspaña, Alimentos y Supermercados business partner.
8. Add any line and complete the invoice.
9. Pay the invoice.
10. Navigate to the payment in created and reverse it by using the process button "Reverse Payment".
11. Verify that a reversed payment has been created numbered as *R*10000388

Repeat same test as above for a payment out being reversed.

(0090474)
psanjuan   
2016-10-04 14:27   
Test plan above verified. Issue can be closed.
(0090496)
hgbot   
2016-10-05 14:32   
Repository: erp/devel/pi
Changeset: 89f61788c1004d7cb588e77e0957fa6e7491dedb
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Tue Oct 04 09:54:41 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/89f61788c1004d7cb588e77e0957fa6e7491dedb [^]

Related to issue 34038: Payments of Zero amount finally will be numbered with *Z*

Several changes have been done:
1) Fixed copyright of FINPaymentEventHandler.java
2) Moved FINPaymentEventHandler.java event handler to aprm module
3) Set *Z* at the end of 0.00 amount payment methods
4) While executing onSave, if the payment is not processed and document number has '<' in the beginning and '>' at the end, remove them

---
M src/org/openbravo/erpCommon/businessUtility/CancelAndReplaceUtils.java
A modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/event/FINPaymentEventHandler.java
R src/org/openbravo/event/FINPaymentEventHandler.java
---
(0090504)
hudsonbot   
2016-10-05 19:35   
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/9f948cce366c [^]
Maturity status: Test
(0090531)
hgbot   
2016-10-11 14:13   
Repository: erp/devel/pi
Changeset: dc0e10831b4e788edff2af64b95469bf97cb5a4d
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Oct 10 11:09:34 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/dc0e10831b4e788edff2af64b95469bf97cb5a4d [^]

Related to issue 34038: Code review improvements

Remove FINPaymentEventHandler event handler and include the logic in existing FIN_PaymentEventListener event handler.
Remove unneeded payment parameter in setDocumentNoToPayment method.
Call payment.isProcessed() instead of event.getCurrentState(processedProperty).

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/event/FIN_PaymentEventListener.java
R modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/event/FINPaymentEventHandler.java
---
(0090532)
aferraz   
2016-10-11 14:14   
Code review OK
(0090551)
hudsonbot   
2016-10-13 11:31   
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/9b5b1cc15f9c [^]
Maturity status: Test