From 2d17e77ff74a123ecfb6fe7c0d24d2565ed3610c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 1 May 2023 17:21:00 +0200 Subject: [PATCH] Fix warning --- htdocs/bom/tpl/objectline_view.tpl.php | 2 + .../facture/class/facture-rec.class.php | 4 ++ htdocs/core/class/html.form.class.php | 13 +++-- htdocs/core/class/html.formother.class.php | 4 +- .../connectors/php/connector.lib.php | 1 + .../asset/doc/pdf_standard_asset.modules.php | 2 +- .../commande/doc/pdf_einstein.modules.php | 1 + .../commande/doc/pdf_eratosthene.modules.php | 3 +- .../delivery/doc/pdf_storm.modules.php | 2 +- .../expedition/doc/pdf_espadon.modules.php | 2 +- .../modules/export/export_csviso.modules.php | 4 +- .../modules/export/export_csvutf8.modules.php | 4 +- .../facture/doc/pdf_sponge.modules.php | 2 +- .../modules/import/import_xlsx.modules.php | 1 + .../modules/mrp/doc/pdf_vinci.modules.php | 3 +- .../modules/propale/doc/pdf_azur.modules.php | 1 + .../modules/propale/doc/pdf_cyan.modules.php | 2 +- .../doc/pdf_eagle_proforma.modules.php | 2 +- .../supplier_order/doc/pdf_cornas.modules.php | 3 +- .../doc/pdf_muscadet.modules.php | 1 + .../doc/pdf_aurore.modules.php | 1 + .../class/fournisseur.commande.class.php | 7 +++ .../class/fournisseur.facture-rec.class.php | 48 ++++++++++--------- htdocs/user/class/user.class.php | 2 + 24 files changed, 71 insertions(+), 44 deletions(-) diff --git a/htdocs/bom/tpl/objectline_view.tpl.php b/htdocs/bom/tpl/objectline_view.tpl.php index 835da0a80d8..98e79fa0416 100644 --- a/htdocs/bom/tpl/objectline_view.tpl.php +++ b/htdocs/bom/tpl/objectline_view.tpl.php @@ -34,6 +34,8 @@ * $type, $text, $description, $line */ +/** var ObjectLine $line */ + require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php'; // Protection to avoid direct call of template diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 5c24359c78b..09b2c1e6185 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -1035,6 +1035,10 @@ class FactureRec extends CommonInvoice $this->error = $this->db->lasterror(); return -1; } + } else { + $this->error = 'Recurring Invoice is suspended. adding lines not allowed.'; + + return -1; } } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ba6f35363b6..5e4f5490e61 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -802,18 +802,17 @@ class Form /** * Generate select HTML to choose massaction * - * @param string $selected Value auto selected when at least one record is selected. Not a preselected value. Use '0' by default. - * @param array $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action. - * @param int $alwaysvisible 1=select button always visible - * @param string $name Name for massaction - * @param string $cssclass CSS class used to check for select - * @return string|void Select list + * @param string $selected Value auto selected when at least one record is selected. Not a preselected value. Use '0' by default. + * @param array $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action. + * @param int $alwaysvisible 1=select button always visible + * @param string $name Name for massaction + * @param string $cssclass CSS class used to check for select + * @return string|void Select list */ public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0, $name = 'massaction', $cssclass = 'checkforselect') { global $conf, $langs, $hookmanager; - $disabled = 0; $ret = '
'; $ret .= '