Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lvsuo-pc
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhilin
lvsuo-pc
Commits
b1339123
Commit
b1339123
authored
Dec 06, 2024
by
lizhilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
cbd76dbf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
app/Admin/Controllers/LawyerCostCollectController.php
+1
-3
app/Admin/Controllers/LawyerCostController.php
+1
-1
app/Admin/Repositories/LawyerCost.php
+1
-1
app/Models/LawyerCost.php
+8
-6
No files found.
app/Admin/Controllers/LawyerCostCollectController.php
View file @
b1339123
...
...
@@ -19,14 +19,12 @@ class LawyerCostCollectController extends AdminController
*/
protected
function
grid
()
{
$list
=
ModelLawyerCost
::
COSTiTEM
;
return
Grid
::
make
(
new
LawyerCost
(),
function
(
Grid
$grid
)
use
(
$list
)
{
return
Grid
::
make
(
new
LawyerCost
(),
function
(
Grid
$grid
)
{
$number
=
$grid
->
model
()
->
filter
()
->
input
(
'no'
)
??
''
;
//律师编号
$nowyear
=
date
(
"Y"
);
$year
=
$grid
->
model
()
->
filter
()
->
input
(
'year'
)
??
''
;
$monthNum
=
(
$year
&&
$year
<
$nowyear
)
?
12
:
date
(
'm'
);
$grid
->
column
(
'title'
,
'项目名称'
)
->
width
(
'10%'
);
for
(
$i
=
1
;
$i
<=
$monthNum
;
$i
++
)
{
$grid
->
column
(
$i
,
$i
.
'月'
);
...
...
app/Admin/Controllers/LawyerCostController.php
View file @
b1339123
...
...
@@ -47,7 +47,7 @@ protected function grid()
return
self
::
getAnnuity
(
$this
->
number
,
$year
);
});
$grid
->
column
(
'posting_tickets_fee'
,
'贴票成本'
)
->
display
(
function
(
$val
)
use
(
$year
)
{
return
self
::
getAssistantFee
(
$this
->
number
,
$year
);
return
ModelLawyerCost
::
getPostingTicketsMoney
(
$this
->
id
,
$year
,
$this
->
commission_rate
,
$this
->
ticket_ratio
);
});
$grid
->
column
(
'assistant_fee'
,
'助理律师成本'
)
->
display
(
function
(
$val
)
use
(
$year
)
{
return
self
::
getAssistantFee
(
$this
->
number
,
$year
);
...
...
app/Admin/Repositories/LawyerCost.php
View file @
b1339123
...
...
@@ -124,7 +124,7 @@ public function get(Grid\Model $model)
//贴票成本
if
(
$val
[
'field'
]
==
'posting_tickets_fee'
)
{
$lawyerObj
=
ModelLawyer
::
where
(
'number'
,
$lnum
)
->
first
();
$tickets_money
=
ModelLawyerCost
::
getPostingTicketsMoney
(
$lawyerObj
->
lawyer_
id
,
$year
,
$lawyerObj
->
commission_rate
,
$lawyerObj
->
ticket_ratio
,
$i
);
$tickets_money
=
ModelLawyerCost
::
getPostingTicketsMoney
(
$lawyerObj
->
id
,
$year
,
$lawyerObj
->
commission_rate
,
$lawyerObj
->
ticket_ratio
,
$i
);
$tmp
[
$i
]
=
$tickets_money
;
}
...
...
app/Models/LawyerCost.php
View file @
b1339123
...
...
@@ -201,17 +201,19 @@ public static function getPostingTicketsMoney($lawyer_id, $year, $commission_rat
$commission
=
$received_money
*
(
$commission_rate
/
100
);
//提成
if
(
$commission_rate
==
80
)
{
if
(
$commission
>
300000
)
{
$ticket
=
(
$received_money
-
$paid_amount
)
*
(
$ticket_ratio
/
100
);
$ticket
=
(
$commission
-
$paid_amount
)
*
(
$ticket_ratio
/
100
);
return
$ticket
;
}
}
elseif
(
$commission_rate
==
85
)
{
if
(
$commission
>
200000
)
{
$ticket
=
(
$
received_money
-
$paid_amount
)
*
(
$ticket_ratio
/
100
);
$ticket
=
(
$
commission
-
$paid_amount
)
*
(
$ticket_ratio
/
100
);
}
}
elseif
(
$commission_rate
==
88
||
$commission_rate
==
90
)
{
if
(
$commission
>
200000
)
{
$ticket
=
(
$
received_money
-
$paid_amount
)
*
(
$ticket_ratio
/
100
);
$ticket
=
(
$
commission
-
$paid_amount
)
*
(
$ticket_ratio
/
100
);
}
}
return
$ticket
;
}
...
...
@@ -240,15 +242,15 @@ public static function getAllPostingTicketsMoney($lawyer_id, $year)
$commission
=
$received_money
*
(
$commission_rate
/
100
);
//提成
if
(
$commission_rate
==
80
)
{
if
(
$commission
>
300000
)
{
$ticket
=
(
$
received_money
-
$paid_amount
)
*
(
$ticket_ratio
/
100
);
$ticket
=
(
$
commission
-
$paid_amount
)
*
(
$ticket_ratio
/
100
);
}
}
elseif
(
$commission_rate
==
85
)
{
if
(
$commission
>
200000
)
{
$ticket
=
(
$
received_money
-
$paid_amount
)
*
(
$ticket_ratio
/
100
);
$ticket
=
(
$
commission
-
$paid_amount
)
*
(
$ticket_ratio
/
100
);
}
}
elseif
(
$commission_rate
==
88
||
$commission_rate
==
90
)
{
if
(
$commission
>
200000
)
{
$ticket
=
(
$
received_money
-
$paid_amount
)
*
(
$ticket_ratio
/
100
);
$ticket
=
(
$
commission
-
$paid_amount
)
*
(
$ticket_ratio
/
100
);
}
}
$total
+=
$ticket
;
...
...
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