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
270d2697
Commit
270d2697
authored
Dec 03, 2024
by
lizhilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
87aa56ee
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
14 deletions
+35
-14
app/Admin/Repositories/LawyerCommission.php
+35
-14
No files found.
app/Admin/Repositories/LawyerCommission.php
View file @
270d2697
...
@@ -30,11 +30,12 @@ public function get(Grid\Model $model)
...
@@ -30,11 +30,12 @@ public function get(Grid\Model $model)
// 获取筛选条件
// 获取筛选条件
$year
=
$model
->
filter
()
->
input
(
'year'
)
??
date
(
"Y"
);
$year
=
$model
->
filter
()
->
input
(
'year'
)
??
date
(
"Y"
);
$lnum
=
$model
->
filter
()
->
input
(
'no'
)
??
''
;
$lnum
=
$model
->
filter
()
->
input
(
'no'
)
??
''
;
$lawyer_id
=
$commission_rate
=
0
;
$lawyer_id
=
$commission_rate
=
$ticket_ratio
=
0
;
if
(
$lnum
)
{
if
(
$lnum
)
{
$larwerObj
=
ModelLawyer
::
where
(
'number'
,
$lnum
)
->
first
();
$larwerObj
=
ModelLawyer
::
where
(
'number'
,
$lnum
)
->
first
();
$lawyer_id
=
$larwerObj
->
id
;
$lawyer_id
=
$larwerObj
->
id
;
$commission_rate
=
$larwerObj
->
commission_rate
;
$commission_rate
=
$larwerObj
->
commission_rate
;
$ticket_ratio
=
$larwerObj
->
ticket_ratio
;
}
}
$data
=
[];
$data
=
[];
...
@@ -65,10 +66,13 @@ public function get(Grid\Model $model)
...
@@ -65,10 +66,13 @@ public function get(Grid\Model $model)
$tmp
[
$i
]
=
strval
(
$commission_rate
*
1
)
.
'%'
;
$tmp
[
$i
]
=
strval
(
$commission_rate
*
1
)
.
'%'
;
}
}
//可提成金额
//可提成金额
$royalty_amount
=
0
;
if
(
$val
[
'field'
]
==
'royalty_amount'
)
{
if
(
$val
[
'field'
]
==
'royalty_amount'
)
{
$tmp
[
$i
]
=
sprintf
(
'%.2f'
,
$receiveMoeny
*
(
$commission_rate
/
100
));
$royalty_amount
=
sprintf
(
'%.2f'
,
$receiveMoeny
*
(
$commission_rate
/
100
));
$tmp
[
$i
]
=
$royalty_amount
;
}
}
//已支付款项
//已支付款项
$paid_amount
=
0
;
if
(
$val
[
'field'
]
==
'paid_amount'
)
{
if
(
$val
[
'field'
]
==
'paid_amount'
)
{
$paid_amount
=
ModelLawyerCost
::
getPaidAmount
(
$lawyer_id
,
$year
,
$i
);
$paid_amount
=
ModelLawyerCost
::
getPaidAmount
(
$lawyer_id
,
$year
,
$i
);
$tmp
[
$i
]
=
sprintf
(
'%.2f'
,
$paid_amount
);
$tmp
[
$i
]
=
sprintf
(
'%.2f'
,
$paid_amount
);
...
@@ -129,7 +133,11 @@ public function get(Grid\Model $model)
...
@@ -129,7 +133,11 @@ public function get(Grid\Model $model)
$tmp
[
$i
]
=
$annuity
;
$tmp
[
$i
]
=
$annuity
;
}
}
//办公室租赁成本
if
(
$val
[
'field'
]
==
'office_rental_fee'
)
{
$office_rental_fee
=
ModelLawyerCost
::
where
(
$condition
)
->
sum
(
'office_rental_fee'
);
$tmp
[
$i
]
=
$office_rental_fee
;
}
//助理律师成本
//助理律师成本
if
(
$val
[
'field'
]
==
'assistant_fee'
)
{
if
(
$val
[
'field'
]
==
'assistant_fee'
)
{
...
@@ -137,18 +145,31 @@ public function get(Grid\Model $model)
...
@@ -137,18 +145,31 @@ public function get(Grid\Model $model)
$tmp
[
$i
]
=
$assistant_fee
;
$tmp
[
$i
]
=
$assistant_fee
;
}
}
//办公室租赁成本
if
(
$val
[
'field'
]
==
'office_rental_fee'
)
{
$office_rental_fee
=
ModelLawyerCost
::
where
(
$condition
)
->
sum
(
'office_rental_fee'
);
$tmp
[
$i
]
=
$office_rental_fee
;
}
//无票成本
//预支款
if
(
$val
[
'field'
]
==
'noticket_cost'
)
{
if
(
$val
[
'field'
]
==
'advance_fee'
)
{
$noticket_cost
=
ModelLawyerCost
::
where
(
$condition
)
->
sum
(
'noticket_cost'
);
$advance_fee
=
ModelLawyerCost
::
where
(
$condition
)
->
sum
(
'advance_fee'
);
$tmp
[
$i
]
=
$noticket_cost
;
$tmp
[
$i
]
=
$advance_fee
;
}
//预留结案费
if
(
$val
[
'field'
]
==
'reserved_closing_fee'
)
{
$reserved_closing_fee
=
$receiveMoeny
*
(
$commission_rate
/
100
)
*
0.05
;
$tmp
[
$i
]
=
sprintf
(
'%.2f'
,
$reserved_closing_fee
);
}
//贴票金额
if
(
$val
[
'field'
]
==
'posting_tickets_money'
)
{
$tickets_money
=
ModelLawyerCost
::
getPostingTicketsMoney
(
$lawyer_id
,
$year
,
$commission_rate
,
$ticket_ratio
,
$i
);
$tmp
[
$i
]
=
sprintf
(
'%.2f'
,
$tickets_money
);
}
//提成留底
if
(
$val
[
'field'
]
==
'commission_retention'
)
{
$tmp
[
$i
]
=
'4万'
;
}
//可支付提成结算金额
if
(
$val
[
'field'
]
==
'payable_commission_amount'
)
{
$payable_money
=
$royalty_amount
-
$paid_amount
;
$tmp
[
$i
]
=
$payable_money
;
}
}
//个人所得税
//个人所得税
if
(
$val
[
'field'
]
==
'personal_income_tax'
)
{
if
(
$val
[
'field'
]
==
'personal_income_tax'
)
{
$personal_income_tax
=
ModelLawyerCost
::
where
(
$condition
)
->
sum
(
'personal_income_tax'
);
$personal_income_tax
=
ModelLawyerCost
::
where
(
$condition
)
->
sum
(
'personal_income_tax'
);
...
@@ -156,7 +177,7 @@ public function get(Grid\Model $model)
...
@@ -156,7 +177,7 @@ public function get(Grid\Model $model)
}
}
//总计
//总计
if
(
$val
[
'field'
]
!=
'commission_rate'
)
{
if
(
!
in_array
(
$val
[
'field'
],
[
'commission_rate'
,
'commission_retention'
])
)
{
$tmp
[
'total'
]
+=
$tmp
[
$i
];
$tmp
[
'total'
]
+=
$tmp
[
$i
];
}
}
}
}
...
...
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