Deleting Line Item Fails

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1857
    deniz
    Participant

    When attempting to delete a line item from an invoice I encounter the following error upon saving:

    “modules/invoices/save.php – edit exception error: PdoDb – query(): Execute error. See error_log.”

    Here some additional details from the php.log file:

    [10-Mar-2023 11:18:48 America/Los_Angeles] PdoDb – debugger(): DELETE FROM si_invoice_items WHERE id = 131
    [10-Mar-2023 11:18:48 America/Los_Angeles] PdoDb – query(): Execute error.Array
    (
    [0] => 23000
    [1] => 1451
    [2] => Cannot delete or update a parent row: a foreign key constraint fails (db_name.si_invoice_item_tax, CONSTRAINT si_invoice_item_tax_ibfk_2 FOREIGN KEY (invoice_item_id) REFERENCES si_invoice_items (id) ON UPDATE CASCADE)
    )

    I can add additional line items to an invoice as well as edit existing items without any issues.

    Details regarding SI installation:
    versionName = 2020.4.6
    versionUpdateDate = 20221220
    PHP Version 7.4

    Any suggestions or guidance in the right direction would be greatly appreciated. Thanks in advance.

    #1860
    RRowley
    Participant

    Download latest version and see if that addresses your issue. I found and fixed the error where deletion of an existing line item that has associated tax records was failing.

    #1861
    deniz
    Participant

    Thank you so much for your prompt response in resolving this issue. As suggested I updated my SI installation to the latest version and I am now able to delete line items successfully.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.