code syntax core directory

This commit is contained in:
Frédéric FRANCE
2021-02-23 22:03:23 +01:00
parent 2642e1d1b3
commit 554e449e40
512 changed files with 34726 additions and 28660 deletions

View File

@@ -111,10 +111,18 @@ abstract class ModeleNumRefBarCode
global $langs;
$langs->load("admin");
if ($this->version == 'development') return $langs->trans("VersionDevelopment");
if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
if ($this->version == 'dolibarr') return DOL_VERSION;
if ($this->version) return $this->version;
if ($this->version == 'development') {
return $langs->trans("VersionDevelopment");
}
if ($this->version == 'experimental') {
return $langs->trans("VersionExperimental");
}
if ($this->version == 'dolibarr') {
return DOL_VERSION;
}
if ($this->version) {
return $this->version;
}
return $langs->trans("NotAvailable");
}
@@ -135,43 +143,56 @@ abstract class ModeleNumRefBarCode
$s = '';
$s .= $langs->trans("Name").': <b>'.$this->name.'</b><br>';
$s .= $langs->trans("Version").': <b>'.$this->getVersion().'</b><br>';
if ($type != -1) $s .= $langs->trans("ValidityControledByModule").': <b>'.$this->getNom($langs).'</b><br>';
if ($type != -1) {
$s .= $langs->trans("ValidityControledByModule").': <b>'.$this->getNom($langs).'</b><br>';
}
$s .= '<br>';
$s .= '<u>'.$langs->trans("ThisIsModuleRules").':</u><br>';
if ($type == 0)
{
if ($type == 0) {
$s .= $langs->trans("RequiredIfProduct").': ';
if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .= '<strike>';
if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) {
$s .= '<strike>';
}
$s .= yn(!$this->code_null, 1, 2);
if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .= '</strike> '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')';
if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) {
$s .= '</strike> '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')';
}
$s .= '<br>';
}
if ($type == 1)
{
if ($type == 1) {
$s .= $langs->trans("RequiredIfService").': ';
if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .= '<strike>';
if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) {
$s .= '<strike>';
}
$s .= yn(!$this->code_null, 1, 2);
if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .= '</strike> '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')';
if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) {
$s .= '</strike> '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')';
}
$s .= '<br>';
}
if ($type == -1)
{
if ($type == -1) {
$s .= $langs->trans("Required").': ';
if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .= '<strike>';
if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) {
$s .= '<strike>';
}
$s .= yn(!$this->code_null, 1, 2);
if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .= '</strike> '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')';
if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) {
$s .= '</strike> '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')';
}
$s .= '<br>';
}
/*$s.=$langs->trans("CanBeModifiedIfOk").': ';
$s.=yn($this->code_modifiable,1,2);
$s.='<br>';
$s.=$langs->trans("CanBeModifiedIfKo").': '.yn($this->code_modifiable_invalide,1,2).'<br>';
*/
$s.=yn($this->code_modifiable,1,2);
$s.='<br>';
$s.=$langs->trans("CanBeModifiedIfKo").': '.yn($this->code_modifiable_invalide,1,2).'<br>';
*/
$s .= $langs->trans("AutomaticCode").': '.yn($this->code_auto, 1, 2).'<br>';
$s .= '<br>';
$nextval = $this->getNextValue($soc, '');
if (empty($nextval)) $nextval = $langs->trans("Undefined");
if (empty($nextval)) {
$nextval = $langs->trans("Undefined");
}
$s .= $langs->trans("NextValue").': <b>'.$nextval.'</b><br>';
return $s;