Merge pull request #720 from simnandez/develop

[ task #707 ] Create option ProfIdx are mandatory to validate a invoice
This commit is contained in:
Laurent Destailleur 2013-03-07 10:58:13 -08:00
commit f62045e770

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++;