[CORE] corrections mineurs sur des tests (#incoterm).

This commit is contained in:
phf 2015-02-10 12:21:29 +01:00
parent 36304234d2
commit 560d836943
2 changed files with 12 additions and 12 deletions

View File

@ -53,7 +53,7 @@ $langs->load('orders');
$langs->load('products');
$langs->load("deliveries");
$langs->load('sendings');
if ($conf->incoterm->enabled) $langs->load('incoterm');
if (!empty($conf->incoterm->enabled)) $langs->load('incoterm');
if (! empty($conf->margin->enabled))
$langs->load('margins');
@ -243,7 +243,7 @@ if (empty($reshook))
}
// Set incoterm
elseif ($action == 'set_incoterms' && $conf->incoterm->enabled)
elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled))
{
$result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
}
@ -1400,7 +1400,7 @@ if ($action == 'create')
print "</td></tr>";
// Incoterms
if ($conf->incoterm->enabled)
if (!empty($conf->incoterm->enabled))
{
print '<tr>';
print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $soc->libelle_incoterms, 1).'</label></td>';
@ -1970,13 +1970,13 @@ if ($action == 'create')
}
// Incoterms
if ($conf->incoterm->enabled)
if (!empty($conf->incoterm->enabled))
{
print '<tr><td>';
print '<table width="100%" class="nobordernopadding"><tr><td>';
print $langs->trans('IncotermLabel');
print '<td><td align="right">';
if ($user->rights->societe->creer) print '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$object->id.'&action=editincoterm">'.img_edit().'</a>';
if ($user->rights->commande->creer) print '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$object->id.'&action=editincoterm">'.img_edit().'</a>';
else print '&nbsp;';
print '</td></tr></table>';
print '</td>';

View File

@ -45,7 +45,7 @@ $langs->load("commercial");
$langs->load("bills");
$langs->load("banks");
$langs->load("users");
if ($conf->incoterm->enabled) $langs->load("incoterm");
if (!empty($conf->incoterm->enabled)) $langs->load("incoterm");
if (! empty($conf->notification->enabled)) $langs->load("mails");
$mesg=''; $error=0; $errors=array();
@ -193,7 +193,7 @@ if (empty($reshook))
$object->webservices_key = GETPOST('webservices_key', 'san_alpha');
// Incoterms
if ($conf->incoterm->enabled)
if (!empty($conf->incoterm->enabled))
{
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
@ -522,7 +522,7 @@ if (empty($reshook))
}
// Set incoterm
if ($action == 'set_incoterms' && $conf->incoterm->enabled)
if ($action == 'set_incoterms' && !empty($conf->incoterm->enabled))
{
$object->fetch($socid);
$result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
@ -1089,7 +1089,7 @@ else
}
// Incoterms
if ($conf->incoterm->enabled)
if (!empty($conf->incoterm->enabled))
{
print '<tr>';
print '<td><label for="incoterm_id">'.$langs->trans("IncotermLabel").'</label></td>';
@ -1221,7 +1221,7 @@ else
$object->webservices_key = GETPOST('webservices_key', 'san_alpha');
//Incoterms
if ($conf->incoterm->enabled)
if (!empty($conf->incoterm->enabled))
{
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
$object->location_incoterms = GETPOST('lcoation_incoterms', 'alpha');
@ -1615,7 +1615,7 @@ else
}
// Incoterms
if ($conf->incoterm->enabled)
if (!empty($conf->incoterm->enabled))
{
print '<tr>';
print '<td><label for="incoterm_id">'.$langs->trans("IncotermLabel").'</label></td>';
@ -2011,7 +2011,7 @@ else
}
// Incoterms
if ($conf->incoterm->enabled)
if (!empty($conf->incoterm->enabled))
{
print '<tr><td>';
print '<table width="100%" class="nobordernopadding"><tr><td>';