problem in the pos module related to item discount and sales discount ---------------------------------------------------------------------
Key: OFBIZ-828 URL: https://issues.apache.org/jira/browse/OFBIZ-828 Project: OFBiz (The Open for Business Project) Issue Type: Bug Components: pos Affects Versions: SVN trunk Environment: Postgresql 8.1, ubuntu Linux, java 1.5 Reporter: Vikrant Rathore Hi Everyone, There is a problem in financial module which in turns create a problem for POS. I have been trying POS with the demo data and found this error. 1. I create an order on POS and then try to choose cash to pay. When I key in the cash amount little higher then the receipt amount. Instead of showing me a return the system return with the error. "Problem with the order change see logs for details". I was looking at the logs and found that the GL account for credit payment is not set. But its not required. 2. If I remove the Financial module the POS works fine. Then the sale discount and item discount do not work. THanks with best regards, Vikrant Following is the log: ---- exception report ---------------------------------------------------------- Rollback Only was set when trying to commit transaction here; throwing rollbackOnly cause exception Exception: javax.transaction.RollbackException Message: null ---- stack trace --------------------------------------------------------------- javax.transaction.RollbackException org.apache.geronimo.transaction.context.GeronimoTransactionManager.commit(GeronimoTransactionManager.java:82) org.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:179) org.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:165) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:426) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:211) org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:136) org.ofbiz.order.order.OrderChangeHelper.createReceivedPayments(OrderChangeHelper.java:265) org.ofbiz.order.order.OrderChangeHelper.completeOrder(OrderChangeHelper.java:119) org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:1046) org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:814) org.ofbiz.pos.PosTransaction.processSale(PosTransaction.java:625) org.ofbiz.pos.event.PaymentEvents.processSale(PaymentEvents.java:304) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.ofbiz.pos.config.ButtonEventConfig.invoke(ButtonEventConfig.java:208) org.ofbiz.pos.config.ButtonEventConfig.invokeButtonEvent(ButtonEventConfig.java:105) org.ofbiz.pos.component.PosButton$1.construct(PosButton.java:120) net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source) java.lang.Thread.run(Unknown Source) -------------------------------------------------------------------------------- 2007-03-20 12:08:19,125 (Thread-27) [ ServiceDispatcher.java:429:ERROR] ---- exception report ---------------------------------------------------------- Could not commit transaction for service [createPaymentFromPreference] call Exception: org.ofbiz.entity.transaction.GenericTransactionException Message: Roll back error, could not commit transaction, was rolled back instead because of: Service Error [postPaymentToGl]: No credit GL accounts found for payment posting ---- stack trace --------------------------------------------------------------- org.ofbiz.entity.transaction.GenericTransactionException: Roll back error, could not commit transaction, was rolled back instead because of: Service Error [postPaymentToGl]: No credit GL accounts found for payment posting org.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:201) org.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:165) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:426) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:211) org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:136) org.ofbiz.order.order.OrderChangeHelper.createReceivedPayments(OrderChangeHelper.java:265) org.ofbiz.order.order.OrderChangeHelper.completeOrder(OrderChangeHelper.java:119) org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:1046) org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:814) org.ofbiz.pos.PosTransaction.processSale(PosTransaction.java:625) org.ofbiz.pos.event.PaymentEvents.processSale(PaymentEvents.java:304) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.ofbiz.pos.config.ButtonEventConfig.invoke(ButtonEventConfig.java:208) org.ofbiz.pos.config.ButtonEventConfig.invokeButtonEvent(ButtonEventConfig.java:105) org.ofbiz.pos.component.PosButton$1.construct(PosButton.java:120) net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source) java.lang.Thread.run(Unknown Source) -------------------------------------------------------------------------------- 2007-03-20 12:08:19,125 (Thread-27) [ OrderChangeHelper.java:126:ERROR] ---- exception report ---------------------------------------------------------- Exception: org.ofbiz.service.GenericServiceException Message: Could not commit transaction for service [createPaymentFromPreference] call: Roll back error, could not commit transaction, was rolled back instead because of: Service Error [postPaymentToGl]: No credit GL accounts found for payment posting ---- stack trace --------------------------------------------------------------- org.ofbiz.service.GenericServiceException: Could not commit transaction for service [createPaymentFromPreference] call: Roll back error, could not commit transaction, was rolled back instead because of: Service Error [postPaymentToGl]: No credit GL accounts found for payment posting org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:433) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:211) org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:136) org.ofbiz.order.order.OrderChangeHelper.createReceivedPayments(OrderChangeHelper.java:265) org.ofbiz.order.order.OrderChangeHelper.completeOrder(OrderChangeHelper.java:119) org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:1046) org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:814) org.ofbiz.pos.PosTransaction.processSale(PosTransaction.java:625) org.ofbiz.pos.event.PaymentEvents.processSale(PaymentEvents.java:304) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.ofbiz.pos.config.ButtonEventConfig.invoke(ButtonEventConfig.java:208) org.ofbiz.pos.config.ButtonEventConfig.invokeButtonEvent(ButtonEventConfig.java:105) org.ofbiz.pos.component.PosButton$1.construct(PosButton.java:120) net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source) java.lang.Thread.run(Unknown Source) -------------------------------------------------------------------------------- 2007-03-20 12:08:19,125 (Thread-27) [ CheckOutHelper.java:1047:INFO ] Complete Order Result - false 2007-03-20 12:08:19,125 (Thread-27) [ PosTransaction.java:627:ERROR] ---- exception report ---------------------------------------------------------- Exception: org.ofbiz.base.util.GeneralException Message: Problem with order change; see error logs ---- stack trace --------------------------------------------------------------- org.ofbiz.base.util.GeneralException: Problem with order change; see error logs org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:1049) org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:814) org.ofbiz.pos.PosTransaction.processSale(PosTransaction.java:625) org.ofbiz.pos.event.PaymentEvents.processSale(PaymentEvents.java:304) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.ofbiz.pos.config.ButtonEventConfig.invoke(ButtonEventConfig.java:208) org.ofbiz.pos.config.ButtonEventConfig.invokeButtonEvent(ButtonEventConfig.java:105) org.ofbiz.pos.component.PosButton$1.construct(PosButton.java:120) net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source) java.lang.Thread.run(Unknown Source) -------------------------------------------------------------------------------- 2007-03-20 12:08:19,125 (Thread-27) [ PaymentEvents.java:307:ERROR] ---- exception report ---------------------------------------------------------- Problem with order change; see error logs Exception: org.ofbiz.base.util.GeneralException Message: Problem with order change; see error logs ---- stack trace --------------------------------------------------------------- org.ofbiz.base.util.GeneralException: Problem with order change; see error logs org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:1049) org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:814) org.ofbiz.pos.PosTransaction.processSale(PosTransaction.java:625) org.ofbiz.pos.event.PaymentEvents.processSale(PaymentEvents.java:304) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.ofbiz.pos.config.ButtonEventConfig.invoke(ButtonEventConfig.java:208) org.ofbiz.pos.config.ButtonEventConfig.invokeButtonEvent(ButtonEventConfig.java:105) org.ofbiz.pos.component.PosButton$1.construct(PosButton.java:120) net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source) java.lang.Thread.run(Unknown Source) -------------------------------------------------------------------------------- -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.