small fix

This commit is contained in:
Marion Muszynski 2016-09-15 15:37:44 +02:00
parent 6304de6703
commit 3f2345c222

View File

@ -517,33 +517,33 @@ class AdminOrders extends AdminTab
} else {
$partial = false;
}
}
if(!$partial) {
global $cookie;
Db::getInstance()->ExecuteS('
INSERT INTO `'._DB_PREFIX_.'order_history`
VALUES (
DEFAULT,
'.(int) $cookie->id_employee.',
'.(int) $order->id.',
'.Configuration::get('PS_OS_SHIPPING').',
NOW()
)
');
Db::getInstance()->ExecuteS('
INSERT INTO `'._DB_PREFIX_.'order_state_current`
VALUES (
'.(int) $order->id.',
'.Configuration::get('PS_OS_SHIPPING').',
NOW()
)
ON DUPLICATE KEY UPDATE
`id_order_state` = '.Configuration::get('PS_OS_SHIPPING').',
`date_upd` = NOW()
');
$newOS = new OrderState((int)(Configuration::get('PS_OS_SHIPPING')), $order->id_lang);
Module::hookExec('updateOrderStatus', array('newOrderStatus' => $newOS, 'id_order' => (int)($order->id)));
if(!$partial) {
global $cookie;
Db::getInstance()->ExecuteS('
INSERT INTO `'._DB_PREFIX_.'order_history`
VALUES (
DEFAULT,
'.(int) $cookie->id_employee.',
'.(int) $order->id.',
'.Configuration::get('PS_OS_SHIPPING').',
NOW()
)
');
Db::getInstance()->ExecuteS('
INSERT INTO `'._DB_PREFIX_.'order_state_current`
VALUES (
'.(int) $order->id.',
'.Configuration::get('PS_OS_SHIPPING').',
NOW()
)
ON DUPLICATE KEY UPDATE
`id_order_state` = '.Configuration::get('PS_OS_SHIPPING').',
`date_upd` = NOW()
');
$newOS = new OrderState((int)(Configuration::get('PS_OS_SHIPPING')), $order->id_lang);
Module::hookExec('updateOrderStatus', array('newOrderStatus' => $newOS, 'id_order' => (int)($order->id)));
}
}
}
}