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
939b4f0e
Commit
939b4f0e
authored
May 31, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改获取最后一次分佣比例用到新增税费开票
parent
7a9443c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
OPartialCommission.php
application/model/OPartialCommission.php
+4
-2
No files found.
application/model/OPartialCommission.php
View file @
939b4f0e
...
...
@@ -197,8 +197,9 @@ class OPartialCommission extends BaseModel
* @throws \think\exception\PDOException
*/
public
function
getBragainScale
(
int
$bargain_id
)
{
$sql
=
'SELECT scale,agent_id,role,substring_index(group_concat(id ORDER BY id DESC),",",1) as id
FROM o_partial_commission WHERE bargain_id = '
.
$bargain_id
.
' GROUP BY role'
;
$sql
=
'SELECT a.scale,a.agent_id,a.role,substring_index(group_concat(a.id ORDER BY a.id DESC),",",1) AS id
FROM o_partial_commission a LEFT JOIN o_bargain b on a.bargain_id=b.id WHERE a.bargain_id = '
.
$bargain_id
.
'
and b.id= '
.
$bargain_id
.
' OR b.father_id='
.
$bargain_id
.
' GROUP BY role'
;
return
$this
->
query
(
$sql
);
}
}
\ 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