PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | admin/views/editorder/view.html.php +15 -8 1.6.9 → 1.8.16 View file →
@@ -30,8 +30,11 @@
30 30 if (is_file(VCM_ADMIN_PATH.DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'css'.DIRECTORY_SEPARATOR.'vcm-channels.css')) {
31 31 $document = JFactory::getDocument();
32 32 $document->addStyleSheet(VCM_ADMIN_URI.'assets/css/vikchannelmanager.css');
33 33 $document->addStyleSheet(VCM_ADMIN_URI.'assets/css/vcm-channels.css');
34 + if (method_exists('VikChannelManager', 'loadAppearancePreferenceAssets')) {
35 + VikChannelManager::loadAppearancePreferenceAssets();
36 + }
34 37 }
35 38
36 39 $dbo = JFactory::getDbo();
37 40 $app = JFactory::getApplication();
@@ -108,8 +111,9 @@
108 111 $ptot_taxes = VikRequest::getString('tot_taxes', '', 'request');
109 112 $ptot_city_taxes = VikRequest::getString('tot_city_taxes', '', 'request');
110 113 $ptot_fees = VikRequest::getString('tot_fees', '', 'request');
111 114 $pcmms = VikRequest::getString('cmms', '', 'request');
115 + $ptot_damage_dep = VikRequest::getString('tot_damage_dep', '', 'request');
112 116 $pcustmail = VikRequest::getString('custmail', '', 'request');
113 117 $pcustphone = VikRequest::getString('custphone', '', 'request');
114 118 $pmakepay = VikRequest::getInt('makepay', 0, 'request');
115 119 $pnewamountpaid = VikRequest::getFloat('newamountpaid', -1, 'request');
@@ -270,8 +274,14 @@
270 274 $dbo->setQuery($q);
271 275 $dbo->execute();
272 276 $row['cmms'] = $pcmms;
273 277 }
278 + if (strlen($ptot_damage_dep) > 0) {
279 + $q = "UPDATE `#__vikbooking_orders` SET `tot_damage_dep`='".floatval($ptot_damage_dep)."' WHERE `id`=".$row['id'].";";
280 + $dbo->setQuery($q);
281 + $dbo->execute();
282 + $row['tot_damage_dep'] = $ptot_damage_dep;
283 + }
274 284 if (strlen($pcustmail) > 0) {
275 285 $q = "UPDATE `#__vikbooking_orders` SET `custmail`=".$dbo->quote($pcustmail)." WHERE `id`=".$row['id'].";";
276 286 $dbo->setQuery($q);
277 287 $dbo->execute();
@@ -410,22 +420,20 @@
410 420 $row['paymentlog'] = null;
411 421 }
412 422
413 423 // detect if VCM exists
414 - $vcm_exists = is_file(VCM_SITE_PATH . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'lib.vikchannelmanager.php');
424 + $vcm_exists = class_exists('VikChannelManager');
415 425
416 - // attempt to get the VCM review ID with a try-catch to avoid SQL errors
417 - $vcm_review = array();
426 + // attempt to get the VCM review ID within a try-catch statement to avoid SQL errors
427 + $vcm_review = null;
418 428 if ($vcm_exists) {
419 429 try {
420 430 $q = "SELECT * FROM `#__vikchannelmanager_otareviews` WHERE `idorder`=" . (int)$row['id'] . ";";
421 431 $dbo->setQuery($q);
422 - $dbo->execute();
423 - if ($dbo->getNumRows()) {
424 - $vcm_review = $dbo->loadAssoc();
425 - }
432 + $vcm_review = $dbo->loadAssoc();
426 433 } catch (Exception $e) {
427 434 // do nothing as VCM is probably not available/enabled/updated
435 + $vcm_review = null;
428 436 }
429 437 }
430 438
431 439 /**
@@ -439,9 +447,8 @@
439 447 $vcm_host_to_guest_review = 0;
440 448 $vcm_cancel_active_res = 0;
441 449 if ($vcm_exists) {
442 450 try {
443 - require_once VCM_SITE_PATH . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'lib.vikchannelmanager.php';
444 451 if (method_exists('VikChannelManager', 'reservationNeedsDeclineReasons')) {
445 452 $vcm_decline_actions = (int)VikChannelManager::reservationNeedsDeclineReasons($row);
446 453 }
447 454 if (method_exists('VikChannelManager', 'reservationSupportsPreApproval')) {