• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_delivery_sn函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;
 /* 过滤字段项 */
开发者ID:norain2050,项目名称:benhu,代码行数:31,代码来源:order.php


示例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']);
开发者ID:seanguo166,项目名称:yinoos,代码行数:67,代码来源:order.php



注:本文中的get_delivery_sn函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_dept_id函数代码示例发布时间:2022-05-15
下一篇:
PHP get_delete_post_link函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap