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
ae4f7f04
Commit
ae4f7f04
authored
May 24, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改财务-成交报告返回值
parent
f38b4140
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
13 deletions
+11
-13
Finance.php
application/index/controller/Finance.php
+9
-9
OBargainModel.php
application/model/OBargainModel.php
+1
-1
OTaxes.php
application/model/OTaxes.php
+1
-3
No files found.
application/index/controller/Finance.php
View file @
ae4f7f04
...
...
@@ -128,7 +128,7 @@ class Finance extends Basic
$bargain
=
new
OBargainModel
();
$data
[
'data'
][
'list'
]
=
$bargain
->
getBargain
(
$pageNo
,
$pageSize
,
$order
,
$fields
,
$where
);
$data
[
'data'
][
'total'
]
=
$bargain
->
getBargainTotal
(
$where
);
$data
[
'data'
][
'step'
]
=
$this
->
params
[
'check_status'
];
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
...
...
@@ -613,7 +613,7 @@ class Finance extends Basic
}
$m_fee
=
new
OTaxes
();
$field
=
'a.id,a.total_fee,a.operation_date'
;
$data
=
$m_fee
->
getBargainFeeDetail
(
$this
->
params
[
'bargain_id'
],
1
,
$field
);
$data
=
$m_fee
->
getBargainFeeDetail
(
$this
->
params
[
'bargain_id'
],
$field
);
return
$this
->
response
(
"200"
,
"request success"
,
$data
);
}
...
...
@@ -753,7 +753,7 @@ class Finance extends Basic
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$fields
=
'a.id,a.agent_id,sum(b.fee) as fee,sum(c.practical_fee) as practical_fee,sum(c.cash) as cash,'
;
$fields
.=
'sum(c.service_charge) as service_charge,sum(
c.tallage) as tallag
e,sum(c.real_fee) as real_fee,'
;
$fields
.=
'sum(c.service_charge) as service_charge,sum(
b.fee) as fe
e,sum(c.real_fee) as real_fee,'
;
$fields
.=
'd.name,d.phone'
;
$where
[
'c.is_del'
]
=
0
;
//订单状态
...
...
@@ -803,12 +803,12 @@ class Finance extends Basic
}
if
(
isset
(
$where_fee
[
'operation_date'
]))
{
$m_fee
=
new
OTaxes
();
$where_fee
[
'type'
]
=
1
;
$bargain_id
=
$m_fee
->
getFeeListColumn
(
'bargain_id'
,
$where_fee
);
if
(
!
empty
(
$bargain_id
))
{
$whereOr
[
'a.id'
]
=
implode
(
','
,
$bargain_id
);
}
//
$m_fee = new OTaxes();
//
$where_fee['type'] = 1;
//
$bargain_id = $m_fee->getFeeListColumn('bargain_id', $where_fee);
//
if (!empty($bargain_id)) {
//
$whereOr['a.id'] = implode(',',$bargain_id);
//
}
}
/**开票日期 end**/
...
...
application/model/OBargainModel.php
View file @
ae4f7f04
...
...
@@ -636,7 +636,7 @@ class OBargainModel extends Model
$data
[
$k
][
'district_store'
]
=
$district_store
[
'district_name'
]
.
'-'
.
$district_store
[
'store_name'
];
}
$data
[
$k
][
'tax_fee'
]
=
$m_fee
->
where
(
[
'bargain_id'
=>
$v
[
'id'
],
'type'
=>
1
])
->
sum
(
'fee'
);
$data
[
$k
][
'tax_fee'
]
=
$m_fee
->
where
(
'bargain_id'
,
$v
[
'id'
])
->
sum
(
'fee'
);
}
return
$data
;
...
...
application/model/OTaxes.php
View file @
ae4f7f04
...
...
@@ -73,19 +73,17 @@ class OTaxes extends BaseModel
* 根据成交报告-实收佣金 或 税费开票 查询详情
*
* @param int $bargain_id
* @param int $type
* @param string $field
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getBargainFeeDetail
(
int
$bargain_id
,
int
$type
=
0
,
string
$field
)
{
public
function
getBargainFeeDetail
(
int
$bargain_id
,
string
$field
)
{
$data
=
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'o_bargain b'
,
'a.bargain_id = b.id'
,
'left'
)
->
where
(
'bargain_id'
,
$bargain_id
)
->
where
(
'type'
,
$type
)
->
where
(
'a.father_id'
,
0
)
->
select
();
...
...
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