shish пре 5 година
родитељ
комит
1a1f518903
1 измењених фајлова са 5 додато и 2 уклоњено
  1. 5 2
      biz-ghs/order/services/OrderService.php

+ 5 - 2
biz-ghs/order/services/OrderService.php

@@ -65,8 +65,8 @@ class OrderService extends BaseService
 
         //零售采购单时没有传price字段,供应商下单时会传,供应商价格是可以修改的,改成userPrice以便后面使用
         $currentProduct = $data['product'];
-        foreach($currentProduct as $currentKey => $currentItem){
-            if(isset($currentProduct[$currentKey]['price'])){
+        foreach ($currentProduct as $currentKey => $currentItem) {
+            if (isset($currentProduct[$currentKey]['price'])) {
                 $currentProduct[$currentKey]['userPrice'] = $currentProduct[$currentKey]['price'];
                 unset($currentProduct[$currentKey]['price']);
             }
@@ -486,6 +486,9 @@ class OrderService extends BaseService
         $event = '开单';
         if ($isPurchase) {
             $event = '客户采购';
+            if (isset($custom->name) && !empty($custom->name)) {
+                $event = $custom->name . '采购';
+            }
         }
         $capital = [
             'capitalType' => $capitalType,