We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
At htdocs/compta/facture/class/api_invoices.class.php you have: $paymentobj->datepaye = dol_stringtotime($datepaye);
htdocs/compta/facture/class/api_invoices.class.php
$paymentobj->datepaye = dol_stringtotime($datepaye);
So the code expects a date string: 2024/11/26 (instead timestamp)
but if I try to give a date string I get a response (from DOLIBARR API):
Message: Bad Request: Invalid value specified for datepaye. Expecting unix timestamp, such as 1732638616
datepaye
It is not possible to workaround this in my code, so I patched the code to be: $paymentobj->datepaye = (int) $datepaye;
$paymentobj->datepaye = (int) $datepaye;
I don't know/have not checked if other part code of the code is sending date string instead of a timestamp
Whatever is the write way to fix this (date string or timestamp), I will use it when this is addressed in a future release, thanks
20.0.1
8.2
No response
Use API to created/update a payment
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug
At
htdocs/compta/facture/class/api_invoices.class.php
you have:
$paymentobj->datepaye = dol_stringtotime($datepaye);
So the code expects a date string: 2024/11/26 (instead timestamp)
but if I try to give a date string I get a response (from DOLIBARR API):
Message: Bad Request: Invalid value specified for
datepaye
. Expecting unix timestamp, such as 1732638616It is not possible to workaround this in my code, so I patched the code to be:
$paymentobj->datepaye = (int) $datepaye;
I don't know/have not checked if other part code of the code is sending date string instead of a timestamp
Whatever is the write way to fix this (date string or timestamp), I will use it when this is addressed in a future release,
thanks
Dolibarr Version
20.0.1
Environment PHP
8.2
Environment Database
No response
Steps to reproduce the behavior and expected behavior
Use API to created/update a payment
Attached files
No response
The text was updated successfully, but these errors were encountered: