Openbravo Issue Tracking System - POS2
View Issue Details
0052489POS2Restaurantspublic2023-05-10 15:552023-05-23 19:15
nicola_uva 
javierRodriguez 
immediatecriticalalways
closedfixed 
5
 
23Q1.3 
No
0052489: Menu [Tax calculation] - Not possible to finalize a ticket paid partially nor do reverse payment
Tax calculation error on Menu.Is not possible to finalize a ticket paid partially nor do reverse payment
1) Login https://livebuilds.openbravo.com/retail_pos2_modules_pgsql/web/pos/?terminal=VBS-2 [^]
2) select schema "Restaurant"
3) add to the ticketthe menu "Simple menu"
4) finalize the payment
5)open the ticket paid in (5)
6) click on review payments -> then
 a) try to reverse payment
 b) try to pay pending amount by cash
7) Dialog is showed saying tax not found(see image attached) -> ERROR
In:
https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/blob/master/web/org.openbravo.retail.posterminal/app/model/business-object/ticket/TicketUtils.js#L616 [^]

Change followinf line:
ticketTaxRules = this.ticket.receiptTaxes.map(receiptTax => taxRules.find(taxRule => taxRule.id === receiptTax.taxid));

To something like this:
ticketTaxRules = taxRules.filter(rule -> condition1 OR condition2)

Where:
condition1: rule id matches ticket receiptTaxes taxid (current condition)
condition2: rule is bom and rule.taxCategory matches with the tax category of any ticket line
No tags attached.
blocks defect 0052411pi closed javierRodriguez Menu [Tax calculation] - Not possible to finalize a ticket paid partially nor do reverse payment 
Issue History
2023-05-19 08:42guilleaerTypedefect => backport
2023-05-19 08:42guilleaerTarget Versionpi => 23Q1.3
2023-05-19 13:37hgbotNote Added: 0149983
2023-05-23 19:15hgbotResolutionopen => fixed
2023-05-23 19:15hgbotStatusscheduled => closed
2023-05-23 19:15hgbotFixed in Version => RR23Q1.3
2023-05-23 19:15hgbotNote Added: 0150162
2023-05-23 19:15hgbotNote Added: 0150163

Notes
(0149983)
hgbot   
2023-05-19 13:37   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1203 [^]
(0150162)
hgbot   
2023-05-23 19:15   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 793498476f814d09b92424eba0e0beb0729a4d04
Author: Javier Rodríguez Regueiro <javier.rodriguez@openbravo.com>
Date: 23-05-2023 17:15:56
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/793498476f814d09b92424eba0e0beb0729a4d04 [^]

Fixed ISSUE-52489: [23Q1] Improve condition to add taxes in booked tickets

---
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/TicketUtils.js
---
(0150163)
hgbot   
2023-05-23 19:15   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1203 [^]