{literal}
{/literal}

Rejestr zakupu
{$company_name}
Data wygenerowania: {$current_date_formatted}
Rejestr od: {$date_from} do: {$date_to}

{literal}

{DATE j.m.Y} | {PAGENO}/{nbpg} | Rejestr zakupu

SAAS-SYSTEMS | {PAGENO}/{nbpg} | {DATE j-m-Y}

{/literal}
{assign var=counter value=1} {foreach from=$dataPart key=klucz item=data name=data}

{foreach from= $vat_value key= t item= w}
{if $w.sumavat != NULL}
{/if} {/foreach}
Lp | {$MOD.LBL_DOC_NUMBER} | {$MOD.LBL_CREATE_LAB} | {$MOD.LBL_SALE_DATE} | {$MOD.LBL_SALES_NIP} | {$MOD.LBL_LIST_SUBJECT} | {$MOD.LBL_BUYER_VALUE_BRUTTO} | {$MOD.LBL_BUYER_VALUE_NETTO} {$t} | {$MOD.LBL_VAT} {$t} | {$MOD.LBL_SUM_VAT}
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
{foreach from= $data key= k item= i}
{foreach from=$vat_value key=o item=j} {assign var=prawdafalsz value=false} {foreach from=$i.vaty item = e} {if $o == $e.vat_value} {assign var=prawdafalsz value=true} {assign var=prawdafalszvat value=$e.vat} {assign var=prawdafalsznetto value=$e.netto} {/if} {/foreach} {if $prawdafalsz == true }
{if $j.sumavat != NULL}
{/if} {else}
{if $j.sumavat != NULL}
{/if} {/if} {/foreach}
{$counter} | {$i.document_number} | {$i.document_date|date_format:"%d.%m.%Y"} | {$i.register_date|date_format:"%d.%m.%Y"} | {$i.to_vatid} | {$i.name} | {$i.value|number_format:2:",":"."} | {$prawdafalsznetto|number_format:2:",":"."} | {$prawdafalszvat|number_format:2:",":"."} | 0,00 | 0,00 | {$i.vatsumapozycja|number_format:2:",":"."}
{assign var=counter value=$counter+1} {/foreach}
{foreach from=$pageVatSum[$klucz] key =vatName item=vatValue}
{if $vatValue.vat != 'null' || $vatValue.vat=='0'}
{/if} {/foreach}
{$MOD.LBL_PAGE_SUM} | {$pageBruttoVat[$klucz].brutto|number_format:2:",":"."} | {$vatValue.netto|number_format:2:",":"."} | {$vatValue.vat|number_format:2:",":"."} | {$pageBruttoVat[$klucz].vat|number_format:2:",":"."}
{if $klucz>0} {assign var='dupa' value=$klucz-1} {foreach from=$partialVatSum[$dupa] key =vatName item=vatValue}
{if $vatValue.vat != 'null' || $vatValue.vat=='0'}
{/if} {/foreach} {else} {foreach from=$partialVatSum[$klucz] key =vatName item=vatValue}
{if $vatValue.vat != 'null' || $vatValue.vat=='0'}
{/if} {/foreach} {/if}
{$MOD.LBL_TRANSFER_SUM} | {$partialBruttoVat[$klucz].brutto-$pageBruttoVat[$klucz].brutto|number_format:2:",":"."} | {$vatValue.netto|number_format:2:",":"."} | {$vatValue.vat|number_format:2:",":"."} | 0,00 | 0,00 | {$partialBruttoVat[$klucz].vat-$pageBruttoVat[$klucz].vat|number_format:2:",":"."}
{foreach from=$partialVatSum[$klucz] key =vatName item=vatValue}
{if $vatValue.vat != 'null' || $vatValue.vat=='0'}
{/if} {/foreach}
{$MOD.LBL_VALUE} | {$partialBruttoVat[$klucz].brutto|number_format:2:",":"."} | {$vatValue.netto|number_format:2:",":"."} | {$vatValue.vat|number_format:2:",":"."} | {$partialBruttoVat[$klucz].vat|number_format:2:",":"."}

{if !$smarty.foreach.data.last} <newpage> {/if} {/foreach}