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
cbc318cf
Commit
cbc318cf
authored
Apr 12, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
财务统计
parent
f3731895
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
Finance.php
application/index/controller/Finance.php
+4
-5
ORefundModel.php
application/model/ORefundModel.php
+2
-2
No files found.
application/index/controller/Finance.php
View file @
cbc318cf
...
@@ -4223,7 +4223,6 @@ class Finance extends Basic
...
@@ -4223,7 +4223,6 @@ class Finance extends Basic
$open_agent_refund
=
$this
->
sumPayLogRefundByType
(
4
,
1
,
1
,
$income_start
,
$income_end
);
//开业中介费退款
$open_agent_refund
=
$this
->
sumPayLogRefundByType
(
4
,
1
,
1
,
$income_start
,
$income_end
);
//开业中介费退款
$open_case_refund
=
$this
->
sumPayLogRefundByType
(
5
,
1
,
1
,
$income_start
,
$income_end
);
//开业案场费退款
$open_case_refund
=
$this
->
sumPayLogRefundByType
(
5
,
1
,
1
,
$income_start
,
$income_end
);
//开业案场费退款
$data
[
'open_commission'
]
=
$open_agent_fee
+
$open_case_fee
-
$open_agent_refund
-
$open_case_refund
;
//已开业佣金
$data
[
'open_commission'
]
=
$open_agent_fee
+
$open_case_fee
-
$open_agent_refund
-
$open_case_refund
;
//已开业佣金
//佣金总计:中介费入账+案场费入账-中介费退款-案场费退款
//佣金总计:中介费入账+案场费入账-中介费退款-案场费退款
$data
[
'total_commission'
]
=
$data
[
'not_open_commission'
]
+
$data
[
'open_commission'
];
$data
[
'total_commission'
]
=
$data
[
'not_open_commission'
]
+
$data
[
'open_commission'
];
...
@@ -4293,11 +4292,11 @@ class Finance extends Basic
...
@@ -4293,11 +4292,11 @@ class Finance extends Basic
$m_pay
=
new
ORefundModel
();
$m_pay
=
new
ORefundModel
();
if
(
$is_bargain
)
{
if
(
$is_bargain
)
{
$where
[
'
b
.is_open'
]
=
$is_open
;
$where
[
'
c
.is_open'
]
=
$is_open
;
$where
[
'a.type'
]
=
$type
;
$where
[
'a.type'
]
=
$type
;
$where
[
'
b
.status'
]
=
[
'in'
,
'10,11,13'
];
$where
[
'
c
.status'
]
=
[
'in'
,
'10,11,13'
];
$where
[
'
b
.father_id'
]
=
$where
[
'a.is_del'
]
=
0
;
$where
[
'
c
.father_id'
]
=
$where
[
'a.is_del'
]
=
0
;
$where
[
'
c
.income_time'
]
=
[
'between'
,
[
$income_start
,
$income_end
]];
$where
[
'
b
.income_time'
]
=
[
'between'
,
[
$income_start
,
$income_end
]];
$price
=
$m_pay
->
sumBargainPrice
(
'a.refund_money'
,
$where
);
//未开业中介费
$price
=
$m_pay
->
sumBargainPrice
(
'a.refund_money'
,
$where
);
//未开业中介费
}
else
{
}
else
{
$where
[
'a.type'
]
=
$type
;
$where
[
'a.type'
]
=
$type
;
...
...
application/model/ORefundModel.php
View file @
cbc318cf
...
@@ -332,8 +332,8 @@ class ORefundModel extends Model{
...
@@ -332,8 +332,8 @@ class ORefundModel extends Model{
*/
*/
public
function
sumBargainPrice
(
$field
,
$where
)
{
public
function
sumBargainPrice
(
$field
,
$where
)
{
return
$this
->
db_
->
alias
(
'a'
)
return
$this
->
db_
->
alias
(
'a'
)
->
join
(
'o_
bargain b'
,
'a.order_id=b.order_id
'
)
->
join
(
'o_
paylog b'
,
'a.pay_log_id=b.id'
,
'left
'
)
->
join
(
'o_
paylog c'
,
'a.pay_log_id=c.id
'
)
->
join
(
'o_
bargain c'
,
'b.bargain_id=c.id'
,
'left
'
)
->
where
(
$where
)
->
where
(
$where
)
->
sum
(
$field
);
->
sum
(
$field
);
}
}
...
...
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