提交 5fbb59fd authored 作者: chengye's avatar chengye

调整作废单据之后删除缴费单与账单关联关系的逻辑

上级 492a2c4f
......@@ -75,24 +75,16 @@ class Payment
$payment->save();
//删除payment_invoice表
$invoices = (new EmPaymentInvoice())->where('payment_id', '=', $payment->payment_id)->select();
//释放账单状态
if(!$invoices->isEmpty()) {
$invObj = new Invoice();
foreach ($invoices as $inv) {
$invObj->statusBack($inv->invoice_id,$payment->payment_id);
}
}
Log::record(date('Y-m-d H:i:s').' OA单号:'.$numb. '缴费单已作废');
$invoices = (new EmPaymentInvoice())->where('payment_id', '=', $paymentFk->payment_id)->delete();
$message = ' 缴费单: '.$paymentFk->payment_id. '缴费单已作废';
Log::record(date('Y-m-d H:i:s').$message);
return json(
[
'code' => 201,
'message' => json_encode($payment->toArray()),
'data' => ''
]);
[
'code' => 201,
'message' => $message,
'data' => ''
]);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论