Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018016Openbravo ERP09. Financial managementpublic2011-07-18 10:102011-08-02 12:07
psarobe 
vmromanos 
urgentmajoralways
closedfixed 
5
pi 
3.0MP33.0MP2 
Core
No
0018016: Vendor credit payment: Automatic payment is not working well when payment method creates payment and withdrawal
The advance payment feature is not working properly when you use a payment method that creates the payment and the withdrawal/deposit.

To explain this scenario we are going to use the QA testing dema data. The payment method will be:

6(Spain): Creates a payment and withdrawal

The same happens with payment method 4 (Spain) that creates a payment but not the withdrawal
****Create Advance payment****

Login with:

    "User name": Openbravo
    "Password": openbravo
    "Role": QA testing Admin

Go to Financial management || Receivables & Payables || Transactions || Payment Out

Click New and select:

    Paying to: Vendor B
    Generated credit: 33.44
    Change payment method to: 6(Spain)

Click Save and verify:

    Document type: AP Payment
    Paying from: EUR - Spain Bank
    Currency: EUR
    Status: Awaiting Payment

Click Add details button

Do not select any invoice or order but select the option Leave this amount to be used later. Click Process

Then it appears another pop-up window. Verify that the combo box Action regarding document has the value Process Made Payment(s)and withdrawal

Click OK button

Verify:

    Process completed succesfully green message appears
    Amount: 33.44
    Status: Payment Made
    Description: Amount left as credit: 33.44

********Create the purchase invoice**********+

Go to Procurement management || Transactions || Purchase invoice

Click new and fill:

    "Transaction Document": AP Invoice
    "Business partner": Vendor B

Click Save and verify:

    "Partner adress" : . Pamplona, Street Purchase center nÂș1
    "Invoice Date": Current system date
    "Price list": Purchase
    "Currency": EUR
    "Payment method": 6 (Spain)
    "Payment Terms": 30,5 days

Move to lines tab and click new

Select the product Raw materials C and change the Invoice Quantity to 15.2 an save

Then verify:

    "UOM": Bag
    "Net Unit Price": 2.00
    "Net List Price": 2.00
    "Tax": VAT 10%
    "Line net amount": 30.40

Move to the header tab and lick the complete button and verify:

    "Description": Invoice paid using credit: {Document No of payment created in FINa10} - 13/07/2011 - Vendor A - 33.44
    In the status bar "Payment complete": Yes
    In the status bar "Total Net Amount": 30.40
    In the status bar "Total Gross Amount": 33.44
    In the status bar "Document Status": Completed

******* Things that are wrong*********

1. Notice the "Description" field is not populated as it should be and remains blank. This is wrong
2. Notice it has created two payments (See attach):
  2.1 One because of the payment method itself with 33,44 amount. Status withdrawn not cleared. This is wrong
  2.2 Another one because of the Advance automatic payment feature with amount 0,00 and not processed (Status: Awaiting payment) with no lines. This is wrong
3. Finally it creates another transaction in the financial account so we are paying double to this vendor. this is wrong
Although the payment method is forcing to create the payment and the withdrawal, since it is a purchase invoice that is the result of an advance payment the ERP should check this and not take into account the payment method and just create the payment that matches with the Advance payment.
No tags attached.
png AdvancePayment.png (34,552) 2011-07-18 10:10
https://issues.openbravo.com/file_download.php?file_id=4344&type=bug
png

png Captura.PNG (21,099) 2011-07-18 10:44
https://issues.openbravo.com/file_download.php?file_id=4345&type=bug
png
Issue History
2011-07-18 10:10psarobeNew Issue
2011-07-18 10:10psarobeAssigned To => vmromanos
2011-07-18 10:10psarobeFile Added: AdvancePayment.png
2011-07-18 10:10psarobeModules => Core
2011-07-18 10:15psarobeDescription Updatedbug_revision_view_page.php?rev_id=2427#r2427
2011-07-18 10:44psarobeFile Added: Captura.PNG
2011-07-21 17:36hgbotCheckin
2011-07-21 17:36hgbotNote Added: 0039303
2011-07-21 17:36hgbotStatusnew => resolved
2011-07-21 17:36hgbotResolutionopen => fixed
2011-07-21 17:36hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b2f11fac605600693678ab084543118b42148657 [^]
2011-08-01 14:20hudsonbotCheckin
2011-08-01 14:20hudsonbotNote Added: 0039653
2011-08-02 12:07gorkaionStatusresolved => closed
2011-08-02 12:07gorkaionFixed in Version => 3.0MP2

Notes
(0039303)
hgbot   
2011-07-21 17:36   
Repository: erp/devel/pi
Changeset: b2f11fac605600693678ab084543118b42148657
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Thu Jul 21 17:36:04 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b2f11fac605600693678ab084543118b42148657 [^]

Fixes issue 18016: cancel credit not working with automatic payment

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java
---
(0039653)
hudsonbot   
2011-08-01 14:20   
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/cf2afed6e8ef [^]

Maturity status: Test