FR-Tickets & Invoices templates
- Mounir Zalim
- Frank Louwerse (Deactivated)
- 1 Objectif
- 2 Tickets
- 3 Factures
- 3.1 Default template
- 3.1.1 Customer_bill
- 3.1.1.1 Main templates
- 3.1.1.2 Subtemplates
- 3.1.2 Paying Customer_bill
- 3.1.2.1 Main templates
- 3.1.2.2 Subtemplates
- 3.1.1 Customer_bill
- 3.1 Default template
Objectif
Le but de cet article est de décrire comment configurer et envoyer les sorties du système (tickets et factures) qui sont conformes à la réglementation française.
Tickets
Lorsqu'une transaction POS est effectuée dans MXTS Front Office Manager, l'imprimante de reçus est automatiquement déclenchée une fois le paiement traité. Le reçu ne peut pas être réimprimé.
Le contenu du reçu est configurable par Maxxton au gré de nos clients, pour contenir par exemple le texte "merci pour votre achat". Pour se conformer à la réglementation française, il est important que le ticket de caisse contienne les balises suivantes qui récupèrent les données dynamiquement depuis la base de données :
Tag | Objectif |
---|
Tag | Objectif |
---|---|
$document_id | Affiche le numéro séquentiel du document sur le ticket |
$document_type | Indique le type de document. Par exemple, 'TICKET' (ventes en caisse) ou 'INVOICE' (réservations checked_out). |
$operation_type | Indique le type d'opération sur le ticket. Par exemple, 'SALE' pour une transaction positive, 'REFUND' pour une transaction négative. |
$company_details | Indique les détails de l'entité juridique de la société qui a émis le ticket. |
$signature | Affiche l'extrait de signature sur le billet (3ème, 7ème, 13ème et 19ème position de la signature). |
$nf525_version | NF525 version |
$reservation_bill_lines | Affiche les détails de la transaction |
$employee_name | Nom du vendeur |
$employee_id | Code du vendeur |
$bill_line_resource_count | Nombre de lignes de facturation pour le ticket |
$reservation_bill_lines_with_quantity | Données de la ligne de facture, y compris la quantité et le prix unitaire, TVA comprise. |
$nf525ReservationTaxList with child tags
| Affichage du montant total du ticket, TVA comprise, et du montant total du ticket, TVA non comprise. |
$resourceTotalPerTaxList with child tags
| Affichage du montant total incluant la TVA, par taux de TVA |
Default template
Nom du caissier : $employee_name
ID du caissier : $employee_id
Nombre de lignes : $bill_line_resource_count
$separator
$document_type | B525/0420 | $signature | $nf525_version
$separator
#if($has_customer)
$customer_name
$customer_address
$customer_zipcode_city
$separator
#end
#if($reservation_type == "c")
$legal_name | au capital de $social_capital |
Siège social $company_details
$rcs_city_of_registration $rcs |
SIRET: $siret | APE: $ape_code |
Nr TVA intracommunautaire: $vat_number
$separator
Numéro de ticket : $document_id
Numéro d'impression $no_of_prints
#else
Numéro de réservation : $reservation_number
#if($reservation_type == "r")
Hébergement : $object_names
Arrivée : $arrival_date $checkin_time
Départ : $departure_date $checkout_time
#end
#end
$separator
$reservation_bill_lines_with_quantity
$separator
$total_resource_amount_incl_tax
$total_resource_amount_excl_tax
$resourceAmountInclPerTax
$resourceAmountExclPerTax
$separator
$operation_type
Factures
Lorsqu'une réservation est mise à jour en statut check_out, le service est délivré et le revenu est donc définitif. La mise à jour d'une réservation au statut checked_out est le déclencheur pour enregistrer le type de document et l'ID séquentiel, qui peuvent ensuite être affichés sur la facture. La facture doit donc toujours être envoyée une fois le service fourni, c'est-à-dire lorsque la réservation est mise à jour en check_out.
Le contenu de la facture peut être configuré par Maxxton à la convenance de nos clients, pour contenir du texte et des logos spécifiques au client. Pour se conformer à la réglementation française, il est important que le modèle de facture contienne les balises suivantes qui récupèrent les données dynamiquement depuis la base de données :
Tag | Objectif |
---|
Tag | Objectif |
---|---|
$document_id | Affiche le numéro séquentiel du document sur la facture |
$document_type | Indique le type de document sur la facture. Il s'agit toujours de "FACTURE". (Comme pour les réservations annulées, des frais peuvent également être appliqués et sont facturés aux clients). |
$reservation_resort | Afficher le nom du centre de vacances |
$reservation_resortaddress1 | Affichage de l'adresse du lieu de villégiature |
$reservation_resortzipcode | Afficher le code postal du lieu de villégiature |
$reservation_resort_country | Afficher le pays du lieu de villégiature |
$resort_siret (dynamic field) | Affichage du numéro SIRET du centre de vacances |
$customer.firstname | Prénom du client |
$customer.lastname | Nom du client |
$customer.address.address1 | Adresse du client |
$customer.address.housenumber | Numéro d'habitation du client |
$customer.address.housenumberSuffix | Suffixe du numéro d'habitation du client |
$customer.address.zipcode | Code postal du client |
$customer.address.city | Ville du client |
$customer.address.countryName | Adresse du client |
$customer.companyName | Nom de la société (le cas échéant) |
$reservation_bill_lines | Affiche les détails de la facture |
$bill_value_excl_vat | Afficher le prix unitaire hors TVA |
$bill_total_vat | Affichage du montant total de la TVA |
$signature | Affiche l'extrait de signature sur le ticket (3ème, 7ème, 13ème et 19ème position de la signature) |
$admin_organisation_legal_name | Nom de l'entreprise émettrice |
$admin_organisation_social_capital | Capital social de l'émetteur |
$reservation_resortaddress1 | Adresse de l'émetteur |
$reservation_resortzipcode | Code postal de l'émetteur |
$reservation_resortcity | Ville de l'émetteur |
$reservation_resort_country | Pays de l'émetteur |
$admin_organisation_rcs_city_of_registration | Ville d'enregistrement RCS de l'émetteur |
$admin_organisation_rcs | Numéro RCS de l'émetteur |
$admin_organisation_siret | Siret de l'émetteur |
$admin_organisation_ape_code | Code APE de l'émetteur |
$admin_organisation_vat_number | Numéro de TVA de l'émetteur |
Default template
Customer_bill
Main templates
<table width="650" cellpadding="0" cellspacing="0" border="0" >
<tbody style="color:#333; text-decoration:none; font:12px Arial, Helvetica, sans-serif">
<tr>
<td>
Dear client,
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
Please find the invoice of your holiday attached.
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
Best regards,
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
Client team<br/>
</td>
</tr>
</tbody>
</table>
#foreach($acco in $accommodationList)
#set($intime = $acco.accommodation_checkintime )
#set($outtime = $acco.accommodation_checkouttime )
#end
#foreach( $bill in $groupedBillList )
#if($bill.bill_resource_type == "accommodationtype")
#set($acco_total = $bill.bill_total )
#end
#if($bill.bill_resource_type == "special")
#set($acco_special = $bill.bill_type )
#set($acco_total_special = $bill.bill_total )
#set($chk = 1)
#end
#if($bill.bill_linetype == "70")
#set($acco_all_total = $bill.bill_total)
#end
#end
#foreach( $bill in $billList )
#if($bill.bill_linetype == "70")
#set($all_total = $bill.bill_total)
#end
#end
#* Bill total excluding resource type special *#
#set($billtotal= 0)
#foreach($bill in $billList )
#if($bill.bill_payer_type == "c")
#if($bill.bill_linetype == "10")
#if($bill.bill_resource_type !="special")
#set($bill_total = $bill.bill_total.replaceAll(",", ""))
#set($billtotal= $billtotal + $convert.toNumber($bill_total))
#end
#end
#end
#end
#set($billtotal = $billtotal + "")
#set($final="")
#set($leftpart="")
#set($rightpart="")
#if($billtotal.indexOf(',') != -1 || $billtotal.indexOf('.') != -1)
#set($leftpart = $billtotal.substring(0,$billtotal.indexOf('.')))
#set($in = $billtotal.indexOf('.')+1)
#set($rightpart = $billtotal.substring($in))
#else
#set($leftpart = $billtotal)
#end
#if($leftpart.length() > 3)
#set($end = $leftpart.length() - 4)
#set($beg = 0)
#set($range = [$end..$beg])
#foreach($i in $range)
#set($j = $i + 1)
#set($final = $leftpart.substring(0,$j)+","+$leftpart.substring($j))
#set($leftpart = $final)
#set($i = $i - 3)
#end
#end
#if($rightpart.length() == 0)
#set($rightpart = "00")
#elseif($rightpart.length()== 1)
#set($rightpart = $rightpart + "0")
#end
#set($final = $leftpart + "." + $rightpart)
#* Bill total excluding resource type special end *#
#set($dueAmount= "")
#foreach( $bill in $billList )
#if($bill.bill_payer_type == "c")
#if ($bill.bill_linetype == "90")
#set($billTotal= $convert.toNumber($bill.bill_total))
#if($billTotal > 0)
#set($dueAmount= "true")
#end
#end
#end
#end
<table width="625" border="0" cellspacing="0" cellpadding="0">
<tbody style="font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#3B3131; line-height:18px">
<tr>
<td width="10" > </td>
<td>
<table width="595" border="0" cellspacing="0" cellpadding="0">
<tbody style="font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#3B3131; line-height:18px">
<tr>
<td> </td>
</tr>
<tr>
<td style="font-size: 35px;"><b>Facture</b></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td colspan="3">
<table width="595" border="0" cellspacing="0" cellpadding="0">
<tbody style="font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#3B3131; line-height:18px">
#set ( $currentDate = "$current_date")
<tr>
<td valign="top">
#if($customer_companyname !="")
$customer_companyname
#end
#if($customer_company_identification_number != "") $customer_company_identification_number #end
#if($customer_vat_number != "")$customer_vat_number #end <br/>
<b> $customer_title $customer_firstname $customer_middlename $customer_lastname </b><br/>
$customer_housenumber $customer_address1<br/>
$customer_zipcode $customer_city<br/>
$customer_country<br/><br/><br/>
#foreach ($doc in $documentTagList)
#if( $doc.document_id != "")
Numéro de facture: $doc.document_id<br/>
#end
#break
#end
Date de facturation: $dateFormatter.format("currentDate" , "dd-MM-yyyy") <br/>
Numéro de réservation: $reservation_reservationnumber<br/>
</td>
<td valign="top">
<!-- #if( $!paying_customer_company_name) $paying_customer_company_name #end -->
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3" style="padding-bottom:8px"><b>VOTRE SÉJOUR:</b></td>
</tr>
<tr>
<td colspan="3"> <hr style="border-bottom:1px solid #e5e5e5" /></td>
</tr>
<tr>
<td width="160" height="25" valign="top"><b>Nom du camping:</b></td>
<td valign="top">$reservation_resortname </td>
<td> </td>
</tr>
<tr>
<td width="250" valign="top"><b>Type d'hébergement:</b></td>
<td valign="top">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tbody>
#foreach($acco in $accommodationList)
#if (!$acco.accommodation_is_imply)
<tr>
<td valign="top" height="25"> $acco.accommodation_name#if($acco.object_preference == "1"), $acco.accommodation_object #end
<br/>
</td>
</tr>
#set( $prevAcco = $acco.accommodation_object_forced )
#end
#end
</tbody>
</table>
</td>
<td> </td>
</tr>
<tr>
<td width="160" height="25" valign="top"><b>Nombre et nom des participants:</b></td>
<td valign="top">
$reservation_numberofpersons,
#foreach( $subject in $travelList )
#if( $subject.firstname != "" || $subject.lastname != "")
$subject.firstname $subject.lastname,
#end
#end
</td>
<td> </td>
</tr>
<tr>
<td width="160" height="25" valign="top"><b>Date d'arrivée: </b></td>
<td valign="top">$reservation_arrivaldate
</td>
<td> </td>
</tr>
<tr>
<td width="160" height="25" valign="top"><b>Date de départ: </b></td>
<td valign="top">$reservation_departuredate
</td>
<td> </td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
#foreach($res in $resourceList)
<tr>
<td colspan="3" style="padding-bottom:10px"> $res.infotext </td>
</tr>
#end
#foreach( $memo in $memoList )
<tr>
<td colspan="3" style="padding-bottom:10px"> <b>$memo.content</b></td>
</tr>
#end
<tr>
<td colspan="3" style="padding-bottom:8px"><b>Détails des prestations:</b></td>
</tr>
<tr>
<td colspan="3"> <hr style="border-bottom:1px solid #e5e5e5" /></td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3">
${templateTool.parseTemplate(210006)} #*VAT Bill Customer*#
</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
#if($customer_companyname !="")
<tr>
<td colspan="3">
Article L441-6 du code de commerce : tout retard de paiement donnera lieu à l’application d’une pénalité égale à
trois fois le taux d’intérêt légal de l’année en cours et une indemnité forfaitaire pour frais de recouvrement de 40 €
</td>
</tr>
#end
<tr>
<td colspan="3" style="padding-bottom:8px"><b>Répartition de la TVA:</b></td>
</tr>
<tr>
<td colspan="3">
${templateTool.parseTemplate(210007)} #*VAT Calculation*#
</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3">
#foreach ($doc in $documentTagList)
$admin_organisation_legal_name | au capital de $admin_organisation_social_capital | Siège social $reservation_resortaddress1 $reservation_resortzipcode $reservation_resortcity $reservation_resort_country
| $admin_organisation_rcs_city_of_registration $admin_organisation_rcs | SIRET: $admin_organisation_siret | APE: $admin_organisation_ape_code | N° TVA intracommunautaire: $admin_organisation_vat_number
#break
#end
</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<td colspan="3">
</td>
<tr>
<td colspan="3" align="center">
#foreach ($doc in $documentTagList)
FACTURE B525/0420 $doc.signature V$nf525_version
#end
</td>
</tr>
</tbody>
</table>
</td>
<td width="10"> </td>
</tr>
</tbody>
</table>
Subtemplates
<table width="625" border="0" cellspacing="0" cellpadding="0">
<tbody style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#3B3131; line-height:18px">
<tr>
<td width="625" valign="top" style="font-size:0; line-height:0">
<table width="625" cellpadding="0" cellspacing="0" border="0">
<tbody style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#3B3131; line-height:18px">
<tr>
<td width="250" style="color:#0078bf;"><strong>SPECIFICATION</strong></td>
<td width="80" align="right"> </td>
<td width="90" > </td>
<td width="90" align="right">VAT % </td>
<td width="110" align="right">Excl. VAT</td>
<td width="100" align="right">VAT</td>
<td width="180" align="right">Total incl. VAT</td>
</tr>
<tr>
<td colspan="7" width="625" style="line-height:5px;border-top:1px solid #000000;"> </td>
</tr>
#set($total_AllExcl_BTW = 0 )
#set($total_BTW_Amount = 0)
#set($billTotal_Amount = 0)
#set($total_BTW_Amount_total = 0)
#set($bill_Vat_ValueTotal= 0)
#set($Final_BTW_Amount_total = 0)
#set($exclTaxVal="")
#foreach($bill in $billList )
#if($bill.bill_payer_type == "c")
#if ($bill.bill_linetype !="-10" && $bill.bill_linetype != "0" && $bill.bill_linetype != "60" && $bill.bill_linetype != "40" && $bill.bill_linetype != "200" && $bill.bill_linetype != "20" && $bill.bill_linetype != "-20" && $bill.bill_linetype != "30" && $bill.bill_linetype != "80" && $bill.bill_linetype != "90" && $bill.bill_linetype != "70" )
<tr>
<td width="90">$bill.bill_type </td>
<td width="80" align="right">$bill.bill_quantity_multiplier X </td>
<td width="90" align="right">
$reservation_dc_currency_symbol $bill.bill_value
</td>
<td width="90" align="right"> #if($bill.bill_vat_rate == "0.0" || $bill.bill_vat_rate == "0,0" || $bill.bill_vat_rate == "0,0" || $bill.bill_vat_rate == "") 0 #else $convert.toNumber($bill.bill_vat_rate) #end </td>
<td width="110" align="right">
$reservation_dc_currency_symbol $bill.bill_total_excl_vat
<!-- Logic Total Excl Tax-->
#set($total_AllExcl_BTW =$convert.toDouble($total_AllExcl_BTW) + $convert.toDouble($bill.bill_total_excl_vat_without_format))
<!--End Logic Total Excl Tax-->
</td>
<td width="80" align="right">
#if($bill.bill_total_without_format != $bill.bill_total_excl_vat_without_format)
#set($bill_Vat_Value = $convert.toDouble($bill.bill_total_without_format) - $convert.toDouble($bill.bill_total_excl_vat_without_format))
#set($exclTaxVal="$bill_Vat_Value")
#if($exclTaxVal.contains("-"))
#set( $totalVal = $number.currency($bill_Vat_Value).replace("$", "") )
$reservation_dc_currency_symbol -$totalVal.replace("(","").replace(")","")
#else
#set( $totalVal = $number.currency($bill_Vat_Value).replace("$", "") )
$reservation_dc_currency_symbol $totalVal
#end
<!--Logic BTW Bedrag-->
#set($bill_Vat_ValueTotal = $convert.toDouble($bill.bill_total_without_format) - $convert.toDouble($bill.bill_total_excl_vat_without_format))
#set($total_BTW_Amount_total = $convert.toDouble($total_BTW_Amount_total) + $convert.toDouble($bill_Vat_ValueTotal))
#set( $total_BTW_Amount_total = $number.currency($total_BTW_Amount_total).replace("$", "") )
<!--End Logic BTW Bedrag-->
#end
</td>
<td width="125" align="right">
$reservation_dc_currency_symbol $bill.bill_total
<!-- Bill Total-->
#set($billTotal_Amount = $convert.toDouble($billTotal_Amount) + $convert.toDouble($bill.bill_total_without_format ))
<!-- End -->
</td>
</tr>
#end
#end
#end
<tr>
<td colspan="7" width="625" style="line-height:5px;border-top:1px solid #000000;"> </td>
</tr>
<tr>
<td width="200"><strong>Total</strong></td>
<td width="40"> </td>
<td width="90" > </td>
<td width="90"> </td>
<td width="110" align="right">
<!--$total_AllExcl_BTW-->
$reservation_dc_currency_symbol $number.currency($total_AllExcl_BTW).replace("$", "")
</td>
<td width="80" align="right">
<!--$total_BTW_Amount_total -->
$reservation_dc_currency_symbol $number.currency($total_BTW_Amount_total).replace("$", "")
</td>
<td width="125" align="right">
<!-- $billTotal_Amount -->
$reservation_dc_currency_symbol $number.currency($billTotal_Amount).replace("$", "")
</td>
</tr>
#foreach($bill in $billList )
#if($bill.bill_payer_type == "c")
#if($bill.bill_linetype == "80")
<tr>
<td width="200">Paid</td>
<td width="40"> </td>
<td width="90" > </td>
<td width="90"> </td>
<td width="110">
</td>
<td width="80">
</td>
<td width="125" align="right">
$reservation_dc_currency_symbol $bill.bill_total
</td>
</tr>
#end
#end
#end
#foreach($bill in $billList )
#if($bill.bill_payer_type == "c")
#if($bill.bill_linetype == "90")
<tr>
<td width="200">
#if($convert.toDouble($bill.bill_total) < 0)
To receive
#else
To be paid
#end
</td>
<td width="40"> </td>
<td width="90" > </td>
<td width="90"> </td>
<td width="110">
</td>
<td width="80">
</td>
<td width="125" align="right">
$reservation_dc_currency_symbol $bill.bill_total
</td>
</tr>
#end
#end
#end
#foreach($bill in $billList )
#if($bill.bill_payer_type == "c")
#if($bill.bill_linetype == "60")
<tr>
<td width="200">
$bill.bill_type
</td>
<td width="40"> </td>
<td width="90" > </td>
<td width="90"> </td>
<td width="110">
</td>
<td width="80">
</td>
<td width="125" align="right">
$reservation_dc_currency_symbol $bill.bill_total
</td>
</tr>
#end
#end
#end
<tr>
<td colspan="7" style="background: #ffffff;" bgColor="#ffffff"> </td>
</tr>
#foreach( $receivedPayment in $receivedPaymentList)
#if($receivedPayment.payerType == "c")
#if( $receivedPayment.amount != "0,00" || $receivedPayment.amount != "0.00" )
#set($pay_date = $receivedPayment.statementDate)
<tr>
<td width="200">
Received payments
</td>
<td width="140" colspan="2">$receivedPayment.statementDate.split(',')[1]</td>
<td width="200" colspan="2">$receivedPayment.bankname</td>
<td width="80">
</td>
<td width="125" align="right">
$reservation_dc_currency_symbol $receivedPayment.amount
</td>
</tr>
#end
#end
#end
#set($dueamount= 0)
#set($Duetotal= 0)
#foreach( $term in $termList )
#if($term.term_payertype == "c")
#if ($term.term_due != "0,00" && $term.term_due != "0.00")
#if($reservation_language == "nl" || $reservation_language == "de" )
#set($term_value = $term.term_value.replaceAll("\.", ""))
#set($term_value = $term_value.replaceAll(",", "\."))
#set($term_paid = $term.term_paid.replaceAll("\.", ""))
#set($term_paid = $term_paid.replaceAll(",", "\."))
#elseif($reservation_language == "en")
#set($term_value = $term.term_value.replaceAll(",", ""))
#set($term_paid = $term.term_paid.replaceAll(",", ""))
#end
#set($Duetotal= $convert.toNumber($term_value) - $convert.toNumber($term_paid))
#set($dueamount= $math.roundTo(2, $Duetotal))
#set($finalDue = $numberFormatter.format($dueamount))
#if( $term.term_status == "o" || $term.term_status == "p" && $term.term_status =="p")
<tr>
<td width="200">
$term.term_name
</td>
<td width="140" colspan="2">$term.term_duedate.split(',')[1]</td>
<td width="200" colspan="2"> </td>
<td width="80">
</td>
<td width="125" align="right">
$reservation_dc_currency_symbol $term.term_due
</td>
</tr>
#end
#end
#end
#end
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!--NET value-->
#*VAT13%*#
#set($VAT13 = 0)
#foreach( $bill_excl_vat in $billList_excl_vat )
#if($bill_excl_vat.bill_payer_type == "c")
#if(($bill_excl_vat.bill_linetype == "10") && ($bill_excl_vat.bill_vat_rate == "13.0"))
#set($VAT13 = $VAT13 + $convert.toNumber( $bill_excl_vat.bill_total_excl_vat_without_format ))
#set($NET13= $math.roundTo(2,$VAT13))
#set($val13 = "$NET13")
#set($comma = ",")
#set($net13 = $val13 )
#end
#end
#end
#*VAT5%*#
#set($VAT5 = 0)
#foreach( $bill_excl_vat in $billList_excl_vat )
#if($bill_excl_vat.bill_payer_type == "c")
#if(($bill_excl_vat.bill_linetype == "10") && ($bill_excl_vat.bill_vat_rate == "5.5"))
#* #set($VAT5 = $VAT5 + $convert.toNumber($bill_excl_vat.bill_total)) *#
#set($VAT5 = $VAT5 + $convert.toNumber( $bill_excl_vat.bill_total_excl_vat_without_format ))
#set($NET5= $math.roundTo(2,$VAT5))
#set($val5 = "$NET5")
#set($comma = ",")
#set($net5 = $val5 )
#end
#end
#end
#*VAT10%*#
#set($VAT10 = 0)
#foreach( $bill_excl_vat in $billList_excl_vat )
#if($bill_excl_vat.bill_payer_type == "c")
#if(($bill_excl_vat.bill_linetype == "10") && ($bill_excl_vat.bill_vat_rate == "10.0"))
#* #set($VAT10 = $VAT10 + $convert.toNumber($bill_excl_vat.bill_total)) *#
#set($VAT10 = $VAT10 + $convert.toNumber( $bill_excl_vat.bill_total_excl_vat_without_format ))
#set($NET10= $math.roundTo(2,$VAT10))
#set($val10 = "$NET10")
#set($comma = ",")
#set($net10 = $val10 )
#end
#end
#end
#*VAT20%*#
#set($VAT20 = 0)
#foreach( $bill_excl_vat in $billList_excl_vat )
#if($bill_excl_vat.bill_payer_type == "c")
#if(($bill_excl_vat.bill_linetype == "10") && ($bill_excl_vat.bill_vat_rate == "20.0"))
#* #set($VAT20 = $VAT20 + $convert.toNumber($bill_excl_vat.bill_total)) *#
#set($VAT20 = $VAT20 + $convert.toNumber( $bill_excl_vat.bill_total_excl_vat_without_format ))
#set($NET20= $math.roundTo(2,$VAT20))
#set($val20 = "$NET20")
#set($comma = ",")
#set($net20 = $val20)
#end
#end
#end
#*VAT0%*#
#set($VAT0 = 0)
#foreach( $bill_excl_vat in $billList_excl_vat )
#if($bill_excl_vat.bill_payer_type == "c")
#if(($bill_excl_vat.bill_linetype == "10") && ($bill_excl_vat.bill_vat_rate == "0.0"))
#* #set($VAT0 = $VAT0 + $convert.toNumber($bill_excl_vat.bill_total)) *#
#set($VAT0 = $VAT0 + $convert.toNumber( $bill_excl_vat.bill_total_excl_vat_without_format ))
#set($NET0= $math.roundTo(2,$VAT0))
#set($val0 = "$NET0")
#set($comma = ",")
#set($net0 = $val0 )
#end
#end
#end
<!-- End of NET value -->
<!-- Gross value-->
#set($gross0 = 0)
#foreach( $bill_excl_vat in $billList_excl_vat )
#if($bill_excl_vat.bill_payer_type == "c")
#if(($bill_excl_vat.bill_linetype == "10") && ($bill_excl_vat.bill_vat_rate == "0.0"))
#set($gross0 = $gross0 + $convert.toNumber($bill_excl_vat.bill_total_without_format))
#set($gross-value0= $math.roundTo(2,$gross0))
#set($grossrate0 = "$gross-value0")
#set($comma = ",")
#set($grossamt0 = $grossrate0 )
#end
#end
#end
#set($gross5= 0)
#foreach( $bill_excl_vat in $billList_excl_vat )
#if($bill_excl_vat.bill_payer_type == "c")
#if(($bill_excl_vat.bill_linetype == "10") && ($bill_excl_vat.bill_vat_rate == "5.5"))
#set($gross5 = $gross5 + $convert.toNumber($bill_excl_vat.bill_total_without_format))
#set($gross-value5= $math.roundTo(2,$gross5))
#set($grossrate5 = "$gross-value5")
#set($comma = ",")
#set($grossamt5 = $grossrate5 )
#end
#end
#end
#set($gross10= 0)
#foreach( $bill_excl_vat in $billList_excl_vat )
#if($bill_excl_vat.bill_payer_type == "c")
#if(($bill_excl_vat.bill_linetype == "10") && ($bill_excl_vat.bill_vat_rate == "10.0"))
#set($gross10 = $gross10 + $convert.toNumber($bill_excl_vat.bill_total_without_format))
#set($gross-value10= $math.roundTo(2,$gross10))
#set($grossrate10 = "$gross-value10")
#set($comma = ",")
#set($grossamt10 = $grossrate10)
#end
#end
#end
#set($gross13= 0)
#foreach( $bill_excl_vat in $billList_excl_vat )
#if($bill_excl_vat.bill_payer_type == "c")
#if(($bill_excl_vat.bill_linetype == "10") && ($bill_excl_vat.bill_vat_rate == "13.0"))
#set($gross13 = $gross13 + $convert.toNumber($bill_excl_vat.bill_total_without_format))
#set($gross-value13= $math.roundTo(2,$gross13))
#set($grossrate13 = "$gross-value13")
#set($comma = ",")
#set($grossamt13 = $grossrate13 )
#end
#end
#end
#set($gross20= 0)
#foreach( $bill_excl_vat in $billList_excl_vat )
#if($bill_excl_vat.bill_payer_type == "c")
#if(($bill_excl_vat.bill_linetype == "10") && ($bill_excl_vat.bill_vat_rate == "20.0"))
#set($gross20 = $gross20 + $convert.toNumber($bill_excl_vat.bill_total_without_format))
#set($gross-value20= $math.roundTo(2,$gross20))
#set($grossrate20 = "$gross-value20")
#set($comma = ",")
#set($grossamt20 = $grossrate20)
#end
#end
#end
<!-- End of Gross value-->
<!-- VAT value-->
#set($VATrate-value5 = 0)
#set($VATrate5 = $convert.toNumber($grossrate5)-$convert.toNumber($NET5))
#set($VATrate-value5 = $math.roundTo(2,$VATrate5))
#set($rate5 = "$VATrate-value5")
#set($comma = ",")
#set($vatrate5 = $rate5 )
#set($VATrate-value10 = 0)
#set($VATrate10 = $convert.toNumber($grossrate10)-$convert.toNumber($NET10))
#set($VATrate-value10 = $math.roundTo(2,$VATrate10))
#set($rate10 = "$VATrate-value10")
#set($comma = ",")
#set($vatrate10 = $rate10 )
#set($VATrate-value13 = 0)
#set($VATrate13 = $convert.toNumber($grossrate13)-$convert.toNumber($NET13))
#set($VATrate-value13 = $math.roundTo(2,$VATrate13))
#set($rate13 = "$VATrate-value13")
#set($comma = ",")
#set($vatrate13 = $rate13)
#set($VATrate-value20 = 0)
#set($VATrate20 = $convert.toNumber($grossrate20)-$convert.toNumber($NET20))
#set($VATrate-value20 = $math.roundTo(2,$VATrate20))
#set($rate20 = "$VATrate-value20")
#set($comma = ",")
#set($vatrate20 = $rate20)
<!--End of VAT value-->
#set($NETtotal = $convert.toNumber($VAT0) + $convert.toNumber($VAT5) + $convert.toNumber($VAT10) + $convert.toNumber($VAT13) + $convert.toNumber($VAT20))
#set($NETtotal-value= $math.roundTo(2,$NETtotal))
#set($nettotal = "$NETtotal-value")
#set($comma = ",")
#set($netfinal = $nettotal )
#set($VATtotal = $convert.toNumber($rate5) + $convert.toNumber($rate10) + $convert.toNumber($rate13) + $convert.toNumber($rate20))
#set($VATtotal-value= $math.roundTo(2,$VATtotal))
#set($vattotal = "$VATtotal-value")
#set($comma = ",")
#set($vatfinal = $vattotal)
#set($GROSStotal = $convert.toNumber($gross0) + $convert.toNumber($gross5) + $convert.toNumber($gross10) + $convert.toNumber($gross13) + $convert.toNumber($gross20))
#set($GROSStotal-value= $math.roundTo(3,$GROSStotal))
#set($grosstotal = "$GROSStotal-value")
#set($comma = ",")
#set($grossfinal = $grosstotal )
<table width="700" border="0" cellspacing="0" cellpadding="0" style="padding-top:10px">
<tbody style="font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#3B3131; line-height:18px">
<tr>
<td width="400">
<table border="0" cellspacing="0" cellpadding="0">
<tbody style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#3B3131; line-height:14px">
<tr>
<td width="100">VAT rate </td>
<td width="100">Net</td>
<td width="100">VAT</td>
<td width="100">Gross</td>
</tr>
<tr>
<td colspan="4"><hr /></td>
</tr>
<tr>
<td width="100">0%</td>
<td width="100">#if(!$net0) $reservation_dc_currency_symbol 0.00 #else $reservation_dc_currency_symbol $number.currency($net0).replace("$", "") #end </td>
<td width="100">$reservation_dc_currency_symbol 0.00 </td>
<td width="100">#if(!$grossamt0 )$reservation_dc_currency_symbol 0.00 #else $reservation_dc_currency_symbol $number.currency($grossamt0).replace("$", "") #end </td>
</tr>
<tr>
<td width="100">5.5%</td>
<td width="100">#if(!$net5) $reservation_dc_currency_symbol 0.00 #else $reservation_dc_currency_symbol $number.currency($vatrate5).replace("$", "") #end </td>
<td width="100">#if($VATrate-value5 == "0") $reservation_dc_currency_symbol 0.00 #else $reservation_dc_currency_symbol $number.currency($vatrate5).replace("$", "") #end </td>
<td width="100">#if(!$grossamt5 ) $reservation_dc_currency_symbol 0.00 #else $reservation_dc_currency_symbol $number.currency($grossamt5).replace("$", "") #end </td>
</tr>
<tr>
<td width="100">10%</td>
<td width="100">#if(!$net10) $reservation_dc_currency_symbol 0.00 #else $reservation_dc_currency_symbol $number.currency($net10).replace("$", "") #end </td>
<td width="100">#if($VATrate-value10 == "0") $reservation_dc_currency_symbol 0.00 #else $reservation_dc_currency_symbol $number.currency($vatrate10).replace("$", "") #end </td>
<td width="100">#if(!$grossamt10 ) $reservation_dc_currency_symbol 0.00 #else $reservation_dc_currency_symbol $number.currency($grossamt10).replace("$", "") #end </td>
</tr>
#*
<tr>
<td width="100">13%</td>
<td width="100">#if(!$net13) $reservation_dc_currency_symbol 0.00 #else $reservation_dc_currency_symbol $number.currency($net13).replace("$", "") #end </td>
<td width="100">#if($VATrate-value13 == "0") $reservation_dc_currency_symbol 0.00 #else $reservation_dc_currency_symbol $number.currency($vatrate13).replace("$", "") #end </td>
<td width="100">#if(!$grossamt13) $reservation_dc_currency_symbol 0.00 #else $reservation_dc_currency_symbol $number.currency($grossamt13).replace("$", "") #end </td>
</tr>
*#
<tr>
<td width="100">20%</td>
<td width="100">#if(!$net20) $reservation_dc_currency_symbol 0.00 #else $reservation_dc_currency_symbol $number.currency($net20).replace("$", "") #end </td>
<td width="100">#if($VATrate-value20 == "0") $reservation_dc_currency_symbol 0.00 #else $reservation_dc_currency_symbol
$number.currency($vatrate20).replace("$", "") #end </td>
<td width="100">#if(!$grossamt20 ) $reservation_dc_currency_symbol 0.00 #else $reservation_dc_currency_symbol
$number.currency($grossamt20).replace("$", "")
#end </td>
</tr>
<tr>
<td> </td>
<td colspan="3"><hr /></td>
</tr>
<tr>
<td width="100"> </td>
<td width="100">$reservation_dc_currency_symbol $number.currency($netfinal).replace("$", "") </td>
<td width="100">#if(!$vatfinal)$reservation_dc_currency_symbol 0.00 #else $reservation_dc_currency_symbol $number.currency($vatfinal).replace("$", "")
#end </td>
<td width="100"> $reservation_dc_currency_symbol $number.currency($grossfinal).replace("$", "")
</td>
</tr>
<tr>
<td> </td>
<td colspan="3"><hr /></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>