diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 55ba2cd..42e5f46 100755 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -249,7 +249,8 @@ class InvoiceController extends Controller $network_id = $request->input('network_id'); $network_agent_id = $request->input('network_agent_id'); - $query = NhInfosInvoice::with(['health_care_sheets:id,invoice_id,health_care_sheet_id,type,practitioner_lastname,practitioner_firstname,practitioner_provider_class,patient_lastname,patient_firstname,institution_name,institution_code']); + $query = NhInfosInvoice::with(['health_care_sheets:id,invoice_id,health_care_sheet_id,type,practitioner_lastname,practitioner_firstname,practitioner_provider_class,patient_lastname,' + . 'patient_firstname,institution_name,institution_code,insurance_amount,insured_amount']); if (!empty($network_id)) { $query = $query->where('network_id', $network_id); @@ -264,13 +265,13 @@ class InvoiceController extends Controller $i->amount = $this->toMoneyWithCurrencyCode($i->amount, $i->currency_code); $i->insured_amount = $this->toMoneyWithCurrencyCode($i->insured_amount, $i->currency_code); $i->insurer_amount = $this->toMoneyWithCurrencyCode($i->insurer_amount, $i->currency_code); - + $i->state = trans('states.' . $i->state); foreach ($i->health_care_sheets as $sheet) { $sheet->amount = $this->toMoneyWithCurrencyCode($sheet->insured_amount + $sheet->insurance_amount, $i->currency_code); $sheet->insurerAmount = $this->toMoneyWithCurrencyCode($sheet->insurance_amount, $i->currency_code); $sheet->insuredAmount = $this->toMoneyWithCurrencyCode($sheet->insured_amount, $i->currency_code); - + unset($sheet->insurance_amount, $sheet->insured_amount); } } return $this->successResponse($invoices); diff --git a/resources/lang/en/states.php b/resources/lang/en/states.php index e8215e8..c47a8f4 100755 --- a/resources/lang/en/states.php +++ b/resources/lang/en/states.php @@ -36,5 +36,6 @@ return [ "DAILY" => "DAY", "MONTHLY" => "MONTH", "MODIFIED" => "MODIFIED", - 'RENEWAL' => 'RENEWAL' + 'RENEWAL' => 'RENEWAL', + 'ACCEPTED_MODIFIED' => 'ACCEPTED MODIFIED' ]; diff --git a/resources/lang/fr/states.php b/resources/lang/fr/states.php index dc74a4a..56279b9 100755 --- a/resources/lang/fr/states.php +++ b/resources/lang/fr/states.php @@ -36,5 +36,6 @@ return [ "DAILY" => "JOUR", "MONTHLY" => "MOIS", "MODIFIED" => "MODIFIÉE", - 'RENEWAL' => 'RENOUVELLEMENT' + 'RENEWAL' => 'RENOUVELLEMENT', + 'ACCEPTED_MODIFIED' => 'ACCEPTÉE MODIFIÉE' ];