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

test

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