PSR2 usage of else if is discouraged
This commit is contained in:
parent
a9da6a2d51
commit
6e91b3cefc
@ -80,7 +80,7 @@ if ($idobject > 0)
|
||||
dol_print_error($db,$obj->error);
|
||||
}
|
||||
}
|
||||
else if ($obj->error == 'ErrorLoginAlreadyExists')
|
||||
elseif ($obj->error == 'ErrorLoginAlreadyExists')
|
||||
{
|
||||
print "User with login ".$obj->login." already exists\n";
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
|
||||
|
||||
<!--
|
||||
@ -392,6 +392,7 @@
|
||||
|
||||
<rule ref="PSR2.Classes.ClassDeclaration" />
|
||||
<rule ref="PSR2.Methods.FunctionClosingBrace" />
|
||||
<rule ref="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed" />
|
||||
|
||||
<!-- This is not in PSR2 -->
|
||||
<rule ref="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore">
|
||||
|
||||
@ -221,8 +221,8 @@ class autoTranslator
|
||||
}
|
||||
|
||||
if ($key == 'CHARSET') $val=$this->_outputpagecode;
|
||||
else if (preg_match('/^Format/',$key)) $val=$value;
|
||||
else if ($value=='-') $val=$value;
|
||||
elseif (preg_match('/^Format/',$key)) $val=$value;
|
||||
elseif ($value=='-') $val=$value;
|
||||
else
|
||||
{
|
||||
// If not translated then translate
|
||||
|
||||
@ -215,8 +215,8 @@ foreach ($dups as $string => $pages)
|
||||
$s.="\n";
|
||||
|
||||
if ($duplicateinsamefile) $sduplicateinsamefile .= $s;
|
||||
else if ($inmain) $sinmainandother .= $s;
|
||||
else if ($inadmin) $sininstallandadmin .= $s;
|
||||
elseif ($inmain) $sinmainandother .= $s;
|
||||
elseif ($inadmin) $sininstallandadmin .= $s;
|
||||
else $sother .= $s;
|
||||
}
|
||||
|
||||
|
||||
@ -310,7 +310,7 @@ foreach($filesToProcess as $fileToProcess)
|
||||
{
|
||||
//print "Key $key is a key we always want to see into secondary file (line: $cnt).\n";
|
||||
}
|
||||
else if ( ! array_key_exists($key, $aSecondary))
|
||||
elseif ( ! array_key_exists($key, $aSecondary))
|
||||
{
|
||||
//print "Key $key does NOT exist in secondary language (line: $cnt).\n";
|
||||
continue;
|
||||
|
||||
@ -162,7 +162,7 @@ if (empty($reshook))
|
||||
if ($result < 0) {
|
||||
setEventMessages($accounting->error, $accounting->errors, 'errors');
|
||||
}
|
||||
} else if ($action == 'enable') {
|
||||
} elseif ($action == 'enable') {
|
||||
if ($accounting->fetch($id)) {
|
||||
$result = $accounting->account_activate($id);
|
||||
}
|
||||
|
||||
@ -270,7 +270,7 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha'))
|
||||
if ($value == 'price' || preg_match('/^amount/i',$value) || $value == 'taux') {
|
||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
||||
}
|
||||
else if ($value == 'entity') {
|
||||
elseif ($value == 'entity') {
|
||||
$_POST[$listfieldvalue[$i]] = $conf->entity;
|
||||
}
|
||||
if ($i) $sql.=",";
|
||||
@ -318,7 +318,7 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha'))
|
||||
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
|
||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
||||
}
|
||||
else if ($field == 'entity') {
|
||||
elseif ($field == 'entity') {
|
||||
$_POST[$listfieldvalue[$i]] = $conf->entity;
|
||||
}
|
||||
if ($i) $sql.=",";
|
||||
@ -535,7 +535,7 @@ if ($id)
|
||||
{
|
||||
print '<td align="'.$align.'">';
|
||||
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
|
||||
else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
|
||||
elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
|
||||
else print $valuetoshow;
|
||||
print '</td>';
|
||||
}
|
||||
@ -729,14 +729,14 @@ if ($id)
|
||||
{
|
||||
$valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow;
|
||||
}
|
||||
else if ($value == 'source')
|
||||
elseif ($value == 'source')
|
||||
{
|
||||
$valuetoshow = isset($sourceList[$valuetoshow])?$sourceList[$valuetoshow]:$valuetoshow;
|
||||
}
|
||||
else if ($valuetoshow=='all') {
|
||||
elseif ($valuetoshow=='all') {
|
||||
$valuetoshow=$langs->trans('All');
|
||||
}
|
||||
else if ($fieldlist[$field]=='country') {
|
||||
elseif ($fieldlist[$field]=='country') {
|
||||
if (empty($obj->country_code))
|
||||
{
|
||||
$valuetoshow='-';
|
||||
@ -747,7 +747,7 @@ if ($id)
|
||||
$valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country);
|
||||
}
|
||||
}
|
||||
else if ($fieldlist[$field]=='country_id') {
|
||||
elseif ($fieldlist[$field]=='country_id') {
|
||||
$showfield=0;
|
||||
}
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
||||
exit;
|
||||
}
|
||||
}
|
||||
} else if ($action == 'edit' && $user->rights->accounting->chartofaccount) {
|
||||
} elseif ($action == 'edit' && $user->rights->accounting->chartofaccount) {
|
||||
if (! $cancel) {
|
||||
$result = $object->fetch($id);
|
||||
|
||||
@ -177,7 +177,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
||||
header("Location: " . $urltogo);
|
||||
exit();
|
||||
}
|
||||
} else if ($action == 'delete' && $user->rights->accounting->chartofaccount) {
|
||||
} elseif ($action == 'delete' && $user->rights->accounting->chartofaccount) {
|
||||
$result = $object->fetch($id);
|
||||
|
||||
if (! empty($object->id)) {
|
||||
@ -272,7 +272,7 @@ if ($action == 'create') {
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
else if ($id > 0 || $ref) {
|
||||
elseif ($id > 0 || $ref) {
|
||||
|
||||
$result = $object->fetch($id, $ref, 1);
|
||||
|
||||
|
||||
@ -268,7 +268,7 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha'))
|
||||
if ($field == 'fk_country' && $_POST['country'] > 0) {
|
||||
$_POST[$listfieldvalue[$i]] = $_POST['country'];
|
||||
}
|
||||
else if ($field == 'entity') {
|
||||
elseif ($field == 'entity') {
|
||||
$_POST[$listfieldvalue[$i]] = $conf->entity;
|
||||
}
|
||||
if ($i) $sql.=",";
|
||||
@ -492,7 +492,7 @@ if ($id)
|
||||
{
|
||||
print '<td align="'.$align.'">';
|
||||
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
|
||||
else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
|
||||
elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
|
||||
else print $valuetoshow;
|
||||
print '</td>';
|
||||
}
|
||||
@ -699,10 +699,10 @@ if ($id)
|
||||
{
|
||||
$valuetoshow = yn($valuetoshow);
|
||||
}
|
||||
else if ($valuetoshow=='all') {
|
||||
elseif ($valuetoshow=='all') {
|
||||
$valuetoshow=$langs->trans('All');
|
||||
}
|
||||
else if ($fieldlist[$field]=='country') {
|
||||
elseif ($fieldlist[$field]=='country') {
|
||||
if (empty($obj->country_code))
|
||||
{
|
||||
$valuetoshow='-';
|
||||
@ -713,20 +713,20 @@ if ($id)
|
||||
$valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country);
|
||||
}
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') {
|
||||
elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') {
|
||||
$key=$langs->trans("Country".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') {
|
||||
elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') {
|
||||
$langs->loadLangs(array("propal"));
|
||||
$key=$langs->trans("AvailabilityType".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') {
|
||||
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') {
|
||||
$key=$langs->trans("Action".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "Action".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') {
|
||||
elseif ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') {
|
||||
$showfield=0;
|
||||
}
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") {
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'add') {
|
||||
elseif ($action == 'add') {
|
||||
if (! GETPOST('cancel', 'alpha')) {
|
||||
$error = 0;
|
||||
|
||||
@ -118,7 +118,7 @@ else if ($action == 'add') {
|
||||
}
|
||||
|
||||
// Update record
|
||||
else if ($action == 'update') {
|
||||
elseif ($action == 'update') {
|
||||
if (! GETPOST('cancel', 'alpha')) {
|
||||
$result = $object->fetch($id);
|
||||
|
||||
@ -198,7 +198,7 @@ if ($action == 'create')
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
} else if ($id) {
|
||||
} elseif ($id) {
|
||||
$result = $object->fetch($id);
|
||||
if ($result > 0) {
|
||||
$head = fiscalyear_prepare_head($object);
|
||||
|
||||
@ -270,7 +270,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
|
||||
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
|
||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
||||
}
|
||||
else if ($field == 'entity') {
|
||||
elseif ($field == 'entity') {
|
||||
$_POST[$listfieldvalue[$i]] = $conf->entity;
|
||||
}
|
||||
if ($i) $sql.=",";
|
||||
@ -441,7 +441,7 @@ if ($id)
|
||||
{
|
||||
print '<td align="'.$align.'">';
|
||||
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
|
||||
else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
|
||||
elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
|
||||
else print $valuetoshow;
|
||||
print '</td>';
|
||||
}
|
||||
@ -611,11 +611,11 @@ if ($id)
|
||||
if ($valuetoshow=='all') {
|
||||
$valuetoshow=$langs->trans('All');
|
||||
}
|
||||
else if ($fieldlist[$field]=='nature' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') {
|
||||
elseif ($fieldlist[$field]=='nature' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') {
|
||||
$key=$langs->trans("AccountingJournalType".strtoupper($obj->nature));
|
||||
$valuetoshow=($obj->nature && $key != "AccountingJournalType".strtoupper($langs->trans($obj->nature))?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') {
|
||||
elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') {
|
||||
$valuetoshow=$langs->trans($obj->label);
|
||||
}
|
||||
|
||||
@ -630,8 +630,8 @@ if ($id)
|
||||
if (isset($obj->code) && $id != 10)
|
||||
{
|
||||
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; }
|
||||
else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
|
||||
else if ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; }
|
||||
elseif ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
|
||||
elseif ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; }
|
||||
}
|
||||
|
||||
$canbemodified=$iserasable;
|
||||
|
||||
@ -140,7 +140,7 @@ if ($action == "confirm_update") {
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == "add") {
|
||||
elseif ($action == "add") {
|
||||
$error = 0;
|
||||
|
||||
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0))
|
||||
@ -201,7 +201,7 @@ else if ($action == "add") {
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == "confirm_delete") {
|
||||
elseif ($action == "confirm_delete") {
|
||||
$object = new BookKeeping($db);
|
||||
|
||||
$result = $object->fetch($id, null, $mode);
|
||||
@ -218,7 +218,7 @@ else if ($action == "confirm_delete") {
|
||||
$action = '';
|
||||
}
|
||||
|
||||
else if ($action == "confirm_create") {
|
||||
elseif ($action == "confirm_create") {
|
||||
$error = 0;
|
||||
|
||||
$object = new BookKeeping($db);
|
||||
|
||||
@ -219,12 +219,12 @@ if ($search_month > 0)
|
||||
{
|
||||
if ($search_year > 0 && empty($search_day))
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
|
||||
else if ($search_year > 0 && ! empty($search_day))
|
||||
elseif ($search_year > 0 && ! empty($search_day))
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
|
||||
else
|
||||
$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
|
||||
}
|
||||
else if ($search_year > 0)
|
||||
elseif ($search_year > 0)
|
||||
{
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
|
||||
}
|
||||
|
||||
@ -257,12 +257,12 @@ if ($search_month > 0)
|
||||
{
|
||||
if ($search_year > 0 && empty($search_day))
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
|
||||
else if ($search_year > 0 && ! empty($search_day))
|
||||
elseif ($search_year > 0 && ! empty($search_day))
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
|
||||
else
|
||||
$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
|
||||
}
|
||||
else if ($search_year > 0)
|
||||
elseif ($search_year > 0)
|
||||
{
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
|
||||
}
|
||||
|
||||
@ -190,12 +190,12 @@ if ($search_month > 0)
|
||||
{
|
||||
if ($search_year > 0 && empty($search_day))
|
||||
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
|
||||
else if ($search_year > 0 && ! empty($search_day))
|
||||
elseif ($search_year > 0 && ! empty($search_day))
|
||||
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
|
||||
else
|
||||
$sql.= " AND date_format(erd.date, '%m') = '".$db->escape($search_month)."'";
|
||||
}
|
||||
else if ($search_year > 0)
|
||||
elseif ($search_year > 0)
|
||||
{
|
||||
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
|
||||
}
|
||||
|
||||
@ -219,12 +219,12 @@ if ($search_month > 0)
|
||||
{
|
||||
if ($search_year > 0 && empty($search_day))
|
||||
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
|
||||
else if ($search_year > 0 && ! empty($search_day))
|
||||
elseif ($search_year > 0 && ! empty($search_day))
|
||||
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
|
||||
else
|
||||
$sql.= " AND date_format(erd.date, '%m') = '".$db->escape($search_month)."'";
|
||||
}
|
||||
else if ($search_year > 0)
|
||||
elseif ($search_year > 0)
|
||||
{
|
||||
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
|
||||
}
|
||||
|
||||
@ -290,18 +290,18 @@ if ($result) {
|
||||
$paymentstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2, '', ''); // TODO Do not include list of invoice in tooltip, the dol_string_nohtmltag is ko with this
|
||||
$tabpay[$obj->rowid]["paymentid"] = $paymentstatic->id;
|
||||
} else if ($links[$key]['type'] == 'payment_supplier') {
|
||||
} elseif ($links[$key]['type'] == 'payment_supplier') {
|
||||
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
||||
$paymentsupplierstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
|
||||
$tabpay[$obj->rowid]["paymentsupplierid"] = $paymentsupplierstatic->id;
|
||||
} else if ($links[$key]['type'] == 'company') {
|
||||
} elseif ($links[$key]['type'] == 'company') {
|
||||
$societestatic->id = $links[$key]['url_id'];
|
||||
$societestatic->name = $links[$key]['label'];
|
||||
$societestatic->email = $tabcompany[$obj->rowid]['email'];
|
||||
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
||||
if ($compta_soc) $tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||
} else if ($links[$key]['type'] == 'user') {
|
||||
} elseif ($links[$key]['type'] == 'user') {
|
||||
$userstatic->id = $links[$key]['url_id'];
|
||||
$userstatic->name = $links[$key]['label'];
|
||||
$userstatic->email = $tabuser[$obj->rowid]['email'];
|
||||
@ -310,7 +310,7 @@ if ($result) {
|
||||
if ($userstatic->id > 0) $tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30);
|
||||
else $tabpay[$obj->rowid]["soclib"] = '???'; // Should not happen, but happens with old data when id of user was not saved on expense report payment.
|
||||
if ($compta_user) $tabtp[$obj->rowid][$compta_user] += $obj->amount;
|
||||
} else if ($links[$key]['type'] == 'sc') {
|
||||
} elseif ($links[$key]['type'] == 'sc') {
|
||||
$chargestatic->id = $links[$key]['url_id'];
|
||||
$chargestatic->ref = $links[$key]['url_id'];
|
||||
|
||||
@ -339,14 +339,14 @@ if ($result) {
|
||||
$objmid = $db->fetch_object($resultmid);
|
||||
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
|
||||
}
|
||||
} else if ($links[$key]['type'] == 'payment_donation') {
|
||||
} elseif ($links[$key]['type'] == 'payment_donation') {
|
||||
$paymentdonstatic->id = $links[$key]['url_id'];
|
||||
$paymentdonstatic->ref = $links[$key]['url_id'];
|
||||
$paymentdonstatic->fk_donation = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentdonstatic->getNomUrl(2);
|
||||
$tabpay[$obj->rowid]["paymentdonationid"] = $paymentdonstatic->id;
|
||||
$tabtp[$obj->rowid][$account_pay_donation] += $obj->amount;
|
||||
} else if ($links[$key]['type'] == 'member') {
|
||||
} elseif ($links[$key]['type'] == 'member') {
|
||||
$paymentsubscriptionstatic->id = $links[$key]['url_id'];
|
||||
$paymentsubscriptionstatic->ref = $links[$key]['url_id'];
|
||||
$paymentsubscriptionstatic->label = $links[$key]['label'];
|
||||
@ -354,24 +354,24 @@ if ($result) {
|
||||
$tabpay[$obj->rowid]["paymentsubscriptionid"] = $paymentsubscriptionstatic->id;
|
||||
$paymentsubscriptionstatic->fetch($paymentsubscriptionstatic->id);
|
||||
$tabtp[$obj->rowid][$account_pay_subscription] += $obj->amount;
|
||||
} else if ($links[$key]['type'] == 'payment_vat') { // Payment VAT
|
||||
} elseif ($links[$key]['type'] == 'payment_vat') { // Payment VAT
|
||||
$paymentvatstatic->id = $links[$key]['url_id'];
|
||||
$paymentvatstatic->ref = $links[$key]['url_id'];
|
||||
$paymentvatstatic->label = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||
$tabpay[$obj->rowid]["paymentvatid"] = $paymentvatstatic->id;
|
||||
$tabtp[$obj->rowid][$account_pay_vat] += $obj->amount;
|
||||
} else if ($links[$key]['type'] == 'payment_salary') {
|
||||
} elseif ($links[$key]['type'] == 'payment_salary') {
|
||||
$paymentsalstatic->id = $links[$key]['url_id'];
|
||||
$paymentsalstatic->ref = $links[$key]['url_id'];
|
||||
$paymentsalstatic->label = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
|
||||
$tabpay[$obj->rowid]["paymentsalid"] = $paymentsalstatic->id;
|
||||
} else if ($links[$key]['type'] == 'payment_expensereport') {
|
||||
} elseif ($links[$key]['type'] == 'payment_expensereport') {
|
||||
$paymentexpensereportstatic->id = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= $paymentexpensereportstatic->getNomUrl(2);
|
||||
$tabpay[$obj->rowid]["paymentexpensereport"] = $paymentexpensereportstatic->id;
|
||||
} else if ($links[$key]['type'] == 'payment_various') {
|
||||
} elseif ($links[$key]['type'] == 'payment_various') {
|
||||
$paymentvariousstatic->id = $links[$key]['url_id'];
|
||||
$paymentvariousstatic->ref = $links[$key]['url_id'];
|
||||
$paymentvariousstatic->label = $links[$key]['label'];
|
||||
@ -380,7 +380,7 @@ if ($result) {
|
||||
$paymentvariousstatic->fetch($paymentvariousstatic->id);
|
||||
$account_various = (! empty($paymentvariousstatic->accountancy_code) ? $paymentvariousstatic->accountancy_code : 'NotDefined'); // NotDefined is a reserved word
|
||||
$tabtp[$obj->rowid][$account_various] += $obj->amount;
|
||||
} else if ($links[$key]['type'] == 'payment_loan') {
|
||||
} elseif ($links[$key]['type'] == 'payment_loan') {
|
||||
$paymentloanstatic->id = $links[$key]['url_id'];
|
||||
$paymentloanstatic->ref = $links[$key]['url_id'];
|
||||
$paymentloanstatic->fk_loan = $links[$key]['url_id'];
|
||||
@ -399,7 +399,7 @@ if ($result) {
|
||||
$tabtp[$obj->rowid][$objmid->accountancy_account_insurance] -= $objmid->amount_insurance;
|
||||
$tabtp[$obj->rowid][$objmid->accountancy_account_interest] -= $objmid->amount_interest;
|
||||
}
|
||||
} else if ($links[$key]['type'] == 'banktransfert') {
|
||||
} elseif ($links[$key]['type'] == 'banktransfert') {
|
||||
$accountLinestatic->fetch($links[$key]['url_id']);
|
||||
$tabpay[$obj->rowid]["lib"] .= ' '.$langs->trans("BankTransfer").'- ' .$accountLinestatic ->getNomUrl(1);
|
||||
$tabtp[$obj->rowid][$account_transfer] += $obj->amount;
|
||||
@ -567,68 +567,68 @@ if (! $error && $action == 'writebookkeeping') {
|
||||
|
||||
$accountingaccount->fetch(null, $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER, true);
|
||||
$bookkeeping->label_compte = $accountingaccount->label;
|
||||
} else if ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice
|
||||
} elseif ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice
|
||||
$bookkeeping->subledger_account = $tabcompany[$key]['code_compta'];
|
||||
$bookkeeping->subledger_label = $tabcompany[$key]['name'];
|
||||
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER;
|
||||
|
||||
$accountingaccount->fetch(null, $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER, true);
|
||||
$bookkeeping->label_compte = $accountingaccount->label;
|
||||
} else if ($tabtype[$key] == 'payment_expensereport') {
|
||||
} elseif ($tabtype[$key] == 'payment_expensereport') {
|
||||
$bookkeeping->subledger_account = $tabuser[$key]['accountancy_code'];
|
||||
$bookkeeping->subledger_label = $tabuser[$key]['name'];
|
||||
$bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT;
|
||||
|
||||
$accountingaccount->fetch(null, $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT, true);
|
||||
$bookkeeping->label_compte = $accountingaccount->label;
|
||||
} else if ($tabtype[$key] == 'payment_salary') {
|
||||
} elseif ($tabtype[$key] == 'payment_salary') {
|
||||
$bookkeeping->subledger_account = $tabuser[$key]['accountancy_code'];
|
||||
$bookkeeping->subledger_label = $tabuser[$key]['name'];
|
||||
$bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT;
|
||||
|
||||
$accountingaccount->fetch(null, $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT, true);
|
||||
$bookkeeping->label_compte = $accountingaccount->label;
|
||||
} else if (in_array($tabtype[$key], array('sc', 'payment_sc'))) { // If payment is payment of social contribution
|
||||
} elseif (in_array($tabtype[$key], array('sc', 'payment_sc'))) { // If payment is payment of social contribution
|
||||
$bookkeeping->subledger_account = '';
|
||||
$bookkeeping->subledger_label = '';
|
||||
$bookkeeping->numero_compte = $k;
|
||||
$bookkeeping->label_compte = $objmid->labelc;
|
||||
} else if ($tabtype[$key] == 'payment_vat') {
|
||||
} elseif ($tabtype[$key] == 'payment_vat') {
|
||||
$bookkeeping->subledger_account = '';
|
||||
$bookkeeping->subledger_label = '';
|
||||
$bookkeeping->numero_compte = $k;
|
||||
|
||||
$accountingaccount->fetch(null, $k, true);
|
||||
$bookkeeping->label_compte = $accountingaccount->label;
|
||||
} else if ($tabtype[$key] == 'payment_donation') {
|
||||
} elseif ($tabtype[$key] == 'payment_donation') {
|
||||
$bookkeeping->subledger_account = '';
|
||||
$bookkeeping->subledger_label = '';
|
||||
$bookkeeping->numero_compte = $k;
|
||||
|
||||
$accountingaccount->fetch(null, $k, true);
|
||||
$bookkeeping->label_compte = $accountingaccount->label;
|
||||
} else if ($tabtype[$key] == 'member') {
|
||||
} elseif ($tabtype[$key] == 'member') {
|
||||
$bookkeeping->subledger_account = '';
|
||||
$bookkeeping->subledger_label = '';
|
||||
$bookkeeping->numero_compte = $k;
|
||||
|
||||
$accountingaccount->fetch(null, $k, true);
|
||||
$bookkeeping->label_compte = $accountingaccount->label;
|
||||
} else if ($tabtype[$key] == 'payment_loan') {
|
||||
} elseif ($tabtype[$key] == 'payment_loan') {
|
||||
$bookkeeping->subledger_account = '';
|
||||
$bookkeeping->subledger_label = '';
|
||||
$bookkeeping->numero_compte = $k;
|
||||
|
||||
$accountingaccount->fetch(null, $k, true);
|
||||
$bookkeeping->label_compte = $accountingaccount->label;
|
||||
} else if ($tabtype[$key] == 'payment_various') {
|
||||
} elseif ($tabtype[$key] == 'payment_various') {
|
||||
$bookkeeping->subledger_account = '';
|
||||
$bookkeeping->subledger_label = '';
|
||||
$bookkeeping->numero_compte = $k;
|
||||
|
||||
$accountingaccount->fetch(null, $k, true);
|
||||
$bookkeeping->label_compte = $accountingaccount->label;
|
||||
} else if ($tabtype[$key] == 'banktransfert') {
|
||||
} elseif ($tabtype[$key] == 'banktransfert') {
|
||||
$bookkeeping->subledger_account = '';
|
||||
$bookkeeping->subledger_label = '';
|
||||
$bookkeeping->numero_compte = $k;
|
||||
@ -845,11 +845,11 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
if ($tabtype[$key] == 'payment_supplier') {
|
||||
print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep;
|
||||
} else if($tabtype[$key] == 'payment') {
|
||||
} elseif($tabtype[$key] == 'payment') {
|
||||
print '"' . $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER . '"' . $sep;
|
||||
} else if($tabtype[$key] == 'payment_expensereport') {
|
||||
} elseif($tabtype[$key] == 'payment_expensereport') {
|
||||
print '"' . $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT . '"' . $sep;
|
||||
} else if($tabtype[$key] == 'payment_salary') {
|
||||
} elseif($tabtype[$key] == 'payment_salary') {
|
||||
print '"' . $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT . '"' . $sep;
|
||||
} else {
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
|
||||
@ -214,12 +214,12 @@ if ($search_month > 0)
|
||||
{
|
||||
if ($search_year > 0 && empty($search_day))
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
|
||||
else if ($search_year > 0 && ! empty($search_day))
|
||||
elseif ($search_year > 0 && ! empty($search_day))
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
|
||||
else
|
||||
$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
|
||||
}
|
||||
else if ($search_year > 0)
|
||||
elseif ($search_year > 0)
|
||||
{
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
|
||||
}
|
||||
|
||||
@ -256,12 +256,12 @@ if ($search_month > 0)
|
||||
{
|
||||
if ($search_year > 0 && empty($search_day))
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
|
||||
else if ($search_year > 0 && ! empty($search_day))
|
||||
elseif ($search_year > 0 && ! empty($search_day))
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
|
||||
else
|
||||
$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
|
||||
}
|
||||
else if ($search_year > 0)
|
||||
elseif ($search_year > 0)
|
||||
{
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
|
||||
}
|
||||
|
||||
@ -2487,7 +2487,7 @@ class Adherent extends CommonObject
|
||||
if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = dol_hash($this->pass, 4); // Create OpenLDAP MD5 password (TODO add type of encryption)
|
||||
}
|
||||
// Set LDAP password if possible
|
||||
else if ($conf->global->LDAP_SERVER_PROTOCOLVERSION !== '3') // If ldap key is modified and LDAPv3 we use ldap_rename function for avoid lose encrypt password
|
||||
elseif ($conf->global->LDAP_SERVER_PROTOCOLVERSION !== '3') // If ldap key is modified and LDAPv3 we use ldap_rename function for avoid lose encrypt password
|
||||
{
|
||||
if (! empty($conf->global->DATABASE_PWD_ENCRYPTED))
|
||||
{
|
||||
@ -2502,7 +2502,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
}
|
||||
// Use $this->pass_indatabase value if exists
|
||||
else if (! empty($this->pass_indatabase))
|
||||
elseif (! empty($this->pass_indatabase))
|
||||
{
|
||||
if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte
|
||||
if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = dol_hash($this->pass_indatabase, 4); // md5 for OpenLdap TODO add type of encryption
|
||||
|
||||
@ -213,7 +213,7 @@ class Members extends DolibarrApi
|
||||
if ($result < 0) {
|
||||
throw new RestException(500, 'Error when resiliating member: '.$member->error);
|
||||
}
|
||||
} else if ($value == '1') {
|
||||
} elseif ($value == '1') {
|
||||
$result = $member->validate(DolibarrApiAccess::$user);
|
||||
if ($result < 0) {
|
||||
throw new RestException(500, 'Error when validating member: '.$member->error);
|
||||
|
||||
@ -210,9 +210,9 @@ if ($mode && ! count($data))
|
||||
else
|
||||
{
|
||||
if ($mode == 'memberbycountry') print $langs->trans("MembersByCountryDesc").'<br>';
|
||||
else if ($mode == 'memberbystate') print $langs->trans("MembersByStateDesc").'<br>';
|
||||
else if ($mode == 'memberbytown') print $langs->trans("MembersByTownDesc").'<br>';
|
||||
else if ($mode == 'memberbyregion') print $langs->trans("MembersByRegion").'<br>';//+
|
||||
elseif ($mode == 'memberbystate') print $langs->trans("MembersByStateDesc").'<br>';
|
||||
elseif ($mode == 'memberbytown') print $langs->trans("MembersByTownDesc").'<br>';
|
||||
elseif ($mode == 'memberbyregion') print $langs->trans("MembersByRegion").'<br>';//+
|
||||
else
|
||||
{
|
||||
print $langs->trans("MembersStatisticsDesc").'<br>';
|
||||
|
||||
@ -793,8 +793,8 @@ if ($rowid > 0)
|
||||
else
|
||||
{
|
||||
if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $bankviainvoice=1;
|
||||
else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && ! empty($conf->banque->enabled)) $bankdirect=1;
|
||||
else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $invoiceonly=1;
|
||||
elseif (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && ! empty($conf->banque->enabled)) $bankdirect=1;
|
||||
elseif (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $invoiceonly=1;
|
||||
}
|
||||
|
||||
print "\n\n<!-- Form add subscription -->\n";
|
||||
|
||||
@ -538,11 +538,11 @@ if ($rowid > 0)
|
||||
if ($status != '')
|
||||
{
|
||||
if ($status == '-1,1') { $titre=$langs->trans("MembersListQualified"); }
|
||||
else if ($status == '-1') { $titre=$langs->trans("MembersListToValid"); }
|
||||
else if ($status == '1' && ! $filter) { $titre=$langs->trans("MembersListValid"); }
|
||||
else if ($status == '1' && $filter=='uptodate') { $titre=$langs->trans("MembersListUpToDate"); }
|
||||
else if ($status == '1' && $filter=='outofdate') { $titre=$langs->trans("MembersListNotUpToDate"); }
|
||||
else if ($status == '0') { $titre=$langs->trans("MembersListResiliated"); }
|
||||
elseif ($status == '-1') { $titre=$langs->trans("MembersListToValid"); }
|
||||
elseif ($status == '1' && ! $filter) { $titre=$langs->trans("MembersListValid"); }
|
||||
elseif ($status == '1' && $filter=='uptodate') { $titre=$langs->trans("MembersListUpToDate"); }
|
||||
elseif ($status == '1' && $filter=='outofdate') { $titre=$langs->trans("MembersListNotUpToDate"); }
|
||||
elseif ($status == '0') { $titre=$langs->trans("MembersListResiliated"); }
|
||||
}
|
||||
elseif ($action == 'search')
|
||||
{
|
||||
|
||||
@ -86,7 +86,7 @@ if ($action == 'set')
|
||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
else if ($action == 'specimen') // For orders
|
||||
elseif ($action == 'specimen') // For orders
|
||||
{
|
||||
$modele=GETPOST('module','alpha');
|
||||
|
||||
@ -133,13 +133,13 @@ else if ($action == 'specimen') // For orders
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'setmodel')
|
||||
elseif ($action == 'setmodel')
|
||||
{
|
||||
//print "sssd".$value;
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -149,7 +149,7 @@ else if ($action == 'del')
|
||||
}
|
||||
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
|
||||
@ -81,7 +81,7 @@ if ($action == 'set')
|
||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
else if ($action == 'specimen') // For orders
|
||||
elseif ($action == 'specimen') // For orders
|
||||
{
|
||||
$modele=GETPOST('module','alpha');
|
||||
|
||||
@ -128,13 +128,13 @@ else if ($action == 'specimen') // For orders
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'setmodel')
|
||||
elseif ($action == 'setmodel')
|
||||
{
|
||||
//print "sssd".$value;
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -144,7 +144,7 @@ else if ($action == 'del')
|
||||
}
|
||||
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
|
||||
@ -133,7 +133,7 @@ if ($action == 'specimen') {
|
||||
if ($action == 'set') {
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
else if ($action == 'del') {
|
||||
elseif ($action == 'del') {
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0) {
|
||||
if ($conf->global->BANKADDON_PDF == "$value")
|
||||
@ -141,7 +141,7 @@ else if ($action == 'del') {
|
||||
}
|
||||
}
|
||||
// Set default model
|
||||
else if ($action == 'setdoc') {
|
||||
elseif ($action == 'setdoc') {
|
||||
if (dolibarr_set_const($db, "BANKADDON_PDF", $value, 'chaine', 0, '',
|
||||
$conf->entity)) {
|
||||
// The constant that was read before the new set
|
||||
|
||||
@ -289,14 +289,14 @@ if ($resql)
|
||||
$sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'";
|
||||
$resql = $db->query($sql);
|
||||
}
|
||||
else if (preg_match("/[02468]{1}/",substr($record['box_order'],-1)))
|
||||
elseif (preg_match("/[02468]{1}/",substr($record['box_order'],-1)))
|
||||
{
|
||||
$box_order = "B0".$record['box_order'];
|
||||
$sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'";
|
||||
$resql = $db->query($sql);
|
||||
}
|
||||
}
|
||||
else if (dol_strlen($record['box_order']) == 2)
|
||||
elseif (dol_strlen($record['box_order']) == 2)
|
||||
{
|
||||
if (preg_match("/[13579]{1}/",substr($record['box_order'],-1)))
|
||||
{
|
||||
@ -304,7 +304,7 @@ if ($resql)
|
||||
$sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'";
|
||||
$resql = $db->query($sql);
|
||||
}
|
||||
else if (preg_match("/[02468]{1}/",substr($record['box_order'],-1)))
|
||||
elseif (preg_match("/[02468]{1}/",substr($record['box_order'],-1)))
|
||||
{
|
||||
$box_order = "B".$record['box_order'];
|
||||
$sql="UPDATE ".MAIN_DB_PREFIX."boxes SET box_order = '".$box_order."' WHERE entity = ".$conf->entity." AND box_order = '".$record['box_order']."'";
|
||||
|
||||
@ -73,7 +73,7 @@ if ($action == 'updateMask')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'specimen')
|
||||
elseif ($action == 'specimen')
|
||||
{
|
||||
$modele=GETPOST('module','alpha');
|
||||
|
||||
@ -119,12 +119,12 @@ else if ($action == 'specimen')
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
elseif ($action == 'set')
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -134,7 +134,7 @@ else if ($action == 'del')
|
||||
}
|
||||
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "COMMANDE_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
@ -151,7 +151,7 @@ else if ($action == 'setdoc')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setmod')
|
||||
elseif ($action == 'setmod')
|
||||
{
|
||||
// TODO Check if numbering module chosen can be activated
|
||||
// by calling method canBeActivated
|
||||
@ -159,7 +159,7 @@ else if ($action == 'setmod')
|
||||
dolibarr_set_const($db, "COMMANDE_ADDON",$value,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
else if ($action == 'set_COMMANDE_DRAFT_WATERMARK')
|
||||
elseif ($action == 'set_COMMANDE_DRAFT_WATERMARK')
|
||||
{
|
||||
$draft = GETPOST("COMMANDE_DRAFT_WATERMARK");
|
||||
$res = dolibarr_set_const($db, "COMMANDE_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
|
||||
@ -176,7 +176,7 @@ else if ($action == 'set_COMMANDE_DRAFT_WATERMARK')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'set_ORDER_FREE_TEXT')
|
||||
elseif ($action == 'set_ORDER_FREE_TEXT')
|
||||
{
|
||||
$freetext = GETPOST("ORDER_FREE_TEXT",'none'); // No alpha here, we want exact string
|
||||
|
||||
@ -195,7 +195,7 @@ else if ($action == 'set_ORDER_FREE_TEXT')
|
||||
}
|
||||
|
||||
// Activate Set Shippable Icon In List
|
||||
else if ($action=="setshippableiconinlist") {
|
||||
elseif ($action=="setshippableiconinlist") {
|
||||
$setshippableiconinlist = GETPOST('value','int');
|
||||
$res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist,'yesno',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
@ -207,7 +207,7 @@ else if ($action=="setshippableiconinlist") {
|
||||
}
|
||||
|
||||
// Activate ask for payment bank
|
||||
else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER')
|
||||
elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER')
|
||||
{
|
||||
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_ORDER",$value,'chaine',0,'',$conf->entity);
|
||||
|
||||
@ -224,7 +224,7 @@ else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER')
|
||||
}
|
||||
|
||||
// Activate ask for warehouse
|
||||
else if ($action == 'set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER')
|
||||
elseif ($action == 'set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER')
|
||||
{
|
||||
$res = dolibarr_set_const($db, "WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER",$value,'chaine',0,'',$conf->entity);
|
||||
|
||||
|
||||
@ -137,7 +137,7 @@ if ( ($action == 'update' && ! GETPOST("cancel",'alpha'))
|
||||
}
|
||||
else dol_syslog("ErrorImageFormatNotSupported",LOG_WARNING);
|
||||
}
|
||||
else if (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result))
|
||||
elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result))
|
||||
{
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
@ -821,7 +821,7 @@ else
|
||||
{
|
||||
print '<a class="img_logo" href="'.$_SERVER["PHP_SELF"].'?action=addthumb&file='.urlencode($mysoc->logo).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').'</a> ';
|
||||
}
|
||||
else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
|
||||
elseif ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
|
||||
{
|
||||
print '<img class="img_logo" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini).'">';
|
||||
}
|
||||
@ -1097,11 +1097,11 @@ else
|
||||
{
|
||||
print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc");
|
||||
}
|
||||
else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==1)
|
||||
elseif($conf->global->MAIN_INFO_LOCALTAX_CALC1==1)
|
||||
{
|
||||
print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc");
|
||||
}
|
||||
else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==2){
|
||||
elseif($conf->global->MAIN_INFO_LOCALTAX_CALC1==2){
|
||||
print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc");
|
||||
}
|
||||
|
||||
@ -1151,11 +1151,11 @@ else
|
||||
{
|
||||
print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc");
|
||||
}
|
||||
else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==1)
|
||||
elseif($conf->global->MAIN_INFO_LOCALTAX_CALC2==1)
|
||||
{
|
||||
print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc");
|
||||
}
|
||||
else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==2)
|
||||
elseif($conf->global->MAIN_INFO_LOCALTAX_CALC2==2)
|
||||
{
|
||||
print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc");
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ if ($action == 'activate_delivery')
|
||||
header("Location: confexped.php");
|
||||
exit;
|
||||
}
|
||||
else if ($action == 'disable_delivery')
|
||||
elseif ($action == 'disable_delivery')
|
||||
{
|
||||
dolibarr_del_const($db, "MAIN_SUBMODULE_LIVRAISON",$conf->entity);
|
||||
header("Location: confexped.php");
|
||||
|
||||
@ -233,7 +233,7 @@ $sql.= ", entity";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."const";
|
||||
$sql.= " WHERE entity IN (".$user->entity.",".$conf->entity.")";
|
||||
if ((empty($user->entity) || $user->admin) && $debug) {} // to force for superadmin to debug
|
||||
else if (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits
|
||||
elseif (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits
|
||||
if (GETPOST('name')) $sql.=natural_search("name", GETPOST('name'));
|
||||
$sql.= " ORDER BY entity, name ASC";
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ if ($action == 'updateMask')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'specimen') // For contract
|
||||
elseif ($action == 'specimen') // For contract
|
||||
{
|
||||
$modele= GETPOST('module','alpha');
|
||||
|
||||
@ -115,12 +115,12 @@ else if ($action == 'specimen') // For contract
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
elseif ($action == 'set')
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -130,7 +130,7 @@ else if ($action == 'del')
|
||||
}
|
||||
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "CONTRACT_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
@ -147,7 +147,7 @@ else if ($action == 'setdoc')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setmod')
|
||||
elseif ($action == 'setmod')
|
||||
{
|
||||
// TODO Verifier si module numerotation choisi peut etre active
|
||||
// par appel methode canBeActivated
|
||||
@ -155,7 +155,7 @@ else if ($action == 'setmod')
|
||||
dolibarr_set_const($db, "CONTRACT_ADDON",$value,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
else if ($action == 'set_other')
|
||||
elseif ($action == 'set_other')
|
||||
{
|
||||
$freetext= GETPOST('CONTRACT_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
$res1 = dolibarr_set_const($db, "CONTRACT_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
@ -728,7 +728,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
if ($value == 'price' || preg_match('/^amount/i',$value) || $value == 'taux') {
|
||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
||||
}
|
||||
else if ($value == 'entity') {
|
||||
elseif ($value == 'entity') {
|
||||
$_POST[$listfieldvalue[$i]] = getEntity($tabname[$id]);
|
||||
}
|
||||
if ($i) $sql.=",";
|
||||
@ -780,7 +780,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
|
||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
||||
}
|
||||
else if ($field == 'entity') {
|
||||
elseif ($field == 'entity') {
|
||||
$_POST[$listfieldvalue[$i]] = getEntity($tabname[$id]);
|
||||
}
|
||||
if ($i) $sql.=",";
|
||||
@ -1125,7 +1125,7 @@ if ($id)
|
||||
{
|
||||
print '<td'.($class?' class="'.$class.'"':'').'>';
|
||||
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
|
||||
else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
|
||||
elseif (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
|
||||
else print $valuetoshow;
|
||||
print '</td>';
|
||||
}
|
||||
@ -1409,14 +1409,14 @@ if ($id)
|
||||
{
|
||||
$valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow;
|
||||
}
|
||||
else if ($value == 'source')
|
||||
elseif ($value == 'source')
|
||||
{
|
||||
$valuetoshow = isset($sourceList[$valuetoshow])?$sourceList[$valuetoshow]:$valuetoshow;
|
||||
}
|
||||
else if ($valuetoshow=='all') {
|
||||
elseif ($valuetoshow=='all') {
|
||||
$valuetoshow=$langs->trans('All');
|
||||
}
|
||||
else if ($fieldlist[$field]=='country') {
|
||||
elseif ($fieldlist[$field]=='country') {
|
||||
if (empty($obj->country_code))
|
||||
{
|
||||
$valuetoshow='-';
|
||||
@ -1427,143 +1427,143 @@ if ($id)
|
||||
$valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country);
|
||||
}
|
||||
}
|
||||
else if ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') {
|
||||
elseif ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') {
|
||||
$valuetoshow=yn($valuetoshow);
|
||||
$align="center";
|
||||
}
|
||||
else if ($fieldlist[$field]=='type_cdr') {
|
||||
elseif ($fieldlist[$field]=='type_cdr') {
|
||||
if(empty($valuetoshow)) $valuetoshow = $langs->trans('None');
|
||||
elseif($valuetoshow == 1) $valuetoshow = $langs->trans('AtEndOfMonth');
|
||||
elseif($valuetoshow == 2) $valuetoshow = $langs->trans('CurrentNext');
|
||||
$align="center";
|
||||
}
|
||||
else if ($fieldlist[$field]=='price' || preg_match('/^amount/i',$fieldlist[$field])) {
|
||||
elseif ($fieldlist[$field]=='price' || preg_match('/^amount/i',$fieldlist[$field])) {
|
||||
$valuetoshow=price($valuetoshow);
|
||||
}
|
||||
if ($value == 'private')
|
||||
{
|
||||
$valuetoshow = yn($elementList[$valuetoshow]);
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle_facture') {
|
||||
elseif ($fieldlist[$field]=='libelle_facture') {
|
||||
$langs->load("bills");
|
||||
$key=$langs->trans("PaymentCondition".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "PaymentCondition".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
$valuetoshow=nl2br($valuetoshow);
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') {
|
||||
elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') {
|
||||
$key=$langs->trans("Country".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') {
|
||||
elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') {
|
||||
$langs->load("propal");
|
||||
$key=$langs->trans("AvailabilityType".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') {
|
||||
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') {
|
||||
$key=$langs->trans("Action".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "Action".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if (! empty($obj->code_iso) && $fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_currencies') {
|
||||
elseif (! empty($obj->code_iso) && $fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_currencies') {
|
||||
$key=$langs->trans("Currency".strtoupper($obj->code_iso));
|
||||
$valuetoshow=($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_typent') {
|
||||
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_typent') {
|
||||
$key=$langs->trans(strtoupper($obj->code));
|
||||
$valuetoshow=($key != strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_prospectlevel') {
|
||||
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_prospectlevel') {
|
||||
$key=$langs->trans(strtoupper($obj->code));
|
||||
$valuetoshow=($key != strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_civility') {
|
||||
elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_civility') {
|
||||
$key=$langs->trans("Civility".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "Civility".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') {
|
||||
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') {
|
||||
$langs->load('agenda');
|
||||
$key=$langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_payment_term') {
|
||||
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_payment_term') {
|
||||
$langs->load("bills");
|
||||
$key=$langs->trans("PaymentConditionShort".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') {
|
||||
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') {
|
||||
$langs->load("bills");
|
||||
$key=$langs->trans("PaymentType".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') {
|
||||
elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') {
|
||||
$key=$langs->trans("DemandReasonType".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "DemandReasonType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_method') {
|
||||
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_method') {
|
||||
$langs->load("orders");
|
||||
$key=$langs->trans($obj->code);
|
||||
$valuetoshow=($obj->code && $key != $obj->code)?$key:$obj->{$fieldlist[$field]};
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_shipment_mode') {
|
||||
elseif ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_shipment_mode') {
|
||||
$langs->load("sendings");
|
||||
$key=$langs->trans("SendingMethod".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "SendingMethod".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field] == 'libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paper_format')
|
||||
elseif ($fieldlist[$field] == 'libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paper_format')
|
||||
{
|
||||
$key = $langs->trans('PaperFormat'.strtoupper($obj->code));
|
||||
$valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees')
|
||||
elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees')
|
||||
{
|
||||
$langs->load('trips');
|
||||
$key = $langs->trans(strtoupper($obj->code));
|
||||
$valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') {
|
||||
elseif ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') {
|
||||
$showfield=0;
|
||||
}
|
||||
else if ($fieldlist[$field]=='unicode') {
|
||||
elseif ($fieldlist[$field]=='unicode') {
|
||||
$valuetoshow = $langs->getCurrencySymbol($obj->code,1);
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
|
||||
elseif ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
|
||||
$langs->load("products");
|
||||
$valuetoshow=$langs->trans($obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='short_label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
|
||||
elseif ($fieldlist[$field]=='short_label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
|
||||
$langs->load("products");
|
||||
$valuetoshow = $langs->trans($obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format'))
|
||||
elseif (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format'))
|
||||
{
|
||||
$key = $langs->trans('SizeUnit'.strtolower($obj->unit));
|
||||
$valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='localtax1' || $fieldlist[$field]=='localtax2') {
|
||||
elseif ($fieldlist[$field]=='localtax1' || $fieldlist[$field]=='localtax2') {
|
||||
$align="center";
|
||||
}
|
||||
else if ($fieldlist[$field]=='localtax1_type') {
|
||||
elseif ($fieldlist[$field]=='localtax1_type') {
|
||||
if ($obj->localtax1 != 0)
|
||||
$valuetoshow=$localtax_typeList[$valuetoshow];
|
||||
else
|
||||
$valuetoshow = '';
|
||||
$align="center";
|
||||
}
|
||||
else if ($fieldlist[$field]=='localtax2_type') {
|
||||
elseif ($fieldlist[$field]=='localtax2_type') {
|
||||
if ($obj->localtax2 != 0)
|
||||
$valuetoshow=$localtax_typeList[$valuetoshow];
|
||||
else
|
||||
$valuetoshow = '';
|
||||
$align="center";
|
||||
}
|
||||
else if ($fieldlist[$field]=='taux') {
|
||||
elseif ($fieldlist[$field]=='taux') {
|
||||
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||
$align="center";
|
||||
}
|
||||
else if (in_array($fieldlist[$field],array('recuperableonly')))
|
||||
elseif (in_array($fieldlist[$field],array('recuperableonly')))
|
||||
{
|
||||
$align="center";
|
||||
}
|
||||
else if ($fieldlist[$field]=='accountancy_code' || $fieldlist[$field]=='accountancy_code_sell' || $fieldlist[$field]=='accountancy_code_buy') {
|
||||
elseif ($fieldlist[$field]=='accountancy_code' || $fieldlist[$field]=='accountancy_code_sell' || $fieldlist[$field]=='accountancy_code_buy') {
|
||||
$valuetoshow = length_accountg($valuetoshow);
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'fk_tva')
|
||||
@ -1604,8 +1604,8 @@ if ($id)
|
||||
if (isset($obj->code) && $id != 10)
|
||||
{
|
||||
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; }
|
||||
else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
|
||||
else if ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; }
|
||||
elseif ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
|
||||
elseif ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; }
|
||||
}
|
||||
|
||||
if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { $iserasable=0; }
|
||||
@ -1639,8 +1639,8 @@ if ($id)
|
||||
else
|
||||
{
|
||||
if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive");
|
||||
else if (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated");
|
||||
else if (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption");
|
||||
elseif (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated");
|
||||
elseif (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption");
|
||||
else print $langs->trans("AlwaysActive");
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
@ -53,6 +53,6 @@ try {
|
||||
// Here we are dealing with errors
|
||||
$trace = $e->getTrace();
|
||||
if ($trace[0]['args'][0] == 404) die('Bad ID');
|
||||
else if ($trace[0]['args'][0] == 401) die('Bad auth key');
|
||||
elseif ($trace[0]['args'][0] == 401) die('Bad auth key');
|
||||
else die('Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV);
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@ class Dolistore
|
||||
// Here we are dealing with errors
|
||||
$trace = $e->getTrace();
|
||||
if ($trace[0]['args'][0] == 404) die('Bad ID');
|
||||
else if ($trace[0]['args'][0] == 401) die('Bad auth key');
|
||||
elseif ($trace[0]['args'][0] == 401) die('Bad auth key');
|
||||
else
|
||||
{
|
||||
print 'Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'<br>';
|
||||
|
||||
@ -100,7 +100,7 @@ else
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_ECM_AUTO_TREE_ENABLED">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
else if(! empty($conf->global->USER_MAIL_REQUIRED))
|
||||
elseif(! empty($conf->global->USER_MAIL_REQUIRED))
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_ECM_AUTO_TREE_ENABLED">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ if ($action == 'updateMask')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'set_param')
|
||||
elseif ($action == 'set_param')
|
||||
{
|
||||
$freetext=GETPOST('SHIPPING_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
$res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
@ -98,7 +98,7 @@ else if ($action == 'set_param')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'specimen')
|
||||
elseif ($action == 'specimen')
|
||||
{
|
||||
$modele=GETPOST('module','alpha');
|
||||
|
||||
@ -144,12 +144,12 @@ else if ($action == 'specimen')
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
elseif ($action == 'set')
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -159,7 +159,7 @@ else if ($action == 'del')
|
||||
}
|
||||
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "EXPEDITION_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
@ -176,7 +176,7 @@ else if ($action == 'setdoc')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setmodel')
|
||||
elseif ($action == 'setmodel')
|
||||
{
|
||||
dolibarr_set_const($db, "EXPEDITION_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ if ($action == 'updateMask')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'specimen') // For fiche inter
|
||||
elseif ($action == 'specimen') // For fiche inter
|
||||
{
|
||||
$modele= GETPOST('module','alpha');
|
||||
|
||||
@ -118,7 +118,7 @@ else if ($action == 'specimen') // For fiche inter
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
elseif ($action == 'set')
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
if ($ret > 0 && empty($conf->global->EXPENSEREPORT_ADDON_PDF))
|
||||
@ -127,7 +127,7 @@ else if ($action == 'set')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -137,7 +137,7 @@ else if ($action == 'del')
|
||||
}
|
||||
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "EXPENSEREPORT_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
@ -154,7 +154,7 @@ else if ($action == 'setdoc')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setmod')
|
||||
elseif ($action == 'setmod')
|
||||
{
|
||||
// TODO Verifier si module numerotation choisi peut etre active
|
||||
// par appel methode canBeActivated
|
||||
@ -162,7 +162,7 @@ else if ($action == 'setmod')
|
||||
dolibarr_set_const($db, "EXPENSEREPORT_ADDON",$value,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
else if ($action == 'setoptions')
|
||||
elseif ($action == 'setoptions')
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
|
||||
@ -124,12 +124,12 @@ if ($action == 'specimen')
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
elseif ($action == 'set')
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -139,7 +139,7 @@ else if ($action == 'del')
|
||||
}
|
||||
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "FACTURE_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
@ -156,7 +156,7 @@ else if ($action == 'setdoc')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setmod')
|
||||
elseif ($action == 'setmod')
|
||||
{
|
||||
// TODO Verifier si module numerotation choisi peut etre active
|
||||
// par appel methode canBeActivated
|
||||
|
||||
@ -167,7 +167,7 @@ else
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=activate_'.strtolower($const).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
else if ($value == 1)
|
||||
elseif ($value == 1)
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=disable_'.strtolower($const).'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ if ($action == 'updateMask')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'specimen') // For fiche inter
|
||||
elseif ($action == 'specimen') // For fiche inter
|
||||
{
|
||||
$modele= GETPOST('module','alpha');
|
||||
|
||||
@ -116,12 +116,12 @@ else if ($action == 'specimen') // For fiche inter
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
elseif ($action == 'set')
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -131,7 +131,7 @@ else if ($action == 'del')
|
||||
}
|
||||
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "FICHEINTER_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
@ -148,7 +148,7 @@ else if ($action == 'setdoc')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setmod')
|
||||
elseif ($action == 'setmod')
|
||||
{
|
||||
// TODO Verifier si module numerotation choisi peut etre active
|
||||
// par appel methode canBeActivated
|
||||
@ -156,7 +156,7 @@ else if ($action == 'setmod')
|
||||
dolibarr_set_const($db, "FICHEINTER_ADDON",$value,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
else if ($action == 'set_FICHINTER_FREE_TEXT')
|
||||
elseif ($action == 'set_FICHINTER_FREE_TEXT')
|
||||
{
|
||||
$freetext= GETPOST('FICHINTER_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
$res = dolibarr_set_const($db, "FICHINTER_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
@ -173,7 +173,7 @@ else if ($action == 'set_FICHINTER_FREE_TEXT')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'set_FICHINTER_DRAFT_WATERMARK')
|
||||
elseif ($action == 'set_FICHINTER_DRAFT_WATERMARK')
|
||||
{
|
||||
$draft= GETPOST('FICHINTER_DRAFT_WATERMARK','alpha');
|
||||
$res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
|
||||
|
||||
@ -71,7 +71,7 @@ if ($action == 'updateMask')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'specimen') // For contract
|
||||
elseif ($action == 'specimen') // For contract
|
||||
{
|
||||
$modele= GETPOST('module','alpha');
|
||||
|
||||
@ -117,12 +117,12 @@ else if ($action == 'specimen') // For contract
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
elseif ($action == 'set')
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -132,7 +132,7 @@ else if ($action == 'del')
|
||||
}
|
||||
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "HOLIDAY_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
@ -149,7 +149,7 @@ else if ($action == 'setdoc')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setmod')
|
||||
elseif ($action == 'setmod')
|
||||
{
|
||||
// TODO Verifier si module numerotation choisi peut etre active
|
||||
// par appel methode canBeActivated
|
||||
@ -157,7 +157,7 @@ else if ($action == 'setmod')
|
||||
dolibarr_set_const($db, "HOLIDAY_ADDON",$value,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
else if ($action == 'set_other')
|
||||
elseif ($action == 'set_other')
|
||||
{
|
||||
$freetext= GETPOST('HOLIDAY_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
$res1 = dolibarr_set_const($db, "HOLIDAY_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
@ -173,7 +173,7 @@ if ($action == 'update')
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_LOGIN_BACKGROUND",$original_file,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
else if (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result))
|
||||
elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result))
|
||||
{
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
|
||||
@ -673,11 +673,11 @@ else
|
||||
{
|
||||
print $langs->trans('RobotEmail');
|
||||
}
|
||||
else if ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'user')
|
||||
elseif ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'user')
|
||||
{
|
||||
print $langs->trans('UserEmail');
|
||||
}
|
||||
else if ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'company')
|
||||
elseif ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'company')
|
||||
{
|
||||
print $langs->trans('CompanyEmail').' '.dol_escape_htmltag('<'.$mysoc->email.'>');
|
||||
}
|
||||
|
||||
@ -479,7 +479,7 @@ foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
print '<td align="'.$align.'">';
|
||||
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
|
||||
else if (! empty($tabhelp[$id][$value]))
|
||||
elseif (! empty($tabhelp[$id][$value]))
|
||||
{
|
||||
if (in_array($value, array('topic'))) print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, $value); // Tooltip on click
|
||||
else print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2); // Tooltip on hover
|
||||
@ -552,7 +552,7 @@ foreach ($fieldsforcontent as $tmpfieldlist)
|
||||
if ($tmpfieldlist == 'topic') {
|
||||
print '<input type="text" class="flat minwidth500" name="'.$tmpfieldlist.'" value="' . (! empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : '') . '">';
|
||||
}
|
||||
else if ($tmpfieldlist == 'joinfiles') {
|
||||
elseif ($tmpfieldlist == 'joinfiles') {
|
||||
print '<input type="text" class="flat maxwidth50" name="'.$tmpfieldlist.'" value="' . (isset($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : '1') . '">';
|
||||
}
|
||||
else
|
||||
|
||||
@ -42,7 +42,7 @@ if ($action == 'activate_hidemenu')
|
||||
header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
}
|
||||
else if ($action == 'disable_hidemenu')
|
||||
elseif ($action == 'disable_hidemenu')
|
||||
{
|
||||
dolibarr_del_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED",$conf->entity);
|
||||
header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
|
||||
@ -244,7 +244,7 @@ if ($action == 'set' && $user->admin)
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?mode=".$mode.$param.($page_y?'&page_y='.$page_y:''));
|
||||
exit;
|
||||
}
|
||||
else if ($action == 'reset' && $user->admin && GETPOST('confirm') == 'yes')
|
||||
elseif ($action == 'reset' && $user->admin && GETPOST('confirm') == 'yes')
|
||||
{
|
||||
$result=unActivateModule($value);
|
||||
if ($result) setEventMessages($result, null, 'errors');
|
||||
@ -698,7 +698,7 @@ if ($mode == 'common')
|
||||
{
|
||||
print $langs->trans("Disabled");
|
||||
}
|
||||
else if (! empty($objMod->always_enabled) || ((! empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity!=1)))
|
||||
elseif (! empty($objMod->always_enabled) || ((! empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity!=1)))
|
||||
{
|
||||
if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) print $langs->trans("Used");
|
||||
else {
|
||||
@ -761,7 +761,7 @@ if ($mode == 'common')
|
||||
}
|
||||
print "</td>\n";
|
||||
}
|
||||
else if (preg_match('/^([^@]+)@([^@]+)$/i',$objMod->config_page_url,$regs))
|
||||
elseif (preg_match('/^([^@]+)@([^@]+)$/i',$objMod->config_page_url,$regs))
|
||||
{
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="60px"><a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1],1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a></td>';
|
||||
}
|
||||
@ -783,7 +783,7 @@ if ($mode == 'common')
|
||||
{
|
||||
// Should never happened
|
||||
}
|
||||
else if (! empty($objMod->disabled))
|
||||
elseif (! empty($objMod->disabled))
|
||||
{
|
||||
print $langs->trans("Disabled");
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ if ($action == 'setvalue' && $user->admin)
|
||||
$newval=GETPOST($shortkey.'_key');
|
||||
//print $newkey.' - '.$newval.'<br>';
|
||||
}
|
||||
else if (preg_match('/^NOTIF_(.*)_new_key/',$key,$reg))
|
||||
elseif (preg_match('/^NOTIF_(.*)_new_key/',$key,$reg))
|
||||
{
|
||||
// Add a new entry
|
||||
$newkey='NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.((int) GETPOST($shortkey.'_amount'));
|
||||
|
||||
@ -86,7 +86,7 @@ if ($action == 'activate_pdfsecurity')
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
|
||||
exit;
|
||||
}
|
||||
else if ($action == 'disable_pdfsecurity')
|
||||
elseif ($action == 'disable_pdfsecurity')
|
||||
{
|
||||
dolibarr_del_const($db, "PDF_SECURITY_ENCRYPTION",$conf->entity);
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
|
||||
|
||||
@ -96,9 +96,7 @@ if ($action == "set")
|
||||
{
|
||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"),'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
} else
|
||||
|
||||
if (! $error)
|
||||
} elseif (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
|
||||
@ -188,7 +188,7 @@ if ($action == 'set')
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -197,7 +197,7 @@ else if ($action == 'del')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "PROPALE_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
@ -212,7 +212,7 @@ else if ($action == 'setdoc')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setmod')
|
||||
elseif ($action == 'setmod')
|
||||
{
|
||||
// TODO Verifier si module numerotation choisi peut etre active
|
||||
// par appel methode canBeActivated
|
||||
|
||||
@ -80,7 +80,7 @@ if ($action == 'updateMask')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'set_param')
|
||||
elseif ($action == 'set_param')
|
||||
{
|
||||
$freetext=GETPOST('RECEPTION_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
$res = dolibarr_set_const($db, "RECEPTION_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
@ -104,7 +104,7 @@ else if ($action == 'set_param')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'specimen')
|
||||
elseif ($action == 'specimen')
|
||||
{
|
||||
$modele=GETPOST('module','alpha');
|
||||
|
||||
@ -150,12 +150,12 @@ else if ($action == 'specimen')
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
elseif ($action == 'set')
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -165,7 +165,7 @@ else if ($action == 'del')
|
||||
}
|
||||
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "RECEPTION_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
@ -182,7 +182,7 @@ else if ($action == 'setdoc')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setmodel')
|
||||
elseif ($action == 'setmodel')
|
||||
{
|
||||
dolibarr_set_const($db, "RECEPTION_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ if ($action == 'activate_encrypt')
|
||||
dol_print_error($db,'');
|
||||
}
|
||||
}
|
||||
else if ($action == 'disable_encrypt')
|
||||
elseif ($action == 'disable_encrypt')
|
||||
{
|
||||
//On n'autorise pas l'annulation de l'encryption car les mots de passe ne peuvent pas etre decodes
|
||||
//Do not allow "disable encryption" as passwords cannot be decrypted
|
||||
@ -137,7 +137,7 @@ if ($action == 'activate_encryptdbpassconf')
|
||||
setEventMessages($langs->trans('InstrucToEncodePass',dol_encode($dolibarr_main_db_pass)), null, 'warnings');
|
||||
}
|
||||
}
|
||||
else if ($action == 'disable_encryptdbpassconf')
|
||||
elseif ($action == 'disable_encryptdbpassconf')
|
||||
{
|
||||
$result = encodedecode_dbpassconf(0);
|
||||
if ($result > 0)
|
||||
@ -161,7 +161,7 @@ if ($action == 'activate_MAIN_SECURITY_DISABLEFORGETPASSLINK')
|
||||
header("Location: security.php");
|
||||
exit;
|
||||
}
|
||||
else if ($action == 'disable_MAIN_SECURITY_DISABLEFORGETPASSLINK')
|
||||
elseif ($action == 'disable_MAIN_SECURITY_DISABLEFORGETPASSLINK')
|
||||
{
|
||||
dolibarr_del_const($db, "MAIN_SECURITY_DISABLEFORGETPASSLINK",$conf->entity);
|
||||
header("Location: security.php");
|
||||
|
||||
@ -67,7 +67,7 @@ if ($action == 'updateform')
|
||||
|
||||
|
||||
// Delete file
|
||||
else if ($action == 'delete')
|
||||
elseif ($action == 'delete')
|
||||
{
|
||||
$langs->load("other");
|
||||
$file = $conf->admin->dir_temp . '/' . GETPOST('urlfile','alpha'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||
|
||||
@ -57,7 +57,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg))
|
||||
}
|
||||
}
|
||||
|
||||
else if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg))
|
||||
elseif (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg))
|
||||
{
|
||||
$code=$reg[1];
|
||||
if (dolibarr_del_const($db, $code, $conf->entity) > 0)
|
||||
@ -71,7 +71,7 @@ else if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'updateform')
|
||||
elseif ($action == 'updateform')
|
||||
{
|
||||
$res1=dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_APPLICATION_TITLE"],'chaine',0,'',$conf->entity);
|
||||
$res2=dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity);
|
||||
|
||||
@ -122,12 +122,12 @@ if ($action == 'specimen') // For invoices
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
elseif ($action == 'set')
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -137,7 +137,7 @@ else if ($action == 'del')
|
||||
}
|
||||
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "INVOICE_SUPPLIER_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
@ -153,7 +153,7 @@ else if ($action == 'setdoc')
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
}
|
||||
else if ($action == 'unsetdoc')
|
||||
elseif ($action == 'unsetdoc')
|
||||
{
|
||||
dolibarr_del_const($db, "INVOICE_SUPPLIER_ADDON_PDF", $conf->entity);
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ if ($action == 'updateMask')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'specimen') // For orders
|
||||
elseif ($action == 'specimen') // For orders
|
||||
{
|
||||
$modele=GETPOST('module','alpha');
|
||||
|
||||
@ -120,12 +120,12 @@ else if ($action == 'specimen') // For orders
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
elseif ($action == 'set')
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -135,7 +135,7 @@ else if ($action == 'del')
|
||||
}
|
||||
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
@ -152,7 +152,7 @@ else if ($action == 'setdoc')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setmod')
|
||||
elseif ($action == 'setmod')
|
||||
{
|
||||
// TODO Verifier si module numerotation choisi peut etre active
|
||||
// par appel methode canBeActivated
|
||||
@ -160,13 +160,13 @@ else if ($action == 'setmod')
|
||||
dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
else if ($action == 'addcat')
|
||||
elseif ($action == 'addcat')
|
||||
{
|
||||
$fourn = new Fournisseur($db);
|
||||
$fourn->CreateCategory($user,$_POST["cat"]);
|
||||
}
|
||||
|
||||
else if ($action == 'set_SUPPLIER_ORDER_OTHER')
|
||||
elseif ($action == 'set_SUPPLIER_ORDER_OTHER')
|
||||
{
|
||||
$freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT','none'); // No alpha here, we want exact string
|
||||
$doubleapproval = GETPOST('SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED','alpha');
|
||||
@ -206,7 +206,7 @@ else if ($action == 'set_SUPPLIER_ORDER_OTHER')
|
||||
}
|
||||
|
||||
// Activate ask for payment bank
|
||||
else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER')
|
||||
elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER')
|
||||
{
|
||||
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER",$value,'chaine',0,'',$conf->entity);
|
||||
|
||||
|
||||
@ -61,18 +61,18 @@ if ($action == 'updateMask')
|
||||
{
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}else if ($action == 'setmod')
|
||||
}elseif ($action == 'setmod')
|
||||
{
|
||||
dolibarr_set_const($db, "SUPPLIER_PAYMENT_ADDON", $value, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
elseif ($action == 'set')
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -82,7 +82,7 @@ else if ($action == 'del')
|
||||
}
|
||||
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "SUPPLIER_PAYMENT_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
@ -99,7 +99,7 @@ else if ($action == 'setdoc')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'specimen')
|
||||
elseif ($action == 'specimen')
|
||||
{
|
||||
$modele=GETPOST('module','alpha');
|
||||
|
||||
|
||||
@ -169,7 +169,7 @@ if ($action == 'set')
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -178,7 +178,7 @@ else if ($action == 'del')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
@ -193,7 +193,7 @@ else if ($action == 'setdoc')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setmod')
|
||||
elseif ($action == 'setmod')
|
||||
{
|
||||
// TODO Verifier si module numerotation choisi peut etre active
|
||||
// par appel methode canBeActivated
|
||||
|
||||
@ -230,7 +230,7 @@ foreach ($syslogModules as $moduleName)
|
||||
if (! empty($tmpoption))
|
||||
{
|
||||
if (isset($_POST[$tmpoption])) $value=$_POST[$tmpoption];
|
||||
else if (! empty($conf->global->$tmpoption)) $value = $conf->global->$tmpoption;
|
||||
elseif (! empty($conf->global->$tmpoption)) $value = $conf->global->$tmpoption;
|
||||
}
|
||||
else $value = (isset($option['default']) ? $option['default'] : '');
|
||||
|
||||
|
||||
@ -183,7 +183,7 @@ foreach($configfileparameters as $key)
|
||||
// Value
|
||||
print "<td>";
|
||||
if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${$newkey});
|
||||
else if ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
|
||||
elseif ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
|
||||
else print ${$newkey};
|
||||
if ($newkey == 'dolibarr_main_url_root' && ${$newkey} != DOL_MAIN_URL_ROOT) print ' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.')';
|
||||
print "</td>";
|
||||
|
||||
@ -56,17 +56,17 @@ if (preg_match('/mysql/i',$conf->db->type))
|
||||
$sql = "SHOW TABLE STATUS";
|
||||
$base=1;
|
||||
}
|
||||
else if ($conf->db->type == 'pgsql')
|
||||
elseif ($conf->db->type == 'pgsql')
|
||||
{
|
||||
$sql = "SELECT conname, contype FROM pg_constraint;";
|
||||
$base=2;
|
||||
}
|
||||
else if ($conf->db->type == 'mssql')
|
||||
elseif ($conf->db->type == 'mssql')
|
||||
{
|
||||
//$sqls[0] = "";
|
||||
//$base=3;
|
||||
}
|
||||
else if ($conf->db->type == 'sqlite' || $conf->db->type == 'sqlite3')
|
||||
elseif ($conf->db->type == 'sqlite' || $conf->db->type == 'sqlite3')
|
||||
{
|
||||
//$sql = "SELECT name, type FROM sqlite_master";
|
||||
$base = 4;
|
||||
|
||||
@ -50,7 +50,7 @@ if (preg_match('/mysql/i',$conf->db->type))
|
||||
$sql = "SHOW TABLE STATUS LIKE '".$db->escape($table)."'";
|
||||
$base=1;
|
||||
}
|
||||
else if ($conf->db->type == 'pgsql')
|
||||
elseif ($conf->db->type == 'pgsql')
|
||||
{
|
||||
$sql = "SELECT conname,contype FROM pg_constraint";
|
||||
$base=2;
|
||||
|
||||
@ -374,8 +374,8 @@ foreach($configfileparameters as $key => $value)
|
||||
// Value
|
||||
print "<td>";
|
||||
if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${$newkey});
|
||||
else if ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
|
||||
else if ($newkey == 'dolibarr_main_document_root_alt')
|
||||
elseif ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
|
||||
elseif ($newkey == 'dolibarr_main_document_root_alt')
|
||||
{
|
||||
$tmparray=explode(',',${$newkey});
|
||||
$i=0;
|
||||
|
||||
@ -166,7 +166,7 @@ print '<tr '.$bc[false].'><td style="padding-left: 8px">';
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
else if (in_array($type, array('pgsql')))
|
||||
elseif (in_array($type, array('pgsql')))
|
||||
{
|
||||
?>
|
||||
<div class="formelementrow"><input type="radio" name="what" value="postgresql" id="radio_dump_postgresql" />
|
||||
|
||||
@ -106,7 +106,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'<br><br>';
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
else if (in_array($type, array('pgsql')))
|
||||
elseif (in_array($type, array('pgsql')))
|
||||
{
|
||||
?>
|
||||
<div class="formelementrow">
|
||||
@ -164,7 +164,7 @@ if (in_array($type, array('mysql', 'mysqli')))
|
||||
</fieldset>
|
||||
<?php
|
||||
}
|
||||
else if (in_array($type, array('pgsql')))
|
||||
elseif (in_array($type, array('pgsql')))
|
||||
{
|
||||
?>
|
||||
<fieldset id="postgresql_options">
|
||||
|
||||
@ -48,17 +48,17 @@ if (isset($_POST['caching'])) {
|
||||
} else {
|
||||
eaccelerator_caching(true);
|
||||
}
|
||||
} else if (isset($_POST['optimizer']) && function_exists('eaccelerator_optimizer')) {
|
||||
} elseif (isset($_POST['optimizer']) && function_exists('eaccelerator_optimizer')) {
|
||||
if ($info['optimizer']) {
|
||||
eaccelerator_optimizer(false);
|
||||
} else {
|
||||
eaccelerator_optimizer(true);
|
||||
}
|
||||
} else if (isset($_POST['clear'])) {
|
||||
} elseif (isset($_POST['clear'])) {
|
||||
eaccelerator_clear();
|
||||
} else if (isset($_POST['clean'])) {
|
||||
} elseif (isset($_POST['clean'])) {
|
||||
eaccelerator_clean();
|
||||
} else if (isset($_POST['purge'])) {
|
||||
} elseif (isset($_POST['purge'])) {
|
||||
eaccelerator_purge();
|
||||
}
|
||||
$info = eaccelerator_info();
|
||||
@ -81,7 +81,7 @@ function compare($x, $y)
|
||||
|
||||
if ( $x[$sortby] == $y[$sortby] ) {
|
||||
return 0;
|
||||
} else if ($x[$sortby] < $y[$sortby]) {
|
||||
} elseif ($x[$sortby] < $y[$sortby]) {
|
||||
return -1;
|
||||
} else {
|
||||
return 1;
|
||||
@ -101,7 +101,7 @@ function revcompare($x, $y)
|
||||
|
||||
if ($x[$sortby] == $y[$sortby]) {
|
||||
return 0;
|
||||
} else if ($x[$sortby] < $y[$sortby]) {
|
||||
} elseif ($x[$sortby] < $y[$sortby]) {
|
||||
return 1;
|
||||
} else {
|
||||
return -1;
|
||||
|
||||
@ -115,7 +115,7 @@ if ($action == 'purge')
|
||||
$formquestion=array();
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2);
|
||||
}
|
||||
else if ($action == 'lock')
|
||||
elseif ($action == 'lock')
|
||||
{
|
||||
$formquestion=array();
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1);
|
||||
|
||||
@ -543,7 +543,7 @@ if ($mode == 'searchkey')
|
||||
$htmltext = $langs->trans("OriginalValueWas", $newlangfileonly->tab_translate[$key]);
|
||||
print $form->textwithpicto('', $htmltext, 1, 'info');
|
||||
}
|
||||
else if (!empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION))
|
||||
elseif (!empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION))
|
||||
{
|
||||
//print $key.'-'.$val;
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?mode=overwrite&langcode=' . $langcode . '&transkey=' . $key . '">' . img_edit_add($langs->trans("Overwrite")) . '</a>';
|
||||
|
||||
@ -230,7 +230,7 @@ class DolibarrApi
|
||||
if (preg_match('/&/', $resource)) {
|
||||
$featuresarray = explode("&", $resource);
|
||||
}
|
||||
else if (preg_match('/\|/', $resource)) {
|
||||
elseif (preg_match('/\|/', $resource)) {
|
||||
$featuresarray = explode("|", $resource);
|
||||
}
|
||||
|
||||
|
||||
@ -202,7 +202,7 @@ class Setup extends DolibarrApi
|
||||
if ($country->fetch($id) < 0) {
|
||||
throw new RestException(503, 'Error when retrieving country : '.$country->error);
|
||||
}
|
||||
else if ($country->fetch($id) == 0) {
|
||||
elseif ($country->fetch($id) == 0) {
|
||||
throw new RestException(404, 'country not found');
|
||||
}
|
||||
|
||||
|
||||
@ -105,7 +105,7 @@ if ($action === 'downloadblockchain') {
|
||||
|
||||
exit;
|
||||
}
|
||||
else if (GETPOST('downloadcsv','alpha'))
|
||||
elseif (GETPOST('downloadcsv','alpha'))
|
||||
{
|
||||
$error = 0;
|
||||
|
||||
|
||||
@ -161,7 +161,7 @@ class BlockedLogAuthority
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."blockedlog_authority as b";
|
||||
|
||||
if ($id) $sql.= " WHERE b.rowid = ". $id;
|
||||
else if($signature)$sql.= " WHERE b.signature = '". $this->db->escape( $signature ) ."'" ;
|
||||
elseif($signature)$sql.= " WHERE b.signature = '". $this->db->escape( $signature ) ."'" ;
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@ -208,7 +208,7 @@ class BlockedLog
|
||||
$this->error++;
|
||||
}
|
||||
}
|
||||
else if($this->element === 'payment') {
|
||||
elseif($this->element === 'payment') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||
|
||||
$object = new Paiement($this->db);
|
||||
@ -219,7 +219,7 @@ class BlockedLog
|
||||
$this->error++;
|
||||
}
|
||||
}
|
||||
else if($this->element === 'payment_supplier') {
|
||||
elseif($this->element === 'payment_supplier') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||
|
||||
$object = new PaiementFourn($this->db);
|
||||
@ -230,7 +230,7 @@ class BlockedLog
|
||||
$this->error++;
|
||||
}
|
||||
}
|
||||
else if($this->element === 'payment_donation') {
|
||||
elseif($this->element === 'payment_donation') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/don/class/paymentdonation.class.php';
|
||||
|
||||
$object = new PaymentDonation($this->db);
|
||||
@ -241,7 +241,7 @@ class BlockedLog
|
||||
$this->error++;
|
||||
}
|
||||
}
|
||||
else if($this->element === 'payment_various') {
|
||||
elseif($this->element === 'payment_various') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php';
|
||||
|
||||
$object = new PaymentVarious($this->db);
|
||||
@ -252,7 +252,7 @@ class BlockedLog
|
||||
$this->error++;
|
||||
}
|
||||
}
|
||||
else if($this->element === 'don' || $this->element === 'donation') {
|
||||
elseif($this->element === 'don' || $this->element === 'donation') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
||||
|
||||
$object = new Don($this->db);
|
||||
@ -263,7 +263,7 @@ class BlockedLog
|
||||
$this->error++;
|
||||
}
|
||||
}
|
||||
else if($this->element === 'subscription') {
|
||||
elseif($this->element === 'subscription') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
||||
|
||||
$object = new Subscription($this->db);
|
||||
@ -274,7 +274,7 @@ class BlockedLog
|
||||
$this->error++;
|
||||
}
|
||||
}
|
||||
else if($this->element === 'cashcontrol') {
|
||||
elseif($this->element === 'cashcontrol') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php';
|
||||
|
||||
$object = new CashControl($this->db);
|
||||
@ -285,11 +285,11 @@ class BlockedLog
|
||||
$this->error++;
|
||||
}
|
||||
}
|
||||
else if ($this->action == 'MODULE_SET')
|
||||
elseif ($this->action == 'MODULE_SET')
|
||||
{
|
||||
return '<i class="opacitymedium">System to track events into unalterable logs were enabled</i>';
|
||||
}
|
||||
else if ($this->action == 'MODULE_RESET')
|
||||
elseif ($this->action == 'MODULE_RESET')
|
||||
{
|
||||
if ($this->signature == '0000000000')
|
||||
{
|
||||
@ -469,7 +469,7 @@ class BlockedLog
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!is_object($value)) $this->object_data->{$key} = $value;
|
||||
elseif (!is_object($value)) $this->object_data->{$key} = $value;
|
||||
}
|
||||
|
||||
if (! empty($object->newref)) $this->object_data->ref = $object->newref;
|
||||
@ -984,11 +984,11 @@ class BlockedLog
|
||||
$sql="SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog
|
||||
WHERE entity=".$conf->entity;
|
||||
}
|
||||
else if ($element=='not_certified') {
|
||||
elseif ($element=='not_certified') {
|
||||
$sql="SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog
|
||||
WHERE entity=".$conf->entity." AND certified = 0";
|
||||
}
|
||||
else if ($element=='just_certified') {
|
||||
elseif ($element=='just_certified') {
|
||||
$sql="SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog
|
||||
WHERE entity=".$conf->entity." AND certified = 1";
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@ class Facturation
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
else if ( $aId == 'RESET' )
|
||||
elseif ( $aId == 'RESET' )
|
||||
{
|
||||
|
||||
$this->id = null;
|
||||
@ -315,7 +315,7 @@ class Facturation
|
||||
{
|
||||
return $this->ref;
|
||||
}
|
||||
else if ( $aRef == 'RESET' )
|
||||
elseif ( $aRef == 'RESET' )
|
||||
{
|
||||
$this->ref = null;
|
||||
}
|
||||
@ -337,7 +337,7 @@ class Facturation
|
||||
{
|
||||
return $this->qte;
|
||||
}
|
||||
else if ( $aQte == 'RESET' )
|
||||
elseif ( $aQte == 'RESET' )
|
||||
{
|
||||
|
||||
$this->qte = null;
|
||||
@ -361,7 +361,7 @@ class Facturation
|
||||
{
|
||||
return $this->stock;
|
||||
}
|
||||
else if ( $aStock == 'RESET' )
|
||||
elseif ( $aStock == 'RESET' )
|
||||
{
|
||||
$this->stock = null;
|
||||
}
|
||||
@ -384,7 +384,7 @@ class Facturation
|
||||
{
|
||||
return $this->remise_percent;
|
||||
}
|
||||
else if ($aRemisePercent == 'RESET')
|
||||
elseif ($aRemisePercent == 'RESET')
|
||||
{
|
||||
$this->remise_percent = null;
|
||||
}
|
||||
@ -406,7 +406,7 @@ class Facturation
|
||||
if (is_null($aMontantRemise)) {
|
||||
|
||||
return $this->montant_remise;
|
||||
} else if ( $aMontantRemise == 'RESET' ) {
|
||||
} elseif ( $aMontantRemise == 'RESET' ) {
|
||||
|
||||
$this->montant_remise = null;
|
||||
} else {
|
||||
@ -427,7 +427,7 @@ class Facturation
|
||||
if (is_null($aPrix)) {
|
||||
|
||||
return $this->prix;
|
||||
} else if ( $aPrix == 'RESET' ) {
|
||||
} elseif ( $aPrix == 'RESET' ) {
|
||||
|
||||
$this->prix = null;
|
||||
} else {
|
||||
@ -447,7 +447,7 @@ class Facturation
|
||||
if (is_null($aTva)) {
|
||||
|
||||
return $this->tva;
|
||||
} else if ( $aTva == 'RESET' ) {
|
||||
} elseif ( $aTva == 'RESET' ) {
|
||||
|
||||
$this->tva = null;
|
||||
} else {
|
||||
@ -467,7 +467,7 @@ class Facturation
|
||||
if (is_null($aNumFacture)) {
|
||||
|
||||
return $this->num_facture;
|
||||
} else if ( $aNumFacture == 'RESET' ) {
|
||||
} elseif ( $aNumFacture == 'RESET' ) {
|
||||
|
||||
$this->num_facture = null;
|
||||
} else {
|
||||
@ -488,7 +488,7 @@ class Facturation
|
||||
if (is_null($aModeReglement)) {
|
||||
|
||||
return $this->mode_reglement;
|
||||
} else if ( $aModeReglement == 'RESET' ) {
|
||||
} elseif ( $aModeReglement == 'RESET' ) {
|
||||
|
||||
$this->mode_reglement = null;
|
||||
} else {
|
||||
@ -509,7 +509,7 @@ class Facturation
|
||||
if (is_null($aMontantEncaisse)) {
|
||||
|
||||
return $this->montant_encaisse;
|
||||
} else if ( $aMontantEncaisse == 'RESET' ) {
|
||||
} elseif ( $aMontantEncaisse == 'RESET' ) {
|
||||
|
||||
$this->montant_encaisse = null;
|
||||
} else {
|
||||
@ -530,7 +530,7 @@ class Facturation
|
||||
if (is_null($aMontantRendu)) {
|
||||
|
||||
return $this->montant_rendu;
|
||||
} else if ( $aMontantRendu == 'RESET' ) {
|
||||
} elseif ( $aMontantRendu == 'RESET' ) {
|
||||
|
||||
$this->montant_rendu = null;
|
||||
} else {
|
||||
@ -550,7 +550,7 @@ class Facturation
|
||||
if (is_null($aPaiementLe)) {
|
||||
|
||||
return $this->paiement_le;
|
||||
} else if ( $aPaiementLe == 'RESET' ) {
|
||||
} elseif ( $aPaiementLe == 'RESET' ) {
|
||||
|
||||
$this->paiement_le = null;
|
||||
} else {
|
||||
@ -570,7 +570,7 @@ class Facturation
|
||||
if (is_null($aTotalHt)) {
|
||||
|
||||
return $this->prix_total_ht;
|
||||
} else if ( $aTotalHt == 'RESET' ) {
|
||||
} elseif ( $aTotalHt == 'RESET' ) {
|
||||
|
||||
$this->prix_total_ht = null;
|
||||
} else {
|
||||
@ -590,7 +590,7 @@ class Facturation
|
||||
if (is_null($aMontantTva)) {
|
||||
|
||||
return $this->montant_tva;
|
||||
} else if ( $aMontantTva == 'RESET' ) {
|
||||
} elseif ( $aMontantTva == 'RESET' ) {
|
||||
|
||||
$this->montant_tva = null;
|
||||
} else {
|
||||
|
||||
@ -138,7 +138,7 @@ if ( $nbr_enreg > 1 )
|
||||
$top_liste_produits = '----- '.$nbr_enreg.' '.$langs->transnoentitiesnoconv("CashDeskProducts").' '.$langs->trans("CashDeskOn").' '.$nbr_enreg.' -----';
|
||||
}
|
||||
}
|
||||
else if ( $nbr_enreg == 1 )
|
||||
elseif ( $nbr_enreg == 1 )
|
||||
{
|
||||
$top_liste_produits = '----- 1 '.$langs->transnoentitiesnoconv("ProductFound"). ' -----';
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ switch($action)
|
||||
{
|
||||
$sql.= " AND p.rowid = ".$_POST['selProduit'];
|
||||
}
|
||||
else if ( $_POST['hdnSource'] == 'REF' )
|
||||
elseif ( $_POST['hdnSource'] == 'REF' )
|
||||
{
|
||||
$sql.= " AND p.ref = '".$_POST['txtRef']."'";
|
||||
}
|
||||
@ -163,7 +163,7 @@ switch($action)
|
||||
{
|
||||
$filtre = $ret['ref'];
|
||||
}
|
||||
else if ( $_POST['hdnSource'] == 'REF' )
|
||||
elseif ( $_POST['hdnSource'] == 'REF' )
|
||||
{
|
||||
$filtre = $_POST['txtRef'];
|
||||
}
|
||||
|
||||
@ -89,32 +89,32 @@ if ($action == 'add' && $user->rights->categorie->creer)
|
||||
header("Location: ".$urlfrom);
|
||||
exit;
|
||||
}
|
||||
else if ($idProdOrigin)
|
||||
elseif ($idProdOrigin)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProdOrigin.'&type='.$type);
|
||||
exit;
|
||||
}
|
||||
else if ($idCompanyOrigin)
|
||||
elseif ($idCompanyOrigin)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idCompanyOrigin.'&type='.$type);
|
||||
exit;
|
||||
}
|
||||
else if ($idSupplierOrigin)
|
||||
elseif ($idSupplierOrigin)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idSupplierOrigin.'&type='.$type);
|
||||
exit;
|
||||
}
|
||||
else if ($idMemberOrigin)
|
||||
elseif ($idMemberOrigin)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idMemberOrigin.'&type='.$type);
|
||||
exit;
|
||||
}
|
||||
else if ($idContactOrigin)
|
||||
elseif ($idContactOrigin)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idContactOrigin.'&type='.$type);
|
||||
exit;
|
||||
}
|
||||
else if ($idProjectOrigin)
|
||||
elseif ($idProjectOrigin)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProjectOrigin.'&type='.$type);
|
||||
exit;
|
||||
@ -179,32 +179,32 @@ if (($action == 'add' || $action == 'confirmed') && $user->rights->categorie->cr
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
}
|
||||
else if ($idProdOrigin)
|
||||
elseif ($idProdOrigin)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProdOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated")));
|
||||
exit;
|
||||
}
|
||||
else if ($idCompanyOrigin)
|
||||
elseif ($idCompanyOrigin)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idCompanyOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated")));
|
||||
exit;
|
||||
}
|
||||
else if ($idSupplierOrigin)
|
||||
elseif ($idSupplierOrigin)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idSupplierOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated")));
|
||||
exit;
|
||||
}
|
||||
else if ($idMemberOrigin)
|
||||
elseif ($idMemberOrigin)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idMemberOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated")));
|
||||
exit;
|
||||
}
|
||||
else if ($idContactOrigin)
|
||||
elseif ($idContactOrigin)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idContactOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated")));
|
||||
exit;
|
||||
}
|
||||
else if ($idProjectOrigin)
|
||||
elseif ($idProjectOrigin)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProjectOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated")));
|
||||
exit;
|
||||
|
||||
@ -1397,7 +1397,7 @@ class Categorie extends CommonObject
|
||||
{
|
||||
if ($mode == 'id') {
|
||||
$cats[] = $obj->rowid;
|
||||
} else if ($mode == 'label') {
|
||||
} elseif ($mode == 'label') {
|
||||
$cats[] = $obj->label;
|
||||
} else {
|
||||
$cat = new Categorie($this->db);
|
||||
@ -1427,7 +1427,7 @@ class Categorie extends CommonObject
|
||||
{
|
||||
if ($mode == 'id') {
|
||||
$cats[] = $obj->rowid;
|
||||
} else if ($mode == 'label') {
|
||||
} elseif ($mode == 'label') {
|
||||
$cats[] = $obj->label;
|
||||
} else {
|
||||
$cat = new Categorie($this->db);
|
||||
@ -1747,7 +1747,7 @@ class Categorie extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (isset($this->multilangs["$key"]))
|
||||
elseif (isset($this->multilangs["$key"]))
|
||||
{
|
||||
if ($this->db->num_rows($result)) // si aucune ligne dans la base
|
||||
{
|
||||
|
||||
@ -270,7 +270,7 @@ if ($action == 'edit')
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
else if ($action != 'add')
|
||||
elseif ($action != 'add')
|
||||
{
|
||||
if ($cnt_trans) print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
|
||||
@ -86,40 +86,40 @@ if ($id > 0 && $removeelem > 0)
|
||||
$result = $tmpobject->fetch($removeelem);
|
||||
$elementtype = 'product';
|
||||
}
|
||||
else if ($type == Categorie::TYPE_SUPPLIER && $user->rights->societe->creer)
|
||||
elseif ($type == Categorie::TYPE_SUPPLIER && $user->rights->societe->creer)
|
||||
{
|
||||
$tmpobject = new Societe($db);
|
||||
$result = $tmpobject->fetch($removeelem);
|
||||
$elementtype = 'supplier';
|
||||
}
|
||||
else if ($type == Categorie::TYPE_CUSTOMER && $user->rights->societe->creer)
|
||||
elseif ($type == Categorie::TYPE_CUSTOMER && $user->rights->societe->creer)
|
||||
{
|
||||
$tmpobject = new Societe($db);
|
||||
$result = $tmpobject->fetch($removeelem);
|
||||
$elementtype = 'customer';
|
||||
}
|
||||
else if ($type == Categorie::TYPE_MEMBER && $user->rights->adherent->creer)
|
||||
elseif ($type == Categorie::TYPE_MEMBER && $user->rights->adherent->creer)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
$tmpobject = new Adherent($db);
|
||||
$result = $tmpobject->fetch($removeelem);
|
||||
$elementtype = 'member';
|
||||
}
|
||||
else if ($type == Categorie::TYPE_CONTACT && $user->rights->societe->creer) {
|
||||
elseif ($type == Categorie::TYPE_CONTACT && $user->rights->societe->creer) {
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
$tmpobject = new Contact($db);
|
||||
$result = $tmpobject->fetch($removeelem);
|
||||
$elementtype = 'contact';
|
||||
}
|
||||
else if ($type == Categorie::TYPE_ACCOUNT && $user->rights->banque->configurer)
|
||||
elseif ($type == Categorie::TYPE_ACCOUNT && $user->rights->banque->configurer)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
$tmpobject = new Account($db);
|
||||
$result = $tmpobject->fetch($removeelem);
|
||||
$elementtype = 'account';
|
||||
}
|
||||
else if ($type == Categorie::TYPE_PROJECT && $user->rights->projet->creer)
|
||||
elseif ($type == Categorie::TYPE_PROJECT && $user->rights->projet->creer)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
$tmpobject = new Project($db);
|
||||
|
||||
@ -791,11 +791,11 @@ if ($action == 'create')
|
||||
print '<td>';
|
||||
$percent=-1;
|
||||
if (isset($_GET['status']) || isset($_POST['status'])) $percent=GETPOST('status');
|
||||
else if (isset($_GET['percentage']) || isset($_POST['percentage'])) $percent=GETPOST('percentage');
|
||||
elseif (isset($_GET['percentage']) || isset($_POST['percentage'])) $percent=GETPOST('percentage');
|
||||
else
|
||||
{
|
||||
if (GETPOST('complete') == '0' || GETPOST("afaire") == 1) $percent='0';
|
||||
else if (GETPOST('complete') == 100 || GETPOST("afaire") == 2) $percent=100;
|
||||
elseif (GETPOST('complete') == 100 || GETPOST("afaire") == 2) $percent=100;
|
||||
}
|
||||
$formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200');
|
||||
print '</td></tr>';
|
||||
|
||||
@ -293,7 +293,7 @@ class ActionComm extends CommonObject
|
||||
$this->type_id=$cactioncomm->id;
|
||||
$this->type_code=$cactioncomm->code;
|
||||
}
|
||||
else if ($result == 0)
|
||||
elseif ($result == 0)
|
||||
{
|
||||
$this->error='Failed to get record with id '.$this->type_id.' code '.$this->type_code.' from dictionary "type of events"';
|
||||
return -1;
|
||||
|
||||
@ -779,7 +779,7 @@ if (count($listofextcals))
|
||||
$datecurstart=dol_stringtotime($icalevent['DTSTART;VALUE=DATE'],1);
|
||||
$datecurend=dol_stringtotime($icalevent['DTEND;VALUE=DATE'],1)-1; // We remove one second to get last second of day
|
||||
}
|
||||
else if (is_array($icalevent['DTSTART']) && ! empty($icalevent['DTSTART']['unixtime']))
|
||||
elseif (is_array($icalevent['DTSTART']) && ! empty($icalevent['DTSTART']['unixtime']))
|
||||
{
|
||||
$datecurstart=$icalevent['DTSTART']['unixtime'];
|
||||
$datecurend=$icalevent['DTEND']['unixtime'];
|
||||
@ -1365,7 +1365,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
||||
// We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event)
|
||||
if (! empty($cacheusers[$event->userownerid]->color)) $color=$cacheusers[$event->userownerid]->color;
|
||||
}
|
||||
else if ($event->type_code == 'ICALEVENT') // Event come from external ical file
|
||||
elseif ($event->type_code == 'ICALEVENT') // Event come from external ical file
|
||||
{
|
||||
$numical++;
|
||||
if (! empty($event->icalname)) {
|
||||
@ -1378,7 +1378,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
||||
$color=($event->icalcolor?$event->icalcolor:-1);
|
||||
$cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other');
|
||||
}
|
||||
else if ($event->type_code == 'BIRTHDAY')
|
||||
elseif ($event->type_code == 'BIRTHDAY')
|
||||
{
|
||||
$numbirthday++; $colorindex=2; $cssclass='family_birthday unmovable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);
|
||||
}
|
||||
@ -1425,11 +1425,11 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
||||
{
|
||||
$cssclass.= " unmovable";
|
||||
}
|
||||
else if ($event->type_code == 'ICALEVENT')
|
||||
elseif ($event->type_code == 'ICALEVENT')
|
||||
{
|
||||
$cssclass.= " unmovable";
|
||||
}
|
||||
else if ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar))
|
||||
elseif ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar))
|
||||
{
|
||||
$tmpyearend = date('Y',$event->date_end_in_calendar);
|
||||
$tmpmonthend = date('m',$event->date_end_in_calendar);
|
||||
|
||||
@ -809,7 +809,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
|
||||
$nummytasks++; $cssclass='family_mytasks';
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) $color=$event->type_color;
|
||||
}
|
||||
else if ($event->type_code == 'ICALEVENT')
|
||||
elseif ($event->type_code == 'ICALEVENT')
|
||||
{
|
||||
$numical++;
|
||||
if (! empty($event->icalname))
|
||||
@ -823,7 +823,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
|
||||
$color=$event->icalcolor;
|
||||
$cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unsortable');
|
||||
}
|
||||
else if ($event->type_code == 'BIRTHDAY')
|
||||
elseif ($event->type_code == 'BIRTHDAY')
|
||||
{
|
||||
$numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);
|
||||
}
|
||||
@ -1026,7 +1026,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
|
||||
if ($output[0]['string']) $title1.=($title1?' - ':'').$output[0]['string'];
|
||||
if ($output[0]['color']) $color1 = $output[0]['color'];
|
||||
}
|
||||
else if (count($cases1[$h]) > 1)
|
||||
elseif (count($cases1[$h]) > 1)
|
||||
{
|
||||
$title1=$langs->trans("Ref").' '.$ids1.($title1?' - '.$title1:'');
|
||||
$color1='222222';
|
||||
@ -1039,7 +1039,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
|
||||
if ($output[0]['string']) $title2.=($title2?' - ':'').$output[0]['string'];
|
||||
if ($output[0]['color']) $color2 = $output[0]['color'];
|
||||
}
|
||||
else if (count($cases2[$h]) > 1)
|
||||
elseif (count($cases2[$h]) > 1)
|
||||
{
|
||||
$title2=$langs->trans("Ref").' '.$ids2.($title2?' - '.$title2:'');
|
||||
$color2='222222';
|
||||
|
||||
@ -970,7 +970,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
||||
|
||||
if (! empty($conf->global->AGENDA_USE_COLOR_PER_EVENT_TYPE)) $color=$event->type_color;
|
||||
}
|
||||
else if ($event->type_code == 'ICALEVENT')
|
||||
elseif ($event->type_code == 'ICALEVENT')
|
||||
{
|
||||
$numical++;
|
||||
if (! empty($event->icalname))
|
||||
@ -984,7 +984,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
||||
$color=$event->icalcolor;
|
||||
$cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unsortable');
|
||||
}
|
||||
else if ($event->type_code == 'BIRTHDAY')
|
||||
elseif ($event->type_code == 'BIRTHDAY')
|
||||
{
|
||||
$numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);
|
||||
}
|
||||
@ -1201,7 +1201,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
||||
if ($output[0]['string']) $title1.=($title1?' - ':'').$output[0]['string'];
|
||||
if ($output[0]['color']) $color1 = $output[0]['color'];
|
||||
}
|
||||
else if (count($cases1[$h]) > 1)
|
||||
elseif (count($cases1[$h]) > 1)
|
||||
{
|
||||
$title1=$langs->trans("Ref").' '.$ids1.($title1?' - '.$title1:'');
|
||||
$color1='222222';
|
||||
@ -1214,7 +1214,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
||||
if ($output[0]['string']) $title2.=($title2?' - ':'').$output[0]['string'];
|
||||
if ($output[0]['color']) $color2 = $output[0]['color'];
|
||||
}
|
||||
else if (count($cases2[$h]) > 1)
|
||||
elseif (count($cases2[$h]) > 1)
|
||||
{
|
||||
$title2=$langs->trans("Ref").' '.$ids2.($title2?' - '.$title2:'');
|
||||
$color2='222222';
|
||||
|
||||
@ -83,7 +83,7 @@ if ($action == 'add' || $action == 'update')
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
}
|
||||
else if ($origin == 'commande')
|
||||
elseif ($origin == 'commande')
|
||||
{
|
||||
header("Location: ../commande/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid);
|
||||
exit;
|
||||
@ -112,7 +112,7 @@ if ($action == 'add' || $action == 'update')
|
||||
}
|
||||
|
||||
// Update address
|
||||
else if ($action == 'update')
|
||||
elseif ($action == 'update')
|
||||
{
|
||||
$result = $object->update($id, $socid, $user);
|
||||
|
||||
@ -123,7 +123,7 @@ if ($action == 'add' || $action == 'update')
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
}
|
||||
else if ($origin == 'commande')
|
||||
elseif ($origin == 'commande')
|
||||
{
|
||||
header("Location: ../commande/contact.php?id=".$originid);
|
||||
exit;
|
||||
@ -153,7 +153,7 @@ if ($action == 'add' || $action == 'update')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer)
|
||||
elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer)
|
||||
{
|
||||
$result = $object->delete($id, $socid);
|
||||
|
||||
|
||||
@ -496,7 +496,7 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire)
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th colspan="2">';
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastCustomersOrProspects",$max);
|
||||
else if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastModifiedProspects",$max);
|
||||
elseif (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastModifiedProspects",$max);
|
||||
else print $langs->trans("BoxTitleLastModifiedCustomers",$max);
|
||||
print '</th>';
|
||||
print '<th class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/societe/list.php?type=p,c">'.$langs->trans("FullList").'</a></th>';
|
||||
@ -759,7 +759,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
}
|
||||
else if ($total>0)
|
||||
elseif ($total>0)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td class=\"right\">".price($total)."</td><td> </td></tr>";
|
||||
}
|
||||
@ -863,7 +863,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
}
|
||||
else if ($total>0)
|
||||
elseif ($total>0)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td class=\"right\">".price($total)."</td><td> </td></tr>";
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ if (empty($reshook))
|
||||
setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings');
|
||||
$action='';
|
||||
}
|
||||
else if ($conf->global->MAILING_LIMIT_SENDBYWEB < 0)
|
||||
elseif ($conf->global->MAILING_LIMIT_SENDBYWEB < 0)
|
||||
{
|
||||
setEventMessages($langs->trans("NotEnoughPermissions"), null, 'warnings');
|
||||
$action='';
|
||||
@ -525,13 +525,13 @@ if (empty($reshook))
|
||||
$upload_dir = $conf->mailing->dir_output . "/" . get_exdir($object->id,2,0,1,$object,'mailing');
|
||||
|
||||
if ($action == 'settitre') $object->titre = trim(GETPOST('titre','alpha'));
|
||||
else if ($action == 'setemail_from') $object->email_from = trim(GETPOST('email_from','alpha'));
|
||||
else if ($action == 'setemail_replyto') $object->email_replyto = trim(GETPOST('email_replyto','alpha'));
|
||||
else if ($action == 'setemail_errorsto') $object->email_errorsto = trim(GETPOST('email_errorsto','alpha'));
|
||||
else if ($action == 'settitre' && empty($object->titre)) {
|
||||
elseif ($action == 'setemail_from') $object->email_from = trim(GETPOST('email_from','alpha'));
|
||||
elseif ($action == 'setemail_replyto') $object->email_replyto = trim(GETPOST('email_replyto','alpha'));
|
||||
elseif ($action == 'setemail_errorsto') $object->email_errorsto = trim(GETPOST('email_errorsto','alpha'));
|
||||
elseif ($action == 'settitre' && empty($object->titre)) {
|
||||
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("MailTitle"));
|
||||
}
|
||||
else if ($action == 'setfrom' && empty($object->email_from)) {
|
||||
elseif ($action == 'setfrom' && empty($object->email_from)) {
|
||||
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("MailFrom"));
|
||||
}
|
||||
|
||||
@ -803,12 +803,12 @@ else
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1);
|
||||
}
|
||||
// Confirm reset
|
||||
else if ($action == 'reset')
|
||||
elseif ($action == 'reset')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2);
|
||||
}
|
||||
// Confirm delete
|
||||
else if ($action == 'delete')
|
||||
elseif ($action == 'delete')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1);
|
||||
}
|
||||
@ -842,7 +842,7 @@ else
|
||||
if (! empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) setEventMessages($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), null, 'warnings');
|
||||
$_GET["action"]='';
|
||||
}
|
||||
else if ($conf->global->MAILING_LIMIT_SENDBYWEB < 0)
|
||||
elseif ($conf->global->MAILING_LIMIT_SENDBYWEB < 0)
|
||||
{
|
||||
if (! empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_PHPMAIL), null, 'warnings');
|
||||
if (! empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL), null, 'warnings');
|
||||
@ -1008,7 +1008,7 @@ else
|
||||
{
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NoTargetYet")).'">'.$langs->trans("ValidMailing").'</a>';
|
||||
}
|
||||
else if (empty($user->rights->mailing->valider))
|
||||
elseif (empty($user->rights->mailing->valider))
|
||||
{
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'">'.$langs->trans("ValidMailing").'</a>';
|
||||
}
|
||||
@ -1024,7 +1024,7 @@ else
|
||||
{
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("SendingFromWebInterfaceIsNotAllowed")).'">'.$langs->trans("SendMailing").'</a>';
|
||||
}
|
||||
else if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! $user->rights->mailing->mailing_advance->send)
|
||||
elseif (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! $user->rights->mailing->mailing_advance->send)
|
||||
{
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'">'.$langs->trans("SendMailing").'</a>';
|
||||
}
|
||||
|
||||
@ -557,7 +557,7 @@ if ($object->fetch($id) >= 0)
|
||||
$objectstatic->fetch($obj->source_id);
|
||||
print $objectstatic->getNomUrl(1);
|
||||
}
|
||||
else if ($obj->source_type == 'user')
|
||||
elseif ($obj->source_type == 'user')
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
$objectstatic=new User($db);
|
||||
@ -565,14 +565,14 @@ if ($object->fetch($id) >= 0)
|
||||
$objectstatic->id=$obj->source_id;
|
||||
print $objectstatic->getNomUrl(1);
|
||||
}
|
||||
else if ($obj->source_type == 'thirdparty')
|
||||
elseif ($obj->source_type == 'thirdparty')
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
$objectstatic=new Societe($db);
|
||||
$objectstatic->fetch($obj->source_id);
|
||||
print $objectstatic->getNomUrl(1);
|
||||
}
|
||||
else if ($obj->source_type == 'contact')
|
||||
elseif ($obj->source_type == 'contact')
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
$objectstatic=new Contact($db);
|
||||
|
||||
@ -785,12 +785,12 @@ class AdvanceTargetingMailing extends CommonObject
|
||||
if (!empty($arrayquery['options_'.$key.'_max'.'_cnct'])) {
|
||||
$sqlwhere[]= " (te.".$key." >= ".$arrayquery['options_'.$key.'_max'.'_cnct']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min'.'_cnct'].")";
|
||||
}
|
||||
} else if (($extrafields->attribute_type[$key] == 'date') ||
|
||||
} elseif (($extrafields->attribute_type[$key] == 'date') ||
|
||||
($extrafields->attribute_type[$key] == 'datetime')) {
|
||||
if (!empty($arrayquery['options_'.$key.'_end_dt'.'_cnct'])){
|
||||
$sqlwhere[]= " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'.'_cnct'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'.'_cnct'])."')";
|
||||
}
|
||||
}else if ($extrafields->attribute_type[$key] == 'boolean') {
|
||||
}elseif ($extrafields->attribute_type[$key] == 'boolean') {
|
||||
if ($arrayquery['options_'.$key.'_cnct']!=''){
|
||||
if ($arrayquery['options_'.$key.'_cnct']==0) {
|
||||
$sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key.'_cnct']." OR ((te.".$key." IS NULL) AND (te.fk_object IS NOT NULL)))";
|
||||
@ -885,12 +885,12 @@ class AdvanceTargetingMailing extends CommonObject
|
||||
if (!empty($arrayquery['options_'.$key.'_max'])) {
|
||||
$sqlwhere[]= " (tse.".$key." >= ".$arrayquery['options_'.$key.'_max']." AND tse.".$key." <= ".$arrayquery['options_'.$key.'_min'].")";
|
||||
}
|
||||
} else if (($extrafields->attribute_type[$key] == 'date') ||
|
||||
} elseif (($extrafields->attribute_type[$key] == 'date') ||
|
||||
($extrafields->attribute_type[$key] == 'datetime')) {
|
||||
if (!empty($arrayquery['options_'.$key.'_end_dt'])){
|
||||
$sqlwhere[]= " (tse.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'])."' AND tse.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'])."')";
|
||||
}
|
||||
}else if ($extrafields->attribute_type[$key] == 'boolean') {
|
||||
}elseif ($extrafields->attribute_type[$key] == 'boolean') {
|
||||
if ($arrayquery['options_'.$key]!=''){
|
||||
$sqlwhere[]= " (tse.".$key." = ".$arrayquery['options_'.$key].")";
|
||||
}
|
||||
|
||||
@ -205,7 +205,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Delete proposal
|
||||
else if ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete)
|
||||
elseif ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete)
|
||||
{
|
||||
$result = $object->delete($user);
|
||||
if ($result > 0) {
|
||||
@ -218,7 +218,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Remove line
|
||||
else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate)
|
||||
elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate)
|
||||
{
|
||||
$result = $object->deleteline($lineid);
|
||||
// reorder lines
|
||||
@ -242,7 +242,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Validation
|
||||
else if ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate)
|
||||
elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate)
|
||||
{
|
||||
$result = $object->valid($user);
|
||||
if ($result >= 0)
|
||||
@ -269,7 +269,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setdate' && $usercancreate)
|
||||
elseif ($action == 'setdate' && $usercancreate)
|
||||
{
|
||||
$datep = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
||||
|
||||
@ -284,13 +284,13 @@ if (empty($reshook))
|
||||
dol_print_error($db, $object->error);
|
||||
}
|
||||
}
|
||||
else if ($action == 'setecheance' && $usercancreate)
|
||||
elseif ($action == 'setecheance' && $usercancreate)
|
||||
{
|
||||
$result = $object->set_echeance($user, dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear']));
|
||||
if ($result < 0)
|
||||
dol_print_error($db, $object->error);
|
||||
}
|
||||
else if ($action == 'setdate_livraison' && $usercancreate)
|
||||
elseif ($action == 'setdate_livraison' && $usercancreate)
|
||||
{
|
||||
$result = $object->set_date_livraison($user, dol_mktime(12, 0, 0, $_POST['date_livraisonmonth'], $_POST['date_livraisonday'], $_POST['date_livraisonyear']));
|
||||
if ($result < 0)
|
||||
@ -298,7 +298,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Positionne ref client
|
||||
else if ($action == 'setref_client' && $usercancreate)
|
||||
elseif ($action == 'setref_client' && $usercancreate)
|
||||
{
|
||||
$result = $object->set_ref_client($user, GETPOST('ref_client'));
|
||||
if ($result < 0)
|
||||
@ -314,7 +314,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Create proposal
|
||||
else if ($action == 'add' && $usercancreate)
|
||||
elseif ($action == 'add' && $usercancreate)
|
||||
{
|
||||
$object->socid = $socid;
|
||||
$object->fetch_thirdparty();
|
||||
@ -619,7 +619,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Classify billed
|
||||
else if ($action == 'classifybilled' && $usercanclose)
|
||||
elseif ($action == 'classifybilled' && $usercanclose)
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
@ -641,7 +641,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Close proposal
|
||||
else if ($action == 'setstatut' && $usercanclose && ! GETPOST('cancel','alpha'))
|
||||
elseif ($action == 'setstatut' && $usercanclose && ! GETPOST('cancel','alpha'))
|
||||
{
|
||||
if (! (GETPOST('statut','int') > 0)) {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors');
|
||||
@ -672,7 +672,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Reopen proposal
|
||||
else if ($action == 'confirm_reopen' && $usercanclose && ! GETPOST('cancel','alpha'))
|
||||
elseif ($action == 'confirm_reopen' && $usercanclose && ! GETPOST('cancel','alpha'))
|
||||
{
|
||||
// prevent browser refresh from reopening proposal several times
|
||||
if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED)
|
||||
@ -808,7 +808,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == "setabsolutediscount" && $usercancreate) {
|
||||
elseif ($action == "setabsolutediscount" && $usercancreate) {
|
||||
if ($_POST["remise_id"]) {
|
||||
if ($object->id > 0) {
|
||||
$result = $object->insert_discount($_POST["remise_id"]);
|
||||
@ -820,7 +820,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Add line
|
||||
else if ($action == 'addline' && $usercancreate) {
|
||||
elseif ($action == 'addline' && $usercancreate) {
|
||||
|
||||
// Set if we used free entry or predefined product
|
||||
$predef='';
|
||||
@ -1184,7 +1184,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Update a line within proposal
|
||||
else if ($action == 'updateline' && $usercancreate && GETPOST('save'))
|
||||
elseif ($action == 'updateline' && $usercancreate && GETPOST('save'))
|
||||
{
|
||||
// Define info_bits
|
||||
$info_bits = 0;
|
||||
@ -1320,66 +1320,66 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'updateline' && $usercancreate && GETPOST('cancel','alpha'))
|
||||
elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel','alpha'))
|
||||
{
|
||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||
exit();
|
||||
}
|
||||
|
||||
// Set project
|
||||
else if ($action == 'classin' && $usercancreate) {
|
||||
elseif ($action == 'classin' && $usercancreate) {
|
||||
$object->setProject(GETPOST('projectid','int'));
|
||||
}
|
||||
|
||||
// Delai de livraison
|
||||
else if ($action == 'setavailability' && $usercancreate) {
|
||||
elseif ($action == 'setavailability' && $usercancreate) {
|
||||
$result = $object->set_availability($user, GETPOST('availability_id','int'));
|
||||
}
|
||||
|
||||
// Origine de la propale
|
||||
else if ($action == 'setdemandreason' && $usercancreate) {
|
||||
elseif ($action == 'setdemandreason' && $usercancreate) {
|
||||
$result = $object->set_demand_reason($user, GETPOST('demand_reason_id','int'));
|
||||
}
|
||||
|
||||
// Conditions de reglement
|
||||
else if ($action == 'setconditions' && $usercancreate) {
|
||||
elseif ($action == 'setconditions' && $usercancreate) {
|
||||
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'));
|
||||
}
|
||||
|
||||
else if ($action == 'setremisepercent' && $usercancreate) {
|
||||
elseif ($action == 'setremisepercent' && $usercancreate) {
|
||||
$result = $object->set_remise_percent($user, $_POST['remise_percent']);
|
||||
}
|
||||
|
||||
else if ($action == 'setremiseabsolue' && $usercancreate) {
|
||||
elseif ($action == 'setremiseabsolue' && $usercancreate) {
|
||||
$result = $object->set_remise_absolue($user, $_POST['remise_absolue']);
|
||||
}
|
||||
|
||||
// Mode de reglement
|
||||
else if ($action == 'setmode' && $usercancreate) {
|
||||
elseif ($action == 'setmode' && $usercancreate) {
|
||||
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int'));
|
||||
}
|
||||
|
||||
// Multicurrency Code
|
||||
else if ($action == 'setmulticurrencycode' && $usercancreate) {
|
||||
elseif ($action == 'setmulticurrencycode' && $usercancreate) {
|
||||
$result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha'));
|
||||
}
|
||||
|
||||
// Multicurrency rate
|
||||
else if ($action == 'setmulticurrencyrate' && $usercancreate) {
|
||||
elseif ($action == 'setmulticurrencyrate' && $usercancreate) {
|
||||
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')));
|
||||
}
|
||||
|
||||
// bank account
|
||||
else if ($action == 'setbankaccount' && $usercancreate) {
|
||||
elseif ($action == 'setbankaccount' && $usercancreate) {
|
||||
$result=$object->setBankAccount(GETPOST('fk_account', 'int'));
|
||||
}
|
||||
|
||||
// shipping method
|
||||
else if ($action == 'setshippingmethod' && $usercancreate) {
|
||||
elseif ($action == 'setshippingmethod' && $usercancreate) {
|
||||
$result=$object->setShippingMethod(GETPOST('shipping_method_id', 'int'));
|
||||
}
|
||||
|
||||
else if ($action == 'update_extras') {
|
||||
elseif ($action == 'update_extras') {
|
||||
$object->oldcopy = dol_clone($object);
|
||||
|
||||
// Fill array 'array_options' with data from update form
|
||||
@ -1421,7 +1421,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Bascule du statut d'un contact
|
||||
else if ($action == 'swapstatut') {
|
||||
elseif ($action == 'swapstatut') {
|
||||
if ($object->fetch($id) > 0) {
|
||||
$result = $object->swapContactStatus(GETPOST('ligne'));
|
||||
} else {
|
||||
@ -1430,7 +1430,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Efface un contact
|
||||
else if ($action == 'deletecontact') {
|
||||
elseif ($action == 'deletecontact') {
|
||||
$object->fetch($id);
|
||||
$result = $object->delete_contact($lineid);
|
||||
|
||||
@ -1909,22 +1909,22 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
// Confirm delete
|
||||
else if ($action == 'delete') {
|
||||
elseif ($action == 'delete') {
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1);
|
||||
}
|
||||
|
||||
// Confirm reopen
|
||||
else if ($action == 'reopen') {
|
||||
elseif ($action == 'reopen') {
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1);
|
||||
}
|
||||
|
||||
// Confirmation delete product/service line
|
||||
else if ($action == 'ask_deleteline') {
|
||||
elseif ($action == 'ask_deleteline') {
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
|
||||
}
|
||||
|
||||
// Confirm validate proposal
|
||||
else if ($action == 'validate') {
|
||||
elseif ($action == 'validate') {
|
||||
$error = 0;
|
||||
|
||||
// We verifie whether the object is provisionally numbering
|
||||
|
||||
@ -2706,7 +2706,7 @@ class Propal extends CommonObject
|
||||
{
|
||||
$ga[$obj->propalid] = $obj->ref;
|
||||
}
|
||||
else if ($shortlist == 2)
|
||||
elseif ($shortlist == 2)
|
||||
{
|
||||
$ga[$obj->propalid] = $obj->ref.' ('.$obj->name.')';
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ if ($id > 0 || ! empty($ref))
|
||||
setEventMessages($langs->trans('ErrorRecordNotFound'), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
else if ($ret < 0)
|
||||
elseif ($ret < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
@ -105,7 +105,7 @@ if ($action == 'addcontact' && $user->rights->propale->creer)
|
||||
}
|
||||
|
||||
// Toggle the status of a contact
|
||||
else if ($action == 'swapstatut' && $user->rights->propale->creer)
|
||||
elseif ($action == 'swapstatut' && $user->rights->propale->creer)
|
||||
{
|
||||
if ($object->id > 0)
|
||||
{
|
||||
@ -114,7 +114,7 @@ else if ($action == 'swapstatut' && $user->rights->propale->creer)
|
||||
}
|
||||
|
||||
// Deletes a contact
|
||||
else if ($action == 'deletecontact' && $user->rights->propale->creer)
|
||||
elseif ($action == 'deletecontact' && $user->rights->propale->creer)
|
||||
{
|
||||
$result = $object->delete_contact($lineid);
|
||||
|
||||
|
||||
@ -367,7 +367,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
}
|
||||
else if ($total>0)
|
||||
elseif ($total>0)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td> </td></tr>";
|
||||
}
|
||||
|
||||
@ -940,7 +940,7 @@ if ($resql)
|
||||
print $nbofsalesrepresentative;
|
||||
print '</a>';
|
||||
}
|
||||
else if ($nbofsalesrepresentative > 0)
|
||||
elseif ($nbofsalesrepresentative > 0)
|
||||
{
|
||||
$userstatic=new User($db);
|
||||
$j=0;
|
||||
|
||||
@ -159,7 +159,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Reopen a closed order
|
||||
else if ($action == 'reopen' && $user->rights->commande->creer)
|
||||
elseif ($action == 'reopen' && $user->rights->commande->creer)
|
||||
{
|
||||
if ($object->statut == Commande::STATUS_CANCELED || $object->statut == Commande::STATUS_CLOSED)
|
||||
{
|
||||
@ -176,7 +176,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Remove order
|
||||
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->commande->supprimer)
|
||||
elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->commande->supprimer)
|
||||
{
|
||||
$result = $object->delete($user);
|
||||
if ($result > 0)
|
||||
@ -191,7 +191,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Remove a product line
|
||||
else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->commande->creer)
|
||||
elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->commande->creer)
|
||||
{
|
||||
$result = $object->deleteline($user, $lineid);
|
||||
if ($result > 0)
|
||||
@ -222,13 +222,13 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Link to a project
|
||||
else if ($action == 'classin' && $user->rights->commande->creer)
|
||||
elseif ($action == 'classin' && $user->rights->commande->creer)
|
||||
{
|
||||
$object->setProject(GETPOST('projectid','int'));
|
||||
}
|
||||
|
||||
// Add order
|
||||
else if ($action == 'add' && $user->rights->commande->creer)
|
||||
elseif ($action == 'add' && $user->rights->commande->creer)
|
||||
{
|
||||
$datecommande = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
|
||||
$datelivraison = dol_mktime(12, 0, 0, GETPOST('liv_month'), GETPOST('liv_day'), GETPOST('liv_year'));
|
||||
@ -481,7 +481,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'classifybilled' && $user->rights->commande->creer)
|
||||
elseif ($action == 'classifybilled' && $user->rights->commande->creer)
|
||||
{
|
||||
$ret=$object->classifyBilled($user);
|
||||
|
||||
@ -489,7 +489,7 @@ if (empty($reshook))
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
else if ($action == 'classifyunbilled' && $user->rights->commande->creer)
|
||||
elseif ($action == 'classifyunbilled' && $user->rights->commande->creer)
|
||||
{
|
||||
$ret=$object->classifyUnBilled();
|
||||
if ($ret < 0) {
|
||||
@ -498,7 +498,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Positionne ref commande client
|
||||
else if ($action == 'setref_client' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setref_client' && $user->rights->commande->creer) {
|
||||
$result = $object->set_ref_client($user, GETPOST('ref_client'));
|
||||
if ($result < 0)
|
||||
{
|
||||
@ -506,7 +506,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setremise' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setremise' && $user->rights->commande->creer) {
|
||||
$result = $object->set_remise($user, GETPOST('remise'));
|
||||
if ($result < 0)
|
||||
{
|
||||
@ -514,7 +514,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setabsolutediscount' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setabsolutediscount' && $user->rights->commande->creer) {
|
||||
if (GETPOST('remise_id')) {
|
||||
if ($object->id > 0) {
|
||||
$object->insert_discount(GETPOST('remise_id'));
|
||||
@ -524,7 +524,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setdate' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setdate' && $user->rights->commande->creer) {
|
||||
// print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year'];
|
||||
$date = dol_mktime(0, 0, 0, GETPOST('order_month'), GETPOST('order_day'), GETPOST('order_year'));
|
||||
|
||||
@ -534,7 +534,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setdate_livraison' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setdate_livraison' && $user->rights->commande->creer) {
|
||||
// print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year'];
|
||||
$datelivraison = dol_mktime(0, 0, 0, GETPOST('liv_month'), GETPOST('liv_day'), GETPOST('liv_year'));
|
||||
|
||||
@ -544,35 +544,35 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setmode' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setmode' && $user->rights->commande->creer) {
|
||||
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int'));
|
||||
if ($result < 0)
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
// Multicurrency Code
|
||||
else if ($action == 'setmulticurrencycode' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setmulticurrencycode' && $user->rights->commande->creer) {
|
||||
$result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha'));
|
||||
}
|
||||
|
||||
// Multicurrency rate
|
||||
else if ($action == 'setmulticurrencyrate' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setmulticurrencyrate' && $user->rights->commande->creer) {
|
||||
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')));
|
||||
}
|
||||
|
||||
else if ($action == 'setavailability' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setavailability' && $user->rights->commande->creer) {
|
||||
$result = $object->availability(GETPOST('availability_id'));
|
||||
if ($result < 0)
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
else if ($action == 'setdemandreason' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setdemandreason' && $user->rights->commande->creer) {
|
||||
$result = $object->demand_reason(GETPOST('demand_reason_id'));
|
||||
if ($result < 0)
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
else if ($action == 'setconditions' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setconditions' && $user->rights->commande->creer) {
|
||||
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'));
|
||||
if ($result < 0) {
|
||||
dol_print_error($db, $object->error);
|
||||
@ -604,7 +604,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// bank account
|
||||
else if ($action == 'setbankaccount' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setbankaccount' && $user->rights->commande->creer) {
|
||||
$result=$object->setBankAccount(GETPOST('fk_account', 'int'));
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
@ -612,7 +612,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// shipping method
|
||||
else if ($action == 'setshippingmethod' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setshippingmethod' && $user->rights->commande->creer) {
|
||||
$result = $object->setShippingMethod(GETPOST('shipping_method_id', 'int'));
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
@ -620,23 +620,23 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// warehouse
|
||||
else if ($action == 'setwarehouse' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setwarehouse' && $user->rights->commande->creer) {
|
||||
$result = $object->setWarehouse(GETPOST('warehouse_id', 'int'));
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setremisepercent' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setremisepercent' && $user->rights->commande->creer) {
|
||||
$result = $object->set_remise($user, GETPOST('remise_percent'));
|
||||
}
|
||||
|
||||
else if ($action == 'setremiseabsolue' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'setremiseabsolue' && $user->rights->commande->creer) {
|
||||
$result = $object->set_remise_absolue($user, GETPOST('remise_absolue'));
|
||||
}
|
||||
|
||||
// Add a new line
|
||||
else if ($action == 'addline' && $user->rights->commande->creer)
|
||||
elseif ($action == 'addline' && $user->rights->commande->creer)
|
||||
{
|
||||
$langs->load('errors');
|
||||
$error = 0;
|
||||
@ -998,7 +998,7 @@ if (empty($reshook))
|
||||
/*
|
||||
* Update a line
|
||||
*/
|
||||
else if ($action == 'updateline' && $user->rights->commande->creer && GETPOST('save'))
|
||||
elseif ($action == 'updateline' && $user->rights->commande->creer && GETPOST('save'))
|
||||
{
|
||||
// Clean parameters
|
||||
$date_start='';
|
||||
@ -1134,12 +1134,12 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'updateline' && $user->rights->commande->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) {
|
||||
elseif ($action == 'updateline' && $user->rights->commande->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) {
|
||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||
exit();
|
||||
}
|
||||
|
||||
else if ($action == 'confirm_validate' && $confirm == 'yes' &&
|
||||
elseif ($action == 'confirm_validate' && $confirm == 'yes' &&
|
||||
((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->creer))
|
||||
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->order_advance->validate)))
|
||||
)
|
||||
@ -1196,7 +1196,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Go back to draft status
|
||||
else if ($action == 'confirm_modif' && $user->rights->commande->creer) {
|
||||
elseif ($action == 'confirm_modif' && $user->rights->commande->creer) {
|
||||
$idwarehouse = GETPOST('idwarehouse');
|
||||
|
||||
$qualified_for_stock_change=0;
|
||||
@ -1244,14 +1244,14 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'confirm_shipped' && $confirm == 'yes' && $user->rights->commande->cloturer) {
|
||||
elseif ($action == 'confirm_shipped' && $confirm == 'yes' && $user->rights->commande->cloturer) {
|
||||
$result = $object->cloture($user);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'confirm_cancel' && $confirm == 'yes' &&
|
||||
elseif ($action == 'confirm_cancel' && $confirm == 'yes' &&
|
||||
((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->creer))
|
||||
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->order_advance->validate)))
|
||||
)
|
||||
@ -1441,7 +1441,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// bascule du statut d'un contact
|
||||
else if ($action == 'swapstatut')
|
||||
elseif ($action == 'swapstatut')
|
||||
{
|
||||
if ($object->id > 0) {
|
||||
$result = $object->swapContactStatus(GETPOST('ligne'));
|
||||
@ -1451,7 +1451,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Efface un contact
|
||||
else if ($action == 'deletecontact')
|
||||
elseif ($action == 'deletecontact')
|
||||
{
|
||||
$result = $object->delete_contact($lineid);
|
||||
|
||||
|
||||
@ -565,7 +565,7 @@ class Orders extends DolibarrApi
|
||||
$result = $this->commande->set_reopen(DolibarrApiAccess::$user);
|
||||
if( $result < 0) {
|
||||
throw new RestException(405, $this->commande->error);
|
||||
}else if( $result == 0) {
|
||||
}elseif( $result == 0) {
|
||||
throw new RestException(304);
|
||||
}
|
||||
|
||||
|
||||
@ -2533,7 +2533,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$ga[$obj->cid] = $obj->ref;
|
||||
}
|
||||
else if ($shortlist == 2)
|
||||
elseif ($shortlist == 2)
|
||||
{
|
||||
$ga[$obj->cid] = $obj->ref.' ('.$obj->name.')';
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user