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
78f7c207
Commit
78f7c207
authored
Dec 05, 2024
by
lizhilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
2f291d78
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
245 additions
and
19 deletions
+245
-19
app/Admin/Controllers/LawyerCollectController.php
+23
-19
app/Admin/Repositories/LawyerCollect.php
+0
-0
app/Models/Lawyer.php
+222
-0
No files found.
app/Admin/Controllers/LawyerCollectController.php
View file @
78f7c207
...
...
@@ -25,46 +25,50 @@ class LawyerCollectController extends AdminController
protected
function
grid
()
{
return
Grid
::
make
(
new
LawyerCollect
(),
function
(
Grid
$grid
)
{
$
number
=
$grid
->
model
()
->
filter
()
->
input
(
'number'
)
??
''
;
//律师编号
$
year
=
$grid
->
model
()
->
filter
()
->
input
(
'year'
)
??
date
(
"Y"
)
;
//律师编号
$
received_at
=
$invoiced_at
=
[];
$received_at
[
'start'
]
=
$_GET
[
'received_at'
][
'start'
]
??
''
;
$received_at
[
'end'
]
=
$_GET
[
'received_at'
][
'end'
]
??
''
;
$invoiced_at
[
'start'
]
=
$_GET
[
'invoiced_at'
][
'start'
]
??
''
;
$invoiced_at
[
'end'
]
=
$_GET
[
'invoiced_at'
][
'end'
]
??
''
;
//筛选参数
$
received_at
=
$invoiced_at
=
$params
=
[];
$
params
[
'number'
]
=
$_GET
[
'number'
]
??
''
;
//律师编号
$
params
[
'year'
]
=
$_GET
[
'number'
]
??
date
(
'Y'
);
//律师编号
$received_at
[
'start'
]
=
isset
(
$_GET
[
'received_at'
][
'start'
])
&&
$_GET
[
'received_at'
][
'start'
]
?
$_GET
[
'received_at'
][
'start'
]
.
"-01"
:
''
;
$received_at
[
'end'
]
=
isset
(
$_GET
[
'received_at'
][
'end'
])
&&
$_GET
[
'received_at'
][
'end'
]
?
$_GET
[
'received_at'
][
'end'
]
.
"-31"
:
''
;
$invoiced_at
[
'start'
]
=
isset
(
$_GET
[
'invoiced_at'
][
'start'
])
&&
$_GET
[
'invoiced_at'
][
'start'
]
?
$_GET
[
'invoiced_at'
][
'start'
]
.
'-01'
:
''
;
$invoiced_at
[
'end'
]
=
isset
(
$_GET
[
'invoiced_at'
][
'end'
])
&&
$_GET
[
'invoiced_at'
][
'end'
]
?
$_GET
[
'invoiced_at'
][
'end'
]
.
'-31'
:
''
;
$lawyer_id
=
0
;
$number
=
$params
[
'number'
];
$year
=
$params
[
'year'
];
$lawyObj
=
ModelLawyer
::
where
(
'number'
,
$number
)
->
first
();
if
(
$lawyObj
)
{
$lawyer_id
=
$lawyObj
->
number
;
}
$totalInfo
=
ModelLawyer
::
getTotalInfo
(
$params
,
$received_at
,
$invoiced_at
);
//创收已收款
$received_amount
=
ModelsCovenantReceivePayment
::
getReceivedMoneyByNumber
(
$number
,
$year
,
$received_at
,
$invoiced_at
);
$received_amount
=
$totalInfo
[
'receipt_money'
];
//
ModelsCovenantReceivePayment::getReceivedMoneyByNumber($number, $year, $received_at, $invoiced_at);
//已开票
$invoiced_money
=
ModelsCovenantReceivePayment
::
getInvoicedMoneyByNumber
(
$number
,
$year
,
$received_at
,
$invoiced_at
);
$invoiced_money
=
$totalInfo
[
'invoiced_money'
];
//
ModelsCovenantReceivePayment::getInvoicedMoneyByNumber($number, $year, $received_at, $invoiced_at);
//收款未开票
$received_noinvoiced
=
(
$received_amount
-
$invoiced_money
)
>
0
?
$received_amount
-
$invoiced_money
:
0
;
//开票未收款
$invoiced_noreceived
=
(
$invoiced_money
-
$received_amount
)
>
0
?
$invoiced_money
-
$received_amount
:
0
;
//提成金额
$commissionAmount
=
ModelsCovenantReceivePayment
::
getCommissionAmount
(
$number
,
$year
,
$received_at
);
$commissionAmount
=
$totalInfo
[
'commission_amount'
];
//
ModelsCovenantReceivePayment::getCommissionAmount($number, $year, $received_at);
//成本合计
$costTotal
=
ModelLawyerCost
::
getTotalCost
(
$lawyer_id
,
$year
)
;
$costTotal
=
$totalInfo
[
'cost'
]
;
//基本工资
$basicSalary
=
ModelLawyerCost
::
getBasiSalary
(
$lawyer_id
,
$year
)
;
$basicSalary
=
$totalInfo
[
'salary'
]
;
//专项附加
$special_additional
=
ModelLawyerCost
::
getSpecialAdditional
(
$lawyer_id
,
$year
)
;
$special_additional
=
$totalInfo
[
'special_additional'
]
;
//社保
$social
=
ModelLawyerCost
::
getSocial
(
$lawyer_id
,
$year
)
;
$social
=
$totalInfo
[
'social'
]
;
//公积金
$accumulation_fund
=
ModelLawyerCost
::
getAccumulationFund
(
$lawyer_id
,
$year
)
;
$accumulation_fund
=
$totalInfo
[
'accumulation_fund'
]
;
//贴票金额
$posting_tickets
=
ModelLawyerCost
::
getAllPostingTicketsMoney
(
$lawyer_id
,
$year
)
;
$posting_tickets
=
$totalInfo
[
'tickets_money'
]
;
//预支款
$advance_fee
=
ModelLawyerCost
::
getAdvanceFee
(
$lawyer_id
,
$year
)
;
$advance_fee
=
$totalInfo
[
'advance_fee'
]
;
//可结算提成
$payable_amount
=
ModelLawyerCost
::
getAllPayableAmount
(
$lawyer_id
,
$year
)
;
$payable_amount
=
$totalInfo
[
'payable_commission'
]
;
// 添加一行表头数据
$grid
->
header
(
function
()
use
(
$received_amount
,
$commissionAmount
,
$received_noinvoiced
,
$invoiced_noreceived
,
$costTotal
,
$basicSalary
,
$special_additional
,
$social
,
$accumulation_fund
,
$posting_tickets
,
$advance_fee
,
$payable_amount
)
{
return
'<div class="table-responsive table-wrapper complex-container table-middle mt-1 table-collapse ">
...
...
app/Admin/Repositories/LawyerCollect.php
View file @
78f7c207
This diff is collapsed.
Click to expand it.
app/Models/Lawyer.php
View file @
78f7c207
This diff is collapsed.
Click to expand it.
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