angel00079
Technical User
I want to create a sales report to show how much a customer would pay. There is the sales file and the price file. Each item will have several records in the price file depending on the qty.
If there is a sales order for 16 screws I want the report to pick up the price for 15. If I only want to pick up the price record where the qty is 15 is the best option a while loop or would this still give me more than one record?
Example of Price file
Item Qty Price
Screw 1 10
Screw 5 9
Screw 10 8
Screw 15 7
Screw 20 6
Screw 25 5
Nut 1 10
Nut 5 9
Nut 10 8
Nut 15 7
Nut 20 6
Nut 25 5
If there is a sales order for 16 screws I want the report to pick up the price for 15. If I only want to pick up the price record where the qty is 15 is the best option a while loop or would this still give me more than one record?
Example of Price file
Item Qty Price
Screw 1 10
Screw 5 9
Screw 10 8
Screw 15 7
Screw 20 6
Screw 25 5
Nut 1 10
Nut 5 9
Nut 10 8
Nut 15 7
Nut 20 6
Nut 25 5