Fxi temporally invoices
This commit is contained in:
parent
b988f4cf0a
commit
9b91fc3b7f
|
@ -189,7 +189,7 @@ class InvoiceController extends Controller
|
|||
* ),
|
||||
* @OA\Parameter(
|
||||
* parameter="network_agent_id",
|
||||
* name="insured_id",
|
||||
* name="network_agent_id",
|
||||
* description="ID de l'agent dans le reseau",
|
||||
* @OA\Schema(
|
||||
* type="integer"
|
||||
|
@ -244,15 +244,24 @@ class InvoiceController extends Controller
|
|||
|
||||
$network_id = $request->input('network_id');
|
||||
$network_agent_id = $request->input('network_agent_id');
|
||||
// Correction temporaire
|
||||
$insured_id = $request->input('insured_id');
|
||||
if (!empty($insured_id)) {
|
||||
$network_agent_id = $insured_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']);
|
||||
|
||||
if (!empty($network_id)) {
|
||||
$query = $query->where('network_id', $network_id);
|
||||
}
|
||||
// if (!empty($network_id)) {
|
||||
// $query = $query->where('network_id', $network_id);
|
||||
// }
|
||||
|
||||
if (!empty($network_agent_id)) {
|
||||
$query = $query->where('network_agent_id', $network_agent_id);
|
||||
} else {
|
||||
if (!empty($network_id)) {
|
||||
$query = $query->where('network_id', $network_id);
|
||||
}
|
||||
}
|
||||
|
||||
$invoices = $query->orderBy('created_at', 'DESC')->paginate($request->input('perPage', 10));
|
||||
|
|
Loading…
Reference in New Issue