May 5, 200520 yr I have not written a script before and am trying to figure out how I go about writing a script that will find all my outstanding invoices client by client and organise them into a layout that I can then print out. I would also like to detail on the statement layout the total amount of invoices which are Current, 30+days, 60+ days and have a final grand total outstanding. I have a status field on my invoice layout which details the invoice status i.e Pending, Invoiced, Paid etc... I would also need to include data from other invoice fields in the statement i.e PO number, Invoice number etc... Has anyone encountered a thread that deals with this or can anyone help me write a script that will do the above thanks in advance for any help Diane
May 14, 200520 yr First create a calculation field that calculates the aging of the invoice, text, case(get ( currentdate ) - Date < 30, "Current", case(get ( currentdate ) - Date < 60 , "30+ days", "60+ days" where Date is the field of due date for invoice. This will place the text Current, 30+ days or 60+ days depending upon aging. Create a summary field that is sum of total amount of invoice. Then create a layout with the necessary info on invoices, with the summary field in a sub-summary part sorted by the calculation field. Also place a trailing grand summary, both parts with the summary field totaling invoices. Then create a script that: Go to layout you just created Enter find mode, no pause set field ( invoice status , "Pending" ) Perform find sort ( calculation field ) Page setup Print Hope this gets you started. DJK
Create an account or sign in to comment