diff --git a/ChangeLog b/ChangeLog index f4945b44df0..9b7b6c79b86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ For users: NEW: PHP 8.1 compatibility NEW: Support for recurring purchase invoices. NEW: #20292 Include German public holidays +NEW: Can show ZATCA QRCode on PDFs NEW: #17123 added ExtraFields for Stock Mouvement NEW: #20609 : new massaction to assign a sale representatives on a selection of thirdparties NEW: #20653 edit discount pourcentage for all lines in one shot diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 2cb4c5fba1c..c8c4099e67e 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -111,7 +111,7 @@ class AccountancyExport */ public function getType() { - global $langs; + global $langs, $hookmanager; $listofexporttypes = array( self::$EXPORT_TYPE_CONFIGURABLE => $langs->trans('Modelcsv_configurable'), @@ -137,7 +137,7 @@ class AccountancyExport ); // allow modules to define export formats - global $hookmanager; + $parameters = array(); $reshook = $hookmanager->executeHooks('getType', $parameters, $listofexporttypes); ksort($listofexporttypes, SORT_NUMERIC); diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index 72acf7fbf4f..5a51535e04d 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -60,6 +60,9 @@ if ($action == 'update') { if (GETPOSTISSET('MAIN_DOCUMENTS_WITH_PICTURE_WIDTH')) { dolibarr_set_const($db, "MAIN_DOCUMENTS_WITH_PICTURE_WIDTH", GETPOST("MAIN_DOCUMENTS_WITH_PICTURE_WIDTH", 'int'), 'chaine', 0, '', $conf->entity); } + if (GETPOSTISSET('INVOICE_ADD_ZATCA_QR_CODE')) { + dolibarr_set_const($db, "INVOICE_ADD_ZATCA_QR_CODE", GETPOST("INVOICE_ADD_ZATCA_QR_CODE", 'int'), 'chaine', 0, '', $conf->entity); + } setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -90,19 +93,19 @@ $tooltiptext = ''; print ''.$form->textwithpicto($langs->trans("PDFOtherDesc"), $tooltiptext)."
\n"; print "
\n"; +print '
'; +print ''; +print ''; + if (!empty($conf->propal->enabled)) { print load_fiche_titre($langs->trans("Proposal"), '', ''); - print ''; - print ''; - print ''; - print '
'; print ''; print ''; - print ''; + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"); - print ' ('.$langs->trans("RandomlySelectedIfSeveral").')'; + print '
'; + print $form->textwithpicto($langs->trans("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), $langs->trans("RandomlySelectedIfSeveral")); print ''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('MAIN_GENERATE_PROPOSALS_WITH_PICTURE'); @@ -112,6 +115,29 @@ if (!empty($conf->propal->enabled)) { } print '
'; + print '
'; +} + + +if (!empty($conf->facture->enabled)) { + print load_fiche_titre($langs->trans("Invoices"), '', ''); + + print '
'; + print ''; + print ''; + + print ''; + /* print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print $form->textwithpicto($langs->trans("INVOICE_ADD_ZATCA_QR_CODE"), $langs->trans("INVOICE_ADD_ZATCA_QR_CODEMore")); + print ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('INVOICE_ADD_ZATCA_QR_CODE'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("INVOICE_ADD_ZATCA_QR_CODE", $arrval, $conf->global->INVOICE_ADD_ZATCA_QR_CODE); + } + print '
'.$langs->trans("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING").''; if ($conf->use_javascript_ajax) { diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 451a18ab05b..3fb82f05cb9 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -200,8 +200,9 @@ class RemiseCheque extends CommonObject } } + $lines = array(); + if ($this->id > 0 && $this->errno == 0) { - $lines = array(); $sql = "SELECT b.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; $sql .= " WHERE b.fk_type = 'CHQ'"; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 69ef87aca0d..d36dbfd7733 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2260,3 +2260,5 @@ TextOnly=Text only IconOnlyAllTextsOnHover=Icon only - All texts appears under icon on mouse hover menu bar IconOnlyTextOnHover=Icon only - Text of icon appears under icon on mouse hover the icon IconOnly=Icon only - Text on tooltip only +INVOICE_ADD_ZATCA_QR_CODE=Show the ZATCA QR code on invoices +INVOICE_ADD_ZATCA_QR_CODEMore=Some Arabic countries need this QR Code on their invoices