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
454578fe
Commit
454578fe
authored
Jan 12, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除收款和删除调整
parent
792223d7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
Finance.php
application/index/controller/Finance.php
+8
-8
OPayLogAdjustment.php
application/model/OPayLogAdjustment.php
+1
-1
No files found.
application/index/controller/Finance.php
View file @
454578fe
...
...
@@ -3403,19 +3403,18 @@ class Finance extends Basic
$where
=
[
'id'
=>
$this
->
params
[
'id'
],
];
$pay_adjustment
=
$m_pay_adjustment
->
getAdjustmentList
(
'new_paylog_id'
,
$where
);
if
(
empty
(
$pay_adjustment
[
0
][
'new_paylog_id'
]))
{
$pay_adjustment
=
$m_pay_adjustment
->
getAdjustmentList
(
'paylog_id,new_paylog_id'
,
$where
);
if
(
empty
(
$pay_adjustment
[
0
][
'paylog_id'
]))
{
return
$this
->
response
(
$code
,
'无调整信息'
);
}
$where
=
[
'paylog_id'
=>
$pay_adjustment
[
0
][
'new_paylog_id'
],
[
'EXP'
,
"new_paylog_id =
{
$pay_adjustment
[
0
][
'paylog_id'
]
}
OR paylog_id ="
.
$pay_adjustment
[
0
][
'paylog_id'
]
],
];
$pay_log_id
=
$m_pay_adjustment
->
get
AdjustmentList
(
'paylog_id'
,
$where
);
$pay_log_id
=
$m_pay_adjustment
->
get
FieldColumn
(
'paylog_id'
,
$where
);
if
(
count
(
$pay_log_id
)
>
1
)
{
return
$this
->
response
(
$code
,
'存在调整
,不能删除
'
);
return
$this
->
response
(
$code
,
'存在调整
,不能删除.
'
);
}
$num
=
$m_pay_adjustment
->
updatePayLogAdjustment
([
'is_del'
=>
1
,
'id'
=>
$this
->
params
[
'id'
]]);
...
...
@@ -3610,8 +3609,8 @@ 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
)
{
$adjustment_
id
=
$m_pay_adjustment
->
getFieldColumn
(
'id'
,
[[
'EXP'
,
"paylog_id =
{
$this
->
params
[
'pay_id'
]
}
OR new_paylog_id = "
.
$this
->
params
[
'pay_id'
]
]]);
if
(
count
(
$adjustment_
id
)
>
1
)
{
return
$this
->
response
(
$code
,
'存在调整,不能删除'
);
}
...
...
@@ -3622,6 +3621,7 @@ class Finance extends Basic
}
$num
=
$m_pay
->
updatePayLog
([
'is_del'
=>
1
,
'id'
=>
$this
->
params
[
'pay_id'
]]);
if
(
$num
>
0
)
{
$m_pay_adjustment
->
updatePayLogAdjustment
([
'id'
=>
[
'in'
,
$adjustment_id
],
'is_del'
=>
1
]);
$code
=
200
;
}
else
{
$code
=
101
;
...
...
application/model/OPayLogAdjustment.php
View file @
454578fe
...
...
@@ -162,7 +162,7 @@ class OPayLogAdjustment extends BaseModel{
unset
(
$params
[
"id"
]);
Db
::
startTrans
();
try
{
$id
=
$this
->
db_
->
where
([
"id"
=>
$id
])
->
update
(
$params
);
$id
=
$this
->
db_
->
where
([
"id"
=>
[
'in'
,
$id
]
])
->
update
(
$params
);
Db
::
commit
();
return
$id
;
}
catch
(
\Exception
$e
)
{
...
...
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