Notes |
|
(0102170)
|
hgbot
|
2018-02-05 09:38
|
|
|
|
|
There is a problem currently with the change. As we are computing the absolute value of the payment amount, and then changing it always to a negative amount, this doesn't work well in case the ticket contains both positive and negative amounts.
So for example, do the following:
- Create a ticket with one Avalanche transceiver and pay it in cash.
- Do verified returns, and return it, paying in cash. The ticket will be printed with a "-150.50" payment in cash. This is correct.
- Then load the return receipt, and reverse the payment in cash, and replace it by a payment in card, and complete it. The ticket will print three "-150.50" payments, two in cash, and one in card. This is not correct. Instead, it should print:
Cash -150.50
Cash 150.50
Card -150.50 |
|
|
(0102314)
|
hgbot
|
2018-02-12 08:05
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 35e8e2b90ba42257536f9746e74ac8aa1b0fc1b8
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Feb 12 12:35:03 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/35e8e2b90ba42257536f9746e74ac8aa1b0fc1b8 [^]
Fixed issue 37725 : Print amount in negative for return receipt
---
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-print.js
M web/org.openbravo.retail.posterminal/res/printreturn.xml
M web/org.openbravo.retail.posterminal/res/printreturninvoice.xml
---
|
|
|
|
The fix is still not fully correct.
As a summary, the expected behaviour is that all "positive" payments (in which user gave cash to the cashier) should be shown as positive, and all "negative" payments (in which cashier gave cash to user) should be shown as negative.
The logic should in the end follow the following rules:
If any of these conditions is true:
- If the payment comes from the backend (so if payment.get('isPrePayment') is true)
- or if the payment comes from reverse payment (so if payment.get('isReversePayment') is true)
- or if the payment status isNegative = false (if !receipt.getPaymentStatus().isNegative)
then the payment amount should be printed exactly as it is.
Otherwise, the payment amount should be reversed.
The current logic is almost correct, but this part: payment.get('isPaid') && payment.get('isReturnOrder')
seems to be incorrect (these are receipt properties, not payment properties, and are probably not needed). |
|
|
(0102541)
|
hgbot
|
2018-02-21 08:17
|
|
|