Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect table being used #21

Open
rbaldasso opened this issue Mar 21, 2022 · 0 comments
Open

Incorrect table being used #21

rbaldasso opened this issue Mar 21, 2022 · 0 comments

Comments

@rbaldasso
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant