diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 74287b1bd0b..395d4950e2f 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -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 = ''.$newref.''; + $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 = ''.$newref.''; $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 = ''.$newref.''; $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': diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index fca9363df25..890c9c21f9e 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -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 .= '
'; + $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); } diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index e3927bd7a72..bb1b54a250b 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -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.