diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 27dfec3aed5..ac56afab3ca 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -306,7 +306,7 @@ else if ($action == 'addline' && $user->rights->contrat->creer) { $pu_ht=GETPOST('price_ht'); $price_base_type = 'HT'; - $tva_tx=str_replace('*','',GETPOST('tva_tx')); + $tva_tx=GETPOST('tva_tx')?str_replace('*','',GETPOST('tva_tx')):0; // tva_tx field may be disabled, so we use vat rate 0 $tva_npr=preg_match('/\*/',GETPOST('tva_tx'))?1:0; $desc=GETPOST('dp_desc'); } @@ -424,7 +424,7 @@ else if ($action == 'updateligne' && $user->rights->contrat->creer && ! GETPOST( $objectline->subprice=GETPOST('elprice'); $objectline->qty=GETPOST('elqty'); $objectline->remise_percent=GETPOST('elremise_percent'); - $objectline->tva_tx=GETPOST('eltva_tx'); + $objectline->tva_tx=GETPOST('eltva_tx')?GETPOST('eltva_tx'):0; // Field may be disabled, so we use vat rate 0 $objectline->localtax1_tx=$localtax1_tx; $objectline->localtax2_tx=$localtax2_tx; $objectline->date_ouverture_prevue=$date_start_update; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 0aa88aeeafa..cf817ae494d 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1147,19 +1147,21 @@ function showModulesExludedForExternal($modules) $text=$langs->trans("OnlyFollowingModulesAreOpenedToExternalUsers"); $listofmodules=explode(',',$conf->global->MAIN_MODULES_FOR_EXTERNAL); $i=0; - foreach($modules as $module) - { - $moduleconst=$module->const_name; - $modulename=strtolower($module->name); - //print 'modulename='.$modulename; - - //if (empty($conf->global->$moduleconst)) continue; - if (! in_array($modulename,$listofmodules)) continue; - - if ($i > 0) $text.=', '; - else $text.=' '; - $i++; - $text .= $langs->trans('Module'.$module->numero.'Name'); + if (!empty($modules)) { + foreach($modules as $module) + { + $moduleconst=$module->const_name; + $modulename=strtolower($module->name); + //print 'modulename='.$modulename; + + //if (empty($conf->global->$moduleconst)) continue; + if (! in_array($modulename,$listofmodules)) continue; + + if ($i > 0) $text.=', '; + else $text.=' '; + $i++; + $text .= $langs->trans('Module'.$module->numero.'Name'); + } } return img_picto($langs->trans('InfoAdmin'), 'star').' '.$text; } diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 0bc8e8d9451..f510a561655 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -282,6 +282,8 @@ AmountTTCShort=Amount (inc. tax) AmountHT=Amount (net of tax) AmountTTC=Amount (inc. tax) AmountVAT=Amount tax +AmountLT1=Amount tax 2 +AmountLT2=Amount tax 3 AmountLT1ES=Amount RE AmountLT2ES=Amount IRPF AmountTotal=Total amount diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index ddac2178b58..e01cb97537e 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -284,6 +284,8 @@ AmountTTCShort=Montant TTC AmountHT=Montant HT AmountTTC=Montant TTC AmountVAT=Montant TVA +AmountLT1=Montant Tax 2 +AmountLT2=Montant Tax 3 AmountLT1ES=Montant RE AmountLT2ES=Montant IRPF AmountTotal=Montant total