{$COMPANY_NAME}
Data wydruku: {$CUR_DATE}
Rejestr sprzedaży VAT za okres od {$DATE_FROM} do {$DATE_TO}
Strona {literal}{PAGENO} z {nbpg}{/literal}

Ustawienia raportu:
Magazyn: {$S_STOCK}
Rodzaj: {$S_KIND}
Kategoria: {$S_CATEGORY}
Typ: {$S_TYPE}

{foreach from=$PAGES item=PAGE name=page"} {assign var=pagesCount value=$PAGES|@count} {assign var=vatColSize value=0} {math assign="vatColSize" equation="round(57/($vatsCount))" }

Lp. | Nr dok. | Data wyst. | Odbiorca - NIP,Konto KS, Nazwa, Adres
--- | --- | --- | ---
{foreach from=$VATS key=vat_name item=i}
{if $i=='2'}
{/if} {/foreach}
Sprz. brutto | Sprz. netto | Netto {$vat_name} | VAT {$vat_name} | VAT Razem | Koszt
{foreach from=$PAGE.rows item=row} {if $row.is_summary!=1}
{$row.lp} | {$row.document_no} | {$row.register_date} | {$row.parent_info}
{foreach from=$row.vats item=v key=k}
{if $VATS.$k == '2'}
{/if} {/foreach}
{$row.brutto|number_format:2:",":"."} | {$row.netto|number_format:2:",":"."} | {$v[0]|number_format:2:",":"."} | {$v[1]|number_format:2:",":"."} | {$row.vat|number_format:2:",":"."} | {$row.purchase|number_format:2:",":"."}
{else}
Razem - {$row.index}
{foreach from=$row.vats item=v key=k}
{if $VATS.$k == '2'}
{/if} {/foreach}
| {$row.total_brutto|number_format:2:",":"."} | {$row.total_netto|number_format:2:",":"."} | {$v[0]|number_format:2:",":"."} | {$v[1]|number_format:2:",":"."} | {$row.total_vat|number_format:2:",":"."} | {$row.total_purchase|number_format:2:",":"."}
{/if} {/foreach}
Suma strony:
{foreach from=$PAGE.site_vats item=v key=k}
{if $VATS.$k == '2'}
{/if} {/foreach}
| {$PAGE.site_brutto|number_format:2:",":"."} | {$PAGE.site_netto|number_format:2:",":"."} | {$v[0]|number_format:2:",":"."} | {$v[1]|number_format:2:",":"."} | {$PAGE.site_vat|number_format:2:",":"."} | {$PAGE.site_purchase|number_format:2:",":"."}
Suma z przeniesienia:
{foreach from=$PAGE.moved_vats item=v key=k}
{if $VATS.$k == '2'}
{/if} {/foreach}
| {$PAGE.moved_brutto|number_format:2:",":"."} | {$PAGE.moved_netto|number_format:2:",":"."} | {$v[0]|number_format:2:",":"."} | {$v[1]|number_format:2:",":"."} | {$PAGE.moved_vat|number_format:2:",":"."} | {$PAGE.moved_purchase|number_format:2:",":"."}
Suma razem:
{foreach from=$PAGE.total_vats item=v key=k}
{if $VATS.$k == '2'}
{/if} {/foreach}
| {$PAGE.total_brutto|number_format:2:",":"."} | {$PAGE.total_netto|number_format:2:",":"."} | {$v[0]|number_format:2:",":"."} | {$v[1]|number_format:2:",":"."} | {$PAGE.total_vat|number_format:2:",":"."} | {$PAGE.total_purchase|number_format:2:",":"."}

{if $smarty.foreach.page.index != $pagesCount-1 } <newpage> {/if} {/foreach}

KONIEC WYDRUKU