Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018343Openbravo ERP09. Financial managementpublic2011-08-23 14:572012-10-16 18:54
azabaleta 
vmromanos 
urgentmajoralways
closedfixed 
5
 
 
Advanced Payables and Receivables Mngmt
No
0018343: Make a relationship between the credit payment (the one reconciled) and the later on created invoice payment
make a relationship between the credit payment (the one reconciled) and the later on created invoice payment (which ends in a "payment made" status)

This way, the invoice should finish "reconciled" and would be much easier to track down an accounting movement (reconciliation) to the invoiced matched to that credit.
1. Financial Account. Create a new bank statment and bankstatementline, selecting a business partner and the amount in (1000€). Process the bank statment.

2. Create a new transaction, add payment, mark the check "leave the credit to use later", same amount and bp. The bs line should be cleared with the transaction added.

3. new sales invoice for the same bp and complete.

4. add payment from the invoice header. mark check "use available credit" and process the payment.

5. go to payment report. look for the invoice status. It's "Payment Made".
Here is described the way we will implement this feature request.
There modules will be affected: Core, APRM and Payment report.

- A new table called FIN_PAYMENT_CREDIT is created. This table stores the relationship between credit payments and payments that use credit. This table is represented as a tab called Used Credit Source inside the Payment In and Payment Out windows. When a payment has used one or more credit payments, it shows the credit payments and amounts used. The user can also use the Linked item feature to navigate from a credit payment to the payments that use it.

- When completing and invoice, if the invoice's business partner has credit payments available, the system shows automatically a new popup just after completing the invoice. This popup allows the user to select the credit payments and the amount he wants to use of each one. By default, this popup tries to give the user the best configuration possible, i.e. selecting by default the oldest credit payments and the right amount to fully pay the invoice. However, the user will have the opportunity to modify this proposal. The popup will validate the user data to ensure it's OK (we don't pay more than the invoice's grand total amount, we don't use more amount than the available in the credit payment, etc.)

- A new flag called Include Payments Using Credit is added to the payment report. This flag, which is checked by default, allows the user to include/exclude in the report all the payments that are using credit payments.

- The description of the payment has also been added to the report: a new column has been added in the spreadsheet format, and a new context message with the payment's description is shown when the mouse is over the payment name in the report's HTML format

- The invoice column shows also the invoices paid using a credit payment. An asterisk in shown before the invoice number to reflect this invoice has been paid using a credit payment. In case several invoices have been paid with the same credit payment, two asterisks are shown before the list of invoice document numbers.
No tags attached.
related to defect 0018172 closed gorkaion Project Praxis - Wrong Invoice status when 
depends on backport 0018676 closed vmromanos Make a relationship between the credit payment (the one reconciled) and the later on created invoice payment 
Issue History
2011-08-23 14:57azabaletaNew Issue
2011-08-23 14:57azabaletaAssigned To => jonalegriaesarte
2011-08-23 14:57azabaletaModules => Core
2011-08-23 15:07psanjuanModulesCore => Advanced Payables and Receivables Mngmt
2011-08-23 15:07psanjuanAssigned Tojonalegriaesarte => psanjuan
2011-08-23 15:07psanjuanRelationship addedrelated to 0018172
2011-08-23 15:09psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=2598#r2598
2011-10-03 17:50vmromanosAssigned Topsanjuan => vmromanos
2011-10-03 17:51vmromanosStatusnew => scheduled
2011-10-03 17:51vmromanosfix_in_branch => pi
2011-10-14 09:25vmromanosfix_in_branchpi =>
2011-10-14 09:25vmromanosProposed Solution updated
2011-10-20 18:25vmromanosProposed Solution updated
2011-11-07 09:54hgbotCheckin
2011-11-07 09:54hgbotNote Added: 0042645
2011-11-07 09:54hgbotCheckin
2011-11-07 09:54hgbotNote Added: 0042646
2011-11-07 09:55hgbotCheckin
2011-11-07 09:55hgbotNote Added: 0042647
2011-11-07 09:55hgbotStatusscheduled => resolved
2011-11-07 09:55hgbotResolutionopen => fixed
2011-11-07 09:55hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1a8899a5f282a345dc354c46a45182f1060d5c88 [^]
2011-11-12 15:48hudsonbotCheckin
2011-11-12 15:48hudsonbotNote Added: 0042777
2011-11-12 15:48hudsonbotCheckin
2011-11-12 15:48hudsonbotNote Added: 0042778
2011-11-12 15:48hudsonbotCheckin
2011-11-12 15:48hudsonbotNote Added: 0042779
2011-11-25 11:33psanjuanNote Added: 0043208
2011-11-25 11:33psanjuanStatusresolved => closed
2012-10-16 08:22hgbotCheckin
2012-10-16 08:22hgbotNote Added: 0053360
2012-10-16 18:54hudsonbotCheckin
2012-10-16 18:54hudsonbotNote Added: 0053399

Notes
(0042645)
hgbot   
2011-11-07 09:54   
Repository: erp/devel/pi
Changeset: e033a8db491df97409a88801887e33db831f25ac
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Oct 26 19:11:17 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e033a8db491df97409a88801887e33db831f25ac [^]

Issue 18343: Credit payment management enhanced
- A new table called FIN_PAYMENT_CREDIT is created. This table stores the
relationship between credit payments and payments that use credit. This table is
represented as a tab called Used Credit Source inside the Payment In and Payment
Out windows. When a payment has used one or more credit payments, it shows the
credit payments and amounts used. The user can also use the Linked item feature
to navigate from a credit payment to the payments that use it.

- When completing and invoice, if the invoice's business partner has credit
  payments available, the system shows automatically a new popup just after
  completing the invoice. This popup allows the user to select the credit
  payments and the amount he wants to use of each one. By default, this popup
  tries to give the user the best configuration possible, i.e. selecting by
  default the oldest credit payments and the right amount to fully pay the
  invoice. However, the user will have the opportunity to modify this
  proposal. The popup will validate the user data to ensure it's OK (we don't
  pay more than the invoice's grand total amount, we don't use more amount than
  the available in the credit payment, etc.)

- A new flag called Include Payments Using Credit is added to the payment
report. This flag, which is checked by default, allows the user to
include/exclude in the report all the payments that are using credit payments.

- The description of the payment has also been added to the report: a new column
  has been added in the spreadsheet format, and a new context message with the
  payment's description is shown when the mouse is over the payment name in the
  report's HTML format

- The invoice column shows also the invoices paid using a credit payment. An
  asterisk in shown before the invoice number to reflect this invoice has been
  paid using a credit payment. In case several invoices have been paid with the
  same credit payment, two asterisks are shown before the list of invoice
  document numbers.

- Fixed issues in multicurrency rounding

- Added payment date column from the 2.50 version report

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
M modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_TEXTINTERFACES.xml
M modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.html
M modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.java
M modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.xml
M modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java
M modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportExcel.jrxml
M modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportPDF.jrxml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
M src-db/database/sourcedata/AD_REFERENCE.xml
M src-db/database/sourcedata/AD_REF_TABLE.xml
M src-db/database/sourcedata/AD_TAB.xml
M src-db/database/sourcedata/AD_TABLE.xml
M src-db/database/sourcedata/AD_TEXTINTERFACES.xml
A src-db/database/model/tables/FIN_PAYMENT_CREDIT.xml
A src/org/openbravo/erpCommon/ad_actionButton/AddCreditPaymentGrid.srpt
A src/org/openbravo/erpCommon/ad_actionButton/AddCreditPaymentGrid.xml
A src/org/openbravo/erpCommon/ad_actionButton/CreditPaymentGrid.html
A src/org/openbravo/erpCommon/ad_actionButton/CreditPaymentGrid.xml
---
(0042646)
hgbot   
2011-11-07 09:54   
Repository: erp/devel/pi
Changeset: 84ad90a492a9d5bf00edf8de11e87e57096a89fc
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Oct 28 10:55:03 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/84ad90a492a9d5bf00edf8de11e87e57096a89fc [^]

Issue 18343: applied code review feedback
- getCustomerPaymentsWithCredit() searchs for the payments that belong to any child of the invoice's legal entity
- getSelectedPaymentDetailsAndAmount() now delegates to the generic method getSelectedBaseOBObjectAmount()
- when reactivating a payment, the invoice's description related to the payment is updated
- when reactivating a payment, the used credits description is updated
- we check the FINPaymentCreditList() instead of using the Stack to know if we need to link the credit payments

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
---
(0042647)
hgbot   
2011-11-07 09:55   
Repository: erp/devel/pi
Changeset: 1a8899a5f282a345dc354c46a45182f1060d5c88
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Nov 02 17:43:13 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1a8899a5f282a345dc354c46a45182f1060d5c88 [^]

Fixed issue 18343:
Thanks to the LinkCreditPayments module script, the undoUsedCredit() doesn't need to
calculate on the fly the credit payments used because the Used credit source tab will be always filled

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
---
(0042777)
hudsonbot   
2011-11-12 15:48   
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/9752fe729257 [^]

Maturity status: Test
(0042778)
hudsonbot   
2011-11-12 15:48   
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/9752fe729257 [^]

Maturity status: Test
(0042779)
hudsonbot   
2011-11-12 15:48   
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/9752fe729257 [^]

Maturity status: Test
(0043208)
psanjuan   
2011-11-25 11:33   
fixed and working
(0053360)
hgbot   
2012-10-16 08:22   
Repository: erp/devel/pi
Changeset: 6e8fd5e25c2b7e7951aded2b5f839298a1b1ef1c
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Sep 12 18:12:42 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6e8fd5e25c2b7e7951aded2b5f839298a1b1ef1c [^]

[build time] Removed incorrect entries in model object and mapping tables

 These entries were for generated windows which is not needed and caused a test
 to fail.

  related to issue 17491, related to issue 18343

---
M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
---
(0053399)
hudsonbot   
2012-10-16 18:54   
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/0381663eaf40 [^]

Maturity status: Test