New: Prefix on third party is not used by default. Hidden option SOCIETE_USEPREFIX can restore old feature.
This commit is contained in:
parent
c9cc9e7ec2
commit
980ed1a7dc
@ -206,7 +206,10 @@ if ($_GET["socid"])
|
||||
print $html->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$soc->prefix_comm.'</td></tr>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$soc->prefix_comm.'</td></tr>';
|
||||
}
|
||||
|
||||
if ($soc->client)
|
||||
{
|
||||
@ -424,7 +427,7 @@ function formCategory($db,$object,$typeid)
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="40%">';
|
||||
print $langs->trans("ClassifyInCategory");
|
||||
print $langs->trans("ClassifyInCategory");
|
||||
print $html->select_all_categories($typeid);
|
||||
print '</td><td>';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Classify").'"></td>';
|
||||
|
||||
@ -192,9 +192,12 @@ if ($socid > 0)
|
||||
print '</td></tr>';
|
||||
|
||||
// Prefix
|
||||
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
|
||||
print ($objsoc->prefix_comm?$objsoc->prefix_comm:' ');
|
||||
print '</td></tr>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
|
||||
print ($objsoc->prefix_comm?$objsoc->prefix_comm:' ');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($objsoc->client)
|
||||
{
|
||||
|
||||
@ -69,9 +69,12 @@ if ($socid > 0)
|
||||
print '<tr><td width="20%">'.$langs->trans("Name").'</td><td width="80%" colspan="3">'.$societe->nom.'</td></tr>';
|
||||
|
||||
// Prefix
|
||||
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
|
||||
print ($societe->prefix_comm?$societe->prefix_comm:' ');
|
||||
print '</td></tr>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
|
||||
print ($societe->prefix_comm?$societe->prefix_comm:' ');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
@ -69,9 +69,12 @@ if ($socid > 0)
|
||||
print '<tr><td width="20%">'.$langs->trans("Name").'</td><td width="80%" colspan="3">'.$societe->nom.'</td></tr>';
|
||||
|
||||
// Prefix
|
||||
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
|
||||
print ($societe->prefix_comm?$societe->prefix_comm:' ');
|
||||
print '</td></tr>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
|
||||
print ($societe->prefix_comm?$societe->prefix_comm:' ');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
@ -68,9 +68,12 @@ if ($socid > 0)
|
||||
print '<tr><td width="20%">'.$langs->trans("Name").'</td><td width="80%" colspan="3">'.$societe->nom.'</td></tr>';
|
||||
|
||||
// Prefix
|
||||
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
|
||||
print ($societe->prefix_comm?$societe->prefix_comm:' ');
|
||||
print '</td></tr>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
|
||||
print ($societe->prefix_comm?$societe->prefix_comm:' ');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
@ -95,7 +95,10 @@ if ( $societe->fetch($socid) )
|
||||
print $form->showrefnav($societe,'socid','',($user->societe_id?0:1),'rowid','nom','','');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$societe->prefix_comm.'</td></tr>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$societe->prefix_comm.'</td></tr>';
|
||||
}
|
||||
|
||||
if ($societe->fournisseur)
|
||||
{
|
||||
|
||||
@ -69,9 +69,12 @@ if ($socid > 0)
|
||||
print '<tr><td width="20%">'.$langs->trans("Name").'</td><td width="80%" colspan="3">'.$societe->nom.'</td></tr>';
|
||||
|
||||
// Prefix
|
||||
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
|
||||
print ($societe->prefix_comm?$societe->prefix_comm:' ');
|
||||
print '</td></tr>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
|
||||
print ($societe->prefix_comm?$societe->prefix_comm:' ');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
@ -84,7 +84,10 @@ if ($_GET["socid"])
|
||||
print $html->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$soc->prefix_comm.'</td></tr>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$soc->prefix_comm.'</td></tr>';
|
||||
}
|
||||
|
||||
if ($soc->client)
|
||||
{
|
||||
|
||||
@ -109,7 +109,15 @@ if ($_GET["socid"])
|
||||
print $langs->trans('CustomerCode').'</td><td width="20%">';
|
||||
print $soc->code_client;
|
||||
if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
|
||||
print '</td><td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td></tr>';
|
||||
print '</td>';
|
||||
|
||||
// Prefix
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td>';
|
||||
}
|
||||
else print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->address)."</td></tr>";
|
||||
|
||||
|
||||
@ -147,7 +147,10 @@ if ($socid > 0)
|
||||
print '</td></tr>';
|
||||
|
||||
// Prefix
|
||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$societe->prefix_comm.'</td></tr>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$societe->prefix_comm.'</td></tr>';
|
||||
}
|
||||
|
||||
if ($societe->client)
|
||||
{
|
||||
|
||||
@ -112,7 +112,15 @@ if($_GET["socid"])
|
||||
print $langs->trans('CustomerCode').'</td><td width="20%">';
|
||||
print $soc->code_client;
|
||||
if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
|
||||
print '</td><td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td></tr>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td>';
|
||||
}
|
||||
else print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->address)."</td></tr>";
|
||||
|
||||
|
||||
@ -666,12 +666,22 @@ else
|
||||
if ($soc->particulier)
|
||||
{
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans('LastName').'</span></td><td><input type="text" size="30" maxlength="60" name="nom" value="'.$soc->nom.'"></td>';
|
||||
print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$soc->prefix_comm.'"></td></tr>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$soc->prefix_comm.'"></td>';
|
||||
}
|
||||
else print '<td> </td>';
|
||||
print '</tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans('Name').'</span></td><td><input type="text" size="30" maxlength="60" name="nom" value="'.$soc->nom.'"></td>';
|
||||
print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$soc->prefix_comm.'"></td></tr>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$soc->prefix_comm.'"></td>';
|
||||
}
|
||||
else print '<td> </td>';
|
||||
print '</tr>';
|
||||
}
|
||||
// If javascript on, we show option individual
|
||||
if ($conf->use_javascript_ajax)
|
||||
@ -1057,18 +1067,21 @@ else
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans('Name').'</span></td><td colspan="3"><input type="text" size="40" maxlength="60" name="nom" value="'.$soc->nom.'"></td></tr>';
|
||||
|
||||
// Prefix
|
||||
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
|
||||
// It does not change the prefix mode using the auto numbering prefix
|
||||
if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $soc->prefix_comm)
|
||||
{
|
||||
print '<input type="hidden" name="prefix_comm" value="'.$soc->prefix_comm.'">';
|
||||
print $soc->prefix_comm;
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$soc->prefix_comm.'">';
|
||||
}
|
||||
print '</td>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
|
||||
// It does not change the prefix mode using the auto numbering prefix
|
||||
if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $soc->prefix_comm)
|
||||
{
|
||||
print '<input type="hidden" name="prefix_comm" value="'.$soc->prefix_comm.'">';
|
||||
print $soc->prefix_comm;
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$soc->prefix_comm.'">';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Prospect/Customer
|
||||
print '<tr><td width="25%"><span class="fieldrequired">'.$langs->trans('ProspectCustomer').'</span></td><td width="25%"><select class="flat" name="client">';
|
||||
@ -1367,7 +1380,10 @@ else
|
||||
print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$soc->prefix_comm.'</td></tr>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$soc->prefix_comm.'</td></tr>';
|
||||
}
|
||||
|
||||
if ($soc->client)
|
||||
{
|
||||
|
||||
@ -85,7 +85,10 @@ if ($socid > 0)
|
||||
print $form->showrefnav($societe,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$societe->prefix_comm.'</td></tr>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$societe->prefix_comm.'</td></tr>';
|
||||
}
|
||||
|
||||
if ($societe->client)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user