|
@@ -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();
|