dever пре 3 година
родитељ
комит
1a4f3db3fb
2 измењених фајлова са 14 додато и 8 уклоњено
  1. 3 1
      app/cash/lib/Set.php
  2. 11 7
      app/mshop/lib/Buy.php

+ 3 - 1
app/cash/lib/Set.php

@@ -248,8 +248,10 @@ class Set
                 $cdate = date('Y-m-d H:i', $v['cdate']);
                 $fdate = $v['fdate'] ? date('Y-m-d H:i', $v['fdate']) : '';
                 $operdate = $v['operdate'] ? date('Y-m-d H:i', $v['operdate']) : '';
+                $noprice = 2;
                 if ($type == 'store') {
                     $cash = $v['num'];
+                    $noprice = 1;
                 } elseif ($type == 'factory') {
                     $cash = '¥' . round($v['p_cash'], 2);
                 } else {
@@ -257,7 +259,7 @@ class Set
                 }
 
                 if ($show == 1) {
-                    $url = Dever::url('project/database/list?project=shop&table=buy_order_goods&order_id='.$v['source_order_id'].'&page_type=1&type=' . $search_option_type, 'manage');
+                    $url = Dever::url('project/database/list?project=shop&table=buy_order_goods&order_id='.$v['source_order_id'].'&page_type=1&noprice=' . $noprice, 'manage');
                     $v['source_order_num'] = '<a href="'.$url.'" style="color:blue">'.$v['source_order_num'].'</a>';
 
                     $head = array('结算单号', '订货单号', '结算类型', '下单日期', '完成日期', '结算日期', '对账金额', '结算状态');

+ 11 - 7
app/mshop/lib/Buy.php

@@ -554,6 +554,11 @@ class Buy
         $type = 1;
         $type = Dever::input('type', $type);
 
+        $noprice = Dever::input('noprice', 2);
+        if ($type == 3) {
+            $noprice = 1;
+        }
+
         $cash_type = Dever::input('cash', 1);
 
         $config = Dever::db('shop/buy_order')->config;
@@ -689,7 +694,7 @@ class Buy
                 'content' => $config['phone'],
                 'name' => '联系平台',
             );
-        } elseif ($type == 3) {
+        } elseif ($noprice == 1) {
             $config = Dever::load('factory/admin/auth.config');
 
             $button[] = array
@@ -790,7 +795,7 @@ class Buy
             }
 
             $info['ps_info']['order_num'] = str_replace("\r\n", ',', $info['ps_info']['order_num']);
-            if ($type == 3) {
+            if ($noprice == 1) {
                 $result['物流信息'] = array
                 (
                     'type' => 'info',
@@ -933,7 +938,7 @@ class Buy
 
             if ($tk && $v['status'] == 3 && $tk['status'] != 3) {
                 $d['status'] = $tk_status[$tk['status']];
-                if ($type == 3) {
+                if ($noprice == 1) {
                     unset($d['price']);
                 }
                 $refund_body[] = $d;
@@ -941,7 +946,7 @@ class Buy
                 $refund_body_total['price'] += $price;
                 $refund_body_total['num'] += $v['num'];
             } else {
-                if ($type == 3) {
+                if ($noprice == 1) {
                     unset($d['price']);
                 }
                 $body[] = $d;
@@ -960,7 +965,7 @@ class Buy
                 $body_total['set_num'] = $body_total['num'] - $refund_body_total['num'];
             }
 
-            if ($type == 3) {
+            if ($noprice == 1) {
                 unset($body_total['price']);
                 unset($body_total['set_price']);
             }
@@ -975,7 +980,7 @@ class Buy
 
         if ($refund_body) {
 
-            if ($type == 3) {
+            if ($noprice == 1) {
                 unset($refund_body_total['price']);
             }
 
@@ -991,7 +996,6 @@ class Buy
         if ($cash_type == 1) {
             if ($search_option_type == 1) {
                 # 门店结算单
-                echo 11;die;
                 $cash_order = Dever::db('cash/order')->select(array('type' => $info['type'], 'type_id' => $info['type_id'], 'source_order_id' => $info['id']));
 
                 $col = 'cash';