diff --git a/ChangeLog.md b/ChangeLog.md index 570e032..e5c69bc 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file. ## Unreleased ## Release 1.11 +- FIX : Compat v23 - *22/12/2025* - 1.11.1 - NEW : Changed Dolibarr compatibility range to 17 min - 22 max *08/07/2025* - 1.11.0 ## Release 1.10 diff --git a/admin/ship2bill_setup.php b/admin/ship2bill_setup.php index 8470693..344b042 100644 --- a/admin/ship2bill_setup.php +++ b/admin/ship2bill_setup.php @@ -1,4 +1,19 @@ . + */ $res=@include("../../main.inc.php"); // For root directory if (! $res) $res=@include("../../../main.inc.php"); // For "custom" directory diff --git a/class/ship2bill.class.php b/class/ship2bill.class.php index b7977b6..02de863 100644 --- a/class/ship2bill.class.php +++ b/class/ship2bill.class.php @@ -1,4 +1,19 @@ . + */ class Ship2Bill { @@ -12,7 +27,7 @@ function generate_factures($TExpedition, $dateFact=0, $show_trace = true) dol_include_once('/core/modules/facture/modules_facture.php'); // Utilisation du sous-module livraison activable dans expedition (note: en v13+, renommé en `delivery_note`) - if(isModEnabled('livraison_bon') || isModEnabled('delivery_note')) { + if(isModEnabled('delivery_note')) { dol_include_once('/livraison/class/livraison.class.php'); } // Utilisation du module sous-total si activé @@ -410,8 +425,7 @@ function facture_add_title (&$f, &$exp, &$sub) { if(!empty($exp->date_delivery) && !getDolGlobalString('SHIP2BILL_DISPLAY_SHIPMENT_REAL_DATE')) $title2.= ' ('.dol_print_date($exp->date_delivery,'day').')'; else if(getDolGlobalString('SHIP2BILL_DISPLAY_SHIPMENT_REAL_DATE') && !empty($exp->date_creation))$title2.= ' ('.dol_print_date($exp->date_creation,'day').')'; - // Utilisation du sous-module livraison activable dans expedition (note: en v13+, renommé en `delivery_note`) - if(isModEnabled('livraison_bon') || isModEnabled('delivery_note')) { + if(isModEnabled('delivery_note')) { $exp->fetchObjectLinked('','','','delivery'); // Récupération des infos du BL pour le titre, sinon de l'expédition diff --git a/class/techatm.class.php b/class/techatm.class.php index 959b1f7..b87c1f7 100644 --- a/class/techatm.class.php +++ b/class/techatm.class.php @@ -148,7 +148,7 @@ public static function getLastModuleVersionUrl($moduleDescriptor){ /** - * @param $url + * @param string $url Url to call * @return false|object */ public function getJsonData($url){ @@ -170,7 +170,7 @@ public function getJsonData($url){ } /** - * @param $url + * @param string $url Url to call * @return false|string */ public function getContents($url){ diff --git a/config.php b/config.php index 3053294..8579ce1 100755 --- a/config.php +++ b/config.php @@ -1,4 +1,19 @@ . + */ $res = 0; // Try main.inc.php using relative path if (!$res && file_exists("../main.inc.php")) { diff --git a/core/modules/facture/doc/pdf_crabe_shipping.modules.php b/core/modules/facture/doc/pdf_crabe_shipping.modules.php index eefd95d..feb4ec3 100644 --- a/core/modules/facture/doc/pdf_crabe_shipping.modules.php +++ b/core/modules/facture/doc/pdf_crabe_shipping.modules.php @@ -1436,7 +1436,7 @@ function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, //$pdf->MultiCell($this->posxtva-$this->posxpicture-1,2, $outputlangs->transnoentities("Photo"),'','C'); } } - + $pdf->line($this->posxshipping-1, $tab_top, $this->posxshipping-1, $tab_top + $tab_height); if (empty($hidetop)) { @@ -1833,13 +1833,13 @@ function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) $showdetails=getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS'); return pdf_pagefoot($pdf,$outputlangs,'INVOICE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext); } - - - + + + function pdf_writeLinkedObjectsCustom(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$align,$default_font_size) { $linkedobjects = $this->pdf_getLinkedObjectsCustom($object,$outputlangs); - + if (! empty($linkedobjects)) { foreach($linkedobjects as $linkedobject) @@ -1911,7 +1911,7 @@ function pdf_getLinkedObjectsCustom($object,$outputlangs) { $outputlangs->load('orders'); $outputlangs->load('sendings'); - + foreach($objects as $x => $elementobject) { $order=null; diff --git a/core/modules/modShip2bill.class.php b/core/modules/modShip2bill.class.php index 0a07e51..7d7f1c9 100644 --- a/core/modules/modShip2bill.class.php +++ b/core/modules/modShip2bill.class.php @@ -58,7 +58,7 @@ function __construct($db) $this->editor_url = 'https://www.atm-consulting.fr'; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version - $this->version = '1.11.0'; + $this->version = '1.11.1'; // Url to the file with your last numberversion of this module require_once __DIR__ . '/../../class/techatm.class.php'; $this->url_last_version = \ship2bill\TechATM::getLastModuleVersionUrl($this); @@ -105,7 +105,7 @@ function __construct($db) $this->depends = array(); // List of modules id that must be enabled if this module is enabled $this->requiredby = array(); // List of modules id to disable if this one is disabled $this->conflictwith = array(); // List of modules id this module is in conflict with - $this->phpmin = array(7,0); // Minimum version of PHP required by module + $this->phpmin = array(7,4); // Minimum version of PHP required by module $this->need_dolibarr_version = array(17, 0); // Minimum version of Dolibarr required by module $this->langfiles = array("ship2bill@ship2bill"); @@ -117,8 +117,8 @@ function __construct($db) $this->const = array(); // Array to add new pages in new tabs - // Example: $this->tabs = array('objecttype:+tabname1:Title1:mylangfile@mymodule:$user->rights->mymodule->read:/mymodule/mynewtab1.php?id=__ID__', // To add a new tab identified by code tabname1 - // 'objecttype:+tabname2:Title2:mylangfile@mymodule:$user->rights->othermodule->read:/mymodule/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2 + // Example: $this->tabs = array('objecttype:+tabname1:Title1:mylangfile@mymodule:$user->hasRight('mymodule', 'read'):/mymodule/mynewtab1.php?id=__ID__', // To add a new tab identified by code tabname1 + // 'objecttype:+tabname2:Title2:mylangfile@mymodule:$user->hasRight('othermodule', 'read'):/mymodule/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2 // 'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname // where objecttype can be // 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member) diff --git a/core/triggers/interface_99_modShip2bill_Ship2billWorkflow.class.php b/core/triggers/interface_99_modShip2bill_Ship2billWorkflow.class.php index 36d343b..235f8b3 100644 --- a/core/triggers/interface_99_modShip2bill_Ship2billWorkflow.class.php +++ b/core/triggers/interface_99_modShip2bill_Ship2billWorkflow.class.php @@ -48,7 +48,7 @@ public function __construct($db) $this->db = &$db; $this->name = preg_replace('/^Interface/i', '', get_class($this)); - $this->family = "demo"; + $this->family = "ATM Consulting - CRM"; $this->description = "Triggers of this module are empty functions." . "They have no effect." . "They are provided for tutorial purpose only."; @@ -99,24 +99,6 @@ public function getVersion() } } - /** - * Function called when a Dolibarrr business event is done. - * All functions "run_trigger" are triggered if file - * is inside directory core/triggers - * For old versions compatibility - * - * @param string $action Event action code - * @param Object $object Object - * @param User $user Object user - * @param Translate $langs Object langs - * @param Conf $conf Object conf - * @return int <0 if KO, 0 if no triggered ran, >0 if OK - */ - public function run_trigger($action, $object, $user, $langs, $conf){ - return $this->runTrigger($action, $object, $user, $langs, $conf); - } - - /** * Function called when a Dolibarrr business event is done. * All functions "run_trigger" are triggered if file