mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Qual: Fix PhanPluginUnknownObjectMethodCall ("part 1") (#30563)
* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add typing hint to fix phan notice. * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add typing hint in phan config to fix phan notice. * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint to fix phan notice. * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for linkedObjectBlock * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for linkedObjectBlock * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for linkedObjects * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Fix: MemberNumRefNumbers getExample does not take any arguments Found thanks to adding the typing for phan! * Qual: Correct forced type for $module * Qual: Ignore phan false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Ignore false positive * Qual: phan/Ignore false positive, replace depr.prop with method * Qual: Fix typing for count by adding is_array check * Qual: replace depr.prop `nom` with method * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Fix depr.prop with getter and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: Improve typing for mymodule template * Make info method arguments match calls * Make PrintingDriver abstract class because we added abstract methods * Add phpdoc typing for phan * Update getExample function signature for compatibility * Update getExample function signature for compatibility * Update getExample function signature for compatibility * Update header wit correct information * Update getExample method signature * Update getExample method signature * Correct reference to class in comment * Force php phan typing for numbering modules * Correct $_GLOBALS to $GLOBALS * Add phpdoc to indicat type of properties * Correct default to null * Improve getNextValue typehint * Improve getNextValue typehint * Qual: Improve ModeleNumRefTakepos typing * Qual: Improve ModeleNumRefRecruitmentJobPosition typing * Fix default for $langs * Do not use non-existing ModeleNumRefTakepos::nom * Allow getNextValue argument to be null * Correct $_GLOBAL into $GLOBALS * Improve typing for ldap functions * Allow null for outputlangs argument * Improve typing for printOriginLine * Improve typing for linkedObject access * Fix PhanTypeMismatchArgumentNullableInternal and optimize * Fix PhanPossiblyUndeclaredVariable by setting default value * Ignore PhanPluginDuplicateExpressionAssignmentOperation - needs PHP7.4 * getToolTip does not accept null, changed to '' * Improve getNextValue typing * Change PrintingDriver back to normal class (instantiated) And add errors for functions that should be overloaded * Adjust pringOriginLine typing to match parent * Fix phpdoc for getNextValue * Fix phan typing * Add/Improve phpdoc typing hints * Qual: Adjustments to match typing * Update typing for unit, use GETPOSTINT * ModeleNumRefTask needs Project * Fix several notices appearing after update from develop * Index for choices is int, use GETPOSTINT * Qual: Ignore empty foreach * Force BOMLine on object line * phan typing to indicate that linked objects are BOM * Type the correct variable name (phan) * Add typing for $langs * Type to CommonNumRefGenerator (no class for availabilities) * Resolve several phan notices after update from dev branch * Extra typing fixes * Move common attributes to parent class (phan) * Add typing to Calendar class * Improve typing hints * Add typing to pdf_eagle_proforma * Qual: Add typing for token in generic_oauthcallback.php * Add typing for objMod * Correct getNextValue function signature (phpstan) * Fix typing (phpstan) * Update version declarations (fix phpstan) * Fix phpstan typing issues * Adjust typing (phpstan) * Qual: Update baseline & conf to detect 25% of PhanPluginUnknownObjectMethodCall
This commit is contained in:
parent
52fdd19d0f
commit
75ed925f06
File diff suppressed because it is too large
Load Diff
|
|
@ -257,10 +257,12 @@ return [
|
|||
'filtert' => 'int',
|
||||
'forceall' => 'int<0,1>',
|
||||
'form' => '\Form',
|
||||
'formcompany' => '\FormCompany',
|
||||
'hookmanager' => '\HookManager',
|
||||
'inputalsopricewithtax' => 'int<0,1>',
|
||||
'langs' => '\Translate',
|
||||
'leftmenu' => 'string',
|
||||
'linkedObjectBlock' => '\CommonObject[]', // See htdocs/core/class/html.form.class.php
|
||||
'mainmenu' => 'string',
|
||||
'menumanager' => '\MenuManager',
|
||||
'mysoc' => '\Societe',
|
||||
|
|
@ -268,6 +270,7 @@ return [
|
|||
'obj' => '\CommonObject', // Deprecated
|
||||
'object_rights' => 'int|stdClass',
|
||||
'objectoffield' => '\CommonObject',
|
||||
'objsoc' => '\Societe',
|
||||
'senderissupplier' => 'int<0,2>',
|
||||
'user' => '\User',
|
||||
'website' => 'string', // See discussion https://github.com/Dolibarr/dolibarr/pull/28891#issuecomment-2002268334 // Disable because Phan infers Website type
|
||||
|
|
@ -444,10 +447,10 @@ return [
|
|||
'PhanPluginRedundantAssignment', // Not essential, useless
|
||||
'PhanPluginDuplicateCatchStatementBody', // Requires PHP7.1 - 50+ occurrences
|
||||
|
||||
'PhanPluginUnknownArrayMethodParamType', // Too many troubles to manage. Is enabled into config_extended only.
|
||||
'PhanPluginUnknownArrayMethodReturnType', // Too many troubles to manage. Is enabled into config_extended only.
|
||||
'PhanPluginUnknownArrayMethodParamType', // Too many troubles to manage. Is enabled in config_extended only.
|
||||
'PhanPluginUnknownArrayMethodReturnType', // Too many troubles to manage. Is enabled in config_extended only.
|
||||
'PhanUndeclaredGlobalVariable', // Too many false positives on .tpl.php files. Is enabled into config_extended only.
|
||||
'PhanPluginUnknownObjectMethodCall', // False positive for some class. Is enabled into config_extended only.
|
||||
// 'PhanPluginUnknownObjectMethodCall', // False positive for some class. Is enabled in config_extended only.
|
||||
],
|
||||
// You can put relative paths to internal stubs in this config option.
|
||||
// Phan will continue using its detailed type annotations,
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ $modulepart = GETPOST('modulepart', 'aZ09');
|
|||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
|
||||
global $conf;
|
||||
|
||||
if ($action == 'set_default') {
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
$res = true;
|
||||
|
|
@ -181,7 +183,7 @@ if ($action == 'set_default') {
|
|||
}
|
||||
}
|
||||
|
||||
$consttype = GETPOST('consttype', 'alpha');
|
||||
$consttype = GETPOSTINT('consttype');
|
||||
$constnote = GETPOST('constnote');
|
||||
$res = dolibarr_set_const($db, $constname, $constvalue, $choices[$consttype], 0, $constnote, $conf->entity);
|
||||
|
||||
|
|
@ -295,7 +297,7 @@ foreach ($arrayofmodules as $file => $modCodeMember) {
|
|||
print '<tr class="oddeven">'."\n";
|
||||
print '<td width="140">'.$modCodeMember->name.'</td>'."\n";
|
||||
print '<td>'.$modCodeMember->info($langs).'</td>'."\n";
|
||||
print '<td class="nowrap">'.$modCodeMember->getExample($langs).'</td>'."\n";
|
||||
print '<td class="nowrap">'.$modCodeMember->getExample().'</td>'."\n";
|
||||
|
||||
if (getDolGlobalString('MEMBER_CODEMEMBER_ADDON') == "$file") {
|
||||
print '<td class="center">'."\n";
|
||||
|
|
@ -389,6 +391,7 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
'@phan-var-force doc_generic_member_odt|pdf_standard_member $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@ class Subscription extends CommonObject
|
|||
* Return clickable link of object (with eventually picto)
|
||||
*
|
||||
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
|
||||
* @param array $arraydata Array of data
|
||||
* @param array{selected:?int,member:?Adherent,bank:?Account} $arraydata Array of data
|
||||
* @return string HTML Code for Kanban thumb.
|
||||
*/
|
||||
public function getKanbanView($option = '', $arraydata = null)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ echo "<!-- BEGIN PHP TEMPLATE adherents/tpl/linkedobjectblock.tpl.php -->\n";
|
|||
global $user;
|
||||
|
||||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
'@phan-var-force Subscription[] $linkedObjectBlock';
|
||||
$langs->load("members");
|
||||
|
||||
$total = 0;
|
||||
|
|
|
|||
|
|
@ -256,6 +256,8 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db, new ActionComm($db));
|
||||
|
||||
'@phan-var-force ModeleAction $module';
|
||||
|
||||
print '<tr class="oddeven">'."\n";
|
||||
print "<td>";
|
||||
print(empty($module->name) ? $name : $module->name);
|
||||
|
|
|
|||
|
|
@ -346,6 +346,8 @@ foreach ($dirmodels as $reldir) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModeleBankAccountDoc $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
$modulequalified = 0;
|
||||
|
|
@ -359,7 +361,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
@ -468,7 +470,7 @@ if (getDolGlobalInt('BANK_COLORIZE_MOVEMENT')) {
|
|||
print '<td colspan="4" width="180" class="nowrap">'.$langs->trans("BankColorizeMovementName".$key)."</td>";
|
||||
// Color
|
||||
print '<td class="nowrap right">';
|
||||
print $formother->selectColor((GETPOST("BANK_COLORIZE_MOVEMENT_COLOR".$key) ? GETPOST("BANK_COLORIZE_MOVEMENT_COLOR".$key) : getDolGlobalString($color)), "BANK_COLORIZE_MOVEMENT_COLOR".$key, 'bankmovementcolorconfig', 1, '', 'right hideifnotset');
|
||||
print $formother->selectColor((GETPOST("BANK_COLORIZE_MOVEMENT_COLOR".$key) ? GETPOST("BANK_COLORIZE_MOVEMENT_COLOR".$key) : getDolGlobalString($color)), "BANK_COLORIZE_MOVEMENT_COLOR".$key, 'bankmovementcolorconfig', 1, array(), 'right hideifnotset');
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -173,6 +173,8 @@ foreach ($dirbarcode as $reldir) {
|
|||
$classname = "mod".ucfirst($filebis);
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModeleBarCode $module';
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
continue;
|
||||
|
|
@ -288,6 +290,9 @@ if (isModEnabled('societe')) {
|
|||
}
|
||||
|
||||
$modBarCode = new $file();
|
||||
|
||||
'@phan-var-force ModeleNumRefBarCode $modBarCode';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.(isset($modBarCode->name) ? $modBarCode->name : $modBarCode->nom)."</td><td>\n";
|
||||
print $modBarCode->info($langs);
|
||||
|
|
|
|||
|
|
@ -212,6 +212,8 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModeleNumRefBoms $module';
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -247,6 +247,8 @@ foreach ($dirmodels as $reldir) {
|
|||
/** @var ModelNumRefContracts $module */
|
||||
$module = new $file($db);
|
||||
|
||||
'@phan-var-force ModelNumRefContracts $module';
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
continue;
|
||||
|
|
@ -383,6 +385,8 @@ foreach ($dirmodels as $reldir) {
|
|||
/** @var ModelePDFContract $module */
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModelePDFContract $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
$modulequalified = 0;
|
||||
|
|
@ -396,7 +400,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -259,6 +259,8 @@ if (getDolGlobalString('MAIN_SUBMODULE_DELIVERY')) {
|
|||
|
||||
$module = new $file();
|
||||
|
||||
'@phan-var-force ModeleNumRefDeliveryOrder $module';
|
||||
|
||||
if ($module->isEnabled()) {
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
|
|
@ -392,6 +394,8 @@ if (getDolGlobalString('MAIN_SUBMODULE_DELIVERY')) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModelePDFDeliveryOrder $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
$modulequalified = 0;
|
||||
|
|
@ -405,7 +409,7 @@ if (getDolGlobalString('MAIN_SUBMODULE_DELIVERY')) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ class Dolistore
|
|||
// Call
|
||||
dol_syslog("Call API with opt = ".var_export($opt, true));
|
||||
$xml = $this->api->get($opt);
|
||||
// @phan-suppress-next-line PhanPluginUnknownObjectMethodCall
|
||||
$this->categories = $xml->categories->children();
|
||||
} catch (PrestaShopWebserviceException $e) {
|
||||
// Here we are dealing with errors
|
||||
|
|
@ -185,6 +186,7 @@ class Dolistore
|
|||
$xml = $this->api->get($opt2);
|
||||
|
||||
$products = array();
|
||||
// @phan-suppress-next-line PhanPluginUnknownObjectMethodCall
|
||||
foreach ($xml->products->children() as $product) {
|
||||
$products[] = (int) $product['id'];
|
||||
}
|
||||
|
|
@ -199,6 +201,7 @@ class Dolistore
|
|||
$xml = $this->api->get($opt2);
|
||||
|
||||
$products = array();
|
||||
// @phan-suppress-next-line PhanPluginUnknownObjectMethodCall
|
||||
foreach ($xml->category->associations->products->children() as $product) {
|
||||
$products[] = (int) $product->id;
|
||||
}
|
||||
|
|
@ -213,6 +216,7 @@ class Dolistore
|
|||
// Call API to get the detail
|
||||
dol_syslog("Call API with opt = ".var_export($opt, true));
|
||||
$xml = $this->api->get($opt);
|
||||
// @phan-suppress-next-line PhanPluginUnknownObjectMethodCall
|
||||
$this->products = $xml->products->children();
|
||||
} catch (PrestaShopWebserviceException $e) {
|
||||
// Here we are dealing with errors
|
||||
|
|
|
|||
|
|
@ -457,6 +457,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
throw new Exception("Failed to refresh access token: ".$e->getMessage());
|
||||
}
|
||||
|
||||
// @phan-suppress-next-line PhanPluginUnknownObjectMethodCall
|
||||
$tokenobj->setRefreshToken($refreshtoken);
|
||||
$storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,6 +203,7 @@ foreach ($dirmodels as $reldir) {
|
|||
require_once $dir.$file.'.php';
|
||||
|
||||
$module = new $file();
|
||||
'@phan-var-force ModelNumRefExpedition $module';
|
||||
|
||||
if ($module->isEnabled()) {
|
||||
// Show modules according to features level
|
||||
|
|
@ -340,6 +341,8 @@ foreach ($dirmodels as $reldir) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModelePdfExpedition $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
$modulequalified = 0;
|
||||
|
|
@ -353,7 +356,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -228,6 +228,8 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
$module = new $file($db);
|
||||
|
||||
'@phan-var-force ModeleNumRefExpenseReport $module';
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
continue;
|
||||
|
|
@ -237,7 +239,7 @@ foreach ($dirmodels as $reldir) {
|
|||
}
|
||||
|
||||
if ($module->isEnabled()) {
|
||||
print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
|
||||
print '<tr class="oddeven"><td>'.$module->getName($langs)."</td><td>\n";
|
||||
print $module->info($langs);
|
||||
print '</td>';
|
||||
|
||||
|
|
@ -359,6 +361,8 @@ foreach ($dirmodels as $reldir) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModeleExpenseReport $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
$modulequalified = 0;
|
||||
|
|
@ -372,7 +376,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
||||
* Copyright (C) 2017 Pierre-Henry Favre <phf@atm-consulting.fr>
|
||||
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -355,7 +356,7 @@ foreach ($rules as $rule) {
|
|||
echo '</tr>';
|
||||
}
|
||||
|
||||
if (count($rules) == 0) {
|
||||
if (!is_array($rules) || count($rules) == 0) {
|
||||
print '<tr class="none"><td colspan="8"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -295,6 +295,8 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
$module = new $file();
|
||||
|
||||
'@phan-var-force ModeleNumRefFicheinter $module';
|
||||
|
||||
if ($module->isEnabled()) {
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
|
|
@ -305,7 +307,7 @@ foreach ($dirmodels as $reldir) {
|
|||
}
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
|
||||
print '<tr class="oddeven"><td>'.$module->getName($langs)."</td><td>\n";
|
||||
print $module->info($langs);
|
||||
print '</td>';
|
||||
|
||||
|
|
@ -432,6 +434,8 @@ foreach ($dirmodels as $reldir) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModelePDFFicheinter $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
$modulequalified = 0;
|
||||
|
|
@ -445,7 +449,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,6 +205,8 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
$module = new $file($db);
|
||||
|
||||
'@phan-var-force ModelNumRefHolidays $module';
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
continue;
|
||||
|
|
@ -345,6 +347,9 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
|
||||
'@phan-var-force ModelePDFHoliday $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
$modulequalified = 0;
|
||||
|
|
@ -358,7 +363,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -262,6 +262,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
|
||||
$module = new $file($db);
|
||||
|
||||
'@phan-var-force ModeleNumRefEvaluation $module';
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
continue;
|
||||
|
|
@ -405,6 +407,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModelePDFEvaluation $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
$modulequalified = 0;
|
||||
|
|
@ -418,7 +422,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -333,6 +333,8 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModeleNumRefFactures $module';
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
continue;
|
||||
|
|
@ -528,6 +530,8 @@ foreach ($dirmodels as $reldir) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModelePDFFactures $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
$modulequalified = 0;
|
||||
|
|
@ -544,7 +548,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -213,6 +213,7 @@ if ($action == 'edit') {
|
|||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// @phan-suppress-next-line PhanEmptyForeach
|
||||
foreach ($arrayofparameters as $constname => $val) {
|
||||
if ($val['enabled'] == 1) {
|
||||
$setupnotempty++;
|
||||
|
|
@ -280,6 +281,7 @@ if ($action == 'edit') {
|
|||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// @phan-suppress-next-line PhanEmptyForeach
|
||||
foreach ($arrayofparameters as $constname => $val) {
|
||||
if ($val['enabled'] == 1) {
|
||||
$setupnotempty++;
|
||||
|
|
@ -379,6 +381,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
|
||||
$module = new $file($db);
|
||||
|
||||
'@phan-var-force ModeleNumRefKnowledgeRecord $module';
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
continue;
|
||||
|
|
@ -520,6 +524,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $className($db);
|
||||
|
||||
'@phan-var-force ModelePDFKnowledgeRecord $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
$modulequalified = 0;
|
||||
|
|
@ -533,7 +539,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -211,6 +211,8 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
$module = new $file($db);
|
||||
|
||||
'@phan-var-force ModeleNumRefMos $module';
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
continue;
|
||||
|
|
@ -346,6 +348,8 @@ foreach ($dirmodels as $reldir) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModelePDFMo $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
$modulequalified = 0;
|
||||
|
|
@ -359,7 +363,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014-2018 Frederic France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2020 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -511,6 +512,9 @@ if ($mode == 'test' && $user->admin) {
|
|||
$classname = 'printing_'.$driver;
|
||||
$langs->load($driver);
|
||||
$printer = new $classname($db);
|
||||
|
||||
'@phan-var-force PrintingDriver $printer';
|
||||
|
||||
//print '<pre>'.print_r($printer, true).'</pre>';
|
||||
if (count($printer->getlistAvailablePrinters())) {
|
||||
if ($printer->listAvailablePrinters() == 0) {
|
||||
|
|
|
|||
|
|
@ -297,6 +297,8 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
$module = new $file($db);
|
||||
|
||||
'@phan-var-force ModeleNumRefCommandes $module';
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
continue;
|
||||
|
|
@ -434,6 +436,8 @@ foreach ($dirmodels as $reldir) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModelePDFCommandes $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
$modulequalified = 0;
|
||||
|
|
@ -447,7 +451,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,6 +91,8 @@ foreach ($modulesdir as $dir) {
|
|||
include_once $dir.$file;
|
||||
$objMod = new $modName($db);
|
||||
|
||||
'@phan-var-force DolibarrModules $objMod';
|
||||
|
||||
// Load all lang files of module
|
||||
if (isset($objMod->langfiles) && is_array($objMod->langfiles)) {
|
||||
foreach ($objMod->langfiles as $domain) {
|
||||
|
|
|
|||
|
|
@ -274,6 +274,8 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
$module = new $file();
|
||||
|
||||
'@phan-var-force ModeleNumRefPropales $module';
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
continue;
|
||||
|
|
@ -283,7 +285,7 @@ foreach ($dirmodels as $reldir) {
|
|||
}
|
||||
|
||||
if ($module->isEnabled()) {
|
||||
print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
|
||||
print '<tr class="oddeven"><td>'.$module->getName($langs)."</td><td>\n";
|
||||
print $module->info($langs);
|
||||
print '</td>';
|
||||
|
||||
|
|
@ -409,6 +411,8 @@ foreach ($dirmodels as $reldir) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModelePDFPropales $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
$modulequalified = 0;
|
||||
|
|
@ -422,7 +426,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,6 +210,8 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
$module = new $file();
|
||||
|
||||
'@phan-var-force ModelNumRefReception $module';
|
||||
|
||||
if ($module->isEnabled()) {
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
|
|
@ -219,7 +221,7 @@ foreach ($dirmodels as $reldir) {
|
|||
continue;
|
||||
}
|
||||
|
||||
print '<tr><td>'.$module->nom."</td>\n";
|
||||
print '<tr><td>'.$module->getName($langs)."</td>\n";
|
||||
print '<td>';
|
||||
print $module->info($langs);
|
||||
print '</td>';
|
||||
|
|
@ -350,6 +352,8 @@ foreach ($dirmodels as $reldir) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModelePdfReception $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if (isset($module->version) && $module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
$modulequalified = 0;
|
||||
|
|
@ -363,7 +367,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ if ($action == 'updateMask') {
|
|||
require_once $file;
|
||||
|
||||
$module = new $classname($db);
|
||||
'@phan-var-force CommonDocGenerator $module';
|
||||
'@phan-var-force ModelePDFStockTransfer $module';
|
||||
|
||||
if ($module->write_file($tmpobject, $langs) > 0) {
|
||||
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf");
|
||||
|
|
@ -269,6 +269,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
|
||||
$module = new $file($db);
|
||||
|
||||
'@phan-var-force ModeleNumRefStockTransfer $module';
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
continue;
|
||||
|
|
@ -408,6 +410,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModelePDFStockTransfer $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
$modulequalified = 0;
|
||||
|
|
@ -421,7 +425,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -236,6 +236,8 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
$module = new $file();
|
||||
|
||||
'@phan-var-force ModeleNumRefSuppliersInvoices $module';
|
||||
|
||||
if ($module->isEnabled()) {
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
|
|
@ -246,7 +248,7 @@ foreach ($dirmodels as $reldir) {
|
|||
}
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
|
||||
print '<tr class="oddeven"><td>'.$module->getName($langs)."</td><td>\n";
|
||||
print $module->info($langs);
|
||||
print '</td>';
|
||||
|
||||
|
|
@ -367,6 +369,8 @@ foreach ($dirmodels as $reldir) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db, new FactureFournisseur($db));
|
||||
|
||||
'@phan-var-force ModelePDFSuppliersInvoices $module';
|
||||
|
||||
|
||||
print "<tr class=\"oddeven\">\n";
|
||||
print "<td>";
|
||||
|
|
@ -376,7 +380,7 @@ foreach ($dirmodels as $reldir) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db, $specimenthirdparty);
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -252,6 +252,8 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
$module = new $file();
|
||||
|
||||
'@phan-var-force ModeleNumRefSuppliersOrders $module';
|
||||
|
||||
if ($module->isEnabled()) {
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
|
|
@ -262,7 +264,7 @@ foreach ($dirmodels as $reldir) {
|
|||
}
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
|
||||
print '<tr class="oddeven"><td>'.$module->getName($langs)."</td><td>\n";
|
||||
print $module->info($langs);
|
||||
print '</td>';
|
||||
|
||||
|
|
@ -379,6 +381,8 @@ foreach ($dirmodels as $reldir) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db, new CommandeFournisseur($db));
|
||||
|
||||
'@phan-var-force ModeleNumRefSuppliersOrders $module';
|
||||
|
||||
|
||||
print "<tr class=\"oddeven\">\n";
|
||||
print "<td>";
|
||||
|
|
@ -388,7 +392,7 @@ foreach ($dirmodels as $reldir) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db, $specimenthirdparty);
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -235,6 +235,8 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
$module = new $classname($db);
|
||||
|
||||
'@phan-var-force ModeleNumRefSupplierPayments $module';
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
continue;
|
||||
|
|
@ -351,6 +353,7 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
'@phan-var-force ModelePDFSuppliersPayments $module';
|
||||
|
||||
print '<tr class="oddeven">'."\n";
|
||||
print "<td>";
|
||||
|
|
@ -358,7 +361,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print "</td>\n";
|
||||
print "<td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ foreach ($dirmodels as $reldir) {
|
|||
}
|
||||
|
||||
if ($module->isEnabled()) {
|
||||
print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
|
||||
print '<tr class="oddeven"><td>'.$module->getName($langs)."</td><td>\n";
|
||||
print $module->info($langs);
|
||||
print '</td>';
|
||||
|
||||
|
|
@ -413,7 +413,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
require_once $dir.'/'.$file.'.php';
|
||||
|
||||
$module = new $file($db);
|
||||
'@phan-var-force CommonNumRefGenerator $module';
|
||||
'@phan-var-force ModeleNumRefWorkstation $module';
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
|
|
@ -300,6 +300,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
|
||||
$nameofclass = ucfirst($myTmpObjectKey);
|
||||
$mytmpinstance = new $nameofclass($db);
|
||||
'@phan-var-force Workstation $mytmpinstance';
|
||||
$mytmpinstance->initAsSpecimen();
|
||||
|
||||
// Info
|
||||
|
|
@ -397,7 +398,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
'@phan-var-force CommonDocGenerator $module';
|
||||
'@phan-var-force ModelePDFWorkstation $module';
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
|
|
@ -412,7 +413,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
print(empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ class Setup extends DolibarrApi
|
|||
* @param string $lang Code of the language the label of the type must be translated to
|
||||
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.label:like:'SO-%')"
|
||||
* @return array List of extra fields
|
||||
* @phan-return Object[] List of extra fields
|
||||
*
|
||||
* @url GET actiontriggers
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1637,6 +1637,9 @@ class Asset extends CommonObject
|
|||
|
||||
if (class_exists($classname)) {
|
||||
$obj = new $classname();
|
||||
|
||||
'@phan-var-force ModeleNumRefAsset $obj';
|
||||
|
||||
$numref = $obj->getNextValue($this);
|
||||
|
||||
if ($numref != '' && $numref != '-1') {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ global $user;
|
|||
global $noMoreLinkedObjectBlockAfter;
|
||||
|
||||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
'@phan-var-force CommonObject[] $linkedObjectBlock';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("assets");
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ if (getDolGlobalString('BARCODE_THIRDPARTY_ADDON_NUM')) {
|
|||
}
|
||||
|
||||
$modBarCodeThirdparty = new $file();
|
||||
'@phan-var-force ModeleNumRefBarCode $module';
|
||||
'@phan-var-force ModeleNumRefBarCode $modBarCodeThirdparty';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -192,7 +192,7 @@ if (getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')) {
|
|||
}
|
||||
|
||||
$modBarCodeProduct = new $file();
|
||||
'@phan-var-force ModeleNumRefBarCode $module';
|
||||
'@phan-var-force ModeleNumRefBarCode $modBarCodeProduct';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -449,6 +449,8 @@ class BOM extends CommonObject
|
|||
|
||||
$objectline = new $objectlineclassname($this->db);
|
||||
|
||||
'@phan-var-force BOMLine $objectline';
|
||||
|
||||
$sql = "SELECT ".$objectline->getFieldList('l');
|
||||
$sql .= " FROM ".$this->db->prefix().$objectline->table_element." as l";
|
||||
$sql .= " LEFT JOIN ".$this->db->prefix()."product as p ON p.rowid = l.fk_product";
|
||||
|
|
@ -466,6 +468,7 @@ class BOM extends CommonObject
|
|||
$obj = $this->db->fetch_object($resql);
|
||||
if ($obj) {
|
||||
$newline = new $objectlineclassname($this->db);
|
||||
'@phan-var-force BOMLine $newline';
|
||||
$newline->setVarsFromFetchObj($obj);
|
||||
|
||||
$this->lines[] = $newline;
|
||||
|
|
@ -883,6 +886,7 @@ class BOM extends CommonObject
|
|||
}
|
||||
|
||||
$obj = new $classname();
|
||||
'@phan-var-force ModeleNumRefBoms $obj';
|
||||
$numref = $obj->getNextValue($prod, $this);
|
||||
|
||||
if ($numref != "") {
|
||||
|
|
@ -1635,9 +1639,9 @@ class BOM extends CommonObject
|
|||
/**
|
||||
* Return clickable link of object (with eventually picto)
|
||||
*
|
||||
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
|
||||
* @param array $arraydata Array of data
|
||||
* @return string HTML Code for Kanban thumb.
|
||||
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
|
||||
* @param array{prod:?Product,selected:int<-1,1>} $arraydata Array of data
|
||||
* @return string HTML Code for Kanban thumb.
|
||||
*/
|
||||
public function getKanbanView($option = '', $arraydata = null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,12 +31,15 @@ global $user, $db;
|
|||
global $noMoreLinkedObjectBlockAfter;
|
||||
|
||||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("bom");
|
||||
|
||||
'@phan-var-force array<int,BOM> $linkedObjectBlock'; // Type before use
|
||||
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
||||
'@phan-var-force array<int,BOM> $linkedObjectBlock'; // Type after dol_sort_array which looses typing
|
||||
|
||||
$total = 0;
|
||||
$ilink = 0;
|
||||
|
|
|
|||
|
|
@ -1027,6 +1027,8 @@ class Availabilities extends CommonObject
|
|||
|
||||
if (class_exists($classname)) {
|
||||
$obj = new $classname();
|
||||
'@phan-var-force CommonNumRefGenerator $obj';
|
||||
|
||||
$numref = $obj->getNextValue($this);
|
||||
|
||||
if ($numref != '' && $numref != '-1') {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2023-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023 Alice Adminson <aadminson@example.com>
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2023-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023 Alice Adminson <aadminson@example.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -122,20 +122,65 @@ class Calendar extends CommonObject
|
|||
'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'position' => 1000, 'notnull' => -1, 'visible' => -2,),
|
||||
'status' => array('type' => 'integer', 'label' => 'Status', 'enabled' => 1, 'position' => 2000, 'notnull' => 1, 'default' => '0', 'visible' => 1, 'index' => 1, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Validated', '9' => 'Closed'), 'validate' => 1,),
|
||||
);
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $rowid;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $entity;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $ref;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $label;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $type;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $visibility;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_soc;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_project;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $description;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $note_public;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $note_private;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_user_creat;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_user_modif;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $import_key;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $status;
|
||||
// END MODULEBUILDER PROPERTIES
|
||||
|
||||
|
|
@ -208,7 +253,7 @@ class Calendar extends CommonObject
|
|||
*
|
||||
* @param User $user User that creates
|
||||
* @param int $fromid Id of object to clone
|
||||
* @return mixed New object created, <0 if KO
|
||||
* @return self|int<-1,-1> New object created, <0 if KO
|
||||
*/
|
||||
public function createFromClone(User $user, $fromid)
|
||||
{
|
||||
|
|
@ -227,7 +272,7 @@ class Calendar extends CommonObject
|
|||
$object->fetchLines();
|
||||
}
|
||||
|
||||
// get lines so they will be clone
|
||||
// get lines so they will be cloned
|
||||
//foreach($this->lines as $line)
|
||||
// $line->fetch_optionals();
|
||||
|
||||
|
|
@ -342,7 +387,7 @@ class Calendar extends CommonObject
|
|||
* @param string $filter Filter as an Universal Search string.
|
||||
* Example: '((client:=:1) OR ((client:>=:2) AND (client:<=:3))) AND (client:!=:8) AND (nom:like:'a%')'
|
||||
* @param string $filtermode No more used
|
||||
* @return array|int int <0 if KO, array of pages if OK
|
||||
* @return self[]|int int <0 if KO, array of pages if OK
|
||||
*/
|
||||
public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = '', $filtermode = 'AND')
|
||||
{
|
||||
|
|
@ -771,7 +816,7 @@ class Calendar extends CommonObject
|
|||
* Return a thumb for kanban views
|
||||
*
|
||||
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
|
||||
* @param array $arraydata Array of data
|
||||
* @param array{string,mixed} $arraydata Array of data
|
||||
* @return string HTML Code for Kanban thumb.
|
||||
*/
|
||||
public function getKanbanView($option = '', $arraydata = null)
|
||||
|
|
@ -913,7 +958,7 @@ class Calendar extends CommonObject
|
|||
/**
|
||||
* Create an array of lines
|
||||
*
|
||||
* @return array|int array of lines if OK, <0 if KO
|
||||
* @return CalendarLine[]|int array of lines if OK, <0 if KO
|
||||
*/
|
||||
public function getLinesArray()
|
||||
{
|
||||
|
|
@ -967,6 +1012,8 @@ class Calendar extends CommonObject
|
|||
|
||||
if (class_exists($classname)) {
|
||||
$obj = new $classname();
|
||||
'@phan-var-force CommonNumRefGenerator $obj';
|
||||
|
||||
$numref = $obj->getNextValue($this);
|
||||
|
||||
if ($numref != '' && $numref != '-1') {
|
||||
|
|
@ -994,7 +1041,7 @@ class Calendar extends CommonObject
|
|||
* @param int $hidedetails Hide details of lines
|
||||
* @param int $hidedesc Hide description
|
||||
* @param int $hideref Hide ref
|
||||
* @param null|array $moreparams Array to provide more information
|
||||
* @param ?array<string,string> $moreparams Array to provide more information
|
||||
* @return int 0 if KO, 1 if OK
|
||||
*/
|
||||
public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
|
||||
|
|
|
|||
|
|
@ -1456,7 +1456,7 @@ class Categorie extends CommonObject
|
|||
/**
|
||||
* Returns an array containing the list of parent categories
|
||||
*
|
||||
* @return int|array Return integer <0 KO, array OK
|
||||
* @return int|Categorie[] Return integer <0 KO, array OK
|
||||
*/
|
||||
public function get_meres()
|
||||
{
|
||||
|
|
@ -1488,7 +1488,7 @@ class Categorie extends CommonObject
|
|||
* Returns in a table all possible paths to get to the category
|
||||
* starting with the major categories represented by Tables of categories
|
||||
*
|
||||
* @return array
|
||||
* @return Categorie[][]
|
||||
*/
|
||||
public function get_all_ways()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -682,7 +682,7 @@ if (empty($reshook)) {
|
|||
$remise_percent = (GETPOST('remiseforalllines') ? GETPOST('remiseforalllines') : 0);
|
||||
$remise_percent = str_replace('*', '', $remise_percent);
|
||||
foreach ($object->lines as $line) {
|
||||
$tvatx= $line->tva_tx;
|
||||
$tvatx = $line->tva_tx;
|
||||
if (!empty($line->vat_src_code)) {
|
||||
$tvatx .= ' ('.$line->vat_src_code.')';
|
||||
}
|
||||
|
|
@ -1913,7 +1913,7 @@ if ($action == 'create' && $usercancreate) {
|
|||
print "<tr><td>".$langs->trans("DefaultContact").'</td><td>';
|
||||
print img_picto('', 'contact', 'class="pictofixedwidth"');
|
||||
//print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, empty($srccontactslist) ? "" : $srccontactslist, '', 1, 'maxwidth300 widthcentpercentminusx');
|
||||
print $form->select_contact($soc->id, $contactid, 'contactid', 1, empty($srccontactslist) ? "" : $srccontactslist, '', 1, 'maxwidth300 widthcentpercentminusx', true);
|
||||
print $form->select_contact($soc->id, $contactid, 'contactid', 1, empty($srccontactslist) ? "" : $srccontactslist, '', 1, 'maxwidth300 widthcentpercentminusx', true);
|
||||
print '</td></tr>';
|
||||
|
||||
// Ligne info remises tiers
|
||||
|
|
@ -2273,6 +2273,7 @@ if ($action == 'create' && $usercancreate) {
|
|||
|
||||
if (array_key_exists('facture', $object->linkedObjects)) {
|
||||
foreach ($object->linkedObjects['facture'] as $invoice) {
|
||||
'@phan-var-force Facture $invoice';
|
||||
if ($invoice->type == Facture::TYPE_DEPOSIT) {
|
||||
$eligibleForDepositGeneration = false;
|
||||
break;
|
||||
|
|
@ -2286,6 +2287,7 @@ if ($action == 'create' && $usercancreate) {
|
|||
|
||||
if (array_key_exists('facture', $proposal->linkedObjects)) {
|
||||
foreach ($proposal->linkedObjects['facture'] as $invoice) {
|
||||
'@phan-var-force Facture $invoice';
|
||||
if ($invoice->type == Facture::TYPE_DEPOSIT) {
|
||||
$eligibleForDepositGeneration = false;
|
||||
break 2;
|
||||
|
|
|
|||
|
|
@ -450,7 +450,8 @@ class RemiseCheque extends CommonObject
|
|||
}
|
||||
|
||||
$obj = new $classname();
|
||||
'@phan-var-force CommonNumRefGenerator $obj';
|
||||
'@phan-var-force ModeleNumRefChequeReceipts $obj';
|
||||
|
||||
$numref = "";
|
||||
$numref = $obj->getNextValue($mysoc, $this);
|
||||
|
||||
|
|
@ -459,7 +460,7 @@ class RemiseCheque extends CommonObject
|
|||
* set up mask.
|
||||
*/
|
||||
if ($mode != 'last' && !$numref) {
|
||||
dol_print_error($db, "ChequeReceipts::getNextNumRef ".$obj->error);
|
||||
dol_print_error($db, "ChequeReceipts::getNextValue ".$obj->error);
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
@ -591,7 +592,7 @@ class RemiseCheque extends CommonObject
|
|||
|
||||
$classname = 'BordereauCheque'.ucfirst($model);
|
||||
$docmodel = new $classname($this->db);
|
||||
'@phan-var-force CommonDocGenerator $module';
|
||||
'@phan-var-force ModeleChequeReceipts $docmodel';
|
||||
|
||||
$sql = "SELECT b.banque, b.emetteur, b.amount, b.num_chq";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||
|
|
|
|||
|
|
@ -173,12 +173,9 @@ if ($year > 0) {
|
|||
$sql .= " OR (cs.periode IS NULL AND cs.date_ech between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')";
|
||||
$sql .= ")";
|
||||
}
|
||||
if (preg_match('/^cs\./', $sortfield)
|
||||
|| preg_match('/^c\./', $sortfield)
|
||||
|| preg_match('/^pc\./', $sortfield)
|
||||
|| preg_match('/^pct\./', $sortfield)
|
||||
|| preg_match('/^u\./', $sortfield)
|
||||
|| preg_match('/^ba\./', $sortfield)) {
|
||||
if ($sortfield !== null
|
||||
&& preg_match('/^(cs|c|pc|pct|u|ba)\./', $sortfield)
|
||||
) {
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -201,11 +201,9 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) {
|
|||
$sql .= " OR (tva.datev IS NULL AND tva.datev between '" . $db->idate(dol_get_first_day($year)) . "' AND '" . $db->idate(dol_get_last_day($year)) . "')";
|
||||
$sql .= ")";
|
||||
}
|
||||
if (preg_match('/^cs\./', $sortfield)
|
||||
|| preg_match('/^tva\./', $sortfield)
|
||||
|| preg_match('/^ptva\./', $sortfield)
|
||||
|| preg_match('/^pct\./', $sortfield)
|
||||
|| preg_match('/^bank\./', $sortfield)) {
|
||||
if ($sortfield !== null
|
||||
&& preg_match('/^(cs|tva|ptva|pct|bank)\./', $sortfield)
|
||||
) {
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -584,7 +584,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
$tva_tx = str_replace('*', '', $tva_tx);
|
||||
$desc = $product_desc;
|
||||
$fk_unit = GETPOST('units', 'alpha');
|
||||
$fk_unit = GETPOSTINT('units');
|
||||
$pu_ht_devise = price2num($price_ht_devise, 'MU');
|
||||
$pu_ttc_devise = price2num($price_ttc_devise, 'MU');
|
||||
|
||||
|
|
@ -762,7 +762,7 @@ if (empty($reshook)) {
|
|||
$pa_ht = null;
|
||||
}
|
||||
|
||||
$fk_unit = GETPOST('unit', 'alpha');
|
||||
$fk_unit = GETPOSTINT('unit');
|
||||
|
||||
// update price_ht with discount
|
||||
// TODO Use object->updateline instead objectline->update
|
||||
|
|
@ -793,7 +793,7 @@ if (empty($reshook)) {
|
|||
// $objectline->rang = $objectline->rang;
|
||||
|
||||
if ($fk_unit > 0) {
|
||||
$objectline->fk_unit = GETPOST('unit');
|
||||
$objectline->fk_unit = GETPOSTINT('unit');
|
||||
} else {
|
||||
$objectline->fk_unit = null;
|
||||
}
|
||||
|
|
@ -1740,7 +1740,7 @@ if ($action == 'create') {
|
|||
// Ligne carac
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
$currentLineProductId=GETPOSTISSET('idprod')?GETPOST('idprod'):(!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0);
|
||||
$currentLineProductId = GETPOSTISSET('idprod') ? GETPOST('idprod') : (!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0);
|
||||
if ($objp->fk_product > 0) {
|
||||
$canchangeproduct = 1;
|
||||
|
||||
|
|
@ -1773,7 +1773,7 @@ if ($action == 'create') {
|
|||
if (getDolGlobalString('MAIN_INPUT_DESC_HEIGHT')) {
|
||||
$nbrows = getDolGlobalString('MAIN_INPUT_DESC_HEIGHT');
|
||||
}
|
||||
$doleditor = new DolEditor('product_desc', (GETPOSTISSET('product_desc')?GETPOST('product_desc'):$objp->description), '', 92, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_DETAILS'), $nbrows, '90%');
|
||||
$doleditor = new DolEditor('product_desc', (GETPOSTISSET('product_desc') ? GETPOST('product_desc') : $objp->description), '', 92, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_DETAILS'), $nbrows, '90%');
|
||||
$doleditor->Create();
|
||||
|
||||
print '</td>';
|
||||
|
|
@ -1784,7 +1784,7 @@ if ($action == 'create') {
|
|||
print '</td>';
|
||||
|
||||
// Price
|
||||
print '<td class="right"><input class="width50" type="text" name="elprice" value="'.(GETPOSTISSET('elprice')?GETPOST('elprice'):price($objp->subprice)).'"></td>';
|
||||
print '<td class="right"><input class="width50" type="text" name="elprice" value="'.(GETPOSTISSET('elprice') ? GETPOST('elprice') : price($objp->subprice)).'"></td>';
|
||||
|
||||
// Price multicurrency
|
||||
/*if (isModEnabled("multicurrency")) {
|
||||
|
|
@ -1792,24 +1792,24 @@ if ($action == 'create') {
|
|||
}*/
|
||||
|
||||
// Quantity
|
||||
print '<td class="center"><input size="2" type="text" name="elqty" value="'.(GETPOSTISSET('elqty')?GETPOST('elqty'):$objp->qty).'"></td>';
|
||||
print '<td class="center"><input size="2" type="text" name="elqty" value="'.(GETPOSTISSET('elqty') ? GETPOST('elqty') : $objp->qty).'"></td>';
|
||||
|
||||
// Unit
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
print '<td class="left">';
|
||||
print $form->selectUnits((GETPOSTISSET('unit')?GETPOST('unit'):$objp->fk_unit), "unit");
|
||||
print $form->selectUnits((GETPOSTISSET('unit') ? GETPOSTINT('unit') : $objp->fk_unit), "unit");
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Discount
|
||||
print '<td class="nowraponall right"><input size="1" type="text" name="elremise_percent" value="'.(GETPOSTISSET('elremise_percent')?GETPOST('elremise_percent'):$objp->remise_percent).'">%</td>';
|
||||
print '<td class="nowraponall right"><input size="1" type="text" name="elremise_percent" value="'.(GETPOSTISSET('elremise_percent') ? GETPOST('elremise_percent') : $objp->remise_percent).'">%</td>';
|
||||
|
||||
if (!empty($usemargins)) {
|
||||
print '<td class="right">';
|
||||
if ($objp->fk_product) {
|
||||
print '<select id="fournprice" name="fournprice"></select>';
|
||||
}
|
||||
print '<input id="buying_price" type="text" class="width50" name="buying_price" value="'.price((GETPOSTISSET('buying_price')?GETPOST('buying_price'):$objp->pa_ht), 0, '', 0).'"></td>';
|
||||
print '<input id="buying_price" type="text" class="width50" name="buying_price" value="'.price((GETPOSTISSET('buying_price') ? GETPOST('buying_price') : $objp->pa_ht), 0, '', 0).'"></td>';
|
||||
}
|
||||
print '<td class="center">';
|
||||
print '<input type="submit" class="button margintoponly marginbottomonly" name="save" value="'.$langs->trans("Modify").'">';
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
|
||||
* Copyright (C) 2018-2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -41,12 +42,12 @@ class box_last_knowledgerecord extends ModeleBoxes
|
|||
public $boximg = "knowledgemanagement";
|
||||
|
||||
/**
|
||||
* @var string boc label
|
||||
* @var string box label
|
||||
*/
|
||||
public $boxlabel;
|
||||
|
||||
/**
|
||||
* @var array box dependencies
|
||||
* @var string[] box dependencies
|
||||
*/
|
||||
public $depends = array("knowledgemanagement");
|
||||
|
||||
|
|
@ -98,7 +99,7 @@ class box_last_knowledgerecord extends ModeleBoxes
|
|||
$sql .= " AND k.fk_soc= ".((int) $user->socid);
|
||||
}
|
||||
|
||||
$sql.= " AND k.status > 0";
|
||||
$sql .= " AND k.status > 0";
|
||||
|
||||
$sql .= " ORDER BY k.date_creation DESC, k.rowid DESC ";
|
||||
$sql .= $this->db->plimit($max, 0);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
|
||||
* Copyright (C) 2018-2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -46,7 +47,7 @@ class box_last_modified_knowledgerecord extends ModeleBoxes
|
|||
public $boxlabel;
|
||||
|
||||
/**
|
||||
* @var array box dependencies
|
||||
* @var string[] box dependencies
|
||||
*/
|
||||
public $depends = array("knowledgemanagement");
|
||||
|
||||
|
|
@ -98,7 +99,7 @@ class box_last_modified_knowledgerecord extends ModeleBoxes
|
|||
$sql .= " AND k.fk_soc= ".((int) $user->socid);
|
||||
}
|
||||
|
||||
$sql.= " AND k.status > 0";
|
||||
$sql .= " AND k.status > 0";
|
||||
|
||||
$sql .= " ORDER BY k.tms DESC, k.rowid DESC ";
|
||||
$sql .= $this->db->plimit($max, 0);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -39,6 +39,13 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo
|
|||
*/
|
||||
public $db;
|
||||
|
||||
/**
|
||||
* Must be defined in the box class
|
||||
*
|
||||
* @var ''|'development'|'experimental'|'dolibarr'
|
||||
*/
|
||||
public $version;
|
||||
|
||||
/**
|
||||
* @var string param
|
||||
*/
|
||||
|
|
@ -60,7 +67,7 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo
|
|||
public $error = '';
|
||||
|
||||
/**
|
||||
* @var int Maximum lines
|
||||
* @var int<0,max> Maximum lines
|
||||
*/
|
||||
public $max = 5;
|
||||
|
||||
|
|
@ -131,6 +138,24 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo
|
|||
public $widgettype = '';
|
||||
|
||||
|
||||
//! Must be provided in child classes
|
||||
/**
|
||||
* Note $picto is deprecated
|
||||
*
|
||||
* @var string Example "accountancy"
|
||||
*/
|
||||
public $boximg;
|
||||
/**
|
||||
* @var string Example "BoxLastManualEntries"
|
||||
*/
|
||||
public $boxlabel;
|
||||
/**
|
||||
* @var string[] Example array("accounting")
|
||||
*/
|
||||
public $depends;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
|
@ -156,9 +181,9 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo
|
|||
/**
|
||||
* Load a box line from its rowid
|
||||
*
|
||||
* @param int $rowid Row id to load
|
||||
* @param int $rowid Row id to load
|
||||
*
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
* @return int<-1,1> Return integer <0 if KO, >0 if OK
|
||||
*/
|
||||
public function fetch($rowid)
|
||||
{
|
||||
|
|
@ -196,7 +221,7 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo
|
|||
*
|
||||
* @param array{text?:string,sublink?:string,subpicto:?string,nbcol?:int,limit?:int,subclass?:string,graph?:string} $head Array with properties of box title
|
||||
* @param array<array<array{tr?:string,td?:string,target?:string,text?:string,text2?:string,textnoformat?:string,tooltip?:string,logo?:string,url?:string,maxlength?:string}>> $contents Array with properties of box lines
|
||||
* @param int $nooutput No print, only return string
|
||||
* @param int<0,1> $nooutput No print, only return string
|
||||
* @return string
|
||||
*/
|
||||
public function showBox($head, $contents, $nooutput = 0)
|
||||
|
|
@ -417,7 +442,8 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo
|
|||
* List is sorted by widget filename so by priority to run.
|
||||
*
|
||||
* @param ?string[] $forcedirwidget null=All default directories. This parameter is used by modulebuilder module only.
|
||||
* @return array Array list of widget
|
||||
* @return array<array{picto:string,file:string,fullpath:string,relpath:string,iscoreorexternal:'external'|'internal',version:string,status:string,info:string}> Array list of widgets
|
||||
*
|
||||
*/
|
||||
public static function getWidgetsList($forcedirwidget = null)
|
||||
{
|
||||
|
|
@ -503,6 +529,7 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo
|
|||
}
|
||||
|
||||
$objMod = new $modName($db);
|
||||
'@phan-var-force ModeleBoxes $objMod';
|
||||
if (is_object($objMod)) {
|
||||
// Define disabledbyname and disabledbymodule
|
||||
$disabledbyname = 0;
|
||||
|
|
@ -513,9 +540,8 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo
|
|||
if (preg_match('/NORUN$/i', $files[$key])) {
|
||||
$disabledbyname = 1;
|
||||
}
|
||||
|
||||
// We set info of modules
|
||||
$widget[$j]['picto'] = (empty($objMod->picto) ? (empty($objMod->boximg) ? img_object('', 'generic') : $objMod->boximg) : img_object('', $objMod->picto));
|
||||
$widget[$j]['picto'] = ((!property_exists($objMod, 'picto') || empty($objMod->picto)) ? (empty($objMod->boximg) ? img_object('', 'generic') : $objMod->boximg) : img_object('', $objMod->picto));
|
||||
$widget[$j]['file'] = $files[$key];
|
||||
$widget[$j]['fullpath'] = $fullpath[$key];
|
||||
$widget[$j]['relpath'] = $relpath[$key];
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ abstract class CommonDocGenerator
|
|||
public $name = '';
|
||||
|
||||
/**
|
||||
* @var string Version
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
|
|
@ -1033,6 +1033,7 @@ abstract class CommonDocGenerator
|
|||
dol_include_once($InfoFieldList[1]);
|
||||
if ($classname && class_exists($classname)) {
|
||||
$tmpobject = new $classname($this->db);
|
||||
'@phan-var-force CommonObject $tmpobject';
|
||||
$tmpobject->fetch($id);
|
||||
// completely replace the id with the linked object name
|
||||
$formatedarrayoption['options_'.$key] = $tmpobject->name;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ abstract class CommonNumRefGenerator
|
|||
public $name = '';
|
||||
|
||||
/**
|
||||
* @var string Version
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'experimental'|'dolibarr' Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
|
|
@ -164,4 +164,12 @@ abstract class CommonNumRefGenerator
|
|||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
abstract public function getExample();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,12 +166,12 @@ abstract class CommonObject
|
|||
public $linkedObjectsIds;
|
||||
|
||||
/**
|
||||
* @var mixed Array of linked objects. Loaded by ->fetchObjectLinked
|
||||
* @var array<string,CommonObject[]> Array of linked objects. Loaded by ->fetchObjectLinked, key = object type
|
||||
*/
|
||||
public $linkedObjects;
|
||||
|
||||
/**
|
||||
* @var boolean[] Array of boolean with object id as key and value as true if linkedObjects full loaded for object id. Loaded by ->fetchObjectLinked. Important for pdf generation time reduction.
|
||||
* @var array<int,bool> Array of boolean with object id as key and value as true if linkedObjects full loaded for object id. Loaded by ->fetchObjectLinked. Important for pdf generation time reduction.
|
||||
*/
|
||||
private $linkedObjectsFullLoaded = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -28,7 +29,7 @@
|
|||
trait CommonSocialNetworks
|
||||
{
|
||||
/**
|
||||
* @var array array of socialnetworks
|
||||
* @var array<string,string>
|
||||
*/
|
||||
public $socialnetworks;
|
||||
|
||||
|
|
@ -36,7 +37,7 @@ trait CommonSocialNetworks
|
|||
/**
|
||||
* Show social network part if the module is enabled with hiding functionality
|
||||
*
|
||||
* @param array $socialnetworks Array of social networks
|
||||
* @param array<string,array{active:int<0,1>,icon:string,label:string}> $socialnetworks Array of social networks
|
||||
* @param int $colspan Colspan
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2093,6 +2093,7 @@ class ExtraFields
|
|||
dol_include_once($InfoFieldList[1]);
|
||||
if ($classname && class_exists($classname)) {
|
||||
$object = new $classname($this->db);
|
||||
'@phan-var-force CommonObject $object';
|
||||
$object->fetch($value);
|
||||
$value = $object->getNomUrl(3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5036,7 +5036,7 @@ class Form
|
|||
/**
|
||||
* Creates HTML units selector (code => label)
|
||||
*
|
||||
* @param string $selected Preselected Unit ID
|
||||
* @param int|'' $selected Preselected Unit ID
|
||||
* @param string $htmlname Select name
|
||||
* @param int<0,1> $showempty Add an empty line
|
||||
* @param string $unit_type Restrict to one given unit type
|
||||
|
|
@ -5085,7 +5085,7 @@ class Form
|
|||
/**
|
||||
* Return a HTML select list of bank accounts
|
||||
*
|
||||
* @param int|string $selected Id account preselected
|
||||
* @param int|'' $selected Id account preselected
|
||||
* @param string $htmlname Name of select zone
|
||||
* @param int $status Status of searched accounts (0=open, 1=closed, 2=both)
|
||||
* @param string $filtre To filter the list. This parameter must not come from input of users
|
||||
|
|
@ -9067,7 +9067,7 @@ class Form
|
|||
$tmpvalue = empty($value['label']) ? '' : $value['label'];
|
||||
$tmpcolor = empty($value['color']) ? '' : $value['color'];
|
||||
$tmppicto = empty($value['picto']) ? '' : $value['picto'];
|
||||
$tmplabelhtml = empty($value['labelhtml']) ? (empty($value['data-html']) ? '' : $value['data-html']): $value['labelhtml'];
|
||||
$tmplabelhtml = empty($value['labelhtml']) ? (empty($value['data-html']) ? '' : $value['data-html']) : $value['labelhtml'];
|
||||
}
|
||||
$newval = ($translate ? $langs->trans($tmpvalue) : $tmpvalue);
|
||||
$newval = ($key_in_label ? $tmpkey . ' - ' . $newval : $newval);
|
||||
|
|
|
|||
|
|
@ -1776,14 +1776,14 @@ class FormMail extends Form
|
|||
}
|
||||
|
||||
/**
|
||||
* Find if template exists and are available for current user, then set them into $this->lines_model.
|
||||
* Search into table c_email_templates
|
||||
* Find if template exists and are available for current user, then set them into $this->lines_model.
|
||||
* Search in table c_email_templates
|
||||
*
|
||||
* @param string $type_template Get message for key module
|
||||
* @param User $user Use template public or limited to this user
|
||||
* @param Translate $outputlangs Output lang object
|
||||
* @param int $active 1=Only active template, 0=Only disabled, -1=All
|
||||
* @return int Return integer <0 if KO, nb of records found if OK
|
||||
* @param string $type_template Get message for key module
|
||||
* @param User $user Use template public or limited to this user
|
||||
* @param ?Translate $outputlangs Output lang object
|
||||
* @param int<-1,1> $active 1=Only active template, 0=Only disabled, -1=All
|
||||
* @return int<-1,max> Return integer <0 if KO, nb of records found if OK
|
||||
*/
|
||||
public function fetchAllEMailTemplate($type_template, $user, $outputlangs, $active = 1)
|
||||
{
|
||||
|
|
@ -2036,28 +2036,28 @@ class ModelMail extends CommonObject
|
|||
/**
|
||||
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields=array(
|
||||
"rowid" => array("type"=>"integer", "label"=>"TechnicalID", "enabled"=>"1", 'position'=>10, 'notnull'=>1, "visible"=>"-1",),
|
||||
"module" => array("type"=>"varchar(32)", "label"=>"Module", "enabled"=>"1", 'position'=>20, 'notnull'=>0, "visible"=>"-1",),
|
||||
"type_template" => array("type"=>"varchar(32)", "label"=>"Typetemplate", "enabled"=>"1", 'position'=>25, 'notnull'=>0, "visible"=>"-1",),
|
||||
"lang" => array("type"=>"varchar(6)", "label"=>"Lang", "enabled"=>"1", 'position'=>30, 'notnull'=>0, "visible"=>"-1",),
|
||||
"private" => array("type"=>"smallint(6)", "label"=>"Private", "enabled"=>"1", 'position'=>35, 'notnull'=>1, "visible"=>"-1",),
|
||||
"fk_user" => array("type"=>"integer:User:user/class/user.class.php", "label"=>"Fkuser", "enabled"=>"1", 'position'=>40, 'notnull'=>0, "visible"=>"-1", "css"=>"maxwidth500 widthcentpercentminusxx", "csslist"=>"tdoverflowmax150",),
|
||||
"datec" => array("type"=>"datetime", "label"=>"DateCreation", "enabled"=>"1", 'position'=>45, 'notnull'=>0, "visible"=>"-1",),
|
||||
"tms" => array("type"=>"timestamp", "label"=>"DateModification", "enabled"=>"1", 'position'=>50, 'notnull'=>1, "visible"=>"-1",),
|
||||
"label" => array("type"=>"varchar(255)", "label"=>"Label", "enabled"=>"1", 'position'=>55, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1", "css"=>"minwidth300", "cssview"=>"wordbreak", "csslist"=>"tdoverflowmax150",),
|
||||
"position" => array("type"=>"smallint(6)", "label"=>"Position", "enabled"=>"1", 'position'=>60, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",),
|
||||
"active" => array("type"=>"integer", "label"=>"Active", "enabled"=>"1", 'position'=>65, 'notnull'=>1, "visible"=>"-1", "alwayseditable"=>"1",),
|
||||
"topic" => array("type"=>"text", "label"=>"Topic", "enabled"=>"1", 'position'=>70, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",),
|
||||
"content" => array("type"=>"mediumtext", "label"=>"Content", "enabled"=>"1", 'position'=>75, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",),
|
||||
"content_lines" => array("type"=>"text", "label"=>"Contentlines", "enabled"=>"1", 'position'=>80, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",),
|
||||
"enabled" => array("type"=>"varchar(255)", "label"=>"Enabled", "enabled"=>"1", 'position'=>85, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",),
|
||||
"joinfiles" => array("type"=>"varchar(255)", "label"=>"Joinfiles", "enabled"=>"1", 'position'=>90, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",),
|
||||
"email_from" => array("type"=>"varchar(255)", "label"=>"Emailfrom", "enabled"=>"1", 'position'=>95, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",),
|
||||
"email_to" => array("type"=>"varchar(255)", "label"=>"Emailto", "enabled"=>"1", 'position'=>100, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",),
|
||||
"email_tocc" => array("type"=>"varchar(255)", "label"=>"Emailtocc", "enabled"=>"1", 'position'=>105, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",),
|
||||
"email_tobcc" => array("type"=>"varchar(255)", "label"=>"Emailtobcc", "enabled"=>"1", 'position'=>110, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",),
|
||||
"defaultfortype" => array("type"=>"smallint(6)", "label"=>"Defaultfortype", "enabled"=>"1", 'position'=>115, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",),
|
||||
public $fields = array(
|
||||
"rowid" => array("type" => "integer", "label" => "TechnicalID", "enabled" => "1", 'position' => 10, 'notnull' => 1, "visible" => "-1",),
|
||||
"module" => array("type" => "varchar(32)", "label" => "Module", "enabled" => "1", 'position' => 20, 'notnull' => 0, "visible" => "-1",),
|
||||
"type_template" => array("type" => "varchar(32)", "label" => "Typetemplate", "enabled" => "1", 'position' => 25, 'notnull' => 0, "visible" => "-1",),
|
||||
"lang" => array("type" => "varchar(6)", "label" => "Lang", "enabled" => "1", 'position' => 30, 'notnull' => 0, "visible" => "-1",),
|
||||
"private" => array("type" => "smallint(6)", "label" => "Private", "enabled" => "1", 'position' => 35, 'notnull' => 1, "visible" => "-1",),
|
||||
"fk_user" => array("type" => "integer:User:user/class/user.class.php", "label" => "Fkuser", "enabled" => "1", 'position' => 40, 'notnull' => 0, "visible" => "-1", "css" => "maxwidth500 widthcentpercentminusxx", "csslist" => "tdoverflowmax150",),
|
||||
"datec" => array("type" => "datetime", "label" => "DateCreation", "enabled" => "1", 'position' => 45, 'notnull' => 0, "visible" => "-1",),
|
||||
"tms" => array("type" => "timestamp", "label" => "DateModification", "enabled" => "1", 'position' => 50, 'notnull' => 1, "visible" => "-1",),
|
||||
"label" => array("type" => "varchar(255)", "label" => "Label", "enabled" => "1", 'position' => 55, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1", "css" => "minwidth300", "cssview" => "wordbreak", "csslist" => "tdoverflowmax150",),
|
||||
"position" => array("type" => "smallint(6)", "label" => "Position", "enabled" => "1", 'position' => 60, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",),
|
||||
"active" => array("type" => "integer", "label" => "Active", "enabled" => "1", 'position' => 65, 'notnull' => 1, "visible" => "-1", "alwayseditable" => "1",),
|
||||
"topic" => array("type" => "text", "label" => "Topic", "enabled" => "1", 'position' => 70, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",),
|
||||
"content" => array("type" => "mediumtext", "label" => "Content", "enabled" => "1", 'position' => 75, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",),
|
||||
"content_lines" => array("type" => "text", "label" => "Contentlines", "enabled" => "1", 'position' => 80, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",),
|
||||
"enabled" => array("type" => "varchar(255)", "label" => "Enabled", "enabled" => "1", 'position' => 85, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",),
|
||||
"joinfiles" => array("type" => "varchar(255)", "label" => "Joinfiles", "enabled" => "1", 'position' => 90, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",),
|
||||
"email_from" => array("type" => "varchar(255)", "label" => "Emailfrom", "enabled" => "1", 'position' => 95, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",),
|
||||
"email_to" => array("type" => "varchar(255)", "label" => "Emailto", "enabled" => "1", 'position' => 100, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",),
|
||||
"email_tocc" => array("type" => "varchar(255)", "label" => "Emailtocc", "enabled" => "1", 'position' => 105, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",),
|
||||
"email_tobcc" => array("type" => "varchar(255)", "label" => "Emailtobcc", "enabled" => "1", 'position' => 110, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",),
|
||||
"defaultfortype" => array("type" => "smallint(6)", "label" => "Defaultfortype", "enabled" => "1", 'position' => 115, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",),
|
||||
);
|
||||
public $rowid;
|
||||
public $type_template;
|
||||
|
|
|
|||
|
|
@ -1063,9 +1063,11 @@ class Ldap
|
|||
/**
|
||||
* Returns an array containing attributes and values for first record
|
||||
*
|
||||
* array{count:int,0..max:string,string:array}
|
||||
*
|
||||
* @param string $dn DN entry key
|
||||
* @param string $filter Filter
|
||||
* @return int|array if KO: <=0 || if OK: array
|
||||
* @return int|array<'count'|int|string,int|string|array> if KO: <=0 || if OK: array
|
||||
*/
|
||||
public function getAttribute($dn, $filter)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -909,8 +909,8 @@ function security_prepare_head()
|
|||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param object $object Descriptor class
|
||||
* @return array Array of tabs to show
|
||||
* @param DolibarrModules $object Descriptor class
|
||||
* @return array<array<int,string>> Array of tabs to show
|
||||
*/
|
||||
function modulehelp_prepare_head($object)
|
||||
{
|
||||
|
|
@ -1172,6 +1172,7 @@ function activateModule($value, $withdeps = 1, $noconfverification = 0)
|
|||
}
|
||||
|
||||
$objMod = new $modName($db);
|
||||
'@phan-var-force DolibarrModules $objMod';
|
||||
|
||||
// Test if PHP version ok
|
||||
$verphp = versionphparray();
|
||||
|
|
@ -1313,6 +1314,7 @@ function unActivateModule($value, $requiredby = 1)
|
|||
|
||||
if ($found) {
|
||||
$objMod = new $modName($db);
|
||||
'@phan-var-force DolibarrModules $objMod';
|
||||
$result = $objMod->remove();
|
||||
if ($result <= 0) {
|
||||
$ret = $objMod->error;
|
||||
|
|
@ -1385,6 +1387,7 @@ function complete_dictionary_with_modules(&$taborder, &$tabname, &$tablib, &$tab
|
|||
if ($modName) {
|
||||
include_once $dir.$file;
|
||||
$objMod = new $modName($db);
|
||||
'@phan-var-force DolibarrModules $objMod';
|
||||
|
||||
if ($objMod->numero > 0) {
|
||||
$j = $objMod->numero;
|
||||
|
|
@ -1417,7 +1420,9 @@ function complete_dictionary_with_modules(&$taborder, &$tabname, &$tablib, &$tab
|
|||
|
||||
// phpcs:disable
|
||||
// Complete the arrays &$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond
|
||||
// @phan-suppress-next-line PhanUndeclaredProperty
|
||||
if (empty($objMod->dictionaries) && !empty($objMod->{"dictionnaries"})) {
|
||||
// @phan-suppress-next-line PhanUndeclaredProperty
|
||||
$objMod->dictionaries = $objMod->{"dictionnaries"}; // For backward compatibility
|
||||
}
|
||||
// phpcs:enable
|
||||
|
|
@ -1549,6 +1554,7 @@ function activateModulesRequiredByCountry($country_code)
|
|||
if ($modName) {
|
||||
include_once $dir.$file;
|
||||
$objMod = new $modName($db);
|
||||
'@phan-var-force DolibarrModules $objMod';
|
||||
|
||||
$modulequalified = 1;
|
||||
|
||||
|
|
@ -1567,7 +1573,7 @@ function activateModulesRequiredByCountry($country_code)
|
|||
|
||||
if ($modulequalified) {
|
||||
// Load languages files of module
|
||||
if (isset($objMod->automatic_activation) && is_array($objMod->automatic_activation) && isset($objMod->automatic_activation[$country_code])) {
|
||||
if (property_exists($objMod, 'automatic_activation') && isset($objMod->automatic_activation) && is_array($objMod->automatic_activation) && isset($objMod->automatic_activation[$country_code])) {
|
||||
activateModule($modName);
|
||||
|
||||
setEventMessages($objMod->automatic_activation[$country_code], null, 'warnings');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2021 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -121,12 +122,12 @@ function show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass)
|
|||
/**
|
||||
* Show a LDAP array into an HTML output array.
|
||||
*
|
||||
* @param array $result Array to show. This array is already encoded into charset_output
|
||||
* @param int $level Level
|
||||
* @param int $count Count
|
||||
* @param string $var Var
|
||||
* @param int $hide Hide
|
||||
* @param int $subcount Subcount
|
||||
* @param array<'count'|int|string,int|string|array> $result Array to show. This array is already encoded into charset_output
|
||||
* @param int $level Level
|
||||
* @param int $count Count
|
||||
* @param string $var Var
|
||||
* @param int<0,1> $hide Hide
|
||||
* @param int $subcount Subcount
|
||||
* @return int
|
||||
*/
|
||||
function show_ldap_content($result, $level, $count, $var, $hide = 0, $subcount = 0)
|
||||
|
|
|
|||
|
|
@ -1551,6 +1551,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
|
|||
$desc = str_replace('(DEPOSIT)', $outputlangs->trans('Deposit'), $desc);
|
||||
}
|
||||
|
||||
$libelleproduitservice = ''; // Default value
|
||||
if (!getDolGlobalString('PDF_HIDE_PRODUCT_LABEL_IN_SUPPLIER_LINES')) {
|
||||
// Description short of product line
|
||||
$libelleproduitservice = $label;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2021 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -41,7 +42,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
|||
class doc_generic_asset_odt extends ModelePDFAsset
|
||||
{
|
||||
/**
|
||||
* @var string Dolibarr version of the loaded document
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class pdf_standard_asset extends ModelePDFAsset
|
|||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -35,7 +36,7 @@ class mod_asset_advanced extends ModeleNumRefAsset
|
|||
{
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
|
|
@ -116,7 +117,7 @@ class mod_asset_advanced extends ModeleNumRefAsset
|
|||
* Return next free value
|
||||
*
|
||||
* @param Asset $object Object we need next value for
|
||||
* @return string|int Next value if OK, 0 if KO
|
||||
* @return string|int<-1,1> Next value if OK, <=0 if KO
|
||||
*/
|
||||
public function getNextValue($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class mod_asset_standard extends ModeleNumRefAsset
|
|||
{
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
|
|
@ -117,11 +117,12 @@ class mod_asset_standard extends ModeleNumRefAsset
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Asset $object Object we need next value for
|
||||
* @return string|-1 Next value if OK, -1 if KO
|
||||
* @param Asset $object Object we need next value for
|
||||
* @return string|int<-1,1> Next value if OK, <=0 if KO
|
||||
*/
|
||||
public function getNextValue($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -81,5 +82,11 @@ abstract class ModelePDFAsset extends CommonDocGenerator
|
|||
*/
|
||||
abstract class ModeleNumRefAsset extends CommonNumRefGenerator
|
||||
{
|
||||
// No overload code
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Asset $object Object we need next value for
|
||||
* @return string|int<-1,1> Next value if OK, <=0 if KO
|
||||
*/
|
||||
abstract public function getNextValue($object);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
|||
class pdf_ban extends ModeleBankAccountDoc
|
||||
{
|
||||
/**
|
||||
* @var string Dolibarr version of the loaded document
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document
|
||||
*/
|
||||
public $version = 'development';
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
|||
{
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -34,9 +35,9 @@ class modPhpbarcode extends ModeleBarCode
|
|||
{
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z''development'|'experimental'|'dolibarr'
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
public $version = 'dolibarr';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ class modTcpdfbarcode extends ModeleBarCode
|
|||
{
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z''development'|'experimental'|'dolibarr'
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
public $version = 'dolibarr';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
|||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
|
|
@ -109,12 +109,16 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
|||
/**
|
||||
* Return an example of result returned by getNextValue
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @param ?Product $objproduct Object product
|
||||
* @return string Return string example
|
||||
* @param ?Translate $langs Object langs
|
||||
* @param ?CommonObject $objproduct Object
|
||||
* @return string Return string example
|
||||
*/
|
||||
public function getExample($langs, $objproduct = null)
|
||||
public function getExample($langs = null, $objproduct = null)
|
||||
{
|
||||
if (!$langs instanceof Translate) {
|
||||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
}
|
||||
$examplebarcode = $this->getNextValue($objproduct, '');
|
||||
if (!$examplebarcode) {
|
||||
$examplebarcode = $langs->trans('NotConfigured');
|
||||
|
|
|
|||
|
|
@ -38,25 +38,48 @@ class mod_barcode_thirdparty_standard extends ModeleNumRefBarCode
|
|||
{
|
||||
public $name = 'Standard'; // Model Name
|
||||
|
||||
public $code_modifiable; // Editable code
|
||||
/**
|
||||
* @var int<0,1> Editable code
|
||||
*/
|
||||
public $code_modifiable;
|
||||
|
||||
public $code_modifiable_invalide; // Modified code if it is invalid
|
||||
/**
|
||||
* @var int<0,1> Modified code if it is invalid
|
||||
*/
|
||||
public $code_modifiable_invalide;
|
||||
|
||||
public $code_modifiable_null; // Modified code if it is null
|
||||
/**
|
||||
* @var int<0,1> Modified code if it is null
|
||||
*/
|
||||
public $code_modifiable_null;
|
||||
|
||||
public $code_null; // Optional code
|
||||
/**
|
||||
* @var int<0,1> Optional code
|
||||
*/
|
||||
public $code_null;
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
public $searchcode; // Search string
|
||||
/**
|
||||
* @var string Search string
|
||||
*/
|
||||
public $searchcode;
|
||||
|
||||
public $numbitcounter; // Number of digits the counter
|
||||
/**
|
||||
* Number of digits for the counter (not bits, but digits)
|
||||
*
|
||||
* @var int<0,max>
|
||||
*/
|
||||
public $numbitcounter;
|
||||
|
||||
public $prefixIsRequired; // The prefix field of third party must be filled when using {pre}
|
||||
/**
|
||||
* @var int<0,1> If the prefix field of third party must be filled when using {pre}
|
||||
*/
|
||||
public $prefixIsRequired;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -122,12 +145,16 @@ class mod_barcode_thirdparty_standard extends ModeleNumRefBarCode
|
|||
/**
|
||||
* Return an example of result returned by getNextValue
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @param ?Societe $objthirdparty Object third-party
|
||||
* @return string Return string example
|
||||
* @param ?Translate $langs Object langs
|
||||
* @param ?CommonObject $objthirdparty Object third-party / Societe
|
||||
* @return string Return string example
|
||||
*/
|
||||
public function getExample($langs, $objthirdparty = null)
|
||||
public function getExample($langs = null, $objthirdparty = null)
|
||||
{
|
||||
if (!$langs instanceof Translate) {
|
||||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
}
|
||||
$examplebarcode = $this->getNextValue($objthirdparty, '');
|
||||
if (!$examplebarcode) {
|
||||
$examplebarcode = $langs->trans('NotConfigured');
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
|||
|
||||
/**
|
||||
* Parent class for barcode document generators (image)
|
||||
*
|
||||
* @property 'development'|'experimental'|'dolibarr' $version Dolibarr version of loaded document
|
||||
*/
|
||||
abstract class ModeleBarCode
|
||||
{
|
||||
|
|
@ -48,6 +50,16 @@ abstract class ModeleBarCode
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return description
|
||||
*
|
||||
* @param Translate $langs Lang object to use for output
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
abstract public function info($langs);
|
||||
|
||||
|
||||
/**
|
||||
* Save an image file on disk (with no output)
|
||||
*
|
||||
|
|
@ -67,6 +79,8 @@ abstract class ModeleBarCode
|
|||
|
||||
/**
|
||||
* Parent class for barcode numbering models
|
||||
*
|
||||
* @property string $nom Name for the GeneratorModel
|
||||
*/
|
||||
abstract class ModeleNumRefBarCode extends CommonNumRefGenerator
|
||||
{
|
||||
|
|
@ -87,11 +101,22 @@ abstract class ModeleNumRefBarCode extends CommonNumRefGenerator
|
|||
return $langs->trans("Function_getNextValue_InModuleNotWorking");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return an example of result returned by getNextValue
|
||||
*
|
||||
* @param ?Translate $langs Object langs
|
||||
* @param ?CommonObject $object Object product
|
||||
* @return string Return string example
|
||||
*/
|
||||
abstract public function getExample($langs = null, $object = null);
|
||||
|
||||
|
||||
/**
|
||||
* Return description of module parameters
|
||||
*
|
||||
* @param Translate $langs Output language
|
||||
* @param Societe $soc Third party object
|
||||
* @param ?Societe $soc Third party object
|
||||
* @param int $type -1=Nothing, 0=Product, 1=Service
|
||||
* @return string HTML translated description
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -41,7 +42,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
|||
class doc_generic_bom_odt extends ModelePDFBom
|
||||
{
|
||||
/**
|
||||
* @var string Dolibarr version of the loaded document
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -36,7 +37,7 @@ class mod_bom_advanced extends ModeleNumRefBoms
|
|||
{
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class mod_bom_standard extends ModeleNumRefBoms
|
|||
{
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ class mod_bom_standard extends ModeleNumRefBoms
|
|||
*
|
||||
* @param Product $objprod Object product
|
||||
* @param Bom $object Object we need next value for
|
||||
* @return string|-1 Next value if OK, -1 if KO
|
||||
* @return string|int<-1,-1> Next value if OK, -1 if KO
|
||||
*/
|
||||
public function getNextValue($objprod, $object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -83,4 +84,13 @@ abstract class ModelePDFBom extends CommonDocGenerator
|
|||
abstract class ModeleNumRefBoms extends CommonNumRefGenerator
|
||||
{
|
||||
// No overload code
|
||||
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Product $objprod Object product
|
||||
* @param Bom $object Object we need next value for
|
||||
* @return string|int<-1,-1> Next value if OK, -1 if KO
|
||||
*/
|
||||
abstract public function getNextValue($objprod, $object);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,23 +56,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||
*/
|
||||
public $line_per_page;
|
||||
|
||||
/**
|
||||
* @var Account bank account
|
||||
*/
|
||||
public $account;
|
||||
|
||||
public $amount;
|
||||
public $date;
|
||||
public $nbcheque;
|
||||
public $ref;
|
||||
public $ref_ext;
|
||||
|
||||
|
||||
/**
|
||||
* @var array lines
|
||||
*/
|
||||
public $lines;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts
|
|||
{
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -33,7 +34,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts
|
|||
{
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -44,6 +45,31 @@ abstract class ModeleNumRefChequeReceipts extends CommonNumRefGenerator
|
|||
*/
|
||||
abstract class ModeleChequeReceipts extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var Account bank account
|
||||
*/
|
||||
public $account;
|
||||
|
||||
/**
|
||||
* @var string|float
|
||||
*/
|
||||
public $amount;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $date;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $nbcheque;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $ref;
|
||||
/**
|
||||
* @var stdClass[] lines
|
||||
*/
|
||||
public $lines;
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
|
|
@ -66,7 +92,7 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator
|
|||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
$list = getListOfModels($db, $type, $maxfilenamelength);
|
||||
// TODO Remove this to use getListOfModels only
|
||||
$list = array('blochet'=>'blochet');
|
||||
$list = array('blochet' => 'blochet');
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2021 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -42,7 +43,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||
{
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes
|
|||
{
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes
|
|||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Commande $object Object we need next value for
|
||||
* @return string|-1 Value if OK, -1 if KO
|
||||
* @return string|int<-1,0> Value if OK, -1 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -36,7 +37,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes
|
|||
{
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
|
|
@ -124,7 +125,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes
|
|||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Commande $object Object we need next value for
|
||||
* @return string|int Next value if OK, 0 if KO
|
||||
* @return string|int<-1,0> Value if OK, -1 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -102,5 +103,12 @@ abstract class ModelePDFCommandes extends CommonDocGenerator
|
|||
*/
|
||||
abstract class ModeleNumRefCommandes extends CommonNumRefGenerator
|
||||
{
|
||||
// No overload code
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Commande $object Object we need next value for
|
||||
* @return string|int<-1,0> Value if OK, -1 if KO
|
||||
*/
|
||||
abstract public function getNextValue($objsoc, $object);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -39,7 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
|||
class doc_generic_contract_odt extends ModelePDFContract
|
||||
{
|
||||
/**
|
||||
* @var string Dolibarr version of the loaded document
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class pdf_strato extends ModelePDFContract
|
|||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -30,7 +31,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php';
|
|||
*/
|
||||
class mod_contract_magre extends ModelNumRefContracts
|
||||
{
|
||||
|
||||
// variables inherited from ModelNumRefContracts class
|
||||
public $name = 'Magre';
|
||||
public $version = 'dolibarr';
|
||||
|
|
@ -113,7 +113,7 @@ class mod_contract_magre extends ModelNumRefContracts
|
|||
*
|
||||
* @param Societe $objsoc third party object
|
||||
* @param Contrat $contract contract object
|
||||
* @return string|int Next value if OK, 0 if KO
|
||||
* @return string|int<-1,0> Value if OK, <=0 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc, $contract)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -77,9 +77,9 @@ class mod_contract_olive extends ModelNumRefContracts
|
|||
/**
|
||||
* Return an example of result returned by getNextValue
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Contrat $contract Object contract
|
||||
* @return string Return next value
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Contrat $contract Object contract
|
||||
* @return string|int<-1,0> Value if OK, <=0 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc, $contract)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class mod_contract_serpis extends ModelNumRefContracts
|
|||
*
|
||||
* @param Societe $objsoc third party object
|
||||
* @param Contrat $contract contract object
|
||||
* @return string|-1 Value if OK, -1 if KO
|
||||
* @return string|int<-1,0> Value if OK, <=0 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc, $contract)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -79,7 +80,14 @@ abstract class ModelePDFContract extends CommonDocGenerator
|
|||
/**
|
||||
* Parent class for all contract numbering modules
|
||||
*/
|
||||
class ModelNumRefContracts extends CommonNumRefGenerator
|
||||
abstract class ModelNumRefContracts extends CommonNumRefGenerator
|
||||
{
|
||||
// No overload code
|
||||
/**
|
||||
* Return next value
|
||||
*
|
||||
* @param Societe $objsoc third party object
|
||||
* @param Contrat $contract contract object
|
||||
* @return string|int<0,-1> Next value if OK, -1 or 0 if KO
|
||||
*/
|
||||
abstract public function getNextValue($objsoc, $contract);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
|
|||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class mod_delivery_jade extends ModeleNumRefDeliveryOrder
|
|||
{
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ class mod_delivery_jade extends ModeleNumRefDeliveryOrder
|
|||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Delivery $object Object we need next value for
|
||||
* @return string|-1 Value if OK, -1 if KO
|
||||
* @return string|int<-1,0> Value if OK, 0 or -1 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -34,7 +35,7 @@ class mod_delivery_saphir extends ModeleNumRefDeliveryOrder
|
|||
{
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
|
|
@ -126,11 +127,11 @@ class mod_delivery_saphir extends ModeleNumRefDeliveryOrder
|
|||
|
||||
|
||||
/**
|
||||
* Return next value
|
||||
* Return next free value
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Delivery $object Object delivery
|
||||
* @return string|int Value if OK, 0 if KO
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Delivery $object Object we need next value for
|
||||
* @return string|int<-1,0> Value if OK, 0 or -1 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
|
|
@ -157,7 +158,7 @@ class mod_delivery_saphir extends ModeleNumRefDeliveryOrder
|
|||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Delivery $objforref Object for number to search
|
||||
* @return string|int Next free value, 0 if KO
|
||||
* @return string|int<-1,0> Next free value, 0 if KO
|
||||
* @deprecated see getNextValue
|
||||
*/
|
||||
public function getNumRef($objsoc, $objforref)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2006-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2012 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -79,5 +80,12 @@ abstract class ModelePDFDeliveryOrder extends CommonDocGenerator
|
|||
*/
|
||||
abstract class ModeleNumRefDeliveryOrder extends CommonNumRefGenerator
|
||||
{
|
||||
// No overload code
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Delivery $object Object we need next value for
|
||||
* @return string|int<-1,0> Value if OK, 0 or -1 if KO
|
||||
*/
|
||||
abstract public function getNextValue($objsoc, $object);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2021 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -42,7 +43,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||
{
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class pdf_espadon extends ModelePdfExpedition
|
|||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @var string
|
||||
* @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental'
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user