本文整理汇总了PHP中Notify::confirmMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP Notify::confirmMessage方法的具体用法?PHP Notify::confirmMessage怎么用?PHP Notify::confirmMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notify
的用法示例。
在下文中一共展示了Notify::confirmMessage方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Notify
$savdate = $object->date;
if (!empty($conf->global->FAC_FORCE_DATE_VALIDATION)) {
$object->date = dol_now();
$object->date_lim_reglement = $object->calculate_date_lim_reglement();
}
$numref = $object->getNextNumRef($soc);
// $object->date=$savdate;
} else {
$numref = $object->ref;
}
$text = $langs->trans('ConfirmValidateBill', $numref);
if (!empty($conf->notification->enabled)) {
require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
$notify = new Notify($db);
$text .= '<br>';
$text .= $notify->confirmMessage('BILL_VALIDATE', $object->socid, $object);
}
$formquestion = array();
$qualified_for_stock_change = 0;
if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
$qualified_for_stock_change = $object->hasProductsOrServices(2);
} else {
$qualified_for_stock_change = $object->hasProductsOrServices(1);
}
if ($object->type != Facture::TYPE_DEPOSIT && !empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change) {
$langs->load("stocks");
require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php';
$formproduct = new FormProduct($db);
$warehouse = new Entrepot($db);
$warehouse_array = $warehouse->list_array();
示例2: substr
* Confirmation de la validation
*/
if ($action == 'validate') {
// on verifie si l'objet est en numerotation provisoire
$ref = substr($object->ref, 1, 4);
if ($ref == 'PROV') {
$numref = $object->getNextNumRef($soc);
} else {
$numref = $object->ref;
}
$text = $langs->trans('ConfirmValidateOrder', $numref);
if ($conf->notification->enabled) {
require_once DOL_DOCUMENT_ROOT . "/core/class/notify.class.php";
$notify = new Notify($db);
$text .= '<br>';
$text .= $notify->confirmMessage('NOTIFY_VAL_ORDER', $object->socid);
}
$formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', '', 0, 1);
}
/*
* Confirmation de la cloture
*/
if ($action == 'close') {
$formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_close', '', 0, 1);
}
/*
* Confirmation de l'annulation
*/
if ($action == 'cancel') {
$formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Cancel'), $langs->trans('ConfirmCancelOrder'), 'confirm_cancel', '', 0, 1);
}
示例3: substr
/*
* Confirmation de la validation
*/
if ($action == 'valid') {
$objectref = substr($object->ref, 1, 4);
if ($objectref == 'PROV') {
$numref = $object->getNextNumRef($soc);
} else {
$numref = $object->ref;
}
$text = $langs->trans("ConfirmValidateSending", $numref);
if (!empty($conf->notification->enabled)) {
require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
$notify = new Notify($db);
$text .= '<br>';
$text .= $notify->confirmMessage('SHIPPING_VALIDATE', $object->socid, $object);
}
print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('ValidateSending'), $text, 'confirm_valid', '', 0, 1);
}
/*
* Confirmation de l'annulation
*/
if ($action == 'annuler') {
print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('CancelSending'), $langs->trans("ConfirmCancelSending", $object->ref), 'confirm_cancel', '', 0, 1);
}
// Calculate true totalWeight and totalVolume for all products
// by adding weight and volume of each product line.
$totalWeight = '';
$totalVolume = '';
$weightUnit = 0;
$volumeUnit = 0;
示例4: substr
* Confirmation de la validation
*/
if ($action == 'validate') {
// on verifie si l'objet est en numerotation provisoire
$ref = substr($object->ref, 1, 4);
if ($ref == 'PROV') {
$numref = $object->getNextNumRef($soc);
} else {
$numref = $object->ref;
}
$text = $langs->trans('ConfirmValidateOrder', $numref);
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_VALIDATE', $object->socid);
}
$qualified_for_stock_change = 0;
if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
$qualified_for_stock_change = $object->hasProductsOrServices(2);
} else {
$qualified_for_stock_change = $object->hasProductsOrServices(1);
}
$formquestion = array();
if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) {
$langs->load("stocks");
require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
$formproduct = new FormProduct($db);
$formquestion = array(array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse') ? GETPOST('idwarehouse') : 'ifone', 'idwarehouse', '', 1)));
}
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 220);
示例5: Notify
* Confirmation de la validation
*/
if ($action == 'valid') {
$object->date_commande = dol_now();
// We check if number is temporary number
if (preg_match('/^[\\(]?PROV/i', $object->ref)) {
$newref = $object->getNextNumRef($object->thirdparty);
} else {
$newref = $object->ref;
}
$text = $langs->trans('ConfirmValidateOrder', $newref);
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_APPROVE', $object->socid);
}
print $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_valid', '', 0, 1);
}
/*
* Confirmation de l'approbation
*/
if ($action == 'approve') {
$qualified_for_stock_change = 0;
if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
$qualified_for_stock_change = $object->hasProductsOrServices(2);
} else {
$qualified_for_stock_change = $object->hasProductsOrServices(1);
}
$formquestion = array();
if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) && $qualified_for_stock_change) {
示例6: gmmktime
* Confirmation de la validation
*/
if ($action == 'valid') {
$object->date_commande = gmmktime();
// We check if number is temporary number
if (preg_match('/^[\\(]?PROV/i', $object->ref)) {
$newref = $object->getNextNumRef($soc);
} else {
$newref = $object->ref;
}
$text = $langs->trans('ConfirmValidateOrder', $newref);
if ($conf->notification->enabled) {
require_once DOL_DOCUMENT_ROOT . "/core/class/notify.class.php";
$notify = new Notify($db);
$text .= '<br>';
$text .= $notify->confirmMessage(3, $object->socid);
}
$ret = $html->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('ValidateOrder'), $text, 'confirm_valid', '', 0, 1);
if ($ret == 'html') {
print '<br>';
}
}
/*
* Confirmation de l'approbation
*/
if ($action == 'approve') {
$ret = $html->form_confirm("fiche.php?id={$object->id}", $langs->trans("ApproveThisOrder"), $langs->trans("ConfirmApproveThisOrder", $object->ref), "confirm_approve", '', 1, 1);
if ($ret == 'html') {
print '<br>';
}
}
示例7: substr
$ref = substr($object->ref, 1, 4);
if ($ref == 'PROV') {
$numref = $object->getNextNumRef($soc);
if (empty($numref)) {
$error++;
dol_htmloutput_errors($object->error);
}
} else {
$numref = $object->ref;
}
$text = $langs->trans('ConfirmValidateProp', $numref);
if (!empty($conf->notification->enabled)) {
require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
$notify = new Notify($db);
$text .= '<br>';
$text .= $notify->confirmMessage('PROPAL_VALIDATE', $object->socid);
}
if (!$error) {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1);
}
}
}
}
}
}
if (!$formconfirm) {
$parameters = array('lineid' => $lineid);
$formconfirm = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action);
// Note that $action and $object may have been modified
// by
// hook
示例8: Notify
if ($ref == 'PROV')
{
$numref = $object->getNextNumRef($soc);
}
else
{
$numref = $object->ref;
}
$text=$langs->trans('ConfirmValidateProp',$numref);
if ($conf->notification->enabled)
{
require_once(DOL_DOCUMENT_ROOT ."/core/class/notify.class.php");
$notify=new Notify($db);
$text.='<br>';
$text.=$notify->confirmMessage('NOTIFY_VAL_PROPAL',$object->socid);
}
$formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate','',0,1);
}
// Hook for external modules
if (empty($formconfirm) && ! empty($object->hooks))
{
foreach($object->hooks as $hook)
{
if (! empty($hook['modules']))
{
foreach($hook['modules'] as $module)
{
if (empty($formconfirm) && method_exists($module,'formconfirm'))
示例9: substr
$ref = substr($object->ref, 1, 4);
if ($ref == 'PROV') {
$numref = $object->getNextNumRef($soc);
if (empty($numref)) {
$error++;
setEventMessage($object->error, 'errors');
}
} else {
$numref = $object->ref;
}
$text = $langs->trans('ConfirmValidateAsk', $numref);
if (!empty($conf->notification->enabled)) {
require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
$notify = new Notify($db);
$text .= '<br>';
$text .= $notify->confirmMessage('ASKPRICESUPPLIER_VALIDATE', $object->socid, $object);
}
if (!$error) {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateAsk'), $text, 'confirm_validate', '', 0, 1);
}
}
}
}
}
}
if (!$formconfirm) {
$parameters = array('lineid' => $lineid);
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action);
// Note that $action and $object may have been modified by hook
if (empty($reshook)) {
$formconfirm .= $hookmanager->resPrint;
示例10: Notify
if ($ref == 'PROV') {
$numref = $object->getNextNumRef($soc);
if (empty($numref)) {
$error ++;
setEventMessages($object->error, $object->errors, 'errors');
}
} else {
$numref = $object->ref;
}
$text = $langs->trans('ConfirmValidateAsk', $numref);
if (! empty($conf->notification->enabled)) {
require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
$notify = new Notify($db);
$text .= '<br>';
$text .= $notify->confirmMessage('SUPPLIER_PROPOSAL_VALIDATE', $object->socid, $object);
}
if (! $error)
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateAsk'), $text, 'confirm_validate', '', 0, 1);
}
if (! $formconfirm) {
$parameters = array('lineid' => $lineid);
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) $formconfirm.=$hookmanager->resPrint;
elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint;
}
// Print form confirm
print $formconfirm;