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
b85e197c
Commit
b85e197c
authored
Jan 12, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
331ae142
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
Finance.php
application/index/controller/Finance.php
+18
-14
No files found.
application/index/controller/Finance.php
View file @
b85e197c
...
@@ -3400,29 +3400,36 @@ class Finance extends Basic
...
@@ -3400,29 +3400,36 @@ class Finance extends Basic
}
}
$m_pay_adjustment
=
new
OPayLogAdjustment
();
$m_pay_adjustment
=
new
OPayLogAdjustment
();
$where
=
[
$where_adjustment
=
[
'is_del'
=>
0
,
'id'
=>
$this
->
params
[
'id'
],
'id'
=>
$this
->
params
[
'id'
],
];
];
$pay_adjustment
=
$m_pay_adjustment
->
getAdjustmentList
(
'paylog_id,new_paylog_id'
,
$where
);
$pay_adjustment
=
$m_pay_adjustment
->
getAdjustmentList
(
'paylog_id,new_paylog_id'
,
$where
_adjustment
);
if
(
empty
(
$pay_adjustment
[
0
][
'paylog_id'
]))
{
if
(
empty
(
$pay_adjustment
[
0
][
'paylog_id'
]))
{
return
$this
->
response
(
$code
,
'无调整信息'
);
return
$this
->
response
(
$code
,
'无调整信息'
);
}
}
$where
=
[
//查找调整前的 paylog_id
[
'EXP'
,
"new_paylog_id =
{
$pay_adjustment
[
0
][
'paylog_id'
]
}
OR paylog_id ="
.
$pay_adjustment
[
0
][
'paylog_id'
]],
$where
[
'is_del'
]
=
0
;
];
$where
[]
=
[
'EXP'
,
"new_paylog_id =
{
$pay_adjustment
[
0
][
'paylog_id'
]
}
OR paylog_id ="
.
$pay_adjustment
[
0
][
'paylog_id'
]
];
$pay_log_id
=
$m_pay_adjustment
->
getFieldColumn
(
'paylog_id'
,
$where
);
$pay_log_id
=
$m_pay_adjustment
->
getFieldColumn
(
'paylog_id'
,
$where
);
if
(
count
(
$pay_log_id
)
>
1
)
{
if
(
count
(
$pay_log_id
)
>
1
)
{
return
$this
->
response
(
$code
,
'存在调整,不能删除.'
);
return
$this
->
response
(
$code
,
'存在调整,不能删除.'
);
}
}
$pay_log_id
=
$m_pay_adjustment
->
getFieldColumn
(
'paylog_id'
,
[
'in'
,
$pay_log_id
]);
//查找调整前前的 paylog_id
$pay_log_id
=
$m_pay_adjustment
->
getFieldColumn
(
'paylog_id'
,
[
'paylog_id'
=>
[
'in'
,
$pay_log_id
]]);
if
(
count
(
$pay_log_id
)
>
1
)
{
if
(
count
(
$pay_log_id
)
>
1
)
{
return
$this
->
response
(
$code
,
'存在调整,不能删除.'
);
return
$this
->
response
(
$code
,
'存在调整,不能删除.'
);
}
}
$m_refund
=
new
ORefundModel
();
$refund_id
=
$m_refund
->
getFind
(
'id'
,
[
'pay_log_id'
=>
[
'in'
,[
$pay_adjustment
[
0
][
'paylog_id'
],
$pay_log_id
]]]);
if
(
$refund_id
>
0
)
{
return
$this
->
response
(
$code
,
'入账存在退款,不能删除'
);
}
$num
=
$m_pay_adjustment
->
updatePayLogAdjustment
([
'is_del'
=>
1
,
'id'
=>
$this
->
params
[
'id'
]]);
$num
=
$m_pay_adjustment
->
updatePayLogAdjustment
([
'is_del'
=>
1
,
'id'
=>
$this
->
params
[
'id'
]]);
if
(
$num
>
0
)
{
if
(
$num
>
0
)
{
...
@@ -3615,13 +3622,11 @@ class Finance extends Basic
...
@@ -3615,13 +3622,11 @@ class Finance extends Basic
}
}
$m_pay_adjustment
=
new
OPayLogAdjustment
();
$m_pay_adjustment
=
new
OPayLogAdjustment
();
$adjustment_id
=
$m_pay_adjustment
->
getAdjustmentList
(
'id,paylog_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
,
'存在调整,不能删除'
);
}
$pay_log_id
=
$m_pay_adjustment
->
getAdjustmentList
(
'id'
,
[
'paylog_id'
=>
$adjustment_id
[
0
][
'paylog_id'
]]);
$where
[
'is_del'
]
=
0
;
if
(
count
(
$pay_log_id
)
>
1
)
{
$where
[]
=
[
'EXP'
,
"paylog_id =
{
$this
->
params
[
'pay_id'
]
}
OR new_paylog_id = "
.
$this
->
params
[
'pay_id'
]];
$adjustment_id
=
$m_pay_adjustment
->
getAdjustmentList
(
'id,paylog_id'
,
$where
);
if
(
count
(
$adjustment_id
)
>
0
)
{
return
$this
->
response
(
$code
,
'存在调整,不能删除'
);
return
$this
->
response
(
$code
,
'存在调整,不能删除'
);
}
}
...
@@ -3632,7 +3637,6 @@ class Finance extends Basic
...
@@ -3632,7 +3637,6 @@ class Finance extends Basic
}
}
$num
=
$m_pay
->
updatePayLog
([
'is_del'
=>
1
,
'id'
=>
$this
->
params
[
'pay_id'
]]);
$num
=
$m_pay
->
updatePayLog
([
'is_del'
=>
1
,
'id'
=>
$this
->
params
[
'pay_id'
]]);
if
(
$num
>
0
)
{
if
(
$num
>
0
)
{
$m_pay_adjustment
->
updatePayLogAdjustment
([
'id'
=>
$adjustment_id
[
0
][
'id'
],
'is_del'
=>
1
]);
$code
=
200
;
$code
=
200
;
}
else
{
}
else
{
$code
=
101
;
$code
=
101
;
...
...
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