Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037725Retail ModulesReturn Receiptpublic2018-01-25 13:192018-02-26 09:02
samuel_nicuesa 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
pi 
RR18Q2 
marvintm
No
0037725: The payments printed in the HM are positive when you do return and reprint receipt.
The payments printed in the HM are positive when you do return and reprint receipt.
-Start Hardware Manager

-Login into Web POS user : Vallbalanca

-Add Adhesive body warmer product to the receipt.

-Press return line button and pay the ticket in cash.

-You will see in the HM that the payment is 5.00 and it must be -5.00.

-If you open this receipt and reprint it you will see 5.00 and it must be -5.00.
No tags attached.
related to defect 0031600 closed ranjith_qualiantech_com [SERQA 406] The payment on credit doesn't appear in the printing receipt as a payment line 
png ReturnPi.png (33,364) 2018-01-25 13:21
https://issues.openbravo.com/file_download.php?file_id=11484&type=bug
png

png ReprintPi.png (36,144) 2018-01-25 13:21
https://issues.openbravo.com/file_download.php?file_id=11485&type=bug
png
Issue History
2018-01-25 13:19samuel_nicuesaNew Issue
2018-01-25 13:19samuel_nicuesaAssigned To => Retail
2018-01-25 13:19samuel_nicuesaFile Added: ReprintCH.png
2018-01-25 13:19samuel_nicuesaResolution time => 1518649200
2018-01-25 13:19samuel_nicuesaTriggers an Emergency Pack => No
2018-01-25 13:20samuel_nicuesaRelationship addedrelated to 0031600
2018-01-25 13:21samuel_nicuesaFile Deleted: ReprintCH.png
2018-01-25 13:21samuel_nicuesaFile Added: ReturnPi.png
2018-01-25 13:21samuel_nicuesaFile Added: ReprintPi.png
2018-01-30 15:56ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2018-01-30 15:56ranjith_qualiantech_comStatusnew => scheduled
2018-02-05 09:38hgbotCheckin
2018-02-05 09:38hgbotNote Added: 0102170
2018-02-05 09:38hgbotStatusscheduled => resolved
2018-02-05 09:38hgbotResolutionopen => fixed
2018-02-05 09:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/995dffbf1f6bcf67a9e8bafdb62bac071e7d7145 [^]
2018-02-05 12:34marvintmNote Added: 0102184
2018-02-05 12:34marvintmStatusresolved => new
2018-02-05 12:34marvintmResolutionfixed => open
2018-02-06 07:07ranjith_qualiantech_comStatusnew => scheduled
2018-02-12 08:05hgbotCheckin
2018-02-12 08:05hgbotNote Added: 0102314
2018-02-12 08:05hgbotStatusscheduled => resolved
2018-02-12 08:05hgbotResolutionopen => fixed
2018-02-12 08:05hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/995dffbf1f6bcf67a9e8bafdb62bac071e7d7145 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/35e8e2b90ba42257536f9746e74ac8aa1b0fc1b8 [^]
2018-02-15 18:55marvintmNote Added: 0102452
2018-02-15 18:55marvintmStatusresolved => new
2018-02-15 18:55marvintmResolutionfixed => open
2018-02-20 08:58ranjith_qualiantech_comStatusnew => scheduled
2018-02-21 08:17hgbotCheckin
2018-02-21 08:17hgbotNote Added: 0102541
2018-02-21 08:17hgbotStatusscheduled => resolved
2018-02-21 08:17hgbotResolutionopen => fixed
2018-02-21 08:17hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/35e8e2b90ba42257536f9746e74ac8aa1b0fc1b8 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2dc7bfd4cdeee4037694b516ce5558545b73e368 [^]
2018-02-26 09:02marvintmReview Assigned To => marvintm
2018-02-26 09:02marvintmStatusresolved => closed
2018-02-26 09:02marvintmFixed in Version => RR18Q2

Notes
(0102170)
hgbot   
2018-02-05 09:38   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 995dffbf1f6bcf67a9e8bafdb62bac071e7d7145
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Feb 05 14:08:08 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/995dffbf1f6bcf67a9e8bafdb62bac071e7d7145 [^]

Fixed issue 37725 : Print amount in negative for return receipt

---
M web/org.openbravo.retail.posterminal/res/printreturn.xml
M web/org.openbravo.retail.posterminal/res/printreturninvoice.xml
---
(0102184)
marvintm   
2018-02-05 12:34   
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
---
(0102452)
marvintm   
2018-02-15 18:55   
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   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 2dc7bfd4cdeee4037694b516ce5558545b73e368
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed Feb 21 12:46:59 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2dc7bfd4cdeee4037694b516ce5558545b73e368 [^]

Fixed issue 37725 : Print amount in negative for return receipt

---
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-print.js
---