Fewo Mail MA, optimation Fewo, view User Fewos
This commit is contained in:
parent
e537e47a82
commit
346a7427a5
30 changed files with 915 additions and 963 deletions
|
|
@ -143,6 +143,7 @@ class TravelUserBookingFewoRepository extends BaseRepository {
|
|||
//check for data
|
||||
$check_for_reservation = true;
|
||||
$fewo_reservation_id = 0;
|
||||
$model = false;
|
||||
if($id > 0) {
|
||||
$model = TravelUserBookingFewo::findOrFail($id);
|
||||
if($data['from_date'] == $model->from_date && $data['to_date'] == $model->to_date){
|
||||
|
|
@ -178,13 +179,12 @@ class TravelUserBookingFewoRepository extends BaseRepository {
|
|||
'status' => 'required'
|
||||
);
|
||||
|
||||
if($fewo_reservation_id > 0 && $model && Input::get('invoice_number')){
|
||||
$rules['invoice_number'] = 'required|unique:mysql_stern.travel_user_booking_fewos,invoice_number,'.$model->id;
|
||||
}
|
||||
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
|
||||
/* $message = 'my custom validation rule message' . $data['from_date'];
|
||||
Validator::extend('my_custom_validation_rule', function ($attribute, $value, $parameters) {
|
||||
//
|
||||
}, $message);
|
||||
*/
|
||||
if ($validator->fails()) {
|
||||
return back()->withInput(Input::all())->withErrors($validator);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue