Clean code and add context information for onlineSign
This commit is contained in:
parent
dff93b30cd
commit
7238575a6d
@ -2642,10 +2642,10 @@ class Propal extends CommonObject
|
||||
if ($resql) {
|
||||
// Status self::STATUS_REFUSED by default
|
||||
$modelpdf = !empty($conf->global->PROPALE_ADDON_PDF_ODT_CLOSED) ? $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED : $this->model_pdf;
|
||||
$trigger_name = 'PROPAL_CLOSE_REFUSED';
|
||||
$trigger_name = 'PROPAL_CLOSE_REFUSED'; // used later in call_trigger()
|
||||
|
||||
if ($status == self::STATUS_SIGNED) { // Status self::STATUS_SIGNED
|
||||
$trigger_name = 'PROPAL_CLOSE_SIGNED';
|
||||
$trigger_name = 'PROPAL_CLOSE_SIGNED'; // used later in call_trigger()
|
||||
$modelpdf = !empty($conf->global->PROPALE_ADDON_PDF_ODT_TOBILL) ? $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL : $this->model_pdf;
|
||||
|
||||
// The connected company is classified as a client
|
||||
|
||||
@ -214,6 +214,7 @@ if ($action == "importSignature") {
|
||||
//customer is not a user !?! so could we use same user as validation ?
|
||||
$user = new User($db);
|
||||
$user->fetch($object->user_valid_id);
|
||||
$object->context = array('closedfromonlinesignature' => 'closedfromonlinesignature');
|
||||
$result = $object->call_trigger('PROPAL_CLOSE_SIGNED', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
|
||||
@ -374,7 +374,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
// require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
|
||||
// $notify = new Notify($db);
|
||||
// $formquestion = array_merge($formquestion, array(
|
||||
// array('type' => 'onecolumn', 'value' => $notify->confirmMessage('PROPAL_CLOSE_SIGNED', $object->socid, $object)),
|
||||
// array('type' => 'onecolumn', 'value' => $notify->confirmMessage('PARTNERSHIP_CLOSE_DENY', $object->socid, $object)),
|
||||
// ));
|
||||
// }
|
||||
|
||||
|
||||
@ -183,6 +183,7 @@ if ($action == 'confirm_refusepropal' && $confirm == 'yes') {
|
||||
// Online customer is not a user, so we use the use that validates the documents
|
||||
$user = new User($db);
|
||||
$user->fetch($object->user_valid_id);
|
||||
$object->context = array('closedfromonlinesignature' => 'closedfromonlinesignature');
|
||||
$result = $object->call_trigger('PROPAL_CLOSE_REFUSED', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
|
||||
@ -291,7 +291,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
|
||||
$notify = new Notify($db);
|
||||
$formquestion = array_merge($formquestion, array(
|
||||
array('type' => 'onecolumn', 'value' => $notify->confirmMessage('PROPAL_CLOSE_SIGNED', $object->socid, $object)),
|
||||
array('type' => 'onecolumn', 'value' => $notify->confirmMessage('RECRUITMENTJOBPOSITION_CLOSE_SIGNED', $object->socid, $object)),
|
||||
));
|
||||
}*/
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user