G$ Posted October 2, 2007 Posted October 2, 2007 I have a database which we use for quotes (at least once I finish it). It has repeating fields of item, description, price and extended. I need to make it so if discount is entered as a item, that the price calculates the qty and the last extended (line item discount... percentage of the last extended line). I've tried everything and am about ready to give up... HELP! Thanks
Ender Posted October 2, 2007 Posted October 2, 2007 Why don't you just enter your discount as a negative price? Why does it matter if it's applied to the previous entry? Have you tried structuring your solution using a portal of related records instead of a repeating field? This makes things easier in the long run.
G$ Posted October 2, 2007 Author Posted October 2, 2007 Why don't you just enter your discount as a negative price? Why does it matter if it's applied to the previous entry? Have you tried structuring your solution using a portal of related records instead of a repeating field? This makes things easier in the long run. Entering it as a negative price involves calculating manually. Never a big fan of doing things that a computer can do (automatically). It would have to be applied to the previous entry since line 2 would be a discount of the previous line's "Extended". I will investigate these "portals" you speak of... perhaps I can come up with a better mousetrap!
Søren Dyhr Posted October 2, 2007 Posted October 2, 2007 Never a big fan of doing things that a computer can do (automatically) Why not ask a stonemason to issue quotes and invoices on your behalf? --sd
Ender Posted October 2, 2007 Posted October 2, 2007 I still don't understand. What's being calculated manually? Is your discount a percent? If so, where do you get (or put) the percent?
G$ Posted October 2, 2007 Author Posted October 2, 2007 (edited) I've attached a photo of the quote db. The first line would be a product (price gets pulled via relationship to parts DB). Line 2 (my lines are misnumbered and still working on that...) would be a product called "Discount" that will take extended from the line 1's (or x-1) field and calculate accordingly. (quantity * previous repetition extended /100) It really makes sense in my head... it's trying to convey it to the world... Edited October 2, 2007 by Guest
comment Posted October 2, 2007 Posted October 2, 2007 If the discount is intended to apply to the item above it (and only to the item above it), it should be entered into the same line into a dedicated discount field, as a part of the same item. It will make things much easier, and after all a discount is NOT a product. Nor related directly to your question, but important: you should not use repeating fields for this, but a related LineItems table, where each line is a separate record.
G$ Posted October 2, 2007 Author Posted October 2, 2007 never thought about that... a table inside a table... Thanks for the advice! Back to work for me!
Recommended Posts
This topic is 6322 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now