Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-12445 InvoiceRole handling
  3. OFBIZ-12370

InvoiceRole: impossible combination of party and role selectable: leads to error

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Trunk, 17.12.08, 18.12.01, Upcoming Branch
    • None
    • accounting

    Description

      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:

      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.))) 

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pierresmits Pierre Smits
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: