Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6024 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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?

Posted

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
Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.