[ https://issues.apache.org/jira/browse/OFBIZ-12390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17605844#comment-17605844 ]
Jacques Le Roux commented on OFBIZ-12390: ----------------------------------------- HI INgo, Thanks for the testing files, but I can't import the order one. I get {noformat} 2022-09-16 15:42:49,150 |jsse-nio-8443-exec-6 |GenericDelegator |E| Failure in create operation for entity [OrderRole]: org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:OrderRole][created Stamp,2022-09-16 15:42:49.119(java.sql.Timestamp)][createdTxStamp,2022-09-16 15:42:48.496(java.sql.Timestamp)][lastUpdatedStamp,2022-09-16 15:42:49.119(java.sql.Timestamp)][lastUpdatedTxStamp,2022-09-16 15:42:48.496(java.sql.Timestamp)][ orderId,TO10001(java.lang.String)][partyId,AUT_CUSTOMER(java.lang.String)][roleTypeId,BILL_TO_CUSTOMER(java.lang.String)] (SQL Exception while executing the following:null (INSERT on table 'ORDER_ROLE' caused a violation of foreign key c onstraint 'ORDER_ROLE_PROLE' for key (AUT_CUSTOMER,BILL_TO_CUSTOMER). The statement has been rolled back.)). Rolling back transaction. {noformat} > Order/Invoice: Item total result diff total result > -------------------------------------------------- > > Key: OFBIZ-12390 > URL: https://issues.apache.org/jira/browse/OFBIZ-12390 > Project: OFBiz > Issue Type: Improvement > Components: accounting, order > Affects Versions: Trunk, 17.12.08, 18.12.01, Upcoming Branch > Reporter: Ingo Wolfmayr > Assignee: Jacques Le Roux > Priority: Major > Attachments: Orders.xml, cartRounding.patch, > image-2021-11-19-09-44-18-759.png, image-2021-11-19-09-44-44-443.png, > image-2021-11-19-09-59-07-571.png, pricecheckData-1.xml > > > In some cases the order total is not correct: > net price: €1.273 > 10% sales tax: € 0.127 > quantity: 1 > grand total: € 1.40 > Now taking the same product and adding it with two order lines: > grand total: € 2.79 > Right now the grand total is calculated by total all item net prices, total > all adjustments and finally adding those two values together. > The following screenshots are taken from the orderview. Ofbiz request a > payment of € 2.80 but will create an invoice with a grand total of € 2.79. > !image-2021-11-19-09-44-18-759.png! > !image-2021-11-19-09-44-44-443.png! > Heres the result with just one orderline: > !image-2021-11-19-09-59-07-571.png! > > I have created a XML file for testing. Import the file via XML import and > create an order: > partyId: AUT_CUSTOMER > productStore: Test GmbH > product 1: AUT_PRODUCT (quantity 1) > product 1: AUT_PRODUCT_CP (quantity 1) > Checkout with default settings. > From my perspective the calculation should be changed to calculate the total > amount for each line and calculate the grand total from these results. > -- This message was sent by Atlassian Jira (v8.20.10#820010)