diff --git a/app/Http/Controllers/HealthCareSheetController.php b/app/Http/Controllers/HealthCareSheetController.php index 8ca4c88..d3d02e1 100755 --- a/app/Http/Controllers/HealthCareSheetController.php +++ b/app/Http/Controllers/HealthCareSheetController.php @@ -1741,7 +1741,7 @@ class HealthCareSheetController extends Controller 'exams.*.id' => 'nullable|integer|exists:nh_exams,id', 'exams.*.act_id' => 'required_with:exams.*.id|integer|exists:nh_acts,id', 'exams.*.description' => 'required_with:exams.*.id|string', - 'exams.*.quantity' => 'required_with:exams.*.id|integer', + 'exams.*.quantity' => 'nullable|integer', 'exams.*.unit_price' => 'nullable|numeric', 'exams.*.unit_quantity' => 'nullable|integer|min:1', 'exams.*.to_delete' => 'nullable|boolean', diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 2878624..55ba2cd 100755 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -315,10 +315,10 @@ class InvoiceController extends Controller return $this->errorResponse(trans('errors.nano_health_not_activated')); } - $invoice->state = InsuranceSubscriptionState::ACCEPTED_MODIFIED; - $invoice->reason = $reason; + $invoice->state = 'MODIFIED'; $invoiceClone = $invoice->replicate(); - $invoiceClone->state = InsuranceSubscriptionState::ACCEPTED; + $invoiceClone->state = InsuranceSubscriptionState::ACCEPTED_MODIFIED; + $invoiceClone->reason = $reason; $invoiceClone->created_at = $invoiceClone->updated_at = $datetime; $invoiceClone->push(); diff --git a/database/migrations/2022_04_08_102524_add_modified_state_to_nh_invoices.php b/database/migrations/2022_04_08_102524_add_modified_state_to_nh_invoices.php new file mode 100644 index 0000000..685c3ad --- /dev/null +++ b/database/migrations/2022_04_08_102524_add_modified_state_to_nh_invoices.php @@ -0,0 +1,35 @@ + "SUSPENDED", "ONE_TIME" => "ONCE", "DAILY" => "DAY", - "MONTHLY" => "MONTH" + "MONTHLY" => "MONTH", + "MODIFIED" => "MODIFIED" ]; diff --git a/resources/lang/fr/states.php b/resources/lang/fr/states.php index 7f1963a..2f54405 100755 --- a/resources/lang/fr/states.php +++ b/resources/lang/fr/states.php @@ -34,5 +34,6 @@ return [ "SUSPENDED" => "SUSPENDUE", "ONE_TIME" => "1 FOIS", "DAILY" => "JOUR", - "MONTHLY" => "MOIS" + "MONTHLY" => "MOIS", + "MODIFIED" => "MODIFIÉE" ];