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
f71c5067
Commit
f71c5067
authored
Dec 24, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
计算2
parent
c36ecda9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
Finance.php
application/index/controller/Finance.php
+0
-1
OPartialCommission.php
application/model/OPartialCommission.php
+13
-4
No files found.
application/index/controller/Finance.php
View file @
f71c5067
...
...
@@ -1425,7 +1425,6 @@ class Finance extends Basic
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$where
[
'e.status'
]
=
[
'in'
,
'10,11,13'
];
$operation_start_data
=
$operation_end_data
=
$income_date
=
$operation_date
=
''
;
/**收佣日期 start**/
...
...
application/model/OPartialCommission.php
View file @
f71c5067
...
...
@@ -218,7 +218,7 @@ class OPartialCommission extends BaseModel
public
function
getCommissionTotalList
(
$pageNo
=
1
,
$pageSize
=
15
,
$field
=
''
,
$params
=
''
,
$operation_start_data
,
$operation_end_data
)
{
$agent_id
=
$this
->
alias
(
'a'
)
->
field
(
'a.agent_id,d.name,d.store_id,d.district_id'
)
->
field
(
'a.agent_id,d.name,d.store_id,d.district_id
,e.status
'
)
->
join
(
'o_real_income b'
,
'a.real_income_id = b.id'
,
'left'
)
->
join
(
'o_taxes c'
,
'a.agent_id = c.agent_id'
,
'left'
)
->
join
(
'a_agents d'
,
'a.agent_id = d.id'
,
'left'
)
...
...
@@ -237,9 +237,18 @@ class OPartialCommission extends BaseModel
$m_tax
=
new
OTaxes
();
$result
=
[];
foreach
(
$agent_id
as
$k
=>
$v
)
{
$partial_where
[
'a.agent_id'
]
=
$v
[
'agent_id'
];
$partial_where
[
'c.income_time'
]
=
$taxes_where
[
'a.operation_date'
]
=
[
'between'
,
[
$operation_start_data
,
$operation_end_data
]];
$result
[
$k
]
=
$this
->
getSumMoney
(
$field
,
$partial_where
);
if
(
in_array
(
$v
[
'status'
],
[
10
,
11
,
13
]))
{
$partial_where
[
'a.agent_id'
]
=
$v
[
'agent_id'
];
$partial_where
[
'c.income_time'
]
=
$taxes_where
[
'a.operation_date'
]
=
[
'between'
,
[
$operation_start_data
,
$operation_end_data
]];
$result
[
$k
]
=
$this
->
getSumMoney
(
$field
,
$partial_where
);
}
else
{
$result
[
$k
][
'practical_fee'
]
=
0
;
$result
[
$k
][
'real_fee'
]
=
0
;
$result
[
$k
][
'service_charge'
]
=
0
;
$result
[
$k
][
'charity_fund'
]
=
0
;
}
$taxes_where
[
'a.agent_id'
]
=
$v
[
'agent_id'
];
$result
[
$k
][
'fee'
]
=
$m_tax
->
sumBargainFee
(
'a.fee'
,
$taxes_where
);
...
...
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