This topic is locked

select two values depending on client

7/15/2008 1:50:09 AM
PHPRunner General questions
S
swanside author

I have a table with customers and a table with engineers. My engineers have two charging rates depending on which customer.
SO if customer A has an engineer he wil be charged out at £30 per hour, but then customer B might have the same engineer and gets charged out at £25 per hour, How can I do this dependant on tables and customers?
Thanks

Paul.

J
Jane 7/15/2008

Paul,
please explain where do you want to select engineer charge: on the edit/add pages or just display correct value on the list page?

Also what format do you use for this field on the "Edit as" settings, "View as" settings dialogs on the Visual Editor tab?

S
swanside author 7/15/2008

Paul,

please explain where do you want to select engineer charge: on the edit/add pages or just display correct value on the list page?

Also what format do you use for this field on the "Edit as" settings, "View as" settings dialogs on the Visual Editor tab?


I was hoping to do something in the visual editor based upon customer selection.
If I was cahrged out at £25 per hour on some customers. but on another customer was charged at £35 per hour.
I could edit my enginees table and include two entries per engineer, so I would have Engineer_Name, Cost_Per_Hour, Customer

then have Paul, £35, CUstomer_A and the next line would be Paul, £25, Customer_B so the value would be displayed on the view and list pages?
At the moment they are set as Text ARea as we input the cost as we go along.
Thanks
Paul.

mikue from germany 7/15/2008

Hi Paul,
may I suggest a typical solution for that?
Create an 3rd table named PriceList coz each customer could have a different group price negotiated

e.g. A=business B=private C=public authority. Assign PriceList record to customer then:
id, group, price

1, A, 50,00

2, B, 35,00

3, C, 25,00
Further advantage, later you have less work to change / increase prices.
Regards Michael