Openbravo Issue Tracking System - Retail Modules
View Issue Details
0036579Retail ModulesWeb POSpublic2017-08-02 13:172017-08-25 11:50
ngarcia 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
 
RR17Q4 
marvintm
No
0036579: Cash Up cannot be imported if the business partner does not have Payment Terms and Payment Method defined
Cash Up cannot be imported if the business partner does not have Payment Terms and Payment Method defined.

The Cash Up goes to Errors While Importing POS Data window but the error shown there is not clear enough:

org.openbravo.base.exception.OBException: Couldn't disable triggers:
    at org.openbravo.dal.core.TriggerHandler.enable(TriggerHandler.java:111)
    at org.openbravo.retail.posterminal.ProcessCashClose.doReconciliationAndInvoices(ProcessCashClose.java:277)
    at org.openbravo.retail.posterminal.ProcessCashClose.saveRecord(ProcessCashClose.java:143)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:200)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:154)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:86)
    at org.openbravo.mobile.core.process.MobileImportEntryProcessorRunnable.processEntry(MobileImportEntryProcessorRunnable.java:53)
    at org.openbravo.retail.posterminal.importprocess.CashUpImportEntryProcessor$CashUpRunnable.processEntry(CashUpImportEntryProcessor.java:75)
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.doRunCycle(ImportEntryProcessor.java:363)
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.run(ImportEntryProcessor.java:285)
In the backend:
   Create a new business partner
   Set it as Customer
   Add a location to it
   Set a price list to it
   Do not set any other field in Customer tab

In the POS:
   Create a new ticket
   Select the previously created business partner
   Add a product to it
   Do not Invoice the receipt
   Pay it
   Do the Cash Up

In the backend:
   Check the Cash Up is in Errors While Importing POS Data window
   Check the log shows:
      ERROR org.openbravo.retail.posterminal.OrderGroupingProcessorData - SQL error in query: insert into c_invoice
...
org.postgresql.util.PSQLException: ERROR: null value in column "c_paymentterm_id" violates not-null constraint

   Go to Business Partner window and set Payment Terms to the already created customer

   Try to save the cash up again and check it raises an error
   Check the log shows:

   ERROR org.openbravo.retail.posterminal.OrderGroupingProcessorData - SQL error in query: insert into fin_payment_schedule
...
org.postgresql.util.PSQLException: ERROR: null value in column "fin_paymentmethod_id" violates not-null constraint

   Go to Business Partner window and set Payment Method to the already created customer
   Check you can save the Cash Up this time
No tags attached.
related to defect 0037349 closed ranjith_qualiantech_com If the Business Partner has no Payment terms the error message is not descriptive enough 
Issue History
2017-08-02 13:17ngarciaNew Issue
2017-08-02 13:17ngarciaAssigned To => Retail
2017-08-02 13:17ngarciaResolution time => 1503439200
2017-08-02 13:17ngarciaTriggers an Emergency Pack => No
2017-08-02 13:18ngarciaIssue Monitored: networkb
2017-08-05 12:04ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2017-08-05 12:04ranjith_qualiantech_comStatusnew => scheduled
2017-08-10 11:50hgbotCheckin
2017-08-10 11:50hgbotNote Added: 0098472
2017-08-10 11:50hgbotStatusscheduled => resolved
2017-08-10 11:50hgbotResolutionopen => fixed
2017-08-10 11:50hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/413316dcad7e00c8b1669825ee1d9b393655dbf8 [^]
2017-08-21 08:33marvintmNote Added: 0098551
2017-08-21 08:33marvintmStatusresolved => new
2017-08-21 08:33marvintmResolutionfixed => open
2017-08-21 11:23ranjith_qualiantech_comStatusnew => scheduled
2017-08-22 08:04hgbotCheckin
2017-08-22 08:04hgbotNote Added: 0098563
2017-08-22 08:04hgbotStatusscheduled => resolved
2017-08-22 08:04hgbotResolutionopen => fixed
2017-08-22 08:04hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/413316dcad7e00c8b1669825ee1d9b393655dbf8 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e91b33e09ca18d0a8d65b7ee00c4f552c8130d63 [^]
2017-08-25 11:50marvintmReview Assigned To => marvintm
2017-08-25 11:50marvintmStatusresolved => closed
2017-08-25 11:50marvintmFixed in Version => RR17Q4
2017-11-22 11:14ranjith_qualiantech_comRelationship addedrelated to 0037349

Notes
(0098472)
hgbot   
2017-08-10 11:50   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 413316dcad7e00c8b1669825ee1d9b393655dbf8
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Aug 10 15:19:31 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/413316dcad7e00c8b1669825ee1d9b393655dbf8 [^]

Fixed issue 36579 : Validate Customer Payment method & term on cashup

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/retail/posterminal/OrderGroupingProcessor.java
M src/org/openbravo/retail/posterminal/POSDataSynchronizationErrorHandler.java
---
(0098551)
marvintm   
2017-08-21 08:33   
The added query should go to the xsql file related to the OrderGrouping functionality (OrderGroupingProcessor_data.xsql). This will make the code cleaner and will also protect us from silly mistakes (like leaving connections open).
(0098563)
hgbot   
2017-08-22 08:04   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: e91b33e09ca18d0a8d65b7ee00c4f552c8130d63
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Aug 22 11:33:59 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e91b33e09ca18d0a8d65b7ee00c4f552c8130d63 [^]

Fixed issue 36579 : Validate Customer Payment method & term on cashup

* Moved Query to xsql

---
M src/org/openbravo/retail/posterminal/OrderGroupingProcessor.java
M src/org/openbravo/retail/posterminal/OrderGroupingProcessor_data.xsql
---