mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
NEW contract signed status update (#30779)
* Moved signed status constants to array dictionary * Added getLibSignedStatus & getSignedStatusLocalisedArray methods * Updated fetch & create methods for signed_status * Added signed status to status badge * Updated signed_status module builder field * Added object context signed status for action trigger * Added signed status to contract list * Fixed signed status for contract list * Added sign, unsign, confirm_sign, confirm_unsign actions. Added sign button. * Fixed old contract without signed status * Added contract modify notification * Added contract signed status update * Updated EN localizations * Fixed contract notification administration * Fixed notification message * Fixed contract status badge * Fixed langs * Fixed langs key * Fixed duplicate localization
This commit is contained in:
@@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_50_modNotification_Notification.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('admin', 'other', 'orders', 'propal', 'bills', 'errors', 'mails'));
|
||||
$langs->loadLangs(array('admin', 'other', 'orders', 'propal', 'bills', 'errors', 'mails', 'contracts'));
|
||||
|
||||
// Security check
|
||||
if (!$user->admin) {
|
||||
@@ -295,6 +295,8 @@ foreach ($listofnotifiedevents as $notifiedevent) {
|
||||
$elementLabel = $langs->trans('Shipping');
|
||||
} elseif ($notifiedevent['elementtype'] == 'expensereport' || $notifiedevent['elementtype'] == 'expense_report') {
|
||||
$elementLabel = $langs->trans('ExpenseReport');
|
||||
} elseif ($notifiedevent['elementtype'] == 'contrat') {
|
||||
$elementLabel = $langs->trans('Contract');
|
||||
}
|
||||
|
||||
if ($notifiedevent['elementtype'] == 'propal') {
|
||||
@@ -315,6 +317,8 @@ foreach ($listofnotifiedevents as $notifiedevent) {
|
||||
$model = 'invoice_supplier_send';
|
||||
} elseif ($notifiedevent['elementtype'] == 'member') {
|
||||
$model = 'member';
|
||||
} elseif ($notifiedevent['elementtype'] == 'contrat') {
|
||||
$model = 'contract_send';
|
||||
}
|
||||
|
||||
$constantes[$notifiedevent['code'].'_TEMPLATE'] = array('type'=>'emailtemplate:'.$model, 'label'=>$label);
|
||||
@@ -435,11 +439,14 @@ foreach ($listofnotifiedevents as $notifiedevent) {
|
||||
} elseif ($notifiedevent['elementtype'] == 'expensereport' || $notifiedevent['elementtype'] == 'expense_report') {
|
||||
$elementPicto = 'expensereport';
|
||||
$elementLabel = $langs->trans('ExpenseReport');
|
||||
} elseif ($notifiedevent['elementtype'] == 'contrat') {
|
||||
$elementPicto = 'contract';
|
||||
$elementLabel = $langs->trans('Contract');
|
||||
} elseif ($notifiedevent['elementtype'] == 'agenda') {
|
||||
$elementPicto = 'action';
|
||||
}
|
||||
|
||||
$labelfortrigger = 'AmountHT';
|
||||
$labelfortrigger = 'AmountHT';
|
||||
$codehasnotrigger = 0;
|
||||
if (preg_match('/^(ACTION|HOLIDAY)/', $notifiedevent['code'])) {
|
||||
$codehasnotrigger++;
|
||||
|
||||
Reference in New Issue
Block a user