FR-Tickets & Invoices templates

FR-Tickets & Invoices templates

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'utilisateur peut imprimer le ticket. Le ticket est personnalisable en ce qui concerne le style et le texte statique, mais les champs obligatoires sont ajoutés dans le modèle par défaut.

<!DOCTYPE html> <html lang="fr"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Reçu de Caisse</title> <style> @page { size: 80mm 120mm; margin: 5mm 0 5mm 0; } body { font-family: 'Courier New', Courier, monospace; font-size: 7pt; line-height: 1.1; width: 100%; margin: 0; padding: 0; box-sizing: border-box; } table { width: 100%; border-collapse: collapse; table-layout: fixed; margin-bottom: 3px; } td { padding: 1px 16px 1px 16px; vertical-align: top; word-wrap: break-word; box-sizing: border-box; } .dashed-line { border-bottom: 1px dashed #000; margin: 2px 0; line-height: 0; height: 0; padding: 0; } td.dashed-line-container { padding: 0; } .header, .footer { text-align: center; font-weight: bold; } .text-right { text-align: right; } .text-left { text-align: left; } .indented { padding-left: 10px; font-size: 7pt; } .bold { font-weight: bold; } .col-desc { width: 70%; text-align: left; } .col-amount { width: 30%; text-align: right; } .vat-summary-table { width: 100%; border-collapse: collapse; margin-top: 5px; table-layout: fixed; } .vat-summary-table th, .vat-summary-table td { padding: 1px 16px 1px 16px; font-size: 7pt; text-align: right; } .vat-summary-table th { border-bottom: 1px dashed #000; font-weight: bold; } .vat-summary-table th:first-child, .vat-summary-table td:first-child { text-align: left; width: 40%; } .footer { padding-top: 5px; } .item-name { font-size: 7pt; } </style> </head> <body> <table> <tr> <td class="header bold"> #set($currentDate = "$current_date") $reservation_resortname $dateFormatter.format("currentDate", "dd-MM-yyyy") </td> </tr> <tr><td class="dashed-line-container" colspan="1"><div class="dashed-line"></div></td></tr> <tr> <td class="header bold"> #if(!$documentTagList.isEmpty()) Caisse: $documentTagList.get(0).employee_name<br> ID du caissier: $documentTagList.get(0).employee_id<br> #end #if(!$documentTagList.isEmpty()) $documentTagList.get(0).document_type B525/0420 $documentTagList.get(0).signature ver.:2.0 #end </td> </tr> <tr><td class="dashed-line-container" colspan="1"><div class="dashed-line"></div></td></tr> <tr> <td class="bold"> $admin_organisation_name Siège social: $admin_organisation_housenumber $admin_organisation_address1 $admin_organisation_zipcode $admin_organisation_city $admin_organisation_country RCS: $admin_organisation_rcs SIRET: $admin_organisation_siret APE: $admin_organisation_ape_code N TVA: $admin_organisation_vat_number </td> </tr> <tr><td class="dashed-line-container" colspan="1"><div class="dashed-line"></div></td></tr> <tr> <td class="header bold"> #if(!$documentTagList.isEmpty()) Ticket: $documentTagList.get(0).document_id #end </td> </tr> <tr><td class="dashed-line-container" colspan="1"><div class="dashed-line"></div></td></tr> </table> <table> #set($grandTotal = 0) #foreach($bill in $billList) #if($bill.bill_payer_type == "c" && !$bill.bill_linetype.matches("-10|0|60|40|200|20|-20|30|80|90|70")) #set($lineTotal = $convert.toDouble($bill.bill_total_without_format)) #set($grandTotal = $grandTotal + $lineTotal) #set($quantity = $convert.toDouble($bill.bill_quantity)) #set($unitPrice = 0) #if($quantity > 0) #set($unitPrice = $lineTotal / $quantity) #end #set($vatRate = $bill.bill_vat_rate) #if(!$vatRate || $vatRate == "") #set($vatRate = "0") #end #set($vatLetter = "A") #if($vatRate == "0.0") #set($vatLetter = "A") #elseif($vatRate == "5,5" || $vatRate == "5.5") #set($vatLetter = "B") #elseif($vatRate == "10.0") #set($vatLetter = "C") #elseif($vatRate == "20.0") #set($vatLetter = "D") #end <tr> <td class="col-desc bold"> <span class="item-name">$bill.bill_type</span> #if($bill.bill_total != "0,00") <br><span class="indented">($quantity x $number.format("0.00", $unitPrice).replace(".", ","))</span> #end #if($bill.bill_vat_rate && $bill.bill_vat_rate != "" && $bill.bill_vat_rate != "0,00") <div class="indented bold">TVA $vatLetter ($bill.bill_vat_rate%)</div> #end </td> <td class="col-amount bold"> #if($bill.bill_total != "0,00") $number.format("0.00", $lineTotal).replace(".", ",") #end </td> </tr> #end #end </table> <table> <tr><td class="dashed-line-container" colspan="2"><div class="dashed-line"></div></td></tr> <tr> <td class="col-desc bold">Total:</td> <td class="col-amount bold">EUR $number.format("0.00", $grandTotal).replace(".", ",")</td> </tr> <tr> <td class="col-desc bold">Déjà payé:</td> #set($amountPaidTotal = 0) #foreach($bill in $billList) #if($bill.bill_linetype == "80") #set($amountPaidTotal = $amountPaidTotal + $convert.toDouble($bill.bill_total_without_format)) #end #end <td class="col-amount bold">EUR $number.format("0.00", $amountPaidTotal).replace(".", ",")</td> </tr> <tr> <td class="col-desc bold">Nombre de ligne:</td> #set($articleCount = 0) #foreach($bill in $billList) #if($bill.bill_linetype == "10") #set($articleCount = $articleCount + 1) #end #end <td class="col-amount bold">$articleCount</td> </tr> <tr> <td class="col-desc bold"> #set($transactionType = "VENTE") #if($grandTotal < 0) #set($transactionType = "ANNULATION") #end $transactionType </td> <td class="col-amount"></td> </tr> <tr> <td class="col-desc bold">Mode de paiement:</td> <td class="col-amount bold"> #if($receivedPaymentList && $receivedPaymentList.size() > 0) #set($printedBanks = []) #foreach($payment in $receivedPaymentList) #if(!$printedBanks.contains($payment.bankname)) #set($ignore = $printedBanks.add($payment.bankname)) $payment.bankname<br/> #end #end #else N/A #end </td> </tr> <tr><td class="dashed-line-container" colspan="2"><div class="dashed-line"></div></td></tr> </table> <table class="vat-summary-table"> <thead> <tr> <th>Détails TVA</th> <th>TVA</th> <th>Excl.</th> <th>Incl.</th> </tr> </thead> <tbody> #set($vatMap = {}) #foreach($bill in $billList) #if($bill.bill_payer_type == "c" && $bill.bill_linetype == "10") #set($vatRate = $bill.bill_vat_rate) #if(!$vatRate || $vatRate == "") #set($vatRate = "0") #end ## Assign VAT Rate Letter #set($vatLetter = "A") ## Default value #if($vatRate == "0.0") #set($vatLetter = "A") #elseif($vatRate == "5,5" || $vatRate == "5.5") #set($vatLetter = "B") #elseif($vatRate == "10.0") #set($vatLetter = "C") #elseif($vatRate == "20.0") #set($vatLetter = "D") #end #set($vatKey = "${vatRate}") ## Group by VAT rate #set($vatAmount = $convert.toDouble($bill.bill_total_vat_without_format)) #set($exclAmount = $convert.toDouble($bill.bill_total_excl_vat_without_format)) #set($inclAmount = $convert.toDouble($bill.bill_total_without_format)) #if($vatMap.containsKey($vatKey)) #set($vatEntry = $vatMap.get($vatKey)) #set($vatEntry.vatAmount = $vatEntry.vatAmount + $vatAmount) #set($vatEntry.exclAmount = $vatEntry.exclAmount + $exclAmount) #set($vatEntry.inclAmount = $vatEntry.inclAmount + $inclAmount) #else #set($vatEntry = { "vatRate": $vatRate, "vatLetter": $vatLetter, "vatAmount": $vatAmount, "exclAmount": $exclAmount, "inclAmount": $inclAmount }) #set($void = $vatMap.put($vatKey, $vatEntry)) #end #end #end #set($NETtotal = 0) #set($VATtotal = 0) #set($GROSStotal = 0) #foreach($vatEntry in $vatMap.values()) <tr> <td class="bold">$vatEntry.vatLetter ($vatEntry.vatRate%)</td> <td class="bold">$number.format("0.00", $vatEntry.vatAmount).replace(".", ",")</td> <td class="bold">$number.format("0.00", $vatEntry.exclAmount).replace(".", ",")</td> <td class="bold">$number.format("0.00", $vatEntry.inclAmount).replace(".", ",")</td> </tr> #set($NETtotal = $NETtotal + $vatEntry.exclAmount) #set($VATtotal = $VATtotal + $vatEntry.vatAmount) #set($GROSStotal = $GROSStotal + $vatEntry.inclAmount) #end <tr> <td class="bold">Total</td> <td class="bold">$number.format("0.00", $VATtotal).replace(".", ",")</td> <td class="bold">$number.format("0.00", $NETtotal).replace(".", ",")</td> <td class="bold">$number.format("0.00", $GROSStotal).replace(".", ",")</td> </tr> </tbody> </table> <table> <tr><td class="footer bold">Merci et Au revoir</td></tr> </table> </body> </html>

Factures

Différents types de factures sont émis par le système, à savoir la facture, la facture de paiement et la facture d'avoir. Ces factures sont, dans une large mesure, similaires en termes de contenu, mais il existe de petites différences entre les différents types, par exemple au niveau des champs. Par conséquent, pour chaque type de facture, un modèle de facture (invoice_template) est configuré dans le module d'administration MXTS.

Dans ce paragraphe, un format par défaut est disponible pour chaque type de facture, et ce format peut être personnalisé et adapté à chaque client.

 

Facture:

Facture d'avoir:

Facture d'acompte:

Facture d'avoir d'acompte: