Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034987Openbravo ERPZ. Otherspublic2017-01-18 10:202017-03-15 20:19
nataliag 
AtulOpenbravo 
normalmajoralways
closedfixed 
5
 
3.0PR17Q2 
markmm82
Advanced Payables and Receivables Mngmt
No
0034987: Not possible to post a payment in that has used as payment method one which uses the “Leave as credit” execution process.
When a Payment In is generated using a “Credit” payment method, that is, a Payment method which uses the leave as credit execution process and In Transit Payment Account as Upon receipt, and a return is made, the Account associated is the 999-Suspense one, instead of “In transit Payment” account. Then, that payment in is not possible to be posted.
1- In backend, go to Payment Method and create a new one, called for example “CREDIT” and having the checks of Payment In allowed and Automatic Receipt. Select “Automatic” as Execution Type, “Leave as credit” as Execution Process, uncheck the Deferred option and select “In transit Payment Account” as Upon Receipt Use.

2- Then, go to financial account window and in one of the accounts, create a new payment method selecting as payment method, that one created in step 1, “CREDIT”.

3- Go To sales Invoice and create a new one using as payment method “Credit” that one created in step 1 and “Return Material Sales Invoice” as Transaction Document. Insert also a line with a negative invoiced quantity and complete it.

4- Go to Payment Details tab, in Payment plan to navigate to the payment In. There in the Accounting tab it is possible to see that the Account that has been associated has been the 999-Suspense(See Image 999-suspense.png attached). This is not correct, as the associated account should be “In transit payment”.
No tags attached.
png 999-suspense.png (102,463) 2017-01-18 10:20
https://issues.openbravo.com/file_download.php?file_id=10320&type=bug
png
Issue History
2017-01-18 10:20nataliagNew Issue
2017-01-18 10:20nataliagAssigned To => Triage Finance
2017-01-18 10:20nataliagFile Added: 999-suspense.png
2017-01-18 10:20nataliagModules => Advanced Payables and Receivables Mngmt
2017-01-18 10:20nataliagResolution time => 1486508400
2017-01-18 10:20nataliagTriggers an Emergency Pack => No
2017-01-18 21:15markmm82Assigned ToTriage Finance => collazoandy4
2017-02-02 15:41markmm82Assigned Tocollazoandy4 => AtulOpenbravo
2017-02-02 16:04AtulOpenbravoStatusnew => scheduled
2017-02-15 06:14AtulOpenbravoNote Added: 0094341
2017-02-20 12:25psanjuanNote Added: 0094460
2017-02-20 12:37psanjuanNote Added: 0094461
2017-02-20 12:37AtulOpenbravoNote Edited: 0094341bug_revision_view_page.php?bugnote_id=0094341#r14635
2017-02-20 12:40psanjuanNote Edited: 0094461bug_revision_view_page.php?bugnote_id=0094461#r14637
2017-02-20 12:44psanjuanNote Edited: 0094461bug_revision_view_page.php?bugnote_id=0094461#r14638
2017-02-20 12:48psanjuanNote Edited: 0094461bug_revision_view_page.php?bugnote_id=0094461#r14639
2017-02-20 12:52psanjuanNote Edited: 0094461bug_revision_view_page.php?bugnote_id=0094461#r14640
2017-02-20 12:55psanjuanNote Added: 0094466
2017-02-20 12:58psanjuanNote Edited: 0094461bug_revision_view_page.php?bugnote_id=0094461#r14641
2017-02-20 13:35psanjuanNote Edited: 0094461bug_revision_view_page.php?bugnote_id=0094461#r14642
2017-02-20 13:37psanjuanNote Edited: 0094461bug_revision_view_page.php?bugnote_id=0094461#r14643
2017-02-20 18:14hgbotCheckin
2017-02-20 18:14hgbotNote Added: 0094487
2017-02-20 18:14hgbotStatusscheduled => resolved
2017-02-20 18:14hgbotResolutionopen => fixed
2017-02-20 18:14hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5f9aab62bd8af7cf593525f4321f160a886fbc23 [^]
2017-02-20 18:16markmm82Review Assigned To => markmm82
2017-02-20 18:16markmm82Note Added: 0094488
2017-02-20 18:16markmm82Statusresolved => closed
2017-02-20 18:16markmm82Fixed in Version => 3.0PR17Q2
2017-03-15 20:19hudsonbotCheckin
2017-03-15 20:19hudsonbotNote Added: 0095199

Notes
(0094341)
AtulOpenbravo   
2017-02-15 06:14   
(edited on: 2017-02-20 12:37)
Test Plan
- Go to Payment Method and create a new one, called for example “CREDIT” and having the checks of Payment In allowed and Automatic Receipt. Select “Automatic” as Execution Type, “Leave as credit” as Execution Process, uncheck the Deferred option and select “In transit Payment Account” as Upon Receipt Use.

- Then, go to financial account window and in one of the accounts, create a new payment method selecting as payment method, that one created in step 1, “CREDIT”.

- Go To sales Invoice and create a new one using as payment method “Credit” that one created in step 1 and “Return Material Sales Invoice” as Transaction Document. Insert also a line with a negative invoiced quantity and complete it.

- Go to Payment Details tab, in Payment plan to navigate to the payment In. In the Accounting tab , Check that the Account that has been associated to the "Customer Pre-Payment Account".

Documentation notes at:-

http://wiki.openbravo.com/wiki/Execution_Process [^]

"Leave as Credit - this process is just use Return Materials functionality as it allows to change a negative payment in/out into a positive credit for the business partner (customer/vendor)."

Same test plan verified for Purchase Flow.

(0094460)
psanjuan   
2017-02-20 12:25   
Issue verified.
(0094461)
psanjuan   
2017-02-20 12:37   
(edited on: 2017-02-20 13:37)
Test Plan

Go to payment method and create a new one for F&B España, named as "Credit", with below setup:
Payment In Allowed = Yes
Automatic Receipt = Yes
Execution Type = Automatic
Execution Process = Leave as Credit
Deferred = No
Upon Receipt Use = In Transit Payment Account.

Repeat same setup for Payment Out.

Go to Cuenta de Banco financial account, and select just created payment in Payment Method tab.

Go to Sales Invoice, and create a new one for F&B España, Alimentos y Supermercados business partner. Change Payment Method to "Credit"

Select any product and any quantity. Complete the invoice, and Execute the payment.

Verify that sales invoice changes to Payment Complete = Yes.

Go to Payment Plan, Payment details to navigate to the payment in created.

Verify that payment date = expected or due date of the invoice (Is this correct).
Post the payment.

Check below posting is shown, which is correct:
12.34 (55550) In transit account CREDIT
12.34 (43000) Account Receivables DEBIT

Test Case 2
Repeat same test for a purchase invoice.

Check posting looks like:
822.80 (40000) Account payables DEBIT
822.80 (55550) In transit account CREDIT

Test Case 3

Repeat same test as 1 and 2 but for other Automatic payment such as "Simple Execution"

Test Case 5

Repeat same test as 1 and 2 but for other Automatic payment such as "Print Check simple process"


Test Case 6

Repeat same test as 1 and 2 but setting Deferred = Yes for both payment in and payment out.


Test Case 7

Repeat same test as 1 and 2 but

Upon Receipt/Payment Use = Empty
Upon Deposit/Withdrawal Use = In transit payment account

Test Case 8 - Reverse Sales Invoice

Go to Sales Invoice and create a new one for F&B España, Alimentos y Supermercados business partner. Transaction Document = Reverse Sales Invoice.
Change Payment Method = Credit (configured as described in Test Case 1 above).

Go to lines and enter a negative line, for instance -10 units of Cerveza Ale 0.5L. Total Gross Amount = -24.68. Complete the invoice and Execute the payment.
Verify that the invoice is Payment Complete = Yes

Go to payment plan and then to payment details to navigate to the payment in created.

Verify that the payment is a zero payment numbered as 239*Z* as it has two lines:
one negative for an amount = -24.68, related to the invoice, and another one positive with an amount = 24.68

Post the payment. Verify posting looks like:

24.68 (43000) Clientes DEBIT
24.68 (43800) Anticipo Clientes CREDIT

Above means that a credit of 24.68 has been generated for the client Alimentos y Supermercados.

Create another invoice AR Invoice for Alimentos y Supermercados business partner, enter any product and quanity. Payment Method = Transferencia. Complete the invoice.

Verify a credit payment for an amount of 24.68 is shown in there for selection.

Repeat same test as above for Transaction Return material Sales Invoice.

Test Case 9 - Reverse Purchase Invoice

Repeat same test as 8 for purchase invoice (Reverse Purchase Invoice).

(0094466)
psanjuan   
2017-02-20 12:55   
Test Plan above verified.
(0094487)
hgbot   
2017-02-20 18:14   
Repository: erp/devel/pi
Changeset: 5f9aab62bd8af7cf593525f4321f160a886fbc23
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Feb 14 15:53:39 2017 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/5f9aab62bd8af7cf593525f4321f160a886fbc23 [^]

Fixes Issue 34987:Not possible to post a payment in that has used as
payment method one which uses the “Leave as credit” execution process.

In Leave As Credit execution process added fin payment schedule detail
and fin payment detail for credit amount in case of payment in/out
with negative amount.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/executionprocess/LeaveAsCredit.java
---
(0094488)
markmm82   
2017-02-20 18:16   
Code review + Testing OK
(0095199)
hudsonbot   
2017-03-15 20:19   
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/54e102bef53e [^]
Maturity status: Test