更新报销模块
This commit is contained in:
parent
d706fafaaa
commit
9d6d42f5c9
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -40,7 +40,7 @@ class ExpenseReimbursement extends BaseModel
|
|||||||
public function detail()
|
public function detail()
|
||||||
{
|
{
|
||||||
return $this->hasMany(\app\common\model\expense\ExpenseReimbursementDetail::class, 'expense_id', 'id');
|
return $this->hasMany(\app\common\model\expense\ExpenseReimbursementDetail::class, 'expense_id', 'id');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 关联invoice
|
* @notes 关联invoice
|
||||||
@ -51,6 +51,11 @@ class ExpenseReimbursement extends BaseModel
|
|||||||
public function invoice()
|
public function invoice()
|
||||||
{
|
{
|
||||||
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');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user