Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039618Retail ModulesWeb POSpublic2018-11-13 15:482018-12-28 09:00
ngarcia 
rqueralta 
immediatemajoralways
closedfixed 
5
 
RR19Q1 
marvintm
No
0039618: Cash Up goes to Errors While Importing POS Data if the currency has more than 2 decimals and negative total
Cash Up goes to Errors While Importing POS Data if the currency has more than 2 decimals and negative total
In the backend:
   Configure a POS Terminal to be used with OMR (check that precision that will be used in POS is higher than 2)

In the POS:
   Create a return of 0.009
   Do the cash up
   Leave the amount to keep to 0

In the backend:
   Check a new Cash Up record is shown in Errors While Importing POS Data with the following error:
      current transaction is aborted, commands ignored until end of transaction block
   The log shows:
     ERROR org.hibernate.util.JDBCExceptionReporter - Batch entry 0 insert into FIN_Finacc_Transaction (AD_Client_ID, AD_Org_ID, Created, Createdby, Updated, Updatedby, Isactive, C_Currency_ID, Fin_Financial_Account_ID, Line, DateAcct, C_Glitem_ID, Status, Paymentamt, Depositamt, Processed, Processing, Posted, Trxtype, Statementdate, Description, CreatedByAlgorithm, EM_APRM_Modify, EM_Aprm_Processed, EM_Obpos_App_Cashup_ID, Fin_Finacc_Transaction_ID) values (...) was aborted. Call getNextException to see the cause.
40f8540e 2018-11-13 12:22:57,005 [ajp-bio-127.0.0.1-8009-exec-9835] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: new row for relation "fin_finacc_transaction" violates check constraint "fin_trans_amounts_chk"
No tags attached.
caused by defect 0035631 closed ranjith_qualiantech_com [SERQA 2676] In step count cash in cash ups it is not possible to enter negative amounts 
related to defect 0039861 closed ranjith_qualiantech_com Under some circumstances Cash Up goes to Errors While Importing POS Data if the currency has more than 2 decimals 
related to defect 0039868 closed ranjith_qualiantech_com Some amounts and prices are rounded to 2 instead of using the currency's precisions 
Issue History
2018-11-13 15:48ngarciaNew Issue
2018-11-13 15:48ngarciaAssigned To => Retail
2018-11-13 15:48ngarciaResolution time => 1543878000
2018-11-13 15:48ngarciaTriggers an Emergency Pack => No
2018-11-13 15:48ngarciaRelationship addedcaused by 0035631
2018-11-13 15:49ngarciaIssue Monitored: networkb
2018-11-13 15:59rafarodaIssue Monitored: rafaroda
2018-11-14 15:59rqueraltaAssigned ToRetail => rqueralta
2018-11-14 15:59rqueraltaStatusnew => scheduled
2018-11-15 09:26ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17922#r17922
2018-11-15 09:32ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17923#r17923
2018-11-16 12:43hgbotCheckin
2018-11-16 12:43hgbotNote Added: 0107946
2018-11-16 12:43hgbotStatusscheduled => resolved
2018-11-16 12:43hgbotResolutionopen => fixed
2018-11-16 12:43hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c2d85a163d621fa0423e8f4cd4155e5f2a3ffe29 [^]
2018-11-16 14:57marvintmReview Assigned To => marvintm
2018-11-16 14:57marvintmStatusresolved => closed
2018-11-16 14:57marvintmFixed in Version => RR19Q1
2018-12-28 09:00ngarciaSummaryCash Up goes to Errors While Importing POS Data if the currency has more than 3 decimals and negative total => Cash Up goes to Errors While Importing POS Data if the currency has more than 2 decimals and negative total
2018-12-28 09:00ngarciaDescription Updatedbug_revision_view_page.php?rev_id=18075#r18075
2018-12-28 09:14ngarciaRelationship addedrelated to 0039861
2019-01-02 17:11ngarciaRelationship addedrelated to 0039868

Notes
(0107946)
hgbot   
2018-11-16 12:43   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c2d85a163d621fa0423e8f4cd4155e5f2a3ffe29
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Nov 15 11:12:15 2018 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c2d85a163d621fa0423e8f4cd4155e5f2a3ffe29 [^]

Fixed issue 39618: Cash Up goes to Errors While Importing POS Data if the
currency has more than 3 decimals and negative total

- Changed hardcode precision by the standard precision of the currency
- The rounding of the variable "difference" was eliminated

---
M src/org/openbravo/retail/posterminal/CashCloseProcessor.java
M src/org/openbravo/retail/posterminal/UpdateCashup.java
---