提交 681f110c authored 作者: chengye's avatar chengye

test

上级 9fe53816
......@@ -66,9 +66,10 @@ class Payment
//作废单据
private function dropNumb($numb,$status)
{
$paymentFk = (new EmPaymentFk())->get(['oafk_numb' => $numb]);
$paymentFk = (new EmPaymentFk())->get(['oafk_numb' => $numb,'status'=>1]);
$payment = (new EmPayment())->get(['payment_id' => $paymentFk->payment_id]);
$paymentFk->delete();
$paymentFk->status = 0;
$paymentFk->save();
$payment->status = 9;
$payment->save();
......
......@@ -62,9 +62,5 @@ class Project extends Controller
'message' => 'SUCCESS',
'data' => $datalist,
]);
}
}
\ No newline at end of file
......@@ -549,7 +549,7 @@ class Payment extends Base
$fkModel->payment_id = $payment->payment_id;
$fkModel->oafk_id = $receipt['data']['id'];
$fkModel->oafk_numb = $receipt['data']['numb'];
$fkModel->status = 1;
Db::startTrans();
try{
$payment->save();
......@@ -608,7 +608,7 @@ class Payment extends Base
}
public function checkFkStatus($payment_id){
$res = (new EmPaymentFk())->get(['payment_id'=>$payment_id]);
$res = (new EmPaymentFk())->get(['payment_id'=>$payment_id,'status'=>1]);
return $res ? true : false;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论