xieruidong 2 年之前
父节点
当前提交
3ed5915b32
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      application/common/model/Orders.php

+ 5 - 0
application/common/model/Orders.php

@@ -231,6 +231,11 @@ class Orders extends Model
             $orders['amount_discount']=bcAddAll($orders['amount_coupon']??0,$orders['amount_coupon_kill']);
             #过期时间
             $orders['continue_expire_time']=time()+self::EXP_PAY;
+            #添加发票
+            UserTax::create([
+                'user_id'=>$orders['user_id'],
+                'tax'=>$orders['tax']
+            ]);
         });
         self::beforeUpdate(function (self $order){
             $data=$order->getChangedData();