Add total_price of acts while get health care sheets details
This commit is contained in:
parent
026e21dc33
commit
89f4a8946e
|
@ -581,12 +581,13 @@ class HealthCareSheetController extends Controller
|
|||
|
||||
$datetime = $this->getCurrentTimeByCountryCode($insurance->network->country->code_country);
|
||||
|
||||
$beneficiary_id = $request->input('beneficiary_id');
|
||||
$accident_date = $request->input('accident_date');
|
||||
$pregnancy_start_at = $request->input('pregnancy_start_at');
|
||||
$pregnancy_end_at = $request->input('pregnancy_end_at');
|
||||
$healthCareSheet = NhHealthCareSheet::create([
|
||||
'health_care_sheet_id' => $this->generateSheetID(),
|
||||
'beneficiary_id' => $request->input('beneficiary_id'),
|
||||
'beneficiary_id' => !empty($beneficiary_id) ? $beneficiary_id : null,
|
||||
'network_agent_id' => $request->input('network_agent_id'),
|
||||
'care_condition' => $request->input('care_condition'),
|
||||
'practitioner_lastname' => $request->input('practitioner_lastname'),
|
||||
|
@ -1201,7 +1202,13 @@ class HealthCareSheetController extends Controller
|
|||
|
||||
private function formatExamAndPrescriptionAmounts($e, $sheet): void
|
||||
{
|
||||
if (isset($e->unit_price)) {
|
||||
$e->total_price = $this->toMoneyWithCurrencyCode($e->unit_price * $e->quantity, $sheet->currency_code);
|
||||
$e->unit_price_formatted = isset($e->unit_price) ? $this->toMoneyWithCurrencyCode($e->unit_price, $sheet->currency_code) : null;
|
||||
} else {
|
||||
$e->total_price = null;
|
||||
$e->unit_price_formatted = null;
|
||||
}
|
||||
$e->insured_paid_amount_formatted = isset($e->insured_paid_amount) ? $this->toMoneyWithCurrencyCode($e->insured_paid_amount, $sheet->currency_code) : null;
|
||||
$e->insurer_paid_amount_formatted = isset($e->insurer_paid_amount) ? $this->toMoneyWithCurrencyCode($e->insurer_paid_amount, $sheet->currency_code) : null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue