Add insurance_amount and insured_amount while get health care sheets details
This commit is contained in:
parent
8d783be3a8
commit
026e21dc33
|
@ -1193,7 +1193,7 @@ class HealthCareSheetController extends Controller
|
|||
public function getOneHealthCareSheets($id)
|
||||
{
|
||||
|
||||
$sheet = NhInfosHealthCareSheets::with(['performances.act:id,code,name', 'exams.act:id,code,name', 'prescriptions.drug_or_device:id,name'])->where('id', $id)->first();
|
||||
$sheet = NhInfosHealthCareSheets::with(['performances.act:id,code,name', 'exams.act:id,code,name', 'prescriptions.drug_or_device:id,name'])->where('id', $id)->firstOrFail();
|
||||
$this->formalizeHealthCareSheet($sheet);
|
||||
return $this->successResponse($sheet);
|
||||
}
|
||||
|
@ -1779,6 +1779,10 @@ class HealthCareSheetController extends Controller
|
|||
$sheet->patient_situation = trans('states.' . $sheet->patient_situation);
|
||||
$sheet->_care_condition = $sheet->care_condition;
|
||||
$sheet->care_condition = trans('states.' . $sheet->care_condition);
|
||||
$this->fetchHealthCareSheetAmounts($sheet);
|
||||
$sheet->insurance_amount = $this->toMoneyWithCurrencyCode($sheet->insurer_amount, $sheet->currency_code);
|
||||
$sheet->insured_amount = $this->toMoneyWithCurrencyCode($sheet->insured_amount, $sheet->currency_code);
|
||||
unset($sheet->insurer_amount);
|
||||
foreach ($sheet->performances as $p) {
|
||||
$p->amount_formatted = $this->toMoneyWithCurrencyCode($p->amount, $sheet->currency_code);
|
||||
$p->moderator_ticket_formatted = $this->toMoneyWithCurrencyCode($p->moderator_ticket, $sheet->currency_code);
|
||||
|
|
Loading…
Reference in New Issue