From efce6c5aab47d65d23491d60230095c99b3f1acc Mon Sep 17 00:00:00 2001 From: MDW Date: Mon, 8 Jan 2024 23:45:26 +0100 Subject: [PATCH 01/40] Fix: fournisseur.commande - add missing argument addline call The call to addline had several missing arguments. Added. --- .../class/fournisseur.commande.class.php | 58 ++++++++++--------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index fa70a9e0b25..800ef87b319 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1457,8 +1457,12 @@ class CommandeFournisseur extends CommonOrder $line->date_end, $line->array_options, $line->fk_unit, + $line->multicurrency_subprice, // pu_ht_devise + $line->origin, // origin + $line->origin_id, // origin_id + $line->rang, // rang $line->special_code - ); + ); if ($result < 0) { dol_syslog(get_class($this)."::create ".$this->error, LOG_WARNING); // do not use dol_print_error here as it may be a functionnal error $this->db->rollback(); @@ -1727,31 +1731,31 @@ class CommandeFournisseur extends CommonOrder /** * Add order line * - * @param string $desc Description - * @param float $pu_ht Unit price (used if $price_base_type is 'HT') - * @param float $qty Quantity - * @param float $txtva Taux tva - * @param float $txlocaltax1 Localtax1 tax - * @param float $txlocaltax2 Localtax2 tax - * @param int $fk_product Id product - * @param int $fk_prod_fourn_price Id supplier price - * @param string $ref_supplier Supplier reference price - * @param float $remise_percent Remise - * @param string $price_base_type HT or TTC - * @param float $pu_ttc Unit price TTC (used if $price_base_type is 'TTC') - * @param int $type Type of line (0=product, 1=service) - * @param int $info_bits More information - * @param bool $notrigger Disable triggers - * @param int $date_start Date start of service - * @param int $date_end Date end of service - * @param array $array_options extrafields array - * @param string $fk_unit Code of the unit to use. Null to use the default one - * @param string $pu_ht_devise Amount in currency - * @param string $origin 'order', ... - * @param int $origin_id Id of origin object - * @param int $rang Rank - * @param int $special_code Special code - * @return int <=0 if KO, >0 if OK + * @param string $desc Description + * @param float $pu_ht Unit price (used if $price_base_type is 'HT') + * @param float $qty Quantity + * @param float $txtva VAT Rate + * @param float $txlocaltax1 Localtax1 tax + * @param float $txlocaltax2 Localtax2 tax + * @param int $fk_product Id product + * @param int $fk_prod_fourn_price Id supplier price + * @param string $ref_supplier Supplier reference price + * @param float $remise_percent Remise + * @param string $price_base_type HT or TTC + * @param float $pu_ttc Unit price TTC (used if $price_base_type is 'TTC') + * @param int $type Type of line (0=product, 1=service) + * @param int $info_bits More information + * @param bool $notrigger Disable triggers + * @param int $date_start Date start of service + * @param int $date_end Date end of service + * @param array $array_options extrafields array + * @param string $fk_unit Code of the unit to use. Null to use the default one + * @param string $pu_ht_devise Amount in currency + * @param string $origin 'order', ... + * @param int $origin_id Id of origin object + * @param int $rang Rank + * @param int $special_code Special code + * @return int Return integer <=0 if KO, >0 if OK */ public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $fk_prod_fourn_price = 0, $ref_supplier = '', $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $type = 0, $info_bits = 0, $notrigger = false, $date_start = null, $date_end = null, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $origin = '', $origin_id = 0, $rang = -1, $special_code = 0) { @@ -1975,7 +1979,7 @@ class CommandeFournisseur extends CommonOrder // Multicurrency $this->line->fk_multicurrency = $this->fk_multicurrency; $this->line->multicurrency_code = $this->multicurrency_code; - $this->line->multicurrency_subprice = $pu_ht_devise; + $this->line->multicurrency_subprice = $pu_ht_devise; $this->line->multicurrency_total_ht = $multicurrency_total_ht; $this->line->multicurrency_total_tva = $multicurrency_total_tva; $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; From 6d88670eeebdf4d51649ac746115dd17078c80b9 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 9 Jan 2024 00:03:24 +0100 Subject: [PATCH 02/40] Fix: Sitemap generation - fix invalid replacement regex # Fix: Sitemap generation - fix invalid replacement regex The regex is invalid because the delimiters are slashes which are also present in the text to match. Fixed by changing the delimiters. --- htdocs/website/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 84d408b4f0b..c799e2ce898 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2673,7 +2673,7 @@ if ($action == 'generatesitemaps' && $usercanedit) { // Add the entry Sitemap: into the robot file. $robotcontent = @file_get_contents($filerobot); - $result = preg_replace('/\n/ims', '', $robotcontent); + $result = preg_replace('@\n@ims', '', $robotcontent); if ($result) { $robotcontent = $result; } From 8f7a4800ee7bf05051305647071e7dcc5fc0a066 Mon Sep 17 00:00:00 2001 From: William Mead Date: Tue, 9 Jan 2024 14:49:20 +0100 Subject: [PATCH 03/40] Added notification information on intervention validated confirmation message --- htdocs/fichinter/card.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 349139e69ff..de838f401bf 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1105,6 +1105,12 @@ if ($action == 'create') { $numref = $object->ref; } $text = $langs->trans('ConfirmValidateIntervention', $numref); + if (isModEnabled('notification')) { + require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; + $notify = new Notify($db); + $text .= '
'; + $text .= $notify->confirmMessage('FICHINTER_VALIDATE', $object->socid, $object); + } $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateIntervention'), $text, 'confirm_validate', '', 1, 1); } From 5c434e273ea053dc4c302b86ea74fe3c14960040 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 10 Jan 2024 15:25:16 +0100 Subject: [PATCH 04/40] Update index.php --- htdocs/website/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index c799e2ce898..fad19c82a61 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2673,7 +2673,7 @@ if ($action == 'generatesitemaps' && $usercanedit) { // Add the entry Sitemap: into the robot file. $robotcontent = @file_get_contents($filerobot); - $result = preg_replace('@\n@ims', '', $robotcontent); + $result = preg_replace('/\n/ims', '', $robotcontent); if ($result) { $robotcontent = $result; } From 72210dc19b92c7f8e31da594d35a3cce4dd590ce Mon Sep 17 00:00:00 2001 From: MDW Date: Wed, 10 Jan 2024 16:57:10 +0100 Subject: [PATCH 05/40] Fix: discount - add missing db parameter to dol_print_error (#27337) # Fix: discount - add missing db parameter to dol_print_error dol_print_error requires the db instance to be the first parameter --- htdocs/core/class/discount.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 86fb546be9a..b1cf3fb7749 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -581,7 +581,7 @@ class DiscountAbsolute $sql .= " AND f.type = 3"; } else { $this->error = get_class($this)."::getSumDepositsUsed was called with a bad object as a first parameter"; - dol_print_error($this->error); + dol_print_error($this->db, $this->error); return -1; } @@ -622,7 +622,7 @@ class DiscountAbsolute $sql .= " AND f.type IN (".$this->db->sanitize($invoice::TYPE_STANDARD.", ".$invoice::TYPE_CREDIT_NOTE).")"; // Find discount coming from credit note or excess paid } else { $this->error = get_class($this)."::getSumCreditNotesUsed was called with a bad object as a first parameter"; - dol_print_error($this->error); + dol_print_error($this->db, $this->error); return -1; } @@ -660,7 +660,7 @@ class DiscountAbsolute $sql .= " WHERE rc.fk_invoice_supplier IS NULL AND rc.fk_invoice_supplier_source = ".((int) $invoice->id); } else { $this->error = get_class($this)."::getSumCreditNotesUsed was called with a bad object as a first parameter"; - dol_print_error($this->error); + dol_print_error($this->db, $this->error); return -1; } From 412f8406dde1c9148ce2923d872be6432384cd63 Mon Sep 17 00:00:00 2001 From: MDW Date: Wed, 10 Jan 2024 22:10:13 +0100 Subject: [PATCH 06/40] Fix: Change TCPDF::_out to public because of pdf.lib.php (#27333) # Fix: Change TCPDF::_out to public because of pdf.lib.php TCPDF::_out is used 2 times as ->_out(...) in htdocs/core/lib/pdf.lib.php. Changing php.lib.php requires more analysis. Making TCPDF::_out public is the quick solution. --- dev/dolibarr_changes.txt | 14 ++++++++++++++ htdocs/includes/tecnickcom/tcpdf/tcpdf.php | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index a87d5de3207..6b00d5243b9 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -73,6 +73,20 @@ NUSOAP: TCPDF: ------ +* Modify in tcpdf.php: make TCPDF::_out public. + (htdocs/core/lib/pdf.lib.php uses it as a public method) + + Change: + protected function _out($s) + to + public function _out($s) + + Change in method's _out phpdoc: + + * @protected + to + * @public + * Replace in tcpdf.php: if (isset($this->imagekeys)) { foreach($this->imagekeys as $file) { diff --git a/htdocs/includes/tecnickcom/tcpdf/tcpdf.php b/htdocs/includes/tecnickcom/tcpdf/tcpdf.php index a1f7453294d..067da52db37 100644 --- a/htdocs/includes/tecnickcom/tcpdf/tcpdf.php +++ b/htdocs/includes/tecnickcom/tcpdf/tcpdf.php @@ -10516,9 +10516,9 @@ class TCPDF /** * Output a string to the document. * @param $s (string) string to output. - * @protected + * @public */ - protected function _out($s) + public function _out($s) { if ($this->state == 2) { if ($this->inxobj) { From 77a922a72e457cf25888f6c0d4a760f7260b02c9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 11 Jan 2024 01:41:13 +0100 Subject: [PATCH 07/40] Debug v19 --- htdocs/modulebuilder/index.php | 3 ++- .../{functionnal => functional}/MyModuleFunctionalTest.php | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename htdocs/modulebuilder/template/test/phpunit/{functionnal => functional}/MyModuleFunctionalTest.php (100%) diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index fe5d5f42362..2b5e6ba6fc8 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -280,6 +280,7 @@ if ($dirins && $action == 'initmodule' && $modulename) { } // Delete dir and files that can be generated in sub tabs later if we need them (we want a minimal module first) + dol_delete_dir_recursive($destdir.'/ajax'); dol_delete_dir_recursive($destdir.'/build/doxygen'); dol_delete_dir_recursive($destdir.'/core/modules/mailings'); dol_delete_dir_recursive($destdir.'/core/modules/'.strtolower($modulename)); @@ -311,7 +312,7 @@ if ($dirins && $action == 'initmodule' && $modulename) { dol_delete_file($destdir.'/myobject_agenda.php'); dol_delete_file($destdir.'/myobject_list.php'); dol_delete_file($destdir.'/lib/'.strtolower($modulename).'_myobject.lib.php'); - dol_delete_file($destdir.'/test/phpunit/functionnal/'.$modulename.'FunctionnalTest.php'); + dol_delete_file($destdir.'/test/phpunit/functional/'.$modulename.'FunctionalTest.php'); dol_delete_file($destdir.'/test/phpunit/MyObjectTest.php'); dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject.sql'); dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject_extrafields.sql'); diff --git a/htdocs/modulebuilder/template/test/phpunit/functionnal/MyModuleFunctionalTest.php b/htdocs/modulebuilder/template/test/phpunit/functional/MyModuleFunctionalTest.php similarity index 100% rename from htdocs/modulebuilder/template/test/phpunit/functionnal/MyModuleFunctionalTest.php rename to htdocs/modulebuilder/template/test/phpunit/functional/MyModuleFunctionalTest.php From 11f457ddc89d247e677dabd246f6240708728732 Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 11 Jan 2024 10:47:05 +0100 Subject: [PATCH 08/40] # Fix: remove parameter in getSelectInvoiceSubtype call (#27314) Parameters were already invalid when this was added in 65b9f4e6defe. See https://github.com/Dolibarr/dolibarr/blob/65b9f4e6defede20d488e62f11083c4c0ef5d20b/htdocs/core/class/html.form.class.php#L10865C59-L10865C59 . --- htdocs/compta/facture/card-rec.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index d4690561632..bb3c6938396 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -1006,7 +1006,7 @@ if ($action == 'create') { // Invoice subtype if (getDolGlobalInt('INVOICE_SUBTYPE_ENABLED')) { print "".$langs->trans("InvoiceSubtype").""; - print $form->getSelectInvoiceSubtype(GETPOSTISSET('subtype') ? GETPOST('subtype') : $object->subtype, 'subtype', -1, 0, 0, ''); + print $form->getSelectInvoiceSubtype(GETPOSTISSET('subtype') ? GETPOST('subtype') : $object->subtype, 'subtype', 0, 0, ''); print ""; } From f2669da370beada6023cbbe0ab84f826f29fdfa3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 11 Jan 2024 13:41:38 +0100 Subject: [PATCH 09/40] Debug v19 --- htdocs/langs/en_US/stripe.lang | 1 + htdocs/salaries/virement_request.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/stripe.lang b/htdocs/langs/en_US/stripe.lang index 0beab57f2e3..239c1cf0345 100644 --- a/htdocs/langs/en_US/stripe.lang +++ b/htdocs/langs/en_US/stripe.lang @@ -75,5 +75,6 @@ CreationOfPaymentModeMustBeDoneFromStripeInterface=Due to Strong Customer Authen STRIPE_CARD_PRESENT=Card Present for Stripe Terminals TERMINAL_LOCATION=Location (address) for Stripe Terminals RequestDirectDebitWithStripe=Request Direct Debit with Stripe +RequesCreditTransferWithStripe=Request Credit Transfer with Stripe STRIPE_SEPA_DIRECT_DEBIT=Enable the Direct Debit payments through Stripe StripeConnect_Mode=Stripe Connect mode \ No newline at end of file diff --git a/htdocs/salaries/virement_request.php b/htdocs/salaries/virement_request.php index f51af45622c..59f82b9880f 100644 --- a/htdocs/salaries/virement_request.php +++ b/htdocs/salaries/virement_request.php @@ -613,7 +613,7 @@ if ($resql) { print $withdrawreceipt->getNomUrl(1); } - if ($type != 'bank-transfer') { + if (!in_array($type, array('bank-transfer', 'salaire', 'salary'))) { if (getDolGlobalString('STRIPE_SEPA_DIRECT_DEBIT')) { $langs->load("stripe"); if ($obj->fk_prelevement_bons > 0) { @@ -627,7 +627,7 @@ if ($resql) { if ($obj->fk_prelevement_bons > 0) { print '   '; } - print 'rowid.'&id='.$object->id.'&type='.urlencode($type).'">'.img_picto('', 'stripe', 'class="pictofixedwidth"').$langs->trans("RequestDirectDebitWithStripe").''; + print 'rowid.'&id='.$object->id.'&type='.urlencode($type).'">'.img_picto('', 'stripe', 'class="pictofixedwidth"').$langs->trans("RequesCreditTransferWithStripe").''; } } print ''; From 3e7cf0a463bc6f686d8beacf77663b149538526e Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Fri, 12 Jan 2024 16:14:15 +0100 Subject: [PATCH 10/40] fix pdf nbpages (#27457) Co-authored-by: Christophe Battarel --- htdocs/core/lib/pdf.lib.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 95fc3b34f89..de788b67583 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1306,10 +1306,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ // Show page nb only on iso languages (so default Helvetica font) // if (strtolower(pdf_getPDFFont($outputlangs)) == 'helvetica') { $pdf->SetXY($dims['wk'] - $dims['rm'] - 18 - getDolGlobalInt('PDF_FOOTER_PAGE_NUMBER_X', 0), -$posy - getDolGlobalInt('PDF_FOOTER_PAGE_NUMBER_Y', 0)); - // $pdf->MultiCell(18, 2, $pdf->getPageNumGroupAlias().' / '.$pdf->getPageGroupAlias(), 0, 'R', 0); - // $pdf->MultiCell(18, 2, $pdf->PageNo().' / '.$pdf->getAliasNbPages(), 0, 'R', 0); // doesn't works with all fonts - // $pagination = $pdf->getAliasNumPage().' / '.$pdf->getAliasNbPages(); // works with $pdf->Cell - $pagination = $pdf->PageNo().' / '.$pdf->getNumPages(); + $pagination = $pdf->PageNo().' / '.$pdf->getAliasNbPages(); $pdf->MultiCell(18, 2, $pagination, 0, 'R', 0); // } From 4374aa1a205d57b13fc655c8616b8f7a7df936a9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 Jan 2024 16:31:49 +0100 Subject: [PATCH 11/40] FIX Bad visible status of proposal after reopen --- htdocs/comm/propal/card.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 205eab09655..8ad14f7f48b 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -780,10 +780,14 @@ if (empty($reshook)) { if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED) { $db->begin(); - $result = $object->reopen($user, empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE)); + $newstatus = (getDolGlobalInt('PROPAL_SKIP_ACCEPT_REFUSE') ? Propal::STATUS_DRAFT : Propal::STATUS_VALIDATED); + $result = $object->reopen($user, $newstatus); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; + } else { + $object->statut = $newstatus; + $object->status = $newstatus; } if (!$error) { From f03eb1f505ab6b8918d90d0ed7d569a8de3d2ce4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 Jan 2024 16:47:09 +0100 Subject: [PATCH 12/40] Fix restore old code due to regression on some lang. Add hidden PDF_USE_GETALIASNBPAGE_FOR_TOTAL for the case it bugs --- htdocs/core/lib/pdf.lib.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index de788b67583..9dfae331e51 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1304,11 +1304,16 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ } } // Show page nb only on iso languages (so default Helvetica font) - // if (strtolower(pdf_getPDFFont($outputlangs)) == 'helvetica') { - $pdf->SetXY($dims['wk'] - $dims['rm'] - 18 - getDolGlobalInt('PDF_FOOTER_PAGE_NUMBER_X', 0), -$posy - getDolGlobalInt('PDF_FOOTER_PAGE_NUMBER_Y', 0)); - $pagination = $pdf->PageNo().' / '.$pdf->getAliasNbPages(); - $pdf->MultiCell(18, 2, $pagination, 0, 'R', 0); - // } + $pdf->SetXY($dims['wk'] - $dims['rm'] - 18 - getDolGlobalInt('PDF_FOOTER_PAGE_NUMBER_X', 0), -$posy - getDolGlobalInt('PDF_FOOTER_PAGE_NUMBER_Y', 0)); + + if (getDolGlobalString('PDF_USE_GETALIASNBPAGE_FOR_TOTAL')) { + // $pagination = $pdf->getAliasNumPage().' / '.$pdf->getAliasNbPages(); // works with $pdf->Cell + $pagination = $pdf->PageNo().' / '.$pdf->getAliasNbPages(); // seems to not works with all fonts like ru_UK + } else { + $pagination = $pdf->PageNo().' / '.$pdf->getNumPages(); // seems to always work even with $pdf->Cell. But some users has reported wrong nb (no way to reproduce) + } + + $pdf->MultiCell(18, 2, $pagination, 0, 'R', 0); // Show Draft Watermark if (!empty($watermark)) { From 5df2850dca80b77399cd1f7b0600aae2dbcda93e Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 12 Jan 2024 16:49:30 +0100 Subject: [PATCH 13/40] FIX Accountancy - Level 3 of binding not working on supplier side (#27462) --- htdocs/accountancy/class/accountingaccount.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 98d58450e7b..d25025f3c76 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2021 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2013-2021 Florian Henry * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2015 Ari Elbaz (elarifr) @@ -865,10 +865,14 @@ class AccountingAccount extends CommonObject // Level 3 (define $code_t): Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding) if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) { - if (!empty($buyer->code_compta_product)) { + if ($type == 'customer' && !empty($buyer->code_compta_product)) { $code_t = $buyer->code_compta_product; $suggestedid = $accountingAccount['thirdparty']; $suggestedaccountingaccountfor = 'thirdparty'; + } elseif ($type == 'supplier' && !empty($seller->code_compta_product)) { + $code_t = $seller->code_compta_product; + $suggestedid = $accountingAccount['thirdparty']; + $suggestedaccountingaccountfor = 'thirdparty'; } } From 58cf5609cab7ede04eaed3803d4a4d79bf870487 Mon Sep 17 00:00:00 2001 From: John BOTELLA Date: Fri, 12 Jan 2024 17:03:57 +0100 Subject: [PATCH 14/40] FIX php 8.2 warning (#27465) * fix php 8.2 warning * Fix warning --- htdocs/core/menus/standard/eldy.lib.php | 4 ++-- .../interface_50_modBlockedlog_ActionsBlockedLog.class.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 94c4d961750..5b62e9edcc9 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -738,8 +738,8 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu = $menu; - $mainmenu = ($forcemainmenu ? $forcemainmenu : $_SESSION["mainmenu"]); - $leftmenu = ($forceleftmenu ? '' : (empty($_SESSION["leftmenu"]) ? 'none' : $_SESSION["leftmenu"])); + $mainmenu = ($forcemainmenu ? $forcemainmenu : $_SESSION["mainmenu"]??''); + $leftmenu = ($forceleftmenu ? '' : (empty($_SESSION["leftmenu"]) ? 'none' : $_SESSION["leftmenu"]??'')); if (is_null($mainmenu)) { $mainmenu = 'home'; diff --git a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php index a515078bc70..87a46036fc9 100644 --- a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php +++ b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php @@ -67,7 +67,7 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers if (!getDolGlobalString('BLOCKEDLOG_ADD_ACTIONS_SUPPORTED') || !in_array($action, explode(',', getDolGlobalString('BLOCKEDLOG_ADD_ACTIONS_SUPPORTED')))) { // If custom actions are not set or if action not into custom actions, we can exclude action if object->elementis not valid $listofqualifiedelement = array('facture', 'don', 'payment', 'payment_donation', 'subscription', 'payment_various', 'cashcontrol'); - if (!in_array($object->element, $listofqualifiedelement)) { + if (!is_object($object) || !property_exists($object, 'element') || !in_array($object->element, $listofqualifiedelement)) { return 1; } } From 1c86073a9eae6f342008be77463ea8f5aa05f285 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 Jan 2024 17:06:22 +0100 Subject: [PATCH 15/40] Fix phpcs --- htdocs/core/class/extrafields.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index eb5f3e45f7a..5d28ea7501e 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1598,7 +1598,7 @@ class ExtraFields } else if ( $element == 'projet' ) { $element = 'project'; } - + //$out = $form->selectForForms($param_list[0], $keyprefix.$key.$keysuffix, $value, $showempty, '', '', $morecss, '', 0, 0, ''); $out = $form->selectForForms($tmparray[0], $keyprefix.$key.$keysuffix, $value, $showempty, '', '', $morecss, '', 0, 0, '', $element.':options_'.$key); } elseif ($type == 'password') { From 13ddcb95527d68df15acc195d33bfe88f29f38fd Mon Sep 17 00:00:00 2001 From: HENRY Florian Date: Fri, 12 Jan 2024 18:04:00 +0100 Subject: [PATCH 16/40] fix: filter on date lost on sort (#27467) --- htdocs/comm/action/list.php | 48 ++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 3305b44af46..0b0c8cb496f 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -345,41 +345,41 @@ if ($search_title != '') { if ($search_note != '') { $param .= '&search_note='.urlencode($search_note); } -if (GETPOST('datestartday_dtstart', 'int')) { - $param .= '&datestartday_dtstart='.GETPOST('datestartday_dtstart', 'int'); +if (GETPOST('datestart_dtstartday', 'int')) { + $param .= '&datestart_dtstartday='.GETPOST('datestart_dtstartday', 'int'); } -if (GETPOST('datestartmonth_dtstart', 'int')) { - $param .= '&datestartmonth_dtstart='.GETPOST('datestartmonth_dtstart', 'int'); +if (GETPOST('datestart_dtstartmonth', 'int')) { + $param .= '&datestart_dtstartmonth='.GETPOST('datestart_dtstartmonth', 'int'); } -if (GETPOST('datestartyear_dtstart', 'int')) { - $param .= '&datestartyear_dtstart='.GETPOST('datestartyear_dtstart', 'int'); +if (GETPOST('datestart_dtstartyear', 'int')) { + $param .= '&datestart_dtstartyear='.GETPOST('datestart_dtstartyear', 'int'); } -if (GETPOST('datestartday_dtend', 'int')) { - $param .= '&datestartday_dtend='.GETPOST('datestartday_dtend', 'int'); +if (GETPOST('datestart_dtendday', 'int')) { + $param .= '&datestart_dtendday='.GETPOST('datestart_dtendday', 'int'); } -if (GETPOST('datestartmonth_dtend', 'int')) { - $param .= '&datestartmonth_dtend='.GETPOST('datestartmonth_dtend', 'int'); +if (GETPOST('datestart_dtendmonth', 'int')) { + $param .= '&datestart_dtendmonth='.GETPOST('datestart_dtendmonth', 'int'); } -if (GETPOST('datestartyear_dtend', 'int')) { - $param .= '&datestartyear_dtend='.GETPOST('datestartyear_dtend', 'int'); +if (GETPOST('datestart_dtendyear', 'int')) { + $param .= '&datestart_dtendyear='.GETPOST('datestart_dtendyear', 'int'); } -if (GETPOST('dateendday_dtstart', 'int')) { - $param .= '&dateendday_dtstart='.GETPOST('dateendday_dtstart', 'int'); +if (GETPOST('dateend_dtstartday', 'int')) { + $param .= '&dateend_dtstartday='.GETPOST('dateend_dtstartday', 'int'); } -if (GETPOST('dateendmonth_dtstart', 'int')) { - $param .= '&dateendmonth_dtstart='.GETPOST('dateendmonth_dtstart', 'int'); +if (GETPOST('dateend_dtstartmonth', 'int')) { + $param .= '&dateend_dtstartmonth='.GETPOST('dateend_dtstartmonth', 'int'); } -if (GETPOST('dateendyear_dtstart', 'int')) { - $param .= '&dateendyear_dtstart='.GETPOST('dateendyear_dtstart', 'int'); +if (GETPOST('dateend_dtstartyear', 'int')) { + $param .= '&dateend_dtstartyear='.GETPOST('dateend_dtstartyear', 'int'); } -if (GETPOST('dateendday_dtend', 'int')) { - $param .= '&dateendday_dtend='.GETPOST('dateendday_dtend', 'int'); +if (GETPOST('dateend_dtendday', 'int')) { + $param .= '&dateend_dtendday='.GETPOST('dateend_dtendday', 'int'); } -if (GETPOST('dateendmonth_dtend', 'int')) { - $param .= '&dateendmonth_dtend='.GETPOST('dateendmonth_dtend', 'int'); +if (GETPOST('dateend_dtendmonth', 'int')) { + $param .= '&dateend_dtendmonth='.GETPOST('dateend_dtendmonth', 'int'); } -if (GETPOST('dateendyear_dtend', 'int')) { - $param .= '&dateendyear_dtend='.GETPOST('dateendyear_dtend', 'int'); +if (GETPOST('dateend_dtendyear', 'int')) { + $param .= '&dateend_dtendyear='.GETPOST('dateend_dtendyear', 'int'); } if ($optioncss != '') { $param .= '&optioncss='.urlencode($optioncss); From 11d6b891fa9a0f0435866d89fdbef0e52a7a4639 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 Jan 2024 21:36:29 +0100 Subject: [PATCH 17/40] FIX SQL error --- htdocs/multicurrency/multicurrency_rate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/multicurrency/multicurrency_rate.php b/htdocs/multicurrency/multicurrency_rate.php index 4164a99cb6b..02c37bca890 100644 --- a/htdocs/multicurrency/multicurrency_rate.php +++ b/htdocs/multicurrency/multicurrency_rate.php @@ -357,7 +357,7 @@ $sql .= " WHERE m.code <> '".$db->escape($conf->currency)."'"; $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; -$sql .= " GROUP BY cr.rowid, cr.date_sync, cr.rate, m.code, cr.entity, m.code, m.name"; +$sql .= " GROUP BY cr.rowid, cr.date_sync, cr.rate, cr.rate_indirect, m.code, cr.entity, m.code, m.name"; // Add fields from hooks $parameters = array(); From a88ba91d975f5098902de9e42a21594baf8d7b65 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 Jan 2024 21:49:49 +0100 Subject: [PATCH 18/40] Fix look and feel v19 --- htdocs/multicurrency/multicurrency_rate.php | 92 +++++++++++++++------ 1 file changed, 66 insertions(+), 26 deletions(-) diff --git a/htdocs/multicurrency/multicurrency_rate.php b/htdocs/multicurrency/multicurrency_rate.php index 02c37bca890..80c3a678aa0 100644 --- a/htdocs/multicurrency/multicurrency_rate.php +++ b/htdocs/multicurrency/multicurrency_rate.php @@ -477,6 +477,13 @@ if ($resql) { // Lines with input filters print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print ''; + } // date if (!empty($arrayfields['cr.date_sync']['checked'])) { print ''; @@ -502,14 +509,20 @@ if ($resql) { $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - print ''; - $searchpicto = $form->showFilterButtons(); - print $searchpicto; - print ''; - + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print ''; + } print ''; print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch center '); + } if (!empty($arrayfields['cr.date_sync']['checked'])) { print_liste_field_titre($arrayfields['cr.date_sync']['label'], $_SERVER["PHP_SELF"], "cr.date_sync", "", $param, "", $sortfield, $sortorder); } @@ -524,8 +537,10 @@ if ($resql) { $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - - print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch center '); + } print "\n"; $i = 0; @@ -537,18 +552,41 @@ if ($resql) { // USER REQUEST UPDATE FOR THIS LINE if ($action == "updateRate" && $obj->rowid == $id_rate_selected) { - // var_dump($obj); - print ' '; + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + print ''; + } + print ''; print '' . $form->selectMultiCurrency($obj->code, 'multicurrency_code', 1, " code != '".$conf->currency."'", true) . ''; - print ' '; - - print ''; + print ''; print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + print ''; + } } else { + // Action + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } + print 'rowid.'">'.img_picto('edit', 'edit').''; + print 'rowid.'">'.img_picto('delete', 'delete').''; + print ''; + } + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // date_sync if (!empty($arrayfields['cr.date_sync']['checked'])) { print ''; @@ -598,19 +636,21 @@ if ($resql) { print $hookmanager->resPrint; // Action - print ''; - if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) { - $selected = 1; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } + print 'rowid.'">'.img_picto('edit', 'edit').''; + print 'rowid.'">'.img_picto('delete', 'delete').''; + print ''; + } + print ''; + if (!$i) { + $totalarray['nbfield']++; } - print 'rowid.'">'.img_picto('edit', 'edit').''; - print 'rowid.'">'.img_picto('delete', 'delete').''; - print ''; - } - print ''; - if (!$i) { - $totalarray['nbfield']++; } print "\n"; From 8ef27e6ed26f46316f93eb7905c7cdfb4671535e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 Jan 2024 21:51:22 +0100 Subject: [PATCH 19/40] FIX Filter on rate --- htdocs/multicurrency/multicurrency_rate.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/multicurrency/multicurrency_rate.php b/htdocs/multicurrency/multicurrency_rate.php index 80c3a678aa0..a2e52847407 100644 --- a/htdocs/multicurrency/multicurrency_rate.php +++ b/htdocs/multicurrency/multicurrency_rate.php @@ -78,7 +78,6 @@ if (!$sortorder) { $sortorder = "DESC"; } - // Initialize technical objects $object = new CurrencyRate($db); $form = new Form($db); @@ -346,7 +345,7 @@ if ($search_date_sync && $search_date_sync_end) { $sql .= natural_search('cr.date_sync', $db->idate($search_date_sync)); } if ($search_rate) { - $sql .= natural_search('cr.rate', $search_rate); + $sql .= natural_search('cr.rate', $search_rate, 1); } if ($search_code) { $sql .= natural_search('m.code', $search_code); From d8db27eac16ca4ed73c482a3dfc2a98a50d2ae85 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 Jan 2024 21:53:50 +0100 Subject: [PATCH 20/40] Debug v19 --- htdocs/multicurrency/multicurrency_rate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/multicurrency/multicurrency_rate.php b/htdocs/multicurrency/multicurrency_rate.php index a2e52847407..94c0438f71e 100644 --- a/htdocs/multicurrency/multicurrency_rate.php +++ b/htdocs/multicurrency/multicurrency_rate.php @@ -40,7 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/multicurrency.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('multicurrency')); +$langs->loadLangs(array('admin', 'multicurrency')); // Get Parameters $action = GETPOST('action', 'alpha'); From 7d16aa462649348b445af63915b44a0a9b63fd8a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 Jan 2024 22:01:50 +0100 Subject: [PATCH 21/40] Fix bad constant --- htdocs/salaries/virement_request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/salaries/virement_request.php b/htdocs/salaries/virement_request.php index 59f82b9880f..463ebaa4549 100644 --- a/htdocs/salaries/virement_request.php +++ b/htdocs/salaries/virement_request.php @@ -104,7 +104,7 @@ if ($id > 0 || !empty($ref)) { $permissiontoread = $user->rights->salaries->read; $permissiontoadd = $user->rights->salaries->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles -$permissiontodelete = $user->rights->salaries->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); +$permissiontodelete = $user->rights->salaries->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_UNPAID); $moreparam = ''; if ($type == 'bank-transfer') { From 4cf06431ff2d2b66568649b138d9b4111f1804d3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 Jan 2024 22:30:30 +0100 Subject: [PATCH 22/40] Fix template --- .../containers/page249.tpl.php | 14 +++++++------- .../website_template-restaurant/website_pages.sql | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page249.tpl.php b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page249.tpl.php index 8742e231c27..faf8513d064 100644 --- a/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page249.tpl.php +++ b/htdocs/install/doctemplates/websites/website_template-restaurant/containers/page249.tpl.php @@ -33,7 +33,7 @@ ob_start(); -
- +
@@ -90,8 +90,8 @@ if (GETPOST('action') == 'sendmail') { role="form" > - - + +
$day : " .getDolGlobalString("MAIN_INFO_OPENINGHOURS_$day") ."

"; + echo "

$day : " .getDolGlobalString("MAIN_INFO_OPENINGHOURS_$day") ."

"; } ?>
@@ -184,7 +184,7 @@ if (GETPOST('action') == 'sendmail') {


- +

getFullAddress() ?>

@@ -201,7 +201,7 @@ if (GETPOST('action') == 'sendmail') { - + __N__
__N____N__
__N____N____N____N____N__', '', 0); +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(2__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'contact', '', 'Contact us', '', '', '', '', '1', '2022-08-16 14:40:51', '2022-11-20 14:50:10', null, '', 'page', '', '__N__email;__N__ $message = GETPOST(\'message\', \'alpha\');__N__ $cmail = new CMailFile(\'Contact from website\', $to, $from, $message);__N__ if ($cmail->sendfile()) {__N__ ?>__N__ __N__ trans(\"ErrorFailedToSendMail\", $from, $to).\'. \'.$cmail->error;__N__ }__N__}__N__?>__N____N____N____N____N__
__N__
__N__
__N__
__N__
__N__
__N__

Say Hi

__N____N__ We are happy to get in touch with you__N__
__N__
__N__
__N____N__
__N__
__N____N__
__N__ __N__
__N__
__N__
__N__
__N__

Leave a message

__N__
__N____N__
__N__ __N__ __N__ \">__N__ __N__
__N__
__N____N__
__N__ trans(\"Phone\"); ?>__N____N__ __N__
__N____N__
__N__ trans(\"Email\"); ?>__N____N__ __N____N__ trans(\"Message\"); ?>__N____N__ __N__
__N____N__
__N__ __N__
__N__ __N__
__N____N__
__N__
Weekdays
__N____N__
__N__ $day : \" .getDolGlobalString(\"MAIN_INFO_OPENINGHOURS_$day\") .\"

\"; __N__ }__N__ ?>__N__
__N____N__
Weekends
__N____N__
__N__

Saturday and Sunday

__N____N__

to be determined !

__N__
__N__
__N____N__
__N__

__N__ __N__

__N__ getFullAddress() ?>__N__

__N____N__ __N__
__N__
__N__ __N__
__N__
__N__
__N__
__N__
__N__
__N____N____N__ __N__ __N__ __N__
__N__
__N__
__N__

Reserve a table

__N____N__ __N__
__N____N__ __N__
__N__ __N__ \" />__N__ __N__
__N__
__N____N__
__N__
__N____N__
__N__
__N____N__
__N__
__N____N__
__N__
__N____N__
__N__
__N____N__
__N__
__N____N__
__N__ __N__
__N__ __N__
__N__
__N____N__
__N__
__N__ __N__ __N____N__
__N____N____N____N____N__', '', 0); -- File generated by Dolibarr 17.0.0-beta -- 2022-11-20 14:10:56 UTC --; -- Page ID 252 -> 3__+MAX_llx_website_page__ - Aliases footer --; INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(3__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'footer', '', 'Footer', '', '', '', '', '1', '2022-11-20 12:51:50', '2022-11-20 14:07:39', null, '', 'other', '', '__N__
__N__ __N__ __N__
__N__', '', 0); From b053b55e2fec74ccc2fbffae5957163cde1414ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 13 Jan 2024 11:15:17 +0100 Subject: [PATCH 23/40] FIX link to print when there is a search on multiselect fields --- htdocs/main.inc.php | 17 ++++++++++++++--- htdocs/product/stock/stockatdate.php | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 2690ad2af84..0895077bc18 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2158,14 +2158,25 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead $toprightmenu .= $form->textwithtooltip('', $langs->trans("ModuleBuilder"), 2, 1, $text, 'login_block_elem', 2); } - // Link to print main content area + // Link to print main content area (optioncss=print) if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $qs = dol_escape_htmltag($_SERVER["QUERY_STRING"]); if (isset($_POST) && is_array($_POST)) { foreach ($_POST as $key => $value) { - if ($key !== 'action' && $key !== 'password' && !is_array($value)) { - $qs .= '&'.$key.'='.urlencode($value); + if (in_array($key, array('action', 'massaction', 'password'))) { + continue; + } + if (!is_array($value)) { + if ($value !== '') { + $qs .= '&'.$key.'='.urlencode($value); + } + } else { + foreach ($value as $value2) { + if ($value2 !== '') { + $qs .= '&'.$key.'[]='.urlencode($value2); + } + } } } } diff --git a/htdocs/product/stock/stockatdate.php b/htdocs/product/stock/stockatdate.php index bfc3b92b2a9..1503e439749 100644 --- a/htdocs/product/stock/stockatdate.php +++ b/htdocs/product/stock/stockatdate.php @@ -427,7 +427,7 @@ if (!empty($search_fk_warehouse)) { } } if ($productid > 0) { - $param .= '&productid='.$productid; + $param .= '&productid='.(int) $productid; } if (GETPOST('dateday', 'int') > 0) { $param .= '&dateday='.GETPOST('dateday', 'int'); From 2de0c09e8ea60d370052f292855ab579cfcaf3ab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 13 Jan 2024 15:44:37 +0100 Subject: [PATCH 24/40] Try a better fix for #27477 --- htdocs/core/class/html.form.class.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c9c3e09f634..783f3afef74 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2247,7 +2247,7 @@ class Form * @param int|string $filtertype Filter on product type (''=nofilter, 0=product, 1=service) * @param int $limit Limit on number of returned lines * @param int $price_level Level of price to show - * @param int $status Sell status -1=Return all products, 0=Products not on sell, 1=Products on sell + * @param int $status Sell status: -1=No filter on sell status, 0=Products not on sell, 1=Products on sell * @param int $finished 2=all, 1=finished, 0=raw material * @param string $selected_input_value Value of preselected input text (for use with ajax) * @param int $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after) @@ -2263,7 +2263,7 @@ class Form * 'warehouseinternal' = count products from warehouses for internal correct/transfer only * @param array $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...]) * @param string $nooutput No print, return the output into a string - * @param int $status_purchase Purchase status -1=Return all products, 0=Products not on purchase, 1=Products on purchase + * @param int $status_purchase Purchase status: -1=No filter on purchase status, 0=Products not on purchase, 1=Products on purchase * @return void|string */ public function select_produits($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 0, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = null, $nooutput = 0, $status_purchase = -1) @@ -2638,10 +2638,8 @@ class Form $sql .= " AND p.finished = ".((int) $finished); } elseif ($finished == 1) { $sql .= " AND p.finished = ".((int) $finished); - if ($status >= 0) { - $sql .= " AND p.tosell = ".((int) $status); - } - } elseif ($status >= 0) { + } + if ($status >= 0) { $sql .= " AND p.tosell = ".((int) $status); } if ($status_purchase >= 0) { From 6ac9b959d75045be41c687e0aa65f2b4e3c29657 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sat, 13 Jan 2024 15:48:54 +0100 Subject: [PATCH 25/40] Accountancy - Add help url everywhere (#27480) Co-authored-by: Laurent Destailleur --- htdocs/accountancy/admin/account.php | 10 +++++---- htdocs/accountancy/admin/accountmodel.php | 6 +++-- htdocs/accountancy/admin/card.php | 4 ++-- htdocs/accountancy/admin/categories.php | 6 +++-- htdocs/accountancy/admin/categories_list.php | 8 ++++--- htdocs/accountancy/admin/closure.php | 8 +++++-- htdocs/accountancy/admin/defaultaccounts.php | 6 +++-- htdocs/accountancy/admin/export.php | 6 ++--- htdocs/accountancy/admin/fiscalyear.php | 4 ++-- htdocs/accountancy/admin/fiscalyear_card.php | 4 ++-- htdocs/accountancy/admin/fiscalyear_info.php | 4 ++-- htdocs/accountancy/admin/index.php | 22 +++++++++---------- htdocs/accountancy/admin/journals_list.php | 7 +++--- htdocs/accountancy/admin/productaccount.php | 16 +++++++------- htdocs/accountancy/admin/subaccount.php | 8 +++---- htdocs/accountancy/bookkeeping/balance.php | 6 +++-- htdocs/accountancy/bookkeeping/card.php | 6 ++--- htdocs/accountancy/bookkeeping/export.php | 5 +++-- htdocs/accountancy/bookkeeping/list.php | 6 ++--- .../accountancy/bookkeeping/listbyaccount.php | 6 ++--- htdocs/accountancy/closure/index.php | 2 +- htdocs/accountancy/customer/card.php | 9 ++++---- htdocs/accountancy/customer/index.php | 3 ++- htdocs/accountancy/customer/lines.php | 4 +++- htdocs/accountancy/customer/list.php | 6 +++-- htdocs/accountancy/expensereport/card.php | 18 ++++++++------- htdocs/accountancy/expensereport/index.php | 5 +++-- htdocs/accountancy/expensereport/lines.php | 6 +++-- htdocs/accountancy/expensereport/list.php | 8 ++++--- htdocs/accountancy/index.php | 2 +- htdocs/accountancy/supplier/card.php | 6 +++-- htdocs/accountancy/supplier/index.php | 11 +++++----- htdocs/accountancy/supplier/lines.php | 6 +++-- htdocs/accountancy/supplier/list.php | 8 ++++--- 34 files changed, 140 insertions(+), 102 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 6f36d04d7b9..8c878e1b162 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -1,7 +1,7 @@ - * Copyright (C) 2013-2023 Alexandre Spangaro - * Copyright (C) 2016-2018 Laurent Destailleur +/* Copyright (C) 2013-2016 Olivier Geffroy + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2016-2018 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -226,7 +226,9 @@ if (empty($reshook)) { $form = new Form($db); $formaccounting = new FormAccounting($db); -llxHeader('', $langs->trans("ListAccounts")); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $langs->trans("ListAccounts"), $help_url); if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1); diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 456b1503ca7..2a0b1f5fca2 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -8,7 +8,7 @@ * Copyright (C) 2011 Remy Younes * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2011-2016 Alexandre Spangaro + * Copyright (C) 2011-2024 Alexandre Spangaro * Copyright (C) 2015 Ferran Marcet * Copyright (C) 2016 Raphaël Doursenaud * @@ -401,7 +401,9 @@ if ($action == 'disable_favorite') { $form = new Form($db); $formadmin = new FormAdmin($db); -llxHeader(); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $langs->trans("Pcg_version"), $help_url); $titre = $langs->trans($tablib[$id]); $linkback = ''; diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 48d7d86e89f..2f7f90e84d0 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2020 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * * This program is free software; you can redistribute it and/or modify @@ -215,7 +215,7 @@ $accountsystem->fetch(getDolGlobalInt('CHARTOFACCOUNTS')); $title = $langs->trans('AccountAccounting')." - ".$langs->trans('Card'); -$help_url = 'EN:Category:Accounting'; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; llxheader('', $title, $help_url); diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index 014de28bcf3..abc45763361 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -1,6 +1,6 @@ - * Copyright (C) 2017-2022 Alexandre Spangaro + * Copyright (C) 2017-2024 Alexandre Spangaro * Copyright (C) 2022 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -113,7 +113,9 @@ if ($action == 'delete') { $form = new Form($db); $formaccounting = new FormAccounting($db); -llxheader('', $langs->trans('AccountingCategory')); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxheader('', $langs->trans('AccountingCategory'), $help_url); $linkback = ''.$langs->trans("BackToList").''; $titlepicto = 'setup'; diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 66f411c8cca..3fa664f5421 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011-2021 Alexandre Spangaro +/* Copyright (C) 2004-2023 Laurent Destailleur + * Copyright (C) 2011-2024 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -414,7 +414,9 @@ if ($action == 'disable_favorite') { $form = new Form($db); $formadmin = new FormAdmin($db); -llxHeader('', $langs->trans('DictionaryAccountancyCategory')); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $langs->trans('DictionaryAccountancyCategory'), $help_url); $titre = $langs->trans($tablib[$id]); $linkback = ''; diff --git a/htdocs/accountancy/admin/closure.php b/htdocs/accountancy/admin/closure.php index faf5360c984..1979b666051 100644 --- a/htdocs/accountancy/admin/closure.php +++ b/htdocs/accountancy/admin/closure.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2019-2024 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -101,7 +101,11 @@ if ($action == 'update') { $form = new Form($db); $formaccounting = new FormAccounting($db); -llxHeader(); +$title = $langs->trans('Closure'); + +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $title, $help_url); $linkback = ''; print load_fiche_titre($langs->trans('MenuClosureAccounts'), $linkback, 'title_accountancy'); diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 48e4181b8e5..3eace908373 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2023 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent @@ -198,7 +198,9 @@ if ($action == 'setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT') { $form = new Form($db); $formaccounting = new FormAccounting($db); -llxHeader(); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $langs->trans('MenuDefaultAccounts'), $help_url); $linkback = ''; print load_fiche_titre($langs->trans('MenuDefaultAccounts'), $linkback, 'title_accountancy'); diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 70dd216b7c9..902b184a48c 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2022 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent @@ -134,9 +134,9 @@ if ($action == 'update') { $form = new Form($db); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; $title = $langs->trans('ExportOptions'); -llxHeader('', $title); - +llxHeader('', $title, $help_url); $linkback = ''; // $linkback = '' . $langs->trans("BackToModuleList") . ''; diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 4cbb6045d74..cb142948096 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2013-2024 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -87,7 +87,7 @@ $fiscalyearstatic = new Fiscalyear($db); $title = $langs->trans('AccountingPeriods'); -$help_url = "EN:Module_Double_Entry_Accounting"; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; llxHeader('', $title, $help_url); diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 914bc34ccb6..ee587a31f96 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2024 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -181,7 +181,7 @@ if ($action == 'create') { $title = $langs->trans("NewFiscalYear"); } -$help_url = "EN:Module_Double_Entry_Accounting"; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; llxHeader('', $title, $help_url); diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php index 918a5b22db1..39754c0345d 100644 --- a/htdocs/accountancy/admin/fiscalyear_info.php +++ b/htdocs/accountancy/admin/fiscalyear_info.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2024 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -45,7 +45,7 @@ $id = GETPOST('id', 'int'); $title = $langs->trans("Fiscalyear")." - ".$langs->trans("Info"); -$help_url = "EN:Module_Double_Entry_Accounting"; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; llxHeader('', $title, $help_url); diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index acff0845286..636026e526c 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -1,13 +1,13 @@ - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2023 Alexandre Spangaro - * Copyright (C) 2014-2015 Ari Elbaz (elarifr) - * Copyright (C) 2014 Marcos García - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2017 Laurent Destailleur - * Copyright (C) 2021 Ferran Marcet +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2014-2015 Ari Elbaz (elarifr) + * Copyright (C) 2014 Marcos García + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2017 Laurent Destailleur + * Copyright (C) 2021 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -275,8 +275,8 @@ if ($action == 'setenablevatreversecharge') { $form = new Form($db); $title = $langs->trans('ConfigAccountingExpert'); - -llxHeader('', $title); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; +llxHeader('', $title, $help_url); $linkback = ''; diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index c1ad8bdb0c5..5c739dbc2dd 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017-2024 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -351,7 +351,9 @@ if ($action == $acts[1]) { $form = new Form($db); $formadmin = new FormAdmin($db); -llxHeader(); +$title = $langs->trans('AccountingJournals'); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; +llxHeader('', $title, $help_url); $titre = $langs->trans("DictionarySetup"); $linkback = ''; @@ -367,7 +369,6 @@ print load_fiche_titre($titre, $linkback, $titlepicto); if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1); } -//var_dump($elementList); /* * Show a dictionary diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index ca5516547ec..903375f5920 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -1,10 +1,10 @@ - * Copyright (C) 2013-2022 Alexandre Spangaro - * Copyright (C) 2014 Florian Henry - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2015 Ari Elbaz (elarifr) - * Copyright (C) 2021 Gauthier VERDOL +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2014 Florian Henry + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Ari Elbaz (elarifr) + * Copyright (C) 2021 Gauthier VERDOL * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -296,14 +296,14 @@ $aacompta_prodsell_export = getDolGlobalString('ACCOUNTING_PRODUCT_SOLD_EXPORT $title = $langs->trans("ProductsBinding"); -$helpurl = ''; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; $paramsCat = ''; foreach ($searchCategoryProductList as $searchCategoryProduct) { $paramsCat .= "&search_category_product_list[]=".urlencode($searchCategoryProduct); } -llxHeader('', $title, $helpurl, '', 0, 0, array(), array(), $paramsCat, ''); +llxHeader('', $title, $help_url, '', 0, 0, array(), array(), $paramsCat, ''); $pcgverid = getDolGlobalString('CHARTOFACCOUNTS'); $pcgvercode = dol_getIdFromCode($db, $pcgverid, 'accounting_system', 'rowid', 'pcg_version'); diff --git a/htdocs/accountancy/admin/subaccount.php b/htdocs/accountancy/admin/subaccount.php index 69c2f458786..fb9a61e36d0 100644 --- a/htdocs/accountancy/admin/subaccount.php +++ b/htdocs/accountancy/admin/subaccount.php @@ -1,7 +1,7 @@ - * Copyright (C) 2013-2020 Alexandre Spangaro - * Copyright (C) 2016-2018 Laurent Destailleur +/* Copyright (C) 2013-2016 Olivier Geffroy + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2016-2018 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -126,7 +126,7 @@ $form = new Form($db); // Page Header -$help_url = 'EN:Module_Double_Entry_Accounting#Setup'; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; $title = $langs->trans('ChartOfIndividualAccountsOfSubsidiaryLedger'); llxHeader('', $title, $help_url); diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index aaba332d2ef..0a097d5a036 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -1,7 +1,7 @@ * Copyright (C) 2016 Florian Henry - * Copyright (C) 2016-2023 Alexandre Spangaro + * Copyright (C) 2016-2024 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -248,7 +248,9 @@ if ($type == 'sub') { $title_page = $langs->trans("AccountBalance"); } -llxHeader('', $title_page); +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double'; + +llxHeader('', $title_page, $help_url); if ($action != 'export_csv') { diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 842059eadb0..7d42cb64a00 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2017 Florian Henry - * Copyright (C) 2013-2022 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2017 Laurent Destailleur * Copyright (C) 2018-2020 Frédéric France * @@ -334,8 +334,8 @@ $form = new Form($db); $formaccounting = new FormAccounting($db); $title = $langs->trans("CreateMvts"); - -llxHeader('', $title); +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double'; +llxHeader('', $title, $help_url); // Confirmation to delete the command if ($action == 'delete') { diff --git a/htdocs/accountancy/bookkeeping/export.php b/htdocs/accountancy/bookkeeping/export.php index 0d4b02386e1..498a8ee2ed3 100644 --- a/htdocs/accountancy/bookkeeping/export.php +++ b/htdocs/accountancy/bookkeeping/export.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2023 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2022 Lionel Vessiller * Copyright (C) 2016-2017 Laurent Destailleur * Copyright (C) 2018-2021 Frédéric France @@ -708,8 +708,9 @@ $arrayofselected = is_array($toselect) ? $toselect : array(); // Output page // -------------------------------------------------------------------- +$help_url ='EN:Module_Double_Entry_Accounting#Exports|FR:Module_Comptabilité_en_Partie_Double#Exports'; -llxHeader('', $title_page); +llxHeader('', $title_page, $help_url); $formconfirm = ''; diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 7a10c5d96d6..ed00a185230 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2023 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2022 Lionel Vessiller * Copyright (C) 2016-2017 Laurent Destailleur * Copyright (C) 2018-2021 Frédéric France @@ -711,8 +711,8 @@ $arrayofselected = is_array($toselect) ? $toselect : array(); // Output page // -------------------------------------------------------------------- - -llxHeader('', $title_page); +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double'; +llxHeader('', $title_page, $help_url); $formconfirm = ''; diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 51b37ce6651..e49424b71db 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -2,7 +2,7 @@ /* Copyright (C) 2016 Neil Orley * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2020 Florian Henry - * Copyright (C) 2013-2023 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -559,8 +559,8 @@ if ($type == 'sub') { $title_page .= $langs->trans("Bookkeeping"); } $title_page .= ')'; - -llxHeader('', $title_page); +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double'; +llxHeader('', $title_page, $help_url); // List $nbtotalofrecords = ''; diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index 085c8a65e80..772d1672542 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -161,7 +161,7 @@ $formaccounting = new FormAccounting($db); $title = $langs->trans('Closure'); -$help_url ='EN:Module_Double_Entry_Accounting'; +$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Cl.C3.B4ture_annuelle'; llxHeader('', $title, $help_url); diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 4d29a60f1d9..3102b023015 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -1,7 +1,7 @@ - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2021 Alexandre Spangaro +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2013-2024 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -84,8 +84,9 @@ if ($action == 'ventil' && $user->hasRight('accounting', 'bind', 'write')) { /* * View */ +$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; -llxHeader("", $langs->trans('FicheVentilation')); +llxHeader("", $langs->trans('FicheVentilation'), $help_url); if ($cancel == $langs->trans("Cancel")) { $action = ''; diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 3a9eced377c..018f222daf8 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -299,8 +299,9 @@ if ($action == 'validatehistory') { /* * View */ +$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; -llxHeader('', $langs->trans("CustomersVentilation")); +llxHeader('', $langs->trans("CustomersVentilation"), $help_url); $textprevyear = ''.img_previous().''; $textnextyear = ' '.img_next().''; diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 4929b45ac67..2a08eb3986c 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -175,7 +175,9 @@ if (GETPOST('sortfield') == 'f.datef, f.ref, fd.rowid') { $form = new Form($db); $formother = new FormOther($db); -llxHeader('', $langs->trans("CustomersVentilation").' - '.$langs->trans("Dispatched")); +$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; + +llxHeader('', $langs->trans("CustomersVentilation").' - '.$langs->trans("Dispatched"), $help_url); print '