Clean and update code
This commit is contained in:
parent
0c0c9269d5
commit
7d5464cfbc
@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('banks', 'categories', 'compta', 'bills'));
|
$langs->loadLangs(array('banks', 'categories', 'compta', 'bills', 'other'));
|
||||||
if (! empty($conf->adherent->enabled)) $langs->load("members");
|
if (! empty($conf->adherent->enabled)) $langs->load("members");
|
||||||
if (! empty($conf->don->enabled)) $langs->load("donations");
|
if (! empty($conf->don->enabled)) $langs->load("donations");
|
||||||
if (! empty($conf->loan->enabled)) $langs->load("loan");
|
if (! empty($conf->loan->enabled)) $langs->load("loan");
|
||||||
|
|||||||
@ -703,7 +703,7 @@ if ($massaction == 'confirm_createbills')
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans('BillCreated', $nb_bills_created));
|
setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs');
|
||||||
|
|
||||||
// Make a redirect to avoid to bill twice if we make a refresh or back
|
// Make a redirect to avoid to bill twice if we make a refresh or back
|
||||||
$param='';
|
$param='';
|
||||||
|
|||||||
@ -1201,7 +1201,7 @@ function activateModulesRequiredByCountry($country_code)
|
|||||||
{
|
{
|
||||||
activateModule($modName);
|
activateModule($modName);
|
||||||
|
|
||||||
setEventMessage($objMod->automatic_activation[$country_code],'warnings');
|
setEventMessages($objMod->automatic_activation[$country_code], null, 'warnings');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -152,9 +152,12 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||||||
}
|
}
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
|
||||||
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, '', '', 0, -1);
|
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, '', '', 0, -1);
|
||||||
if ($mailfile->error) {
|
if ($mailfile->error)
|
||||||
setEventMessage($mailfile->error, 'errors');
|
{
|
||||||
} else {
|
setEventMessages($mailfile->error, $mailfile->errors, 'errors');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$result = $mailfile->sendfile();
|
$result = $mailfile->sendfile();
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->TICKET_DISABLE_MAIL_AUTOCOPY_TO)) {
|
if (!empty($conf->global->TICKET_DISABLE_MAIL_AUTOCOPY_TO)) {
|
||||||
|
|||||||
@ -276,7 +276,7 @@ if (empty($reshook))
|
|||||||
// We try to set an amount
|
// We try to set an amount
|
||||||
// Case we dont use the list of available qty for each warehouse/lot
|
// Case we dont use the list of available qty for each warehouse/lot
|
||||||
// GUI does not allow this yet
|
// GUI does not allow this yet
|
||||||
setEventMessage('StockIsRequiredToChooseWhichLotToUse', 'errors');
|
setEventMessages($langs->trans("StockIsRequiredToChooseWhichLotToUse"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user