wugg 6 ماه پیش
والد
کامیت
f9c9871ea6
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      app/cxinv/model/PayInvoice.php

+ 3 - 0
app/cxinv/model/PayInvoice.php

@@ -39,6 +39,9 @@ class PayInvoice extends Base
        ];
     protected $createTime='addtime';
     protected $updateTime='updatetime';
+    public function Items(){
+        return $this->hasMany(InvoiceItem::class,'invoiceCode','hpNo');
+    }
     public static function  onAfterInsert(Model $model) : void{
         if ($model->invType==4){
             $ticket= InvoiceInfo::where("payNo",$model->payNo)->findOrEmpty();