Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035705Openbravo ERPZ. Otherspublic2017-04-05 17:042017-05-29 17:43
ngarcia 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR17Q3 
aferraz
Core
No
0035705: Cannot use any available credit if it is a payment for same bp that generated credit and payment method removed from fin account
Cannot use any available credit if it is a payment for same bp that generated credit and payment method removed from fin account

aprm_seqnumberpaymentstatus database function is called with a null value and returns "N". In FIN_Utility.seqnumberpaymentstatus function tries to convert that value to Integer
As group admin role:
   Create two Payment In in which credit is generated:
      1
      Business Partner: Hoteles Buenas Noches, S.A.
      Payment Method: Transferencia
      Deposit To: Cuenta de Banco - EUR
      2
      Business Partner: Hoteles Buenas Noches, S.A.
      Payment Method: Cheque
      Deposit To: Cuenta de Banco - EUR
   Remove Cheque Payment Method from Cuenta de Banco Financial Account
   Create a new Payment In
      Business Partner: Hoteles Buenas Noches, S.A.
      Payment Method: Transferencia
      Deposit To: Cuenta de Banco - EUR
   Check when adding details that credit is not available
   The log shows:
      ERROR org.openbravo.advpaymentmngt.filterexpression.AddPaymentDefaultValuesExpression - Error trying to get default value of customer_credit For input string: "N"
java.lang.NumberFormatException: For input string: "N"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:492)
    at java.lang.Integer.parseInt(Integer.java:527)
    at org.openbravo.advpaymentmngt.utility.FIN_Utility.seqnumberpaymentstatus(FIN_Utility.java:1520)
    at org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao.getCustomerPaymentsWithCredit(AdvPaymentMngtDao.java:2012)
    at org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao.getCustomerCredit(AdvPaymentMngtDao.java:1937)
    at org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao.getCustomerCredit(AdvPaymentMngtDao.java:1931)
    at org.openbravo.advpaymentmngt.filterexpression.AddPaymentDefaultValuesHandler.getDefaultCustomerCredit(AddPaymentDefaultValuesHandler.java:231)
    at org.openbravo.advpaymentmngt.filterexpression.PaymentInAddPaymentDefaultValues$Proxy$_$$_WeldClientProxy.getDefaultCustomerCredit(PaymentInAddPaymentDefaultValues$Proxy$_$$_WeldClientProxy.java)
No tags attached.
related to design defect 0021960 new jonalegriaesarte Cannot use existing credit when payment method on the invoice is not valid in the bank account where the credit was issued 
related to defect 0032362 scheduled nonofrancisco Business Partner credit not available when payment method used to generate credit is deleted form financial account 
Issue History
2017-04-05 17:04ngarciaNew Issue
2017-04-05 17:04ngarciaAssigned To => Triage Finance
2017-04-05 17:04ngarciaModules => Core
2017-04-05 17:04ngarciaResolution time => 1493157600
2017-04-05 17:04ngarciaTriggers an Emergency Pack => No
2017-04-05 17:04ngarciaRelationship addedrelated to 0032362
2017-04-05 17:04ngarciaIssue Monitored: networkb
2017-04-10 17:40aferrazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14991#r14991
2017-04-10 18:23aferrazRelationship replacedhas duplicate 0032362
2017-04-10 18:23aferrazAssigned ToTriage Finance => AtulOpenbravo
2017-04-10 18:31aferrazRelationship addedrelated to 0021960
2017-04-11 10:44AtulOpenbravoStatusnew => scheduled
2017-04-11 21:38AtulOpenbravoNote Added: 0095992
2017-04-11 21:40AtulOpenbravoNote Edited: 0095992bug_revision_view_page.php?bugnote_id=0095992#r14999
2017-04-11 21:43AtulOpenbravoNote Added: 0095993
2017-04-27 21:06hgbotCheckin
2017-04-27 21:06hgbotNote Added: 0096242
2017-04-27 21:06hgbotStatusscheduled => resolved
2017-04-27 21:06hgbotResolutionopen => fixed
2017-04-27 21:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/09736ab499bbc9b06d0736c45aa549fc0c331ba4 [^]
2017-04-27 21:06hgbotCheckin
2017-04-27 21:06hgbotNote Added: 0096243
2017-04-27 21:23aferrazRelationship deletedhas duplicate 0032362
2017-04-27 21:23aferrazRelationship addedrelated to 0032362
2017-04-27 21:24aferrazReview Assigned To => aferraz
2017-04-27 21:24aferrazNote Added: 0096245
2017-04-27 21:24aferrazStatusresolved => closed
2017-04-27 21:24aferrazFixed in Version => 3.0PR17Q3
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096914
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096915

Notes
(0095992)
AtulOpenbravo   
2017-04-11 21:38   
(edited on: 2017-04-11 21:40)
Test Plan
- Login as Group Admin Role.
- Create Payment In in which credit is generated:
   Business Partner: Hoteles Buenas Noches, S.A.
   Payment Method: Transferencia
   Deposit To: Cuenta de Banco - EUR
- Remove Transferencia Payment Method from Cuenta de Banco Financial Account
- Create a new Payment In
   Business Partner: Hoteles Buenas Noches, S.A.
   Payment Method: Al contado
   Deposit To: Caja - EUR
- Check when adding details that in credit to use, credit payment created is available No matter in which Financial Account and payment method it was issued.

(0095993)
AtulOpenbravo   
2017-04-11 21:43   
Test Plan

- Login as Group Admin Role.
- Create Payment In in which credit is generated:
   Business Partner: Hoteles Buenas Noches, S.A.
   Payment Method: Transferencia
   Deposit To: Cuenta de Banco - EUR
- Make sure in Financial Account:Cuenta de Banco - EUR, Payment Method: Transferencia is configured for Automatic Execution process as Print Check process.
- Create Payment In in which credit is generated:
   Business Partner: Hoteles Buenas Noches, S.A.
   Payment Method: Transferencia
   Deposit To: Cuenta de Banco - EUR
- Void the Payment instead of executing it.
- Remove Transferencia Payment Method from Cuenta de Banco Financial Account
- Create a new Payment In
   Business Partner: Hoteles Buenas Noches, S.A.
   Payment Method: Al contado
   Deposit To: Caja - EUR
- Check when adding details that in credit to use, credit payment created in step 2 is available No matter in which Financial Account and payment method it was issued, but the voided payment is not available.

Similar flow can be tested for Reversing a Payment. Reversed payment do not appear in the credit to use grid.
(0096242)
hgbot   
2017-04-27 21:06   
Repository: erp/devel/pi
Changeset: 09736ab499bbc9b06d0736c45aa549fc0c331ba4
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Apr 12 00:32:23 2017 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/09736ab499bbc9b06d0736c45aa549fc0c331ba4 [^]

Fixes issue 35705: Cannot use any available credit if it is a payment for
same bp that generated credit and payment method removed from fin account

When there is case that financial account and payment method does not have
record in FIN_FINACC_PAYMENTMETHOD, function APRM_SEQNUMBERPAYMENTSTATUS
when called from function aprm_seqnoinvpaidstatus returns value 'N'
while converting to integer gives number format exception. To avoid this
situation function will return minimun value required for invoice status
paid control that is 40 in both Payment In and Payment Out.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_SEQNUMBERPAYMENTSTATUS.xml
---
(0096243)
hgbot   
2017-04-27 21:06   
Repository: erp/devel/pi
Changeset: 5e818f0155f5a12649589a3fb573958ba22f9de7
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Apr 27 21:05:33 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5e818f0155f5a12649589a3fb573958ba22f9de7 [^]

Related to issue 35705: Code review improvements

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_SEQNUMBERPAYMENTSTATUS.xml
---
(0096245)
aferraz   
2017-04-27 21:24   
Code review + Testing OK
(0096914)
hudsonbot   
2017-05-29 17:43   
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/1ee70113bdc4 [^]
Maturity status: Test
(0096915)
hudsonbot   
2017-05-29 17:43   
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/1ee70113bdc4 [^]
Maturity status: Test