Skip to content

Commit

Permalink
update javascript through line 53
Browse files Browse the repository at this point in the history
  • Loading branch information
rifkegribenes committed Jun 5, 2018
1 parent 6c32da7 commit 72a881a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions gc2018reg_formstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ function changeLabels() {
function daysDiffLodgingCheckInOut() {
// calculate total number of days of lodging requested
var returnVal=0;
var checkInVal=$('#soslula__Event_Attendee__c\\.Lodging_Check_in_Date__c').val();
// console.log(`checkInVal: ${checkInVal}`);
var checkOutVal=$('#soslula__Event_Attendee__c\\.Lodging_Check_out_Date__c').val();
var checkInVal=$('#X2018_General_Council__c.\\Lodging_Check_in_Date__c').val();
console.log(`checkInVal: ${checkInVal}`);
var checkOutVal=$('#X2018_General_Council__c\\.Lodging_Check_out_Date__c').val();
// console.log(`checkOutVal: ${checkOutVal}`);
if (checkInVal !== 'undefined' && checkInVal !== '' && checkOutVal !== 'undefined' && checkOutVal !== '') {
var checkinDate = new Date(checkInVal);
Expand Down Expand Up @@ -45,7 +45,12 @@ function executeEvaluatePaymentAmount(noOfDays){
console.log(err);
}

EvaluatePaymentAmount('SUBTOTAL','61','["soslula__Event_Attendee__c\\\\.Adult_guest_meals__c"].val * 24.5 + ["soslula__Event_Attendee__c\\\\.Child_guest_meals__c "].val * 12.5 + IF(["soslula__Event_Attendee__c\\\\.Room_type__c"].amount = 1 & ["soslula__Event_Attendee__c\\\\.Lodging_exception__c"].amount = 0,' +numberOfDays + ' * 64 ,0) + IF(["soslula__Event_Attendee__c\\\\.Room_type__c"].amount = 2 & ["soslula__Event_Attendee__c\\\\.Lodging_exception__c"].amount = 0 & ["soslula__Event_Attendee__c\\\\.My_roommate_is__c"].amount = 2,' + numberOfDays + ' * 64, 0)');
EvaluatePaymentAmount('SUBTOTAL',
'61',
'["X2018_General_Council__c\\\\.Adult_guest_meals__c"].val * 24.5 + ["X2018_General_Council__c\\\\.Child_guest_meals__c "].val * 12.5 + IF(["X2018_General_Council__c\\\\.Room_type__c"].amount = 1 & ["X2018_General_Council__c\\\\.Lodging_exception__c"].amount = 0,' +numberOfDays + ' * 64 ,0) +
IF(["X2018_General_Council__c\\\\.Room_type__c"].amount = 2 & ["X2018_General_Council__c\\\\.Lodging_exception__c"].amount = 0 & ["X2018_General_Council__c\\\\.My_roommate_is__c"].amount = 2,' + numberOfDays + ' * 64, 0)') +
IF(["X2018_General_Council__c\\\\.Pet_friendly_room__c"].amount = 1 & ["X2018_General_Council__c\\\\.Registered_service_animal__c"].amount = 0,50, 0)'
);
}
}
Expand Down

0 comments on commit 72a881a

Please sign in to comment.