Merge pull request #23504 from atm-maxime/fix_invoicesupprec_pdfmodel

Fix supplier reccurent invoice if no pdf model
This commit is contained in:
Laurent Destailleur 2023-01-11 19:25:22 +01:00 committed by GitHub
commit ed6a46eb20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1331,7 +1331,7 @@ class FactureFournisseurRec extends CommonInvoice
// We refresh the object in order to have all necessary data (like date_lim_reglement)
$new_fac_fourn->fetch($new_fac_fourn->id);
$result = $new_fac_fourn->generateDocument($facturerec->model_pdf, $langs);
if ($result <= 0) {
if ($result < 0) {
$this->errors = $new_fac_fourn->errors;
$this->error = $new_fac_fourn->error;
$error++;