- Created by Mounir Zalim , last modified on Jan 27, 2023
- Request approval
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 5 Next »
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 | Purpose |
---|---|
$document_id | Shows sequential document number on ticket |
$document_type | Shows the document type. I.e. 'TICKET' (cash register sales) or 'INVOICE' (checked_out reservations) |
$operation_type | Shows operation type on ticket. I.e. 'SALE' for positive transaction, 'REFUND' for negative transaction. |
$company_details | Shows legal entity details of the company the ticket is issued by |
$signature | Shows the signature extract on the ticket (3rd, 7th, 13th and 19th position of the signature) |
$reservation_bill_lines | Shows transaction details |
$employee_name | Seller name |
$employee_id | Seller code |
$bill_line_resource_count | Number of bill lines for the ticket |
$reservation_bill_lines_with_quantity | Bill line data including quantity and unit price incl. TVA |
$nf525ReservationTaxList with child tags
| Display total ticket amount including TVA and total ticket amount excluding TVA |
$resourceTotalPerTaxList with child tags
| Display total amount including TVA, per TVA rate |
Default template
Nom du caissier : $employee_name
ID du caissier : $employee_id
Nombre de lignes : $bill_line_resource_count
$separator
$document_type $operation_type | B525/0420-1| $signature | 1.1
$separator
$company_details
#if($has_customer)
$customer_name
$customer_address
$customer_zipcode_city
$separator
#end
#if($reservation_type == "c")
$separator
Numéro de ticket : $document_id
#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
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 | Purpose |
---|---|
$document_id | Shows sequential document number on invoice |
$document_type | Shows document type on invoice. This is always 'INVOICE'. (As for cancelled bookings also costs can apply which are invoiced to customers) |
$reservation_resort | Display holiday resort name |
$reservation_resortaddress1 | Display holiday resort address |
$reservation_resortzipcode | Display holiday resort zipcode |
$reservation_resort_country | Display holiday resort country |
$resort_siret (dynamic field) | Display holiday resort SIRET number |
$customer.firstname | Customer firstname |
$customer.lastname | Customer lastname |
$customer.address.address1 | Customer address |
$customer.address.housenumber | Customer housenumber |
$customer.address.housenumberSuffix | Customer housenumber suffix |
$customer.address.zipcode | Customer zipcode |
$customer.address.city | Customer city |
$customer.address.countryName | Customer address |
$customer.companyName | Company name (if applicable) |
$reservation_bill_lines | Shows invoice details |
$bill_value_excl_vat | Show unit price excluding TVA |
$bill_total_vat | Show total TVA amount |
$signature | Shows the signature extract on the ticket (3rd, 7th, 13th and 19th position of the signature) |
$company_details | Shows legal entity details of the company the invoice is issued by |
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
<html>
<head>
<title></title>
</head>
<body style="padding-left:25px">
#if($environment == "")
#else
<span style="font-size:16px"><b>TEST ENVIRONMENT INVOICE</b></span>
#end
#foreach ($doc in $documentTagList)
#if($convert.toNumber($doc.printed_count) > 1)
<br/><br/> <b>Duplicate </b>
#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 colspan="3" align="right" style="padding-right:10px"><img src="CUSTOMER LOGO" /> </td>
</tr>
<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 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">
<tr>
<td valign="top">
<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 != "")
Invoice number: $doc.document_id<br/>
#end
#break
#end
Invoice Date: $current_date <br/>
Reservation number: $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>YOUR HOLIDAY DETAILS:</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>Village Name:</b></td>
<td valign="top">$reservation_resortname </td>
<td> </td>
</tr>
<tr>
<td width="250" valign="top"><b>Unit Type:</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>Passenger Information:</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>Arrival date: </b></td>
<td valign="top">$reservation_arrivaldate
</td>
<td> </td>
</tr>
<tr>
<td width="160" height="25" valign="top"><b>Departure Date: </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>Invoice details:</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(1254004)} #*VAT Bill Customer*#</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3">
${templateTool.parseTemplate(1254003)} #*VAT Calculation*#
</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3"> Siblu Europe Limited on the behalf of </td>
</tr>
<tr>
<td colspan="3"> <hr style="border-bottom:1px solid #e5e5e5" /></td>
</tr>
<tr>
<td colspan="3">
CUSTOMER AO DETAIL FIELDS
</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3" align="center">
#foreach ($doc in $documentTagList)
$doc.document_type B525/0420 $doc.signature V1.1
#end
</td>
</tr>
</tbody>
</table>
</td>
<td width="10"> </td>
</tr>
</tbody>
</table>
</body>
</html>
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>
Paying 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>
Siblu 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 == "p")
#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 == "p")
#if ($bill.bill_linetype == "90")
#set($billTotal= $convert.toNumber($bill.bill_total))
#if($billTotal > 0)
#set($dueAmount= "true")
#end
#end
#end
#end
<html>
<head>
<title></title>
</head>
<body style="padding-left:25px">
#if($environment == "")
#else
<span style="font-size:16px"><b>TEST ENVIRONMENT INVOICE</b></span>
#end
#foreach ($doc in $documentTagList)
#if($convert.toNumber($doc.printed_count) > 1)
<br/><br/> <b>Duplicate </b>
#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 colspan="3" align="right" style="padding-right:10px"><img src="https://static.newyse.org/email/siblu/siblu-logo.jpg" /> </td>
</tr>
<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 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">
<tr>
<td valign="top">
<b>#if( $!paying_customer_company_name) $paying_customer_company_name #end #if($!paying_customer_vat_number) / $paying_customer_vat_number #end</b><br/>
$paying_customer_title $paying_customer_firstname $paying_customer_middlename $paying_customer_lastname<br/>
#if($paying_customer_address1 !="" || $paying_customer_housenumber !="" || $paying_customer_housenumbersuffix != "")
$paying_customer_address1 $paying_customer_housenumber $paying_customer_housenumbersuffix <br/>
#end
#if( $paying_customer_zipcode !="" || $paying_customer_city != "")
$paying_customer_zipcode $paying_customer_city <br/>
#end
#if($paying_customer_country != "")
$paying_customer_country<br/>
#end<br/>
#foreach ($doc in $documentTagList)
#if( $doc.document_id != "")
Invoice number: $doc.document_id<br/>
#end
#break
#end
Invoice Date: $current_date <br/>
Reservation number: $reservation_reservationnumber<br/>
</td>
<td valign="top">
</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>YOUR HOLIDAY DETAILS:</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>Village Name:</b></td>
<td valign="top">$reservation_resortname </td>
<td> </td>
</tr>
<tr>
<td width="250" valign="top"><b>Unit Type:</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>Passenger Information:</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>Arrival date: </b></td>
<td valign="top">$reservation_arrivaldate
</td>
<td> </td>
</tr>
<tr>
<td width="160" height="25" valign="top"><b>Departure Date: </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>Invoice details:</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(1504003)} #*VAT Bill Paying Customer*#
</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3">
${templateTool.parseTemplate(1504004)} #*VAT Calculation Paying Customer*#
</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3"> CLIENT on the behalf of </td>
</tr>
<tr>
<td colspan="3"> <hr style="border-bottom:1px solid #e5e5e5" /></td>
</tr>
<tr>
<td colspan="3">
CLIENT DETAILS
</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3" align="center">
#foreach ($doc in $documentTagList)
$doc.document_type B525/0420-1 $doc.signature V1.1
#end
</td>
</tr>
</tbody>
</table>
</td>
<td width="10"> </td>
</tr>
</tbody>
</table>
</body>
</html>
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 == "p")
#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 == "p")
#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 == "p")
#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 == "p")
#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 == "p")
#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 == "p")
#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 == "p")
#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 == "p")
#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 == "p")
#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 == "p")
#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 == "p")
#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 == "p")
#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 == "p")
#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 == "p")
#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 == "p")
#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 == "p")
#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>
- No labels