Booking, QI Content, Trees, Media
This commit is contained in:
parent
1f340e96fa
commit
7fbac395a9
260 changed files with 27160 additions and 3773 deletions
|
|
@ -101,20 +101,21 @@ class BookingController extends Controller
|
|||
if(isset($data['draft_item'])){
|
||||
|
||||
foreach ($data['draft_item'] as $booking_draft_item_id => $draft_item){
|
||||
$di = BookingDraftItem::findOrFail($booking_draft_item_id);
|
||||
$di->draft_type_id = $draft_item['draft_type_id'];
|
||||
$di->start_date = $draft_item['start_date'];
|
||||
$di->end_date = $draft_item['end_date'];
|
||||
if(isset($draft_item['days_duration'])){
|
||||
$di->days_duration = $draft_item['days_duration'];
|
||||
}
|
||||
if(isset($draft_item['price'])){
|
||||
$di->price = $draft_item['price'];
|
||||
}
|
||||
$di->service = $draft_item['service'];
|
||||
$di->in_pdf = isset($draft_item['in_pdf']) ? true : false;
|
||||
$di->pos = $i++;
|
||||
$di->save();
|
||||
|
||||
$BookingDraftItem = BookingDraftItem::findOrFail($booking_draft_item_id);
|
||||
|
||||
$draft_item['price_adult'] = isset($draft_item['price_adult']) ? $draft_item['price_adult'] : null;
|
||||
$draft_item['adult'] = isset($draft_item['adult']) ? $draft_item['adult'] : null;
|
||||
$draft_item['price_children'] = isset($draft_item['price_children']) ? $draft_item['price_children'] : null;
|
||||
$draft_item['children'] = isset($draft_item['children']) ? $draft_item['children'] : null;
|
||||
$draft_item['price'] = isset($draft_item['price']) ? $draft_item['price'] : null;
|
||||
|
||||
$draft_item['pos'] = $i++;
|
||||
$draft_item['in_pdf'] = isset($draft_item['in_pdf']) ? true : false;
|
||||
$BookingDraftItem->fill($draft_item);
|
||||
|
||||
|
||||
$BookingDraftItem->save();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -151,6 +152,9 @@ class BookingController extends Controller
|
|||
'comfort' => $comfort
|
||||
]);
|
||||
}
|
||||
|
||||
$booking->calculate_price_total();
|
||||
|
||||
if(strpos($data['action'], 'up_') !== false) {
|
||||
$reId = intval(str_replace('up_', '', $data['action']));
|
||||
$d_from = BookingDraftItem::findOrFail($reId);
|
||||
|
|
@ -182,10 +186,12 @@ class BookingController extends Controller
|
|||
|
||||
public function draftItemDelete($id){
|
||||
$boking_draft_item = BookingDraftItem::findOrFail($id);
|
||||
$booking_id = $boking_draft_item->booking_id;
|
||||
$booking = $boking_draft_item->booking;
|
||||
$boking_draft_item->delete();
|
||||
$booking->calculate_price_total();
|
||||
|
||||
\Session()->flash('alert-success', __('Eintrag gelöscht'));
|
||||
return redirect(route('booking_detail', [$booking_id]));
|
||||
return redirect(route('booking_detail', [$booking->id]));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue