forked from Wavyzz/dolibarr
[Qual] Uniformize code
This commit is contained in:
@@ -746,7 +746,7 @@ if (empty($reshook))
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("RefNewContract")),'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("RefNewContract")), null, 'errors');
|
||||
}
|
||||
}
|
||||
else if ($action == 'update_extras')
|
||||
|
||||
@@ -320,7 +320,7 @@ if ($action == 'add_export_model')
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("ExportModelName")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("ExportModelName")), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@ if (empty($reshook))
|
||||
// Product not selected
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("ProductOrService")).' '.$langs->trans("or").' '.$langs->trans("NoPriceDefinedForThisSupplier"), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ProductOrService")).' '.$langs->trans("or").' '.$langs->trans("NoPriceDefinedForThisSupplier"), null, 'errors');
|
||||
}
|
||||
if ($idprod == -1)
|
||||
{
|
||||
@@ -784,7 +784,7 @@ if (empty($reshook))
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Delivery")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Delivery")), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -716,7 +716,7 @@ if (empty($reshook))
|
||||
// Product not selected
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("ProductOrService")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ProductOrService")), null, 'errors');
|
||||
}
|
||||
if ($idprod == -1)
|
||||
{
|
||||
|
||||
@@ -62,13 +62,13 @@ if ($action == 'add' || GETPOST('modify','alpha'))
|
||||
if (! GETPOST("$ftp_name",'alpha'))
|
||||
{
|
||||
$error=1;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Label")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors');
|
||||
}
|
||||
|
||||
if (! GETPOST("$ftp_server",'alpha'))
|
||||
{
|
||||
$error=1;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Server")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Server")), null, 'errors');
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
|
||||
@@ -87,7 +87,7 @@ if ($action == 'create')
|
||||
// If no start date
|
||||
if ($type <= 0)
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors');
|
||||
$error++;
|
||||
$action='create';
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ if ($action == 'add_import_model')
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("ImportModelName")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("ImportModelName")), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,17 +89,17 @@ if ($action == 'add' && $user->rights->loan->write)
|
||||
|
||||
if (! $datestart)
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("DateStart")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("DateStart")), null, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
elseif (! $dateend)
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("DateEnd")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("DateEnd")), null, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
elseif (! $_POST["capital"])
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Capital")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Capital")), null, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
else
|
||||
|
||||
@@ -62,17 +62,17 @@ if ($action == 'add_payment')
|
||||
|
||||
if (! GETPOST('paymenttype', 'int') > 0)
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("PaymentMode")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if ($datepaid == '')
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Date")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Date")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (! empty($conf->banque->enabled) && ! GETPOST('accountid', 'int') > 0)
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountToCredit")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToCredit")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ if ($action == 'update')
|
||||
|
||||
if (! GETPOST('nouveautitre'))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Title")),'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Title")), null, 'errors');
|
||||
$error++;
|
||||
$action = 'edit';
|
||||
}
|
||||
@@ -114,12 +114,12 @@ if (GETPOST('ajoutcomment'))
|
||||
if (! GETPOST('comment'))
|
||||
{
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Comment")),'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Comment")), null, 'errors');
|
||||
}
|
||||
if (! GETPOST('commentuser'))
|
||||
{
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("User")),'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("User")), null, 'errors');
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
|
||||
@@ -1020,7 +1020,7 @@ if ($nbofcheckbox >= 2)
|
||||
|
||||
// S'il a oublié de remplir un nom
|
||||
if (isset($_POST["boutonp"]) && $_POST["nom"] == "") {
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Name")), null, 'errors');
|
||||
}
|
||||
|
||||
if (isset($erreur_prenom) && $erreur_prenom) {
|
||||
|
||||
@@ -144,7 +144,7 @@ print '<table class="border" width="100%">'."\n";
|
||||
print '<tr><td class="fieldrequired">'. $langs->trans("PollTitle") .'</td><td><input type="text" name="titre" size="40" maxlength="80" value="'.$_SESSION["titre"].'"></td>'."\n";
|
||||
if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre')))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PollTitle")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PollTitle")), null, 'errors');
|
||||
}
|
||||
|
||||
print '</tr>'."\n";
|
||||
|
||||
@@ -119,7 +119,7 @@ if (empty($reshook))
|
||||
{
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("VATRateForSupplierProduct")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("VATRateForSupplierProduct")), null, 'errors');
|
||||
}
|
||||
if (! is_numeric($tva_tx))
|
||||
{
|
||||
@@ -131,19 +131,19 @@ if (empty($reshook))
|
||||
{
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Qty")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Qty")), null, 'errors');
|
||||
}
|
||||
if (empty($ref_fourn))
|
||||
{
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("RefSupplier")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("RefSupplier")), null, 'errors');
|
||||
}
|
||||
if ($id_fourn <= 0)
|
||||
{
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Supplier")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Supplier")), null, 'errors');
|
||||
}
|
||||
if ($_POST["price"] < 0 || $_POST["price"] == '')
|
||||
{
|
||||
@@ -151,7 +151,7 @@ if (empty($reshook))
|
||||
{
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Price")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Price")), null, 'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -208,11 +208,11 @@ if (empty($reshook))
|
||||
|
||||
if (empty($quantity)) {
|
||||
$error ++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentities("Qty")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Qty")), null, 'errors');
|
||||
}
|
||||
if (empty($newprice)) {
|
||||
$error ++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentities("Price")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Price")), null, 'errors');
|
||||
}
|
||||
if (! $error) {
|
||||
// Calcul du prix HT et du prix unitaire
|
||||
|
||||
@@ -79,17 +79,17 @@ if ($action == 'addline')
|
||||
if (! ($id_product > 0))
|
||||
{
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Product")),'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors');
|
||||
}
|
||||
if (! ($id_sw > 0))
|
||||
{
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("WarehouseSource")),'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("WarehouseSource")), null, 'errors');
|
||||
}
|
||||
if (! ($id_tw > 0))
|
||||
{
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("WarehouseTarget")),'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("WarehouseTarget")), null, 'errors');
|
||||
}
|
||||
if ($id_sw > 0 && $id_tw == $id_sw)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ if ($action == 'addline')
|
||||
if (! $qty)
|
||||
{
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Qty")),'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Qty")), null, 'errors');
|
||||
}
|
||||
|
||||
// Check a batch number is provided if product need it
|
||||
|
||||
@@ -94,7 +94,7 @@ if ($action == "correct_stock")
|
||||
if (empty($product_id))
|
||||
{
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors');
|
||||
$action='correction';
|
||||
}
|
||||
if (! is_numeric($_POST["nbpiece"]))
|
||||
|
||||
@@ -99,13 +99,13 @@ if ($action == "correct_stock" && ! $cancel)
|
||||
{
|
||||
if (! (GETPOST("id_entrepot") > 0))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Warehouse")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Warehouse")), null, 'errors');
|
||||
$error++;
|
||||
$action='correction';
|
||||
}
|
||||
if (! GETPOST("nbpiece"))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("NumberOfUnit")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumberOfUnit")), null, 'errors');
|
||||
$error++;
|
||||
$action='correction';
|
||||
}
|
||||
@@ -116,7 +116,7 @@ if ($action == "correct_stock" && ! $cancel)
|
||||
$result=$product->fetch($id);
|
||||
|
||||
if ($product->hasbatch() && (! GETPOST("sellby")) && (! GETPOST("eatby")) && (! GETPOST("batch_number"))) {
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("atleast1batchfield")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("atleast1batchfield")), null, 'errors');
|
||||
$error++;
|
||||
$action='correction';
|
||||
}
|
||||
@@ -186,13 +186,13 @@ if ($action == "transfert_stock" && ! $cancel)
|
||||
{
|
||||
if (! (GETPOST("id_entrepot_source",'int') > 0) || ! (GETPOST("id_entrepot_destination",'int') > 0))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Warehouse")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Warehouse")), null, 'errors');
|
||||
$error++;
|
||||
$action='transfert';
|
||||
}
|
||||
if (! GETPOST("nbpiece",'int'))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("NumberOfUnit")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumberOfUnit")), null, 'errors');
|
||||
$error++;
|
||||
$action='transfert';
|
||||
}
|
||||
@@ -335,7 +335,7 @@ if ($action == 'updateline' && GETPOST('save') == $langs->trans('Save'))
|
||||
if ($pdluo->id)
|
||||
{
|
||||
if ((! GETPOST("sellby")) && (! GETPOST("eatby")) && (! GETPOST("batch_number"))) {
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("atleast1batchfield")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("atleast1batchfield")), null, 'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -118,12 +118,12 @@ if (empty($reshook))
|
||||
$error=0;
|
||||
if (empty($_POST["ref"]))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Ref")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (empty($_POST["title"]))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
|
||||
@@ -205,13 +205,13 @@ if (empty($reshook))
|
||||
{
|
||||
$error++;
|
||||
//$_GET["id"]=$_POST["id"]; // On retourne sur la fiche projet
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Ref")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors');
|
||||
}
|
||||
if (empty($_POST["title"]))
|
||||
{
|
||||
$error++;
|
||||
//$_GET["id"]=$_POST["id"]; // On retourne sur la fiche projet
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors');
|
||||
}
|
||||
|
||||
$db->begin();
|
||||
|
||||
@@ -90,13 +90,13 @@ if ($action == 'createtask' && $user->rights->projet->creer)
|
||||
{
|
||||
if (empty($label))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors');
|
||||
$action='create';
|
||||
$error++;
|
||||
}
|
||||
else if (empty($_POST['task_parent']))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("ChildOfTask")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("ChildOfTask")), null, 'errors');
|
||||
$action='create';
|
||||
$error++;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->projet->creer)
|
||||
if (empty($_POST["label"]))
|
||||
{
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors');
|
||||
}
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
@@ -67,12 +67,12 @@ if (GETPOST('ajoutcomment'))
|
||||
if (! GETPOST('comment'))
|
||||
{
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Comment")),'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Comment")), null, 'errors');
|
||||
}
|
||||
if (! GETPOST('commentuser'))
|
||||
{
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("User")),'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("User")), null, 'errors');
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
@@ -164,7 +164,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Name")), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ if (empty($reshook))
|
||||
if (empty($ref))
|
||||
{
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Ref")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors');
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
|
||||
@@ -68,12 +68,12 @@ if ($action == 'add')
|
||||
|
||||
if (empty($contactid))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Contact")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Contact")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if ($actionid <= 0)
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Action")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Action")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
@@ -104,13 +104,13 @@ if ($action == 'add' && ! $_POST["cancel"])
|
||||
|
||||
if (! GETPOST('label'))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv('Label')),'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors');
|
||||
$action='create';
|
||||
$error++;
|
||||
}
|
||||
if (! GETPOST('bank'))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv('BankName')),'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankName")), null, 'errors');
|
||||
$action='create';
|
||||
$error++;
|
||||
}
|
||||
|
||||
@@ -242,19 +242,19 @@ if (empty($reshook))
|
||||
|
||||
if (! GETPOST('name'))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdPartyName")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdPartyName")), null, 'errors');
|
||||
$error++;
|
||||
$action='create';
|
||||
}
|
||||
if (GETPOST('client') < 0)
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ProspectCustomer")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ProspectCustomer")), null, 'errors');
|
||||
$error++;
|
||||
$action='create';
|
||||
}
|
||||
if (GETPOST('fournisseur') < 0)
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Supplier")), 'errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Supplier")), null, 'errors');
|
||||
$error++;
|
||||
$action='create';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user