Skip to content

Incorrect table being used #21

@rbaldasso

Description

@rbaldasso

Should be $userid = $invoice['userid'];. Not all invoices will have an order (e.g. recurrent items) so the user id should be retrieved from the invoice id, otherwise the value will be nulll and this error will happen:

"SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'userid' cannot be null (SQL: insert into tblinvoiceitems (invoiceid, userid, relid, description, amount, taxed, duedate, paymentmethod) values (11156, ?, 0, Desconto no boleto Gerencianet: 2% sobre o valor da cobrança., -0.50, 0, 2022-03-16, gerencianetcharge))"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions