<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- defines the layout master -->
<fo:layout-master-set>
<fo:simple-page-master master-name="first"
page-height="297mm"
page-width="210mm"
margin-top="5mm"
margin-bottom="15mm"
margin-left="10mm"
margin-right="10mm">
<fo:region-body margin-top="5mm" margin-bottom="5mm"/>
<fo:region-before extent="5mm"/>
<fo:region-after extent="5mm"/>
</fo:simple-page-master>
</fo:layout-master-set>

<!-- starts actual layout -->
<fo:page-sequence master-reference="first">
                                                                                           
<fo:flow flow-name="xsl-region-body">

<fo:block font-family="Monotype Corsiva" text-align="center" white-space-collapse="false" font-weight="bold" font-size="20pt" >%%titlu%%</fo:block>
<fo:block font-family="Monotype Corsiva" text-align="center" white-space-collapse="false" font-weight="bold" font-size="10pt" >Serie: ATR Nr: %%nrFactura%% Data: %%data%%</fo:block>

<fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false"> </fo:block>

<fo:table table-layout="fixed" border-collapse="separate">
<fo:table-column column-width="90mm"/>
<fo:table-column column-width="90mm"/>
<fo:table-body>

<fo:table-row display-align="center" keep-with-next="always">
<fo:table-cell number-columns-spanned="1">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false">Furnizor:</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false">Cumparator:</fo:block>
</fo:table-cell>
</fo:table-row>

<fo:table-row display-align="center" keep-with-next="always">
<fo:table-cell number-columns-spanned="1" border-width="0.02mm" border-style="none">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false" font-size="14pt">%%emitent%%</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1" border-width="0.02mm" border-style="none">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false" font-size="14pt">%%beneficiar%%</fo:block>
</fo:table-cell>
</fo:table-row>

<fo:table-row display-align="center" keep-with-next="always">
<fo:table-cell number-columns-spanned="1" border-width="0.02mm" border-style="none">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false" font-size="9pt">Adresa: %%adresa_emitent%%</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1" border-width="0.02mm" border-style="none">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false" font-size="9pt">Adresa: %%adresa_beneficiar%%</fo:block>
</fo:table-cell>
</fo:table-row>

<fo:table-row display-align="center" keep-with-next="always">
<fo:table-cell number-columns-spanned="1"  border-width="0.02mm" border-style="none">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false" font-size="9pt">Nr Reg Com: %%j_emitent%%</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1"  border-width="0.02mm" border-style="none">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false" font-size="9pt">Nr Reg Com: %%j_beneficiar%%</fo:block>
</fo:table-cell>
</fo:table-row>

<fo:table-row display-align="center" keep-with-next="always">
<fo:table-cell number-columns-spanned="1" border-width="0.02mm" border-style="none">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false" font-size="9pt">CUI: %%cui_emitent%%</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1" border-width="0.02mm" border-style="none">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false" font-size="9pt">CUI: %%cui_beneficiar%%</fo:block>
</fo:table-cell>
</fo:table-row>

<fo:table-row display-align="center" keep-with-next="always">
<fo:table-cell number-columns-spanned="1"  border-width="0.02mm" border-style="none">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false" font-size="9pt">IBAN: %%cont_emitent%%</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1"  border-width="0.02mm" border-style="none">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false" font-size="9pt">IBAN: %%cont_beneficiar%%</fo:block>
</fo:table-cell>
</fo:table-row>

<fo:table-row display-align="center" keep-with-next="always">
<fo:table-cell number-columns-spanned="1" border-width="0.02mm" border-style="none">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false" font-size="9pt">Banca: %%banca_emitent%%</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1" border-width="0.02mm" border-style="none">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false" font-size="9pt">Banca: %%banca_beneficiar%%</fo:block>
</fo:table-cell>
</fo:table-row>

<fo:table-row display-align="center" keep-with-next="always">
<fo:table-cell number-columns-spanned="1" border-width="0.02mm" border-style="none">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false" font-size="9pt"> TVA 19%</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1" border-width="0.02mm" border-style="none">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false" font-size="9pt"> </fo:block>
</fo:table-cell>
</fo:table-row>

<fo:table-row display-align="center">
<fo:table-cell number-columns-spanned="2">
        <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false"> </fo:block>
</fo:table-cell>
</fo:table-row>

<fo:table-row display-align="center" keep-with-next="always">
<fo:table-cell number-columns-spanned="2">
	<fo:table table-layout="fixed" border-collapse="separate">
		<fo:table-column column-width="10mm"/> <!--nrCrt-->
		<fo:table-column column-width="85mm"/> <!--produs-->
		<fo:table-column column-width="15mm"/> <!--um-->
		<fo:table-column column-width="10mm"/> <!--cantitate-->
		<fo:table-column column-width="20mm"/> <!--ppu-->
		<fo:table-column column-width="20mm"/> <!--valoare-->
		<fo:table-column column-width="20mm"/> <!--valoare tva-->
		<fo:table-body>
			<fo:table-row display-align="center" keep-with-next="always">
				<fo:table-cell number-columns-spanned="1" border-style="solid" border-width="0.02mm">
					<fo:block font-family="Monotype Corsiva" text-align="center" white-space-collapse="false" >Nr.</fo:block>
				</fo:table-cell>
				<fo:table-cell number-columns-spanned="1" border-style="solid" border-width="0.02mm">
                        <fo:block font-family="Monotype Corsiva" text-align="center" white-space-collapse="false">Produs</fo:block>
                </fo:table-cell>
				<fo:table-cell number-columns-spanned="1" border-style="solid" border-width="0.02mm">
                    <fo:block font-family="Monotype Corsiva" text-align="center" white-space-collapse="false">UM</fo:block>
                </fo:table-cell>
				<fo:table-cell number-columns-spanned="1" border-style="solid" border-width="0.02mm">
                    <fo:block font-family="Monotype Corsiva" text-align="center" white-space-collapse="false">Cant</fo:block>
                </fo:table-cell>
				<fo:table-cell number-columns-spanned="1" border-style="solid" border-width="0.02mm">
                    <fo:block font-family="Monotype Corsiva" text-align="center" white-space-collapse="false">Pret</fo:block>
                </fo:table-cell>

		 <fo:table-cell number-columns-spanned="1" border-style="solid" border-width="0.02mm">
                    <fo:block font-family="Monotype Corsiva" text-align="center" white-space-collapse="false">Valoare</fo:block>
                </fo:table-cell>

		<fo:table-cell number-columns-spanned="1" border-style="solid" border-width="0.02mm">
                    <fo:block font-family="Monotype Corsiva" text-align="center" white-space-collapse="false">Val Tva</fo:block>
                </fo:table-cell>
			</fo:table-row>

			%%products%%

		<fo:table-row display-align="center">
	                <fo:table-cell number-columns-spanned="8"  border-width="0.02mm" border-style="none">
	                    <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false"> </fo:block>
	                </fo:table-cell>
		</fo:table-row>
		<fo:table-row display-align="center">
	                <fo:table-cell number-columns-spanned="8"  border-width="0.02mm" border-style="none">
	                    <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false"> </fo:block>
	                </fo:table-cell>
		</fo:table-row>
		<fo:table-row display-align="center">
	                <fo:table-cell number-columns-spanned="8"  border-width="0.02mm" border-style="none">
	                    <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false"> </fo:block>
	                </fo:table-cell>
		</fo:table-row>

		<fo:table-row display-align="center">
                        <fo:table-cell number-columns-spanned="8"  border-width="0.02mm" border-style="none">
                            <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false">Completat de ____________________________________ </fo:block>
                        </fo:table-cell>
                </fo:table-row>

			<fo:table-row display-align="center" keep-with-next="always">
			    <fo:table-cell number-columns-spanned="3" number-rows-spanned="1"  border-width="0.02mm" border-style="solid">
			        <fo:table table-layout="fixed" border-collapse="separate">
		                <fo:table-column column-width="30mm"/>
		                <fo:table-column column-width="80mm"/>
		                <fo:table-body>
			                <fo:table-row display-align="center" keep-with-next="always">
				                <fo:table-cell number-columns-spanned="1" border-width="0.02mm" border-style="solid">
					                <fo:block font-family="Monotype Corsiva" text-align="center" white-space-collapse="false" font-size="7pt">Semnatura si stampila furnizor</fo:block>
				                </fo:table-cell>
				                <fo:table-cell number-columns-spanned="1" border-width="0.02mm" border-style="none">
					                <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false"> Delegat: ________________________</fo:block>
					                <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false"> CNP: ____________________________</fo:block>
					                <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false"> BI/CI ____ nr _______ elib ______</fo:block>
					                <fo:block font-family="Monotype Corsiva" text-align="start" white-space-collapse="false"> Semnatura _____________________</fo:block>
				                </fo:table-cell>
                            </fo:table-row>
                        </fo:table-body>
                    </fo:table>
			    </fo:table-cell>
                <fo:table-cell number-columns-spanned="2"  border-width="0.02mm" border-style="solid">
                    <fo:block font-family="Monotype Corsiva" text-align="center" white-space-collapse="false" font-size="7pt">Semnatura de primire</fo:block>
                </fo:table-cell>

		<fo:table-cell number-columns-spanned="2"  border-width="0.02mm" border-style="solid">
	             	<fo:block font-family="Monotype Corsiva" text-align="end" white-space-collapse="false">Total: %%valoare%% </fo:block>
			<fo:block font-family="Monotype Corsiva" text-align="end" white-space-collapse="false">TVA: %%valoare_tva%% </fo:block>
			<fo:block font-family="Monotype Corsiva" text-align="end" white-space-collapse="false"> </fo:block>
			<fo:block font-family="Monotype Corsiva" text-align="end" white-space-collapse="false" font-weight="bold">Total plata: %%total_general%% </fo:block>
                </fo:table-cell>
			</fo:table-row>
		</fo:table-body>
	</fo:table>
</fo:table-cell>
</fo:table-row>

</fo:table-body>
</fo:table>

</fo:flow>
</fo:page-sequence>
</fo:root>
