wugg 2 years ago
parent
commit
2362717475
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/admin/controller/Sale.php

+ 3 - 0
app/admin/controller/Sale.php

@@ -786,6 +786,9 @@ class Sale extends Base
             }
             $send_num = array_sum(array_column($va,"receipt_quantity"));
         }
+        if($good_num<$send_num){
+            return error_show(1002, "发货数量不能超过购买数量");
+        }
         $arrtime=isset($this->post['arrtime'])&&$this->post['arrtime']!="" ?$this->post['arrtime']:"";
         if($arrtime==""){
             return error_show(1002, "参数arrtime不能为空");