<pdf>

	<version>1.0.0</version>
	<title>PDF Template Demo - Quote</title>
	<date>2026-10-05</date>
	<note>Quote demo: master / detail sections bound to array data (DataProviderArray)</note>

	<default_page>
		<orientation>P</orientation>
		<unit>mm</unit>
		<format>A4</format>
	</default_page>

	<doc_info>
		<creator>Alien Project</creator>
		<author>#MBR</author>
		<title>PDF Quote Demo</title>
		<subject>Copyright (C) 2026 - Alien Project</subject>
		<keywords>quote, estimate, pdf, example</keywords>
	</doc_info>

	<section id="quote" y_start="0" rows_count="1">
		<!-- A new page is generated for each quote (data row of the "quote" section) -->
		<page format="A4" orientation="P"/>

		<!-- For debug, set BORDER=1 to check the box sizes -->
		<setvar name="BORDER" value="0"/>
		<setvar name="COLOR_DARK" value="1f3a5f"/>
		<setvar name="COLOR_ACCENT" value="2e75b6"/>
		<setvar name="COLOR_SOFT" value="eef3f9"/>
		<setvar name="COLOR_LINE" value="dde4ed"/>
		<setvar name="COLOR_TEXT" value="222222"/>
		<setvar name="COLOR_GREY" value="6c757d"/>
		<setvar name="COLOR_WHITE" value="ffffff"/>
		<!-- Number format: 1,234.56 USD -->
		<setvar name="NUMERICDECIMALSEPARATOR" value="."/>
		<setvar name="NUMERICTHOUSANDSEPARATOR" value=","/>
		<setvar name="CURRENCYSYMBOL" value=" USD"/>

		<print_content>quote_header</print_content>
		<print_content>quote_details_header</print_content>

		<section id="quote_det" row_height="8" rows_count="12">
			<!-- Up to 12 lines per page, starting from the y position of the "quote_details_row" content -->
			<print_content>quote_details_row</print_content>
		</section>

		<print_content>quote_footer</print_content>
	</section>

	<section id="finalize">
		<output>
			<dest>I</dest>
			<name>quote.pdf</name>
			<isUTF8>true</isUTF8>
		</output>
	</section>

	<!-- ********************************** -->

	<content id="quote_header">
		<!-- Top band with the company data -->
		<box x="0" y="0" width="210" height="42" border="0" text="">
			<fill type="S" color="{COLOR_DARK}"/>
		</box>
		<fill type="N"/>
		<box x="15" y="10" width="110" height="9" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{COMPANY_NAME}</text>
			<font family="Helvetica" style="B" size="18" color="{COLOR_WHITE}"/>
		</box>
		<box x="15" y="21" width="110" height="15" border="{BORDER}" horizalign="Left" vertalign="Top">
			<text>{COMPANY_ADDRESS} - {COMPANY_CITY}
Phone {COMPANY_PHONE} - {COMPANY_EMAIL}
{COMPANY_WEBSITE} - {COMPANY_VAT}</text>
			<font family="Helvetica" style="N" size="8.5" color="c9d6e8"/>
		</box>
		<box x="120" y="9" width="75" height="12" border="{BORDER}" horizalign="Right" vertalign="Center">
			<text>QUOTE</text>
			<font family="Helvetica" style="B" size="26" color="{COLOR_WHITE}"/>
		</box>
		<box x="120" y="22" width="75" height="7" border="{BORDER}" horizalign="Right" vertalign="Center">
			<text>{quote.quoteNumber}</text>
			<font family="Helvetica" style="N" size="12" color="9cc3eb"/>
		</box>

		<!-- Customer -->
		<box x="15" y="50" width="95" height="6" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>PREPARED FOR</text>
			<font family="Helvetica" style="B" size="8.5" color="{COLOR_ACCENT}"/>
		</box>
		<box x="15" y="57" width="95" height="6" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{quote.customerName}</text>
			<font family="Helvetica" style="B" size="11" color="{COLOR_TEXT}"/>
		</box>
		<box x="15" y="63" width="95" height="20" border="{BORDER}" horizalign="Left" vertalign="Top">
			<text>{quote.contactName}
{quote.addressLine1}
{quote.city}
{quote.country}</text>
			<font family="Helvetica" style="N" size="9.5" color="{COLOR_TEXT}"/>
		</box>

		<!-- Quote data -->
		<font family="Helvetica" style="N" size="9" color="{COLOR_GREY}"/>
		<box x="125" y="50" width="32" height="6" border="{BORDER}" horizalign="Left" vertalign="Center"><text>Quote date</text></box>
		<box x="125" y="57" width="32" height="6" border="{BORDER}" horizalign="Left" vertalign="Center"><text>Valid until</text></box>
		<box x="125" y="64" width="32" height="6" border="{BORDER}" horizalign="Left" vertalign="Center"><text>Reference</text></box>
		<box x="125" y="71" width="32" height="6" border="{BORDER}" horizalign="Left" vertalign="Center"><text>Sales rep</text></box>
		<font family="Helvetica" style="B" size="9" color="{COLOR_TEXT}"/>
		<box x="157" y="50" width="38" height="6" border="{BORDER}" horizalign="Right" vertalign="Center"><text>{quote.quoteDate}</text></box>
		<box x="157" y="57" width="38" height="6" border="{BORDER}" horizalign="Right" vertalign="Center"><text>{quote.validUntil}</text></box>
		<box x="157" y="64" width="38" height="6" border="{BORDER}" horizalign="Right" vertalign="Center"><text>{quote.reference}</text></box>
		<box x="157" y="71" width="38" height="6" border="{BORDER}" horizalign="Right" vertalign="Center"><text>{quote.salesRep}</text></box>

		<!-- Subject -->
		<rectangle x1="15" y1="87" x2="195" y2="96" radius="1.5" border="1111">
			<linestyle width="0"/>
			<fill type="S" color="{COLOR_SOFT}"/>
		</rectangle>
		<box x="18" y="87" width="175" height="9" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>Subject: {quote.subject}</text>
			<font family="Helvetica" style="B" size="10" color="{COLOR_DARK}"/>
		</box>
	</content>

	<!-- ********************************** -->

	<content id="quote_details_header">
		<font family="Helvetica" style="B" size="8" color="{COLOR_ACCENT}"/>
		<fill type="N"/>
		<box x="15" y="102" width="20" height="8" border="{BORDER}" horizalign="Left" vertalign="Center"><text>CODE</text></box>
		<box x="35" y="102" width="80" height="8" border="{BORDER}" horizalign="Left" vertalign="Center"><text>DESCRIPTION</text></box>
		<box x="115" y="102" width="18" height="8" border="{BORDER}" horizalign="Center" vertalign="Center"><text>QTY</text></box>
		<box x="133" y="102" width="24" height="8" border="{BORDER}" horizalign="Right" vertalign="Center"><text>UNIT PRICE</text></box>
		<box x="157" y="102" width="12" height="8" border="{BORDER}" horizalign="Center" vertalign="Center"><text>DISC.</text></box>
		<box x="169" y="102" width="26" height="8" border="{BORDER}" horizalign="Right" vertalign="Center"><text>AMOUNT</text></box>
		<line x="15" y="110" width="180" height="1">
			<orientation>HorizontallyTop</orientation>
			<linestyle width="0.4" color="{COLOR_DARK}"/>
		</line>
	</content>

	<!-- ********************************** -->

	<content id="quote_details_row">
		<fill type="N"/>
		<box x="15" y="110" width="20" height="8" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{quote_det.code}</text>
			<font family="Helvetica" style="N" size="7.5" color="{COLOR_GREY}"/>
		</box>
		<font family="Helvetica" style="N" size="9" color="{COLOR_TEXT}"/>
		<box x="35" y="110" width="80" height="8" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{quote_det.description}</text></box>
		<box x="115" y="110" width="18" height="8" border="{BORDER}" horizalign="Center" vertalign="Center"><text>{quote_det.quantity} {quote_det.unit}</text></box>
		<box x="133" y="110" width="24" height="8" border="{BORDER}" horizalign="Right" vertalign="Center" format="C2"><text>{quote_det.unitPrice}</text></box>
		<box x="157" y="110" width="12" height="8" border="{BORDER}" horizalign="Center" vertalign="Center"><text>{quote_det.discountText}</text></box>
		<box x="169" y="110" width="26" height="8" border="{BORDER}" horizalign="Right" vertalign="Center" format="C2">
			<text>{quote_det.amount}</text>
			<font family="Helvetica" style="B" size="9" color="{COLOR_TEXT}"/>
		</box>
		<line x="15" y="118" width="180" height="1">
			<orientation>HorizontallyTop</orientation>
			<linestyle width="0.2" color="{COLOR_LINE}"/>
		</line>
	</content>

	<!-- ********************************** -->

	<content id="quote_footer">
		<fill type="N"/>

		<!-- Terms and notes -->
		<box x="15" y="212" width="95" height="6" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>TERMS &amp; NOTES</text>
			<font family="Helvetica" style="B" size="8.5" color="{COLOR_ACCENT}"/>
		</box>
		<box x="15" y="219" width="95" height="34" border="{BORDER}" horizalign="Left" vertalign="Top">
			<text>Payment: {quote.paymentTerms}
Delivery: {quote.deliveryTerms}
Items: {quote.itemsCount}

{quote.notes}</text>
			<font family="Helvetica" style="N" size="8.5" color="{COLOR_TEXT}"/>
		</box>

		<!-- Totals -->
		<font family="Helvetica" style="N" size="9" color="{COLOR_GREY}"/>
		<box x="120" y="212" width="45" height="6" border="{BORDER}" horizalign="Right" vertalign="Center"><text>Gross amount</text></box>
		<box x="120" y="219" width="45" height="6" border="{BORDER}" horizalign="Right" vertalign="Center"><text>Discounts</text></box>
		<box x="120" y="226" width="45" height="6" border="{BORDER}" horizalign="Right" vertalign="Center"><text>Subtotal</text></box>
		<box x="120" y="233" width="45" height="6" border="{BORDER}" horizalign="Right" vertalign="Center"><text>Sales tax {quote.taxPerc}%</text></box>
		<font family="Helvetica" style="B" size="9" color="{COLOR_TEXT}"/>
		<box x="165" y="212" width="30" height="6" border="{BORDER}" horizalign="Right" vertalign="Center" format="C2"><text>{quote.grossTotal}</text></box>
		<box x="165" y="219" width="30" height="6" border="{BORDER}" horizalign="Right" vertalign="Center" format="C2"><text>-{quote.discountTotal}</text></box>
		<box x="165" y="226" width="30" height="6" border="{BORDER}" horizalign="Right" vertalign="Center" format="C2"><text>{quote.subtotal}</text></box>
		<box x="165" y="233" width="30" height="6" border="{BORDER}" horizalign="Right" vertalign="Center" format="C2"><text>{quote.taxAmount}</text></box>
		<rectangle x1="120" y1="242" x2="195" y2="253" radius="1.5" border="1111">
			<linestyle width="0"/>
			<fill type="S" color="{COLOR_DARK}"/>
		</rectangle>
		<box x="123" y="242" width="30" height="11" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>TOTAL</text>
			<font family="Helvetica" style="B" size="10" color="{COLOR_WHITE}"/>
		</box>
		<box x="150" y="242" width="43" height="11" border="{BORDER}" horizalign="Right" vertalign="Center" format="C2">
			<text>{quote.total}</text>
			<font family="Helvetica" style="B" size="13" color="{COLOR_WHITE}"/>
		</box>

		<!-- Acceptance -->
		<rectangle x1="15" y1="260" x2="100" y2="282" radius="1.5" border="1111">
			<linestyle width="0.3" color="{COLOR_LINE}"/>
			<fill type="N"/>
		</rectangle>
		<box x="18" y="261" width="80" height="5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>Customer acceptance (date and signature)</text>
			<font family="Helvetica" style="N" size="7.5" color="{COLOR_GREY}"/>
		</box>
		<rectangle x1="110" y1="260" x2="195" y2="282" radius="1.5" border="1111">
			<linestyle width="0.3" color="{COLOR_LINE}"/>
			<fill type="N"/>
		</rectangle>
		<box x="113" y="261" width="80" height="5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>For {COMPANY_NAME}</text>
			<font family="Helvetica" style="N" size="7.5" color="{COLOR_GREY}"/>
		</box>
		<image x="135" y="266" width="40" height="15">
			<file>./images/smith.png</file>
		</image>

		<box x="15" y="286" width="180" height="5" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>{quote.quoteNumber} - {COMPANY_NAME} - {COMPANY_WEBSITE} - Prices in US dollars, valid until {quote.validUntil}</text>
			<font family="Helvetica" style="I" size="7" color="{COLOR_GREY}"/>
		</box>
	</content>

</pdf>
