| global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code)." | ";
print '';
print '';
- print " | ";
- $example=$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code);
- print ($example!="LocalTax1IsUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)." | \n":"");
+ print " | ";
+ $example=$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code);
+ print ($example!="LocalTax1IsUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code)." | \n":"");
if(! isOnlyOneLocalTax(1))
{
print '| : ';
- $formcompany->select_localtax(1,$conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1");
+ $formcompany->select_localtax(1, $conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1");
print ' | ';
}
@@ -661,12 +659,12 @@ if ($action == 'edit' || $action == 'updateedit')
print "\n";
- print "| global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)." | ";
+ print " | global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code)." | ";
print '';
print "";
- print " | ";
- $example=$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code);
- print ($example!="LocalTax1IsNotUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code)." | \n":"");
+ print " | ";
+ $example=$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code);
+ print ($example!="LocalTax1IsNotUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code)." | \n":"");
print " ";
print " | \n";
print " ";
@@ -677,22 +675,22 @@ if ($action == 'edit' || $action == 'updateedit')
print ' ';
print '';
print '';
- print '| '.$langs->transcountry("LocalTax2Management",$mysoc->country_code).' | '.$langs->trans("Description").' | ';
+ print ''.$langs->transcountry("LocalTax2Management", $mysoc->country_code).' | '.$langs->trans("Description").' | ';
print ' | ';
print " \n";
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option
- print "| global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)." | ";
+ print " | global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code)." | ";
print '';
print '';
- print " | ";
- $example=$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code);
- print ($example!="LocalTax2IsUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)." | \n":"");
+ print " | ";
+ $example=$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code);
+ print ($example!="LocalTax2IsUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code)." | \n":"");
if(! isOnlyOneLocalTax(2))
{
print '| : ';
- $formcompany->select_localtax(2,$conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2");
+ $formcompany->select_localtax(2, $conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2");
print ' | ';
}
print '| : ';
@@ -702,12 +700,12 @@ if ($action == 'edit' || $action == 'updateedit')
print " | \n";
- print "| global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)." | ";
+ print " | global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code)." | ";
print '';
print "";
- print " | ";
- $example=$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code);
- print ($example!="LocalTax2IsNotUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code)." | \n":"");
+ print " | ";
+ $example=$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code);
+ print ($example!="LocalTax2IsNotUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code)." | \n":"");
print " ";
print " | \n";
print " ";
@@ -741,7 +739,7 @@ else
print ' | | '.$langs->trans("CompanyName").' | ';
if (! empty($conf->global->MAIN_INFO_SOCIETE_NOM)) print $conf->global->MAIN_INFO_SOCIETE_NOM;
- else print img_warning().' '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyName")).'';
+ else print img_warning().' '.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyName")).'';
print ' | ';
@@ -759,35 +757,35 @@ else
{
$img=picto_from_langcode($mysoc->country_code);
print $img?$img.' ':'';
- print getCountry($mysoc->country_code,1);
+ print getCountry($mysoc->country_code, 1);
}
- else print img_warning().' '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'';
+ else print img_warning().' '.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'';
print '';
if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print '| '.$langs->trans("Region-State").' | ';
else print ' | | '.$langs->trans("State").' | ';
- if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) print getState($conf->global->MAIN_INFO_SOCIETE_STATE,$conf->global->MAIN_SHOW_STATE_CODE,0,$conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT);
+ if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) print getState($conf->global->MAIN_INFO_SOCIETE_STATE, $conf->global->MAIN_SHOW_STATE_CODE, 0, $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT);
else print ' ';
print ' | ';
print '| '.$langs->trans("CompanyCurrency").' | ';
- print currency_name($conf->currency,0);
+ print currency_name($conf->currency, 0);
print ' ('.$conf->currency;
print ($conf->currency != $langs->getCurrencySymbol($conf->currency) ? ' - '.$langs->getCurrencySymbol($conf->currency) : '');
print ')';
- print ' - '.$langs->trans("PriceFormatInCurrentLanguage", $langs->defaultlang).' : '.price(price2num('99.333333333','MT'), 1, $langs, 1, -1, -1, $conf->currency);
+ print ' - '.$langs->trans("PriceFormatInCurrentLanguage", $langs->defaultlang).' : '.price(price2num('99.333333333', 'MT'), 1, $langs, 1, -1, -1, $conf->currency);
print ' | ';
- print '| '.$langs->trans("Phone").' | ' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL,$mysoc->country_code) . ' | ';
+ print '| '.$langs->trans("Phone").' | ' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL, $mysoc->country_code) . ' | ';
- print '| '.$langs->trans("Fax").' | ' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX,$mysoc->country_code) . ' | ';
+ print '| '.$langs->trans("Fax").' | ' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX, $mysoc->country_code) . ' | ';
- print '| '.$langs->trans("Mail").' | ' . dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL,0,0,0,80) . ' | ';
+ print '| '.$langs->trans("Mail").' | ' . dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL, 0, 0, 0, 80) . ' | ';
// Web
@@ -795,7 +793,7 @@ else
$arrayofurl = preg_split('/\s/', $conf->global->MAIN_INFO_SOCIETE_WEB);
foreach($arrayofurl as $urltoshow)
{
- if ($urltoshow) print dol_print_url($urltoshow,'_blank',80);
+ if ($urltoshow) print dol_print_url($urltoshow, '_blank', 80);
}
print '';
@@ -817,9 +815,9 @@ else
print '';
// It offers the generation of the thumbnail if it does not exist
- if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i',$mysoc->logo))
+ if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i', $mysoc->logo))
{
- print ' logo).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').' ';
+ print ' logo).'">'.img_picto($langs->trans('GenerateThumb'), 'refresh').' ';
}
elseif ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
{
@@ -872,14 +870,14 @@ else
print '';
// ProfId1
- if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
+ if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-')
{
- print ' | '.$langs->transcountry("ProfId1",$mysoc->country_code).' | ';
+ print ' | | '.$langs->transcountry("ProfId1", $mysoc->country_code).' | ';
if (! empty($conf->global->MAIN_INFO_SIREN))
{
print $conf->global->MAIN_INFO_SIREN;
- $s = $mysoc->id_prof_url(1,$mysoc);
+ $s = $mysoc->id_prof_url(1, $mysoc);
if ($s) print ' - '.$s;
} else {
print ' ';
@@ -888,14 +886,14 @@ else
}
// ProfId2
- if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
+ if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-')
{
- print ' | | '.$langs->transcountry("ProfId2",$mysoc->country_code).' | ';
+ print ' | | '.$langs->transcountry("ProfId2", $mysoc->country_code).' | ';
if (! empty($conf->global->MAIN_INFO_SIRET))
{
print $conf->global->MAIN_INFO_SIRET;
- $s = $mysoc->id_prof_url(2,$mysoc);
+ $s = $mysoc->id_prof_url(2, $mysoc);
if ($s) print ' - '.$s;
} else {
print ' ';
@@ -904,14 +902,14 @@ else
}
// ProfId3
- if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
+ if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-')
{
- print ' | | '.$langs->transcountry("ProfId3",$mysoc->country_code).' | ';
+ print ' | | '.$langs->transcountry("ProfId3", $mysoc->country_code).' | ';
if (! empty($conf->global->MAIN_INFO_APE))
{
print $conf->global->MAIN_INFO_APE;
- $s = $mysoc->id_prof_url(3,$mysoc);
+ $s = $mysoc->id_prof_url(3, $mysoc);
if ($s) print ' - '.$s;
} else {
print ' ';
@@ -920,14 +918,14 @@ else
}
// ProfId4
- if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
+ if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-')
{
- print ' | | '.$langs->transcountry("ProfId4",$mysoc->country_code).' | ';
+ print ' | | '.$langs->transcountry("ProfId4", $mysoc->country_code).' | ';
if (! empty($conf->global->MAIN_INFO_RCS))
{
print $conf->global->MAIN_INFO_RCS;
- $s = $mysoc->id_prof_url(4,$mysoc);
+ $s = $mysoc->id_prof_url(4, $mysoc);
if ($s) print ' - '.$s;
} else {
print ' ';
@@ -936,14 +934,14 @@ else
}
// ProfId5
- if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
+ if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-')
{
- print ' | | '.$langs->transcountry("ProfId5",$mysoc->country_code).' | ';
+ print ' | | '.$langs->transcountry("ProfId5", $mysoc->country_code).' | ';
if (! empty($conf->global->MAIN_INFO_PROFID5))
{
print $conf->global->MAIN_INFO_PROFID5;
- $s = $mysoc->id_prof_url(5,$mysoc);
+ $s = $mysoc->id_prof_url(5, $mysoc);
if ($s) print ' - '.$s;
} else {
print ' ';
@@ -952,14 +950,14 @@ else
}
// ProfId6
- if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
+ if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-')
{
- print ' | | '.$langs->transcountry("ProfId6",$mysoc->country_code).' | ';
+ print ' | | '.$langs->transcountry("ProfId6", $mysoc->country_code).' | ';
if (! empty($conf->global->MAIN_INFO_PROFID6))
{
print $conf->global->MAIN_INFO_PROFID6;
- $s = $mysoc->id_prof_url(6,$mysoc);
+ $s = $mysoc->id_prof_url(6, $mysoc);
if ($s) print ' - '.$s;
} else {
print ' ';
@@ -989,11 +987,11 @@ else
print '';
print "\n";
$s.=''.$langs->trans("VATIntraCheck").'';
- $s = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
+ $s = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->trans("VATIntraCheck")), 1);
}
else
{
- $s.='id_country).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'';
+ $s.='id_country).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"), 'help').'';
}
}
print $s;
@@ -1027,7 +1025,7 @@ else
print ' | | '.$langs->trans("FiscalMonthStart").' | ';
$monthstart=(! empty($conf->global->SOCIETE_FISCAL_MONTH_START)) ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1;
- print dol_print_date(dol_mktime(12,0,0,$monthstart,1,2000,1),'%B','gm') . ' | ';
+ print dol_print_date(dol_mktime(12, 0, 0, $monthstart, 1, 2000, 1), '%B', 'gm') . '';
print " ";
print "";
@@ -1076,18 +1074,18 @@ else
print '';
print ' ';
print '';
- print '| '.$langs->transcountry("LocalTax1Management",$mysoc->country_code).' | '.$langs->trans("Description").' | ';
+ print ''.$langs->transcountry("LocalTax1Management", $mysoc->country_code).' | '.$langs->trans("Description").' | ';
print ' | ';
print " \n";
print "| ";
- print "global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)." | ";
+ print "global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code)."";
print '';
print "";
- print "| ".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)." | ";
- $example=$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code);
- print ($example!="LocalTax1IsUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)." | \n":"");
+ print "| ".$langs->transcountry("LocalTax1IsUsedDesc", $mysoc->country_code)." | ";
+ $example=$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code);
+ print ($example!="LocalTax1IsUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code)." | \n":"");
if($conf->global->MAIN_INFO_VALUE_LOCALTAX1!=0)
{
print '| '.$langs->trans("LTRate").': '. $conf->global->MAIN_INFO_VALUE_LOCALTAX1 .' | ';
@@ -1111,12 +1109,12 @@ else
print '| ';
- print "global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)." | ";
+ print "global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code)."";
print '';
print "";
- print " | ";
- $example=$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code);
- print ($example!="LocalTax1IsNotUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code)." | \n":"");
+ print " | ";
+ $example=$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code);
+ print ($example!="LocalTax1IsNotUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code)." | \n":"");
print " ";
print " | \n";
@@ -1130,18 +1128,18 @@ else
print '';
print ' ';
print '';
- print '| '.$langs->transcountry("LocalTax2Management",$mysoc->country_code).' | '.$langs->trans("Description").' | ';
+ print ''.$langs->transcountry("LocalTax2Management", $mysoc->country_code).' | '.$langs->trans("Description").' | ';
print ' | ';
print " \n";
print "| ";
- print "global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)." | ";
+ print "global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code)."";
print '';
print "";
- print " | ";
- $example=$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code);
- print ($example!="LocalTax2IsUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)." | \n":"");
+ print " | ";
+ $example=$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code);
+ print ($example!="LocalTax2IsUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code)." | \n":"");
if($conf->global->MAIN_INFO_VALUE_LOCALTAX2!=0)
{
print '| '.$langs->trans("LTRate").': '. $conf->global->MAIN_INFO_VALUE_LOCALTAX2 .' | ';
@@ -1165,12 +1163,12 @@ else
print "\n";
- print "| global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)." | ";
+ print " | global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code)." | ";
print '';
print "";
- print " | ";
- $example=$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code);
- print ($example!="LocalTax2IsNotUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code)." | \n":"");
+ print " | ";
+ $example=$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code);
+ print ($example!="LocalTax2IsNotUsedExample"?"| ".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code)." | \n":"");
print " ";
print " | \n";
diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php
index 86d96227f3c..5bbfd15a0c4 100644
--- a/htdocs/admin/compta.php
+++ b/htdocs/admin/compta.php
@@ -35,7 +35,7 @@ $langs->loadLangs(array('admin', 'compta', 'accountancy'));
if (!$user->admin)
accessforbidden();
-$action = GETPOST('action','alpha');
+$action = GETPOST('action', 'alpha');
// Other parameters ACCOUNTING_*
$list = array(
@@ -64,10 +64,10 @@ if ($action == 'update')
'CREANCES-DETTES'
);
- $accounting_mode = GETPOST('accounting_mode','alpha');
+ $accounting_mode = GETPOST('accounting_mode', 'alpha');
- if (in_array($accounting_mode,$accounting_modes)) {
+ if (in_array($accounting_mode, $accounting_modes)) {
if (!dolibarr_set_const($db, 'ACCOUNTING_MODE', $accounting_mode, 'chaine', 0, '', $conf->entity)) {
$error++;
@@ -103,7 +103,7 @@ llxHeader();
$form=new Form($db);
$linkback=''.$langs->trans("BackToModuleList").'';
-print load_fiche_titre($langs->trans('ComptaSetup'),$linkback,'title_setup');
+print load_fiche_titre($langs->trans('ComptaSetup'), $linkback, 'title_setup');
print ' ';
diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php
index a54e1eb7aeb..cead92670a4 100644
--- a/htdocs/admin/confexped.php
+++ b/htdocs/admin/confexped.php
@@ -35,7 +35,7 @@ $langs->loadLangs(array('admin', 'sendings', 'deliveries'));
if (!$user->admin)
accessforbidden();
-$action=GETPOST('action','alpha');
+$action=GETPOST('action', 'alpha');
/*
@@ -46,7 +46,7 @@ $action=GETPOST('action','alpha');
if (! empty($conf->expedition->enabled) && empty($conf->global->MAIN_SUBMODULE_EXPEDITION))
{
// This option should always be set to on when module is on.
- dolibarr_set_const($db, "MAIN_SUBMODULE_EXPEDITION", "1",'chaine',0,'',$conf->entity);
+ dolibarr_set_const($db, "MAIN_SUBMODULE_EXPEDITION", "1", 'chaine', 0, '', $conf->entity);
}
/*
if ($action == 'activate_sending')
@@ -66,14 +66,14 @@ if ($action == 'disable_sending')
// Delivery note
if ($action == 'activate_delivery')
{
- dolibarr_set_const($db, "MAIN_SUBMODULE_EXPEDITION", "1",'chaine',0,'',$conf->entity); // We must also enable this
- dolibarr_set_const($db, "MAIN_SUBMODULE_LIVRAISON", "1",'chaine',0,'',$conf->entity);
+ dolibarr_set_const($db, "MAIN_SUBMODULE_EXPEDITION", "1", 'chaine', 0, '', $conf->entity); // We must also enable this
+ dolibarr_set_const($db, "MAIN_SUBMODULE_LIVRAISON", "1", 'chaine', 0, '', $conf->entity);
header("Location: confexped.php");
exit;
}
elseif ($action == 'disable_delivery')
{
- dolibarr_del_const($db, "MAIN_SUBMODULE_LIVRAISON",$conf->entity);
+ dolibarr_del_const($db, "MAIN_SUBMODULE_LIVRAISON", $conf->entity);
header("Location: confexped.php");
exit;
}
@@ -86,10 +86,10 @@ elseif ($action == 'disable_delivery')
$dir = DOL_DOCUMENT_ROOT."/core/modules/expedition/";
$form=new Form($db);
-llxHeader("",$langs->trans("SendingsSetup"));
+llxHeader("", $langs->trans("SendingsSetup"));
$linkback=''.$langs->trans("BackToModuleList").'';
-print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
+print load_fiche_titre($langs->trans("SendingsSetup"), $linkback, 'title_setup');
print ' ';
$head = expedition_admin_prepare_head();
@@ -134,11 +134,11 @@ print '';
if (empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
{
- print ''.img_picto($langs->trans("Disabled"),'switch_off').'';
+ print ''.img_picto($langs->trans("Disabled"), 'switch_off').'';
}
else
{
- print ''.img_picto($langs->trans("Enabled"),'switch_on').'';
+ print ''.img_picto($langs->trans("Enabled"), 'switch_on').'';
}
print " | ";
diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php
index bc48425017b..720b43a2275 100644
--- a/htdocs/admin/const.php
+++ b/htdocs/admin/const.php
@@ -33,16 +33,16 @@ $langs->load("admin");
if (! $user->admin)
accessforbidden();
-$rowid=GETPOST('rowid','int');
-$entity=GETPOST('entity','int');
-$action=GETPOST('action','alpha');
-$update=GETPOST('update','alpha');
-$delete=GETPOST('delete','none'); // Do not use alpha here
-$debug=GETPOST('debug','int');
-$consts=GETPOST('const','array');
-$constname=GETPOST('constname','alpha');
-$constvalue=GETPOST('constvalue','none'); // We shoul dbe able to send everything here
-$constnote=GETPOST('constnote','alpha');
+$rowid=GETPOST('rowid', 'int');
+$entity=GETPOST('entity', 'int');
+$action=GETPOST('action', 'alpha');
+$update=GETPOST('update', 'alpha');
+$delete=GETPOST('delete', 'none'); // Do not use alpha here
+$debug=GETPOST('debug', 'int');
+$consts=GETPOST('const', 'array');
+$constname=GETPOST('constname', 'alpha');
+$constvalue=GETPOST('constvalue', 'none'); // We shoul dbe able to send everything here
+$constnote=GETPOST('constnote', 'alpha');
@@ -148,7 +148,7 @@ if ($action == 'delete')
$form = new Form($db);
$wikihelp='EN:Setup_Other|FR:Paramétrage_Divers|ES:Configuración_Varios';
-llxHeader('',$langs->trans("Setup"),$wikihelp);
+llxHeader('', $langs->trans("Setup"), $wikihelp);
// Add logic to show/hide buttons
if ($conf->use_javascript_ajax)
@@ -174,7 +174,7 @@ jQuery(document).ready(function() {
trans("OtherSetup"),'','title_setup');
+print load_fiche_titre($langs->trans("OtherSetup"), '', 'title_setup');
print $langs->trans("ConstDesc")." \n";
print " \n";
@@ -264,7 +264,7 @@ if ($result)
// Note
print '';
- print '';
+ print '';
print ' | ';
// Entity limit to superadmin
diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php
index 0a704ce5ee8..7cad76585e2 100644
--- a/htdocs/admin/contract.php
+++ b/htdocs/admin/contract.php
@@ -33,10 +33,10 @@ $langs->loadLangs(array("admin","errors","contracts"));
if (!$user->admin) accessforbidden();
-$action = GETPOST('action','alpha');
-$value = GETPOST('value','alpha');
-$label = GETPOST('label','alpha');
-$scandir = GETPOST('scan_dir','alpha');
+$action = GETPOST('action', 'alpha');
+$value = GETPOST('value', 'alpha');
+$label = GETPOST('label', 'alpha');
+$scandir = GETPOST('scan_dir', 'alpha');
$type='contract';
if (empty($conf->global->CONTRACT_ADDON))
@@ -53,9 +53,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
if ($action == 'updateMask')
{
- $maskconst = GETPOST('maskconstcontract','alpha');
- $maskvalue = GETPOST('maskcontract','alpha');
- if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity);
+ $maskconst = GETPOST('maskconstcontract', 'alpha');
+ $maskvalue = GETPOST('maskcontract', 'alpha');
+ if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
if (! $res > 0) $error++;
@@ -71,17 +71,17 @@ if ($action == 'updateMask')
elseif ($action == 'specimen') // For contract
{
- $modele= GETPOST('module','alpha');
+ $modele= GETPOST('module', 'alpha');
$contract = new Contrat($db);
$contract->initAsSpecimen();
// Search template files
$file=''; $classname=''; $filefound=0;
- $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
+ $dirmodels=array_merge(array('/'), (array) $conf->modules_parts['models']);
foreach($dirmodels as $reldir)
{
- $file=dol_buildpath($reldir."core/modules/contract/doc/pdf_".$modele.".modules.php",0);
+ $file=dol_buildpath($reldir."core/modules/contract/doc/pdf_".$modele.".modules.php", 0);
if (file_exists($file))
{
$filefound=1;
@@ -96,7 +96,7 @@ elseif ($action == 'specimen') // For contract
$module = new $classname($db);
- if ($module->write_file($contract,$langs) > 0)
+ if ($module->write_file($contract, $langs) > 0)
{
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=contract&file=SPECIMEN.pdf");
return;
@@ -125,14 +125,14 @@ elseif ($action == 'del')
$ret = delDocumentModel($value, $type);
if ($ret > 0)
{
- if ($conf->global->CONTRACT_ADDON_PDF == "$value") dolibarr_del_const($db, 'CONTRACT_ADDON_PDF',$conf->entity);
+ if ($conf->global->CONTRACT_ADDON_PDF == "$value") dolibarr_del_const($db, 'CONTRACT_ADDON_PDF', $conf->entity);
}
}
// Set default model
elseif ($action == 'setdoc')
{
- if (dolibarr_set_const($db, "CONTRACT_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
+ if (dolibarr_set_const($db, "CONTRACT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity))
{
// La constante qui a ete lue en avant du nouveau set
// on passe donc par une variable pour avoir un affichage coherent
@@ -152,16 +152,16 @@ elseif ($action == 'setmod')
// TODO Verifier si module numerotation choisi peut etre active
// par appel methode canBeActivated
- dolibarr_set_const($db, "CONTRACT_ADDON",$value,'chaine',0,'',$conf->entity);
+ dolibarr_set_const($db, "CONTRACT_ADDON", $value, 'chaine', 0, '', $conf->entity);
}
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);
+ $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);
- $draft= GETPOST('CONTRACT_DRAFT_WATERMARK','alpha');
- $res2 = dolibarr_set_const($db, "CONTRACT_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
+ $draft= GETPOST('CONTRACT_DRAFT_WATERMARK', 'alpha');
+ $res2 = dolibarr_set_const($db, "CONTRACT_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
if (! $res1 > 0 || ! $res2 > 0) $error++;
@@ -180,14 +180,14 @@ elseif ($action == 'set_other')
* View
*/
-$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
+$dirmodels=array_merge(array('/'), (array) $conf->modules_parts['models']);
llxHeader();
$form=new Form($db);
$linkback=''.$langs->trans("BackToModuleList").'';
-print load_fiche_titre($langs->trans("ContractsSetup"),$linkback,'title_setup');
+print load_fiche_titre($langs->trans("ContractsSetup"), $linkback, 'title_setup');
$head=contract_admin_prepare_head();
@@ -197,7 +197,7 @@ dol_fiche_head($head, 'contract', $langs->trans("Contracts"), -1, 'contract');
* Contracts Numbering model
*/
-print load_fiche_titre($langs->trans("ContractsNumberingModules"),'','');
+print load_fiche_titre($langs->trans("ContractsNumberingModules"), '', '');
print '';
print '';
@@ -244,7 +244,7 @@ foreach ($dirmodels as $reldir)
// Show example of numbering model
print '| ';
$tmp=$module->getExample();
- if (preg_match('/^Error/',$tmp)) { $langs->load("errors"); print ' '.$langs->trans($tmp).' '; }
+ if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print ''.$langs->trans($tmp).' '; }
elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
else print $tmp;
print ' | '."\n";
@@ -252,12 +252,12 @@ foreach ($dirmodels as $reldir)
print '';
if ($conf->global->CONTRACT_ADDON == "$file")
{
- print img_picto($langs->trans("Activated"),'switch_on');
+ print img_picto($langs->trans("Activated"), 'switch_on');
}
else
{
print '';
- print img_picto($langs->trans("Disabled"),'switch_off');
+ print img_picto($langs->trans("Disabled"), 'switch_off');
print '';
}
print ' | ';
@@ -268,11 +268,11 @@ foreach ($dirmodels as $reldir)
// Info
$htmltooltip='';
$htmltooltip.=''.$langs->trans("Version").': '.$module->getVersion().' ';
- $nextval=$module->getNextValue($mysoc,$contract);
+ $nextval=$module->getNextValue($mysoc, $contract);
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
$htmltooltip.=''.$langs->trans("NextValue").': ';
if ($nextval) {
- if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
+ if (preg_match('/^Error/', $nextval) || $nextval=='NotConfigured')
$nextval = $langs->trans($nextval);
$htmltooltip.=$nextval.' ';
} else {
@@ -281,7 +281,7 @@ foreach ($dirmodels as $reldir)
}
print '';
- print $form->textwithpicto('',$htmltooltip,1,0);
+ print $form->textwithpicto('', $htmltooltip, 1, 0);
print ' | ';
print ' ';
@@ -299,7 +299,7 @@ print ' ';
* Documents models for Contracts
*/
-print load_fiche_titre($langs->trans("TemplatePDFContracts"),'','');
+print load_fiche_titre($langs->trans("TemplatePDFContracts"), '', '');
// Defini tableau def des modeles
$def = array();
@@ -357,7 +357,7 @@ foreach ($dirmodels as $reldir)
foreach($filelist as $file)
{
- if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file))
+ if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file))
{
if (file_exists($dir.'/'.$file))
@@ -377,7 +377,7 @@ foreach ($dirmodels as $reldir)
print '| ';
print (empty($module->name)?$name:$module->name);
print " | \n";
- if (method_exists($module,'info')) print $module->info($langs);
+ if (method_exists($module, 'info')) print $module->info($langs);
else print $module->description;
print ' | ';
@@ -386,14 +386,14 @@ foreach ($dirmodels as $reldir)
{
print ''."\n";
print '';
- print img_picto($langs->trans("Enabled"),'switch_on');
+ print img_picto($langs->trans("Enabled"), 'switch_on');
print '';
print ' | ';
}
else
{
print ''."\n";
- print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'';
+ print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'';
print " | ";
}
@@ -401,11 +401,11 @@ foreach ($dirmodels as $reldir)
print '';
if ($conf->global->CONTRACT_ADDON_PDF == $name)
{
- print img_picto($langs->trans("Default"),'on');
+ print img_picto($langs->trans("Default"), 'on');
}
else
{
- print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'';
+ print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'';
}
print ' | ';
@@ -417,26 +417,26 @@ foreach ($dirmodels as $reldir)
$htmltooltip.=' '.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
}
$htmltooltip.='
'.$langs->trans("FeaturesSupported").':';
- $htmltooltip.=' '.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
- $htmltooltip.=' '.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1);
- $htmltooltip.=' '.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1);
- $htmltooltip.=' '.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1);
- $htmltooltip.=' '.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1);
+ $htmltooltip.=' '.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
+ $htmltooltip.=' '.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
+ $htmltooltip.=' '.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
+ $htmltooltip.=' '.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
+ $htmltooltip.=' '.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
print '';
- print $form->textwithpicto('',$htmltooltip,1,0);
+ print $form->textwithpicto('', $htmltooltip, 1, 0);
print ' | ';
// Preview
print '';
if ($module->type == 'pdf')
{
- print ''.img_object($langs->trans("Preview"),'contract').'';
+ print ''.img_object($langs->trans("Preview"), 'contract').'';
}
else
{
- print img_object($langs->trans("PreviewNotAvailable"),'generic');
+ print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print ' | ';
@@ -462,7 +462,7 @@ print ' | | |