更新报销模块

This commit is contained in:
yaooo 2023-12-19 11:36:34 +08:00
parent d706fafaaa
commit 9d6d42f5c9
2 changed files with 12 additions and 3 deletions

View File

@ -182,6 +182,10 @@ class ExpenseReimbursementLogic extends BaseLogic
*/ */
public static function detail($params): array public static function detail($params): array
{ {
return ExpenseReimbursement::findOrEmpty($params['id'])->toArray(); $expenseReimbursement = ExpenseReimbursement::findOrEmpty($params['id']);
$expenseReimbursement->detail;
$expenseReimbursement->invoice;
$expenseReimbursement->custom;
return $expenseReimbursement->toArray();
} }
} }

View File

@ -53,4 +53,9 @@ class ExpenseReimbursement extends BaseModel
return $this->hasMany(\app\common\model\expense\ExpenseReimbursementInvoiceDetail::class, 'expense_id', 'id'); return $this->hasMany(\app\common\model\expense\ExpenseReimbursementInvoiceDetail::class, 'expense_id', 'id');
} }
public function custom()
{
return $this->belongsTo(\app\common\model\custom\Custom::class, 'customer_id');
}
} }