Fix bugs
This commit is contained in:
parent
5bd371c119
commit
7453db6d9c
|
@ -1741,7 +1741,7 @@ class HealthCareSheetController extends Controller
|
||||||
'exams.*.id' => 'nullable|integer|exists:nh_exams,id',
|
'exams.*.id' => 'nullable|integer|exists:nh_exams,id',
|
||||||
'exams.*.act_id' => 'required_with:exams.*.id|integer|exists:nh_acts,id',
|
'exams.*.act_id' => 'required_with:exams.*.id|integer|exists:nh_acts,id',
|
||||||
'exams.*.description' => 'required_with:exams.*.id|string',
|
'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_price' => 'nullable|numeric',
|
||||||
'exams.*.unit_quantity' => 'nullable|integer|min:1',
|
'exams.*.unit_quantity' => 'nullable|integer|min:1',
|
||||||
'exams.*.to_delete' => 'nullable|boolean',
|
'exams.*.to_delete' => 'nullable|boolean',
|
||||||
|
|
|
@ -315,10 +315,10 @@ class InvoiceController extends Controller
|
||||||
return $this->errorResponse(trans('errors.nano_health_not_activated'));
|
return $this->errorResponse(trans('errors.nano_health_not_activated'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$invoice->state = InsuranceSubscriptionState::ACCEPTED_MODIFIED;
|
$invoice->state = 'MODIFIED';
|
||||||
$invoice->reason = $reason;
|
|
||||||
$invoiceClone = $invoice->replicate();
|
$invoiceClone = $invoice->replicate();
|
||||||
$invoiceClone->state = InsuranceSubscriptionState::ACCEPTED;
|
$invoiceClone->state = InsuranceSubscriptionState::ACCEPTED_MODIFIED;
|
||||||
|
$invoiceClone->reason = $reason;
|
||||||
$invoiceClone->created_at = $invoiceClone->updated_at = $datetime;
|
$invoiceClone->created_at = $invoiceClone->updated_at = $datetime;
|
||||||
$invoiceClone->push();
|
$invoiceClone->push();
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class AddModifiedStateToNhInvoices extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('nh_invoices', function (Blueprint $table) {
|
||||||
|
DB::statement("alter table nh_invoices
|
||||||
|
modify state enum ('UNDER_VALIDATION', 'ACCEPTED', 'REJECTED', 'ACCEPTED_MODIFIED', 'MODIFIED') default 'UNDER_VALIDATION' not null;");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('nh_invoices', function (Blueprint $table) {
|
||||||
|
DB::statement("alter table nh_invoices
|
||||||
|
modify state enum ('UNDER_VALIDATION', 'ACCEPTED', 'REJECTED', 'ACCEPTED_MODIFIED') default 'UNDER_VALIDATION' not null;");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -34,5 +34,6 @@ return [
|
||||||
"SUSPENDED" => "SUSPENDED",
|
"SUSPENDED" => "SUSPENDED",
|
||||||
"ONE_TIME" => "ONCE",
|
"ONE_TIME" => "ONCE",
|
||||||
"DAILY" => "DAY",
|
"DAILY" => "DAY",
|
||||||
"MONTHLY" => "MONTH"
|
"MONTHLY" => "MONTH",
|
||||||
|
"MODIFIED" => "MODIFIED"
|
||||||
];
|
];
|
||||||
|
|
|
@ -34,5 +34,6 @@ return [
|
||||||
"SUSPENDED" => "SUSPENDUE",
|
"SUSPENDED" => "SUSPENDUE",
|
||||||
"ONE_TIME" => "1 FOIS",
|
"ONE_TIME" => "1 FOIS",
|
||||||
"DAILY" => "JOUR",
|
"DAILY" => "JOUR",
|
||||||
"MONTHLY" => "MOIS"
|
"MONTHLY" => "MOIS",
|
||||||
|
"MODIFIED" => "MODIFIÉE"
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue