December 4, 20187 yr 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...
December 4, 20187 yr 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 December 4, 20187 yr by comment
Create an account or sign in to comment