summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald Ashri2012-12-29 10:26:39 (GMT)
committer Ronald Ashri2012-12-29 10:26:39 (GMT)
commit3c98c6bc7543f8a37fea834f491b510f0199b338 (patch)
treec7199e42a85c000b9cf22c379cd5cd20ff512a7e
parenta836db007ccda525db2c285ce579e9d0afe74a27 (diff)
Fix bug when adding cot surcharge
-rw-r--r--modules/rooms_booking_manager/rooms_booking_manager.module6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/rooms_booking_manager/rooms_booking_manager.module b/modules/rooms_booking_manager/rooms_booking_manager.module
index 86288b5..b3018c2 100644
--- a/modules/rooms_booking_manager/rooms_booking_manager.module
+++ b/modules/rooms_booking_manager/rooms_booking_manager.module
@@ -1557,12 +1557,12 @@ function rooms_booking_manager_price_apply($line_item, $name) {
if ($line_item->rooms_booking_number_people[LANGUAGE_NONE][0]['value'] == 1) {
$price_modifiers['single'] = array('#type' => ROOMS_PRICE_SINGLE_OCCUPANCY);
}
-
- if ($line_item->rooms_booking_number_people[LANGUAGE_NONE][1]['value'] > 0) {
+
+ if ($line_item->rooms_booking_number_people[LANGUAGE_NONE][0]['value'] > 0) {
$price_modifiers['children'] = array(
'#type' => ROOMS_DYNAMIC_MODIFIER,
'#op_type' => ROOMS_ADD,
- '#amount' => $unit->cot_surcharge * ($this->start_date->diff($this->end_date)->days + 1),
+ '#amount' => $unit->cot_surcharge * ($start_date->diff($end_date)->days + 1),
);
}