Openbravo Issue Tracking System - Retail Modules
View Issue Details
0042679Retail ModulesWeb POSpublic2020-01-02 14:112020-01-17 14:48
asiermartirena 
rqueralta 
highmajoralways
closedfixed 
5
 
RR20Q2 
marvintm
No
0042679: The partial prepayment button doesn't work in some cases
When using prepayments, there are some cases in which the 'Pay Partial' button doesn't work correctly. When clicking the button, instead of paying only the partial amount for the delivery (the prepayment amount), it is fully paid.
- Log in in the Web POS with a terminal with prepayments configured (OMNI-1).
- Add the customer 'Arturo Montoro' to the ticket.
- Add an 'Avalanche transceiver' line and an 'Insect repellent' line.
- Set price 5€ to the 'Avalanche transceiver' line and 10€ to the 'Insect repellent' line.
- Set the 'Avalanche transceiver' as not deliverable.
- Click on the total amount button. Check that the remaining for the delivery is 10€, and the remaining for total is 10€.
- Add a payment with quantity 8€ of type 'Cash'.
- Select the payment method 'Card'.
- Click on the 'Pay Partial' button --> The full ticket is paid, instead the prepayment.
In the 'payDeliveryOrExact' function, this check is done to update the amount to add to the ticket:

if (
  payPrepayment &&
  pendingPrepayment > 0 &&
  pendingPrepayment < amount
) {
  ...
}

The 'pendingPrepayment' is the prepayment amount, instead of the remaining amount to pay the prepayment. It should be adapted to calculate that amount minus the paid amount (check the 'paymentWithSign' property for that).
No tags attached.
Issue History
2020-01-02 14:11asiermartirenaNew Issue
2020-01-02 14:11asiermartirenaAssigned To => Retail
2020-01-02 14:11asiermartirenaResolution time => 1579129200
2020-01-02 14:11asiermartirenaTriggers an Emergency Pack => No
2020-01-06 01:24rqueraltaAssigned ToRetail => rqueralta
2020-01-06 01:25rqueraltaStatusnew => scheduled
2020-01-12 15:55hgbotCheckin
2020-01-12 15:55hgbotNote Added: 0116777
2020-01-12 15:55hgbotStatusscheduled => resolved
2020-01-12 15:55hgbotResolutionopen => fixed
2020-01-12 15:55hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e367de27a57ea6cae58c8aa0ff522b93b5610efd [^]
2020-01-17 14:48marvintmReview Assigned To => marvintm
2020-01-17 14:48marvintmStatusresolved => closed
2020-01-17 14:48marvintmFixed in Version => RR20Q2

Notes
(0116777)
hgbot   
2020-01-12 15:55   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: e367de27a57ea6cae58c8aa0ff522b93b5610efd
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Jan 08 17:10:33 2020 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e367de27a57ea6cae58c8aa0ff522b93b5610efd [^]

Fixed issue 42679: The partial prepayment button doesn't work in some cases

- Taked into account the paid amount to check the remaining prepayment

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/keyboard-toolbars.js
---