本文整理汇总了PHP中CommandeFournisseur::setStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP CommandeFournisseur::setStatus方法的具体用法?PHP CommandeFournisseur::setStatus怎么用?PHP CommandeFournisseur::setStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommandeFournisseur
的用法示例。
在下文中一共展示了CommandeFournisseur::setStatus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
} else {
if ($object->statut == 6) {
$newstatus = 2;
} else {
if ($object->statut == 7) {
$newstatus = 3;
} else {
if ($object->statut == 9) {
$newstatus = 1;
}
}
}
}
}
// Refused->Validated
$result = $object->setStatus($user, $newstatus);
if ($result > 0) {
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
exit;
} else {
setEventMessage($object->error, 'errors');
}
}
} else {
if ($action == 'addline' && $user->rights->fournisseur->commande->creer) {
$langs->load('errors');
$error = 0;
// Set if we used free entry or predefined product
$predef = '';
$product_desc = GETPOST('dp_desc') ? GETPOST('dp_desc') : '';
if (GETPOST('prod_entry_mode') == 'free') {
示例2: Header
$newstatus = 4;
}
// Received->Received partially
if ($order->statut == 6) {
$newstatus = 2;
}
// Canceled->Approved
if ($order->statut == 7) {
$newstatus = 3;
}
// Canceled->Process running
if ($order->statut == 9) {
$newstatus = 1;
}
// Refused->Validated
$result = $order->setStatus($user, $newstatus);
if ($result > 0) {
Header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $_REQUEST['id']);
exit;
} else {
$mesg = '<div class="error">' . $order->error . '</div>';
}
}
}
/*
* Add a line into product
*/
if ($action == 'addline' && $user->rights->fournisseur->commande->creer) {
if (($_POST['qty'] || $_POST['pqty']) && ($_POST['pu'] && ($_POST['np_desc'] || $_POST['dp_desc']) || $_POST['idprodfournprice'])) {
$ret = $object->fetch($id);
if ($ret < 0) {