1 (edited by zi 12/07/2017 07:11:24 am)

Topic: Repeating line items block inside single invoice page

I am trying to print invoice as multiple leaves on single page, I am able to create a block by hit and trial already, but it seems I can't find out how to control/duplicate the line items into 2nd and 3rd block.

https://monosnap.com/file/ibnktD6fedx1H … hylnWhUMbP

Can some one point me in right direction?

Post's attachments

FA_Inv_duplicate.png 60 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Repeating line items block inside single invoice page

Lines 344 onwards in reporting/rep107.php cycle through the line items which is what you need to put into some javascripted set of tabs.

Re: Repeating line items block inside single invoice page

may be the query has duplicates, try to run the query separately on direct phpmyadmin or mysql workbench to check the results.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Repeating line items block inside single invoice page

apmuthu wrote:

Lines 344 onwards in reporting/rep107.php cycle through the line items which is what you need to put into some javascripted set of tabs.

Did u mean L144?

Also it is pdf invoice which I am referring to.

Re: Repeating line items block inside single invoice page

Stands corrected:
Line 146 in reporting/rep107.php:

               $result = get_customer_trans_details(ST_SALESINVOICE, $row['trans_no']);

gets the line items from the function (defined in sales/includes/db/cust_trans_details_db.inc) used above like:

SELECT line.*,
       line.unit_price+line.unit_tax AS FullUnitPrice,
       line.description AS StockDescription,
       item.units, item.mb_flag
FROM 1_debtor_trans_details line,1_stock_master item
WHERE (
       (debtor_trans_no=1) -- 1st Transaction in Demo Co
       AND debtor_trans_type=10 -- ST_SALESINVOICE
       AND item.stock_id=line.stock_id
)
ORDER BY id

This result having the invoice's line items are cycled through from lines 148 to 181 in reporting/rep107.php.