Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0039064 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Modules] SAP Connector | major | have not tried | 2018-07-30 12:45 | 2018-08-22 10:24 | |||
Reporter | gorkaion | View Status | public | |||||
Assigned To | nonofrancisco | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | a9aa182dbcd6 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Regression date | ||||||||
Regression introduced by commit | ||||||||
Regression level | ||||||||
Review Assigned To | aferraz | |||||||
Regression introduced in release | ||||||||
Summary | 0039064: Payment details not added when a layaway is partially paid. | |||||||
Description | Having a Layaway that it is partially paid and the generated Sales Invoice payment plan is split in 2. one with the payments and the other one with the outstanding amount. When the PUBON is exported the payments are not included. The getPaymentMethodLines() method is considering only 1 of the payment plans. In case it takes the one with the outstanding amount the payments are not included. See proposed solution. | |||||||
Steps To Reproduce | Create a Sales Invoice with several payment plan records. Try to export it. Check that only the data from a payment plan is included. How to generate an invoice with several payment plans: - Assign a split payment terms to Arturo Montoro. - Enable the "Pay on Credit" and assign a credit limit to Arturo Montoro. - Refresh the POS and create a ticket partially paid leaving the remaining amoutn on credit. - Do the cashup to generate the invoice and check that it has 2 payment plans. - Alternatively it is possible use the generate the invoice on ticket completion with the same result. | |||||||
Proposed Solution | Some errors found in the InvoiceJavaPropertyMappingHandler.getPaymentMethodLines() method: protected List<SynchronizableBusinessObject> getPaymentMethodLines(Invoice invoice) { List<SynchronizableBusinessObject> sbos = new ArrayList<>(); List<FIN_PaymentSchedule> invoicePaymentsSchedule = invoice.getFINPaymentScheduleList(); if (!invoicePaymentsSchedule.isEmpty()) { for (FIN_PaymentScheduleDetail paymentDetails : invoicePaymentsSchedule.get(0) .getFINPaymentScheduleDetailInvoicePaymentScheduleList()) { if (paymentDetails.getAPRMPaymentMethod() != null && paymentDetails.getAPRMFinancialAccount() != null) { SynchronizableBusinessObject sbo = getPaymentMethodLines(paymentDetails); processPaymentDetail(sbo, paymentDetails); sbos.add(sbo); } } } return sbos; } Attached a diff with a proposal fix. 1. invoicePaymentsSchedule.get(0) -> It is considering invoices with a single payment plan: This is wrong, it is possible to have split payments so all payment schedules should be iterated. 2. paymentDetails.getAPRMPaymentMethod() and paymentDetails.getAPRMFinancialAccount(): These are computed columns. So it is required to compute them before accessing their values paymentDetails.get_computedColumns().getAPRMFinancialAccount() 3. The computed columns are not considering payments with total amount 0. Is this the expected behavior in order to include the payment amount in the pubon? The Payment Method and Financial account are mandatory fields of the Payment entity. The code could be simplified to check if the paymentDetails is related to a "FIN_PaymetnDetail" if (paymentDetails.getPaymentDetails() != null) and to get the method and account: paymentDetails.getPaymentDetails().getFinPayment().getPaymentMethod() paymentDetails.getPaymentDetails().getFinPayment().getAccount() | |||||||
Tags | No tags attached. | |||||||
Attached Files | paymentsMissingInPUBON.diff [^] (4,141 bytes) 2018-07-30 12:45 [Show Content]
issue-39064.patch [^] (4,715 bytes) 2018-08-17 21:48 [Show Content] | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0106429) hgbot (developer) 2018-08-21 14:49 |
Repository: erp/pmods/org.openbravo.service.integration.sap.ecc.mappings Changeset: a9aa182dbcd678f74a5d3a8c8b06bd24c8402476 Author: Nono Carballo <nonofce <at> gmail.com> Date: Fri Aug 17 16:00:16 2018 -0400 URL: http://code.openbravo.com/erp/pmods/org.openbravo.service.integration.sap.ecc.mappings/rev/a9aa182dbcd678f74a5d3a8c8b06bd24c8402476 [^] Fixes issue 39064: Exporting payments from all invoice payments plan. - When exporting payment information in WPUBON, all payment plans are considered, not just the first one. - Payment method SAP_CODE and currency ISO_CODE are taken from payment attached to payment detail. --- M src/org/openbravo/service/integration/sap/ecc/mappings/javamapper/InvoiceJavaPropertyMappingHandler.java --- |
(0106440) hgbot (developer) 2018-08-22 10:23 |
Repository: erp/pmods/org.openbravo.service.integration.sap.ecc.mappings Changeset: 533b5fe7498d632c89dd0332bfeec0d7c85df463 Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> Date: Wed Aug 22 10:19:25 2018 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.service.integration.sap.ecc.mappings/rev/533b5fe7498d632c89dd0332bfeec0d7c85df463 [^] Related to issue 39064: Scale amount based in the currency standard precision --- M src/org/openbravo/service/integration/sap/ecc/mappings/javamapper/InvoiceJavaPropertyMappingHandler.java --- |
(0106441) aferraz (manager) 2018-08-22 10:24 |
Reviewed. |
Issue History | |||
Date Modified | Username | Field | Change |
2018-07-30 12:45 | gorkaion | New Issue | |
2018-07-30 12:45 | gorkaion | Assigned To | => platform |
2018-07-30 12:45 | gorkaion | File Added: paymentsMissingInPUBON.diff | |
2018-07-30 12:45 | gorkaion | Resolution time | => 1534716000 |
2018-08-13 14:05 | gorkaion | Assigned To | platform => Triage Finance |
2018-08-16 08:18 | Sandrahuguet | Assigned To | Triage Finance => nonofrancisco |
2018-08-16 10:56 | Sandrahuguet | Assigned To | nonofrancisco => Triage Finance |
2018-08-16 11:12 | aferraz | Assigned To | Triage Finance => nonofrancisco |
2018-08-17 12:34 | gorkaion | Steps to Reproduce Updated | View Revisions |
2018-08-17 21:48 | nonofrancisco | File Added: issue-39064.patch | |
2018-08-21 14:49 | hgbot | Checkin | |
2018-08-21 14:49 | hgbot | Note Added: 0106429 | |
2018-08-21 14:49 | hgbot | Status | new => resolved |
2018-08-21 14:49 | hgbot | Resolution | open => fixed |
2018-08-21 14:49 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.service.integration.sap.ecc.mappings/rev/a9aa182dbcd678f74a5d3a8c8b06bd24c8402476 [^] |
2018-08-21 14:50 | aferraz | Review Assigned To | => aferraz |
2018-08-21 14:50 | aferraz | Note Added: 0106430 | |
2018-08-21 14:50 | aferraz | Status | resolved => closed |
2018-08-22 10:23 | hgbot | Checkin | |
2018-08-22 10:23 | hgbot | Note Added: 0106440 | |
2018-08-22 10:24 | aferraz | Note Deleted: 0106430 | |
2018-08-22 10:24 | aferraz | Note Added: 0106441 |
Copyright © 2000 - 2009 MantisBT Group |