Openbravo Issue Tracking System - POS2
View Issue Details
0052889POS2POSpublic2023-06-29 12:212023-07-05 11:23
psanjuan 
igor_trebol 
urgentmajoralways
closedfixed 
30Openbravo Appliance 14.04
 
main 
No
0052889: Rounding issues on Deposit Invoice
Rounding issues on Deposit Invoice
Create a sale in POS with below details, and for a customer having "After Delivery" invoice terms:
Product Avalance Transceiver 2 uds (previously configured linked to Tax Category = IVA Normal)
Alpine Poles 3 uds (previously configured linked to Tax Category = IVA Normal)
Mountains water bottle 5 uds (previously configured linked to Tax Category = IVA Reducido)
Adhesive body warmers 10 uds (previously configured linked to Tax Category = IVA Reducido)
All products but the last one are pickup in store, therefore only the last one is going to be delivered.
Total sales amount 452.50.

Complete the order and make a payment of 52.50, that is higher that the product delivered 36.00

Press Done

Verify that a sales receipt (177) including all products is printed, it also includes 52.50 cash payment

Verify that an Invoice is created for the product delivered (36.00) and that the rest of the payment done 52.50-36.00= 16.50 in included in a deposit invoice
Deposit invoice (78) includes below listed lines 11.92, 4.35, 0.25.
This means a total of 16.52, while it should be 16.50


In the backoffice:

Sales Order payment plan includes expected = 452.50, Received = 52.50 and Outstanding = 400.00

Invoice (54) is correct. Paid and with 36 as expected and received.

Deposit invoice (78) has below payment plan:
Expected = 16.52, received = 16.50, outstanding = 0.02

For additional scenarios please review this document: https://docs.google.com/spreadsheets/d/1tpMTqHl7n13uElpyNOWuTVc3YaWXlNXeG21HCpAD5ss/edit#gid=1068937156 [^]
The deposit invoice needs to include the correct proportion of amount summing up 16.50

Deposit invoice (78) must have below payment plan:
Expected = 16.50, received = 16.50, outstanding = 0.00
No tags attached.
Issue History
2023-06-29 12:21psanjuanNew Issue
2023-06-29 12:21psanjuanAssigned To => igor_trebol
2023-06-29 12:21psanjuanTriggers an Emergency Pack => No
2023-07-04 15:17igor_trebolStatusnew => scheduled
2023-07-04 15:19hgbotNote Added: 0152107
2023-07-05 11:23hgbotResolutionopen => fixed
2023-07-05 11:23hgbotStatusscheduled => closed
2023-07-05 11:23hgbotNote Added: 0152126
2023-07-05 11:23hgbotNote Added: 0152127

Notes
(0152107)
hgbot   
2023-07-04 15:19   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.depositinvoice/-/merge_requests/6 [^]
(0152126)
hgbot   
2023-07-05 11:23   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.depositinvoice [^]
Changeset: 883b3cebe3da95bb6d9423b6979c9b8d61e5e4c1
Author: Igor Trebol <igor.trebol@openbravo.com>
Date: 05-07-2023 11:22:24
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.depositinvoice/-/commit/883b3cebe3da95bb6d9423b6979c9b8d61e5e4c1 [^]

Fixes ISSUE-52889: Added adjusting for rounding deposits

---
M web-test/model/business-object/ticket/TicketUtils.test.js
M web/org.openbravo.retail.depositinvoice/app/model/business-object/ticket/TicketUtils.js
---
(0152127)
hgbot   
2023-07-05 11:23   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.depositinvoice/-/merge_requests/6 [^]