imrobstephens
Forum Replies Created
-
Forum: Plugins
In reply to: [Calculated Fields Form] Forms not showing after uodateHi, after a few refreshes, the form now shows.
Thank you very much 😀
Cheers
Rob
Forum: Plugins
In reply to: [Calculated Fields Form] Calcute weekdays and weekendsHi,
Thanks so much for all your help and understanding, with your help I have managed to edit the form perfectly, very powerful plugin.
Cheers
Rob
Forum: Plugins
In reply to: [Calculated Fields Form] Calcute weekdays and weekendsHi, thank you, I understand I have asked a lot of questions but thanks to your examples I think i can sort it from here. Once again, thanks you so much.
Rob
Forum: Plugins
In reply to: [Calculated Fields Form] Calcute weekdays and weekendsI am so close now thanks, the fiddly bit now is (only just be told this) if the number of adults is 1-4 then the cost is the same as if 1 person was staying. if an aditional person stays (5) then an additional charge is added at 40, if 6 people stay then the fee is 80 etc.
Hope this makes sense, i promise this is the last one 😀
Cheers
RobForum: Plugins
In reply to: [Calculated Fields Form] Calcute weekdays and weekendsThanks so much for explaing this, cheers
Rob
Forum: Plugins
In reply to: [Calculated Fields Form] Calcute weekdays and weekendsHi, I have a problem with the form, I have added the correct rates from my customer but I think i may have added them incorrectly, weekdays are 93 and weekends are 122, below is the code with my alterations, that I now know are incorrect.
(function () {
let result = 0;
let from = DATEOBJ(MIN(fieldname2, fieldname3), 'dd/mm/yyyy');
let to = DATEOBJ(MAX(fieldname2, fieldname3), 'dd/mm/yyyy');
let price_per_night = function(v){
if (GETDATETIMESTRING(v, 'dd/mm') == '24/12') return 122;
if (WEEKDAY(v) == 1) return 93;
if (WEEKDAY(v) == 7) return 93;
return 10;
};
if (fieldname2 == fieldname3)
to = DATEOBJ(fieldname3 + 1, 'dd/mm/yyyy');
while (from < to) {
result = result+price_per_night(from);
from = DATETIMESUM(from, 'dd/mm/yyyy', 1, 'd');
}
return result*(fieldname6+fieldname7)*IF(4<(fieldname6+fieldname7), 2, 1)+fieldname13;
})()Cheers
Rob
Forum: Plugins
In reply to: [Calculated Fields Form] Calcute weekdays and weekendsAh, I see, I wasn’t sure how to add extra lines or where to put tehm, that’s amazing thanks.
Thank you
Rob
Forum: Plugins
In reply to: [Calculated Fields Form] Calcute weekdays and weekendsHi thanks,
Sorry this is the first time Ive used your plugin, wherabouts in the calculation do I add these additional fileds?
Cheers
RobForum: Plugins
In reply to: [Calculated Fields Form] Calcute weekdays and weekendsHi, thanks for this, yes I see it working now, I forgot to mention that the cost doubles per guest once there is more than four guests, is this possible? Also i need to add a value to the cost if one of the options such as parking etc is clicked.
Thanks
Rob
Forum: Plugins
In reply to: [Calculated Fields Form] Calcute weekdays and weekendsHi, this is the very simple version I created, it doesn’t work out the weekend rates, I think the field names in my form and your solution maybe mismatched, I will try again with this solution:
(function () {Â Â let result = 0;Â Â let from = DATEOBJ(MIN(fieldname2, fieldname3), ‘dd/mm/yyyy’);Â Â let to = DATEOBJ(MAX(fieldname2, fieldname3), ‘dd/mm/yyyy’);Â Â let price_per_night = function(v){Â Â Â Â if (GETDATETIMESTRING(v, ‘dd/mm’) == ’24/12′) return 30;Â Â Â Â if (WEEKDAY(v) == 1) return 15;Â Â Â Â Â Â if (WEEKDAY(v) == 7) return 15;Â Â Â Â return 10;Â Â };Â Â if (fieldname2 == fieldname3)Â Â Â Â to = DATEOBJ(fieldname3 + 1, ‘dd/mm/yyyy’);Â Â while (from < to) {Â Â Â Â result = result+price_per_night(from);Â Â Â Â from = DATETIMESUM(from, ‘dd/mm/yyyy’, 1, ‘d’);Â Â }Â Â return result;})()
and see if I can remap the fieldnames.
Thanks
Rob
Forum: Plugins
In reply to: [Calculated Fields Form] Calcute weekdays and weekendsHi thanks for this, unfortunately I am using the free version and this doesn’t work.
Thanks for all your help
Rob
Forum: Plugins
In reply to: [Calculated Fields Form] Calcute weekdays and weekendsThank you, one last thing, would it be possible to add a different rate for a select number i days I can add in a field, ie Christmas day???
cheers
Rob
Forum: Plugins
In reply to: [Calculated Fields Form] Calcute weekdays and weekendsHi, sorry I was a bit vague, thats exactly what I needed.
Thank you
Rob