本文整理汇总了PHP中get_delivery_sn函数的典型用法代码示例。如果您正苦于以下问题:PHP get_delivery_sn函数的具体用法?PHP get_delivery_sn怎么用?PHP get_delivery_sn使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_delivery_sn函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if (empty($value['product_id'])) {
$sql = "SELECT goods_number FROM " . $GLOBALS['ecs']->table('goods') . " WHERE goods_id = '" . $value['goods_id'] . "' LIMIT 0,1";
} else {
$sql = "SELECT product_number\n FROM " . $GLOBALS['ecs']->table('products') . "\n WHERE goods_id = '" . $value['goods_id'] . "'\n AND product_id = '" . $value['product_id'] . "'\n LIMIT 0,1";
}
$num = $GLOBALS['db']->GetOne($sql);
if ($num < $goods_no_package[$_key] && $_CFG['use_storage'] == '1' && $_CFG['stock_dec_time'] == SDT_SHIP) {
/* 操作失败 */
$links[] = array('text' => $_LANG['order_info'], 'href' => 'order.php?act=info&order_id=' . $order_id);
sys_msg(sprintf($_LANG['act_good_vacancy'], $value['goods_name']), 1, $links);
}
}
}
/* 生成发货单 */
/* 获取发货单号和流水号 */
$delivery['delivery_sn'] = get_delivery_sn();
$delivery_sn = $delivery['delivery_sn'];
/* 获取当前操作员 */
$delivery['action_user'] = $_SESSION['admin_name'];
/* 获取发货单生成时间 */
$delivery['update_time'] = GMTIME_UTC;
$delivery_time = $delivery['update_time'];
$sql = "select add_time from " . $GLOBALS['ecs']->table('order_info') . " WHERE order_sn = '" . $delivery['order_sn'] . "'";
$delivery['add_time'] = $GLOBALS['db']->GetOne($sql);
/* 获取发货单所属供应商 */
$delivery['suppliers_id'] = $suppliers_id;
/* 设置默认值 */
$delivery['status'] = 2;
// 正常
$delivery['order_id'] = $order_id;
/* 过滤字段项 */
示例2: quick_delivery
//.........这里部分代码省略.........
$delivery['address'] = trim($order['address']);
$delivery['country'] = intval(trim($order['country']));
$delivery['province'] = intval(trim($order['province']));
$delivery['city'] = intval(trim($order['city']));
$delivery['district'] = intval(trim($order['district']));
$delivery['sign_building'] = trim($order['sign_building']);
$delivery['email'] = trim($order['email']);
$delivery['zipcode'] = trim($order['zipcode']);
$delivery['tel'] = trim($order['tel']);
$delivery['mobile'] = trim($order['mobile']);
$delivery['best_time'] = trim($order['best_time']);
$delivery['postscript'] = trim($order['postscript']);
$delivery['how_oos'] = trim($order['how_oos']);
$delivery['insure_fee'] = floatval(trim($order['insure_fee']));
$delivery['shipping_fee'] = floatval(trim($order['shipping_fee']));
$delivery['agency_id'] = intval(trim($order['agency_id']));
$delivery['shipping_name'] = trim($order['shipping_name']);
/* 查询订单信息 */
$order = order_info($order_id);
/* 检查能否操作 */
$operable_list = operable_list($order);
/* 初始化提示信息 */
$msg = '';
/* 定义当前时间 */
/* 取得订单商品 */
$_goods = get_order_goods(array('order_id' => $order_id, 'order_sn' => $delivery['order_sn']));
$goods_list = $_goods['goods_list'];
/* 检查此单发货商品库存缺货情况 */
/* $goods_list已经过处理 超值礼包中商品库存已取得 */
$virtual_goods = array();
$package_virtual_goods = array();
/* 生成发货单 */
/* 获取发货单号和流水号 */
$delivery['delivery_sn'] = get_delivery_sn();
$delivery_sn = $delivery['delivery_sn'];
/* 获取当前操作员 */
$delivery['action_user'] = $_SESSION['supplier_name'];
/* 获取发货单生成时间 */
define('GMTIME_UTC', gmtime());
$delivery['update_time'] = GMTIME_UTC;
$delivery_time = $delivery['update_time'];
$sql = "select add_time from " . $GLOBALS['ecs']->table('order_info') . " WHERE order_sn = '" . $delivery['order_sn'] . "'";
$delivery['add_time'] = $GLOBALS['db']->GetOne($sql);
/* 获取发货单所属供应商 */
$delivery['suppliers_id'] = $suppliers_id;
/* 设置默认值 */
$delivery['status'] = 2;
// 正常
$delivery['order_id'] = $order_id;
/* 过滤字段项 */
$filter_fileds = array('order_sn', 'add_time', 'user_id', 'how_oos', 'shipping_id', 'shipping_fee', 'consignee', 'address', 'country', 'province', 'city', 'district', 'sign_building', 'email', 'zipcode', 'tel', 'mobile', 'best_time', 'postscript', 'insure_fee', 'agency_id', 'delivery_sn', 'action_user', 'update_time', 'suppliers_id', 'status', 'order_id', 'shipping_name');
$_delivery = array();
foreach ($filter_fileds as $value) {
$_delivery[$value] = $delivery[$value];
}
/* 发货单入库 */
$query = $db->autoExecute($ecs->table('delivery_order'), $_delivery, 'INSERT', '', 'SILENT');
$delivery_id = $db->insert_id();
if ($delivery_id) {
$delivery_goods = array();
//发货单商品入库
if (!empty($goods_list)) {
foreach ($goods_list as $value) {
// 商品(实货)(虚货)
if (empty($value['extension_code']) || $value['extension_code'] == 'virtual_card') {
$delivery_goods = array('delivery_id' => $delivery_id, 'goods_id' => $value['goods_id'], 'product_id' => $value['product_id'], 'product_sn' => $value['product_sn'], 'goods_id' => $value['goods_id'], 'goods_name' => $value['goods_name'], 'brand_name' => $value['brand_name'], 'goods_sn' => $value['goods_sn'], 'send_number' => $value['goods_number'], 'parent_id' => 0, 'is_real' => $value['is_real'], 'goods_attr' => $value['goods_attr']);