I am need of a simple price calculation script that will give users a price on a Printed Circuit Board.
Here is an example:
I have a panel that is 18 dm². A customers wants 1 PCB that is 100mm X 200mm (=2 dm²). The price is 20 € pr dm² which will give the customer a price that says 40 €.
The situation can also be that he wants more than 1 PCB.
What i then need in my script is for it to calculate the PCB's width and length (100mm X 200mm) and convert it to dm² and then multiple that number with the quantity of boards and then the price per dm².
Like so: 100mm x 200mm = (2dm²) x 4 PCB's x 20€ = 160€
Additionally there could be some static values that should be added to the price. For example if the customer wants the board to be electrical tested he should pay 10 € extra, which would then be added to the final cost price.
Hope someone can get me started with this script.
I would be very gratefull to anyone who could help me.
Best regards
Here is an example:
I have a panel that is 18 dm². A customers wants 1 PCB that is 100mm X 200mm (=2 dm²). The price is 20 € pr dm² which will give the customer a price that says 40 €.
The situation can also be that he wants more than 1 PCB.
What i then need in my script is for it to calculate the PCB's width and length (100mm X 200mm) and convert it to dm² and then multiple that number with the quantity of boards and then the price per dm².
Like so: 100mm x 200mm = (2dm²) x 4 PCB's x 20€ = 160€
Additionally there could be some static values that should be added to the price. For example if the customer wants the board to be electrical tested he should pay 10 € extra, which would then be added to the final cost price.
Hope someone can get me started with this script.
I would be very gratefull to anyone who could help me.
Best regards
Comment