if test="company" company.party.rec_name if test="company.header" for each="line in company.header.split('\n')" line /for /if /if
for each="sale in records"
choose test=""
when test="sale.state == 'draft'"
VENTA EN BORRADOR
/when
when test="sale.state == 'quotation'"
COTIZACIÓN N° sale.number
/when
otherwise test=""
PEDIDO DE CLIENTE N° sale.number
/otherwise
/choose
CLIENTE: sale.party.full_name	C.C. / NIT: sale.party.id_number_full	FECHA: sale.sale_date or ''
DIRECCIÓN: sale.invoice_address.street	CIUDAD: sale.invoice_address.city_code and sale.invoice_address.city_code.name	TELÉFONO: sale.party.phone
DESCRIPCIÓN: sale.description or ''		EMAIL: sale.party.email
PRODUCTO	CANTIDAD	PRECIO UNITARIO	IMPUESTOS	SUB-TOTAL
for each="line in sale.lines"
choose test=""
when test="line.type == 'line'"
for each="line in line.description.split('\n')" line /for	(format_number(line.quantity, sale.party.lang, digits=line.unit_digits) + (line.unit and (' ' + line.unit.symbol) or '')) or ''	format_number(line.unit_price, company.party.lang, digits=2, monetary=sale.currency)	for each="tax in line.taxes" tax.description /for	format_currency(line.amount, company.party.lang, sale.currency)
/when
when test="line.type == 'subtotal'"
for each="line in line.description.split('\n')" line /for				format_currency(line.amount, company.party.lang, sale.currency)
/when
when test="line.type == 'title'"
for each="line in line.description.split('\n')" line /for
/when
otherwise test=""
for each="line in line.description.split('\n')" line /for
/otherwise
/choose
/for
TAXES DETAILS [ * ] BASE TOTAL for each="tax in sale.sale_taxes" tax['description'] format_number(tax['base'], sale.company.party.lang, 0, monetary=sale.currency) format_number(tax['value_tax'], sale.company.party.lang, 0, monetary=sale.currency) /for	SUBTOTAL (BASE) format_currency(sale.untaxed_amount, sale.party.lang, sale.currency) TAXES format_currency(sale.tax_amount, sale.party.lang, sale.currency) TOTAL format_currency(sale.total_amount, sale.party.lang, sale.currency)
OBSERVACIONES:
for each="comment in (sale.comment or '').split('\n')"
comment
/for
/for
TRYTON ERP | www.presik.com