Pierre Smits created OFBIZ-12370:
------------------------------------

             Summary: Invoice: impossible combination of party and role 
selectable: leads to error
                 Key: OFBIZ-12370
                 URL: https://issues.apache.org/jira/browse/OFBIZ-12370
             Project: OFBiz
          Issue Type: Bug
          Components: accounting
    Affects Versions: 18.12.01, 17.12.08, Trunk
            Reporter: Pierre Smits


On the invoice role page in accounting (see e.g. 
[https://demo-stable.ofbiz.apache.org/accounting/control/invoiceRoles?invoiceId=demo10001]
 ) it is possible to select an impossible combination of a party and a role. 
After the submit an error is shown:


{code:java}
The Following Errors Occurred:Exception thrown while creating the "newEntity" 
GenericValue: org.apache.ofbiz.entity.GenericEntityException: Error while 
inserting: [GenericEntity:InvoiceRole][createdStamp,2021-11-09 
10:21:14.073(java.sql.Timestamp)][createdTxStamp,2021-11-09 
10:21:14.02(java.sql.Timestamp)][datetimePerformed,2021-11-09 
10:21:14.073(java.sql.Timestamp)][invoiceId,demo10001(java.lang.String)][lastUpdatedStamp,2021-11-09
 10:21:14.073(java.sql.Timestamp)][lastUpdatedTxStamp,2021-11-09 
10:21:14.02(java.sql.Timestamp)][partyId,DemoLead(java.lang.String)][percentage,null()][roleTypeId,INTERNAL_ORGANIZATIO(java.lang.String)]
 (SQL Exception while executing the following:INSERT INTO OFBIZ.INVOICE_ROLE 
(INVOICE_ID, PARTY_ID, ROLE_TYPE_ID, DATETIME_PERFORMED, PERCENTAGE, 
LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) 
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'INVOICE_ROLE' caused a 
violation of foreign key constraint 'INVCE_RLE_PTRL' for key 
(DemoLead,INTERNAL_ORGANIZATIO). The statement has been rolled back.)) (Error 
while inserting: [GenericEntity:InvoiceRole][createdStamp,2021-11-09 
10:21:14.073(java.sql.Timestamp)][createdTxStamp,2021-11-09 
10:21:14.02(java.sql.Timestamp)][datetimePerformed,2021-11-09 
10:21:14.073(java.sql.Timestamp)][invoiceId,demo10001(java.lang.String)][lastUpdatedStamp,2021-11-09
 10:21:14.073(java.sql.Timestamp)][lastUpdatedTxStamp,2021-11-09 
10:21:14.02(java.sql.Timestamp)][partyId,DemoLead(java.lang.String)][percentage,null()][roleTypeId,INTERNAL_ORGANIZATIO(java.lang.String)]
 (SQL Exception while executing the following:INSERT INTO OFBIZ.INVOICE_ROLE 
(INVOICE_ID, PARTY_ID, ROLE_TYPE_ID, DATETIME_PERFORMED, PERCENTAGE, 
LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) 
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'INVOICE_ROLE' caused a 
violation of foreign key constraint 'INVCE_RLE_PTRL' for key 
(DemoLead,INTERNAL_ORGANIZATIO). The statement has been rolled back.))) {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to