From 15cb20837ae175397b22553234aaed0b5f2e1a71 Mon Sep 17 00:00:00 2001 From: Saami PERDRIX - ATM Consulting Date: Wed, 6 Dec 2023 13:35:43 +0100 Subject: [PATCH 01/17] fix warning on email config --- dev/tools/rector/rector.php | 16 +++++----------- htdocs/admin/mails.php | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/dev/tools/rector/rector.php b/dev/tools/rector/rector.php index 6b13c2fbf0b..0438318e8c9 100644 --- a/dev/tools/rector/rector.php +++ b/dev/tools/rector/rector.php @@ -7,7 +7,7 @@ use Rector\Core\ValueObject\PhpVersion; use Rector\Set\ValueObject\LevelSetList; return static function (RectorConfig $rectorConfig): void { - $rectorConfig->phpVersion(PhpVersion::PHP_71); + $rectorConfig->phpVersion(PhpVersion::PHP_82); //$rectorConfig->indent(' ', 4); // Traits seems not supported correctly by rector without declaring them as bootstrapFiles @@ -19,15 +19,9 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->bootstrapFiles($arrayoftraitfiles); $rectorConfig->paths([ - __DIR__ . '/../../../htdocs/', - __DIR__ . '/../../../scripts/', - __DIR__ . '/../../../test/phpunit/', + __DIR__ . '/../../../htdocs/custom/multismtp', ]); $rectorConfig->skip([ - '**/includes/**', - '**/custom/**', - __DIR__ . '/../../../htdocs/custom/', - __DIR__ . '/../../../htdocs/install/doctemplates/*' ]); $rectorConfig->parallel(240); @@ -47,7 +41,7 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->rule(Dolibarr\Rector\Renaming\EmptyGlobalToFunction::class); // Add all predefined rules to migrate to up to php 71 - // $rectorConfig->sets([ - // LevelSetList::UP_TO_PHP_71 - // ]); + /* $rectorConfig->sets([ + LevelSetList::UP_TO_PHP_71 + ]);*/ }; diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 828190b2cb4..13913616bf1 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -707,7 +707,7 @@ if ($action == 'edit') { // SMTPS PW if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE') != "XOAUTH2") { - print ''.$langs->trans("MAIN_MAIL_SMTPS_PW").''.preg_replace('/./', '*', $conf->global->MAIN_MAIL_SMTPS_PW).''; + print ''.$langs->trans("MAIN_MAIL_SMTPS_PW").''.preg_replace('/./', '*', getDolGlobalString('MAIN_MAIL_SMTPS_PW')).''; } // SMTPS oauth service From 3bf1a8516c48e45c8c5b98b453ef61bceac960a7 Mon Sep 17 00:00:00 2001 From: MDW Date: Wed, 6 Dec 2023 16:25:17 +0100 Subject: [PATCH 02/17] QUAL Fix php-cs-fixer configuration to not create 'public const' constants incompatible with 7.0 --- .php-cs-fixer.dist.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index dfe3fa53994..1bbd13d9022 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -41,6 +41,8 @@ return (new PhpCsFixer\Config()) // So we use target PHP70 for the moment. '@PHP70Migration' => true, //'@PHP71Migration' => true, + // Avoid adding public to const (incompatible with PHP 7.0): + 'visibility_required' => ['elements'=>['property', 'method']], //'strict_param' => true, //'array_syntax' => ['syntax' => 'short'], From 5fbd5c28b68bc0605db58df1e04a2a564ff33b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 7 Dec 2023 20:33:06 +0100 Subject: [PATCH 03/17] fix phpdoc --- htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php index 11b0d8668af..f71ddb0ca60 100644 --- a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php +++ b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php @@ -43,8 +43,9 @@ class PrestaShopWebservice /** @var string PS version */ protected $version; - /** @var array compatible versions of PrestaShop Webservice */ + /** @var string compatible min version of PrestaShop Webservice */ const PSCOMPATIBLEVERSIONMIN = '1.4.0.0'; + /** @var string compatible max version of PrestaShop Webservice */ const PSCOMPATIBLEVERSIONMAX = '1.7.99.99'; From a3d405bdc8986c8357a2b0db5754d15cbbc04174 Mon Sep 17 00:00:00 2001 From: Hystepik Date: Fri, 8 Dec 2023 12:41:36 +0100 Subject: [PATCH 04/17] FIx comm index page on contract --- htdocs/comm/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 27ac6154296..44a7565e9be 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -70,7 +70,7 @@ $now = dol_now(); //restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0); if (!$user->hasRight('propal', 'read') && !$user->hasRight('supplier_proposal', 'read') && !$user->hasRight('commande', 'read') && !$user->hasRight('fournisseur', 'commande', 'read') - && !$user->hasRight('supplier_order', 'read') && !$user->hasRight('fichinter', 'read')) { + && !$user->hasRight('supplier_order', 'read') && !$user->hasRight('fichinter', 'read') && !$user->hasRight('contrat', 'read')) { accessforbidden(); } From e98780232f01d6314a51efac2214bef1c47581fc Mon Sep 17 00:00:00 2001 From: Saami PERDRIX - ATM Consulting Date: Mon, 11 Dec 2023 16:31:07 +0100 Subject: [PATCH 05/17] clean --- dev/tools/rector/rector.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dev/tools/rector/rector.php b/dev/tools/rector/rector.php index 0438318e8c9..fbebbe96188 100644 --- a/dev/tools/rector/rector.php +++ b/dev/tools/rector/rector.php @@ -18,8 +18,7 @@ return static function (RectorConfig $rectorConfig): void { ); $rectorConfig->bootstrapFiles($arrayoftraitfiles); - $rectorConfig->paths([ - __DIR__ . '/../../../htdocs/custom/multismtp', + $rectorConfig->paths([, ]); $rectorConfig->skip([ ]); From 14f67c09e44de3ec88d64b6735e120ddc334c5cd Mon Sep 17 00:00:00 2001 From: Saami PERDRIX - ATM Consulting Date: Mon, 11 Dec 2023 16:32:22 +0100 Subject: [PATCH 06/17] clean --- dev/tools/rector/rector.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tools/rector/rector.php b/dev/tools/rector/rector.php index fbebbe96188..bb27c66d705 100644 --- a/dev/tools/rector/rector.php +++ b/dev/tools/rector/rector.php @@ -40,7 +40,7 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->rule(Dolibarr\Rector\Renaming\EmptyGlobalToFunction::class); // Add all predefined rules to migrate to up to php 71 - /* $rectorConfig->sets([ - LevelSetList::UP_TO_PHP_71 - ]);*/ + // $rectorConfig->sets([ + // LevelSetList::UP_TO_PHP_71 + //]); }; From c501e7f0ccce48db7537f6f83bc63ee24e6ab90e Mon Sep 17 00:00:00 2001 From: Saami PERDRIX - ATM Consulting Date: Mon, 11 Dec 2023 16:33:24 +0100 Subject: [PATCH 07/17] clean --- dev/tools/rector/rector.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dev/tools/rector/rector.php b/dev/tools/rector/rector.php index bb27c66d705..e30e7e6b61d 100644 --- a/dev/tools/rector/rector.php +++ b/dev/tools/rector/rector.php @@ -7,7 +7,7 @@ use Rector\Core\ValueObject\PhpVersion; use Rector\Set\ValueObject\LevelSetList; return static function (RectorConfig $rectorConfig): void { - $rectorConfig->phpVersion(PhpVersion::PHP_82); + $rectorConfig->phpVersion(PhpVersion::PHP_71); //$rectorConfig->indent(' ', 4); // Traits seems not supported correctly by rector without declaring them as bootstrapFiles @@ -19,6 +19,9 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->bootstrapFiles($arrayoftraitfiles); $rectorConfig->paths([, + __DIR__ . '/../../../htdocs/', + __DIR__ . '/../../../scripts/', + __DIR__ . '/../../../test/phpunit/', ]); $rectorConfig->skip([ ]); From ab741aab11d8e55bd5f1924af7836ee74842dba6 Mon Sep 17 00:00:00 2001 From: Saami PERDRIX - ATM Consulting Date: Mon, 11 Dec 2023 16:34:20 +0100 Subject: [PATCH 08/17] clean --- dev/tools/rector/rector.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dev/tools/rector/rector.php b/dev/tools/rector/rector.php index e30e7e6b61d..7d201227adb 100644 --- a/dev/tools/rector/rector.php +++ b/dev/tools/rector/rector.php @@ -18,12 +18,16 @@ return static function (RectorConfig $rectorConfig): void { ); $rectorConfig->bootstrapFiles($arrayoftraitfiles); - $rectorConfig->paths([, + $rectorConfig->paths([ __DIR__ . '/../../../htdocs/', __DIR__ . '/../../../scripts/', __DIR__ . '/../../../test/phpunit/', ]); $rectorConfig->skip([ + '**/includes/**', + '**/custom/**', + __DIR__ . '/../../../htdocs/custom/', + __DIR__ . '/../../../htdocs/install/doctemplates/*' ]); $rectorConfig->parallel(240); From 837fcd0d14832cdf993c0a6935fae128c5216c67 Mon Sep 17 00:00:00 2001 From: Saami PERDRIX - ATM Consulting Date: Mon, 11 Dec 2023 16:34:57 +0100 Subject: [PATCH 09/17] clean --- dev/tools/rector/rector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tools/rector/rector.php b/dev/tools/rector/rector.php index 7d201227adb..6b13c2fbf0b 100644 --- a/dev/tools/rector/rector.php +++ b/dev/tools/rector/rector.php @@ -49,5 +49,5 @@ return static function (RectorConfig $rectorConfig): void { // Add all predefined rules to migrate to up to php 71 // $rectorConfig->sets([ // LevelSetList::UP_TO_PHP_71 - //]); + // ]); }; From b2dd3bec9e7f9df124d86b78c14795f3e5045100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Benke?= <1179011+defrance@users.noreply.github.com> Date: Mon, 11 Dec 2023 16:53:21 +0100 Subject: [PATCH 10/17] php V8 warning append when you add a file on folder and select the tabs for the first time, --- htdocs/core/lib/files.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index a08b6b19030..c4f8972253a 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -364,6 +364,7 @@ function completeFileArrayWithDatabaseInfo(&$filearray, $relativedir) $filearray[$key]['position'] = '999999'; // File not indexed are at end. So if we add a file, it will not replace an existing position $filearray[$key]['cover'] = 0; $filearray[$key]['acl'] = ''; + $filearray[$key]['share'] = 0; $rel_filename = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $filearray[$key]['fullname']); From 3a2b48f16cee99bc9a8612aa1c40407bbc0c7334 Mon Sep 17 00:00:00 2001 From: Saami PERDRIX - ATM Consulting Date: Mon, 11 Dec 2023 16:58:22 +0100 Subject: [PATCH 11/17] backport de #cc85a1a --- htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index bb01f8bfd0b..57596f3edca 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -1640,7 +1640,8 @@ class pdf_sponge extends ModelePDFFactures // Total remise $total_line_remise = 0; foreach ($object->lines as $i => $line) { - $total_line_remise += pdfGetLineTotalDiscountAmount($object, $i, $outputlangs, 2); // TODO: add this method to core/lib/pdf.lib + $resdiscount = pdfGetLineTotalDiscountAmount($object, $i, $outputlangs, 2); + $total_line_remise += (is_numeric($resdiscount) ? $resdiscount : 0); // Gestion remise sous forme de ligne négative if ($line->total_ht < 0) { $total_line_remise += -$line->total_ht; From 8df6fc6688e424bacf758f0167b3600e036388cc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 Dec 2023 17:48:40 +0100 Subject: [PATCH 12/17] Fix warning --- htdocs/fourn/class/fournisseur.facture.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 26a73d35472..7ee81b29caf 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -3699,7 +3699,6 @@ class SupplierInvoiceLine extends CommonObjectLine $this->product_type = $obj->product_type; $this->product_label = $obj->product_label; $this->info_bits = $obj->info_bits; - $this->tva_npr = ($obj->info_bits & 1 == 1) ? 1 : 0; $this->fk_parent_line = $obj->fk_parent_line; $this->special_code = $obj->special_code; $this->rang = $obj->rang; @@ -3723,7 +3722,7 @@ class SupplierInvoiceLine extends CommonObjectLine */ public function delete($notrigger = 0) { - global $user, $conf; + global $user; dol_syslog(get_class($this)."::deleteline rowid=".((int) $this->id), LOG_DEBUG); From b20e130dbaa169e9f46b131d139f817c7c9785cd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 Dec 2023 18:04:39 +0100 Subject: [PATCH 13/17] Debug v19 --- .../fourn/class/fournisseur.product.class.php | 5 +++++ htdocs/intracommreport/card.php | 13 ++++++++----- .../class/intracommreport.class.php | 17 +++++++++-------- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 26751c291d7..fd9e0245ad8 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -67,6 +67,11 @@ class ProductFournisseur extends Product public $desc_supplier; public $vatrate_supplier; // default vat rate for this supplier/qty/product (can be set by get_buyprice) + /** + * @deprecated + * @see $product_id + */ + public $fk_product; public $product_id; public $product_ref; diff --git a/htdocs/intracommreport/card.php b/htdocs/intracommreport/card.php index 9409ae0d40f..c234f22c7e4 100644 --- a/htdocs/intracommreport/card.php +++ b/htdocs/intracommreport/card.php @@ -45,17 +45,20 @@ $langs->loadLangs(array("intracommreport")); // Get Parameters $id = GETPOST('id', 'int'); $action = GETPOST('action'); -$exporttype = GETPOSTISSET('exporttype') ? GETPOST('exporttype', 'alphanohtml') : 'deb'; // DEB or DES $year = GETPOSTINT('year'); $month = GETPOSTINT('month'); $label = (string) GETPOST('label', 'alphanohtml'); -$type_declaration = (string) GETPOST('type_declaration', 'alphanohtml'); + +$exporttype = GETPOSTISSET('exporttype') ? GETPOST('exporttype', 'alphanohtml') : 'deb'; // DEB or DES +$type_declaration = (string) GETPOST('type_declaration', 'alphanohtml'); // 'introduction' or 'expedition' + $backtopage = GETPOST('backtopage', 'alpha'); $declaration = array( "deb" => $langs->trans("DEB"), "des" => $langs->trans("DES"), ); + $typeOfDeclaration = array( "introduction" => $langs->trans("Introduction"), "expedition" => $langs->trans("Expedition"), @@ -121,8 +124,8 @@ if ($permissiontodelete && $action == 'confirm_delete' && $confirm == 'yes') { if ($action == 'add' && $permissiontoadd) { $object->label = trim($label); - $object->type = trim($exporttype); - $object->type_declaration = $type_declaration; + $object->exporttype = trim($exporttype); // 'des' or 'deb' + $object->type_declaration = $type_declaration; // 'introduction' or 'expedition' //$object->subscription = (int) $subscription; // Fill array 'array_options' with data from add form @@ -272,7 +275,7 @@ if ($id > 0 && $action != 'edit') { print ''; // Type of Declaration - print ''.$langs->trans("TypeOfDeclaration").''.$object->type_declaration.''; + print ''.$langs->trans("TypeOfDeclaration").''.$object->exporttype.''; print ''; print "\n"; diff --git a/htdocs/intracommreport/class/intracommreport.class.php b/htdocs/intracommreport/class/intracommreport.class.php index 7512813ebae..f3df5deab11 100644 --- a/htdocs/intracommreport/class/intracommreport.class.php +++ b/htdocs/intracommreport/class/intracommreport.class.php @@ -67,7 +67,8 @@ class IntracommReport extends CommonObject */ public $declaration_number; - public $type_declaration; // deb or des + public $exporttype; // deb or des + public $type_declaration; // 'introduction' or 'expedition' /** @@ -199,7 +200,7 @@ class IntracommReport extends CommonObject * * @param int $period_year Year of declaration * @param int $period_month Month of declaration - * @param string $type_declaration Declaration type by default - introduction or expedition (always 'expedition' for Des) + * @param string $type_declaration Declaration type by default - 'introduction' or 'expedition' (always 'expedition' for Des) * @return SimpleXMLElement|int */ public function getXMLDes($period_year, $period_month, $type_declaration = 'expedition') @@ -214,9 +215,8 @@ class IntracommReport extends CommonObject $declaration_des->addChild('mois_des', $period_month); $declaration_des->addChild('an_des', $period_year); - /**************Ajout des lignes de factures**************************/ + // Add invoice lines $res = $this->addItemsFact($declaration_des, $type_declaration, $period_year.'-'.$period_month, 'des'); - /********************************************************************/ $this->errors = array_unique($this->errors); @@ -231,9 +231,9 @@ class IntracommReport extends CommonObject * Add line from invoice * * @param SimpleXMLElement $declaration Reference declaration - * @param string $type Declaration type by default - introduction or expedition (always 'expedition' for Des) + * @param string $type Declaration type by default - 'introduction' or 'expedition' (always 'expedition' for Des) * @param int $period_reference Reference period - * @param string $exporttype deb=DEB, des=DES + * @param string $exporttype 'deb' for DEB, 'des' for DES * @return int Return integer <0 if KO, >0 if OK */ public function addItemsFact(&$declaration, $type, $period_reference, $exporttype = 'deb') @@ -297,7 +297,7 @@ class IntracommReport extends CommonObject * @param string $type Declaration type by default - introduction or expedition (always 'expedition' for Des) * @param int $period_reference Reference declaration * @param string $exporttype deb=DEB, des=DES - * @return string Return integer <0 if KO, >0 if OK + * @return string Return integer <0 if KO, >0 if OK */ public function getSQLFactLines($type, $period_reference, $exporttype = 'deb') { @@ -454,7 +454,8 @@ class IntracommReport extends CommonObject */ public function getNextDeclarationNumber() { - $sql = "SELECT MAX(numero_declaration) as max_declaration_number FROM ".MAIN_DB_PREFIX.$this->table_element; + $sql = "SELECT MAX(numero_declaration) as max_declaration_number"; + $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element; $sql .= " WHERE exporttype = '".$this->db->escape($this->exporttype)."'"; $resql = $this->db->query($sql); if ($resql) { From e48f8c815ccce37e367f92be3acd58ae9dea1abc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 Dec 2023 18:14:35 +0100 Subject: [PATCH 14/17] Fix warning --- htdocs/intracommreport/class/intracommreport.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/intracommreport/class/intracommreport.class.php b/htdocs/intracommreport/class/intracommreport.class.php index f3df5deab11..fde100a5639 100644 --- a/htdocs/intracommreport/class/intracommreport.class.php +++ b/htdocs/intracommreport/class/intracommreport.class.php @@ -69,6 +69,7 @@ class IntracommReport extends CommonObject public $exporttype; // deb or des public $type_declaration; // 'introduction' or 'expedition' + public $numero_declaration; /** From c7bce53c7fdbe5f55016645ae9b1f358b01c6183 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 Dec 2023 18:16:32 +0100 Subject: [PATCH 15/17] Fix warning --- htdocs/intracommreport/class/intracommreport.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/intracommreport/class/intracommreport.class.php b/htdocs/intracommreport/class/intracommreport.class.php index fde100a5639..bd6646ffe37 100644 --- a/htdocs/intracommreport/class/intracommreport.class.php +++ b/htdocs/intracommreport/class/intracommreport.class.php @@ -480,9 +480,10 @@ class IntracommReport extends CommonObject /** * Generate XML file * + * @param string $content_xml Content * @return void */ - public function generateXMLFile() + public function generateXMLFile($content_xml) { $name = $this->period.'.xml'; @@ -490,7 +491,7 @@ class IntracommReport extends CommonObject $fname = sys_get_temp_dir().'/'.$name; $f = fopen($fname, 'w+'); - fwrite($f, $this->content_xml); + fwrite($f, $content_xml); fclose($f); header('Content-Description: File Transfer'); From c4dc94fd355b8a3f39031b6968d1d80311a848e9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 Dec 2023 18:22:35 +0100 Subject: [PATCH 16/17] Fix warning --- htdocs/compta/facture/class/facture.class.php | 2 -- htdocs/core/class/commoninvoice.class.php | 8 ++++++++ htdocs/fourn/class/fournisseur.facture.class.php | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 9bc9d68220f..fb8949c6309 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -181,8 +181,6 @@ class Facture extends CommonInvoice public $fk_facture_source; public $linked_objects = array(); - public $date_lim_reglement; - /** * @var int ID Field to store bank id to use when payment mode is withdraw */ diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 0f3b8628122..1047e0f884f 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -49,6 +49,12 @@ abstract class CommonInvoice extends CommonObject */ public $subtype; + /** + * @var int Thirdparty ID + * @deprecated + * @see $socid + */ + public $fk_soc; /** * @var int Thirdparty ID */ @@ -63,6 +69,8 @@ abstract class CommonInvoice extends CommonObject */ public $date; + public $date_lim_reglement; + public $cond_reglement_id; // Id in llx_c_paiement public $cond_reglement_code; // Code in llx_c_paiement public $cond_reglement_label; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 012bbe3637b..a9a750b34a6 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -2256,7 +2256,7 @@ class FactureFournisseur extends CommonInvoice $supplierinvoiceline->fk_remise_except = $fk_remise_except; - $supplierinvoiceline->special_code = ((string) $special_code != '' ? $special_code : $this->special_code); + $supplierinvoiceline->special_code = (string) $special_code; $supplierinvoiceline->fk_parent_line = $fk_parent_line; $supplierinvoiceline->origin = $this->origin; $supplierinvoiceline->origin_id = $origin_id; From 2c599b7099e877f76f0333a19a3937d9a19cceaa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 Dec 2023 21:23:59 +0100 Subject: [PATCH 17/17] CSS --- htdocs/core/get_menudiv.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/htdocs/core/get_menudiv.php b/htdocs/core/get_menudiv.php index 061d5fd3c95..bcc89ae3f9c 100644 --- a/htdocs/core/get_menudiv.php +++ b/htdocs/core/get_menudiv.php @@ -101,7 +101,7 @@ $arrayofjs = array(); $arrayofcss = array(); top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); -print ''."\n"; +print ''."\n"; // Javascript to make menu active like Jmobile did. print ' @@ -125,6 +125,22 @@ print ' padding-left: 40px; /* width = 20 for level0, 20 for level1 */ } + .getmenudiv a:hover { + text-decoration: none; + } + + .pictofixedwidth { + text-align: left; + padding-right: 10px !important; + } + + li.lilevel1 > a, li.lilevel1 > i { + padding-left: 30px !important; + } + li.lilevel2 a { + padding-left: 60px !important; + } + a.alilevel0, span.spanlilevel0 { background-image: url(\''.DOL_URL_ROOT.'/theme/'.urlencode($conf->theme).'/img/next.png\') !important; background-repeat: no-repeat !important;';