FIX_ISSUES
This commit is contained in:
parent
f1a4d26386
commit
283dc369df
@ -2421,16 +2421,16 @@ class EmployeeRestController extends AdminController
|
||||
$client_id = $client_data['id'] ?? null;
|
||||
}
|
||||
|
||||
$client_data = $this->clientPolicyModel
|
||||
$client_policy_data = $this->clientPolicyModel
|
||||
->where('client_id', $client_id)
|
||||
->where('is_active', 1)
|
||||
->groupBy('policy_type_id')
|
||||
->findAll();
|
||||
|
||||
|
||||
$data['ticket_type'] = [];
|
||||
$addedTypes = [];
|
||||
|
||||
foreach ($client_data as $value) {
|
||||
foreach ($client_policy_data as $value) {
|
||||
|
||||
if (in_array($value['policy_type_id'], [2,3,4,5]) && !in_array('1', $addedTypes)) {
|
||||
$data['ticket_type'][] = ["ticket_type" => "1", "type_name" => "Claim-GMC"];
|
||||
|
||||
@ -2575,4 +2575,29 @@ class EmployeeServiceController extends AdminController
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the inception Excel column configuration used for
|
||||
* validating and processing Employee Upload with Events files.
|
||||
* This allows other controllers to generate compatible Excel files.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getInceptionExcelColumns(): array
|
||||
{
|
||||
return $this->inception_excel_columns;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the correction Excel column configuration used for
|
||||
* validating and processing Employee correction files.
|
||||
* This is reused by other controllers when they need to generate
|
||||
* a correction-compatible Excel programmatically.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getCorrectionExcelColumns(): array
|
||||
{
|
||||
return $this->correction_excel_columns;
|
||||
}
|
||||
}
|
||||
@ -368,7 +368,8 @@ abstract class BaseTpaClaimImportService
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
return 61;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -3785,7 +3785,7 @@
|
||||
$totalBilled[$key] = ($totalBilled[$key] ?? 0) + (float) ($row['billed_amt'] ?? 0);
|
||||
|
||||
// Store total_irda_amt once
|
||||
if (!isset($totalIrdaMap[$key]) && ($row['total_irda_amt'] ?? 0) > 0) {
|
||||
if (!isset($totalIrdaMap[$key])) {
|
||||
$totalIrdaMap[$key] = (float) $row['total_irda_amt'];
|
||||
}
|
||||
|
||||
@ -3802,11 +3802,24 @@
|
||||
foreach ($result as $row) {
|
||||
$ptId = $row['pt_id'].'-'.$row['insurer_id'];
|
||||
if (!isset($ptSeen[$ptId])) {
|
||||
|
||||
$totalIrdaVal = $totalIrdaMap[$ptId] ?? 0;
|
||||
$totalBilledVal = $totalBilled[$ptId] ?? 0;
|
||||
$addMinus = false;
|
||||
|
||||
if($totalIrdaVal < 0){
|
||||
$totalIrdaVal = abs($totalIrdaVal);
|
||||
$totalBilledVal = abs($totalBilledVal);
|
||||
$addMinus = true;
|
||||
}
|
||||
|
||||
// First entry → set unbilled amount
|
||||
$row['unbilled_amount'] = round(
|
||||
(float) (($totalIrdaMap[$ptId] ?? 0) - ($totalBilled[$ptId] ?? 0)),
|
||||
2
|
||||
);
|
||||
$row['unbilled_amount'] = round((float) ($totalIrdaVal - $totalBilledVal),2 );
|
||||
|
||||
if($addMinus){
|
||||
$row['unbilled_amount'] = ($row['unbilled_amount'] * -1);
|
||||
}
|
||||
|
||||
$ptSeen[$ptId] = true;
|
||||
} else {
|
||||
// Other entries → zero
|
||||
|
||||
@ -25,7 +25,9 @@ class TpaApiDataModel extends Model
|
||||
'age',
|
||||
'is_active',
|
||||
'desc',
|
||||
'created_by'
|
||||
'created_by',
|
||||
'si',
|
||||
'doj'
|
||||
];
|
||||
|
||||
// protected $useTimestamps = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user