Commit 1f3f2570 by 朱继来

调整明细

parent 80b7d537
...@@ -338,7 +338,7 @@ function getOrderPurPrice($xls_sn) ...@@ -338,7 +338,7 @@ function getOrderPurPrice($xls_sn)
} }
// 获取售后单信息 // 获取售后单信息
function getOrderServiceNum($order_id, $goods_id, $status=1, $field='adjust_number') function getOrderServiceNum($order_id, $erp_rec_id, $status=1, $field='adjust_number')
{ {
$OrderServiceModel = new OrderServiceModel; $OrderServiceModel = new OrderServiceModel;
$OrderServiceItemsModel = new OrderServiceItemsModel; $OrderServiceItemsModel = new OrderServiceItemsModel;
...@@ -347,7 +347,7 @@ function getOrderServiceNum($order_id, $goods_id, $status=1, $field='adjust_numb ...@@ -347,7 +347,7 @@ function getOrderServiceNum($order_id, $goods_id, $status=1, $field='adjust_numb
->leftJoin('lie_order_service_items as i', 's.id', '=', 'i.service_id') ->leftJoin('lie_order_service_items as i', 's.id', '=', 'i.service_id')
->where('s.service_status', '>', $status) ->where('s.service_status', '>', $status)
->where('i.order_id', $order_id) ->where('i.order_id', $order_id)
->where('i.goods_id', $goods_id) ->where('i.erp_rec_id', $erp_rec_id)
->sum('i.'.$field); ->sum('i.'.$field);
} }
......
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
<?php <?php
if ($order_info['order_goods_type'] == 1) { if ($order_info['order_goods_type'] == 1) {
$service_number = App\Http\Controllers\getOrderServiceNum($v['order_id'], $v['goods_id'], 2); $service_number = App\Http\Controllers\getOrderServiceNum($v['order_id'], $v['erp_rec_id'], 2);
// $service_price = App\Http\Controllers\getOrderServiceNum($v['order_id'], $v['goods_id'], 2, 'adjust_price'); // $service_price = App\Http\Controllers\getOrderServiceNum($v['order_id'], $v['goods_id'], 2, 'adjust_price');
echo '<td>'.$service_number.'</td><td>'.($v['goods_number'] - $service_number).'</td>'; echo '<td>'.$service_number.'</td><td>'.($v['goods_number'] - $service_number).'</td>';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment