Newbies Harrison Posted May 27, 2008 Newbies Posted May 27, 2008 Attempting to make an invocing system and running into problems right and left. Basically it is a database designed so that 1000 of these "slips" that simply listed a client, what was done, for how long, and when are entered into records. From there I need to figure out the best way to put many of these onto one invoice form. The trick is I need to script it so that only the ones chosen (done so by activating the script) will be added. Does anyone have a good way to go about doing this, maybe someone who has done this before?
Fitch Posted May 28, 2008 Posted May 28, 2008 Assuming that each slip is a single record, and that each one will be assigned to only one invoice: create a relationship between an Invoice ID field in the slips record to the Invoice ID of the Invoice record. The invoice (NOT the slip) should have an auto-entered Invoice ID. You'd want a script something like this: /* starting from a found set of slips that you want to assign to an invoice */ Go to layout( invoice ) New record Set variable( $id ; Invoice ID ) Go to layout( slips ) Replace Field Contents( Invoice ID ; $id ) As for printing the invoice, it's generally best to print from the line items (in this case, slips) table. This gives you the most flexibility, you aren't limited in the number of items per invoice. However it's generally useful to have an invoice layout that you can browse and search, with a portal of line items (slips) on it. If you don't anticipate more than a handful of line items then you could probably get away with printing from this layout as well.
Newbies Harrison Posted May 28, 2008 Author Newbies Posted May 28, 2008 I didn't really think of the straight forward approach of just printing using the built in features, but what I want to be able to do is something like a portal because there is a portion that always has to be at the top, and a part at the bottom with totals and things like that. The major problem is I have never used a portal before, and I can't seem to get it working. All the relationships are there, but I can't get anything to connect. I may upload the file sooner or later for review once it gets cleaned up a little bit
Recommended Posts
This topic is 6024 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