diff --git a/admin/themes/default/template/controllers/dashboard/helpers/view/view.tpl b/admin/themes/default/template/controllers/dashboard/helpers/view/view.tpl index 197401de0..38579001e 100644 --- a/admin/themes/default/template/controllers/dashboard/helpers/view/view.tpl +++ b/admin/themes/default/template/controllers/dashboard/helpers/view/view.tpl @@ -23,120 +23,119 @@ * International Registered Trademark & Property of PrestaShop SA *}
- {$hookDashboardTop} -
- {if $warning} -
-
{$warning}
-
- {/if} -
-
-
-
-
-
-
- - - - - - -
- - - -
- - {$calendar} -
-
-
-
-
-
-
-
- - -
-
-
-
-
-
-
-
-
- {$hookDashboardZoneTwo} -
-
-
- {$hookDashboardZoneOne} -
-
-
- {$hookDashboardZoneThree} -
- -
-
-
- -
+ {$hookDashboardTop} +
+ {if $warning} +
+
{$warning}
+
+ {/if} +
+
+
+
+
+
+
+ + + + + + +
+ + + +
+ + {$calendar} +
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+ {$hookDashboardZoneTwo} +
+
+
+ {$hookDashboardZoneOne} +
+
+
+ {$hookDashboardZoneThree} +
+ +
+
+
+
diff --git a/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl b/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl index 93727824a..c26576861 100644 --- a/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl +++ b/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl @@ -57,7 +57,7 @@ {/if} - {$data.date_from|escape:'html':'UTF-8'|date_format:"%d-%m-%Y"} -  {$data.date_to|escape:'html':'UTF-8'|date_format:"%d-%m-%Y"} + {dateFormat date=$data.date_from} - {dateFormat date=$data.date_to} {if $data.feature_price_diff != 0} {assign var=shown_room_type_price value=$data.feature_price_tax_excl} diff --git a/admin/themes/default/template/controllers/orders/_product_line.tpl b/admin/themes/default/template/controllers/orders/_product_line.tpl index 73cd706ae..db83f5167 100644 --- a/admin/themes/default/template/controllers/orders/_product_line.tpl +++ b/admin/themes/default/template/controllers/orders/_product_line.tpl @@ -54,7 +54,7 @@ - {$data.date_from|date_format:"%d-%m-%Y"} -  {$data.date_to|date_format:"%d-%m-%Y"} + {dateFormat date=$data.date_from} - {dateFormat date=$data.date_to} {if $can_edit} - diff --git a/modules/dashoccupancy/dashoccupancy.php b/modules/dashoccupancy/dashoccupancy.php index 472f7b446..b99b30385 100644 --- a/modules/dashoccupancy/dashoccupancy.php +++ b/modules/dashoccupancy/dashoccupancy.php @@ -70,8 +70,6 @@ class DashOccupancy extends Module 'count_occupied' => sprintf('%02d', $occupancyData['count_occupied']), 'count_available' => sprintf('%02d', $occupancyData['count_available']), 'count_unavailable' => sprintf('%02d', $occupancyData['count_unavailable']), - 'date_occupancy_range' => $this->l('(from %s to %s)'), - 'date_occupancy_avail_format' => $this->context->language->date_format_lite, )); return $this->display(__FILE__, 'dashboard_zone_one.tpl'); diff --git a/modules/dashoccupancy/views/js/dashoccupancy.js b/modules/dashoccupancy/views/js/dashoccupancy.js index 516502741..2b3191fe9 100644 --- a/modules/dashoccupancy/views/js/dashoccupancy.js +++ b/modules/dashoccupancy/views/js/dashoccupancy.js @@ -41,22 +41,17 @@ function generateAvailablityPieChart(chartData) { } $(document).ready(function() { - if (typeof date_occupancy_range === "undefined") - var date_occupancy_range = '(from %s to %s)'; - - if (typeof date_occupancy_avail_format === "undefined") - var date_occupancy_avail_format = 'Y-mm-dd'; - $('#date-start').change(function() { start = Date.parseDate($('#date-start').val(), 'Y-m-d'); end = Date.parseDate($('#date-end').val(), 'Y-m-d'); - $('#dashoccupancy_date_range').html(sprintf(date_occupancy_range, start.format(date_occupancy_avail_format), end.format(date_occupancy_avail_format))); + + $('#dashoccupancy_date_range').html(sprintf(date_subtitle, start.format(date_format), end.format(date_format))); }); $('#date-end').change(function() { start = Date.parseDate($('#date-start').val(), 'Y-m-d'); end = Date.parseDate($('#date-end').val(), 'Y-m-d'); - $('#dashoccupancy_date_range').html(sprintf(date_occupancy_range, start.format(date_occupancy_avail_format), end.format(date_occupancy_avail_format))); + $('#dashoccupancy_date_range').html(sprintf(date_subtitle, start.format(date_format), end.format(date_format))); }); -}); \ No newline at end of file +}); diff --git a/modules/dashoccupancy/views/templates/hook/dashboard_zone_one.tpl b/modules/dashoccupancy/views/templates/hook/dashboard_zone_one.tpl index 9d289a61f..609164a22 100644 --- a/modules/dashoccupancy/views/templates/hook/dashboard_zone_one.tpl +++ b/modules/dashoccupancy/views/templates/hook/dashboard_zone_one.tpl @@ -84,8 +84,3 @@ - - diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php index 3919943a1..2c8e81273 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php @@ -402,14 +402,14 @@ class AdminHotelRoomsBookingController extends ModuleAdminController $rm_amount = $roomTypeDateRangePrice['total_price_tax_excl']; $cart_data = array('room_num' => $obj_rm_info->room_num, 'room_type' => Product::getProductName((int)$id_product), - 'date_from' => date('Y-M-d', strtotime($date_from)), - 'date_to' => date('Y-M-d', strtotime($date_to)), - 'amount' => $rm_amount, + 'date_from' => Tools::displayDate($date_from), + 'date_to' => Tools::displayDate($date_to), + 'amount' => Tools::displayPrice($rm_amount), 'qty' => $num_day, 'rms_in_cart' => $rms_in_cart, - 'total_amount' => $total_amount, + 'total_amount' => Tools::displayPrice($total_amount), 'booking_stats' => $booking_stats, - 'id_cart_book_data' => $obj_cart_book_data->id + 'id_cart_book_data' => $obj_cart_book_data->id); ); if ($obj_cart_book_data->id) { @@ -443,7 +443,7 @@ class AdminHotelRoomsBookingController extends ModuleAdminController $booking_stats = $obj_booking_dtl->getBookingData($bookingParams); $cart_data = array( - 'total_amount' => $total_amount, + 'total_amount' => Tools::displayPrice($total_amount), 'rms_in_cart' => $rms_in_cart, 'booking_stats' => $booking_stats ); @@ -490,7 +490,7 @@ class AdminHotelRoomsBookingController extends ModuleAdminController $room_tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_.$tpl_path); $cart_data = array( - 'total_amount' => $total_amount, + 'total_amount' => Tools::displayPrice($total_amount), 'room_tpl' => $room_tpl, 'rms_in_cart' => $rms_in_cart, 'booking_data' => $booking_data, diff --git a/modules/hotelreservationsystem/controllers/admin/AdminOrderRestrictSettingsController.php b/modules/hotelreservationsystem/controllers/admin/AdminOrderRestrictSettingsController.php index 62c76722c..07d5bcb84 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminOrderRestrictSettingsController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminOrderRestrictSettingsController.php @@ -66,6 +66,7 @@ class AdminOrderRestrictSettingsController extends ModuleAdminController 'max_order_date' => array( 'title' => $this->l('Maximum Booking Date'), 'align' => 'center', + 'type' => 'date', ), ); $this->bulk_actions = array( diff --git a/modules/hotelreservationsystem/views/js/HotelReservationAdmin.js b/modules/hotelreservationsystem/views/js/HotelReservationAdmin.js index e791a8b18..0f14cd5b4 100644 --- a/modules/hotelreservationsystem/views/js/HotelReservationAdmin.js +++ b/modules/hotelreservationsystem/views/js/HotelReservationAdmin.js @@ -630,16 +630,16 @@ $(document).ready(function() { btn.attr('data-id-cart', result.id_cart); btn.attr('data-id-cart-book-data', result.id_cart_book_data); html = ""; - html += "" + result.room_num + ""; - html += "" + result.room_type + ""; - html += "" + result.date_from + " To " + result.date_to + ""; - html += "" + currency_prefix + result.amount + currency_suffix + ""; - html += ""; + html += "" + result.room_num + ""; + html += "" + result.room_type + ""; + html += "" + result.date_from + " - " + result.date_to + ""; + html += "" + result.amount + ""; + html += ""; html += ""; $('.cart_tbody').append(html); - $('#cart_total_amt').html(currency_prefix + result.total_amount + currency_suffix); + $('#cart_total_amt').html(result.total_amount); // $('#cart_record').html(result.rms_in_cart); // For Stats @@ -701,16 +701,16 @@ $(document).ready(function() { btn.attr('data-id-cart-book-data', result.id_cart_book_data); html = ""; - html += "" + result.room_num + ""; - html += "" + result.room_type + ""; - html += "" + result.date_from + " To " + result.date_to + ""; - html += "" + currency_prefix + result.amount + currency_suffix + ""; - html += ""; + html += "" + result.room_num + ""; + html += "" + result.room_type + ""; + html += "" + result.date_from + " - " + result.date_to + ""; + html += "" + result.amount + ""; + html += ""; html += ""; $('.cart_tbody').append(html); - $('#cart_total_amt').html(currency_prefix + result.total_amount + currency_suffix); + $('#cart_total_amt').html(result.total_amount); // $('#cart_record').html(result.rms_in_cart); // For Stats @@ -763,8 +763,10 @@ $(document).ready(function() { $(".cart_booking_btn").attr('disabled', 'true'); } - btn.parent().parent().remove(); - $('#cart_total_amt').html(currency_prefix + result.total_amount + currency_suffix); + btn.hide(400, function () { + btn.closest('tr').remove(); + }); + $('#cart_total_amt').html(result.total_amount); // $('#cart_record').html(result.rms_in_cart); // For Stats diff --git a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl index 5111597d4..745368c1b 100644 --- a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl @@ -215,7 +215,7 @@ {foreach from=$book_v['data']['available'] key=avai_k item=avai_v} {$avai_v['room_num']|escape:'htmlall':'UTF-8'} - {$date_from|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'} - {$date_to|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'} + {dateFormat date=date('Y-m-d', strtotime($date_from))} - {dateFormat date=date('Y-m-d', strtotime($date_to))} {$avai_v['room_comment']|escape:'htmlall':'UTF-8'} {foreach $allotment_types as $allotment_type} @@ -255,7 +255,7 @@ {foreach from=$part_v['avai_dates'] key=sub_part_k item=sub_part_v} -

{$sub_part_v['date_from']|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'} - {$sub_part_v['date_to']|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'}

+

{dateFormat date=date('Y-m-d', strtotime($sub_part_v['date_from']))} - {dateFormat date=date('Y-m-d', strtotime($sub_part_v['date_to']))}

{foreach $allotment_types as $allotment_type} @@ -299,7 +299,7 @@ {foreach from=$booked_v['detail'] key=rm_dtl_k item=rm_dtl_v} - +
{$rm_dtl_v['date_from']|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'} - {$rm_dtl_v['date_to']|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'}{dateFormat date=date('Y-m-d', strtotime($rm_dtl_v['date_from']))} - {dateFormat date=date('Y-m-d', strtotime($rm_dtl_v['date_to']))} {$rm_dtl_v['comment']|escape:'htmlall':'UTF-8'} {if $rm_dtl_v['booking_type'] == HotelBookingDetail::ALLOTMENT_AUTO}{l s='Auto Allotment' mod='hotelreservationsystem'}{elseif $rm_dtl_v['booking_type'] == HotelBookingDetail::ALLOTMENT_MANUAL}{l s='Manual Allotment' mod='hotelreservationsystem'}{/if} @@ -368,10 +368,10 @@ - - - - + + + + @@ -379,13 +379,11 @@ {if isset($cart_bdata)} {foreach $cart_bdata as $cart_data} - - - - - + + + + + {/foreach} {/if} @@ -395,7 +393,7 @@
{l s='Room No.' mod='hotelreservationsystem'}{l s='Room Type' mod='hotelreservationsystem'}{l s='Duration' mod='hotelreservationsystem'}{l s='Amount (Tax excl.)' mod='hotelreservationsystem'}{l s='Room No.' mod='hotelreservationsystem'}{l s='Room Type' mod='hotelreservationsystem'}{l s='Duration' mod='hotelreservationsystem'}{l s='Amount (Tax excl.)' mod='hotelreservationsystem'}
{$cart_data['room_num']|escape:'htmlall':'UTF-8'}{$cart_data['room_type']|escape:'htmlall':'UTF-8'} - {$cart_data['date_from']|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'} - {$cart_data['date_to']|escape:'htmlall':'UTF-8'|date_format:'%d-%m-%Y'} - {convertPrice price=$cart_data['amt_with_qty']}{$cart_data['room_num']|escape:'htmlall':'UTF-8'}{$cart_data['room_type']|escape:'htmlall':'UTF-8'}{dateFormat date=$cart_data['date_from']} - {dateFormat date=$cart_data['date_to']}{convertPrice price=$cart_data['amt_with_qty']}
- + @@ -521,9 +519,6 @@ {addJsDefL name=remove}{l s='Remove' js=1 mod='hotelreservationsystem'}{/addJsDefL} {addJsDefL name=noRoomTypeAvlTxt}{l s='No room type available.' js=1 mod='hotelreservationsystem'}{/addJsDefL} - {addJsDef currency_prefix = $currency->prefix} - {addJsDef currency_suffix = $currency->suffix} - {addJsDef currency_sign = $currency->sign} {addJsDef currency_format = $currency->format} {addJsDef currency_blank = $currency->blank} diff --git a/modules/statsforecast/statsforecast.php b/modules/statsforecast/statsforecast.php index 0f5132af0..8f6d36ed1 100644 --- a/modules/statsforecast/statsforecast.php +++ b/modules/statsforecast/statsforecast.php @@ -200,7 +200,7 @@ class StatsForecast extends Module $this->html .= ' - +
{l s='Total Amount' mod='hotelreservationsystem'}{l s='Total Amount (Tax incl.):' mod='hotelreservationsystem'} {if isset($cart_tamount)}{convertPrice price=$cart_tamount}{else}0{/if}
'.$row['fix_date'].''.Tools::displayDate($row['fix_date']).' '.$visits_today.' '.(int)$row['registrations'].' '.(int)$row['countOrders'].'