绑定付款记录
This commit is contained in:
@@ -54,6 +54,8 @@ class FinReceiptService
|
||||
|
||||
// 没有付款记录的收款记录
|
||||
if (isset($p['payment_apply']) && $p['payment_apply'] == 'not') {
|
||||
$config['where']['payment_apply_id'] = ['null'];
|
||||
} elseif (isset($p['payment_apply']) && $p['payment_apply'] == 'already') {
|
||||
$config['where']['payment_apply_id'] = ['not null'];
|
||||
}
|
||||
|
||||
@@ -110,7 +112,8 @@ class FinReceiptService
|
||||
public function beforeServiceUpdate($data, Request $request)
|
||||
{
|
||||
$data['updated_by'] = $request->user->uid;
|
||||
$data['arrived_at'] = strtotime($data['arrived_at']);
|
||||
if(isset($data['arrived_at']))
|
||||
$data['arrived_at'] = strtotime($data['arrived_at']);
|
||||
if(isset($data['received_at']))
|
||||
$data['received_at'] = strtotime($data['received_at']);
|
||||
|
||||
@@ -118,8 +121,8 @@ class FinReceiptService
|
||||
}
|
||||
public function afterServiceUpdate($res)
|
||||
{
|
||||
$receipt = FinReceipt::where('id',$res->id)->first()->toArray();
|
||||
$receipt = array_merge($receipt,['receipt_id' => $res->id]);
|
||||
$receipt = FinReceipt::where('id',$res['id'])->first()->toArray();
|
||||
$receipt = array_merge($receipt,['receipt_id' => $res['id']]);
|
||||
unset($receipt['id']);
|
||||
FinReceiptHis::create($receipt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user