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
b49b5d70
Commit
b49b5d70
authored
Oct 15, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实收明细修改
parent
08d3aa22
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
6 deletions
+34
-6
Finance.php
application/index/controller/Finance.php
+34
-6
No files found.
application/index/controller/Finance.php
View file @
b49b5d70
...
@@ -701,18 +701,38 @@ class Finance extends Basic
...
@@ -701,18 +701,38 @@ class Finance extends Basic
$where
[
'a.is_del'
]
=
$select
=
0
;
$where
[
'a.is_del'
]
=
$select
=
0
;
if
(
!
empty
(
$this
->
params
[
'create_time'
])
&&
empty
(
$this
->
params
[
'end_time'
]))
{
if
(
!
empty
(
$this
->
params
[
'create_time'
])
&&
empty
(
$this
->
params
[
'end_time'
]))
{
$where
[
'f.income_time'
]
=
[
'>= time'
,
$this
->
params
[
'create_time'
]
.
' 00:00:00'
];
$income_where
[
'income_time'
]
=
[
'>= time'
,
$this
->
params
[
'create_time'
]
.
' 00:00:00'
];
$select
=
1
;
}
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
empty
(
$this
->
params
[
'create_time'
]))
{
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
empty
(
$this
->
params
[
'create_time'
]))
{
$where
[
'f.income_time'
]
=
[
'<= time'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
];
$income_where
[
'income_time'
]
=
[
'<= time'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
];
$select
=
1
;
}
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
!
empty
(
$this
->
params
[
'create_time'
]))
{
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
!
empty
(
$this
->
params
[
'create_time'
]))
{
$where
[
'f.income_time'
]
=
[
'between time'
,
[
$this
->
params
[
'create_time'
]
.
' 00:00:00'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
]
];
$income_where
[
'income_time'
]
=
[
'between time'
,
[
$this
->
params
[
'create_time'
]
.
' 00:00:00'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
]
];
$select
=
1
;
}
if
(
!
empty
(
$income_where
))
{
$m_real
=
new
ORealIncome
();
$bargain_arr
=
$m_real
->
getRealIncomeBargain
(
'bargain_id'
,
$income_where
);
if
(
$bargain_arr
[
'status'
]
==
'successful'
)
{
if
(
empty
(
$bargain_arr
[
'data'
]))
{
return
$this
->
response
(
200
,
''
);
}
foreach
(
$bargain_arr
[
'data'
]
as
$v
)
{
$bargain_id
[]
=
$v
[
'bargain_id'
];
}
if
(
!
empty
(
$bargain_id
))
{
$bargain_id_string
=
implode
(
','
,
$bargain_id
);
$where
[]
=
[
'EXP'
,
'b.id in ('
.
$bargain_id_string
.
') or b.father_id in ('
.
$bargain_id_string
.
')'
];
}
}
else
{
return
$this
->
response
(
101
,
'内部错误:'
.
$bargain_arr
[
'msg'
]);
}
}
}
if
(
!
empty
(
$this
->
params
[
'internal_address'
]))
{
if
(
!
empty
(
$this
->
params
[
'internal_address'
]))
{
...
@@ -832,6 +852,14 @@ class Finance extends Basic
...
@@ -832,6 +852,14 @@ class Finance extends Basic
$where
[]
=
[
'EXP'
,
'b.id ='
.
$this
->
params
[
'bargain_id'
]
.
' or father_id='
.
$this
->
params
[
'bargain_id'
]
];
$where
[]
=
[
'EXP'
,
'b.id ='
.
$this
->
params
[
'bargain_id'
]
.
' or father_id='
.
$this
->
params
[
'bargain_id'
]
];
}
}
if
(
!
empty
(
$this
->
params
[
'store_id'
]))
{
$where
[
'e.store_id'
]
=
$this
->
params
[
'store_id'
];
}
if
(
!
empty
(
$this
->
params
[
'district_id'
]))
{
$where
[
'e.district_id'
]
=
$this
->
params
[
'district_id'
];
}
$field
=
'a.id,a.confirm_date,a.practical_fee,b.scale_fee,d.internal_address,b.agent_id,cash,service_charge,charity_fund,real_fee,a.real_income_id,a.should_commission'
;
$field
=
'a.id,a.confirm_date,a.practical_fee,b.scale_fee,d.internal_address,b.agent_id,cash,service_charge,charity_fund,real_fee,a.real_income_id,a.should_commission'
;
$m_commission
=
new
OPartialCommission
();
$m_commission
=
new
OPartialCommission
();
...
...
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