|
@@ -124,13 +124,15 @@ class BIService extends Service
|
|
|
$monthly_ps_order_ids = array_keys($monthly_ps_order);
|
|
$monthly_ps_order_ids = array_keys($monthly_ps_order);
|
|
|
|
|
|
|
|
$month_employee_salary = MonthlyPsOrderDetails::whereIn('main_id', $monthly_ps_order_ids)
|
|
$month_employee_salary = MonthlyPsOrderDetails::whereIn('main_id', $monthly_ps_order_ids)
|
|
|
- ->select("salary", "main_id")
|
|
|
|
|
|
|
+ ->select("base_salary","performance_salary","other","bonus", "main_id")
|
|
|
->get()
|
|
->get()
|
|
|
->toArray();
|
|
->toArray();
|
|
|
$total = 0;
|
|
$total = 0;
|
|
|
$salary_map = [];
|
|
$salary_map = [];
|
|
|
foreach ($month_employee_salary as $value) {
|
|
foreach ($month_employee_salary as $value) {
|
|
|
- $currentAmount = (string)$value['salary'];
|
|
|
|
|
|
|
+ $currentAmount = bcadd($value['base_salary'], $value['performance_salary'],3);
|
|
|
|
|
+ $currentAmount = bcadd($currentAmount, $value['other'],3);
|
|
|
|
|
+ $currentAmount = bcadd($currentAmount, $value['bonus'],3);
|
|
|
|
|
|
|
|
if(isset($monthly_ps_order[$value['main_id']])){
|
|
if(isset($monthly_ps_order[$value['main_id']])){
|
|
|
$month = $monthly_ps_order[$value['main_id']];
|
|
$month = $monthly_ps_order[$value['main_id']];
|