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
9f3c88bc
Commit
9f3c88bc
authored
Dec 28, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除收款 查询退款
parent
7986e4f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
Finance.php
application/index/controller/Finance.php
+5
-0
ORefundModel.php
application/model/ORefundModel.php
+15
-0
No files found.
application/index/controller/Finance.php
View file @
9f3c88bc
...
...
@@ -3557,6 +3557,11 @@ class Finance extends Basic
return
$this
->
response
(
$code
,
'存在调整,不能删除'
);
}
$m_refund
=
new
ORefundModel
();
$refund_id
=
$m_refund
->
getFind
(
'id'
,
[
'pay_log_id'
=>
$this
->
params
[
'pay_id'
]]);
if
(
$refund_id
>
0
)
{
return
$this
->
response
(
$code
,
'存在退款,不能删除'
);
}
$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'
]]);
...
...
application/model/ORefundModel.php
View file @
9f3c88bc
...
...
@@ -301,4 +301,18 @@ class ORefundModel extends Model{
->
where
(
$where
)
->
sum
(
$field
);
}
/**
* @param $field
* @param $where
* @return array|false|\PDOStatement|string|Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getFind
(
$field
,
$where
)
{
return
$this
->
db_
->
field
(
$field
)
->
where
(
$where
)
->
find
();
}
}
\ No newline at end of file
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