chenqp 8 месяцев назад
Родитель
Сommit
ed7b5803b7
2 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      app/Service/PaymentReceiptService.php
  2. 2 2
      app/Service/ProductService.php

+ 1 - 1
app/Service/PaymentReceiptService.php

@@ -207,7 +207,7 @@ class PaymentReceiptService extends Service
         $booking = PaymentReceipt::where('del_time',0)->where('id',$data['id'])->first();
         if(empty($booking)) return [false,'收付款单不存在或已被删除'];
         $booking = $booking->toArray();
-        if($booking['state'] != PaymentReceipt::STATE_ZERO) return [false,'请确认收付款单状态,删除失败'];
+        if($booking['state'] > PaymentReceipt::STATE_ZERO) return [false,'请确认收付款单状态,删除失败'];
 
         try {
             DB::beginTransaction();

+ 2 - 2
app/Service/ProductService.php

@@ -953,8 +953,8 @@ class ProductService extends Service
                 ->select('product_id','basic_type_id','price')
                 ->get()->toArray();
             foreach ($detail as $value){
-                if(! isset($detail_map[$value['product_id']])){
-                    $detail_map[$value['product_id']][] = $value;
+                if(! isset($detail_map[$value['product_id']][$value['basic_type_id']])){
+                    $detail_map[$value['product_id']][$value['basic_type_id']] = $value;
                 }
             }
         }else{