Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040932Retail ModulesWeb POSpublic2019-05-22 10:172019-06-06 20:01
samuel_nicuesa 
rqueralta 
normalmajoralways
closedfixed 
5
 
RR19Q3 
marvintm
No
0040932: Doing verified return Draft status will be printed in the ticket if the invoice is generated although the ticket is paid
Doing verified return Draft status will be printed in the ticket if the invoice is generated although the ticket is paid hasbeenpaid = 'Y'
[BO]

- Navigate to channel touchpoint type (posterminal type)

- Check Generate Invoice for Orders

- Check Print Twice

[POS]

- Create a ticket , add a product and pay it

- Go to Menu > Verified return and select the previous ticket

- Do verified return

- You will see in the Hardware Manager that 2 returns will be printed and also 2 invoices but in Draft status.

Problem :

Put a breakpoint here :

var printProcess = function () {
            if (receipt.get('print')) { //Print option of order property
              OB.POS.hwserver.print(args.template, {
                order: receipt
              }, function (result, printedReceipt) {
            if (receipt.get('print')) { //Print option of order property

Check the values of :

receipt.attributes
{hasbeenpaid: "N", isbeingprocessed: "N", id: "7659D1674E4EF455F26845B41003215C", client: "39363B0921BB4293B48383844325E84C", organization: "D270A5AC50874F8BA67A88EE977F8E3B", …}

OB.MobileApp.model.receipt.attributes
{hasbeenpaid: "Y", isbeingprocessed: "N", id: "CB5C74DC7507C73038ACE26CB22A00F9", client: "39363B0921BB4293B48383844325E84C", organization: "D270A5AC50874F8BA67A88EE977F8E3B", …}


Draft Status won't be printed if hasbeenpaid = 'Y' but in this case receipt.attributes.hasbeenpaid = 'N'
No tags attached.
png PrintInvoice.png (345,680) 2019-05-22 10:17
https://issues.openbravo.com/file_download.php?file_id=12973&type=bug
png Draft.png (25,641) 2019-05-22 10:19
https://issues.openbravo.com/file_download.php?file_id=12974&type=bug
png
Issue History
2019-05-22 10:17samuel_nicuesaNew Issue
2019-05-22 10:17samuel_nicuesaAssigned To => Retail
2019-05-22 10:17samuel_nicuesaFile Added: PrintInvoice.png
2019-05-22 10:17samuel_nicuesaResolution time => 1560290400
2019-05-22 10:17samuel_nicuesaTriggers an Emergency Pack => No
2019-05-22 10:19samuel_nicuesaFile Added: Draft.png
2019-05-22 11:13PracticsIssue Monitored: Practics
2019-05-28 04:58rqueraltaAssigned ToRetail => rqueralta
2019-05-28 04:59rqueraltaStatusnew => scheduled
2019-06-03 02:34hgbotCheckin
2019-06-03 02:34hgbotNote Added: 0112330
2019-06-03 02:34hgbotStatusscheduled => resolved
2019-06-03 02:34hgbotResolutionopen => fixed
2019-06-03 02:34hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/294471a2fce83e18cf7b849dad65642ee854741a [^]
2019-06-06 20:01marvintmReview Assigned To => marvintm
2019-06-06 20:01marvintmStatusresolved => closed
2019-06-06 20:01marvintmFixed in Version => RR19Q3

Notes
(0112330)
hgbot   
2019-06-03 02:34   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 294471a2fce83e18cf7b849dad65642ee854741a
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu May 30 17:28:47 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/294471a2fce83e18cf7b849dad65642ee854741a [^]

Fixed issue 40932: Doing verified return Draft status will be printed in the
ticket if the invoice is generated although the ticket is paid

- Seted 'hasbeenpaid' attribute to 'Y' into invoiceToPrint object

---
M web/org.openbravo.retail.posterminal/js/utils/ticketCloseUtils.js
---