New: Add warning message.

This commit is contained in:
Laurent Destailleur 2012-10-17 14:23:56 +02:00
parent 5e510d4312
commit b160b97cbe
3 changed files with 7 additions and 1 deletions

View File

@ -275,7 +275,11 @@ else if ($action == 'setpaymentterm' && $user->rights->facture->creer)
{
$object->fetch($id);
$object->date_lim_reglement=dol_mktime(12,0,0,$_POST['paymenttermmonth'],$_POST['paymenttermday'],$_POST['paymenttermyear']);
if ($object->date_lim_reglement < $object->date) $object->date_lim_reglement=$object->date;
if ($object->date_lim_reglement < $object->date)
{
$object->date_lim_reglement=$object->date;
setEventMessage($langs->trans("DatePaymentTermCantBeLowerThanObjectDate"),'warnings');
}
$result=$object->update($user);
if ($result < 0) dol_print_error($db,$object->error);
}

View File

@ -145,6 +145,7 @@ CodeNotDef=Not defined
AddRemind=Dispatch available amount
RemainToDivide= Remain to dispatch :
WarningDepositsNotIncluded=Deposits invoices are not included in this version with this accountancy module.
DatePaymentTermCantBeLowerThanObjectDate=Payment term date can't be lower than object date.
Pcg_version=Pcg version
Pcg_type=Pcg type
Pcg_subtype=Pcg subtype

View File

@ -157,6 +157,7 @@ COMPTA_ACCOUNT_SUPPLIER=Compte comptable fournisseur par défaut (si non défini
AddRemind=Ventiler montant disponible
RemainToDivide=Reste à répartir :
WarningDepositsNotIncluded=Les factures d'accomptes ne sont pas encore prises en compte dans cette version avec ce module de comptabilité.
DatePaymentTermCantBeLowerThanObjectDate=La date limite de règlement ne peut être inférieure à la date de l'object
Pcg_version=Version du plan
Pcg_type=Classe de compte
Pcg_subtype=Sous classe de compte