Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
edd8c69a
Commit
edd8c69a
authored
Jan 11, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整删除和收款删除
parent
3f70efaf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
Finance.php
application/index/controller/Finance.php
+10
-5
OPayLogAdjustment.php
application/model/OPayLogAdjustment.php
+1
-0
No files found.
application/index/controller/Finance.php
View file @
edd8c69a
...
...
@@ -3400,13 +3400,19 @@ class Finance extends Basic
}
$m_pay_adjustment
=
new
OPayLogAdjustment
();
$pay_adjustment
=
$m_pay_adjustment
->
getAdjustmentList
(
'new_paylog_id,paylog_id'
,
[
'id'
=>
$this
->
params
[
'id'
]]);
$where
=
[
'id'
=>
$this
->
params
[
'id'
],
];
$pay_adjustment
=
$m_pay_adjustment
->
getAdjustmentList
(
'new_paylog_id'
,
$where
);
if
(
empty
(
$pay_adjustment
[
0
][
'new_paylog_id'
]))
{
return
$this
->
response
(
$code
,
'无调整信息'
);
}
$pay_log_id
=
$m_pay_adjustment
->
getAdjustmentList
(
'paylog_id'
,
[
'paylog_id'
=>
$pay_adjustment
[
0
][
'paylog_id'
]]);
$where
=
[
'paylog_id'
=>
$pay_adjustment
[
0
][
'new_paylog_id'
],
];
$pay_log_id
=
$m_pay_adjustment
->
getAdjustmentList
(
'paylog_id'
,
$where
);
if
(
count
(
$pay_log_id
))
{
return
$this
->
response
(
$code
,
'存在调整,不能删除'
);
...
...
@@ -3598,13 +3604,13 @@ class Finance extends Basic
}
$m_pay
=
new
OPayLogModel
();
$num
=
$m_pay
->
getTotal
(
'id'
,
[
'id'
=>
$this
->
params
[
'pay_id'
]]);
$num
=
$m_pay
->
getTotal
(
'id'
,
[
'id'
=>
$this
->
params
[
'pay_id'
]]
,
''
);
if
(
empty
(
$num
))
{
return
$this
->
response
(
$code
,
'无收款信息'
);
}
$m_pay_adjustment
=
new
OPayLogAdjustment
();
$adjustment_num
=
$m_pay_adjustment
->
getAdjustmentList
(
'id'
,
[
'
new_
paylog_id'
=>
$this
->
params
[
'pay_id'
]]);
$adjustment_num
=
$m_pay_adjustment
->
getAdjustmentList
(
'id'
,
[
'paylog_id'
=>
$this
->
params
[
'pay_id'
]]);
if
(
count
(
$adjustment_num
))
{
return
$this
->
response
(
$code
,
'存在调整,不能删除'
);
}
...
...
@@ -3616,7 +3622,6 @@ class Finance extends Basic
}
$num
=
$m_pay
->
updatePayLog
([
'is_del'
=>
1
,
'id'
=>
$this
->
params
[
'pay_id'
]]);
if
(
$num
>
0
)
{
$m_pay_adjustment
->
updatePayLogAdjustment
([
'is_del'
=>
1
,
'id'
=>
$adjustment_num
[
0
][
'id'
]]);
$code
=
200
;
}
else
{
$code
=
101
;
...
...
application/model/OPayLogAdjustment.php
View file @
edd8c69a
...
...
@@ -29,6 +29,7 @@ class OPayLogAdjustment extends BaseModel{
* @throws \think\exception\DbException
*/
public
function
getAdjustmentList
(
$field
,
$params
){
$params
[
'is_del'
]
=
0
;
return
$this
->
db_
->
field
(
$field
)
->
where
(
$params
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment