Hi Phorum,
I have a logic problem that I can't seem to derive a solution. The long and short of it is a combination of converting an APP that I wrote for the client from A4 to A5V4 8 years ago as well as the client changing his method of charging his customer for the work he has performed.
Here is the problem: There are 10 distinct variables to be defined, was the work performed on a holiday, a Sunday, a Saturday, before 8:00AM, or after 5:00PM. It gets stickier, some clients he merely adds a predefined value in each case, others he uses a multiplier. In any event it is possible for more than either one of the above to be true, if that is the case, he wants the highest value used. For further complication he uses different values in the adds/mults for each of his customers. These values are stored in his customers profile table and populated in the jobenter form via a lookup table.
To date I have considered and applied for/next loops, select/case statements and arrays. In general I set all of the multipliers to "1" and all of the addons to "0".
The 5 addons are: holadd, sunadd, satadd, b4add, and aftr_add.
The 5 multipliers are: holmult, sunmult, satmult, b4mult and aftr_mult.
At this point in time I use a select/case to determine which addon and which multiplier is the largest value in the respective group, this means that I have 2 expression modifiers. I think I am answering my question as I am typing . Now I need to set the addon value to "0" when the multiplier is prevalent and the multiplier to 1 when the addon is prevalent.
Thank you all for any insight,
efs
I have a logic problem that I can't seem to derive a solution. The long and short of it is a combination of converting an APP that I wrote for the client from A4 to A5V4 8 years ago as well as the client changing his method of charging his customer for the work he has performed.
Here is the problem: There are 10 distinct variables to be defined, was the work performed on a holiday, a Sunday, a Saturday, before 8:00AM, or after 5:00PM. It gets stickier, some clients he merely adds a predefined value in each case, others he uses a multiplier. In any event it is possible for more than either one of the above to be true, if that is the case, he wants the highest value used. For further complication he uses different values in the adds/mults for each of his customers. These values are stored in his customers profile table and populated in the jobenter form via a lookup table.
To date I have considered and applied for/next loops, select/case statements and arrays. In general I set all of the multipliers to "1" and all of the addons to "0".
The 5 addons are: holadd, sunadd, satadd, b4add, and aftr_add.
The 5 multipliers are: holmult, sunmult, satmult, b4mult and aftr_mult.
At this point in time I use a select/case to determine which addon and which multiplier is the largest value in the respective group, this means that I have 2 expression modifiers. I think I am answering my question as I am typing . Now I need to set the addon value to "0" when the multiplier is prevalent and the multiplier to 1 when the addon is prevalent.
Thank you all for any insight,
efs
Comment