Merge pull request #25849 from solution-libre/feat-add-ORDER_SUPPLIER_SUBMIT-notif
NEW add order supplier submit notif
This commit is contained in:
commit
773f68ab4f
3 changed files with 20 additions and 2 deletions
|
|
@ -77,6 +77,7 @@ class Notify
|
|||
'FICHINTER_ADD_CONTACT',
|
||||
'ORDER_SUPPLIER_VALIDATE',
|
||||
'ORDER_SUPPLIER_APPROVE',
|
||||
'ORDER_SUPPLIER_SUBMIT',
|
||||
'ORDER_SUPPLIER_REFUSE',
|
||||
'SHIPPING_VALIDATE',
|
||||
'EXPENSE_REPORT_VALIDATE',
|
||||
|
|
@ -561,6 +562,14 @@ class Notify
|
|||
$mesg .= $outputlangs->transnoentitiesnoconv("EMailTextOrderApprovedBy", $link, $user->getFullName($outputlangs));
|
||||
$mesg .= "\n\n".$outputlangs->transnoentitiesnoconv("Sincerely").".\n\n";
|
||||
break;
|
||||
case 'ORDER_SUPPLIER_SUBMIT':
|
||||
$link = '<a href="'.$urlwithroot.'/fourn/commande/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
|
||||
$dir_output = $conf->fournisseur->commande->dir_output;
|
||||
$object_type = 'order_supplier';
|
||||
$mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n";
|
||||
$mesg .= $outputlangs->transnoentitiesnoconv("EMailTextSupplierOrderSubmittedBy", $link, $user->getFullName($outputlangs));
|
||||
$mesg .= "\n\n".$outputlangs->transnoentitiesnoconv("Sincerely").".\n\n";
|
||||
break;
|
||||
case 'ORDER_SUPPLIER_REFUSE':
|
||||
$link = '<a href="'.$urlwithroot.'/fourn/commande/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
|
||||
$dir_output = $conf->fournisseur->commande->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object);
|
||||
|
|
@ -829,12 +838,12 @@ class Notify
|
|||
$mesg .= $langs->transnoentitiesnoconv("EMailTextOrderApprovedBy", $link, $user->getFullName($langs));
|
||||
$mesg .= "\n\n".$langs->transnoentitiesnoconv("Sincerely").".\n\n";
|
||||
break;
|
||||
case 'ORDER_SUPPLIER_APPROVE2':
|
||||
case 'ORDER_SUPPLIER_SUBMIT':
|
||||
$link = '<a href="'.$urlwithroot.'/fourn/commande/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
|
||||
$dir_output = $conf->fournisseur->commande->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object);
|
||||
$object_type = 'order_supplier';
|
||||
$mesg = $langs->transnoentitiesnoconv("Hello").",\n\n";
|
||||
$mesg .= $langs->transnoentitiesnoconv("EMailTextOrderApprovedBy", $link, $user->getFullName($langs));
|
||||
$mesg .= $langs->transnoentitiesnoconv("EMailTextSupplierOrderSubmittedBy", $link, $user->getFullName($langs));
|
||||
$mesg .= "\n\n".$langs->transnoentitiesnoconv("Sincerely").".\n\n";
|
||||
break;
|
||||
case 'ORDER_SUPPLIER_REFUSE':
|
||||
|
|
|
|||
|
|
@ -2011,6 +2011,12 @@ if ($action == 'create') {
|
|||
// Confirmation de l'envoi de la commande
|
||||
if ($action == 'commande') {
|
||||
$date_com = dol_mktime(GETPOST('rehour'), GETPOST('remin'), GETPOST('resec'), GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear"));
|
||||
if (!empty($conf->notification->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
|
||||
$notify = new Notify($db);
|
||||
$text .= '<br>';
|
||||
$text .= $notify->confirmMessage('ORDER_SUPPLIER_SUBMIT', $object->socid, $object);
|
||||
}
|
||||
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id."&datecommande=".$date_com."&methode=".GETPOST("methodecommande")."&comment=".urlencode(GETPOST("comment")), $langs->trans("MakeOrder"), $langs->trans("ConfirmMakeOrder", dol_print_date($date_com, 'day')), "confirm_commande", '', 0, 2);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ Notify_ORDER_CLOSE=Sales order delivered
|
|||
Notify_ORDER_SUPPLIER_SENTBYMAIL=Purchase order sent by email
|
||||
Notify_ORDER_SUPPLIER_VALIDATE=Purchase order recorded
|
||||
Notify_ORDER_SUPPLIER_APPROVE=Purchase order approved
|
||||
Notify_ORDER_SUPPLIER_SUBMIT=Purchase order submitted
|
||||
Notify_ORDER_SUPPLIER_REFUSE=Purchase order refused
|
||||
Notify_PROPAL_VALIDATE=Customer proposal validated
|
||||
Notify_PROPAL_CLOSE_SIGNED=Customer proposal closed signed
|
||||
|
|
@ -210,6 +211,8 @@ EMailTextOrderClose=Order %s has been delivered.
|
|||
EMailTextOrderApproved=Order %s has been approved.
|
||||
EMailTextOrderValidatedBy=Order %s has been recorded by %s.
|
||||
EMailTextOrderApprovedBy=Order %s has been approved by %s.
|
||||
EMailTextSupplierOrderSubmit=Order %s has been submitted.
|
||||
EMailTextSupplierOrderSubmitBy=Order %s has been submitted by %s.
|
||||
EMailTextOrderRefused=Order %s has been refused.
|
||||
EMailTextOrderRefusedBy=Order %s has been refused by %s.
|
||||
EMailTextExpeditionValidated=Shipping %s has been validated.
|
||||
|
|
|
|||
Loading…
Reference in a new issue