Commit eb7c3a43 authored by hujun's avatar hujun

del

parent 562faea4
......@@ -3232,8 +3232,8 @@ class Finance extends Basic
$pay_log_id = $m_pay_adjustment->getAdjustmentList('paylog_id', ['paylog_id'=>$pay_adjustment[0]['paylog_id']]);
if (count($pay_log_id) > 1) {
return $this->response($code, '存在多次调整,不能删除');
if (count($pay_log_id)) {
return $this->response($code, '存在调整,不能删除');
}
$num = $m_pay_adjustment->editData(['is_del'=>1], $this->params['id']);
......@@ -3370,6 +3370,9 @@ class Finance extends Basic
* 删除收款
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function delPayLog() {
$code = 101;
......@@ -3385,9 +3388,9 @@ class Finance extends Basic
}
$m_pay_adjustment = new OPayLogAdjustment();
$adjustment_num = $m_pay_adjustment->getAdjustmentList('id', ['paylog_id'=>$this->params['pay_id']]);
if (count($adjustment_num) > 1) {
return $this->response($code, '存在多次调整,不能删除');
$adjustment_num = $m_pay_adjustment->getAdjustmentList('id', ['new_paylog_id'=>$this->params['pay_id']]);
if (count($adjustment_num)) {
return $this->response($code, '存在调整,不能删除');
}
$num = $m_pay->updatePayLog(['is_del'=>1, 'id'=>$this->params['pay_id']]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment