本文整理汇总了PHP中Commande::setStatut方法的典型用法代码示例。如果您正苦于以下问题:PHP Commande::setStatut方法的具体用法?PHP Commande::setStatut怎么用?PHP Commande::setStatut使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Commande
的用法示例。
在下文中一共展示了Commande::setStatut方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ShippableOrder
* Actions
*/
$action = $_REQUEST['action'];
switch ($action) {
case 'createShipping':
if (!empty($_REQUEST['subCreateShip'])) {
$TIDCommandes = $_REQUEST['TIDCommandes'];
$TEnt_comm = $_REQUEST['TEnt_comm'];
$order = new ShippableOrder($db);
$order->createShipping($TIDCommandes, $TEnt_comm);
}
if (!empty($_REQUEST['subSetSent'])) {
$TIDCommandes = $_REQUEST['TIDCommandes'];
$order = new Commande($db);
foreach ($TIDCommandes as $idCommande) {
$order->setStatut(2, $idCommande, 'commande');
}
}
break;
case 'remove_file':
$file = GETPOST('file');
if (!empty($file)) {
$file = DOL_DATA_ROOT . '/shippableorder/' . $file;
$ret = dol_delete_file($file, 0, 0, 0);
if ($ret) {
setEventMessage($langs->trans("FileWasRemoved", GETPOST('file')));
} else {
setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), 'errors');
}
}
break;
示例2: while
$sql .= ")";
if ($db->query($sql)) {
$db->commit();
} else {
$db->rollback();
}
}
while ($ii < $nn) {
include_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php';
$objectsrc = new Commande($db);
dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines");
$result = $objectsrc->fetch($orders_id[$ii]);
if ($result > 0) {
if ($closeOrders) {
$objectsrc->classifyBilled();
$objectsrc->setStatut(3);
}
$lines = $objectsrc->lines;
if (empty($lines) && method_exists($objectsrc, 'fetch_lines')) {
$objectsrc->fetch_lines();
$lines = $objectsrc->lines;
}
$fk_parent_line = 0;
$num = count($lines);
for ($i = 0; $i < $num; $i++) {
$desc = $lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle;
if ($lines[$i]->subprice < 0) {
// Negative line, we create a discount line
$discount = new DiscountAbsolute($db);
$discount->fk_soc = $object->socid;
$discount->amount_ht = abs($lines[$i]->total_ht);
示例3: while
$sql .= ", '" . $object->element . "'";
$sql .= ")";
if ($db->query($sql)) {
$db->commit();
} else {
$db->rollback();
}
}
while ($ii < $nn) {
dol_include_once('/commande/class/commande.class.php');
$srcobject = new Commande($db);
dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines");
$result = $srcobject->fetch($orders_id[$ii]);
if ($result > 0) {
$srcobject->classer_facturee();
$srcobject->setStatut(3);
$lines = $srcobject->lines;
if (empty($lines) && method_exists($srcobject, 'fetch_lines')) {
$lines = $srcobject->fetch_lines();
}
$fk_parent_line = 0;
$num = count($lines);
for ($i = 0; $i < $num; $i++) {
$desc = $lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle;
if ($lines[$i]->subprice < 0) {
// Negative line, we create a discount line
$discount = new DiscountAbsolute($db);
$discount->fk_soc = $object->socid;
$discount->amount_ht = abs($lines[$i]->total_ht);
$discount->amount_tva = abs($lines[$i]->total_tva);
$discount->amount_ttc = abs($lines[$i]->total_ttc);