You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Deyan (JIRA)" <ji...@apache.org> on 2009/11/02 16:16:59 UTC

[jira] Created: (OFBIZ-3141) Unable to create invoice discount

Unable to create invoice discount 
----------------------------------

                 Key: OFBIZ-3141
                 URL: https://issues.apache.org/jira/browse/OFBIZ-3141
             Project: OFBiz
          Issue Type: Bug
          Components: accounting
    Affects Versions: Release Branch 9.04
         Environment: Linux, postgres
            Reporter: Deyan


Use Ofbiz POS for example: 
1) Add an order item
2) Add sale discount ( type amount - 2.00 price and click Sale Disc )
3) Try to complete the transaction:

Exception: org.ofbiz.entity.transaction.GenericTransactionException
Message: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
---- stack trace ---------------------------------------------------------------
org.ofbiz.entity.transaction.GenericTransactionException: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:109)
org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:81)
org.ofbiz.entity.GenericDelegator.findOne(GenericDelegator.java:1599)
org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:1687)
org.ofbiz.accounting.invoice.InvoiceServices.checkInvoicePaymentApplications(InvoiceServices.java:1960)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
org.ofbiz.accounting.invoice.InvoiceServices.createInvoiceForOrder(InvoiceServices.java:812)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
org.ofbiz.order.order.OrderChangeHelper.createOrderInvoice(OrderChangeHelper.java:298)
org.ofbiz.order.order.OrderChangeHelper.completeOrder(OrderChangeHelper.java:118)
org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:1085)
org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:876)
org.ofbiz.pos.PosTransaction.processSale(PosTransaction.java:873)
org.ofbiz.pos.event.PaymentEvents.processSale(PaymentEvents.java:417)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
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:121)
net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source)
java.lang.Thread.run(Thread.java:619)
--------------------------------------------------------------------------------


The bug is in accounting: GeneralLedgerServices.xml # getGlAccountFromAccountType




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-3141) Unable to create invoice discount

Posted by "Deyan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-3141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deyan updated OFBIZ-3141:
-------------------------

    Attachment: patch.patch

Patch. 

1) applications/accounting/data/AccountingTypeData.xml

    <InvoiceItemTypeMap invoiceTypeId="SALES_INVOICE" invoiceItemMapKey="DISCOUNT_ADJUSTMENT" invoiceItemTypeId="INV_DISCOUNT_ADJ"/>

ITM_DISCOUNT_ADJ ->  INV_DISCOUNT_ADJ

2) application/accounting/script/..../GeneralLedgerServices.xml # getGlAccountFromAccountType

> Unable to create invoice discount 
> ----------------------------------
>
>                 Key: OFBIZ-3141
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3141
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Release Branch 9.04
>         Environment: Linux, postgres
>            Reporter: Deyan
>         Attachments: patch.patch
>
>
> Use Ofbiz POS for example: 
> 1) Add an order item
> 2) Add sale discount ( type amount - 2.00 price and click Sale Disc )
> 3) Try to complete the transaction:
> Exception: org.ofbiz.entity.transaction.GenericTransactionException
> Message: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> ---- stack trace ---------------------------------------------------------------
> org.ofbiz.entity.transaction.GenericTransactionException: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:109)
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:81)
> org.ofbiz.entity.GenericDelegator.findOne(GenericDelegator.java:1599)
> org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:1687)
> org.ofbiz.accounting.invoice.InvoiceServices.checkInvoicePaymentApplications(InvoiceServices.java:1960)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.accounting.invoice.InvoiceServices.createInvoiceForOrder(InvoiceServices.java:812)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.order.order.OrderChangeHelper.createOrderInvoice(OrderChangeHelper.java:298)
> org.ofbiz.order.order.OrderChangeHelper.completeOrder(OrderChangeHelper.java:118)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:1085)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:876)
> org.ofbiz.pos.PosTransaction.processSale(PosTransaction.java:873)
> org.ofbiz.pos.event.PaymentEvents.processSale(PaymentEvents.java:417)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> 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:121)
> net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source)
> java.lang.Thread.run(Thread.java:619)
> --------------------------------------------------------------------------------
> The bug is in accounting: GeneralLedgerServices.xml # getGlAccountFromAccountType

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-3141) Unable to create invoice discount

Posted by "Deyan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-3141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deyan updated OFBIZ-3141:
-------------------------

    Attachment: sales_disc.png

> Unable to create invoice discount 
> ----------------------------------
>
>                 Key: OFBIZ-3141
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3141
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Release Branch 9.04
>         Environment: Linux, postgres
>            Reporter: Deyan
>         Attachments: patch.patch, sales_disc.png
>
>
> Use Ofbiz POS for example: 
> 1) Add an order item
> 2) Add sale discount ( type amount - 2.00 price and click Sale Disc )
> 3) Try to complete the transaction:
> Exception: org.ofbiz.entity.transaction.GenericTransactionException
> Message: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> ---- stack trace ---------------------------------------------------------------
> org.ofbiz.entity.transaction.GenericTransactionException: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:109)
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:81)
> org.ofbiz.entity.GenericDelegator.findOne(GenericDelegator.java:1599)
> org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:1687)
> org.ofbiz.accounting.invoice.InvoiceServices.checkInvoicePaymentApplications(InvoiceServices.java:1960)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.accounting.invoice.InvoiceServices.createInvoiceForOrder(InvoiceServices.java:812)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.order.order.OrderChangeHelper.createOrderInvoice(OrderChangeHelper.java:298)
> org.ofbiz.order.order.OrderChangeHelper.completeOrder(OrderChangeHelper.java:118)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:1085)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:876)
> org.ofbiz.pos.PosTransaction.processSale(PosTransaction.java:873)
> org.ofbiz.pos.event.PaymentEvents.processSale(PaymentEvents.java:417)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> 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:121)
> net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source)
> java.lang.Thread.run(Thread.java:619)
> --------------------------------------------------------------------------------
> The bug is in accounting: GeneralLedgerServices.xml # getGlAccountFromAccountType

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3141) Unable to create invoice discount

Posted by "Deyan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773016#action_12773016 ] 

Deyan commented on OFBIZ-3141:
------------------------------

Hi Jacques, 

I haven't done any special configurations. 
However before making any sales and / or discounts you need the default gl accounts mapped. 
So just apply the patch, seed the demo data and use the POS to make a sale with sale discount in order to test it. 

-- deyan



> Unable to create invoice discount 
> ----------------------------------
>
>                 Key: OFBIZ-3141
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3141
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Release Branch 9.04
>         Environment: Linux, postgres
>            Reporter: Deyan
>         Attachments: patch.patch
>
>
> Use Ofbiz POS for example: 
> 1) Add an order item
> 2) Add sale discount ( type amount - 2.00 price and click Sale Disc )
> 3) Try to complete the transaction:
> Exception: org.ofbiz.entity.transaction.GenericTransactionException
> Message: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> ---- stack trace ---------------------------------------------------------------
> org.ofbiz.entity.transaction.GenericTransactionException: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:109)
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:81)
> org.ofbiz.entity.GenericDelegator.findOne(GenericDelegator.java:1599)
> org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:1687)
> org.ofbiz.accounting.invoice.InvoiceServices.checkInvoicePaymentApplications(InvoiceServices.java:1960)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.accounting.invoice.InvoiceServices.createInvoiceForOrder(InvoiceServices.java:812)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.order.order.OrderChangeHelper.createOrderInvoice(OrderChangeHelper.java:298)
> org.ofbiz.order.order.OrderChangeHelper.completeOrder(OrderChangeHelper.java:118)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:1085)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:876)
> org.ofbiz.pos.PosTransaction.processSale(PosTransaction.java:873)
> org.ofbiz.pos.event.PaymentEvents.processSale(PaymentEvents.java:417)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> 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:121)
> net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source)
> java.lang.Thread.run(Thread.java:619)
> --------------------------------------------------------------------------------
> The bug is in accounting: GeneralLedgerServices.xml # getGlAccountFromAccountType

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3141) Unable to create invoice discount

Posted by "Deyan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774255#action_12774255 ] 

Deyan commented on OFBIZ-3141:
------------------------------

Yup, strangely but it all works with the demo data. 
Seems like I missed something when I tested it...

My confusion came from the invoice item types: we have: ITM_DISCOUNT_ADJ and INV_DISCOUNT_ADJ. 

Usually when you make an ITEM DISCOUNT you get an invoice item ITM_DISCOUNT_ADJ and the ID of the product, the discount is meant for. 
When you make a SALE DISCOUNT I thought we should get an invoice item of type INV_DISCOUNT_ADJ, as it is not related to any items - it is a general invoice discount. However it seems like this is not the case. When you make a SALE DISCOUNT you simply get 
an INV_DISCOUNT_ADJ invoice item with no product_id set ( check the screenshot ). 

So it seems like I haven't configured some accounting settings and this is probably the reason I'm getting the exception above. 
Please ignore this bug for now :)


> Unable to create invoice discount 
> ----------------------------------
>
>                 Key: OFBIZ-3141
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3141
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Release Branch 9.04
>         Environment: Linux, postgres
>            Reporter: Deyan
>         Attachments: patch.patch
>
>
> Use Ofbiz POS for example: 
> 1) Add an order item
> 2) Add sale discount ( type amount - 2.00 price and click Sale Disc )
> 3) Try to complete the transaction:
> Exception: org.ofbiz.entity.transaction.GenericTransactionException
> Message: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> ---- stack trace ---------------------------------------------------------------
> org.ofbiz.entity.transaction.GenericTransactionException: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:109)
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:81)
> org.ofbiz.entity.GenericDelegator.findOne(GenericDelegator.java:1599)
> org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:1687)
> org.ofbiz.accounting.invoice.InvoiceServices.checkInvoicePaymentApplications(InvoiceServices.java:1960)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.accounting.invoice.InvoiceServices.createInvoiceForOrder(InvoiceServices.java:812)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.order.order.OrderChangeHelper.createOrderInvoice(OrderChangeHelper.java:298)
> org.ofbiz.order.order.OrderChangeHelper.completeOrder(OrderChangeHelper.java:118)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:1085)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:876)
> org.ofbiz.pos.PosTransaction.processSale(PosTransaction.java:873)
> org.ofbiz.pos.event.PaymentEvents.processSale(PaymentEvents.java:417)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> 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:121)
> net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source)
> java.lang.Thread.run(Thread.java:619)
> --------------------------------------------------------------------------------
> The bug is in accounting: GeneralLedgerServices.xml # getGlAccountFromAccountType

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OFBIZ-3141) Unable to create invoice discount

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-3141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-3141.
----------------------------------

    Resolution: Invalid
      Assignee: Jacques Le Roux

> Unable to create invoice discount 
> ----------------------------------
>
>                 Key: OFBIZ-3141
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3141
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Release Branch 9.04
>         Environment: Linux, postgres
>            Reporter: Deyan
>            Assignee: Jacques Le Roux
>         Attachments: patch.patch, sales_disc.png
>
>
> Use Ofbiz POS for example: 
> 1) Add an order item
> 2) Add sale discount ( type amount - 2.00 price and click Sale Disc )
> 3) Try to complete the transaction:
> Exception: org.ofbiz.entity.transaction.GenericTransactionException
> Message: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> ---- stack trace ---------------------------------------------------------------
> org.ofbiz.entity.transaction.GenericTransactionException: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:109)
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:81)
> org.ofbiz.entity.GenericDelegator.findOne(GenericDelegator.java:1599)
> org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:1687)
> org.ofbiz.accounting.invoice.InvoiceServices.checkInvoicePaymentApplications(InvoiceServices.java:1960)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.accounting.invoice.InvoiceServices.createInvoiceForOrder(InvoiceServices.java:812)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.order.order.OrderChangeHelper.createOrderInvoice(OrderChangeHelper.java:298)
> org.ofbiz.order.order.OrderChangeHelper.completeOrder(OrderChangeHelper.java:118)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:1085)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:876)
> org.ofbiz.pos.PosTransaction.processSale(PosTransaction.java:873)
> org.ofbiz.pos.event.PaymentEvents.processSale(PaymentEvents.java:417)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> 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:121)
> net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source)
> java.lang.Thread.run(Thread.java:619)
> --------------------------------------------------------------------------------
> The bug is in accounting: GeneralLedgerServices.xml # getGlAccountFromAccountType

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3141) Unable to create invoice discount

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773020#action_12773020 ] 

Jacques Le Roux commented on OFBIZ-3141:
----------------------------------------

Deyan,

I have not tested the patch yet. What I meaned is : I do an "an run-install" and I create a sale from the POS with a sale discount, pay it with cash and get any problems.
So there is something I'm not understanding here. Because <<before making any sales and / or discounts *I don't  need* the default gl accounts mapped. >>
This does not mean that your patch is no good or anything else, just that I'm not understanding why you get an issue. And I want to be sure to understand the issue before fixing it.

> Unable to create invoice discount 
> ----------------------------------
>
>                 Key: OFBIZ-3141
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3141
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Release Branch 9.04
>         Environment: Linux, postgres
>            Reporter: Deyan
>         Attachments: patch.patch
>
>
> Use Ofbiz POS for example: 
> 1) Add an order item
> 2) Add sale discount ( type amount - 2.00 price and click Sale Disc )
> 3) Try to complete the transaction:
> Exception: org.ofbiz.entity.transaction.GenericTransactionException
> Message: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> ---- stack trace ---------------------------------------------------------------
> org.ofbiz.entity.transaction.GenericTransactionException: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:109)
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:81)
> org.ofbiz.entity.GenericDelegator.findOne(GenericDelegator.java:1599)
> org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:1687)
> org.ofbiz.accounting.invoice.InvoiceServices.checkInvoicePaymentApplications(InvoiceServices.java:1960)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.accounting.invoice.InvoiceServices.createInvoiceForOrder(InvoiceServices.java:812)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.order.order.OrderChangeHelper.createOrderInvoice(OrderChangeHelper.java:298)
> org.ofbiz.order.order.OrderChangeHelper.completeOrder(OrderChangeHelper.java:118)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:1085)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:876)
> org.ofbiz.pos.PosTransaction.processSale(PosTransaction.java:873)
> org.ofbiz.pos.event.PaymentEvents.processSale(PaymentEvents.java:417)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> 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:121)
> net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source)
> java.lang.Thread.run(Thread.java:619)
> --------------------------------------------------------------------------------
> The bug is in accounting: GeneralLedgerServices.xml # getGlAccountFromAccountType

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3141) Unable to create invoice discount

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774261#action_12774261 ] 

Jacques Le Roux commented on OFBIZ-3141:
----------------------------------------

Hi Deyan,

Feel free to reopen if you discover some bugs

> Unable to create invoice discount 
> ----------------------------------
>
>                 Key: OFBIZ-3141
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3141
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Release Branch 9.04
>         Environment: Linux, postgres
>            Reporter: Deyan
>            Assignee: Jacques Le Roux
>         Attachments: patch.patch, sales_disc.png
>
>
> Use Ofbiz POS for example: 
> 1) Add an order item
> 2) Add sale discount ( type amount - 2.00 price and click Sale Disc )
> 3) Try to complete the transaction:
> Exception: org.ofbiz.entity.transaction.GenericTransactionException
> Message: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> ---- stack trace ---------------------------------------------------------------
> org.ofbiz.entity.transaction.GenericTransactionException: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:109)
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:81)
> org.ofbiz.entity.GenericDelegator.findOne(GenericDelegator.java:1599)
> org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:1687)
> org.ofbiz.accounting.invoice.InvoiceServices.checkInvoicePaymentApplications(InvoiceServices.java:1960)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.accounting.invoice.InvoiceServices.createInvoiceForOrder(InvoiceServices.java:812)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.order.order.OrderChangeHelper.createOrderInvoice(OrderChangeHelper.java:298)
> org.ofbiz.order.order.OrderChangeHelper.completeOrder(OrderChangeHelper.java:118)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:1085)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:876)
> org.ofbiz.pos.PosTransaction.processSale(PosTransaction.java:873)
> org.ofbiz.pos.event.PaymentEvents.processSale(PaymentEvents.java:417)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> 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:121)
> net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source)
> java.lang.Thread.run(Thread.java:619)
> --------------------------------------------------------------------------------
> The bug is in accounting: GeneralLedgerServices.xml # getGlAccountFromAccountType

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3141) Unable to create invoice discount

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773002#action_12773002 ] 

Jacques Le Roux commented on OFBIZ-3141:
----------------------------------------

Hi Deyan,

This works OOTB, so I guess you have made some configurations before, could you please detail them

> Unable to create invoice discount 
> ----------------------------------
>
>                 Key: OFBIZ-3141
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3141
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Release Branch 9.04
>         Environment: Linux, postgres
>            Reporter: Deyan
>         Attachments: patch.patch
>
>
> Use Ofbiz POS for example: 
> 1) Add an order item
> 2) Add sale discount ( type amount - 2.00 price and click Sale Disc )
> 3) Try to complete the transaction:
> Exception: org.ofbiz.entity.transaction.GenericTransactionException
> Message: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> ---- stack trace ---------------------------------------------------------------
> org.ofbiz.entity.transaction.GenericTransactionException: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Post a AcctgTrans [file:/home/ghost/workspace/ofbiz_balkantex_pos/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml#postAcctgTrans]]: ; [Gl account id is not set for [VR00001] or mapping not found for account type ]
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:109)
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:81)
> org.ofbiz.entity.GenericDelegator.findOne(GenericDelegator.java:1599)
> org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:1687)
> org.ofbiz.accounting.invoice.InvoiceServices.checkInvoicePaymentApplications(InvoiceServices.java:1960)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.accounting.invoice.InvoiceServices.createInvoiceForOrder(InvoiceServices.java:812)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96)
> org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:390)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> org.ofbiz.order.order.OrderChangeHelper.createOrderInvoice(OrderChangeHelper.java:298)
> org.ofbiz.order.order.OrderChangeHelper.completeOrder(OrderChangeHelper.java:118)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:1085)
> org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelper.java:876)
> org.ofbiz.pos.PosTransaction.processSale(PosTransaction.java:873)
> org.ofbiz.pos.event.PaymentEvents.processSale(PaymentEvents.java:417)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> 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:121)
> net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source)
> java.lang.Thread.run(Thread.java:619)
> --------------------------------------------------------------------------------
> The bug is in accounting: GeneralLedgerServices.xml # getGlAccountFromAccountType

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.