Skip to content

Commit

Permalink
add print adjustments for extendend and pdf version
Browse files Browse the repository at this point in the history
  • Loading branch information
kyob committed Oct 14, 2016
1 parent 8b46c05 commit c186d9f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions modules/invoicereport.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,20 @@ function set_taxes($taxid)
$SMARTY->assign('pagescount', sizeof($pages));
$SMARTY->assign('reccount', $reccount);
if (strtolower(ConfigHelper::getConfig('phpui.report_type')) == 'pdf') {
$SMARTY->assign('printcustomerid', $_POST['printcustomerid']);
$SMARTY->assign('printonlysummary', $_POST['printonlysummary']);
$output = $SMARTY->fetch('invoice/invoicereport-ext.html');
html2pdf($output, trans('Reports'), $layout['pagetitle'], NULL, NULL, 'L', array(5, 5, 5, 5), ($_GET['save'] == 1) ? true : false);
} else {
$SMARTY->assign('printcustomerid', $_POST['printcustomerid']);
$SMARTY->assign('printonlysummary', $_POST['printonlysummary']);
$SMARTY->display('invoice/invoicereport-ext.html');
}
}
else {
if (strtolower(ConfigHelper::getConfig('phpui.report_type')) == 'pdf') {
$SMARTY->assign('printcustomerid', $_POST['printcustomerid']);
$SMARTY->assign('printonlysummary', $_POST['printonlysummary']);
$output = $SMARTY->fetch('invoice/invoicereport.html');
html2pdf($output, trans('Reports'), $layout['pagetitle'], NULL, NULL, 'L', array(5, 5, 5, 5), ($_GET['save'] == 1) ? true : false);
} else {
Expand Down
4 changes: 3 additions & 1 deletion templates/default/invoice/invoicereport-ext.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
</TD>
{/if}
</TR>
{if !isset($printonlysummary)}
{cycle values="grey,white" print=false}
{math assign=start equation="(x-1)*y" x=$item y=$rows}
{section name=invoicelist loop=$invoicelist start=$start max=$rows}
Expand All @@ -73,7 +74,7 @@
{$invoicelist[invoicelist].pdate|date_format:"%d.%m.%Y"}
</TD>
<TD>
<B>{$invoicelist[invoicelist].custname}</B> ({$invoicelist[invoicelist].customerid|string_format:"%04d"}){if $invoicelist[invoicelist].ten}, {$invoicelist[invoicelist].ten}{/if}<BR>
<B>{$invoicelist[invoicelist].custname}</B> {if !isset($printcustomerid)}({$invoicelist[invoicelist].customerid|string_format:"%04d"}){/if}{if $invoicelist[invoicelist].ten}, {$invoicelist[invoicelist].ten}{/if}<BR>
{$invoicelist[invoicelist].custaddress}
</TD>
{if $doctype == 'invoices'}
Expand All @@ -99,6 +100,7 @@
{/if}
</TR>
{/section}
{/if}
<TR>
<TD COLSPAN="4" ALIGN="RIGHT" class="HEADGREY">
<B>{trans("Page total:")}</B>
Expand Down

0 comments on commit c186d9f

Please sign in to comment.