[ task #707 ] Create option ProfIdx are mandatory to validate a invoice

This commit is contained in:
simnandez 2013-03-07 18:41:56 +01:00
parent c762c93eb1
commit 0c8d3336c2

View File

@ -372,7 +372,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->factu
{
$idprof_mandatory ='SOCIETE_IDPROF'.($i).'_INVOICE_MANDATORY';
if (! $object->thirdparty->idprof.$i && ! empty($conf->global->$idprof_mandatory))
$idprof='idprof'.$i;
if (! $object->thirdparty->$idprof && ! empty($conf->global->$idprof_mandatory))
{
if (! $error) $langs->load("errors");
$error++;