Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Print Unpaid Invoices from current Customer

Featured Replies

Hello,

I hope someone can bring light to the dark where I am at the moment with what seemed to be a simple script...

So what I am trying to achieve is to print at once all open invoices from a current customer (in this case only 2 out of 3 invoices), so my script looks like this:

Tables:

ACT = Accounts

INV= Invoices

INL = Invoice Line

Relationships:

ACT (___ACT) = act_INV(__f_ACT) then I have from act_INV (___INV) = act_inv_INL (__f_INV)

From Accounts Layout I have a portal that shows all invoices related to that account, and there I have placed a button with the follwoing script:

Layout for the print: Print Unpaid invoice (based on act_inv_INL)

Script:

----------------

Set variable $id = ACT::___ACT

Set variable $status = "Open"

Go to layout (act_INV)

Enter Find Mode

Set field: act_INV:: __f_ACT with $id

Set field act_INV::status = $status

Perform find (this will give me 2 found records on layout act_INV)

Go to related record: act_inv_INL on layout Print Unpaid invoice and match all related records from found set.

Enter Preview

Print Setup

-------------

And I can not pass from here, it will put together all lineitems under the same invoice and show only one invoice total, even though it show all line items from the two invoices. I have tried different relationships but I cant figure out what I am doing wrong ...

Any lead would be really much appreciated,

Thanks a lot...

If you want to print multiple invoices from a layout of line items, you need to have a sub-summary part by InvoiceID. Place any fields from the parent Invoices table, as well as any summary fields from the line items table,  in this part. Then, when you sort the line items records by the same InvoiceID, you will have the sub-summary part separating between the different invoices.

If you want, you can have the sub-summary part start a new page, so that each invoice is printed on a separate page. 

And, of course, you can have the sub-summary part leading or trailing - or both.

 

 

Edited by comment

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.