Jump to content

script to create Invoice from Cust Record


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

Recommended Posts

I don't like the structure of your system. It is not logical to me to create a client record on-the-fly from an invoice not least because of the problems you are seeing when invoicing a repeat customer.

What is more logical to me is:

1. check if client exists (Client table)

2. if not, create a new client record

3. client exists, create new invoice for customer

When you create a new invoice from a customer record, it is a scripted process that first records the current customer ID as a variable, and then jumps to the Invoice layout, creates a new invoice and sets the customer ID using the variable value

Can anyone provide a script for this? I currently have 4 tables and layouts: Invoice, Clients, Services, Lines items each with their own auto entered id's and related fields. I been really learning a lot with the redesign business and invoicing coming from a "flat file" mindset . . . and still learning more with now scripting. Any help would be greatly appreciated.

-brian

Link to comment
Share on other sites

  • 2 weeks later...

Script:

NewWindow

Goto layout based upon Invoice

New Record

Set field CustomerID [Get (scriptparameter) ] assuming CustomerID is the key joining Invoice to Customer

From a button on the layout customer, create a button that calls this script and passes the CustomerID as the parameter.

Link to comment
Share on other sites

This topic is 6500 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.