diff --git a/README b/README index e69de29..fc33f6b 100644 --- a/README +++ b/README @@ -0,0 +1 @@ +Visit our help centre (https://retail-support.lightspeedhq.com/hc/en-us/articles/228842607-Customizing-print-templates#h_01HS20KX3TY85C9ZWPKN4F3KCM) for detailed guidance on updating your custom print templates for item fees. diff --git a/label/customizable_label.tpl b/label/customizable_label.tpl index 8c1cf46..e2d1379 100644 --- a/label/customizable_label.tpl +++ b/label/customizable_label.tpl @@ -7,7 +7,7 @@ Set any of the options in this section from 'false' to 'true' in order to enable {% set show_custom_sku = false %} {# Display Custom SKU (if available) above Description #} {% set show_manufacturer_sku = false %} {# Display Manufacturer SKU (if available) above Description #} {% set show_upc_code = false %} {# Display the UPC code at the top of the receipt (using UPC codes in barcode does not work) #} -{% set show_date = false %} {# Display today's date above description (ddmmyy formatting) #} +{% set show_date = false %} {# Display todays date above description (ddmmyy formatting) #} {% set price_with_no_cents = false %} {# Remove cents from being displayed in price #} {% set date_format = 'mdy' %} {# Format the date is shown in if show_date is enabled. m = 2 digit month, d = 2 digit day, y = 2 digit year, Y = 4 digit year #} @@ -122,7 +122,7 @@ Set any of the options in this section from 'false' to 'true' in order to enable {# Normal Label (2.25x1.25) CSS settings #} - .label.size225x125 .custom_margin { + .label.size225x125 { margin: {{normal_top_margin}} {{normal_right_margin}} {{normal_bottom_margin}} {{normal_left_margin}}; } @@ -142,7 +142,7 @@ Set any of the options in this section from 'false' to 'true' in order to enable {# Alt. Label (2.00x1.00) CSS settings #} - .label.size200x100 .custom_margin { + .label.size200x100 { margin: {{alt_top_margin}} {{alt_right_margin}} {{alt_bottom_margin}} {{alt_left_margin}}; } @@ -161,7 +161,7 @@ Set any of the options in this section from 'false' to 'true' in order to enable } {# Small Label (1.25x1.00) CSS settings #} - .label.size125x100 .custom_margin { + .label.size125x100 { margin: {{small_top_margin}} {{small_right_margin}} {{small_bottom_margin}} {{small_left_margin}}; } @@ -181,7 +181,7 @@ Set any of the options in this section from 'false' to 'true' in order to enable {# Jewelry Label (2.20x.50) CSS settings #} - .label.size220x50 .custom_margin { + .label.size220x50 { margin: {{jewelry_top_margin}} {{jewelry_right_margin}} {{jewelry_bottom_margin}} {{jewelry_left_margin}}; } @@ -218,34 +218,29 @@ Set any of the options in this section from 'false' to 'true' in order to enable {% for category in normal_label_categories %} {% if category == Label.Item.categoryID %}
-
{% set size_specified = true %} {% endif %} {% endfor %} {% for category in alt_label_categories %} {% if category == Label.Item.categoryID %}
-
{% set size_specified = true %} {% endif %} {% endfor %} {% for category in small_label_categories %} {% if category == Label.Item.categoryID %}
-
{% set size_specified = true %} {% endif %} {% endfor %} {% for category in jewelry_label_categories %} {% if category == Label.Item.categoryID %}
-
{% set size_specified = true %} {% endif %} {% endfor %} {% if size_specified == false %}
-
{% endif %}

{{ Label.MetaData.title }}

@@ -309,7 +304,6 @@ Set any of the options in this section from 'false' to 'true' in order to enable {% endif %} -
{% endfor %} {% endfor %} diff --git a/purchase_order/purchase_order.tpl b/purchase_order/purchase_order.tpl index e45ffb6..7c37a53 100644 --- a/purchase_order/purchase_order.tpl +++ b/purchase_order/purchase_order.tpl @@ -15,317 +15,435 @@ Set any of the options in this section from 'false' to 'true' in order to enable {% endblock style %} {% block content %} {% for Order in Orders %}
-

-Purchase Order #{{ Order.orderID }} -

-
-Ordered: {{Order.orderedDate|correcttimezone|date ("m/d/y")}}
-Expected: {{Order.arrivalDate|correcttimezone|date ("m/d/y")}}
-
+

+ Purchase Order #{{ Order.orderID }} +

+
+ Ordered: {{Order.orderedDate|correcttimezone|date ("m/d/y")}}
+ Expected: {{Order.arrivalDate|correcttimezone|date ("m/d/y")}}
+
-
-
Vendor
-

{{ Order.Vendor.name}}

-{% if hide_rep_info == false %} -{% if Order.Vendor.Reps.VendorRep.firstName|strlen > 0 %} -
ATTN: {{Order.Vendor.Reps.VendorRep.firstName}} {{Order.Vendor.Reps.VendorRep.lastName}}
-{% endif %} -{% endif %} -{% if hide_account_number == false %} -{% if Order.Vendor.accountNumber > 0 %} -
Account #{{Order.Vendor.accountNumber}}
-{% endif %} -{% endif %} -

-{{ Order.Vendor.Contact.Addresses.ContactAddress.address1 }} -{% if Order.Vendor.Contact.Addresses.ContactAddress.address2|strlen > 0 %} -
{{ Order.Vendor.Contact.Addresses.ContactAddress.address2 }} -{% endif %} -{% if Order.Vendor.Contact.Addresses.ContactAddress.city|strlen > 0 %} -
{{ Order.Vendor.Contact.Addresses.ContactAddress.city }}, {{ Order.Vendor.Contact.Addresses.ContactAddress.state }} {{ Order.Vendor.Contact.Addresses.ContactAddress.zip }} -{% endif %} -{% for ContactPhone in Order.Vendor.Contact.Phones.ContactPhone %} -
{{ ContactPhone.number }} {{ ContactPhone.useType }} -{% endfor %} -{% for ContactEmail in Order.Vendor.Contact.Emails.ContactEmail %} -
{{ ContactEmail.address }} -{% endfor %} -

-
-
-
Ship to
-

{{ Order.Shop.name }}

-

-{{ Order.Shop.Contact.Addresses.ContactAddress.address1 }} -
{{ Order.Shop.Contact.Addresses.ContactAddress.city }}, {{ Order.Shop.Contact.Addresses.ContactAddress.state }} {{ Order.Shop.Contact.Addresses.ContactAddress.zip }} -
{{ Order.Shop.Contact.Phones.ContactPhone.number }} -

-
+
+
Vendor
+

{{ Order.Vendor.name}}

+ {% if hide_rep_info == false %} + {% if Order.Vendor.Reps.VendorRep.firstName|strlen > 0 %} +
ATTN: {{Order.Vendor.Reps.VendorRep.firstName}} {{Order.Vendor.Reps.VendorRep.lastName}}
+ {% endif %} + {% endif %} + {% if hide_account_number == false %} + {% if Order.Vendor.accountNumber > 0 %} +
Account #{{Order.Vendor.accountNumber}}
+ {% endif %} + {% endif %} +

+ {{ Order.Vendor.Contact.Addresses.ContactAddress.address1 }} + {% if Order.Vendor.Contact.Addresses.ContactAddress.address2|strlen > 0 %} +
{{ Order.Vendor.Contact.Addresses.ContactAddress.address2 }} + {% endif %} + {% if Order.Vendor.Contact.Addresses.ContactAddress.city|strlen > 0 %} +
{{ Order.Vendor.Contact.Addresses.ContactAddress.city }}, + {{ Order.Vendor.Contact.Addresses.ContactAddress.state }} {{ Order.Vendor.Contact.Addresses.ContactAddress.zip }} + {% endif %} + {% for ContactPhone in Order.Vendor.Contact.Phones.ContactPhone %} +
{{ ContactPhone.number }} {{ ContactPhone.useType }} + {% endfor %} + {% for ContactEmail in Order.Vendor.Contact.Emails.ContactEmail %} +
{{ ContactEmail.address }} + {% endfor %} +

+
+
+
Ship to
+

{{ Order.Shop.name }}

+

+ {{ Order.Shop.Contact.Addresses.ContactAddress.address1 }} +
{{ Order.Shop.Contact.Addresses.ContactAddress.city }}, + {{ Order.Shop.Contact.Addresses.ContactAddress.state }} {{ Order.Shop.Contact.Addresses.ContactAddress.zip }} +
{{ Order.Shop.Contact.Phones.ContactPhone.number }} +

+
{% if hide_shipping_table == false %}

Shipping Info

- - - - -{% if Order.MetaData.totalDiscount > 0 %} - -{% endif %} - - - - - - -{% if Order.MetaData.totalDiscount > 0 %} - -{% endif %} - - + + + + + {% if Order.MetaData.totalDiscount > 0 %} + + {% endif %} + + + + + + + {% if Order.MetaData.totalDiscount > 0 %} + + {% endif %} + +
ShippingTotal QuantityDiscountOther
-{% if Order.MetaData.shipping|strlen > 0 %} -{{Order.MetaData.shipping|format_currency}} -{% else %} -None -{% endif %} - -{% if Order.totalQuantity|strlen > 0 %} -{{Order.totalQuantity}} -{% else %} -None -{% endif %} -{{Order.discount|floatval * 100}}% -{% if Order.MetaData.other|strlen > 0 %} -{{Order.MetaData.other|format_currency}} -{% else %} -None -{% endif %} -
ShippingTotal QuantityDiscountOther
+ {% if Order.MetaData.shipping|strlen > 0 %} + {{Order.MetaData.shipping|format_currency}} + {% else %} + None + {% endif %} + + {% if Order.totalQuantity|strlen > 0 %} + {{Order.totalQuantity}} + {% else %} + None + {% endif %} + {{Order.discount|floatval * 100}}% + {% if Order.MetaData.other|strlen > 0 %} + {{Order.MetaData.other|format_currency}} + {% else %} + None + {% endif %} +

-{% if hide_shipping_notes == false %} -{% if Order.shipInstructions|strlen > 0 %} - - - - - -{% endif %} -{% endif %} + {% if hide_shipping_notes == false %} + {% if Order.shipInstructions|strlen > 0 %} + + + + + + {% endif %} + {% endif %}
Shipping notes:{{Order.shipInstructions}}
Shipping notes:{{Order.shipInstructions}}
{% endif %}

Details

- - - - - - - -{% if Order.discount > 0 %} - -{% else %} - -{% endif %} - - -{% for OrderLine in Order.OrderLines.OrderLine %} - - - - - - - - -{% endfor %} - - - -{% if Order.MetaData.subtotal > 0 %} - -{% endif %} - - - - -{% if Order.MetaData.totalDiscount > 0 %} - - - - - - - -{% endif %} - - -{% if Order.MetaData.total > 0 %} - -{% endif %} - - - - - + + + + + + + + {% if Order.discount > 0 %} + + {% else %} + + {% endif %} + + + {% for OrderLine in Order.OrderLines.OrderLine %} + + + + + + + + + {% endfor %} + + + + {% if Order.MetaData.subtotal > 0 %} + + {% endif %} + + + + + {% if Order.MetaData.totalDiscount > 0 %} + + + + + + + + {% endif %} + + + {% if Order.MetaData.total > 0 %} + + {% endif %} + + + + +
Vendor IDUPC CodeDescriptionQtyUnit CostAmount w/DiscountAmount
-{% for ItemVendorNum in OrderLine.Item.ItemVendorNums.ItemVendorNum %} -{% if (Order.vendorID|number_format) == (ItemVendorNum.vendorID|number_format) %} -{{ ItemVendorNum.value }} -{% endif %} -{% endfor %} -{{OrderLine.Item.upc}}{{OrderLine.Item.description}}{{OrderLine.quantity}}{{OrderLine.MetaData.cost|format_currency}}{{OrderLine.MetaData.total|format_currency}}
Subtotal{{Order.MetaData.subtotal|format_currency}}
Discount{{Order.MetaData.totalDiscount|format_currency({invert: true})}}
Total{{Order.MetaData.total|format_currency}}
Vendor IDUPC CodeDescriptionQtyUnit CostAmount w/DiscountAmount
+ {% for ItemVendorNum in OrderLine.Item.ItemVendorNums.ItemVendorNum %} + {% if (Order.vendorID|number_format) == (ItemVendorNum.vendorID|number_format) %} + {{ ItemVendorNum.value }} + {% endif %} + {% endfor %} + {{OrderLine.Item.upc}}{{OrderLine.Item.description}}{{OrderLine.quantity}}{{OrderLine.MetaData.cost|format_currency}}{{OrderLine.MetaData.total|format_currency}}
Subtotal{{Order.MetaData.subtotal|format_currency}}
Discount{{Order.MetaData.totalDiscount|format_currency({invert: true})}}
Total{{Order.MetaData.total|format_currency}}

{% if hide_general_notes == false %} {% if Order.Note.note|strlen > 0 %}

Notes:

-
{{Order.Note.note}} +
{{Order.Note.note|nl2br|raw}} {% endif %} {% endif %} {% endfor %} diff --git a/purchase_order/purchase_order_de.tpl b/purchase_order/purchase_order_de.tpl new file mode 100644 index 0000000..3c237be --- /dev/null +++ b/purchase_order/purchase_order_de.tpl @@ -0,0 +1,450 @@ +{# +***Begin Custom Options*** +Set any of the options in this section from 'false' to 'true' in order to enable them in the template +#} +{% set hide_rep_info = false %} {# Removes acct rep from PO template #} +{% set hide_account_number = false %} {# Removes acct number from PO template #} +{% set hide_shipping_table = false %} {# Removes shipping table from PO template #} +{% set hide_shipping_notes = false %} {# Removes shipping notes from PO template #} +{% set hide_general_notes = false %} {# Removes general notes from PO template #} +{# +***End Custom Options*** +#} +{% extends parameters.print ? "printbase" : "base" %} +{% block style %} + + + +{% endblock style %} +{% block content %} +{% for Order in Orders %} +
+

+ Bestellung #{{ Order.orderID }} +

+
+ Bestellt am: {{Order.orderedDate|correcttimezone|date ("m/d/y")}}
+ Erwartet am: {{Order.arrivalDate|correcttimezone|date ("m/d/y")}}
+
+
+
+
+
Lieferant
+

{{ Order.Vendor.name}}

+ {% if hide_rep_info == false %} + {% if Order.Vendor.Reps.VendorRep.firstName|strlen > 0 %} +
z. H. {{Order.Vendor.Reps.VendorRep.firstName}} {{Order.Vendor.Reps.VendorRep.lastName}}
+ {% endif %} + {% endif %} + {% if hide_account_number == false %} + {% if Order.Vendor.accountNumber > 0 %} +
Konto-Nr.{{Order.Vendor.accountNumber}}
+ {% endif %} + {% endif %} +

+ {{ Order.Vendor.Contact.Addresses.ContactAddress.address1 }} + {% if Order.Vendor.Contact.Addresses.ContactAddress.address2|strlen > 0 %} +
{{ Order.Vendor.Contact.Addresses.ContactAddress.address2 }} + {% endif %} + {% if Order.Vendor.Contact.Addresses.ContactAddress.city|strlen > 0 %} +
{{ Order.Vendor.Contact.Addresses.ContactAddress.city }}, + {{ Order.Vendor.Contact.Addresses.ContactAddress.state }} {{ Order.Vendor.Contact.Addresses.ContactAddress.zip }} + {% endif %} + {% for ContactPhone in Order.Vendor.Contact.Phones.ContactPhone %} +
{{ ContactPhone.number }} {{ ContactPhone.useType }} + {% endfor %} + {% for ContactEmail in Order.Vendor.Contact.Emails.ContactEmail %} +
{{ ContactEmail.address }} + {% endfor %} +

+
+
+
Lieferadresse
+

{{ Order.Shop.name }}

+

+ {{ Order.Shop.Contact.Addresses.ContactAddress.address1 }} +
{{ Order.Shop.Contact.Addresses.ContactAddress.city }}, + {{ Order.Shop.Contact.Addresses.ContactAddress.state }} {{ Order.Shop.Contact.Addresses.ContactAddress.zip }} +
{{ Order.Shop.Contact.Phones.ContactPhone.number }} +

+
+
+{% if hide_shipping_table == false %} +

Lieferinformationen

+ + + + + + {% if Order.MetaData.totalDiscount > 0 %} + + {% endif %} + + + + + + + {% if Order.MetaData.totalDiscount > 0 %} + + {% endif %} + + +
VersandGesamtmengeRabattSonstige(s)
+ {% if Order.MetaData.shipping|strlen > 0 %} + {{Order.MetaData.shipping|format_currency}} + {% else %} + Nicht vorhanden + {% endif %} + + {% if Order.totalQuantity|strlen > 0 %} + {{Order.totalQuantity}} + {% else %} + Nicht vorhanden + {% endif %} + {{Order.discount|floatval * 100}}% + {% if Order.MetaData.other|strlen > 0 %} + {{Order.MetaData.other|format_currency}} + {% else %} + Nicht vorhanden + {% endif %} +
+
+ + {% if hide_shipping_notes == false %} + {% if Order.shipInstructions|strlen > 0 %} + + + + + + {% endif %} + {% endif %} +
Notizen zur Lieferung{{Order.shipInstructions}}
+{% endif %} +

Details

+ + + + + + + + + {% if Order.discount > 0 %} + + {% else %} + + {% endif %} + + + {% for OrderLine in Order.OrderLines.OrderLine %} + + + + + + + + + {% endfor %} + + + + {% if Order.MetaData.subtotal > 0 %} + + {% endif %} + + + + + {% if Order.MetaData.totalDiscount > 0 %} + + + + + + + + {% endif %} + + + {% if Order.MetaData.total > 0 %} + + {% endif %} + + + + + +
Lieferanten-IDUPC-CodeBeschreibungAnzahlStückkostenBetrag mit RabattBetrag
+ {% for ItemVendorNum in OrderLine.Item.ItemVendorNums.ItemVendorNum %} + {% if (Order.vendorID|number_format) == (ItemVendorNum.vendorID|number_format) %} + {{ ItemVendorNum.value }} + {% endif %} + {% endfor %} + {{OrderLine.Item.upc}}{{OrderLine.Item.description}}{{OrderLine.quantity}}{{OrderLine.MetaData.cost|format_currency}}{{OrderLine.MetaData.total|format_currency}}
Zwischensumme{{Order.MetaData.subtotal|format_currency}}
Rabatt{{Order.MetaData.totalDiscount|format_currency({invert: true})}}
Gesamtsumme{{Order.MetaData.total|format_currency}}
+
+{% if hide_general_notes == false %} +{% if Order.Note.note|strlen > 0 %} +

Notizen:

+
{{Order.Note.note|nl2br|raw}} +{% endif %} +{% endif %} +{% endfor %} +{% endblock content %} diff --git a/purchase_order/purchase_order_es.tpl b/purchase_order/purchase_order_es.tpl new file mode 100644 index 0000000..8fb4905 --- /dev/null +++ b/purchase_order/purchase_order_es.tpl @@ -0,0 +1,450 @@ +{# +***Begin Custom Options*** +Set any of the options in this section from 'false' to 'true' in order to enable them in the template +#} +{% set hide_rep_info = false %} {# Removes acct rep from PO template #} +{% set hide_account_number = false %} {# Removes acct number from PO template #} +{% set hide_shipping_table = false %} {# Removes shipping table from PO template #} +{% set hide_shipping_notes = false %} {# Removes shipping notes from PO template #} +{% set hide_general_notes = false %} {# Removes general notes from PO template #} +{# +***End Custom Options*** +#} +{% extends parameters.print ? "printbase" : "base" %} +{% block style %} + + + +{% endblock style %} +{% block content %} +{% for Order in Orders %} +
+

+ Pedido de compra #{{ Order.orderID }} +

+
+ Fecha de pedido {{Order.orderedDate|correcttimezone|date ("m/d/y")}}
+ Fecha de entrega estimada {{Order.arrivalDate|correcttimezone|date ("m/d/y")}}
+
+
+
+
+
Proveedor
+

{{ Order.Vendor.name}}

+ {% if hide_rep_info == false %} + {% if Order.Vendor.Reps.VendorRep.firstName|strlen > 0 %} +
A/A {{Order.Vendor.Reps.VendorRep.firstName}} {{Order.Vendor.Reps.VendorRep.lastName}}
+ {% endif %} + {% endif %} + {% if hide_account_number == false %} + {% if Order.Vendor.accountNumber > 0 %} +
Cuenta #{{Order.Vendor.accountNumber}}
+ {% endif %} + {% endif %} +

+ {{ Order.Vendor.Contact.Addresses.ContactAddress.address1 }} + {% if Order.Vendor.Contact.Addresses.ContactAddress.address2|strlen > 0 %} +
{{ Order.Vendor.Contact.Addresses.ContactAddress.address2 }} + {% endif %} + {% if Order.Vendor.Contact.Addresses.ContactAddress.city|strlen > 0 %} +
{{ Order.Vendor.Contact.Addresses.ContactAddress.city }}, + {{ Order.Vendor.Contact.Addresses.ContactAddress.state }} {{ Order.Vendor.Contact.Addresses.ContactAddress.zip }} + {% endif %} + {% for ContactPhone in Order.Vendor.Contact.Phones.ContactPhone %} +
{{ ContactPhone.number }} {{ ContactPhone.useType }} + {% endfor %} + {% for ContactEmail in Order.Vendor.Contact.Emails.ContactEmail %} +
{{ ContactEmail.address }} + {% endfor %} +

+
+
+
Enviar a
+

{{ Order.Shop.name }}

+

+ {{ Order.Shop.Contact.Addresses.ContactAddress.address1 }} +
{{ Order.Shop.Contact.Addresses.ContactAddress.city }}, + {{ Order.Shop.Contact.Addresses.ContactAddress.state }} {{ Order.Shop.Contact.Addresses.ContactAddress.zip }} +
{{ Order.Shop.Contact.Phones.ContactPhone.number }} +

+
+
+{% if hide_shipping_table == false %} +

Información de envío

+ + + + + + {% if Order.MetaData.totalDiscount > 0 %} + + {% endif %} + + + + + + + {% if Order.MetaData.totalDiscount > 0 %} + + {% endif %} + + +
EnvíoCantidad totalDescuentoOtro
+ {% if Order.MetaData.shipping|strlen > 0 %} + {{Order.MetaData.shipping|format_currency}} + {% else %} + Ninguno + {% endif %} + + {% if Order.totalQuantity|strlen > 0 %} + {{Order.totalQuantity}} + {% else %} + Ninguno + {% endif %} + {{Order.discount|floatval * 100}}% + {% if Order.MetaData.other|strlen > 0 %} + {{Order.MetaData.other|format_currency}} + {% else %} + Ninguno + {% endif %} +
+
+ + {% if hide_shipping_notes == false %} + {% if Order.shipInstructions|strlen > 0 %} + + + + + + {% endif %} + {% endif %} +
Notas del envío:{{Order.shipInstructions}}
+{% endif %} +

Detalles

+ + + + + + + + + {% if Order.discount > 0 %} + + {% else %} + + {% endif %} + + + {% for OrderLine in Order.OrderLines.OrderLine %} + + + + + + + + + {% endfor %} + + + + {% if Order.MetaData.subtotal > 0 %} + + {% endif %} + + + + + {% if Order.MetaData.totalDiscount > 0 %} + + + + + + + + {% endif %} + + + {% if Order.MetaData.total > 0 %} + + {% endif %} + + + + + +
ID del proveedorCódigo UPCDescripciónCant.Costo unitarioMonto con descuentoMonto
+ {% for ItemVendorNum in OrderLine.Item.ItemVendorNums.ItemVendorNum %} + {% if (Order.vendorID|number_format) == (ItemVendorNum.vendorID|number_format) %} + {{ ItemVendorNum.value }} + {% endif %} + {% endfor %} + {{OrderLine.Item.upc}}{{OrderLine.Item.description}}{{OrderLine.quantity}}{{OrderLine.MetaData.cost|format_currency}}{{OrderLine.MetaData.total|format_currency}}
Subtotal{{Order.MetaData.subtotal|format_currency}}
Descuento{{Order.MetaData.totalDiscount|format_currency({invert: true})}}
Total{{Order.MetaData.total|format_currency}}
+
+{% if hide_general_notes == false %} +{% if Order.Note.note|strlen > 0 %} +

Notas:

+
{{Order.Note.note|nl2br|raw}} +{% endif %} +{% endif %} +{% endfor %} +{% endblock content %} diff --git a/purchase_order/purchase_order_fr.tpl b/purchase_order/purchase_order_fr.tpl new file mode 100644 index 0000000..e73d494 --- /dev/null +++ b/purchase_order/purchase_order_fr.tpl @@ -0,0 +1,450 @@ +{# +***Begin Custom Options*** +Set any of the options in this section from 'false' to 'true' in order to enable them in the template +#} +{% set hide_rep_info = false %} {# Removes acct rep from PO template #} +{% set hide_account_number = false %} {# Removes acct number from PO template #} +{% set hide_shipping_table = false %} {# Removes shipping table from PO template #} +{% set hide_shipping_notes = false %} {# Removes shipping notes from PO template #} +{% set hide_general_notes = false %} {# Removes general notes from PO template #} +{# +***End Custom Options*** +#} +{% extends parameters.print ? "printbase" : "base" %} +{% block style %} + + + +{% endblock style %} +{% block content %} +{% for Order in Orders %} +
+

+ Bon de commande #{{ Order.orderID }} +

+
+ Date de commande: {{Order.orderedDate|correcttimezone|date ("m/d/y")}}
+ Date prévue: {{Order.arrivalDate|correcttimezone|date ("m/d/y")}}
+
+
+
+
+
Fournisseur
+

{{ Order.Vendor.name}}

+ {% if hide_rep_info == false %} + {% if Order.Vendor.Reps.VendorRep.firstName|strlen > 0 %} +
Destinataire: {{Order.Vendor.Reps.VendorRep.firstName}} {{Order.Vendor.Reps.VendorRep.lastName}}
+ {% endif %} + {% endif %} + {% if hide_account_number == false %} + {% if Order.Vendor.accountNumber > 0 %} +
Numéro de compte{{Order.Vendor.accountNumber}}
+ {% endif %} + {% endif %} +

+ {{ Order.Vendor.Contact.Addresses.ContactAddress.address1 }} + {% if Order.Vendor.Contact.Addresses.ContactAddress.address2|strlen > 0 %} +
{{ Order.Vendor.Contact.Addresses.ContactAddress.address2 }} + {% endif %} + {% if Order.Vendor.Contact.Addresses.ContactAddress.city|strlen > 0 %} +
{{ Order.Vendor.Contact.Addresses.ContactAddress.city }}, + {{ Order.Vendor.Contact.Addresses.ContactAddress.state }} {{ Order.Vendor.Contact.Addresses.ContactAddress.zip }} + {% endif %} + {% for ContactPhone in Order.Vendor.Contact.Phones.ContactPhone %} +
{{ ContactPhone.number }} {{ ContactPhone.useType }} + {% endfor %} + {% for ContactEmail in Order.Vendor.Contact.Emails.ContactEmail %} +
{{ ContactEmail.address }} + {% endfor %} +

+
+
+
Expédier à
+

{{ Order.Shop.name }}

+

+ {{ Order.Shop.Contact.Addresses.ContactAddress.address1 }} +
{{ Order.Shop.Contact.Addresses.ContactAddress.city }}, + {{ Order.Shop.Contact.Addresses.ContactAddress.state }} {{ Order.Shop.Contact.Addresses.ContactAddress.zip }} +
{{ Order.Shop.Contact.Phones.ContactPhone.number }} +

+
+
+{% if hide_shipping_table == false %} +

Renseignements sur l’expédition

+ + + + + + {% if Order.MetaData.totalDiscount > 0 %} + + {% endif %} + + + + + + + {% if Order.MetaData.totalDiscount > 0 %} + + {% endif %} + + +
ExpéditionQuantité totaleRéductionAutre
+ {% if Order.MetaData.shipping|strlen > 0 %} + {{Order.MetaData.shipping|format_currency}} + {% else %} + Aucun + {% endif %} + + {% if Order.totalQuantity|strlen > 0 %} + {{Order.totalQuantity}} + {% else %} + Aucun + {% endif %} + {{Order.discount|floatval * 100}}% + {% if Order.MetaData.other|strlen > 0 %} + {{Order.MetaData.other|format_currency}} + {% else %} + Aucun + {% endif %} +
+
+ + {% if hide_shipping_notes == false %} + {% if Order.shipInstructions|strlen > 0 %} + + + + + + {% endif %} + {% endif %} +
Notes sur l’expédition :{{Order.shipInstructions}}
+{% endif %} +

Détails

+ + + + + + + + + {% if Order.discount > 0 %} + + {% else %} + + {% endif %} + + + {% for OrderLine in Order.OrderLines.OrderLine %} + + + + + + + + + {% endfor %} + + + + {% if Order.MetaData.subtotal > 0 %} + + {% endif %} + + + + + {% if Order.MetaData.totalDiscount > 0 %} + + + + + + + + {% endif %} + + + {% if Order.MetaData.total > 0 %} + + {% endif %} + + + + + +
Identifiant du fournisseurCode CUPDescriptionQtéCoût unitaireMontant avec réductionMontant
+ {% for ItemVendorNum in OrderLine.Item.ItemVendorNums.ItemVendorNum %} + {% if (Order.vendorID|number_format) == (ItemVendorNum.vendorID|number_format) %} + {{ ItemVendorNum.value }} + {% endif %} + {% endfor %} + {{OrderLine.Item.upc}}{{OrderLine.Item.description}}{{OrderLine.quantity}}{{OrderLine.MetaData.cost|format_currency}}{{OrderLine.MetaData.total|format_currency}}
Sous-total{{Order.MetaData.subtotal|format_currency}}
Réduction{{Order.MetaData.totalDiscount|format_currency({invert: true})}}
Total{{Order.MetaData.total|format_currency}}
+
+{% if hide_general_notes == false %} +{% if Order.Note.note|strlen > 0 %} +

Notes :

+
{{Order.Note.note|nl2br|raw}} +{% endif %} +{% endif %} +{% endfor %} +{% endblock content %} diff --git a/purchase_order/purchase_order_nl.tpl b/purchase_order/purchase_order_nl.tpl new file mode 100644 index 0000000..f428f85 --- /dev/null +++ b/purchase_order/purchase_order_nl.tpl @@ -0,0 +1,450 @@ +{# +***Begin Custom Options*** +Set any of the options in this section from 'false' to 'true' in order to enable them in the template +#} +{% set hide_rep_info = false %} {# Removes acct rep from PO template #} +{% set hide_account_number = false %} {# Removes acct number from PO template #} +{% set hide_shipping_table = false %} {# Removes shipping table from PO template #} +{% set hide_shipping_notes = false %} {# Removes shipping notes from PO template #} +{% set hide_general_notes = false %} {# Removes general notes from PO template #} +{# +***End Custom Options*** +#} +{% extends parameters.print ? "printbase" : "base" %} +{% block style %} + + + +{% endblock style %} +{% block content %} +{% for Order in Orders %} +
+

+ Inkooporder #{{ Order.orderID }} +

+
+ Besteld: {{Order.orderedDate|correcttimezone|date ("m/d/y")}}
+ Verwacht: {{Order.arrivalDate|correcttimezone|date ("m/d/y")}}
+
+
+
+
+
Leverancier
+

{{ Order.Vendor.name}}

+ {% if hide_rep_info == false %} + {% if Order.Vendor.Reps.VendorRep.firstName|strlen > 0 %} +
T.a.v. {{Order.Vendor.Reps.VendorRep.firstName}} {{Order.Vendor.Reps.VendorRep.lastName}}
+ {% endif %} + {% endif %} + {% if hide_account_number == false %} + {% if Order.Vendor.accountNumber > 0 %} +
Accountnummer{{Order.Vendor.accountNumber}}
+ {% endif %} + {% endif %} +

+ {{ Order.Vendor.Contact.Addresses.ContactAddress.address1 }} + {% if Order.Vendor.Contact.Addresses.ContactAddress.address2|strlen > 0 %} +
{{ Order.Vendor.Contact.Addresses.ContactAddress.address2 }} + {% endif %} + {% if Order.Vendor.Contact.Addresses.ContactAddress.city|strlen > 0 %} +
{{ Order.Vendor.Contact.Addresses.ContactAddress.city }}, + {{ Order.Vendor.Contact.Addresses.ContactAddress.state }} {{ Order.Vendor.Contact.Addresses.ContactAddress.zip }} + {% endif %} + {% for ContactPhone in Order.Vendor.Contact.Phones.ContactPhone %} +
{{ ContactPhone.number }} {{ ContactPhone.useType }} + {% endfor %} + {% for ContactEmail in Order.Vendor.Contact.Emails.ContactEmail %} +
{{ ContactEmail.address }} + {% endfor %} +

+
+
+
Verzend naar
+

{{ Order.Shop.name }}

+

+ {{ Order.Shop.Contact.Addresses.ContactAddress.address1 }} +
{{ Order.Shop.Contact.Addresses.ContactAddress.city }}, + {{ Order.Shop.Contact.Addresses.ContactAddress.state }} {{ Order.Shop.Contact.Addresses.ContactAddress.zip }} +
{{ Order.Shop.Contact.Phones.ContactPhone.number }} +

+
+
+{% if hide_shipping_table == false %} +

Verzendinformatie

+ + + + + + {% if Order.MetaData.totalDiscount > 0 %} + + {% endif %} + + + + + + + {% if Order.MetaData.totalDiscount > 0 %} + + {% endif %} + + +
VerzendenTotale hoeveelheidKortingOverig
+ {% if Order.MetaData.shipping|strlen > 0 %} + {{Order.MetaData.shipping|format_currency}} + {% else %} + Geen + {% endif %} + + {% if Order.totalQuantity|strlen > 0 %} + {{Order.totalQuantity}} + {% else %} + Geen + {% endif %} + {{Order.discount|floatval * 100}}% + {% if Order.MetaData.other|strlen > 0 %} + {{Order.MetaData.other|format_currency}} + {% else %} + Geen + {% endif %} +
+
+ + {% if hide_shipping_notes == false %} + {% if Order.shipInstructions|strlen > 0 %} + + + + + + {% endif %} + {% endif %} +
Verzendopmerkingen:{{Order.shipInstructions}}
+{% endif %} +

Details

+ + + + + + + + + {% if Order.discount > 0 %} + + {% else %} + + {% endif %} + + + {% for OrderLine in Order.OrderLines.OrderLine %} + + + + + + + + + {% endfor %} + + + + {% if Order.MetaData.subtotal > 0 %} + + {% endif %} + + + + + {% if Order.MetaData.totalDiscount > 0 %} + + + + + + + + {% endif %} + + + {% if Order.MetaData.total > 0 %} + + {% endif %} + + + + + +
Artikelnummer leverancierUPC-codeBeschrijvingAantalEenheidsprijsBedrag met kortingBedrag
+ {% for ItemVendorNum in OrderLine.Item.ItemVendorNums.ItemVendorNum %} + {% if (Order.vendorID|number_format) == (ItemVendorNum.vendorID|number_format) %} + {{ ItemVendorNum.value }} + {% endif %} + {% endfor %} + {{OrderLine.Item.upc}}{{OrderLine.Item.description}}{{OrderLine.quantity}}{{OrderLine.MetaData.cost|format_currency}}{{OrderLine.MetaData.total|format_currency}}
Subtotaal{{Order.MetaData.subtotal|format_currency}}
Korting{{Order.MetaData.totalDiscount|format_currency({invert: true})}}
Totaal{{Order.MetaData.total|format_currency}}
+
+{% if hide_general_notes == false %} +{% if Order.Note.note|strlen > 0 %} +

Opmerkingen:

+
{{Order.Note.note|nl2br|raw}} +{% endif %} +{% endif %} +{% endfor %} +{% endblock content %} diff --git a/receipt/SaleReceipt.tpl b/receipt/SaleReceipt.tpl index 1c55696..3146fb9 100644 --- a/receipt/SaleReceipt.tpl +++ b/receipt/SaleReceipt.tpl @@ -16,7 +16,7 @@ {% set hide_customer_vat_number = false %} {# Hide the Customer VAT Number on Sales #} {% set hide_customer_registration_number = false %} {# Hide the Customer Registration Number on Sales #} {% set sale_id_instead_of_ticket_number = false %} {# Displays the Sale ID instead of the Ticket Number #} -{% set invoice_as_title = false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} +{% set invoice_as_title = parameters.invoice_as_title == "true" ? true : false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} {% set workorders_as_title = false %} {# Changes the receipt title to "Work Orders" if there is no Salesline items and 1 or more workorders #} {% set quote_id_prefix = "" %} {# Adds a string of text as a prefix for the Quote ID. Ex: "Q-". To be used when "sale_id_instead_of_ticket_number" is true #} {% set sale_id_prefix = "" %} {# Adds a string of text as a prefix for the Sales ID. Ex: "S-". To be used when "sale_id_instead_of_ticket_number" is true #} @@ -118,6 +118,10 @@ h1 { text-align: center; } +h1.spacer { + margin-top: 2em; +} + p.date, p.copy { font-size: 9pt; margin: 0; @@ -207,12 +211,26 @@ table div.line_note { padding-left: 10px; } +table div.line_extra { + text-align: left; + padding-left: 10px; + font-size: .8em; +} + table div.line_serial { text-align: left; font-weight: normal; padding-left: 10px; } +table div.line_description_item_fee { + padding-left: 10px; +} + +.footerSectionTitle + table div.line_description_item_fee { + padding-left: 25px; +} + table.workorders div.line_description { font-weight: normal; padding-left: 10px; @@ -240,12 +258,54 @@ p.thankyou { .note { text-align: center; } - .barcodeContainer { margin-top: 15px; text-align: center; } +.remotePaymentLinkContainer { + text-align: center; + margin: 1.5em 0; +} + +span.payOnlineTitle { + display: block; + font-size: 0.8rem; + font-weight: bold; + margin: 2rem 0 0.25rem; + text-transform: uppercase; +} + +svg.payOnlineIcon { + height: 1rem; + margin-right: 0.25rem; + vertical-align: -0.2rem; + width: 1rem; +} + +.payButton { + background-color: #1844cc; + background-image: linear-gradient(#537dec, #2e61de); + border: 1px solid #1844cc; + border-radius: 0.1875rem; + box-shadow: rgba(255, 255, 255, 0.15) 0px 1px 0px 0px inset; + color: #fff; + display: inline-block; + font-size: 1rem; + font-weight: 500; + line-height: 2rem; + margin: 1.5em 0 0; + padding: 0.375rem 1.5rem; + text-align: center; + text-decoration: none; + width: 90%; +} + +.payButton:hover { + background-color: #2e61de; + background-image: linear-gradient(#2e61de, #2e61de); +} + .workorders .barcodeContainer { margin-left: 15px; text-align: left; @@ -593,6 +653,10 @@ table.payments td.label { {{ _self.client_workorder_agreement(Sale,_context) }} + {% if parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} + {% endif %} + {% if not parameters.gift_receipt %} {{ _self.no_tax_applied_text(Sale) }}

@@ -603,9 +667,9 @@ table.payments td.label { {% endif %} {% if show_barcode %} -

- -

+

+ +

{% endif %} {% if Sale.completed == 'true' and Sale.SalePayments and not parameters.gift_receipt %} @@ -613,7 +677,11 @@ table.payments td.label { DO NOT CONSOLIDATE THESE IF STATEMENTS. Twig doesnt play nice with these functions. #} - {{ _self.transaction_details(Sale) }} + {{ _self.transaction_details(Sale) }} + {% endif %} + + {% if not parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} {% endif %}
@@ -638,7 +706,7 @@ table.payments td.label { {% macro store_receipt(Sale,parameters,options,Payment) %}
- {{ _self.header(Sale,options) }} + {{ _self.header(Sale,options) }} {{ _self.title(Sale,parameters,options) }}

Store Copy

{{ _self.date(Sale) }} @@ -647,14 +715,14 @@ table.payments td.label { {% if options.show_sale_lines_on_store_copy %} {{ _self.receipt(Sale,parameters,true,options) }} {% else %} - {% if isUnifiedReceipt(Sale.SalePayments) %} - {{ _self.single_transaction_details(Sale, Payment) }} - {% else %} -

Payments

- - {{ _self.cc_payment_info(Sale,Payment) }} -
- {% endif %} + {% if isUnifiedReceipt(Sale.SalePayments) %} + {{ _self.single_transaction_details(Sale, Payment) }} + {% else %} +

Payments

+ + {{ _self.cc_payment_info(Sale,Payment) }} +
+ {% endif %} {% endif %} {% if Sale.quoteID and Sale.Quote.notes|strlen > 0 %}

{{Sale.Quote.notes|noteformat|raw}}

{% endif %} @@ -675,6 +743,10 @@ table.payments td.label {
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
+ {% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %} +
+ {{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %} +
{% endif %} {% if Line.Note %}
@@ -695,7 +767,7 @@ table.payments td.label {
{% endfor %} {% endif %} - {% if options.per_line_employee %} + {% if options.per_line_employee and not options.hide_employee_name %}
Employee: {{ Line.Employee.firstName }}
@@ -711,8 +783,10 @@ table.payments td.label { {% endif %} {% if options.workorders_as_title and Sale.SaleLines is empty and Sale.Customer.Workorders is defined %} Work Orders + {% elseif Sale.SaleLines is empty and Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + Remote deposit request {% else %} - {% if parameters.gift_receipt %}Gift{% else %}Sales{% endif %} Receipt + {% if parameters.gift_receipt %}Gift Receipt{% else %}Sales Receipt{% endif %} {% endif %} {% if options.invoice_as_title and options.print_layout %} @@ -728,7 +802,7 @@ table.payments td.label { {% if options.invoice_as_title and options.print_layout %} {% endif %} - Receipt VOIDED + Receipt VOIDED {% if options.invoice_as_title and options.print_layout %} Invoice VOIDED @@ -759,7 +833,7 @@ table.payments td.label { {% macro date(Sale) %}

{% if Sale.timeStamp %} - {{Sale.timeStamp|correcttimezone|date(getDateTimeFormat())}} + {{Sale.timeStamp|correcttimezone|date(getDateTimeFormat())}} {% else %} {{"now"|date(getDateTimeFormat())}} {% endif %} @@ -827,7 +901,7 @@ table.payments td.label { {% endif %} {% if Sale.Customer %} - {% if Sale.Customer.company|strlen > 0 %} + {% if Sale.Customer.company|strlen > 0 and not options.show_customer_name_only %} Company: {{Sale.Customer.company}}
{% endif %} @@ -885,6 +959,12 @@ table.payments td.label { {{ _self.lineDescription(Line,options) }} + {% if options.show_custom_sku and Line.Item.customSku|strlen > 0 %} +

Custom SKU: {{ Line.Item.customSku }}
+ {% endif %} + {% if options.show_manufacturer_sku and Line.Item.manufacturerSku|strlen > 0 %} +
Man. SKU: {{ Line.Item.manufacturerSku }}
+ {% endif %} {% if options.per_line_discount == true and not parameters.gift_receipt %} {% if Line.calcLineDiscount > 0 %} Discount: '{{ Line.Discount.name }}' -{{Line.calcLineDiscount|money}} @@ -894,13 +974,6 @@ table.payments td.label { {% endif %} - {% if options.show_custom_sku and Line.Item.customSku %} - {{ Line.Item.customSku }} - {% endif %} - {% if options.show_manufacturer_sku and Line.Item.manufacturerSku %} - {{ Line.Item.manufacturerSku }} - {% endif %} - {% if options.show_msrp == true and not parameters.gift_receipt %} {% set msrp_printed = false %} {% for price in Line.Item.Prices.ItemPrice if not msrp_printed %} @@ -916,7 +989,7 @@ table.payments td.label { {% if options.per_line_subtotal and options.discounted_line_items and Line.calcLineDiscount != 0 and not parameters.gift_receipt %} - {{Line.unitQuantity}} x {{Line.displayableUnitPrice|money}} + {{Line.unitQuantity}} x {{Line.unitPrice|money}} {% endif %} {{Line.unitQuantity}} {% if options.per_line_subtotal and not parameters.gift_receipt %} x @@ -934,7 +1007,7 @@ table.payments td.label { {% if not isTaxInclusive or isTaxInclusive == 'false' %} {{ Line.calcSubtotal|money }}
{% else %} - {{ multiply(Line.displayableUnitPrice, Line.unitQuantity)|money }}
+ {{ multiply(Line.unitPrice, Line.unitQuantity)|money }}
{% endif %} {% endif %} {{ Line.displayableSubtotal|money }} @@ -949,13 +1022,6 @@ table.payments td.label { Items - {% if options.show_custom_sku and options.show_manufacturer_sku %} - Custom SKU - Man. SKU - {% elseif options.show_custom_sku or options.show_manufacturer_sku %} - SKU - {% endif %} - {% if options.show_msrp and not parameters.gift_receipt %} MSRP {% endif %} @@ -976,6 +1042,9 @@ table.payments td.label { {% if not parameters.gift_receipt %} + {% if Sale.MetaData.itemFeesSubtotal %} + + {% endif %} @@ -1007,9 +1084,9 @@ table.payments td.label { {% endfor %} - {% if Sale.tipEnabled == 'true' %} - - {% endif %} + {% if Sale.tipEnabled == 'true' %} + + {% endif %}
Fee total{{Sale.MetaData.itemFeesSubtotal|money}}
{% if options.discounted_line_items and Sale.calcDiscount != 0 %} @@ -986,9 +1055,17 @@ table.payments td.label { {% if options.discounted_line_items %} - {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money}} + {% if options.Sale.isTaxInclusive == 'true' %} + {{ subtract(Sale.calcSubtotal, Sale.calcDiscount)|money }} + {% else %} + {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money }} + {% endif %} {% else %} - {{Sale.displayableSubtotal|money}} + {% if options.Sale.isTaxInclusive == 'true' %} + {{ Sale.calcSubtotal|money }} + {% else %} + {{ Sale.displayableSubtotal|money }} + {% endif %} {% endif %}
Total Tax{{Sale.taxTotal|money}}
Total{{Sale.calcTotal|money}}
Tip{{Sale.calcTips|money}}
Tip{{Sale.calcTips|money}}
{% endif %} @@ -1024,10 +1101,10 @@ table.payments td.label { {% if Payment.PaymentType.name != 'Cash' %} {% if Payment.CreditAccount.giftCard == 'true' %} - + {% if Payment.amount > 0 %} - Gift Card Charge + Gift Card Charge {{Payment.CreditAccount.code}} {{Payment.amount|money}} @@ -1043,7 +1120,7 @@ table.payments td.label { Balance {{Payment.CreditAccount.balance|getinverse|money}} - {% elseif Payment.amount < 0 and Sale.calcTotal >= 0 %} + {% elseif Payment.amount < 0 and Payment.archived != 'true' and Sale.calcTotal >= 0 %} Gift Card Purchase {{Payment.amount|getinverse|money}} @@ -1054,17 +1131,17 @@ table.payments td.label { {% endif %} {% elseif Payment.creditAccountID == 0 %} - + {{ _self.cc_payment_info(Sale,Payment) }} {% elseif Payment.CreditAccount and Payment.archived == 'false' %} {% if Payment.amount < 0 %} - Account Deposit - {{Payment.amount|getinverse|money}} + Account Deposit + {{Payment.amount|getinverse|money}} {% else %} - Account Charge - {{Payment.amount|money}} + Account Charge + {{Payment.amount|money}} {% endif %} {% endif %} @@ -1089,18 +1166,18 @@ table.payments td.label { {% endif %} {% if options.show_customer_credit_account and Sale.Customer and not parameters.gift_receipt and not store_copy %} - {% if Sale.Customer.CreditAccount and Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %}

Store Account

{% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 %} - + {% elseif Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} - + {% endif %}
Balance Owed: {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}{{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}
On Deposit: {{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}{{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}
@@ -1109,17 +1186,102 @@ table.payments td.label { - +
Remaining Balance: {{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}{{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}
{% endif %} {% endif %} + {% if Sale.Customer.CreditAccount %} + {% for Payment in Sale.SalePayments.SalePayment %} + {% if Payment.PaymentType.name == 'Credit Account' and options.show_credit_account_signature %} +
+
Signature:
+
+ {{Sale.Customer.title}} {{Sale.Customer.firstName}} {{Sale.Customer.lastName}}
+
+
+ {% endif %} + {% endfor %} + {% endif %} + + {{ _self.remoteDepositSummary(Sale,parameters) }} {% endif %} {% if (not parameters.gift_receipt and not options.hide_notes_in_sale_receipt) or (parameters.gift_receipt and not options.hide_notes_in_gift_receipt) %} {{ _self.show_note(Sale.SaleNotes) }} {% endif %} {% endmacro %} +{% macro remoteDepositLink(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remotePaymentLinkUrl %} + {% if parameters.email %} + + {% else %} + + {% endif %} + {% endif %} +{% endmacro %} + +{% macro remoteDepositSummary(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + {% if Sale.SaleLines is not empty %} +

+ Remote deposit request +

+ {{ _self.date(Sale) }} + {% endif %} +

Requested Payment

+ + + + + + + +
Account Deposit: {{ Sale.Customer.CreditAccount.MetaData.remoteDepositAmount|money }}
+ {% endif %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 or Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} +

Store Account (After Payment)

+ + + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 %} + + + + + {% elseif Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} + + + + + {% endif %} + +
Balance Owed (after payment): {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment|money }}
On Deposit (after payment): {{ Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment|money }}
+ {% endif %} + {% if Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment > 0 %} + + + + + +
Remaining Balance (after payment): {{ Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment|money }}
+ {% endif %} +{% endmacro %} + {% macro cc_payment_info(Sale,Payment) %} {% if Payment.archived == 'false' %} @@ -1166,135 +1328,133 @@ table.payments td.label { {% endmacro %} {% macro transaction(Payment) %} - {% if Payment.PaymentType.type == 'credit card' and Payment.MetaData.ReceiptData.status != 'error' and Payment.archived == 'false' %} - {% if Payment.MetaData.ReceiptData.type|strlen and Payment.MetaData.ReceiptData.authorized_amount|strlen %} - - {{ mostranslate(Payment.MetaData.ReceiptData.type, 'capitalize', true) }} - {{ Payment.MetaData.ReceiptData.authorized_amount|money }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode|strlen %} - - Status: - {{ Payment.MetaData.ReceiptData.extra_parameters.statusCode }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.card_brand|strlen and Payment.MetaData.ReceiptData.card_number|strlen %} - - {{ Payment.MetaData.ReceiptData.card_brand }} - {{ getDisplayableCardNumber(Payment.MetaData.ReceiptData.card_number) }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.processed_date|strlen %} - - Date: - - {{ Payment.MetaData.ReceiptData.processed_date|correcttimezone|date(getDateTimeFormat()) }} - - - {% endif %} - - {% if Payment.MetaData.ReceiptData.entry_method|strlen %} - - Method: - {{ Payment.MetaData.ReceiptData.entry_method }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.extra_parameters.acceptorId|strlen %} - - MLC: - {{ Payment.MetaData.ReceiptData.extra_parameters.acceptorId }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.authorization_number|strlen %} - - Auth Code: - {{ Payment.MetaData.ReceiptData.authorization_number }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode|strlen or Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage|strlen %} - - Response: - {{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode }}/{{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.emv_application_id|strlen %} - - AID: - {{ Payment.MetaData.ReceiptData.emv_application_id }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.emv_application_preferred_name|strlen %} - - APN: - {{ Payment.MetaData.ReceiptData.emv_application_preferred_name }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.extra_parameters.accountType|strlen %} - - Account Type: - {{ Payment.MetaData.ReceiptData.extra_parameters.accountType }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.emv_cryptogram_type|strlen or Payment.MetaData.ReceiptData.emv_cryptogram|strlen %} - - Cryptogram: - {{ Payment.MetaData.ReceiptData.emv_cryptogram_type }} {{ Payment.MetaData.ReceiptData.emv_cryptogram }} - - {% endif %} - - {% for emvTag in Payment.MetaData.ReceiptData.extra_parameters.emv_tags.children() %} - - {{ emvTag.getName() }} - {{ emvTag }} - - {% endfor %} - - {# Creates a Line Break for the next Payment #} -
- {% endif %} + {% if Payment.PaymentType.type == 'credit card' and Payment.MetaData.ReceiptData.status != 'error' and Payment.archived == 'false' %} + {% if Payment.MetaData.ReceiptData.type|strlen and Payment.MetaData.ReceiptData.authorized_amount|strlen %} + + {{ mostranslate(Payment.MetaData.ReceiptData.type, 'capitalize', true) }} + {{ Payment.MetaData.ReceiptData.authorized_amount|money }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode|strlen %} + + Status: + {{ Payment.MetaData.ReceiptData.extra_parameters.statusCode }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.card_brand|strlen and Payment.MetaData.ReceiptData.card_number|strlen %} + + {{ Payment.MetaData.ReceiptData.card_brand }} + {{ getDisplayableCardNumber(Payment.MetaData.ReceiptData.card_number) }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.processed_date|strlen %} + + Date: + {{ Payment.MetaData.ReceiptData.processed_date|correcttimezone|date(getDateTimeFormat()) }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.entry_method|strlen %} + + Method: + {{ Payment.MetaData.ReceiptData.entry_method }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.acceptorId|strlen %} + + MLC: + {{ Payment.MetaData.ReceiptData.extra_parameters.acceptorId }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.authorization_number|strlen %} + + Auth Code: + {{ Payment.MetaData.ReceiptData.authorization_number }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode|strlen or Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage|strlen %} + + Response: + {{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode }}/{{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_id|strlen %} + + AID: + {{ Payment.MetaData.ReceiptData.emv_application_id }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_preferred_name|strlen %} + + APN: + {{ Payment.MetaData.ReceiptData.emv_application_preferred_name }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.accountType|strlen %} + + Account Type: + {{ Payment.MetaData.ReceiptData.extra_parameters.accountType }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_cryptogram_type|strlen or Payment.MetaData.ReceiptData.emv_cryptogram|strlen %} + + Cryptogram: + {{ Payment.MetaData.ReceiptData.emv_cryptogram_type }} {{ Payment.MetaData.ReceiptData.emv_cryptogram }} + + {% endif %} + + {% for emvTag in Payment.MetaData.ReceiptData.extra_parameters.emv_tags.children() %} + + {{ emvTag.getName() }} + {{ emvTag }} + + {% endfor %} + + {# Creates a Line Break for the next Payment #} +
+ {% endif %} {% endmacro %} {% macro single_transaction_details(Sale, Payment) %} - {% if hasCCPayment(Sale.SalePayments) %} - {% if isUnifiedReceipt(Sale.SalePayments) %} -

Transaction Details


-
- - - {{ _self.transaction(Payment) }} - -
-
- {% endif %} - {% endif %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Transaction Details


+
+ + + {{ _self.transaction(Payment) }} + +
+
+ {% endif %} + {% endif %} {% endmacro %} {% macro transaction_details(Sale) %} - {% if hasCCPayment(Sale.SalePayments) %} - {% if isUnifiedReceipt(Sale.SalePayments) %} -

Transaction Details


-
- - - {% for Payment in Sale.SalePayments.SalePayment %} - {{ _self.transaction(Payment) }} - {% endfor %} - -
-
- {% endif %} - {% endif %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Transaction Details


+
+ + + {% for Payment in Sale.SalePayments.SalePayment %} + {{ _self.transaction(Payment) }} + {% endfor %} + +
+
+ {% endif %} + {% endif %} {% endmacro %} {% macro cc_agreement(Sale,Payment,options) %} @@ -1313,10 +1473,6 @@ table.payments td.label { {% macro shop_workorder_agreement(Sale) %} {% if Sale.Shop.ReceiptSetup.workorderAgree|strlen > 0 and Sale.Workorders %} -

{{Sale.Shop.ReceiptSetup.workorderAgree|noteformat|raw}}

@@ -1387,14 +1543,19 @@ table.payments td.label { {% endfor %} {% endif %} - {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 and not logo_printed %} - - {% if show_shop_name_with_logo %} + {% if not logo_printed %} + {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 %} + + {% set logo_printed = true %} + {% endif %} + {% endif %} + + {% if Sale.Shop.name|strlen > 0 %} + {% if not logo_printed or options.show_shop_name_with_logo == true %}

{{ Sale.Shop.name }}

{% endif %} - {% else %} -

{{ Sale.Shop.name }}

{% endif %} +

{% if Sale.Shop.ReceiptSetup.header|strlen > 0 %}

{{Sale.Shop.ReceiptSetup.header|nl2br|raw}}

diff --git a/receipt/SaleReceipt_de_CH.tpl b/receipt/SaleReceipt_de_CH.tpl index 488b3d6..ff09bb1 100644 --- a/receipt/SaleReceipt_de_CH.tpl +++ b/receipt/SaleReceipt_de_CH.tpl @@ -16,7 +16,7 @@ {% set hide_customer_vat_number = false %} {# Hide the Customer VAT Number on Sales #} {% set hide_customer_registration_number = false %} {# Hide the Customer Registration Number on Sales #} {% set sale_id_instead_of_ticket_number = true %} {# Displays the Sale ID instead of the Ticket Number #} -{% set invoice_as_title = false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} +{% set invoice_as_title = parameters.invoice_as_title == "true" ? true : false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} {% set workorders_as_title = false %} {# Changes the receipt title to "Work Orders" if there is no Salesline items and 1 or more workorders #} {% set quote_id_prefix = "" %} {# Adds a string of text as a prefix for the Quote ID. Ex: "Q-". To be used when "sale_id_instead_of_ticket_number" is true #} {% set sale_id_prefix = "" %} {# Adds a string of text as a prefix for the Sales ID. Ex: "S-". To be used when "sale_id_instead_of_ticket_number" is true #} @@ -118,6 +118,10 @@ h1 { text-align: center; } +h1.spacer { + margin-top: 2em; +} + p.date, p.copy { font-size: 9pt; margin: 0; @@ -207,12 +211,26 @@ table div.line_note { padding-left: 10px; } +table div.line_extra { + text-align: left; + padding-left: 10px; + font-size: .8em; +} + table div.line_serial { text-align: left; font-weight: normal; padding-left: 10px; } +table div.line_description_item_fee { + padding-left: 10px; +} + +.footerSectionTitle + table div.line_description_item_fee { + padding-left: 25px; +} + table.workorders div.line_description { font-weight: normal; padding-left: 10px; @@ -240,12 +258,54 @@ p.thankyou { .note { text-align: center; } - .barcodeContainer { margin-top: 15px; text-align: center; } +.remotePaymentLinkContainer { + text-align: center; + margin: 1.5em 0; +} + +span.payOnlineTitle { + display: block; + font-size: 0.8rem; + font-weight: bold; + margin: 2rem 0 0.25rem; + text-transform: uppercase; +} + +svg.payOnlineIcon { + height: 1rem; + margin-right: 0.25rem; + vertical-align: -0.2rem; + width: 1rem; +} + +.payButton { + background-color: #1844cc; + background-image: linear-gradient(#537dec, #2e61de); + border: 1px solid #1844cc; + border-radius: 0.1875rem; + box-shadow: rgba(255, 255, 255, 0.15) 0px 1px 0px 0px inset; + color: #fff; + display: inline-block; + font-size: 1rem; + font-weight: 500; + line-height: 2rem; + margin: 1.5em 0 0; + padding: 0.375rem 1.5rem; + text-align: center; + text-decoration: none; + width: 90%; +} + +.payButton:hover { + background-color: #2e61de; + background-image: linear-gradient(#2e61de, #2e61de); +} + .workorders .barcodeContainer { margin-left: 15px; text-align: left; @@ -289,6 +349,24 @@ table.payments td.label { width: 100%; } +#receiptTransactionDetails table { + max-width: 245px; + margin: 0 auto; +} + +#receiptTransactionDetails table td { + text-align: right; +} + +#receiptTransactionDetails table td.top { + font-weight: bold; +} + +#receiptTransactionDetails table td.label { + padding-right: 20px; + text-align: left; +} + {% if print_layout %} /* Receipts only */ @@ -575,19 +653,35 @@ table.payments td.label { {{ _self.client_workorder_agreement(Sale,_context) }} + {% if parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} + {% endif %} + {% if not parameters.gift_receipt %} {{ _self.no_tax_applied_text(Sale) }}

{% if show_thank_you %} - Vielen Dank {% if Sale.Customer %}{{Sale.Customer.firstName}} {{Sale.Customer.lastName}}{% endif %}! + Vielen Dank {% if Sale.Customer %}{{Sale.Customer.firstName}} {{Sale.Customer.lastName}}{% endif %}! {% endif %}

{% endif %} {% if show_barcode %} -

- -

+

+ +

+ {% endif %} + + {% if Sale.completed == 'true' and Sale.SalePayments and not parameters.gift_receipt %} + {# + DO NOT CONSOLIDATE THESE IF STATEMENTS. + Twig doesnt play nice with these functions. + #} + {{ _self.transaction_details(Sale) }} + {% endif %} + + {% if not parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} {% endif %}
@@ -612,7 +706,7 @@ table.payments td.label { {% macro store_receipt(Sale,parameters,options,Payment) %}
- {{ _self.header(Sale,options) }} + {{ _self.header(Sale,options) }} {{ _self.title(Sale,parameters,options) }}

Geschäfts-Kopie

{{ _self.date(Sale) }} @@ -621,10 +715,14 @@ table.payments td.label { {% if options.show_sale_lines_on_store_copy %} {{ _self.receipt(Sale,parameters,true,options) }} {% else %} -

Zahlungen

- - {{ _self.cc_payment_info(Sale,Payment) }} -
+ {% if isUnifiedReceipt(Sale.SalePayments) %} + {{ _self.single_transaction_details(Sale, Payment) }} + {% else %} +

Zahlungen

+ + {{ _self.cc_payment_info(Sale,Payment) }} +
+ {% endif %} {% endif %} {% if Sale.quoteID and Sale.Quote.notes|strlen > 0 %}

{{Sale.Quote.notes|noteformat|raw}}

{% endif %} @@ -645,6 +743,10 @@ table.payments td.label {
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
+ {% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %} +
+ {{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %} +
{% endif %} {% if Line.Note %}
@@ -681,6 +783,8 @@ table.payments td.label { {% endif %} {% if options.workorders_as_title and Sale.SaleLines is empty and Sale.Customer.Workorders is defined %} Arbeitsaufträge + {% elseif Sale.SaleLines is empty and Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + Anfrage zur Ferneinzahlung {% else %} {% if parameters.gift_receipt %}Gutscheinquittung{% else %}Quittung{% endif %} {% endif %} @@ -698,7 +802,7 @@ table.payments td.label { {% if options.invoice_as_title and options.print_layout %} {% endif %} - Stornierte Quittung + Stornierte Quittung {% if options.invoice_as_title and options.print_layout %} Stornierte Rechnung @@ -774,7 +878,7 @@ table.payments td.label { {% if isVATAndRegistrationNumberOnReceipt() %} {% if Sale.Shop.vatNumber|strlen and not options.hide_shop_vat_number %} - MwST: + MwST: {{Sale.Shop.vatNumber}}
@@ -797,7 +901,7 @@ table.payments td.label { {% endif %} {% if Sale.Customer %} - {% if Sale.Customer.company|strlen > 0 %} + {% if Sale.Customer.company|strlen > 0 and not options.show_customer_name_only %} Firma: {{Sale.Customer.company}}
{% endif %} @@ -855,6 +959,12 @@ table.payments td.label { {{ _self.lineDescription(Line,options) }} + {% if options.show_custom_sku and Line.Item.customSku|strlen > 0 %} +
Persönliche SKU: {{ Line.Item.customSku }}
+ {% endif %} + {% if options.show_manufacturer_sku and Line.Item.manufacturerSku|strlen > 0 %} +
Manuelle SKU: {{ Line.Item.manufacturerSku }}
+ {% endif %} {% if options.per_line_discount == true and not parameters.gift_receipt %} {% if Line.calcLineDiscount > 0 %} Rabatt: '{{ Line.Discount.name }}' -{{Line.calcLineDiscount|money}} @@ -864,13 +974,6 @@ table.payments td.label { {% endif %} - {% if options.show_custom_sku and Line.Item.customSku %} - {{ Line.Item.customSku }} - {% endif %} - {% if options.show_manufacturer_sku and Line.Item.manufacturerSku %} - {{ Line.Item.manufacturerSku }} - {% endif %} - {% if options.show_msrp == true and not parameters.gift_receipt %} {% set msrp_printed = false %} {% for price in Line.Item.Prices.ItemPrice if not msrp_printed %} @@ -886,7 +989,7 @@ table.payments td.label { {% if options.per_line_subtotal and options.discounted_line_items and Line.calcLineDiscount != 0 and not parameters.gift_receipt %} - {{Line.unitQuantity}} x {{Line.displayableUnitPrice|money}} + {{Line.unitQuantity}} x {{Line.unitPrice|money}} {% endif %} {{Line.unitQuantity}} {% if options.per_line_subtotal and not parameters.gift_receipt %} x @@ -904,7 +1007,7 @@ table.payments td.label { {% if not isTaxInclusive or isTaxInclusive == 'false' %} {{ Line.calcSubtotal|money }}
{% else %} - {{ multiply(Line.displayableUnitPrice, Line.unitQuantity)|money }}
+ {{ multiply(Line.unitPrice, Line.unitQuantity)|money }}
{% endif %} {% endif %} {{ Line.displayableSubtotal|money }} @@ -919,13 +1022,6 @@ table.payments td.label { Artikel - {% if options.show_custom_sku and options.show_manufacturer_sku %} - Persönliche SKU - Manuelle SKU - {% elseif options.show_custom_sku or options.show_manufacturer_sku %} - SKU - {% endif %} - {% if options.show_msrp and not parameters.gift_receipt %} MSRP {% endif %} @@ -946,6 +1042,9 @@ table.payments td.label { {% if not parameters.gift_receipt %} + {% if Sale.MetaData.itemFeesSubtotal %} + + {% endif %} @@ -977,9 +1084,9 @@ table.payments td.label { {% endfor %} - {% if Sale.tipEnabled == 'true' %} - - {% endif %} + {% if Sale.tipEnabled == 'true' %} + + {% endif %}
Summe Gebührenbetrag{{Sale.MetaData.itemFeesSubtotal|money}}
{% if options.discounted_line_items and Sale.calcDiscount != 0 %} @@ -956,9 +1055,17 @@ table.payments td.label { {% if options.discounted_line_items %} - {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money}} + {% if options.Sale.isTaxInclusive == 'true'%} + {{ subtract(Sale.calcSubtotal, Sale.calcDiscount)|money }} + {% else %} + {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money }} + {% endif %} {% else %} - {{Sale.displayableSubtotal|money}} + {% if options.Sale.isTaxInclusive == 'true'%} + {{ Sale.calcSubtotal|money }} + {% else %} + {{ Sale.displayableSubtotal|money }} + {% endif %} {% endif %}
Total Steuern{{Sale.taxTotal|money}}
Total{{Sale.calcTotal|money}}
Trinkgeld{{Sale.calcTips|money}}
Trinkgeld{{Sale.calcTips|money}}
{% endif %} @@ -994,10 +1101,10 @@ table.payments td.label { {% if Payment.PaymentType.name != 'Cash' %} {% if Payment.CreditAccount.giftCard == 'true' %} - + {% if Payment.amount > 0 %} - Geschenkgutschein-Aufladung + Geschenkgutschein-Aufladung {{Payment.CreditAccount.code}} {{Payment.amount|money}} @@ -1013,7 +1120,7 @@ table.payments td.label { Saldo {{Payment.CreditAccount.balance|getinverse|money}} - {% elseif Payment.amount < 0 and Sale.calcTotal >= 0 %} + {% elseif Payment.amount < 0 and Payment.archived != 'true' and Sale.calcTotal >= 0 %} Geschenkkarten-Kauf {{Payment.amount|getinverse|money}} @@ -1024,9 +1131,9 @@ table.payments td.label { {% endif %} {% elseif Payment.creditAccountID == 0 %} - + {{ _self.cc_payment_info(Sale,Payment) }} - {% elseif Payment.CreditAccount %} + {% elseif Payment.CreditAccount and Payment.archived == 'false' %} {% if Payment.amount < 0 %} @@ -1059,18 +1166,18 @@ table.payments td.label { {% endif %} {% if options.show_customer_credit_account and Sale.Customer and not parameters.gift_receipt and not store_copy %} - {% if Sale.Customer.CreditAccount and Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %}

Kundenkonto

{% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 %} - + {% elseif Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} - + {% endif %}
Geschuldeter Saldo: {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}{{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}
Gegen Einzahlung: {{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}{{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}
@@ -1079,17 +1186,102 @@ table.payments td.label { - +
Verbleibender Saldo: {{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}{{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}
{% endif %} {% endif %} + {% if Sale.Customer.CreditAccount %} + {% for Payment in Sale.SalePayments.SalePayment %} + {% if Payment.PaymentType.name == 'Credit Account' and options.show_credit_account_signature %} +
+
Signature:
+
+ {{Sale.Customer.title}} {{Sale.Customer.firstName}} {{Sale.Customer.lastName}}
+
+
+ {% endif %} + {% endfor %} + {% endif %} + + {{ _self.remoteDepositSummary(Sale,parameters) }} {% endif %} {% if (not parameters.gift_receipt and not options.hide_notes_in_sale_receipt) or (parameters.gift_receipt and not options.hide_notes_in_gift_receipt) %} {{ _self.show_note(Sale.SaleNotes) }} {% endif %} {% endmacro %} +{% macro remoteDepositLink(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remotePaymentLinkUrl %} + {% if parameters.email %} + + {% else %} + + {% endif %} + {% endif %} +{% endmacro %} + +{% macro remoteDepositSummary(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + {% if Sale.SaleLines is not empty %} +

+ Anfrage zur Ferneinzahlung +

+ {{ _self.date(Sale) }} + {% endif %} +

Angeforderte Zahlung

+ + + + + + + +
Kontoeinzahlung: {{ Sale.Customer.CreditAccount.MetaData.remoteDepositAmount|money }}
+ {% endif %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 or Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} +

Shop-Konto (nach Zahlung)

+ + + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 %} + + + + + {% elseif Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} + + + + + {% endif %} + +
Geschuldeter Restbetrag (nach Zahlung): {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment|money }}
Bei Einzahlung (nach Zahlung): {{ Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment|money }}
+ {% endif %} + {% if Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment > 0 %} + + + + + +
Restliches Guthaben (nach Zahlung): {{ Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment|money }}
+ {% endif %} +{% endmacro %} + {% macro cc_payment_info(Sale,Payment) %} {% if Payment.archived == 'false' %} @@ -1127,7 +1319,15 @@ table.payments td.label { {{Payment.amount|money}} {% elseif Payment.ccChargeID == 0 %} - {{ Payment.PaymentType.name }} + {% if Payment.PaymentType.name == 'Credit Card' %} + Kreditkarte + {% elseif Payment.PaymentType.name == 'Debit Card' %} + Debitkarte + {% elseif Payment.PaymentType.name == 'Check' %} + Scheck + {% else %} + {{Payment.PaymentType.name}} + {% endif %} {{Payment.amount|money}} {% endif %} @@ -1135,6 +1335,148 @@ table.payments td.label { {% endmacro %} +{% macro transaction(Payment) %} + {% if Payment.PaymentType.type == 'credit card' and Payment.MetaData.ReceiptData.status != 'error' and Payment.archived == 'false' %} + {% if Payment.MetaData.ReceiptData.type|strlen and Payment.MetaData.ReceiptData.authorized_amount|strlen %} + + {% if Payment.MetaData.ReceiptData.type == 'sale' %} + Verkauf + {% else %} + {{ mostranslate(Payment.MetaData.ReceiptData.type, 'capitalize', true) }} + {%endif%} + {{ Payment.MetaData.ReceiptData.authorized_amount|money }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode|strlen %} + + Status: + + {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Approved' %} + Genehmigt + {% elseif Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Declined' %} + Abgelehnt + {% else %} + {{ Payment.MetaData.ReceiptData.extra_parameters.statusCode }} + {%endif%} + + + {% endif %} + + {% if Payment.MetaData.ReceiptData.card_brand|strlen and Payment.MetaData.ReceiptData.card_number|strlen %} + + {{ Payment.MetaData.ReceiptData.card_brand }} + {{ getDisplayableCardNumber(Payment.MetaData.ReceiptData.card_number) }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.processed_date|strlen %} + + Datum: + {{ Payment.MetaData.ReceiptData.processed_date|correcttimezone|date(getDateTimeFormat()) }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.entry_method|strlen %} + + Methode: + {{ Payment.MetaData.ReceiptData.entry_method }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.acceptorId|strlen %} + + MLC: + {{ Payment.MetaData.ReceiptData.extra_parameters.acceptorId }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.authorization_number|strlen %} + + Auth-Code: + {{ Payment.MetaData.ReceiptData.authorization_number }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode|strlen or Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage|strlen %} + + Antwort: + {{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode }}/{{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_id|strlen %} + + Anwendungs-ID: + {{ Payment.MetaData.ReceiptData.emv_application_id }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_preferred_name|strlen %} + + APN: + {{ Payment.MetaData.ReceiptData.emv_application_preferred_name }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.accountType|strlen %} + + Kontotyp: + {{ Payment.MetaData.ReceiptData.extra_parameters.accountType }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_cryptogram_type|strlen or Payment.MetaData.ReceiptData.emv_cryptogram|strlen %} + + Cryptogram: + {{ Payment.MetaData.ReceiptData.emv_cryptogram_type }} {{ Payment.MetaData.ReceiptData.emv_cryptogram }} + + {% endif %} + + {% for emvTag in Payment.MetaData.ReceiptData.extra_parameters.emv_tags.children() %} + + {{ emvTag.getName() }} + {{ emvTag }} + + {% endfor %} + + {# Creates a Line Break for the next Payment #} +
+ {% endif %} +{% endmacro %} + +{% macro single_transaction_details(Sale, Payment) %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Transaktionsdetails


+
+ + + {{ _self.transaction(Payment) }} + +
+
+ {% endif %} + {% endif %} +{% endmacro %} + +{% macro transaction_details(Sale) %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Transaktionsdetails


+
+ + + {% for Payment in Sale.SalePayments.SalePayment %} + {{ _self.transaction(Payment) }} + {% endfor %} + +
+
+ {% endif %} + {% endif %} +{% endmacro %} + {% macro cc_agreement(Sale,Payment,options) %} {% if Payment.MetaData.ReceiptData.requires_receipt_signature|CompBool == true %} {% if Sale.Shop.ReceiptSetup.creditcardAgree|strlen > 0 %} @@ -1151,10 +1493,6 @@ table.payments td.label { {% macro shop_workorder_agreement(Sale) %} {% if Sale.Shop.ReceiptSetup.workorderAgree|strlen > 0 and Sale.Workorders %} -

{{Sale.Shop.ReceiptSetup.workorderAgree|noteformat|raw}}

@@ -1225,14 +1563,19 @@ table.payments td.label { {% endfor %} {% endif %} - {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 and not logo_printed %} - - {% if show_shop_name_with_logo %} + {% if not logo_printed %} + {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 %} + + {% set logo_printed = true %} + {% endif %} + {% endif %} + + {% if Sale.Shop.name|strlen > 0 %} + {% if not logo_printed or options.show_shop_name_with_logo == true %}

{{ Sale.Shop.name }}

{% endif %} - {% else %} -

{{ Sale.Shop.name }}

{% endif %} +

{% if Sale.Shop.ReceiptSetup.header|strlen > 0 %}

{{Sale.Shop.ReceiptSetup.header|nl2br|raw}}

@@ -1272,7 +1615,7 @@ table.payments td.label { {{Customer.MetaData.layawaysTaxTotal|money}} - Total + Gesamt {{Customer.MetaData.layawaysTotal|money}} @@ -1305,7 +1648,7 @@ table.payments td.label { {{Customer.MetaData.specialOrdersTaxTotal|money}} - Total + Gesamt {{Customer.MetaData.specialOrdersTotal|money}} @@ -1355,7 +1698,7 @@ table.payments td.label { {{Customer.MetaData.workordersTaxTotal|money}} - Total + Gesamt {{Customer.MetaData.workordersTotal|money}} @@ -1385,7 +1728,7 @@ table.payments td.label {
- {{SaleNote.PrintedNote.note}} + {{SaleNote.PrintedNote.note}}
diff --git a/receipt/SaleReceipt_es.tpl b/receipt/SaleReceipt_es.tpl index 52fb5ec..e034853 100644 --- a/receipt/SaleReceipt_es.tpl +++ b/receipt/SaleReceipt_es.tpl @@ -16,7 +16,7 @@ {% set hide_customer_vat_number = false %} {# Hide the Customer VAT Number on Sales #} {% set hide_customer_registration_number = false %} {# Hide the Customer Registration Number on Sales #} {% set sale_id_instead_of_ticket_number = false %} {# Displays the Sale ID instead of the Ticket Number #} -{% set invoice_as_title = false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} +{% set invoice_as_title = parameters.invoice_as_title == "true" ? true : false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} {% set workorders_as_title = false %} {# Changes the receipt title to "Work Orders" if there is no Salesline items and 1 or more workorders #} {% set quote_id_prefix = "" %} {# Adds a string of text as a prefix for the Quote ID. Ex: "Q-". To be used when "sale_id_instead_of_ticket_number" is true #} {% set sale_id_prefix = "" %} {# Adds a string of text as a prefix for the Sales ID. Ex: "S-". To be used when "sale_id_instead_of_ticket_number" is true #} @@ -118,6 +118,10 @@ h1 { text-align: center; } +h1.spacer { + margin-top: 2em; +} + p.date, p.copy { font-size: 9pt; margin: 0; @@ -207,12 +211,26 @@ table div.line_note { padding-left: 10px; } +table div.line_extra { + text-align: left; + padding-left: 10px; + font-size: .8em; +} + table div.line_serial { text-align: left; font-weight: normal; padding-left: 10px; } +table div.line_description_item_fee { + padding-left: 10px; +} + +.footerSectionTitle + table div.line_description_item_fee { + padding-left: 25px; +} + table.workorders div.line_description { font-weight: normal; padding-left: 10px; @@ -240,12 +258,54 @@ p.thankyou { .note { text-align: center; } - .barcodeContainer { margin-top: 15px; text-align: center; } +.remotePaymentLinkContainer { + text-align: center; + margin: 1.5em 0; +} + +span.payOnlineTitle { + display: block; + font-size: 0.8rem; + font-weight: bold; + margin: 2rem 0 0.25rem; + text-transform: uppercase; +} + +svg.payOnlineIcon { + height: 1rem; + margin-right: 0.25rem; + vertical-align: -0.2rem; + width: 1rem; +} + +.payButton { + background-color: #1844cc; + background-image: linear-gradient(#537dec, #2e61de); + border: 1px solid #1844cc; + border-radius: 0.1875rem; + box-shadow: rgba(255, 255, 255, 0.15) 0px 1px 0px 0px inset; + color: #fff; + display: inline-block; + font-size: 1rem; + font-weight: 500; + line-height: 2rem; + margin: 1.5em 0 0; + padding: 0.375rem 1.5rem; + text-align: center; + text-decoration: none; + width: 90%; +} + +.payButton:hover { + background-color: #2e61de; + background-image: linear-gradient(#2e61de, #2e61de); +} + .workorders .barcodeContainer { margin-left: 15px; text-align: left; @@ -289,6 +349,24 @@ table.payments td.label { width: 100%; } +#receiptTransactionDetails table { + max-width: 245px; + margin: 0 auto; +} + +#receiptTransactionDetails table td { + text-align: right; +} + +#receiptTransactionDetails table td.top { + font-weight: bold; +} + +#receiptTransactionDetails table td.label { + padding-right: 20px; + text-align: left; +} + {% if print_layout %} /* Receipts only */ @@ -539,7 +617,7 @@ table.payments td.label { {{ _self.store_receipt(Sale,parameters,_context,SalePayment) }} {% set page_loaded = true %} {% else %} - {% if SalePayment.archived == 'false' and SalePayment.MetaData.ReceiptData.requires_receipt_signature|CompBool == true %} + {% if SalePayment.archived == 'false' and SalePayment.MetaData.ReceiptData.requires_receipt_signature|CompBool == true %} {{ _self.store_receipt(Sale,parameters,_context,SalePayment) }} {% set page_loaded = true %} {% endif %} @@ -575,6 +653,10 @@ table.payments td.label { {{ _self.client_workorder_agreement(Sale,_context) }} + {% if parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} + {% endif %} + {% if not parameters.gift_receipt %} {{ _self.no_tax_applied_text(Sale) }}

@@ -585,9 +667,21 @@ table.payments td.label { {% endif %} {% if show_barcode %} -

- -

+

+ +

+ {% endif %} + + {% if Sale.completed == 'true' and Sale.SalePayments and not parameters.gift_receipt %} + {# + DO NOT CONSOLIDATE THESE IF STATEMENTS. + Twig doesnt play nice with these functions. + #} + {{ _self.transaction_details(Sale) }} + {% endif %} + + {% if not parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} {% endif %}
@@ -612,7 +706,7 @@ table.payments td.label { {% macro store_receipt(Sale,parameters,options,Payment) %}
- {{ _self.header(Sale,options) }} + {{ _self.header(Sale,options) }} {{ _self.title(Sale,parameters,options) }}

Copia para la tienda

{{ _self.date(Sale) }} @@ -621,10 +715,14 @@ table.payments td.label { {% if options.show_sale_lines_on_store_copy %} {{ _self.receipt(Sale,parameters,true,options) }} {% else %} -

Pagos

- - {{ _self.cc_payment_info(Sale,Payment) }} -
+ {% if isUnifiedReceipt(Sale.SalePayments) %} + {{ _self.single_transaction_details(Sale, Payment) }} + {% else %} +

Pagos

+ + {{ _self.cc_payment_info(Sale,Payment) }} +
+ {% endif %} {% endif %} {% if Sale.quoteID and Sale.Quote.notes|strlen > 0 %}

{{Sale.Quote.notes|noteformat|raw}}

{% endif %} @@ -645,6 +743,10 @@ table.payments td.label {
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
+ {% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %} +
+ {{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %} +
{% endif %} {% if Line.Note %}
@@ -665,7 +767,7 @@ table.payments td.label {
{% endfor %} {% endif %} - {% if options.per_line_employee %} + {% if options.per_line_employee and not options.hide_employee_name %}
Empleado: {{ Line.Employee.firstName }}
@@ -681,6 +783,8 @@ table.payments td.label { {% endif %} {% if options.workorders_as_title and Sale.SaleLines is empty and Sale.Customer.Workorders is defined %} Órdenes de trabajo + {% elseif Sale.SaleLines is empty and Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + Solicitud de depósito remoto {% else %} {% if parameters.gift_receipt %}Recibo del regalo{% else %}Recibo de ventas{% endif %} {% endif %} @@ -698,7 +802,7 @@ table.payments td.label { {% if options.invoice_as_title and options.print_layout %} {% endif %} - Recibo ANULADO + Recibo ANULADO {% if options.invoice_as_title and options.print_layout %} Factura ANULADO @@ -744,9 +848,9 @@ table.payments td.label { {% if options.quote_to_invoice %} - Factura n.º: + Factura n.º: {% else %} - N.º cotización: + N.º cotización: {% endif %} {{options.quote_id_prefix}}{{Sale.quoteID}} @@ -797,7 +901,7 @@ table.payments td.label { {% endif %} {% if Sale.Customer %} - {% if Sale.Customer.company|strlen > 0 %} + {% if Sale.Customer.company|strlen > 0 and not options.show_customer_name_only %} Companía: {{Sale.Customer.company}}
{% endif %} @@ -855,6 +959,12 @@ table.payments td.label { {{ _self.lineDescription(Line,options) }} + {% if options.show_custom_sku and Line.Item.customSku|strlen > 0 %} +
SKU perso.: {{ Line.Item.customSku }}
+ {% endif %} + {% if options.show_manufacturer_sku and Line.Item.manufacturerSku|strlen > 0 %} +
SKU ger.: {{ Line.Item.manufacturerSku }}
+ {% endif %} {% if options.per_line_discount == true and not parameters.gift_receipt %} {% if Line.calcLineDiscount > 0 %} Descuento: '{{ Line.Discount.name }}' -{{Line.calcLineDiscount|money}} @@ -864,13 +974,6 @@ table.payments td.label { {% endif %} - {% if options.show_custom_sku and Line.Item.customSku %} - {{ Line.Item.customSku }} - {% endif %} - {% if options.show_manufacturer_sku and Line.Item.manufacturerSku %} - {{ Line.Item.manufacturerSku }} - {% endif %} - {% if options.show_msrp == true and not parameters.gift_receipt %} {% set msrp_printed = false %} {% for price in Line.Item.Prices.ItemPrice if not msrp_printed %} @@ -886,7 +989,7 @@ table.payments td.label { {% if options.per_line_subtotal and options.discounted_line_items and Line.calcLineDiscount != 0 and not parameters.gift_receipt %} - {{Line.unitQuantity}} x {{Line.displayableUnitPrice|money}} + {{Line.unitQuantity}} x {{Line.unitPrice|money}} {% endif %} {{Line.unitQuantity}} {% if options.per_line_subtotal and not parameters.gift_receipt %} x @@ -904,7 +1007,7 @@ table.payments td.label { {% if not isTaxInclusive or isTaxInclusive == 'false' %} {{ Line.calcSubtotal|money }}
{% else %} - {{ multiply(Line.displayableUnitPrice, Line.unitQuantity)|money }}
+ {{ multiply(Line.unitPrice, Line.unitQuantity)|money }}
{% endif %} {% endif %} {{ Line.displayableSubtotal|money }} @@ -919,13 +1022,6 @@ table.payments td.label { Artículo - {% if options.show_custom_sku and options.show_manufacturer_sku %} - SKU perso. - SKU ger. - {% elseif options.show_custom_sku or options.show_manufacturer_sku %} - SKU - {% endif %} - {% if options.show_msrp and not parameters.gift_receipt %} MSRP {% endif %} @@ -946,6 +1042,9 @@ table.payments td.label { {% if not parameters.gift_receipt %} + {% if Sale.MetaData.itemFeesSubtotal %} + + {% endif %} @@ -977,9 +1084,9 @@ table.payments td.label { {% endfor %} - {% if Sale.tipEnabled == 'true' %} - - {% endif %} + {% if Sale.tipEnabled == 'true' %} + + {% endif %}
Total de tarifas{{Sale.MetaData.itemFeesSubtotal|money}}
{% if options.discounted_line_items and Sale.calcDiscount != 0 %} @@ -956,9 +1055,17 @@ table.payments td.label { {% if options.discounted_line_items %} - {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money}} + {% if options.Sale.isTaxInclusive == 'true'%} + {{ subtract(Sale.calcSubtotal, Sale.calcDiscount)|money }} + {% else %} + {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money }} + {% endif %} {% else %} - {{Sale.displayableSubtotal|money}} + {% if options.Sale.isTaxInclusive == 'true'%} + {{ Sale.calcSubtotal|money }} + {% else %} + {{ Sale.displayableSubtotal|money }} + {% endif %} {% endif %}
Total impuestos{{Sale.taxTotal|money}}
Total{{Sale.calcTotal|money}}
Propina{{Sale.calcTips|money}}
Propina{{Sale.calcTips|money}}
{% endif %} @@ -994,10 +1101,10 @@ table.payments td.label { {% if Payment.PaymentType.name != 'Cash' %} {% if Payment.CreditAccount.giftCard == 'true' %} - + {% if Payment.amount > 0 %} - Cargo tarjeta regalo + Cargo tarjeta regalo {{Payment.CreditAccount.code}} {{Payment.amount|money}} @@ -1013,7 +1120,7 @@ table.payments td.label { Saldo {{Payment.CreditAccount.balance|getinverse|money}} - {% elseif Payment.amount < 0 and Sale.calcTotal >= 0 %} + {% elseif Payment.amount < 0 and Payment.archived != 'true' and Sale.calcTotal >= 0 %} Adquisición tarjeta regalo {{Payment.amount|getinverse|money}} @@ -1024,9 +1131,9 @@ table.payments td.label { {% endif %} {% elseif Payment.creditAccountID == 0 %} - + {{ _self.cc_payment_info(Sale,Payment) }} - {% elseif Payment.CreditAccount %} + {% elseif Payment.CreditAccount and Payment.archived == 'false' %} {% if Payment.amount < 0 %} @@ -1059,18 +1166,18 @@ table.payments td.label { {% endif %} {% if options.show_customer_credit_account and Sale.Customer and not parameters.gift_receipt and not store_copy %} - {% if Sale.Customer.CreditAccount and Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %}

Cuenta de tienda

{% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 %} - + {% elseif Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} - + {% endif %}
Saldo adeudado: {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}{{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}
En depósito: {{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}{{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}
@@ -1079,17 +1186,102 @@ table.payments td.label { - +
Saldo restante: {{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}{{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}
{% endif %} {% endif %} + {% if Sale.Customer.CreditAccount %} + {% for Payment in Sale.SalePayments.SalePayment %} + {% if Payment.PaymentType.name == 'Credit Account' and options.show_credit_account_signature %} +
+
Signature:
+
+ {{Sale.Customer.title}} {{Sale.Customer.firstName}} {{Sale.Customer.lastName}}
+
+
+ {% endif %} + {% endfor %} + {% endif %} + + {{ _self.remoteDepositSummary(Sale,parameters) }} {% endif %} -{% if (not parameters.gift_receipt and not options.hide_notes_in_sale_receipt) or (parameters.gift_receipt and not options.hide_notes_in_gift_receipt) %} + {% if (not parameters.gift_receipt and not options.hide_notes_in_sale_receipt) or (parameters.gift_receipt and not options.hide_notes_in_gift_receipt) %} {{ _self.show_note(Sale.SaleNotes) }} {% endif %} {% endmacro %} +{% macro remoteDepositLink(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remotePaymentLinkUrl %} + {% if parameters.email %} + + {% else %} + + {% endif %} + {% endif %} +{% endmacro %} + +{% macro remoteDepositSummary(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + {% if Sale.SaleLines is not empty %} +

+ Solicitud de depósito remoto +

+ {{ _self.date(Sale) }} + {% endif %} +

Pago solicitado

+ + + + + + + +
Depósito en cuenta: {{ Sale.Customer.CreditAccount.MetaData.remoteDepositAmount|money }}
+ {% endif %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 or Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} +

Cuenta de tienda (después del pago)

+ + + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 %} + + + + + {% elseif Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} + + + + + {% endif %} + +
Saldo adeudado (después del pago): {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment|money }}
En depósito (después del pago): {{ Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment|money }}
+ {% endif %} + {% if Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment > 0 %} + + + + + +
Saldo restante (después del pago): {{ Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment|money }}
+ {% endif %} +{% endmacro %} + {% macro cc_payment_info(Sale,Payment) %} {% if Payment.archived == 'false' %} @@ -1127,7 +1319,15 @@ table.payments td.label { {{Payment.amount|money}} {% elseif Payment.ccChargeID == 0 %} - {{ Payment.PaymentType.name }} + {% if Payment.PaymentType.name == 'Credit Card' %} + Tarjeta de crédito + {% elseif Payment.PaymentType.name == 'Debit Card' %} + Tarjeta de débito + {% elseif Payment.PaymentType.name == 'Check' %} + Cheque + {% else %} + {{Payment.PaymentType.name}} + {% endif %} {{Payment.amount|money}} {% endif %} @@ -1135,6 +1335,148 @@ table.payments td.label { {% endmacro %} +{% macro transaction(Payment) %} + {% if Payment.PaymentType.type == 'credit card' and Payment.MetaData.ReceiptData.status != 'error' and Payment.archived == 'false' %} + {% if Payment.MetaData.ReceiptData.type|strlen and Payment.MetaData.ReceiptData.authorized_amount|strlen %} + + {% if Payment.MetaData.ReceiptData.type == 'sale' %} + Venta + {% else %} + {{ mostranslate(Payment.MetaData.ReceiptData.type, 'capitalize', true) }} + {%endif%} + {{ Payment.MetaData.ReceiptData.authorized_amount|money }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode|strlen %} + + Estado: + + {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Approved' %} + Aprobada + {% elseif Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Declined' %} + Rechazada + {% else %} + {{ Payment.MetaData.ReceiptData.extra_parameters.statusCode }} + {%endif%} + + + {% endif %} + + {% if Payment.MetaData.ReceiptData.card_brand|strlen and Payment.MetaData.ReceiptData.card_number|strlen %} + + {{ Payment.MetaData.ReceiptData.card_brand }} + {{ getDisplayableCardNumber(Payment.MetaData.ReceiptData.card_number) }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.processed_date|strlen %} + + Fecha: + {{ Payment.MetaData.ReceiptData.processed_date|correcttimezone|date(getDateTimeFormat()) }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.entry_method|strlen %} + + Forma: + {{ Payment.MetaData.ReceiptData.entry_method }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.acceptorId|strlen %} + + MLC: + {{ Payment.MetaData.ReceiptData.extra_parameters.acceptorId }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.authorization_number|strlen %} + + Código de autorización: + {{ Payment.MetaData.ReceiptData.authorization_number }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode|strlen or Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage|strlen %} + + Respuesta: + {{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode }}/{{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_id|strlen %} + + ID de la aplicación: + {{ Payment.MetaData.ReceiptData.emv_application_id }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_preferred_name|strlen %} + + APN: + {{ Payment.MetaData.ReceiptData.emv_application_preferred_name }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.accountType|strlen %} + + Tipo de cuenta: + {{ Payment.MetaData.ReceiptData.extra_parameters.accountType }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_cryptogram_type|strlen or Payment.MetaData.ReceiptData.emv_cryptogram|strlen %} + + Criptograma: + {{ Payment.MetaData.ReceiptData.emv_cryptogram_type }} {{ Payment.MetaData.ReceiptData.emv_cryptogram }} + + {% endif %} + + {% for emvTag in Payment.MetaData.ReceiptData.extra_parameters.emv_tags.children() %} + + {{ emvTag.getName() }} + {{ emvTag }} + + {% endfor %} + + {# Creates a Line Break for the next Payment #} +
+ {% endif %} +{% endmacro %} + +{% macro single_transaction_details(Sale, Payment) %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Detalles de la transacción


+
+ + + {{ _self.transaction(Payment) }} + +
+
+ {% endif %} + {% endif %} +{% endmacro %} + +{% macro transaction_details(Sale) %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Detalles de la transacción


+
+ + + {% for Payment in Sale.SalePayments.SalePayment %} + {{ _self.transaction(Payment) }} + {% endfor %} + +
+
+ {% endif %} + {% endif %} +{% endmacro %} + {% macro cc_agreement(Sale,Payment,options) %} {% if Payment.MetaData.ReceiptData.requires_receipt_signature|CompBool == true %} {% if Sale.Shop.ReceiptSetup.creditcardAgree|strlen > 0 %} @@ -1151,10 +1493,6 @@ table.payments td.label { {% macro shop_workorder_agreement(Sale) %} {% if Sale.Shop.ReceiptSetup.workorderAgree|strlen > 0 and Sale.Workorders %} -

{{Sale.Shop.ReceiptSetup.workorderAgree|noteformat|raw}}

@@ -1225,14 +1563,19 @@ table.payments td.label { {% endfor %} {% endif %} - {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 and not logo_printed %} - - {% if show_shop_name_with_logo %} + {% if not logo_printed %} + {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 %} + + {% set logo_printed = true %} + {% endif %} + {% endif %} + + {% if Sale.Shop.name|strlen > 0 %} + {% if not logo_printed or options.show_shop_name_with_logo == true %}

{{ Sale.Shop.name }}

{% endif %} - {% else %} -

{{ Sale.Shop.name }}

{% endif %} +

{% if Sale.Shop.ReceiptSetup.header|strlen > 0 %}

{{Sale.Shop.ReceiptSetup.header|nl2br|raw}}

@@ -1258,7 +1601,7 @@ table.payments td.label { - + {% if Customer.MetaData.layawaysAllDiscounts > 0 %} @@ -1291,7 +1634,7 @@ table.payments td.label {
SubtotalTotal parcial {{Customer.MetaData.layawaysSubtotalNoDiscount|money}}
- + {% if Customer.MetaData.specialOrdersAllDiscounts > 0 %} @@ -1341,7 +1684,7 @@ table.payments td.label { {% if Customer.MetaData.workordersTotal > 0 %}
SubtotalTotal parcial {{Customer.MetaData.specialOrdersSubtotalNoDiscount|money}}
- + {% if Customer.MetaData.specialOrdersAllDiscounts > 0 %} @@ -1385,7 +1728,7 @@ table.payments td.label {
SubtotalTotal parcial {{Customer.MetaData.workordersSubtotalNoDiscount|money}}
- {{SaleNote.PrintedNote.note}} + {{SaleNote.PrintedNote.note}}
diff --git a/receipt/SaleReceipt_fr_BE.tpl b/receipt/SaleReceipt_fr_BE.tpl index 6fab27e..80731c8 100644 --- a/receipt/SaleReceipt_fr_BE.tpl +++ b/receipt/SaleReceipt_fr_BE.tpl @@ -16,7 +16,7 @@ {% set hide_customer_vat_number = false %} {# Hide the Customer VAT Number on Sales #} {% set hide_customer_registration_number = false %} {# Hide the Customer Registration Number on Sales #} {% set sale_id_instead_of_ticket_number = true %} {# Displays the Sale ID instead of the Ticket Number #} -{% set invoice_as_title = false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} +{% set invoice_as_title = parameters.invoice_as_title == "true" ? true : false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} {% set workorders_as_title = false %} {# Changes the receipt title to "Work Orders" if there is no Salesline items and 1 or more workorders #} {% set quote_id_prefix = "" %} {# Adds a string of text as a prefix for the Quote ID. Ex: "Q-". To be used when "sale_id_instead_of_ticket_number" is true #} {% set sale_id_prefix = "" %} {# Adds a string of text as a prefix for the Sales ID. Ex: "S-". To be used when "sale_id_instead_of_ticket_number" is true #} @@ -118,6 +118,10 @@ h1 { text-align: center; } +h1.spacer { + margin-top: 2em; +} + p.date, p.copy { font-size: 9pt; margin: 0; @@ -207,12 +211,26 @@ table div.line_note { padding-left: 10px; } +table div.line_extra { + text-align: left; + padding-left: 10px; + font-size: .8em; +} + table div.line_serial { text-align: left; font-weight: normal; padding-left: 10px; } +table div.line_description_item_fee { + padding-left: 10px; +} + +.footerSectionTitle + table div.line_description_item_fee { + padding-left: 25px; +} + table.workorders div.line_description { font-weight: normal; padding-left: 10px; @@ -240,12 +258,54 @@ p.thankyou { .note { text-align: center; } - .barcodeContainer { margin-top: 15px; text-align: center; } +.remotePaymentLinkContainer { + text-align: center; + margin: 1.5em 0; +} + +span.payOnlineTitle { + display: block; + font-size: 0.8rem; + font-weight: bold; + margin: 2rem 0 0.25rem; + text-transform: uppercase; +} + +svg.payOnlineIcon { + height: 1rem; + margin-right: 0.25rem; + vertical-align: -0.2rem; + width: 1rem; +} + +.payButton { + background-color: #1844cc; + background-image: linear-gradient(#537dec, #2e61de); + border: 1px solid #1844cc; + border-radius: 0.1875rem; + box-shadow: rgba(255, 255, 255, 0.15) 0px 1px 0px 0px inset; + color: #fff; + display: inline-block; + font-size: 1rem; + font-weight: 500; + line-height: 2rem; + margin: 1.5em 0 0; + padding: 0.375rem 1.5rem; + text-align: center; + text-decoration: none; + width: 90%; +} + +.payButton:hover { + background-color: #2e61de; + background-image: linear-gradient(#2e61de, #2e61de); +} + .workorders .barcodeContainer { margin-left: 15px; text-align: left; @@ -289,6 +349,24 @@ table.payments td.label { width: 100%; } +#receiptTransactionDetails table { + max-width: 245px; + margin: 0 auto; +} + +#receiptTransactionDetails table td { + text-align: right; +} + +#receiptTransactionDetails table td.top { + font-weight: bold; +} + +#receiptTransactionDetails table td.label { + padding-right: 20px; + text-align: left; +} + {% if print_layout %} /* Receipts only */ @@ -539,7 +617,7 @@ table.payments td.label { {{ _self.store_receipt(Sale,parameters,_context,SalePayment) }} {% set page_loaded = true %} {% else %} - {% if SalePayment.archived == 'false' and SalePayment.MetaData.ReceiptData.requires_receipt_signature|CompBool == true %} + {% if SalePayment.archived == 'false' and SalePayment.MetaData.ReceiptData.requires_receipt_signature|CompBool == true %} {{ _self.store_receipt(Sale,parameters,_context,SalePayment) }} {% set page_loaded = true %} {% endif %} @@ -575,6 +653,10 @@ table.payments td.label { {{ _self.client_workorder_agreement(Sale,_context) }} + {% if parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} + {% endif %} + {% if not parameters.gift_receipt %} {{ _self.no_tax_applied_text(Sale) }}

@@ -585,9 +667,21 @@ table.payments td.label { {% endif %} {% if show_barcode %} -

- -

+

+ +

+ {% endif %} + + {% if Sale.completed == 'true' and Sale.SalePayments and not parameters.gift_receipt %} + {# + DO NOT CONSOLIDATE THESE IF STATEMENTS. + Twig doesnt play nice with these functions. + #} + {{ _self.transaction_details(Sale) }} + {% endif %} + + {% if not parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} {% endif %}
@@ -612,7 +706,7 @@ table.payments td.label { {% macro store_receipt(Sale,parameters,options,Payment) %}
- {{ _self.header(Sale,options) }} + {{ _self.header(Sale,options) }} {{ _self.title(Sale,parameters,options) }}

Copie du magasin

{{ _self.date(Sale) }} @@ -621,10 +715,14 @@ table.payments td.label { {% if options.show_sale_lines_on_store_copy %} {{ _self.receipt(Sale,parameters,true,options) }} {% else %} -

Paiements

- - {{ _self.cc_payment_info(Sale,Payment) }} -
+ {% if isUnifiedReceipt(Sale.SalePayments) %} + {{ _self.single_transaction_details(Sale, Payment) }} + {% else %} +

Paiements

+ + {{ _self.cc_payment_info(Sale,Payment) }} +
+ {% endif %} {% endif %} {% if Sale.quoteID and Sale.Quote.notes|strlen > 0 %}

{{Sale.Quote.notes|noteformat|raw}}

{% endif %} @@ -645,6 +743,10 @@ table.payments td.label {
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
+ {% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %} +
+ {{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %} +
{% endif %} {% if Line.Note %}
@@ -665,7 +767,7 @@ table.payments td.label {
{% endfor %} {% endif %} - {% if options.per_line_employee %} + {% if options.per_line_employee and not options.hide_employee_name %}
Employé(e): {{ Line.Employee.firstName }}
@@ -681,6 +783,8 @@ table.payments td.label { {% endif %} {% if options.workorders_as_title and Sale.SaleLines is empty and Sale.Customer.Workorders is defined %} Demandes de service + {% elseif Sale.SaleLines is empty and Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + Demande de dépôt à distance {% else %} {% if parameters.gift_receipt %}Reçu cadeau{% else %}Reçu de vente{% endif %} {% endif %} @@ -698,7 +802,7 @@ table.payments td.label { {% if options.invoice_as_title and options.print_layout %} {% endif %} - Reçu ANNULÉ + Reçu ANNULÉ {% if options.invoice_as_title and options.print_layout %} Facture ANNULÉ @@ -774,7 +878,7 @@ table.payments td.label { {% if isVATAndRegistrationNumberOnReceipt() %} {% if Sale.Shop.vatNumber|strlen and not options.hide_shop_vat_number %} - TVA: + TVA: {{Sale.Shop.vatNumber}}
@@ -797,7 +901,7 @@ table.payments td.label { {% endif %} {% if Sale.Customer %} - {% if Sale.Customer.company|strlen > 0 %} + {% if Sale.Customer.company|strlen > 0 and not options.show_customer_name_only %} Entreprise: {{Sale.Customer.company}}
{% endif %} @@ -855,6 +959,12 @@ table.payments td.label { {{ _self.lineDescription(Line,options) }} + {% if options.show_custom_sku and Line.Item.customSku|strlen > 0 %} +
SKU pers.: {{ Line.Item.customSku }}
+ {% endif %} + {% if options.show_manufacturer_sku and Line.Item.manufacturerSku|strlen > 0 %} +
SKU man.: {{ Line.Item.manufacturerSku }}
+ {% endif %} {% if options.per_line_discount == true and not parameters.gift_receipt %} {% if Line.calcLineDiscount > 0 %} Réduction: '{{ Line.Discount.name }}' -{{Line.calcLineDiscount|money}} @@ -864,13 +974,6 @@ table.payments td.label { {% endif %} - {% if options.show_custom_sku and Line.Item.customSku %} - {{ Line.Item.customSku }} - {% endif %} - {% if options.show_manufacturer_sku and Line.Item.manufacturerSku %} - {{ Line.Item.manufacturerSku }} - {% endif %} - {% if options.show_msrp == true and not parameters.gift_receipt %} {% set msrp_printed = false %} {% for price in Line.Item.Prices.ItemPrice if not msrp_printed %} @@ -886,7 +989,7 @@ table.payments td.label { {% if options.per_line_subtotal and options.discounted_line_items and Line.calcLineDiscount != 0 and not parameters.gift_receipt %} - {{Line.unitQuantity}} x {{Line.displayableUnitPrice|money}} + {{Line.unitQuantity}} x {{Line.unitPrice|money}} {% endif %} {{Line.unitQuantity}} {% if options.per_line_subtotal and not parameters.gift_receipt %} x @@ -904,7 +1007,7 @@ table.payments td.label { {% if not isTaxInclusive or isTaxInclusive == 'false' %} {{ Line.calcSubtotal|money }}
{% else %} - {{ multiply(Line.displayableUnitPrice, Line.unitQuantity)|money }}
+ {{ multiply(Line.unitPrice, Line.unitQuantity)|money }}
{% endif %} {% endif %} {{ Line.displayableSubtotal|money }} @@ -917,14 +1020,7 @@ table.payments td.label { {% if Sale.SaleLines %} - - - {% if options.show_custom_sku and options.show_manufacturer_sku %} - - - {% elseif options.show_custom_sku or options.show_manufacturer_sku %} - - {% endif %} + {% if options.show_msrp and not parameters.gift_receipt %} @@ -946,6 +1042,9 @@ table.payments td.label { {% if not parameters.gift_receipt %}
ItemSKU pers.SKU man.SKUArticlePDSF
+ {% if Sale.MetaData.itemFeesSubtotal %} + + {% endif %} @@ -976,30 +1083,30 @@ table.payments td.label { {% endif %} {% endfor %} - {% set cash_total = 0 %} - {% set non_cash_total = 0 %} - {% for Payment in Sale.SalePayments.SalePayment %} - {% if Payment.PaymentType.code == "Cash" %} - {% set cash_total = cash_total + Payment.amount|floatval %} - {% else %} - {% set non_cash_total = non_cash_total + Payment.amount|floatval %} - {% endif %} - {% endfor %} - {% set roundedCashTotal = ((cash_total * 20) | round) / 20 %} - {% set roundedTotal = roundedCashTotal + non_cash_total %} - {% if roundedTotal != Sale.calcTotal %} - {% if Sale.completed == "false" and Sale.quoteID > 0 %} - - {% else %} - - - {% endif %} - {% else %} - - {% endif %} - {% if Sale.tipEnabled == 'true' %} - - {% endif %} + {% set cash_total = 0 %} + {% set non_cash_total = 0 %} + {% for Payment in Sale.SalePayments.SalePayment %} + {% if Payment.PaymentType.code == "Cash" %} + {% set cash_total = cash_total + Payment.amount|floatval %} + {% else %} + {% set non_cash_total = non_cash_total + Payment.amount|floatval %} + {% endif %} + {% endfor %} + {% set roundedCashTotal = ((cash_total * 20) | round) / 20 %} + {% set roundedTotal = roundedCashTotal + non_cash_total %} + {% if roundedTotal != Sale.calcTotal %} + {% if Sale.completed == "false" and Sale.quoteID > 0 %} + + {% else %} + + + {% endif %} + {% else %} + + {% endif %} + {% if Sale.tipEnabled == 'true' %} + + {% endif %}
Total des frais{{Sale.MetaData.itemFeesSubtotal|money}}
{% if options.discounted_line_items and Sale.calcDiscount != 0 %} @@ -956,9 +1055,17 @@ table.payments td.label { {% if options.discounted_line_items %} - {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money}} + {% if options.Sale.isTaxInclusive == 'true'%} + {{ subtract(Sale.calcSubtotal, Sale.calcDiscount)|money }} + {% else %} + {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money }} + {% endif %} {% else %} - {{Sale.displayableSubtotal|money}} + {% if options.Sale.isTaxInclusive == 'true'%} + {{ Sale.calcSubtotal|money }} + {% else %} + {{ Sale.displayableSubtotal|money }} + {% endif %} {% endif %}
Total des taxes{{Sale.taxTotal|money}}
Total{{Sale.calcTotal|money}}
Total{{Sale.calcTotal|money}}
Total arrondi{{roundedTotal|money}}
Total{{Sale.calcTotal|money}}
Pourboire{{Sale.calcTips|money}}
Total{{Sale.calcTotal|money}}
Total{{Sale.calcTotal|money}}
Total arrondi{{roundedTotal|money}}
Total{{Sale.calcTotal|money}}
Pourboire{{Sale.calcTips|money}}
{% endif %} @@ -1014,10 +1121,10 @@ table.payments td.label { {% if Payment.PaymentType.name != 'Cash' %} {% if Payment.CreditAccount.giftCard == 'true' %} - + {% if Payment.amount > 0 %} - Prélèvement sur carte cadeau + Prélèvement sur carte cadeau {{Payment.CreditAccount.code}} {{Payment.amount|money}} @@ -1033,7 +1140,7 @@ table.payments td.label { Solde {{Payment.CreditAccount.balance|getinverse|money}} - {% elseif Payment.amount < 0 and Sale.calcTotal >= 0 %} + {% elseif Payment.amount < 0 and Payment.archived != 'true' and Sale.calcTotal >= 0 %} Achat carte cadeau {{Payment.amount|getinverse|money}} @@ -1044,9 +1151,9 @@ table.payments td.label { {% endif %} {% elseif Payment.creditAccountID == 0 %} - + {{ _self.cc_payment_info(Sale,Payment) }} - {% elseif Payment.CreditAccount %} + {% elseif Payment.CreditAccount and Payment.archived == 'false' %} {% if Payment.amount < 0 %} @@ -1079,18 +1186,18 @@ table.payments td.label { {% endif %} {% if options.show_customer_credit_account and Sale.Customer and not parameters.gift_receipt and not store_copy %} - {% if Sale.Customer.CreditAccount and Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %}

Dossier

{% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 %} - + {% elseif Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} - + {% endif %}
Solde dû: {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}{{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}
En dépôt: {{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}{{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}
@@ -1099,17 +1206,102 @@ table.payments td.label { - +
Solde restant: {{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}{{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}
{% endif %} {% endif %} + {% if Sale.Customer.CreditAccount %} + {% for Payment in Sale.SalePayments.SalePayment %} + {% if Payment.PaymentType.name == 'Credit Account' and options.show_credit_account_signature %} +
+
Signature:
+
+ {{Sale.Customer.title}} {{Sale.Customer.firstName}} {{Sale.Customer.lastName}}
+
+
+ {% endif %} + {% endfor %} + {% endif %} + + {{ _self.remoteDepositSummary(Sale,parameters) }} {% endif %} {% if (not parameters.gift_receipt and not options.hide_notes_in_sale_receipt) or (parameters.gift_receipt and not options.hide_notes_in_gift_receipt) %} {{ _self.show_note(Sale.SaleNotes) }} {% endif %} {% endmacro %} +{% macro remoteDepositLink(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remotePaymentLinkUrl %} + {% if parameters.email %} + + {% else %} + + {% endif %} + {% endif %} +{% endmacro %} + +{% macro remoteDepositSummary(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + {% if Sale.SaleLines is not empty %} +

+ Demande de dépôt à distance +

+ {{ _self.date(Sale) }} + {% endif %} +

Paiement demandé

+ + + + + + + +
Dépôt au compte :{{ Sale.Customer.CreditAccount.MetaData.remoteDepositAmount|money }}
+ {% endif %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 or Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} +

Compte boutique (après versement)

+ + + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 %} + + + + + {% elseif Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} + + + + + {% endif %} + +
Solde dû (après versement) : {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment|money }}
En dépôt (après versement) : {{ Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment|money }}
+ {% endif %} + {% if Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment > 0 %} + + + + + +
Solde restant (après versement) : {{ Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment|money }}
+ {% endif %} +{% endmacro %} + {% macro cc_payment_info(Sale,Payment) %} {% if Payment.archived == 'false' %} @@ -1134,7 +1326,7 @@ table.payments td.label { {% endif %} {% if Payment.CCCharge.MetaData.isEMV %} {% if Payment.CCCharge.MetaData.AID|strlen > 0 %} -
ID de l'appli: {{Payment.CCCharge.MetaData.AID}} +
ID de demande: {{Payment.CCCharge.MetaData.AID}} {% endif %} {% if Payment.CCCharge.MetaData.ApplicationLabel|strlen > 0 %}
Étiquette de l'application: {{Payment.CCCharge.MetaData.ApplicationLabel}} @@ -1145,16 +1337,166 @@ table.payments td.label { {% endif %} {{Payment.amount|money}} - {% elseif Payment.ccChargeID == 0 %} - - {{ Payment.PaymentType.name }} - + {% elseif Payment.ccChargeID == 0 %} + + {% if Payment.PaymentType.name == 'Credit Card' %} + Carte de crédit + {% elseif Payment.PaymentType.name == 'Debit Card' %} + Carte de débit + {% elseif Payment.PaymentType.name == 'Check' %} + Chèque + {% else %} + {{Payment.PaymentType.name}} + {% endif %} + {{Payment.amount|money}} {% endif %} {% endif %} {% endmacro %} +{% macro transaction(Payment) %} + {% if Payment.PaymentType.type == 'credit card' and Payment.MetaData.ReceiptData.status != 'error' and Payment.archived == 'false' %} + {% if Payment.MetaData.ReceiptData.type|strlen and Payment.MetaData.ReceiptData.authorized_amount|strlen %} + + {% if Payment.MetaData.ReceiptData.type == 'sale' %} + Vente + {% else %} + {{ mostranslate(Payment.MetaData.ReceiptData.type, 'capitalize', true) }} + {% endif %} + {{ Payment.MetaData.ReceiptData.authorized_amount|money }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode|strlen %} + + Statut : + + {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Approved' %} + Approuvé + {% elseif Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Declined' %} + Refusé + {% else %} + {{ Payment.MetaData.ReceiptData.extra_parameters.statusCode }} + {%endif%} + + + {% endif %} + + {% if Payment.MetaData.ReceiptData.card_brand|strlen and Payment.MetaData.ReceiptData.card_number|strlen %} + + {{ Payment.MetaData.ReceiptData.card_brand }} + {{ getDisplayableCardNumber(Payment.MetaData.ReceiptData.card_number) }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.processed_date|strlen %} + + Date : + {{ Payment.MetaData.ReceiptData.processed_date|correcttimezone|date(getDateTimeFormat()) }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.entry_method|strlen %} + + Méthode : + {{ Payment.MetaData.ReceiptData.entry_method }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.acceptorId|strlen %} + + MLC : + {{ Payment.MetaData.ReceiptData.extra_parameters.acceptorId }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.authorization_number|strlen %} + + Code d'autorisation : + {{ Payment.MetaData.ReceiptData.authorization_number }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode|strlen or Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage|strlen %} + + Réponse : + {{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode }}/{{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_id|strlen %} + + ID de demande : + {{ Payment.MetaData.ReceiptData.emv_application_id }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_preferred_name|strlen %} + + APN : + {{ Payment.MetaData.ReceiptData.emv_application_preferred_name }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.accountType|strlen %} + + Type de compte : + {{ Payment.MetaData.ReceiptData.extra_parameters.accountType }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_cryptogram_type|strlen or Payment.MetaData.ReceiptData.emv_cryptogram|strlen %} + + Cryptogramme : + {{ Payment.MetaData.ReceiptData.emv_cryptogram_type }} {{ Payment.MetaData.ReceiptData.emv_cryptogram }} + + {% endif %} + + {% for emvTag in Payment.MetaData.ReceiptData.extra_parameters.emv_tags.children() %} + + {{ emvTag.getName() }} + {{ emvTag }} + + {% endfor %} + + {# Creates a Line Break for the next Payment #} +
+ {% endif %} +{% endmacro %} + +{% macro single_transaction_details(Sale, Payment) %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Détails de la transaction


+
+ + + {{ _self.transaction(Payment) }} + +
+
+ {% endif %} + {% endif %} +{% endmacro %} + +{% macro transaction_details(Sale) %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Détails de la transaction


+
+ + + {% for Payment in Sale.SalePayments.SalePayment %} + {{ _self.transaction(Payment) }} + {% endfor %} + +
+
+ {% endif %} + {% endif %} +{% endmacro %} + {% macro cc_agreement(Sale,Payment,options) %} {% if Payment.MetaData.ReceiptData.requires_receipt_signature|CompBool == true %} {% if Sale.Shop.ReceiptSetup.creditcardAgree|strlen > 0 %} @@ -1171,10 +1513,6 @@ table.payments td.label { {% macro shop_workorder_agreement(Sale) %} {% if Sale.Shop.ReceiptSetup.workorderAgree|strlen > 0 and Sale.Workorders %} -

{{Sale.Shop.ReceiptSetup.workorderAgree|noteformat|raw}}

@@ -1245,14 +1583,19 @@ table.payments td.label { {% endfor %} {% endif %} - {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 and not logo_printed %} - - {% if show_shop_name_with_logo %} + {% if not logo_printed %} + {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 %} + + {% set logo_printed = true %} + {% endif %} + {% endif %} + + {% if Sale.Shop.name|strlen > 0 %} + {% if not logo_printed or options.show_shop_name_with_logo == true %}

{{ Sale.Shop.name }}

{% endif %} - {% else %} -

{{ Sale.Shop.name }}

{% endif %} +

{% if Sale.Shop.ReceiptSetup.header|strlen > 0 %}

{{Sale.Shop.ReceiptSetup.header|nl2br|raw}}

@@ -1388,35 +1731,35 @@ table.payments td.label { {% set payCash = 'false' %} {% for Payment in Sale.SalePayments.SalePayment %} {% if Payment.PaymentType.code == 'Cash' %} - {% set cashTotal = cashTotal + Payment.amount|floatval %} - {% set payCash = 'true' %} - {% endif %} - {% endfor %} + {% set cashTotal = cashTotal + Payment.amount|floatval %} + {% set payCash = 'true' %} + {% endif %} + {% endfor %} {% if payCash == 'true' %} {% set roundedCashChange = (((Sale.change|floatval) * 20) | round) / 20 %} {% set roundedCashAmount = (((cashTotal * 20)|round) / 20) %} {% set originalCashPayedTotalValue = Sale.change|floatval + cashTotal %} {% set roundedCashPayedTotalValue = roundedCashAmount + Sale.change|floatval %} - Montant payé en espèces{{originalCashPayedTotalValue|money}} + Montant payé en espèces{{originalCashPayedTotalValue|money}} {% if originalCashPayedTotalValue == roundedCashPayedTotalValue %} - Espèces{{cashTotal|money}} - {% if (Sale.change|floatval) != roundedCashChange %} - Monnaie{{Sale.change|money}} - Arrondi de la monnaie rendue{{roundedCashChange|money}} - {% else %} - Monnaie{{Sale.change|money}} - {% endif %} - {% else %} - Espèces{{cashTotal|money}} - Total arrondi en espèces {{roundedCashAmount|money}} - {% if (Sale.change|floatval) != roundedCashChange %} - Monnaie {{Sale.change|money}} - Arrondi de la monnaie rendue {{roundedCashChange|money}} - {% else %} - Monnaie {{Sale.change|money}} - {% endif %} - {% endif %} - {% endif %} + Espèces{{cashTotal|money}} + {% if (Sale.change|floatval) != roundedCashChange %} + Monnaie{{Sale.change|money}} + Arrondi de la monnaie rendue{{roundedCashChange|money}} + {% else %} + Monnaie{{Sale.change|money}} + {% endif %} + {% else %} + Espèces{{cashTotal|money}} + Total arrondi en espèces {{roundedCashAmount|money}} + {% if (Sale.change|floatval) != roundedCashChange %} + Monnaie {{Sale.change|money}} + Arrondi de la monnaie rendue {{roundedCashChange|money}} + {% else %} + Monnaie {{Sale.change|money}} + {% endif %} + {% endif %} + {% endif %} {% endmacro %} {% macro show_note(SaleNotes) %} @@ -1426,7 +1769,7 @@ table.payments td.label {
- {{SaleNote.PrintedNote.note}} + {{SaleNote.PrintedNote.note}}
diff --git a/receipt/SaleReceipt_fr_CA-QC.tpl b/receipt/SaleReceipt_fr_CA-QC.tpl index 20025d7..d5eccb4 100644 --- a/receipt/SaleReceipt_fr_CA-QC.tpl +++ b/receipt/SaleReceipt_fr_CA-QC.tpl @@ -20,7 +20,7 @@ {% set hide_customer_vat_number = false %} {# Hide the Customer VAT Number on Sales #} {% set hide_customer_registration_number = false %} {# Hide the Customer Registration Number on Sales #} {% set sale_id_instead_of_ticket_number = false %} {# Displays the Sale ID instead of the Ticket Number #} -{% set invoice_as_title = false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} +{% set invoice_as_title = parameters.invoice_as_title == "true" ? true : false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} {% set workorders_as_title = false %} {# Changes the receipt title to "Work Orders" if there is no Salesline items and 1 or more workorders #} {% set quote_id_prefix = "" %} {# Adds a string of text as a prefix for the Quote ID. Ex: "Q-". To be used when "sale_id_instead_of_ticket_number" is true #} {% set sale_id_prefix = "" %} {# Adds a string of text as a prefix for the Sales ID. Ex: "S-". To be used when "sale_id_instead_of_ticket_number" is true #} @@ -122,6 +122,10 @@ h1 { text-align: center; } +h1.spacer { + margin-top: 2em; +} + p.date, p.copy { font-size: 9pt; margin: 0; @@ -211,12 +215,26 @@ table div.line_note { padding-left: 10px; } +table div.line_extra { + text-align: left; + padding-left: 10px; + font-size: .8em; +} + table div.line_serial { text-align: left; font-weight: normal; padding-left: 10px; } +table div.line_description_item_fee { + padding-left: 10px; +} + +.footerSectionTitle + table div.line_description_item_fee { + padding-left: 25px; +} + table.workorders div.line_description { font-weight: normal; padding-left: 10px; @@ -244,12 +262,54 @@ p.thankyou { .note { text-align: center; } - .barcodeContainer { margin-top: 15px; text-align: center; } +.remotePaymentLinkContainer { + text-align: center; + margin: 1.5em 0; +} + +span.payOnlineTitle { + display: block; + font-size: 0.8rem; + font-weight: bold; + margin: 2rem 0 0.25rem; + text-transform: uppercase; +} + +svg.payOnlineIcon { + height: 1rem; + margin-right: 0.25rem; + vertical-align: -0.2rem; + width: 1rem; +} + +.payButton { + background-color: #1844cc; + background-image: linear-gradient(#537dec, #2e61de); + border: 1px solid #1844cc; + border-radius: 0.1875rem; + box-shadow: rgba(255, 255, 255, 0.15) 0px 1px 0px 0px inset; + color: #fff; + display: inline-block; + font-size: 1rem; + font-weight: 500; + line-height: 2rem; + margin: 1.5em 0 0; + padding: 0.375rem 1.5rem; + text-align: center; + text-decoration: none; + width: 90%; +} + +.payButton:hover { + background-color: #2e61de; + background-image: linear-gradient(#2e61de, #2e61de); +} + .workorders .barcodeContainer { margin-left: 15px; text-align: left; @@ -294,21 +354,21 @@ table.payments td.label { } #receiptTransactionDetails table { - max-width: 245px; - margin: 0 auto; + max-width: 245px; + margin: 0 auto; } #receiptTransactionDetails table td { - text-align: right; + text-align: right; } #receiptTransactionDetails table td.top { - font-weight: bold; + font-weight: bold; } #receiptTransactionDetails table td.label { - padding-right: 20px; - text-align: left; + padding-right: 20px; + text-align: left; } {% if print_layout %} @@ -324,7 +384,7 @@ table.payments td.label { } @media (min-width: 480px) { - /* Emails hacks, dont mind the optimisation */ + /* Emails hacks, don't mind the optimisation */ table.saletotals { Float: right; Margin-top: 50px; @@ -597,6 +657,10 @@ table.payments td.label { {{ _self.client_workorder_agreement(Sale,_context) }} + {% if parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} + {% endif %} + {% if not parameters.gift_receipt %} {{ _self.no_tax_applied_text(Sale) }}

@@ -607,9 +671,9 @@ table.payments td.label { {% endif %} {% if show_barcode %} -

- -

+

+ +

{% endif %} {% if Sale.completed == 'true' and Sale.SalePayments and not parameters.gift_receipt %} @@ -617,7 +681,11 @@ table.payments td.label { DO NOT CONSOLIDATE THESE IF STATEMENTS. Twig doesnt play nice with these functions. #} - {{ _self.transaction_details(Sale) }} + {{ _self.transaction_details(Sale) }} + {% endif %} + + {% if not parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} {% endif %}
@@ -642,7 +710,7 @@ table.payments td.label { {% macro store_receipt(Sale,parameters,options,Payment) %}
- {{ _self.header(Sale,options) }} + {{ _self.header(Sale,options) }} {{ _self.title(Sale,parameters,options) }}

Copie du magasin

{{ _self.date(Sale) }} @@ -651,14 +719,14 @@ table.payments td.label { {% if options.show_sale_lines_on_store_copy %} {{ _self.receipt(Sale,parameters,true,options) }} {% else %} - {% if isUnifiedReceipt(Sale.SalePayments) %} - {{ _self.single_transaction_details(Sale, Payment) }} - {% else %} -

Paiements

- - {{ _self.cc_payment_info(Sale,Payment) }} -
- {% endif %} + {% if isUnifiedReceipt(Sale.SalePayments) %} + {{ _self.single_transaction_details(Sale, Payment) }} + {% else %} +

Paiements

+ + {{ _self.cc_payment_info(Sale,Payment) }} +
+ {% endif %} {% endif %} {% if Sale.quoteID and Sale.Quote.notes|strlen > 0 %}

{{Sale.Quote.notes|noteformat|raw}}

{% endif %} @@ -666,7 +734,9 @@ table.payments td.label { {{ _self.cc_agreement(Sale,Payment,options) }} {{ _self.shop_workorder_agreement(Sale) }} - +

+ +

{{ _self.ship_to(Sale,options) }}
@@ -677,6 +747,10 @@ table.payments td.label {
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
+ {% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %} +
+ {{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %} +
{% endif %} {% if Line.Note %}
@@ -697,7 +771,7 @@ table.payments td.label {
{% endfor %} {% endif %} - {% if options.per_line_employee %} + {% if options.per_line_employee and not options.hide_employee_name %}
Employé(e) : {{ Line.Employee.firstName }}
@@ -713,6 +787,8 @@ table.payments td.label { {% endif %} {% if options.workorders_as_title and Sale.SaleLines is empty and Sale.Customer.Workorders is defined %} Demandes de service + {% elseif Sale.SaleLines is empty and Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + Demande de dépôt à distance {% else %} {% if parameters.gift_receipt %}Reçu cadeau{% else %}Reçu de vente{% endif %} {% endif %} @@ -730,7 +806,7 @@ table.payments td.label { {% if options.invoice_as_title and options.print_layout %} {% endif %} - Reçu ANNULÉ + Reçu ANNULÉ {% if options.invoice_as_title and options.print_layout %} Facture ANNULÉ @@ -806,7 +882,7 @@ table.payments td.label { {% if isVATAndRegistrationNumberOnReceipt() %} {% if Sale.Shop.vatNumber|strlen and not options.hide_shop_vat_number %} - TVA : + TVA : {{Sale.Shop.vatNumber}}
@@ -829,7 +905,7 @@ table.payments td.label { {% endif %} {% if Sale.Customer %} - {% if Sale.Customer.company|strlen > 0 %} + {% if Sale.Customer.company|strlen > 0 and not options.show_customer_name_only %} Entreprise : {{Sale.Customer.company}}
{% endif %} @@ -887,6 +963,12 @@ table.payments td.label { {{ _self.lineDescription(Line,options) }} + {% if options.show_custom_sku and Line.Item.customSku|strlen > 0 %} +
SKU pers.: {{ Line.Item.customSku }}
+ {% endif %} + {% if options.show_manufacturer_sku and Line.Item.manufacturerSku|strlen > 0 %} +
SKU man.: {{ Line.Item.manufacturerSku }}
+ {% endif %} {% if options.per_line_discount == true and not parameters.gift_receipt %} {% if Line.calcLineDiscount > 0 %} Réduction : '{{ Line.Discount.name }}' -{{Line.calcLineDiscount|money}} @@ -896,13 +978,6 @@ table.payments td.label { {% endif %} - {% if options.show_custom_sku and Line.Item.customSku %} - {{ Line.Item.customSku }} - {% endif %} - {% if options.show_manufacturer_sku and Line.Item.manufacturerSku %} - {{ Line.Item.manufacturerSku }} - {% endif %} - {% if options.show_msrp == true and not parameters.gift_receipt %} {% set msrp_printed = false %} {% for price in Line.Item.Prices.ItemPrice if not msrp_printed %} @@ -918,7 +993,7 @@ table.payments td.label { {% if options.per_line_subtotal and options.discounted_line_items and Line.calcLineDiscount != 0 and not parameters.gift_receipt %} - {{Line.unitQuantity}} x {{Line.displayableUnitPrice|money}} + {{Line.unitQuantity}} x {{Line.unitPrice|money}} {% endif %} {{Line.unitQuantity}} {% if options.per_line_subtotal and not parameters.gift_receipt %} x @@ -936,7 +1011,7 @@ table.payments td.label { {% if not isTaxInclusive or isTaxInclusive == 'false' %} {{ Line.calcSubtotal|money }}
{% else %} - {{ multiply(Line.displayableUnitPrice, Line.unitQuantity)|money }}
+ {{ multiply(Line.unitPrice, Line.unitQuantity)|money }}
{% endif %} {% endif %} {{ Line.displayableSubtotal|money }} @@ -951,13 +1026,6 @@ table.payments td.label { Article - {% if options.show_custom_sku and options.show_manufacturer_sku %} - SKU pers. - SKU man. - {% elseif options.show_custom_sku or options.show_manufacturer_sku %} - SKU - {% endif %} - {% if options.show_msrp and not parameters.gift_receipt %} PDSF {% endif %} @@ -978,6 +1046,9 @@ table.payments td.label { {% if not parameters.gift_receipt %} + {% if Sale.MetaData.itemFeesSubtotal %} + + {% endif %} @@ -1009,9 +1088,9 @@ table.payments td.label { {% endfor %} - {% if Sale.tipEnabled == 'true' %} - - {% endif %} + {% if Sale.tipEnabled == 'true' %} + + {% endif %}
Total des frais{{Sale.MetaData.itemFeesSubtotal|money}}
{% if options.discounted_line_items and Sale.calcDiscount != 0 %} @@ -988,9 +1059,17 @@ table.payments td.label { {% if options.discounted_line_items %} - {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money}} + {% if options.Sale.isTaxInclusive == 'true'%} + {{ subtract(Sale.calcSubtotal, Sale.calcDiscount)|money }} + {% else %} + {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money }} + {% endif %} {% else %} - {{Sale.displayableSubtotal|money}} + {% if options.Sale.isTaxInclusive == 'true'%} + {{ Sale.calcSubtotal|money }} + {% else %} + {{ Sale.displayableSubtotal|money }} + {% endif %} {% endif %}
Total des taxes{{Sale.taxTotal|money}}
Total{{Sale.calcTotal|money}}
Pourboire{{Sale.calcTips|money}}
Pourboire{{Sale.calcTips|money}}
{% endif %} @@ -1026,10 +1105,10 @@ table.payments td.label { {% if Payment.PaymentType.name != 'Cash' %} {% if Payment.CreditAccount.giftCard == 'true' %} - + {% if Payment.amount > 0 %} - Prélèvement sur carte cadeau + Prélèvement sur carte cadeau {{Payment.CreditAccount.code}} {{Payment.amount|money}} @@ -1045,7 +1124,7 @@ table.payments td.label { Solde {{Payment.CreditAccount.balance|getinverse|money}} - {% elseif Payment.amount < 0 and Sale.calcTotal >= 0 %} + {% elseif Payment.amount < 0 and Payment.archived != 'true' and Sale.calcTotal >= 0 %} Achat carte cadeau {{Payment.amount|getinverse|money}} @@ -1056,17 +1135,17 @@ table.payments td.label { {% endif %} {% elseif Payment.creditAccountID == 0 %} - + {{ _self.cc_payment_info(Sale,Payment) }} - {% elseif Payment.CreditAccount %} + {% elseif Payment.CreditAccount and Payment.archived == 'false' %} {% if Payment.amount < 0 %} - Dépôt au compte - {{Payment.amount|getinverse|money}} + Dépôt au compte + {{Payment.amount|getinverse|money}} {% else %} - Prélèvement au compte - {{Payment.amount|money}} + Prélèvement au compte + {{Payment.amount|money}} {% endif %} {% endif %} @@ -1091,18 +1170,18 @@ table.payments td.label { {% endif %} {% if options.show_customer_credit_account and Sale.Customer and not parameters.gift_receipt and not store_copy %} - {% if Sale.Customer.CreditAccount and Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %}

Dossier

{% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 %} - + {% elseif Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} - + {% endif %}
Solde dû : {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}{{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}
En dépôt : {{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}{{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}
@@ -1111,17 +1190,102 @@ table.payments td.label { - +
Solde restant : {{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}{{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}
{% endif %} {% endif %} + {% if Sale.Customer.CreditAccount %} + {% for Payment in Sale.SalePayments.SalePayment %} + {% if Payment.PaymentType.name == 'Credit Account' and options.show_credit_account_signature %} +
+
Signature:
+
+ {{Sale.Customer.title}} {{Sale.Customer.firstName}} {{Sale.Customer.lastName}}
+
+
+ {% endif %} + {% endfor %} + {% endif %} + + {{ _self.remoteDepositSummary(Sale,parameters) }} {% endif %} {% if (not parameters.gift_receipt and not options.hide_notes_in_sale_receipt) or (parameters.gift_receipt and not options.hide_notes_in_gift_receipt) %} {{ _self.show_note(Sale.SaleNotes) }} {% endif %} {% endmacro %} +{% macro remoteDepositLink(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remotePaymentLinkUrl %} + {% if parameters.email %} + + {% else %} + + {% endif %} + {% endif %} +{% endmacro %} + +{% macro remoteDepositSummary(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + {% if Sale.SaleLines is not empty %} +

+ Demande de dépôt à distance +

+ {{ _self.date(Sale) }} + {% endif %} +

Paiement demandé

+ + + + + + + +
Dépôt au compte : {{ Sale.Customer.CreditAccount.MetaData.remoteDepositAmount|money }}
+ {% endif %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 or Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} +

Compte boutique (après versement)

+ + + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 %} + + + + + {% elseif Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} + + + + + {% endif %} + +
Solde dû (après versement) : {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment|money }}
En dépôt (après versement) : {{ Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment|money }}
+ {% endif %} + {% if Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment > 0 %} + + + + + +
Solde restant (après versement) : {{ Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment|money }}
+ {% endif %} +{% endmacro %} + {% macro cc_payment_info(Sale,Payment) %} {% if Payment.archived == 'false' %} @@ -1159,15 +1323,15 @@ table.payments td.label { {{Payment.amount|money}} {% elseif Payment.ccChargeID == 0 %} - {% if Payment.PaymentType.name == 'Credit Card' %} - Carte de crédit - {% elseif Payment.PaymentType.name == 'Debit Card' %} - Carte de débit - {% elseif Payment.PaymentType.name == 'Check' %} - Chèque - {% else %} - {{Payment.PaymentType.name}} - {% endif %} + {% if Payment.PaymentType.name == 'Credit Card' %} + Carte de crédit + {% elseif Payment.PaymentType.name == 'Debit Card' %} + Carte de débit + {% elseif Payment.PaymentType.name == 'Check' %} + Chèque + {% else %} + {{Payment.PaymentType.name}} + {% endif %} {{Payment.amount|money}} {% endif %} @@ -1175,183 +1339,148 @@ table.payments td.label { {% endmacro %} -{% macro single_transaction_details(Sale, Payment) %} - {% if hasCCPayment(Sale.SalePayments) %} - {% if isUnifiedReceipt(Sale.SalePayments) %} -

Détails de la transaction


-
- - - {{ _self.transaction(Payment) }} - -
-
- {% endif %} - {% endif %} -{% endmacro %} +{% macro transaction(Payment) %} + {% if Payment.PaymentType.type == 'credit card' and Payment.MetaData.ReceiptData.status != 'error' and Payment.archived == 'false' %} + {% if Payment.MetaData.ReceiptData.type|strlen and Payment.MetaData.ReceiptData.authorized_amount|strlen %} + + {% if Payment.MetaData.ReceiptData.type == 'sale' %} + Vente + {% else %} + {{ mostranslate(Payment.MetaData.ReceiptData.type, 'capitalize', true) }} + {%endif%} + {{ Payment.MetaData.ReceiptData.authorized_amount|money }} + + {% endif %} -{% macro transaction_details(Sale) %} - {% if hasCCPayment(Sale.SalePayments) %} - {% if isUnifiedReceipt(Sale.SalePayments) %} -

Détails de la transaction


-
- - - {% for Payment in Sale.SalePayments.SalePayment %} - {{ _self.transaction(Payment) }} - {% endfor %} - -
-
- {% endif %} - {% endif %} -{% endmacro %} + {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode|strlen %} + + Statut : + + {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Approved' %} + Approuvé + {% elseif Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Declined' %} + Refusé + {% else %} + {{ Payment.MetaData.ReceiptData.extra_parameters.statusCode }} + {%endif%} + + + {% endif %} -{% macro transaction(Payment) %} - {% if Payment.PaymentType.type == 'credit card' and Payment.MetaData.ReceiptData.status != 'error' and Payment.archived == 'false' %} - {% if Payment.MetaData.ReceiptData.type|strlen and Payment.MetaData.ReceiptData.authorized_amount|strlen %} - - {% if Payment.MetaData.ReceiptData.type == 'sale' %} - VENTE - {% else %} - {{ mostranslate(Payment.MetaData.ReceiptData.type, 'capitalize', true) }} - {%endif%} - {{ Payment.MetaData.ReceiptData.authorized_amount|money }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode|strlen %} - - Statut : - - {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Approved' %} - Approuvé - {% elseif Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Declined' %} - Refusée - {% else %} - {{ Payment.MetaData.ReceiptData.extra_parameters.statusCode }} - {%endif%} - - - {% endif %} - - {% if Payment.MetaData.ReceiptData.card_brand|strlen and Payment.MetaData.ReceiptData.card_number|strlen %} - - {{ Payment.MetaData.ReceiptData.card_brand }} - {{ getDisplayableCardNumber(Payment.MetaData.ReceiptData.card_number) }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.processed_date|strlen %} - - Date : - - {{ Payment.MetaData.ReceiptData.processed_date|correcttimezone|date(getDateTimeFormat()) }} - - - {% endif %} - - {% if Payment.MetaData.ReceiptData.entry_method|strlen %} - - Méthode : - {{ Payment.MetaData.ReceiptData.entry_method }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.extra_parameters.acceptorId|strlen %} - - MLC : - {{ Payment.MetaData.ReceiptData.extra_parameters.acceptorId }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.authorization_number|strlen %} - - Code d'autorisation : - {{ Payment.MetaData.ReceiptData.authorization_number }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode|strlen or Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage|strlen %} - - Response : - {{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode }}/{{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.emv_application_id|strlen %} - - ID d'application : - {{ Payment.MetaData.ReceiptData.emv_application_id }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.emv_application_preferred_name|strlen %} - - Identifiant du point d'accès : - {{ Payment.MetaData.ReceiptData.emv_application_preferred_name }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.extra_parameters.accountType|strlen %} - - Type de compte : - {{ Payment.MetaData.ReceiptData.extra_parameters.accountType }} - - {% endif %} - - {% if Payment.MetaData.ReceiptData.emv_cryptogram_type|strlen or Payment.MetaData.ReceiptData.emv_cryptogram|strlen %} - - Cryptogramme : - {{ Payment.MetaData.ReceiptData.emv_cryptogram_type }} {{ Payment.MetaData.ReceiptData.emv_cryptogram }} - - {% endif %} - - {% for emvTag in Payment.MetaData.ReceiptData.extra_parameters.emv_tags.children() %} - - {{ emvTag.getName() }} - {{ emvTag }} - - {% endfor %} - - {# Creates a Line Break for the next Payment #} -
- {% endif %} + {% if Payment.MetaData.ReceiptData.card_brand|strlen and Payment.MetaData.ReceiptData.card_number|strlen %} + + {{ Payment.MetaData.ReceiptData.card_brand }} + {{ getDisplayableCardNumber(Payment.MetaData.ReceiptData.card_number) }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.processed_date|strlen %} + + Date : + {{ Payment.MetaData.ReceiptData.processed_date|correcttimezone|date(getDateTimeFormat()) }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.entry_method|strlen %} + + Méthode : + {{ Payment.MetaData.ReceiptData.entry_method }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.acceptorId|strlen %} + + MLC : + {{ Payment.MetaData.ReceiptData.extra_parameters.acceptorId }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.authorization_number|strlen %} + + Code d'autorisation : + {{ Payment.MetaData.ReceiptData.authorization_number }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode|strlen or Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage|strlen %} + + Réponse : + {{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode }}/{{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_id|strlen %} + + ID de demande : + {{ Payment.MetaData.ReceiptData.emv_application_id }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_preferred_name|strlen %} + + APN : + {{ Payment.MetaData.ReceiptData.emv_application_preferred_name }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.accountType|strlen %} + + Type de compte : + {{ Payment.MetaData.ReceiptData.extra_parameters.accountType }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_cryptogram_type|strlen or Payment.MetaData.ReceiptData.emv_cryptogram|strlen %} + + Cryptogramme : + {{ Payment.MetaData.ReceiptData.emv_cryptogram_type }} {{ Payment.MetaData.ReceiptData.emv_cryptogram }} + + {% endif %} + + {% for emvTag in Payment.MetaData.ReceiptData.extra_parameters.emv_tags.children() %} + + {{ emvTag.getName() }} + {{ emvTag }} + + {% endfor %} + + {# Creates a Line Break for the next Payment #} +
+ {% endif %} {% endmacro %} {% macro single_transaction_details(Sale, Payment) %} - {% if hasCCPayment(Sale.SalePayments) %} - {% if isUnifiedReceipt(Sale.SalePayments) %} -

Détails de la transaction


-
- - - {{ _self.transaction(Payment) }} - -
-
- {% endif %} - {% endif %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Détails de la transaction


+
+ + + {{ _self.transaction(Payment) }} + +
+
+ {% endif %} + {% endif %} {% endmacro %} {% macro transaction_details(Sale) %} - {% if hasCCPayment(Sale.SalePayments) %} - {% if isUnifiedReceipt(Sale.SalePayments) %} -

Détails de la transaction


-
- - - {% for Payment in Sale.SalePayments.SalePayment %} - {{ _self.transaction(Payment) }} - {% endfor %} - -
-
- {% endif %} - {% endif %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Détails de la transaction


+
+ + + {% for Payment in Sale.SalePayments.SalePayment %} + {{ _self.transaction(Payment) }} + {% endfor %} + +
+
+ {% endif %} + {% endif %} {% endmacro %} - {% macro cc_agreement(Sale,Payment,options) %} {% if Payment.MetaData.ReceiptData.requires_receipt_signature|CompBool == true %} {% if Sale.Shop.ReceiptSetup.creditcardAgree|strlen > 0 %} @@ -1368,10 +1497,6 @@ table.payments td.label { {% macro shop_workorder_agreement(Sale) %} {% if Sale.Shop.ReceiptSetup.workorderAgree|strlen > 0 and Sale.Workorders %} -

{{Sale.Shop.ReceiptSetup.workorderAgree|noteformat|raw}}

@@ -1442,14 +1567,19 @@ table.payments td.label { {% endfor %} {% endif %} - {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 and not logo_printed %} - - {% if show_shop_name_with_logo %} + {% if not logo_printed %} + {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 %} + + {% set logo_printed = true %} + {% endif %} + {% endif %} + + {% if Sale.Shop.name|strlen > 0 %} + {% if not logo_printed or options.show_shop_name_with_logo == true %}

{{ Sale.Shop.name }}

{% endif %} - {% else %} -

{{ Sale.Shop.name }}

{% endif %} +

{% if Sale.Shop.ReceiptSetup.header|strlen > 0 %}

{{Sale.Shop.ReceiptSetup.header|nl2br|raw}}

@@ -1602,7 +1732,7 @@ table.payments td.label {
- {{SaleNote.PrintedNote.note}} + {{SaleNote.PrintedNote.note}}
diff --git a/receipt/SaleReceipt_fr_CH.tpl b/receipt/SaleReceipt_fr_CH.tpl index f8fe87d..0f2df33 100644 --- a/receipt/SaleReceipt_fr_CH.tpl +++ b/receipt/SaleReceipt_fr_CH.tpl @@ -16,7 +16,7 @@ {% set hide_customer_vat_number = false %} {# Hide the Customer VAT Number on Sales #} {% set hide_customer_registration_number = false %} {# Hide the Customer Registration Number on Sales #} {% set sale_id_instead_of_ticket_number = true %} {# Displays the Sale ID instead of the Ticket Number #} -{% set invoice_as_title = false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} +{% set invoice_as_title = parameters.invoice_as_title == "true" ? true : false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} {% set workorders_as_title = false %} {# Changes the receipt title to "Work Orders" if there is no Salesline items and 1 or more workorders #} {% set quote_id_prefix = "" %} {# Adds a string of text as a prefix for the Quote ID. Ex: "Q-". To be used when "sale_id_instead_of_ticket_number" is true #} {% set sale_id_prefix = "" %} {# Adds a string of text as a prefix for the Sales ID. Ex: "S-". To be used when "sale_id_instead_of_ticket_number" is true #} @@ -118,6 +118,10 @@ h1 { text-align: center; } +h1.spacer { + margin-top: 2em; +} + p.date, p.copy { font-size: 9pt; margin: 0; @@ -207,12 +211,26 @@ table div.line_note { padding-left: 10px; } +table div.line_extra { + text-align: left; + padding-left: 10px; + font-size: .8em; +} + table div.line_serial { text-align: left; font-weight: normal; padding-left: 10px; } +table div.line_description_item_fee { + padding-left: 10px; +} + +.footerSectionTitle + table div.line_description_item_fee { + padding-left: 25px; +} + table.workorders div.line_description { font-weight: normal; padding-left: 10px; @@ -240,12 +258,54 @@ p.thankyou { .note { text-align: center; } - .barcodeContainer { margin-top: 15px; text-align: center; } +.remotePaymentLinkContainer { + text-align: center; + margin: 1.5em 0; +} + +span.payOnlineTitle { + display: block; + font-size: 0.8rem; + font-weight: bold; + margin: 2rem 0 0.25rem; + text-transform: uppercase; +} + +svg.payOnlineIcon { + height: 1rem; + margin-right: 0.25rem; + vertical-align: -0.2rem; + width: 1rem; +} + +.payButton { + background-color: #1844cc; + background-image: linear-gradient(#537dec, #2e61de); + border: 1px solid #1844cc; + border-radius: 0.1875rem; + box-shadow: rgba(255, 255, 255, 0.15) 0px 1px 0px 0px inset; + color: #fff; + display: inline-block; + font-size: 1rem; + font-weight: 500; + line-height: 2rem; + margin: 1.5em 0 0; + padding: 0.375rem 1.5rem; + text-align: center; + text-decoration: none; + width: 90%; +} + +.payButton:hover { + background-color: #2e61de; + background-image: linear-gradient(#2e61de, #2e61de); +} + .workorders .barcodeContainer { margin-left: 15px; text-align: left; @@ -289,6 +349,24 @@ table.payments td.label { width: 100%; } +#receiptTransactionDetails table { + max-width: 245px; + margin: 0 auto; +} + +#receiptTransactionDetails table td { + text-align: right; +} + +#receiptTransactionDetails table td.top { + font-weight: bold; +} + +#receiptTransactionDetails table td.label { + padding-right: 20px; + text-align: left; +} + {% if print_layout %} /* Receipts only */ @@ -575,6 +653,10 @@ table.payments td.label { {{ _self.client_workorder_agreement(Sale,_context) }} + {% if parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} + {% endif %} + {% if not parameters.gift_receipt %} {{ _self.no_tax_applied_text(Sale) }}

@@ -585,9 +667,21 @@ table.payments td.label { {% endif %} {% if show_barcode %} -

- -

+

+ +

+ {% endif %} + + {% if Sale.completed == 'true' and Sale.SalePayments and not parameters.gift_receipt %} + {# + DO NOT CONSOLIDATE THESE IF STATEMENTS. + Twig doesnt play nice with these functions. + #} + {{ _self.transaction_details(Sale) }} + {% endif %} + + {% if not parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} {% endif %}
@@ -612,7 +706,7 @@ table.payments td.label { {% macro store_receipt(Sale,parameters,options,Payment) %}
- {{ _self.header(Sale,options) }} + {{ _self.header(Sale,options) }} {{ _self.title(Sale,parameters,options) }}

Copie de la boutique

{{ _self.date(Sale) }} @@ -621,10 +715,14 @@ table.payments td.label { {% if options.show_sale_lines_on_store_copy %} {{ _self.receipt(Sale,parameters,true,options) }} {% else %} -

Paiements

- - {{ _self.cc_payment_info(Sale,Payment) }} -
+ {% if isUnifiedReceipt(Sale.SalePayments) %} + {{ _self.single_transaction_details(Sale, Payment) }} + {% else %} +

Paiements

+ + {{ _self.cc_payment_info(Sale,Payment) }} +
+ {% endif %} {% endif %} {% if Sale.quoteID and Sale.Quote.notes|strlen > 0 %}

{{Sale.Quote.notes|noteformat|raw}}

{% endif %} @@ -645,6 +743,10 @@ table.payments td.label {
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
+ {% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %} +
+ {{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %} +
{% endif %} {% if Line.Note %}
@@ -681,6 +783,8 @@ table.payments td.label { {% endif %} {% if options.workorders_as_title and Sale.SaleLines is empty and Sale.Customer.Workorders is defined %} Demandes de service + {% elseif Sale.SaleLines is empty and Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + Demande de dépôt à distance {% else %} {% if parameters.gift_receipt %}Reçu-cadeau{% else %}Reçu de vente{% endif %} {% endif %} @@ -698,7 +802,7 @@ table.payments td.label { {% if options.invoice_as_title and options.print_layout %} {% endif %} - Reçu ANNULÉ + Reçu ANNULÉ {% if options.invoice_as_title and options.print_layout %} Facture ANNULÉ @@ -774,7 +878,7 @@ table.payments td.label { {% if isVATAndRegistrationNumberOnReceipt() %} {% if Sale.Shop.vatNumber|strlen and not options.hide_shop_vat_number %} - TVA: + TVA: {{Sale.Shop.vatNumber}}
@@ -797,7 +901,7 @@ table.payments td.label { {% endif %} {% if Sale.Customer %} - {% if Sale.Customer.company|strlen > 0 %} + {% if Sale.Customer.company|strlen > 0 and not options.show_customer_name_only %} Entreprise: {{Sale.Customer.company}}
{% endif %} @@ -855,6 +959,12 @@ table.payments td.label { {{ _self.lineDescription(Line,options) }} + {% if options.show_custom_sku and Line.Item.customSku|strlen > 0 %} +
UGS pers.: {{ Line.Item.customSku }}
+ {% endif %} + {% if options.show_manufacturer_sku and Line.Item.manufacturerSku|strlen > 0 %} +
UGS man.: {{ Line.Item.manufacturerSku }}
+ {% endif %} {% if options.per_line_discount == true and not parameters.gift_receipt %} {% if Line.calcLineDiscount > 0 %} Réduction: '{{ Line.Discount.name }}' -{{Line.calcLineDiscount|money}} @@ -864,13 +974,6 @@ table.payments td.label { {% endif %} - {% if options.show_custom_sku and Line.Item.customSku %} - {{ Line.Item.customSku }} - {% endif %} - {% if options.show_manufacturer_sku and Line.Item.manufacturerSku %} - {{ Line.Item.manufacturerSku }} - {% endif %} - {% if options.show_msrp == true and not parameters.gift_receipt %} {% set msrp_printed = false %} {% for price in Line.Item.Prices.ItemPrice if not msrp_printed %} @@ -886,7 +989,7 @@ table.payments td.label { {% if options.per_line_subtotal and options.discounted_line_items and Line.calcLineDiscount != 0 and not parameters.gift_receipt %} - {{Line.unitQuantity}} x {{Line.displayableUnitPrice|money}} + {{Line.unitQuantity}} x {{Line.unitPrice|money}} {% endif %} {{Line.unitQuantity}} {% if options.per_line_subtotal and not parameters.gift_receipt %} x @@ -904,7 +1007,7 @@ table.payments td.label { {% if not isTaxInclusive or isTaxInclusive == 'false' %} {{ Line.calcSubtotal|money }}
{% else %} - {{ multiply(Line.displayableUnitPrice, Line.unitQuantity)|money }}
+ {{ multiply(Line.unitPrice, Line.unitQuantity)|money }}
{% endif %} {% endif %} {{ Line.displayableSubtotal|money }} @@ -919,13 +1022,6 @@ table.payments td.label { Article - {% if options.show_custom_sku and options.show_manufacturer_sku %} - UGS pers. - UGS man. - {% elseif options.show_custom_sku or options.show_manufacturer_sku %} - UGS - {% endif %} - {% if options.show_msrp and not parameters.gift_receipt %} PDSF {% endif %} @@ -946,6 +1042,9 @@ table.payments td.label { {% if not parameters.gift_receipt %} + {% if Sale.MetaData.itemFeesSubtotal %} + + {% endif %} @@ -977,9 +1084,9 @@ table.payments td.label { {% endfor %} - {% if Sale.tipEnabled == 'true' %} - - {% endif %} + {% if Sale.tipEnabled == 'true' %} + + {% endif %}
Total des frais{{Sale.MetaData.itemFeesSubtotal|money}}
{% if options.discounted_line_items and Sale.calcDiscount != 0 %} @@ -956,9 +1055,17 @@ table.payments td.label { {% if options.discounted_line_items %} - {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money}} + {% if options.Sale.isTaxInclusive == 'true'%} + {{ subtract(Sale.calcSubtotal, Sale.calcDiscount)|money }} + {% else %} + {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money }} + {% endif %} {% else %} - {{Sale.displayableSubtotal|money}} + {% if options.Sale.isTaxInclusive == 'true'%} + {{ Sale.calcSubtotal|money }} + {% else %} + {{ Sale.displayableSubtotal|money }} + {% endif %} {% endif %}
Total des taxes{{Sale.taxTotal|money}}
Total{{Sale.calcTotal|money}}
Pourboire{{Sale.calcTips|money}}
Pourboire{{Sale.calcTips|money}}
{% endif %} @@ -994,10 +1101,10 @@ table.payments td.label { {% if Payment.PaymentType.name != 'Cash' %} {% if Payment.CreditAccount.giftCard == 'true' %} - + {% if Payment.amount > 0 %} - Prélèvement sur carte cadeau + Prélèvement sur carte cadeau {{Payment.CreditAccount.code}} {{Payment.amount|money}} @@ -1013,7 +1120,7 @@ table.payments td.label { Solde {{Payment.CreditAccount.balance|getinverse|money}} - {% elseif Payment.amount < 0 and Sale.calcTotal >= 0 %} + {% elseif Payment.amount < 0 and Payment.archived != 'true' and Sale.calcTotal >= 0 %} Achat carte-cadeau {{Payment.amount|getinverse|money}} @@ -1024,9 +1131,9 @@ table.payments td.label { {% endif %} {% elseif Payment.creditAccountID == 0 %} - + {{ _self.cc_payment_info(Sale,Payment) }} - {% elseif Payment.CreditAccount %} + {% elseif Payment.CreditAccount and Payment.archived == 'false' %} {% if Payment.amount < 0 %} @@ -1059,18 +1166,18 @@ table.payments td.label { {% endif %} {% if options.show_customer_credit_account and Sale.Customer and not parameters.gift_receipt and not store_copy %} - {% if Sale.Customer.CreditAccount and Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %}

Dossier

{% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 %} - + {% elseif Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} - + {% endif %}
Solde dû: {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}{{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}
En dépôt: {{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}{{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}
@@ -1079,55 +1186,148 @@ table.payments td.label { - +
Solde restant: {{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}{{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}
{% endif %} {% endif %} + {% if Sale.Customer.CreditAccount %} + {% for Payment in Sale.SalePayments.SalePayment %} + {% if Payment.PaymentType.name == 'Credit Account' and options.show_credit_account_signature %} +
+
Signature:
+
+ {{Sale.Customer.title}} {{Sale.Customer.firstName}} {{Sale.Customer.lastName}}
+
+
+ {% endif %} + {% endfor %} + {% endif %} + + {{ _self.remoteDepositSummary(Sale,parameters) }} {% endif %} {% if (not parameters.gift_receipt and not options.hide_notes_in_sale_receipt) or (parameters.gift_receipt and not options.hide_notes_in_gift_receipt) %} {{ _self.show_note(Sale.SaleNotes) }} {% endif %} {% endmacro %} +{% macro remoteDepositLink(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remotePaymentLinkUrl %} + {% if parameters.email %} + + {% else %} + + {% endif %} + {% endif %} +{% endmacro %} + +{% macro remoteDepositSummary(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + {% if Sale.SaleLines is not empty %} +

+ Demande de dépôt à distance +

+ {{ _self.date(Sale) }} + {% endif %} +

Paiement demandé

+ + + + + + + +
Dépôt au compte : {{ Sale.Customer.CreditAccount.MetaData.remoteDepositAmount|money }}
+ {% endif %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 or Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} +

Compte boutique (après versement)

+ + + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 %} + + + + + {% elseif Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} + + + + + {% endif %} + +
Solde dû (après versement) : {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment|money }}
En dépôt (après versement) : {{ Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment|money }}
+ {% endif %} + {% if Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment > 0 %} + + + + + +
Solde restant (après versement) : {{ Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment|money }}
+ {% endif %} +{% endmacro %} + {% macro cc_payment_info(Sale,Payment) %} {% if Payment.archived == 'false' %} {% if Payment.ccChargeID > 0 and Payment.CCCharge.declined == 'false' %} {{ Payment.PaymentType.name }} -
Numéro de carte: {{Payment.CCCharge.xnum}} +
Numéro de carte : {{Payment.CCCharge.xnum}} {% if Payment.CCCharge.cardType|strlen > 0 %} -
Type: {{Payment.CCCharge.cardType}} +
Type : {{Payment.CCCharge.cardType}} {% endif %} {% if Payment.CCCharge.cardholderName|strlen > 0 %} -
Titulaire de la carte: {{Payment.CCCharge.cardholderName}} +
Détenteur : {{Payment.CCCharge.cardholderName}} {% endif %} {% if Payment.CCCharge.entryMethod|strlen > 0 %} -
Saisie: {{Payment.CCCharge.entryMethod}} +
Saisie : {{Payment.CCCharge.entryMethod}} {% endif %} {% if Payment.CCCharge.authCode|strlen > 0 %} -
Approbation: {{Payment.CCCharge.authCode}} +
Approbation : {{Payment.CCCharge.authCode}} {% endif %} {% if Payment.CCCharge.gatewayTransID|strlen > 0 and Payment.CCCharge.gatewayTransID|strlen < 48 %} -
ID: {{Payment.CCCharge.gatewayTransID}} +
ID : {{Payment.CCCharge.gatewayTransID}} {% endif %} {% if Payment.CCCharge.MetaData.isEMV %} {% if Payment.CCCharge.MetaData.AID|strlen > 0 %} -
ID de l'appli: {{Payment.CCCharge.MetaData.AID}} +
ID de demande : {{Payment.CCCharge.MetaData.AID}} {% endif %} {% if Payment.CCCharge.MetaData.ApplicationLabel|strlen > 0 %} -
Étiquette de l'application: {{Payment.CCCharge.MetaData.ApplicationLabel}} +
Étiquette de l'application : {{Payment.CCCharge.MetaData.ApplicationLabel}} {% endif %} {% if Payment.CCCharge.MetaData.PINStatement|strlen > 0 %} -
Statut du code NIP: {{Payment.CCCharge.MetaData.PINStatement}} +
Statut du code NIP : {{Payment.CCCharge.MetaData.PINStatement}} {% endif %} {% endif %} {{Payment.amount|money}} {% elseif Payment.ccChargeID == 0 %} - {{ Payment.PaymentType.name }} + {% if Payment.PaymentType.name == 'Credit Card' %} + Carte de crédit + {% elseif Payment.PaymentType.name == 'Debit Card' %} + Carte de débit + {% elseif Payment.PaymentType.name == 'Check' %} + Chèque + {% else %} + {{Payment.PaymentType.name}} + {% endif %} {{Payment.amount|money}} {% endif %} @@ -1135,6 +1335,148 @@ table.payments td.label { {% endmacro %} +{% macro transaction(Payment) %} + {% if Payment.PaymentType.type == 'credit card' and Payment.MetaData.ReceiptData.status != 'error' and Payment.archived == 'false' %} + {% if Payment.MetaData.ReceiptData.type|strlen and Payment.MetaData.ReceiptData.authorized_amount|strlen %} + + {% if Payment.MetaData.ReceiptData.type == 'sale' %} + Vente + {% else %} + {{ mostranslate(Payment.MetaData.ReceiptData.type, 'capitalize', true) }} + {%endif%} + {{ Payment.MetaData.ReceiptData.authorized_amount|money }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode|strlen %} + + Statut : + + {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Approved' %} + Approuvé + {% elseif Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Declined' %} + Refusé + {% else %} + {{ Payment.MetaData.ReceiptData.extra_parameters.statusCode }} + {%endif%} + + + {% endif %} + + {% if Payment.MetaData.ReceiptData.card_brand|strlen and Payment.MetaData.ReceiptData.card_number|strlen %} + + {{ Payment.MetaData.ReceiptData.card_brand }} + {{ getDisplayableCardNumber(Payment.MetaData.ReceiptData.card_number) }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.processed_date|strlen %} + + Date : + {{ Payment.MetaData.ReceiptData.processed_date|correcttimezone|date(getDateTimeFormat()) }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.entry_method|strlen %} + + Méthode : + {{ Payment.MetaData.ReceiptData.entry_method }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.acceptorId|strlen %} + + MLC : + {{ Payment.MetaData.ReceiptData.extra_parameters.acceptorId }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.authorization_number|strlen %} + + Code d’autorisation : + {{ Payment.MetaData.ReceiptData.authorization_number }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode|strlen or Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage|strlen %} + + Réponse : + {{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode }}/{{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_id|strlen %} + + ID de demande : + {{ Payment.MetaData.ReceiptData.emv_application_id }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_preferred_name|strlen %} + + APN : + {{ Payment.MetaData.ReceiptData.emv_application_preferred_name }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.accountType|strlen %} + + Type de compte : + {{ Payment.MetaData.ReceiptData.extra_parameters.accountType }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_cryptogram_type|strlen or Payment.MetaData.ReceiptData.emv_cryptogram|strlen %} + + Cryptogramme : + {{ Payment.MetaData.ReceiptData.emv_cryptogram_type }} {{ Payment.MetaData.ReceiptData.emv_cryptogram }} + + {% endif %} + + {% for emvTag in Payment.MetaData.ReceiptData.extra_parameters.emv_tags.children() %} + + {{ emvTag.getName() }} + {{ emvTag }} + + {% endfor %} + + {# Creates a Line Break for the next Payment #} +
+ {% endif %} +{% endmacro %} + +{% macro single_transaction_details(Sale, Payment) %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Détails de la transaction


+
+ + + {{ _self.transaction(Payment) }} + +
+
+ {% endif %} + {% endif %} +{% endmacro %} + +{% macro transaction_details(Sale) %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Détails de la transaction


+
+ + + {% for Payment in Sale.SalePayments.SalePayment %} + {{ _self.transaction(Payment) }} + {% endfor %} + +
+
+ {% endif %} + {% endif %} +{% endmacro %} + {% macro cc_agreement(Sale,Payment,options) %} {% if Payment.MetaData.ReceiptData.requires_receipt_signature|CompBool == true %} {% if Sale.Shop.ReceiptSetup.creditcardAgree|strlen > 0 %} @@ -1151,10 +1493,6 @@ table.payments td.label { {% macro shop_workorder_agreement(Sale) %} {% if Sale.Shop.ReceiptSetup.workorderAgree|strlen > 0 and Sale.Workorders %} -

{{Sale.Shop.ReceiptSetup.workorderAgree|noteformat|raw}}

@@ -1225,14 +1563,19 @@ table.payments td.label { {% endfor %} {% endif %} - {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 and not logo_printed %} - - {% if show_shop_name_with_logo %} + {% if not logo_printed %} + {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 %} + + {% set logo_printed = true %} + {% endif %} + {% endif %} + + {% if Sale.Shop.name|strlen > 0 %} + {% if not logo_printed or options.show_shop_name_with_logo == true %}

{{ Sale.Shop.name }}

{% endif %} - {% else %} -

{{ Sale.Shop.name }}

{% endif %} +

{% if Sale.Shop.ReceiptSetup.header|strlen > 0 %}

{{Sale.Shop.ReceiptSetup.header|nl2br|raw}}

@@ -1385,7 +1728,7 @@ table.payments td.label {
- {{SaleNote.PrintedNote.note}} + {{SaleNote.PrintedNote.note}}
diff --git a/receipt/SaleReceipt_nl_BE.tpl b/receipt/SaleReceipt_nl_BE.tpl index 046b6c2..7c716b8 100644 --- a/receipt/SaleReceipt_nl_BE.tpl +++ b/receipt/SaleReceipt_nl_BE.tpl @@ -16,7 +16,7 @@ {% set hide_customer_vat_number = false %} {# Hide the Customer VAT Number on Sales #} {% set hide_customer_registration_number = false %} {# Hide the Customer Registration Number on Sales #} {% set sale_id_instead_of_ticket_number = true %} {# Displays the Sale ID instead of the Ticket Number #} -{% set invoice_as_title = false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} +{% set invoice_as_title = parameters.invoice_as_title == "true" ? true : false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} {% set workorders_as_title = false %} {# Changes the receipt title to "Work Orders" if there is no Salesline items and 1 or more workorders #} {% set quote_id_prefix = "" %} {# Adds a string of text as a prefix for the Quote ID. Ex: "Q-". To be used when "sale_id_instead_of_ticket_number" is true #} {% set sale_id_prefix = "" %} {# Adds a string of text as a prefix for the Sales ID. Ex: "S-". To be used when "sale_id_instead_of_ticket_number" is true #} @@ -118,6 +118,10 @@ h1 { text-align: center; } +h1.spacer { + margin-top: 2em; +} + p.date, p.copy { font-size: 9pt; margin: 0; @@ -207,12 +211,26 @@ table div.line_note { padding-left: 10px; } +table div.line_extra { + text-align: left; + padding-left: 10px; + font-size: .8em; +} + table div.line_serial { text-align: left; font-weight: normal; padding-left: 10px; } +table div.line_description_item_fee { + padding-left: 10px; +} + +.footerSectionTitle + table div.line_description_item_fee { + padding-left: 25px; +} + table.workorders div.line_description { font-weight: normal; padding-left: 10px; @@ -240,12 +258,54 @@ p.thankyou { .note { text-align: center; } - .barcodeContainer { margin-top: 15px; text-align: center; } +.remotePaymentLinkContainer { + text-align: center; + margin: 1.5em 0; +} + +span.payOnlineTitle { + display: block; + font-size: 0.8rem; + font-weight: bold; + margin: 2rem 0 0.25rem; + text-transform: uppercase; +} + +svg.payOnlineIcon { + height: 1rem; + margin-right: 0.25rem; + vertical-align: -0.2rem; + width: 1rem; +} + +.payButton { + background-color: #1844cc; + background-image: linear-gradient(#537dec, #2e61de); + border: 1px solid #1844cc; + border-radius: 0.1875rem; + box-shadow: rgba(255, 255, 255, 0.15) 0px 1px 0px 0px inset; + color: #fff; + display: inline-block; + font-size: 1rem; + font-weight: 500; + line-height: 2rem; + margin: 1.5em 0 0; + padding: 0.375rem 1.5rem; + text-align: center; + text-decoration: none; + width: 90%; +} + +.payButton:hover { + background-color: #2e61de; + background-image: linear-gradient(#2e61de, #2e61de); +} + .workorders .barcodeContainer { margin-left: 15px; text-align: left; @@ -289,6 +349,24 @@ table.payments td.label { width: 100%; } +#receiptTransactionDetails table { + max-width: 245px; + margin: 0 auto; +} + +#receiptTransactionDetails table td { + text-align: right; +} + +#receiptTransactionDetails table td.top { + font-weight: bold; +} + +#receiptTransactionDetails table td.label { + padding-right: 20px; + text-align: left; +} + {% if print_layout %} /* Receipts only */ @@ -575,6 +653,10 @@ table.payments td.label { {{ _self.client_workorder_agreement(Sale,_context) }} + {% if parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} + {% endif %} + {% if not parameters.gift_receipt %} {{ _self.no_tax_applied_text(Sale) }}

@@ -585,9 +667,21 @@ table.payments td.label { {% endif %} {% if show_barcode %} -

- -

+

+ +

+ {% endif %} + + {% if Sale.completed == 'true' and Sale.SalePayments and not parameters.gift_receipt %} + {# + DO NOT CONSOLIDATE THESE IF STATEMENTS. + Twig doesnt play nice with these functions. + #} + {{ _self.transaction_details(Sale) }} + {% endif %} + + {% if not parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} {% endif %}
@@ -612,7 +706,7 @@ table.payments td.label { {% macro store_receipt(Sale,parameters,options,Payment) %}
- {{ _self.header(Sale,options) }} + {{ _self.header(Sale,options) }} {{ _self.title(Sale,parameters,options) }}

Winkelbon

{{ _self.date(Sale) }} @@ -621,10 +715,14 @@ table.payments td.label { {% if options.show_sale_lines_on_store_copy %} {{ _self.receipt(Sale,parameters,true,options) }} {% else %} -

Betalingen

- - {{ _self.cc_payment_info(Sale,Payment) }} -
+ {% if isUnifiedReceipt(Sale.SalePayments) %} + {{ _self.single_transaction_details(Sale, Payment) }} + {% else %} +

Betalingen

+ + {{ _self.cc_payment_info(Sale,Payment) }} +
+ {% endif %} {% endif %} {% if Sale.quoteID and Sale.Quote.notes|strlen > 0 %}

{{Sale.Quote.notes|noteformat|raw}}

{% endif %} @@ -645,6 +743,10 @@ table.payments td.label {
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
+ {% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %} +
+ {{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %} +
{% endif %} {% if Line.Note %}
@@ -665,7 +767,7 @@ table.payments td.label {
{% endfor %} {% endif %} - {% if options.per_line_employee %} + {% if options.per_line_employee and not options.hide_employee_name %}
Medewerker: {{ Line.Employee.firstName }}
@@ -681,6 +783,8 @@ table.payments td.label { {% endif %} {% if options.workorders_as_title and Sale.SaleLines is empty and Sale.Customer.Workorders is defined %} Werkbonnen + {% elseif Sale.SaleLines is empty and Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + Aanbetalingsverzoek op afstand {% else %} {% if parameters.gift_receipt %}Geschenkbewijs{% else %}Ontvangstbewijs{% endif %} {% endif %} @@ -717,7 +821,7 @@ table.payments td.label { {% if options.invoice_as_title and options.print_layout %} {% endif %} - Retour ontvangstbewijs + Retour ontvangstbewijs {% if options.invoice_as_title and options.print_layout %} Retour factuur @@ -744,9 +848,9 @@ table.payments td.label { {% if options.quote_to_invoice %} - Factuurnr #: + Factuurnr #: {% else %} - Offertenr.: + Offertenr.: {% endif %} {{options.quote_id_prefix}}{{Sale.quoteID}} @@ -797,7 +901,7 @@ table.payments td.label { {% endif %} {% if Sale.Customer %} - {% if Sale.Customer.company|strlen > 0 %} + {% if Sale.Customer.company|strlen > 0 and not options.show_customer_name_only %} Bedrijf: {{Sale.Customer.company}}
{% endif %} @@ -855,6 +959,12 @@ table.payments td.label { {{ _self.lineDescription(Line,options) }} + {% if options.show_custom_sku and Line.Item.customSku|strlen > 0 %} +
Aangepaste artikelnummer: {{ Line.Item.customSku }}
+ {% endif %} + {% if options.show_manufacturer_sku and Line.Item.manufacturerSku|strlen > 0 %} +
Artikelnummer fabr.: {{ Line.Item.manufacturerSku }}
+ {% endif %} {% if options.per_line_discount == true and not parameters.gift_receipt %} {% if Line.calcLineDiscount > 0 %} Korting: '{{ Line.Discount.name }}' -{{Line.calcLineDiscount|money}} @@ -864,13 +974,6 @@ table.payments td.label { {% endif %} - {% if options.show_custom_sku and Line.Item.customSku %} - {{ Line.Item.customSku }} - {% endif %} - {% if options.show_manufacturer_sku and Line.Item.manufacturerSku %} - {{ Line.Item.manufacturerSku }} - {% endif %} - {% if options.show_msrp == true and not parameters.gift_receipt %} {% set msrp_printed = false %} {% for price in Line.Item.Prices.ItemPrice if not msrp_printed %} @@ -886,7 +989,7 @@ table.payments td.label { {% if options.per_line_subtotal and options.discounted_line_items and Line.calcLineDiscount != 0 and not parameters.gift_receipt %} - {{Line.unitQuantity}} x {{Line.displayableUnitPrice|money}} + {{Line.unitQuantity}} x {{Line.unitPrice|money}} {% endif %} {{Line.unitQuantity}} {% if options.per_line_subtotal and not parameters.gift_receipt %} x @@ -904,7 +1007,7 @@ table.payments td.label { {% if not isTaxInclusive or isTaxInclusive == 'false' %} {{ Line.calcSubtotal|money }}
{% else %} - {{ multiply(Line.displayableUnitPrice, Line.unitQuantity)|money }}
+ {{ multiply(Line.unitPrice, Line.unitQuantity)|money }}
{% endif %} {% endif %} {{ Line.displayableSubtotal|money }} @@ -919,13 +1022,6 @@ table.payments td.label { Product - {% if options.show_custom_sku and options.show_manufacturer_sku %} - Aangepaste artikelnummer - Artikelnummer fabr. - {% elseif options.show_custom_sku or options.show_manufacturer_sku %} - Artikelnummer - {% endif %} - {% if options.show_msrp and not parameters.gift_receipt %} Adviesprijs {% endif %} @@ -946,19 +1042,30 @@ table.payments td.label { {% if not parameters.gift_receipt %} + {% if Sale.MetaData.itemFeesSubtotal %} + + {% endif %} @@ -976,30 +1083,30 @@ table.payments td.label { {% endif %} {% endfor %} - {% set cash_total = 0 %} - {% set non_cash_total = 0 %} - {% for Payment in Sale.SalePayments.SalePayment %} - {% if Payment.PaymentType.code == "Cash" %} - {% set cash_total = cash_total + Payment.amount|floatval %} - {% else %} - {% set non_cash_total = non_cash_total + Payment.amount|floatval %} - {% endif %} - {% endfor %} - {% set roundedCashTotal = ((cash_total * 20) | round) / 20 %} - {% set roundedTotal = roundedCashTotal + non_cash_total %} - {% if roundedTotal != Sale.calcTotal %} - {% if Sale.completed == "false" and Sale.quoteID > 0 %} - - {% else %} - - - {% endif %} - {% else %} - - {% endif %} - {% if Sale.tipEnabled == 'true' %} - - {% endif %} + {% set cash_total = 0 %} + {% set non_cash_total = 0 %} + {% for Payment in Sale.SalePayments.SalePayment %} + {% if Payment.PaymentType.code == "Cash" %} + {% set cash_total = cash_total + Payment.amount|floatval %} + {% else %} + {% set non_cash_total = non_cash_total + Payment.amount|floatval %} + {% endif %} + {% endfor %} + {% set roundedCashTotal = ((cash_total * 20) | round) / 20 %} + {% set roundedTotal = roundedCashTotal + non_cash_total %} + {% if roundedTotal != Sale.calcTotal %} + {% if Sale.completed == "false" and Sale.quoteID > 0 %} + + {% else %} + + + {% endif %} + {% else %} + + {% endif %} + {% if Sale.tipEnabled == 'true' %} + + {% endif %}
Totaal kosten{{Sale.MetaData.itemFeesSubtotal|money}}
{% if options.discounted_line_items and Sale.calcDiscount != 0 %} - Subtotaal + kortingen + Subtotaal + kortingen {% else %} - Subtotaal + Subtotaal {% endif %} {% if options.discounted_line_items %} - {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money}} + {% if options.Sale.isTaxInclusive == 'true'%} + {{ subtract(Sale.calcSubtotal, Sale.calcDiscount)|money }} + {% else %} + {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money }} + {% endif %} {% else %} - {{Sale.displayableSubtotal|money}} + {% if options.Sale.isTaxInclusive == 'true'%} + {{ Sale.calcSubtotal|money }} + {% else %} + {{ Sale.displayableSubtotal|money }} + {% endif %} {% endif %}
Totaal belasting{{Sale.taxTotal|money}}
Totaal{{Sale.calcTotal|money}}
Totaal{{Sale.calcTotal|money}}
Afgerond totaal{{roundedTotal|money}}
Totaal{{Sale.calcTotal|money}}
Fooi{{Sale.calcTips|money}}
Totaal{{Sale.calcTotal|money}}
Totaal{{Sale.calcTotal|money}}
Afgerond totaal{{roundedTotal|money}}
Totaal{{Sale.calcTotal|money}}
Fooi{{Sale.calcTips|money}}
{% endif %} @@ -1014,10 +1121,10 @@ table.payments td.label { {% if Payment.PaymentType.name != 'Cash' %} {% if Payment.CreditAccount.giftCard == 'true' %} - + {% if Payment.amount > 0 %} - Afgeschreven van cadeaubon + Afgeschreven van cadeaubon {{Payment.CreditAccount.code}} {{Payment.amount|money}} @@ -1033,7 +1140,7 @@ table.payments td.label { Saldo {{Payment.CreditAccount.balance|getinverse|money}} - {% elseif Payment.amount < 0 and Sale.calcTotal >= 0 %} + {% elseif Payment.amount < 0 and Payment.archived != 'true' and Sale.calcTotal >= 0 %} Aankoop cadeaubon {{Payment.amount|getinverse|money}} @@ -1044,17 +1151,17 @@ table.payments td.label { {% endif %} {% elseif Payment.creditAccountID == 0 %} - + {{ _self.cc_payment_info(Sale,Payment) }} - {% elseif Payment.CreditAccount %} + {% elseif Payment.CreditAccount and Payment.archived == 'false' %} {% if Payment.amount < 0 %} - Aanbetaling op rekening - {{Payment.amount|getinverse|money}} + Aanbetaling op rekening + {{Payment.amount|getinverse|money}} {% else %} - Betalen op rekening - {{Payment.amount|money}} + Betalen op rekening + {{Payment.amount|money}} {% endif %} {% endif %} @@ -1079,18 +1186,18 @@ table.payments td.label { {% endif %} {% if options.show_customer_credit_account and Sale.Customer and not parameters.gift_receipt and not store_copy %} - {% if Sale.Customer.CreditAccount and Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %}

Op rekening

{% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 %} - + {% elseif Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} - + {% endif %}
Verschuldigd saldo: {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}{{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}
Aanbetaling op rekening: {{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}{{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}
@@ -1099,17 +1206,102 @@ table.payments td.label { - +
Resterend bedrag: {{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}{{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}
{% endif %} {% endif %} + {% if Sale.Customer.CreditAccount %} + {% for Payment in Sale.SalePayments.SalePayment %} + {% if Payment.PaymentType.name == 'Credit Account' and options.show_credit_account_signature %} +
+
Signature:
+
+ {{Sale.Customer.title}} {{Sale.Customer.firstName}} {{Sale.Customer.lastName}}
+
+
+ {% endif %} + {% endfor %} + {% endif %} + + {{ _self.remoteDepositSummary(Sale,parameters) }} {% endif %} {% if (not parameters.gift_receipt and not options.hide_notes_in_sale_receipt) or (parameters.gift_receipt and not options.hide_notes_in_gift_receipt) %} {{ _self.show_note(Sale.SaleNotes) }} {% endif %} {% endmacro %} +{% macro remoteDepositLink(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remotePaymentLinkUrl %} + {% if parameters.email %} + + {% else %} + + {% endif %} + {% endif %} +{% endmacro %} + +{% macro remoteDepositSummary(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + {% if Sale.SaleLines is not empty %} +

+ Aanbetalingsverzoek op afstand +

+ {{ _self.date(Sale) }} + {% endif %} +

Verzochte betaling

+ + + + + + + +
Aanbetaling rekening: {{ Sale.Customer.CreditAccount.MetaData.remoteDepositAmount|money }}
+ {% endif %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 or Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} +

Rekening winkel (na betaling)

+ + + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 %} + + + + + {% elseif Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} + + + + + {% endif %} + +
Openstaand bedrag (na betaling): {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment|money }}
In aanbetaling (na betaling): {{ Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment|money }}
+ {% endif %} + {% if Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment > 0 %} + + + + + +
Resterend openstaand bedrag (na betaling): {{ Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment|money }}
+ {% endif %} +{% endmacro %} + {% macro cc_payment_info(Sale,Payment) %} {% if Payment.archived == 'false' %} @@ -1147,7 +1339,15 @@ table.payments td.label { {{Payment.amount|money}} {% elseif Payment.ccChargeID == 0 %} - {{ Payment.PaymentType.name }} + {% if Payment.PaymentType.name == 'Credit Card' %} + Creditcard + {% elseif Payment.PaymentType.name == 'Debit Card' %} + Betaalkaart + {% elseif Payment.PaymentType.name == 'Check' %} + Cheque + {% else %} + {{Payment.PaymentType.name}} + {% endif %} {{Payment.amount|money}} {% endif %} @@ -1155,6 +1355,152 @@ table.payments td.label { {% endmacro %} +{% macro transaction(Payment) %} + {% if Payment.PaymentType.type == 'credit card' and Payment.MetaData.ReceiptData.status != 'error' and Payment.archived == 'false' %} + {% if Payment.MetaData.ReceiptData.type|strlen and Payment.MetaData.ReceiptData.authorized_amount|strlen %} + + {% if Payment.MetaData.ReceiptData.type == 'sale' %} + Verkoop + {% else %} + {{ mostranslate(Payment.MetaData.ReceiptData.type, 'capitalize', true) }} + {%endif%} + {{ Payment.MetaData.ReceiptData.authorized_amount|money }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode|strlen %} + + Status: + + {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Approved' %} + Goedgekeurd + {% elseif Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Declined' %} + Geweigerd + {% else %} + {{ Payment.MetaData.ReceiptData.extra_parameters.statusCode }} + {%endif%} + + + {% endif %} + + {% if Payment.MetaData.ReceiptData.card_brand|strlen and Payment.MetaData.ReceiptData.card_number|strlen %} + + {{ Payment.MetaData.ReceiptData.card_brand }} + {{ getDisplayableCardNumber(Payment.MetaData.ReceiptData.card_number) }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.processed_date|strlen %} + + Datum: + + {{ Payment.MetaData.ReceiptData.processed_date|correcttimezone|date(getDateTimeFormat()) }} + + + {% endif %} + + {% if Payment.MetaData.ReceiptData.entry_method|strlen %} + + Methode: + {{ Payment.MetaData.ReceiptData.entry_method }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.acceptorId|strlen %} + + MLC: + {{ Payment.MetaData.ReceiptData.extra_parameters.acceptorId }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.authorization_number|strlen %} + + Auth-code: + {{ Payment.MetaData.ReceiptData.authorization_number }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode|strlen or Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage|strlen %} + + Antwoord: + + {{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode }}/{{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage }} + + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_id|strlen %} + + Applicatie-ID: + {{ Payment.MetaData.ReceiptData.emv_application_id }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_preferred_name|strlen %} + + Voorkeursnaam applicatie: + {{ Payment.MetaData.ReceiptData.emv_application_preferred_name }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.accountType|strlen %} + + Accounttype: + {{ Payment.MetaData.ReceiptData.extra_parameters.accountType }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_cryptogram_type|strlen or Payment.MetaData.ReceiptData.emv_cryptogram|strlen %} + + Cryptogram: + {{ Payment.MetaData.ReceiptData.emv_cryptogram_type }} {{ Payment.MetaData.ReceiptData.emv_cryptogram }} + + {% endif %} + + {% for emvTag in Payment.MetaData.ReceiptData.extra_parameters.emv_tags.children() %} + + {{ emvTag.getName() }} + {{ emvTag }} + + {% endfor %} + + {# Creates a Line Break for the next Payment #} +
+ {% endif %} +{% endmacro %} + +{% macro single_transaction_details(Sale, Payment) %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Transactiedetails


+
+ + + {{ _self.transaction(Payment) }} + +
+
+ {% endif %} + {% endif %} +{% endmacro %} + +{% macro transaction_details(Sale) %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Transactiedetails


+
+ + + {% for Payment in Sale.SalePayments.SalePayment %} + {{ _self.transaction(Payment) }} + {% endfor %} + +
+
+ {% endif %} + {% endif %} +{% endmacro %} + {% macro cc_agreement(Sale,Payment,options) %} {% if Payment.MetaData.ReceiptData.requires_receipt_signature|CompBool == true %} {% if Sale.Shop.ReceiptSetup.creditcardAgree|strlen > 0 %} @@ -1171,10 +1517,6 @@ table.payments td.label { {% macro shop_workorder_agreement(Sale) %} {% if Sale.Shop.ReceiptSetup.workorderAgree|strlen > 0 and Sale.Workorders %} -

{{Sale.Shop.ReceiptSetup.workorderAgree|noteformat|raw}}

@@ -1245,14 +1587,19 @@ table.payments td.label { {% endfor %} {% endif %} - {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 and not logo_printed %} - - {% if show_shop_name_with_logo %} + {% if not logo_printed %} + {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 %} + + {% set logo_printed = true %} + {% endif %} + {% endif %} + + {% if Sale.Shop.name|strlen > 0 %} + {% if not logo_printed or options.show_shop_name_with_logo == true %}

{{ Sale.Shop.name }}

{% endif %} - {% else %} -

{{ Sale.Shop.name }}

{% endif %} +

{% if Sale.Shop.ReceiptSetup.header|strlen > 0 %}

{{Sale.Shop.ReceiptSetup.header|nl2br|raw}}

@@ -1386,37 +1733,37 @@ table.payments td.label { {% macro sale_cash_payment(Sale) %} {% set cashTotal = 0 %} {% set payCash = 'false' %} - {% for Payment in Sale.SalePayments.SalePayment %} - {% if Payment.PaymentType.code == 'Cash' %} - {% set cashTotal = cashTotal + Payment.amount|floatval %} - {% set payCash = 'true' %} - {% endif %} - {% endfor %} + {% for Payment in Sale.SalePayments.SalePayment %} + {% if Payment.PaymentType.code == 'Cash' %} + {% set cashTotal = cashTotal + Payment.amount|floatval %} + {% set payCash = 'true' %} + {% endif %} + {% endfor %} {% if payCash == 'true' %} {% set roundedCashChange = (((Sale.change|floatval) * 20) | round) / 20 %} {% set roundedCashAmount = (((cashTotal * 20)|round) / 20) %} {% set originalCashPayedTotalValue = Sale.change|floatval + cashTotal %} {% set roundedCashPayedTotalValue = roundedCashAmount + Sale.change|floatval %} - Contant betaald bedrag{{originalCashPayedTotalValue|money}} + Contant betaald bedrag{{originalCashPayedTotalValue|money}} {% if originalCashPayedTotalValue == roundedCashPayedTotalValue %} - Contant{{cashTotal|money}} - {% if (Sale.change|floatval) != roundedCashChange %} - Wisselgeld{{Sale.change|money}} - Wisselgeld afgerond {{roundedCashChange|money}} - {% else %} - Wisselgeld{{Sale.change|money}} - {% endif %} + Contant{{cashTotal|money}} + {% if (Sale.change|floatval) != roundedCashChange %} + Wisselgeld{{Sale.change|money}} + Wisselgeld afgerond {{roundedCashChange|money}} + {% else %} + Wisselgeld{{Sale.change|money}} + {% endif %} {% else %} - Contant{{cashTotal|money}} - Totaal contant afgerond {{roundedCashAmount|money}} - {% if (Sale.change|floatval) != roundedCashChange %} - Wisselgeld {{Sale.change|money}} - Wisselgeld afgerond {{roundedCashChange|money}} - {% else %} - Wisselgeld {{Sale.change|money}} - {% endif %} + Contant{{cashTotal|money}} + Totaal contant afgerond {{roundedCashAmount|money}} + {% if (Sale.change|floatval) != roundedCashChange %} + Wisselgeld {{Sale.change|money}} + Wisselgeld afgerond {{roundedCashChange|money}} + {% else %} + Wisselgeld {{Sale.change|money}} + {% endif %} {% endif %} - {% endif %} + {% endif %} {% endmacro %} {% macro show_note(SaleNotes) %} @@ -1426,7 +1773,7 @@ table.payments td.label {
- {{SaleNote.PrintedNote.note}} + {{SaleNote.PrintedNote.note}}
diff --git a/receipt/SaleReceipt_nl_NL.tpl b/receipt/SaleReceipt_nl_NL.tpl index 138693d..d0fa1ad 100644 --- a/receipt/SaleReceipt_nl_NL.tpl +++ b/receipt/SaleReceipt_nl_NL.tpl @@ -16,7 +16,7 @@ {% set hide_customer_vat_number = false %} {# Hide the Customer VAT Number on Sales #} {% set hide_customer_registration_number = false %} {# Hide the Customer Registration Number on Sales #} {% set sale_id_instead_of_ticket_number = true %} {# Displays the Sale ID instead of the Ticket Number #} -{% set invoice_as_title = false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} +{% set invoice_as_title = parameters.invoice_as_title == "true" ? true : false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} {% set workorders_as_title = false %} {# Changes the receipt title to "Work Orders" if there is no Salesline items and 1 or more workorders #} {% set quote_id_prefix = "" %} {# Adds a string of text as a prefix for the Quote ID. Ex: "Q-". To be used when "sale_id_instead_of_ticket_number" is true #} {% set sale_id_prefix = "" %} {# Adds a string of text as a prefix for the Sales ID. Ex: "S-". To be used when "sale_id_instead_of_ticket_number" is true #} @@ -118,6 +118,10 @@ h1 { text-align: center; } +h1.spacer { + margin-top: 2em; +} + p.date, p.copy { font-size: 9pt; margin: 0; @@ -207,12 +211,26 @@ table div.line_note { padding-left: 10px; } +table div.line_extra { + text-align: left; + padding-left: 10px; + font-size: .8em; +} + table div.line_serial { text-align: left; font-weight: normal; padding-left: 10px; } +table div.line_description_item_fee { + padding-left: 10px; +} + +.footerSectionTitle + table div.line_description_item_fee { + padding-left: 25px; +} + table.workorders div.line_description { font-weight: normal; padding-left: 10px; @@ -240,12 +258,54 @@ p.thankyou { .note { text-align: center; } - .barcodeContainer { margin-top: 15px; text-align: center; } +.remotePaymentLinkContainer { + text-align: center; + margin: 1.5em 0; +} + +span.payOnlineTitle { + display: block; + font-size: 0.8rem; + font-weight: bold; + margin: 2rem 0 0.25rem; + text-transform: uppercase; +} + +svg.payOnlineIcon { + height: 1rem; + margin-right: 0.25rem; + vertical-align: -0.2rem; + width: 1rem; +} + +.payButton { + background-color: #1844cc; + background-image: linear-gradient(#537dec, #2e61de); + border: 1px solid #1844cc; + border-radius: 0.1875rem; + box-shadow: rgba(255, 255, 255, 0.15) 0px 1px 0px 0px inset; + color: #fff; + display: inline-block; + font-size: 1rem; + font-weight: 500; + line-height: 2rem; + margin: 1.5em 0 0; + padding: 0.375rem 1.5rem; + text-align: center; + text-decoration: none; + width: 90%; +} + +.payButton:hover { + background-color: #2e61de; + background-image: linear-gradient(#2e61de, #2e61de); +} + .workorders .barcodeContainer { margin-left: 15px; text-align: left; @@ -289,6 +349,24 @@ table.payments td.label { width: 100%; } +#receiptTransactionDetails table { + max-width: 245px; + margin: 0 auto; +} + +#receiptTransactionDetails table td { + text-align: right; +} + +#receiptTransactionDetails table td.top { + font-weight: bold; +} + +#receiptTransactionDetails table td.label { + padding-right: 20px; + text-align: left; +} + {% if print_layout %} /* Receipts only */ @@ -575,6 +653,10 @@ table.payments td.label { {{ _self.client_workorder_agreement(Sale,_context) }} + {% if parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} + {% endif %} + {% if not parameters.gift_receipt %} {{ _self.no_tax_applied_text(Sale) }}

@@ -585,9 +667,21 @@ table.payments td.label { {% endif %} {% if show_barcode %} -

- -

+

+ +

+ {% endif %} + + {% if Sale.completed == 'true' and Sale.SalePayments and not parameters.gift_receipt %} + {# + DO NOT CONSOLIDATE THESE IF STATEMENTS. + Twig doesnt play nice with these functions. + #} + {{ _self.transaction_details(Sale) }} + {% endif %} + + {% if not parameters.email %} + {{ _self.remoteDepositLink(Sale,parameters) }} {% endif %}
@@ -612,7 +706,7 @@ table.payments td.label { {% macro store_receipt(Sale,parameters,options,Payment) %}
- {{ _self.header(Sale,options) }} + {{ _self.header(Sale,options) }} {{ _self.title(Sale,parameters,options) }}

Winkelbon

{{ _self.date(Sale) }} @@ -621,10 +715,14 @@ table.payments td.label { {% if options.show_sale_lines_on_store_copy %} {{ _self.receipt(Sale,parameters,true,options) }} {% else %} -

Betalingen

- - {{ _self.cc_payment_info(Sale,Payment) }} -
+ {% if isUnifiedReceipt(Sale.SalePayments) %} + {{ _self.single_transaction_details(Sale, Payment) }} + {% else %} +

Betalingen

+ + {{ _self.cc_payment_info(Sale,Payment) }} +
+ {% endif %} {% endif %} {% if Sale.quoteID and Sale.Quote.notes|strlen > 0 %}

{{Sale.Quote.notes|noteformat|raw}}

{% endif %} @@ -645,6 +743,10 @@ table.payments td.label {
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
+ {% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %} +
+ {{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %} +
{% endif %} {% if Line.Note %}
@@ -681,6 +783,8 @@ table.payments td.label { {% endif %} {% if options.workorders_as_title and Sale.SaleLines is empty and Sale.Customer.Workorders is defined %} Werkorders + {% elseif Sale.SaleLines is empty and Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + Aanbetalingsverzoek op afstand {% else %} {% if parameters.gift_receipt %}Cadeaubon{% else %}Kassabon{% endif %} {% endif %} @@ -744,9 +848,9 @@ table.payments td.label { {% if options.quote_to_invoice %} - Factuurnr #: + Factuurnr #: {% else %} - Offertenr.: + Offertenr.: {% endif %} {{options.quote_id_prefix}}{{Sale.quoteID}} @@ -797,7 +901,7 @@ table.payments td.label { {% endif %} {% if Sale.Customer %} - {% if Sale.Customer.company|strlen > 0 %} + {% if Sale.Customer.company|strlen > 0 and not options.show_customer_name_only %} Bedrijf: {{Sale.Customer.company}}
{% endif %} @@ -855,6 +959,12 @@ table.payments td.label { {{ _self.lineDescription(Line,options) }} + {% if options.show_custom_sku and Line.Item.customSku|strlen > 0 %} +
Aangepaste artikelnummer: {{ Line.Item.customSku }}
+ {% endif %} + {% if options.show_manufacturer_sku and Line.Item.manufacturerSku|strlen > 0 %} +
Artikelnummer fabr.: {{ Line.Item.manufacturerSku }}
+ {% endif %} {% if options.per_line_discount == true and not parameters.gift_receipt %} {% if Line.calcLineDiscount > 0 %} Korting: '{{ Line.Discount.name }}' -{{Line.calcLineDiscount|money}} @@ -864,13 +974,6 @@ table.payments td.label { {% endif %} - {% if options.show_custom_sku and Line.Item.customSku %} - {{ Line.Item.customSku }} - {% endif %} - {% if options.show_manufacturer_sku and Line.Item.manufacturerSku %} - {{ Line.Item.manufacturerSku }} - {% endif %} - {% if options.show_msrp == true and not parameters.gift_receipt %} {% set msrp_printed = false %} {% for price in Line.Item.Prices.ItemPrice if not msrp_printed %} @@ -886,7 +989,7 @@ table.payments td.label { {% if options.per_line_subtotal and options.discounted_line_items and Line.calcLineDiscount != 0 and not parameters.gift_receipt %} - {{Line.unitQuantity}} x {{Line.displayableUnitPrice|money}} + {{Line.unitQuantity}} x {{Line.unitPrice|money}} {% endif %} {{Line.unitQuantity}} {% if options.per_line_subtotal and not parameters.gift_receipt %} x @@ -904,7 +1007,7 @@ table.payments td.label { {% if not isTaxInclusive or isTaxInclusive == 'false' %} {{ Line.calcSubtotal|money }}
{% else %} - {{ multiply(Line.displayableUnitPrice, Line.unitQuantity)|money }}
+ {{ multiply(Line.unitPrice, Line.unitQuantity)|money }}
{% endif %} {% endif %} {{ Line.displayableSubtotal|money }} @@ -919,13 +1022,6 @@ table.payments td.label { Product - {% if options.show_custom_sku and options.show_manufacturer_sku %} - Aangepaste artikelnummer - Artikelnummer fabr. - {% elseif options.show_custom_sku or options.show_manufacturer_sku %} - Artikelnummer - {% endif %} - {% if options.show_msrp and not parameters.gift_receipt %} Adviesprijs {% endif %} @@ -946,19 +1042,30 @@ table.payments td.label { {% if not parameters.gift_receipt %} + {% if Sale.MetaData.itemFeesSubtotal %} + + {% endif %} @@ -977,9 +1084,9 @@ table.payments td.label { {% endfor %} - {% if Sale.tipEnabled == 'true' %} - - {% endif %} + {% if Sale.tipEnabled == 'true' %} + + {% endif %}
Totaal kosten{{Sale.MetaData.itemFeesSubtotal|money}}
{% if options.discounted_line_items and Sale.calcDiscount != 0 %} - Subtotaal + kortingen + Subtotaal + kortingen {% else %} - Subtotaal + Subtotaal {% endif %} {% if options.discounted_line_items %} - {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money}} + {% if options.Sale.isTaxInclusive == 'true'%} + {{ subtract(Sale.calcSubtotal, Sale.calcDiscount)|money }} + {% else %} + {{ subtract(Sale.displayableSubtotal, Sale.calcDiscount)|money }} + {% endif %} {% else %} - {{Sale.displayableSubtotal|money}} + {% if options.Sale.isTaxInclusive == 'true'%} + {{ Sale.calcSubtotal|money }} + {% else %} + {{ Sale.displayableSubtotal|money }} + {% endif %} {% endif %}
Totaal belasting{{Sale.taxTotal|money}}
Totaal{{Sale.calcTotal|money}}
Fooi{{Sale.calcTips|money}}
Fooi{{Sale.calcTips|money}}
{% endif %} @@ -994,10 +1101,10 @@ table.payments td.label { {% if Payment.PaymentType.name != 'Cash' %} {% if Payment.CreditAccount.giftCard == 'true' %} - + {% if Payment.amount > 0 %} - Afgeschreven van cadeaubon + Afgeschreven van cadeaubon {{Payment.CreditAccount.code}} {{Payment.amount|money}} @@ -1013,7 +1120,7 @@ table.payments td.label { Saldo {{Payment.CreditAccount.balance|getinverse|money}} - {% elseif Payment.amount < 0 and Sale.calcTotal >= 0 %} + {% elseif Payment.amount < 0 and Payment.archived != 'true' and Sale.calcTotal >= 0 %} Aankoop cadeaubon {{Payment.amount|getinverse|money}} @@ -1024,17 +1131,17 @@ table.payments td.label { {% endif %} {% elseif Payment.creditAccountID == 0 %} - + {{ _self.cc_payment_info(Sale,Payment) }} - {% elseif Payment.CreditAccount %} + {% elseif Payment.CreditAccount and Payment.archived == 'false' %} {% if Payment.amount < 0 %} - Aanbetaling op rekening - {{Payment.amount|getinverse|money}} + Aanbetaling op rekening + {{Payment.amount|getinverse|money}} {% else %} - Betalen op rekening - {{Payment.amount|money}} + Betalen op rekening + {{Payment.amount|money}} {% endif %} {% endif %} @@ -1059,18 +1166,18 @@ table.payments td.label { {% endif %} {% if options.show_customer_credit_account and Sale.Customer and not parameters.gift_receipt and not store_copy %} - {% if Sale.Customer.CreditAccount and Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 or Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %}

Op rekening

{% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwed > 0 %} - + {% elseif Sale.Customer.CreditAccount.MetaData.extraDeposit > 0 %} - + {% endif %}
Verschuldigd saldo: {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}{{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwed|money }}
Aanbetaling op rekening: {{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}{{ Sale.Customer.CreditAccount.MetaData.extraDeposit|money }}
@@ -1079,17 +1186,102 @@ table.payments td.label { - +
Resterend bedrag: {{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}{{ Sale.Customer.MetaData.getAmountToCompleteAll|money }}
{% endif %} {% endif %} + {% if Sale.Customer.CreditAccount %} + {% for Payment in Sale.SalePayments.SalePayment %} + {% if Payment.PaymentType.name == 'Credit Account' and options.show_credit_account_signature %} +
+
Signature:
+
+ {{Sale.Customer.title}} {{Sale.Customer.firstName}} {{Sale.Customer.lastName}}
+
+
+ {% endif %} + {% endfor %} + {% endif %} + + {{ _self.remoteDepositSummary(Sale,parameters) }} {% endif %} {% if (not parameters.gift_receipt and not options.hide_notes_in_sale_receipt) or (parameters.gift_receipt and not options.hide_notes_in_gift_receipt) %} {{ _self.show_note(Sale.SaleNotes) }} {% endif %} {% endmacro %} +{% macro remoteDepositLink(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remotePaymentLinkUrl %} + {% if parameters.email %} + + {% else %} + + {% endif %} + {% endif %} +{% endmacro %} + +{% macro remoteDepositSummary(Sale,parameters) %} + {% if Sale.Customer.CreditAccount.MetaData.remoteDepositAmount %} + {% if Sale.SaleLines is not empty %} +

+ Aanbetalingsverzoek op afstand +

+ {{ _self.date(Sale) }} + {% endif %} +

Verzochte betaling

+ + + + + + + +
Aanbetaling rekening: {{ Sale.Customer.CreditAccount.MetaData.remoteDepositAmount|money }}
+ {% endif %} + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 or Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} +

Rekening winkel (na betaling)

+ + + {% if Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment > 0 %} + + + + + {% elseif Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment > 0 %} + + + + + {% endif %} + +
Openstaand bedrag (na betaling): {{ Sale.Customer.CreditAccount.MetaData.creditBalanceOwedAfterPayment|money }}
In aanbetaling (na betaling): {{ Sale.Customer.CreditAccount.MetaData.extraDepositAfterPayment|money }}
+ {% endif %} + {% if Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment > 0 %} + + + + + +
Resterend openstaand bedrag (na betaling): {{ Sale.Customer.MetaData.getAmountToCompleteAllAfterPayment|money }}
+ {% endif %} +{% endmacro %} + {% macro cc_payment_info(Sale,Payment) %} {% if Payment.archived == 'false' %} @@ -1127,7 +1319,15 @@ table.payments td.label { {{Payment.amount|money}} {% elseif Payment.ccChargeID == 0 %} - {{ Payment.PaymentType.name }} + {% if Payment.PaymentType.name == 'Credit Card' %} + Creditcard + {% elseif Payment.PaymentType.name == 'Debit Card' %} + Betaalkaart + {% elseif Payment.PaymentType.name == 'Check' %} + Cheque + {% else %} + {{Payment.PaymentType.name}} + {% endif %} {{Payment.amount|money}} {% endif %} @@ -1135,6 +1335,148 @@ table.payments td.label { {% endmacro %} +{% macro transaction(Payment) %} + {% if Payment.PaymentType.type == 'credit card' and Payment.MetaData.ReceiptData.status != 'error' and Payment.archived == 'false' %} + {% if Payment.MetaData.ReceiptData.type|strlen and Payment.MetaData.ReceiptData.authorized_amount|strlen %} + + {% if Payment.MetaData.ReceiptData.type == 'sale' %} + Verkoop + {% else %} + {{ mostranslate(Payment.MetaData.ReceiptData.type, 'capitalize', true) }} + {%endif%} + {{ Payment.MetaData.ReceiptData.authorized_amount|money }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode|strlen %} + + Status: + + {% if Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Approved' %} + Goedgekeurd + {% elseif Payment.MetaData.ReceiptData.extra_parameters.statusCode == 'Declined' %} + Geweigerd + {% else %} + {{ Payment.MetaData.ReceiptData.extra_parameters.statusCode }} + {%endif%} + + + {% endif %} + + {% if Payment.MetaData.ReceiptData.card_brand|strlen and Payment.MetaData.ReceiptData.card_number|strlen %} + + {{ Payment.MetaData.ReceiptData.card_brand }} + {{ getDisplayableCardNumber(Payment.MetaData.ReceiptData.card_number) }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.processed_date|strlen %} + + Datum: + {{ Payment.MetaData.ReceiptData.processed_date|correcttimezone|date(getDateTimeFormat()) }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.entry_method|strlen %} + + Methode: + {{ Payment.MetaData.ReceiptData.entry_method }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.acceptorId|strlen %} + + MLC: + {{ Payment.MetaData.ReceiptData.extra_parameters.acceptorId }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.authorization_number|strlen %} + + Auth-code: + {{ Payment.MetaData.ReceiptData.authorization_number }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode|strlen or Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage|strlen %} + + Antwoord: + {{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkCode }}/{{ Payment.MetaData.ReceiptData.extra_parameters.authorizationNetworkMessage }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_id|strlen %} + + Applicatie-ID: + {{ Payment.MetaData.ReceiptData.emv_application_id }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_application_preferred_name|strlen %} + + APN: + {{ Payment.MetaData.ReceiptData.emv_application_preferred_name }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.extra_parameters.accountType|strlen %} + + Accounttype: + {{ Payment.MetaData.ReceiptData.extra_parameters.accountType }} + + {% endif %} + + {% if Payment.MetaData.ReceiptData.emv_cryptogram_type|strlen or Payment.MetaData.ReceiptData.emv_cryptogram|strlen %} + + Cryptogram: + {{ Payment.MetaData.ReceiptData.emv_cryptogram_type }} {{ Payment.MetaData.ReceiptData.emv_cryptogram }} + + {% endif %} + + {% for emvTag in Payment.MetaData.ReceiptData.extra_parameters.emv_tags.children() %} + + {{ emvTag.getName() }} + {{ emvTag }} + + {% endfor %} + + {# Creates a Line Break for the next Payment #} +
+ {% endif %} +{% endmacro %} + +{% macro single_transaction_details(Sale, Payment) %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Transactiedetails


+
+ + + {{ _self.transaction(Payment) }} + +
+
+ {% endif %} + {% endif %} +{% endmacro %} + +{% macro transaction_details(Sale) %} + {% if hasCCPayment(Sale.SalePayments) %} + {% if isUnifiedReceipt(Sale.SalePayments) %} +

Transactiedetails


+
+ + + {% for Payment in Sale.SalePayments.SalePayment %} + {{ _self.transaction(Payment) }} + {% endfor %} + +
+
+ {% endif %} + {% endif %} +{% endmacro %} + {% macro cc_agreement(Sale,Payment,options) %} {% if Payment.MetaData.ReceiptData.requires_receipt_signature|CompBool == true %} {% if Sale.Shop.ReceiptSetup.creditcardAgree|strlen > 0 %} @@ -1151,10 +1493,6 @@ table.payments td.label { {% macro shop_workorder_agreement(Sale) %} {% if Sale.Shop.ReceiptSetup.workorderAgree|strlen > 0 and Sale.Workorders %} -

{{Sale.Shop.ReceiptSetup.workorderAgree|noteformat|raw}}

@@ -1225,14 +1563,19 @@ table.payments td.label { {% endfor %} {% endif %} - {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 and not logo_printed %} - - {% if show_shop_name_with_logo %} + {% if not logo_printed %} + {% if Sale.Shop.ReceiptSetup.logo|strlen > 0 %} + + {% set logo_printed = true %} + {% endif %} + {% endif %} + + {% if Sale.Shop.name|strlen > 0 %} + {% if not logo_printed or options.show_shop_name_with_logo == true %}

{{ Sale.Shop.name }}

{% endif %} - {% else %} -

{{ Sale.Shop.name }}

{% endif %} +

{% if Sale.Shop.ReceiptSetup.header|strlen > 0 %}

{{Sale.Shop.ReceiptSetup.header|nl2br|raw}}

@@ -1385,7 +1728,7 @@ table.payments td.label {
- {{SaleNote.PrintedNote.note}} + {{SaleNote.PrintedNote.note}}
diff --git a/vendor_return/VendorReturnPackingSlip.tpl b/vendor_return/VendorReturnPackingSlip.tpl new file mode 100644 index 0000000..2ec634c --- /dev/null +++ b/vendor_return/VendorReturnPackingSlip.tpl @@ -0,0 +1,346 @@ +{% extends parameters.print ? "printbase" : "base" %} +{% block extrastyles %} +/*! normalize.css v2.0.1 | MIT License | git.io/normalize */ +header { display: block } + +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +body { margin: 0 } + +b, +strong { font-weight: bold } + +small { font-size: 80% } + +table { + border-collapse: collapse; + border-spacing: 0; +} + +* { box-sizing: border-box } + +@media print { + html, + body { font-size: 75% } +} + +@media screen { + .document html, + body { margin: 1rem } +} + +body { font-family: "Open Sans", Helvetica, Arial, Verdana, sans-serif } + +h2, +h3, +h4, +h5, +h6 { + font-weight: 400; + color: #000; + margin: .5em 0 .25em; +} + +h3, +h4, +h5, +h6 { + font-weight: 600; +} + +h2 small { + font-weight: 400; + font-size: 75%; + color: #666; +} + +h5, +h6 { color: #444 } + +h2 { font-size: 2rem } + +h3 { font-size: 1.5rem } + +h4 { font-size: 1.25rem } + +h5 { font-size: 1rem; } + +h6 { + font-size: .875rem; + text-transform: uppercase; +} + +p { font-size: 1rem } + +p.xs { font-size: .75rem } + +p.s { font-size: .875rem } + +.row { overflow: hidden } + +@media (min-width: 480px) { + .col-md-6 { width: 50% } +} + +@media (min-width: 480px) { + .col-md-6 { float: left } + + .col-spacerL-md6 { margin-left: 50% } +} + +table.document { width: 100% } + +table.document td, +table.document th { + padding: .375rem; + vertical-align: top; +} + +table.document th { + text-align: left; + text-transform: uppercase; +} + +table.document td.money { text-align: right } + +table.document td.money:before { margin-right: .125rem; } + +table.document thead { + border-bottom: 1px solid #666; + border-top: 1px solid #666; +} + +table.document thead th { + padding-top: .25rem; + padding-bottom: .25rem; + background-color: #f8f8f8; + font-size: .75rem; + line-height: 1.5; +} + +table.document tbody td { border: 1px solid #666 } + +table.document tbody td.money { + position: relative; + padding-left: .5rem; +} + +table.document tbody td.money:before { + position: absolute; + left: .5rem; +} + +table.document tfoot { + border-top: 4px solid #444; + font-weight: bold; +} + +table.document tfoot td { + font-weight: bold; +} + +table.document tfoot .total { + font-size: 1.125rem; +} +table.document tfoot .leading-row-gap td, +table.document tfoot .leading-row-gap th { + padding-top: 15px; +} +table.document tfoot .minor td, +table.document tfoot .minor th { + font-weight: normal; + line-height: 1; + text-transform: none; +} + +* { box-sizing: border-box } + +.u-margin-An { margin: 0 } + +.u-margin-Tn { margin-top: 0 } + +.u-margin-Bxl { margin-bottom: 30px } + +.u-margin-Vn { + margin-top: 0; + margin-bottom: 0; +} + +.u-margin-Vxxs { + margin-top: 4px; + margin-bottom: 4px; +} + +html { height: 100% } +{% endblock extrastyles %} + +{% block content %} +{% for VendorReturn in VendorReturns %} +
+

+ Return to Vendor #{{ VendorReturn.vendorReturnID }} +

+ {% if VendorReturn.sentDate %} +
Date Sent: {{ VendorReturn.sentDate|date('Y-m-d', false) }}
+ {% endif %} + {% if VendorReturn.refNum|strlen > 0 %} +
Reference# {{ VendorReturn.refNum }}
+ {% endif %} +
+ +
+
+
From
+

{{ VendorReturn.Shop.name }}

+ {% for ContactAddress in VendorReturn.Shop.Contact.Addresses.ContactAddress %} +

+ {{ ContactAddress|address|raw }} + {% endfor %} + {% if VendorReturn.Shop.Contact.Phones.ContactPhone.number %} +

+ {{ VendorReturn.Shop.Contact.Phones|phonelist|raw}} +

+ {% endif %} +
+ {% if VendorReturn.Vendor %} +
+
Vendor
+

{{ VendorReturn.Vendor.name }}

+

+ {% for VendorRep in VendorReturn.Vendor.Reps.VendorRep %} + ATTN: {{ VendorRep.firstName }} + {{ VendorRep.lastName }} + {% if not loop.last %}
{% endif %} + {% endfor %} + + {% if VendorReturn.Vendor.accountNumber|strlen > 0 %} + Account # {{ VendorReturn.Vendor.accountNumber }} + {% endif %} +

+ {% for ContactAddress in VendorReturn.Vendor.Contact.Addresses.ContactAddress %} +

+ {{ ContactAddress|address|raw }} +

+ {% endfor %} + {% if VendorReturn.Vendor.Contact.Phones.ContactPhone.number %} +

+ {{ VendorReturn.Vendor.Contact.Phones|phonelist|raw}} +

+ {% endif %} +
+ {% endif %} +
+

Details

+ + + + + + + + + {% if view_cost == true %} + + + {% endif %} + + + {% for VendorReturnItem in VendorReturn.VendorReturnItems.VendorReturnItem %} + {{ _self.vendorReturnItemRow(VendorReturn, VendorReturnItem, view_cost) }} + {% endfor %} + {{ _self.totals(VendorReturn, view_cost) }} +
Vendor IDQtyDescriptionPOReasonUnit CostTotal
+ +{% if VendorReturn.Note.note|strlen > 0 %} +

Notes

+

{{ VendorReturn.Note.note|noteformat|raw }}

+{% endif %} + +{% endfor %} +{% endblock content %} + +{% macro vendorReturnItemRow(VendorReturn, VendorReturnItem, view_cost) %} + {% set line_total = (VendorReturnItem.cost|floatval * + VendorReturnItem.quantity) %} + + + {% for ItemVendorNum in VendorReturnItem.Item.ItemVendorNums.ItemVendorNum %} + {% if (VendorReturn.vendorID|number_format) == (ItemVendorNum.vendorID|number_format) %} + {{ ItemVendorNum.value }} + {% endif %} + {% endfor %} + + {{ VendorReturnItem.quantity}} + {{ VendorReturnItem.Item.description }} + + {% if VendorReturnItem.orderID == '0' %} + N/A + {% else %} + {{ VendorReturnItem.orderID}} + {% endif %} + + {{ VendorReturnItem.VendorReturnItemReason.reason }} + {% if view_cost == true %} + {{ VendorReturnItem.cost|money }} + {{ line_total|money }} + {% endif %} + +{% endmacro %} + +{% macro totals(VendorReturn, view_cost) %} + {% set total_quantity = 0|intval %} + {% for VendorReturnItem in VendorReturn.VendorReturnItems.VendorReturnItem %} + {% set total_quantity = total_quantity + VendorReturnItem.quantity|intval %} + {% endfor %} + + + {% if view_cost == true %} + + Subtotal + {{ total_quantity }} + + + + + {{ VendorReturn.subtotal|money }} + + {% endif %} + {% if VendorReturn.shipCost > 0 %} + + Shipping + + + + + + {{ VendorReturn.shipCost|money }} + + {% endif %} + {% if VendorReturn.otherCost != 0 %} + + Other (+/-) + + + + + + {{ VendorReturn.otherCost|money }} + + {% endif %} + {% if view_cost == true %} + + Totals + + + + + + {{ VendorReturn.total|money }} + + {% endif %} + +{% endmacro %} diff --git a/workorder/customizable_workorder.tpl b/workorder/customizable_workorder.tpl index 80f7371..d718805 100644 --- a/workorder/customizable_workorder.tpl +++ b/workorder/customizable_workorder.tpl @@ -3,32 +3,32 @@ Set any of the options in this section from 'false' to 'true' in order to enable them in the template #} -{% set chrome_right_margin_fix = false %} {# Fixes a potential issue where the right side of receipts are cut off in Chrome #} -{% set firefox_margin_fix = false %} {# Fixes issue with margins cutting off when printing on a letter printer on a Mac #} +{% set chrome_right_margin_fix = false %} {# Fixes a potential issue where the right side of receipts are cut off in Chrome #} +{% set firefox_margin_fix = false %} {# Fixes issue with margins cutting off when printing on a letter printer on a Mac #} -{% set itemized_hours_labor = false %} {# Shows time spent on Labor item if time spent is present in the charge #} -{% set per_line_subtotal = false %} {# Displays Subtotals for each Sale Line (ex. 1 x $5.00) #} +{% set itemized_hours_labor = false %} {# Shows time spent on Labor item if time spent is present in the charge #} +{% set per_line_subtotal = false %} {# Displays Subtotals for each Sale Line (ex. 1 x $5.00) #} {% set employee_name_on_labor_charges = false %} {# Display Employee name on Labor Charges #} {% set make_work_order_number_small = false %} {# Makes work order number inline with the header #} -{% set remove_logo = false %} {# Removes logo from receipt #} +{% set remove_logo = false %} {# Removes logo from receipt #} -{% set tag_header_information = false %} {# Shows shop header information on Tags #} -{% set notes_on_tag_only = false %} {# Displays notes on tags only (these will still show up in the Sales screen when ringing out the Work Order) #} +{% set tag_header_information = false %} {# Shows shop header information on Tags #} +{% set notes_on_tag_only = false %} {# Displays notes on tags only (these will still show up in the Sales screen when ringing out the Work Order) #} -{% set hide_work_order_item = false %} {# Removes the Start and end date from receipts #} -{% set hide_status = false %} {# Removes the Status receipts #} -{% set hide_warranty = false %} {# Removes warranty line from receipts #} -{% set hide_start_and_date = false %} {# Removes the Start and end date from receipts #} +{% set hide_work_order_item = false %} {# Removes the Start and end date from receipts #} +{% set hide_status = false %} {# Removes the Status receipts #} +{% set hide_warranty = false %} {# Removes warranty line from receipts #} +{% set hide_start_and_date = false %} {# Removes the Start and end date from receipts #} -{% set hide_employee = false %} {# Removes the the employee from the Work order header #} -{% set hide_Work_Order_Agreement = false %} {# Removes the the employee from the Work order header #} +{% set hide_employee = false %} {# Removes the the employee from the Work order header #} +{% set hide_Work_Order_Agreement = false %} {# Removes the the employee from the Work order header #} -{% set hide_barcode = false %} {# Removes barcode from bottom of receipts #} -{% set hide_barcode_sku = false %} {# Remove the System ID from displaying at the bottom of barcdoes #} +{% set hide_barcode = false %} {# Removes barcode from bottom of receipts #} +{% set hide_barcode_sku = false %} {# Remove the System ID from displaying at the bottom of barcdoes #} -{% set logo_width = '225px' %} {# Default width is 225px. A smaller number will scale logo down #} -{% set multi_shop_logos = false %} {# Allows multiple logos to be added for separate locations when used with options below #} +{% set logo_width = '225px' %} {# Default width is 225px. A smaller number will scale logo down #} +{% set multi_shop_logos = false %} {# Allows multiple logos to be added for separate locations when used with options below #} {% set minimal_mode = false %} @@ -160,6 +160,12 @@ table td.description { width: 100%; } + +table td.item_fee_line_name { + text-align: left; + padding-left: 10px; +} + table .description small { font-weight: normal; } @@ -356,15 +362,19 @@ img.barcode { Price {% for WorkorderItem in Workorder.WorkorderItems.WorkorderItem %} + {% if WorkorderItem.itemFeeID == 0 %} {% if WorkorderItem.isSpecialOrder == 'false' %} {{ _self.line(WorkorderItem, parameters, _context) }} {% else %} {% set specialorder = true %} {% endif %} + {% endif %} {% endfor %} {% for WorkorderLine in Workorder.WorkorderLines.WorkorderLine %} - {{ _self.line(WorkorderLine, parameters, _context) }} + {% if WorkorderLine.itemFeeID == 0 %} + {{ _self.line(WorkorderLine, parameters, _context) }} + {% endif %} {% endfor %} {% if specialorder == true %} @@ -406,6 +416,15 @@ img.barcode { {% endif %} + {% if Workorder.MetaData.itemFeesSubtotal %} + + Fee total + + {{Workorder.MetaData.itemFeesSubtotal|money}} + + + {% endif %} + Tax @@ -514,12 +533,25 @@ img.barcode { {% endif %} {% if Line.warranty == 'false' %} - {{Line.SaleLine.calcSubtotal|money}} + {{Line.SaleLine.displayableSubtotal|money}} {% elseif Line.warranty == 'true' %} - $0.00 + $0.00 {% endif %} + {% for WorkorderSaleLine in Line.SaleLine %} + {% if WorkorderSaleLine.itemFeeID != 0 and (WorkorderSaleLine.lineType == 'item_fee' or WorkorderSaleLine.lineType == 'item_fee_refund') %} + + +
+ {% autoescape true %}{{ WorkorderSaleLine.ItemFee.name|nl2br }}{% endautoescape %} +
+ + {{ WorkorderSaleLine.unitQuantity }} + {{ WorkorderSaleLine.ItemFee.feeValue|money }} + + {% endif %} + {% endfor %} {% endmacro %} {% macro lineDescription(Line,options) %} diff --git a/workorder/customizable_workorder_QC.tpl b/workorder/customizable_workorder_QC.tpl index 6138a79..73132d7 100644 --- a/workorder/customizable_workorder_QC.tpl +++ b/workorder/customizable_workorder_QC.tpl @@ -155,6 +155,11 @@ table td.description { width: 100%; } +table td.item_fee_line_name { + text-align: left; + padding-left: 10px; +} + table .description small { font-weight: normal; } @@ -352,15 +357,19 @@ img.barcode { Prix {% for WorkorderItem in Workorder.WorkorderItems.WorkorderItem %} - {% if WorkorderItem.isSpecialOrder == 'false' %} - {{ _self.line(WorkorderItem, parameters, _context) }} - {% else %} - {% set specialorder = true %} + {% if WorkorderItem.itemFeeID == 0 %} + {% if WorkorderItem.isSpecialOrder == 'false' %} + {{ _self.line(WorkorderItem, parameters, _context) }} + {% else %} + {% set specialorder = true %} + {% endif %} {% endif %} {% endfor %} {% for WorkorderLine in Workorder.WorkorderLines.WorkorderLine %} - {{ _self.line(WorkorderLine, parameters, _context) }} + {% if WorkorderLine.itemFeeID == 0 %} + {{ _self.line(WorkorderLine, parameters, _context) }} + {% endif %} {% endfor %} {% if specialorder == true %} @@ -402,6 +411,15 @@ img.barcode { {% endif %} + {% if Workorder.MetaData.itemFeesSubtotal %} + + Total des frais + + {{Workorder.MetaData.itemFeesSubtotal|money}} + + + {% endif %} + Total des taxes @@ -501,12 +519,25 @@ img.barcode { {% endif %} {% if Line.warranty == 'false' %} - {{Line.SaleLine.calcSubtotal|money}} + {{Line.SaleLine.displayableSubtotal|money}} {% elseif Line.warranty == 'true' %} $0.00 {% endif %} + {% for WorkorderSaleLine in Line.SaleLine %} + {% if WorkorderSaleLine.itemFeeID != 0 and (WorkorderSaleLine.lineType == 'item_fee' or WorkorderSaleLine.lineType == 'item_fee_refund') %} + + +
+ {% autoescape true %}{{ WorkorderSaleLine.ItemFee.name|nl2br }}{% endautoescape %} +
+ + {{ WorkorderSaleLine.unitQuantity }} + {{ WorkorderSaleLine.ItemFee.feeValue|money }} + + {% endif %} + {% endfor %} {% endmacro %} {% macro lineDescription(Line,options) %} diff --git a/workorder/customizable_workorder_de.tpl b/workorder/customizable_workorder_de.tpl new file mode 100644 index 0000000..cf2c3ba --- /dev/null +++ b/workorder/customizable_workorder_de.tpl @@ -0,0 +1,581 @@ +{# + ***Begin Custom Options*** +Set any of the options in this section from 'false' to 'true' in order to enable them in the template +#} + +{% set chrome_right_margin_fix = false %} {# Fixes a potential issue where the right side of receipts are cut off in Chrome #} +{% set firefox_margin_fix = false %} {# Fixes issue with margins cutting off when printing on a letter printer on a Mac #} + +{% set itemized_hours_labor = false %} {# Shows time spent on Labor item if time spent is present in the charge #} +{% set per_line_subtotal = false %} {# Displays Subtotals for each Sale Line (ex. 1 x $5.00) #} +{% set employee_name_on_labor_charges = false %} {# Display Employee name on Labor Charges #} +{% set make_work_order_number_small = false %} {# Makes work order number inline with the header #} +{% set remove_logo = false %} {# Removes logo from receipt #} + +{% set tag_header_information = false %} {# Shows shop header information on Tags #} +{% set notes_on_tag_only = false %} {# Displays notes on tags only (these will still show up in the Sales screen when ringing out the Work Order) #} + +{% set hide_work_order_item = false %} {# Removes the Start and end date from receipts #} +{% set hide_status = false %} {# Removes the Status receipts #} +{% set hide_warranty = false %} {# Removes warranty line from receipts #} +{% set hide_start_and_date = false %} {# Removes the Start and end date from receipts #} + +{% set hide_employee = false %} {# Removes the the employee from the Work order header #} +{% set hide_Work_Order_Agreement = false %} {# Removes the the employee from the Work order header #} + + +{% set hide_barcode = false %} {# Removes barcode from bottom of receipts #} +{% set hide_barcode_sku = false %} {# Remove the System ID from displaying at the bottom of barcdoes #} + +{% set logo_width = '225px' %} {# Default width is 225px. A smaller number will scale logo down #} +{% set multi_shop_logos = false %} {# Allows multiple logos to be added for separate locations when used with options below #} + +{% set minimal_mode = false %} + +{# + Use the following shop_logo_array to enter all of your locations and the link to the logo image that you have uploaded to the internet. + Enter your EXACT shop name (Case Sensitive!) in the Quotes after the "name": entry and then enter the URL to your logo after the "logo": entry. + Be sure to set the multi_shop_logos setting above to true in order to have these logos take effect! +#} + +{% set shop_logo_array = + { + 0:{"name":"Example Shop", "logo_url":"http://logo.url.goes/here.jpg"}, + 1:{"name":"", "logo_url":""}, + 2:{"name":"", "logo_url":""}, + 3:{"name":"", "logo_url":""}, + 4:{"name":"", "logo_url":""}, + 5:{"name":"", "logo_url":""} + } +%} + +{# + ***End Custom Options*** +#} + + +{% extends parameters.print ? "printbase" : "base" %} +{% block extrastyles %} + + +@page { margin: 0px; } + +body { + font: normal 10pt 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin: 0; + {% if chrome_right_margin_fix == true %} + margin-right: .13in; + {% endif %} + {% if firefox_margin_fix == true %} + margin: 25px; + {% endif %} + padding: 1px; +} + +.workorder { + margin: 0px; + font: normal 10pt 'Helvetica Neue',Helvetica,Arial,sans-serif; +} + +.header { + text-align: center; + {% if minimal_mode == false %} + margin-bottom: 30px; + {% else %} + margin-bottom: 10px; + {% endif %} +} + +.header p { + margin: 0; +} + +.header h1 { + text-align: center; + font-size: 12pt; + margin-bottom: 0; +} + +.header h3 { + font-size: 10pt; + margin: 0; +} + +.header h1 strong { + border: 3px solid black; + font-size: 24pt; + padding: 10px; +} + +.header img { + display: block; + margin: 8px auto 4px; +} + +.detail { + margin-bottom: 1em; +} + +.detail h2, .detail h3 { + margin: 0px 0px 10px 0px; + padding: 0px; + {% if minimal_mode == false %} + font-size: 11pt; + {% else %} + font-size: 10pt; + {% endif %} +} + +.detail p { + margin: 0; +} + +.workOrderItem { + font-size: 15px; + font-weight: bold; +} + +table { + width: 100%; + border-collapse:collapse; + text-align: right; +} + +table th { + border-bottom: 1px solid #000; +} + +table th.specialorder { + padding-top: 10px; + text-align: left; +} + +table th.description { + text-align: left; +} + +table td.description { + font-weight: bold; + text-align: left; + width: 100%; +} + +table td.item_fee_line_name { + text-align: left; + padding-left: 10px; +} + +table .description small { + font-weight: normal; +} + +table td.quantity, table th.quantity { + text-align: center; + white-space: nowrap; +} + +table td.amount { + padding-left: 10px; +} + +table div.line_description { + text-align: left; + font-weight: bold; +} + +table div.line_note { + text-align: left; + font-weight: normal; +} + +table.totals td { + margin: 0; + width: 100%; +} + +table.totals { + text-align: right; + border-top: 1px solid #000; +} + +table.totals tr.total td { + font-weight: bold; +} + +.notes { + overflow: hidden; + margin: 0 0 1em; +} + +.notes h3 { + {% if minimal_mode == true %} + font-size: 10pt; + {% endif %} +} + +.workorderAgree { + margin-bottom: 40px; + {% if minimal_mode == true %} + font-size: 9pt; + {% endif %} +} + +img.barcode { + display: block; + {% if minimal_mode == false %} + margin: 2em auto; + {% else %} + margin: 0px auto; + {% endif %} +} + +{% endblock extrastyles %} + + +{% block content %} + + {% for Workorder in Workorders %} +
+ +
+ {% if parameters.type != 'shop-tag' or tag_header_information == true %} + {% if minimal_mode or remove_logo == false %} + {% set logo_printed = false %} + {% if multi_shop_logos == true %} + {% for shop in shop_logo_array %} + {% if shop.name == Workorder.Shop.name %} + {% if shop.logo_url|strlen > 0 %} + + {% set logo_printed = true %} + {% endif %} + {% endif %} + {% endfor %} + {% elseif Workorder.Shop.ReceiptSetup.hasLogo == 'true' %} + + {% set logo_printed = true %} + {% endif %} + {% endif %} + {% if logo_printed == false %} +

{{ Workorder.Shop.name }}

+ {% endif %} + {% if Workorder.Shop.ReceiptSetup.header|strlen > 0 %} + {{ Workorder.Shop.ReceiptSetup.header|nl2br|raw }} + {% else %} +

{{ Workorder.Shop.Contact.Addresses.ContactAddress.address1 }}

+

{{ Workorder.Shop.Contact.Addresses.ContactAddress.address2 }}

+

{{ Workorder.Shop.Contact.Addresses.ContactAddress.city }}, {{ Workorder.Shop.Contact.Addresses.ContactAddress.state }} {{ Workorder.Shop.Contact.Addresses.ContactAddress.zip }}

+

{{ Workorder.Shop.Contact.Phones.ContactPhone.number }}

+ {% endif %} + {% endif %} + {% if minimal_mode == true %} +

Nummer des Arbeitsauftrags{{ Workorder.workorderID }}

+ {{ _self.date(Workorder) }} + {% else %} + {% if make_work_order_number_small == true %} +

Nummer des Arbeitsauftrags{{ Workorder.workorderID }}

+ {{ _self.date(Workorder) }} + {% elseif make_work_order_number_small == false %} +

Arbeitsauftrag

+ {{ _self.date(Workorder) }} +
+

#{{ Workorder.workorderID }}

+
+ {% endif %} + {% endif %} + {% if parameters.type == 'shop-tag' %} + {% if Workorder.hookIn|strlen > 0 or Workorder.hookOut|strlen > 0 %} +

Hook Ein: {{Workorder.hookIn}}
+ Hook Aus: {{Workorder.hookOut}}

+ {% endif %} + {% endif %} +
+ +
+

Kunde:

+

{{ Workorder.Customer.firstName}} {{ Workorder.Customer.lastName}}

+

{{ Workorder.Customer.Contact.Addresses.ContactAddress.address1 }}

+

{{ Workorder.Customer.Contact.Addresses.ContactAddress.address2 }}

+

+ {{ Workorder.Customer.Contact.Addresses.ContactAddress.city }}{% if Workorder.Customer.Contact.Addresses.ContactAddress.city and (Workorder.Customer.Contact.Addresses.ContactAddress.state or Workorder.Customer.Contact.Addresses.ContactAddress.zip) %},{% endif %} + {{ Workorder.Customer.Contact.Addresses.ContactAddress.state }} + {{ Workorder.Customer.Contact.Addresses.ContactAddress.zip }} +

+

{{ Workorder.Customer.company }} + {% for ContactPhone in Workorder.Customer.Contact.Phones.ContactPhone %} +

{{ ContactPhone.number }} ({{ ContactPhone.useType }})

+ {% endfor %} + {% for ContactEmail in Workorder.Customer.Contact.Emails.ContactEmail %} +

{{ ContactEmail.address }}

+ {% endfor %} + {% for serializedID in Workorder.Serialized %} + {% if hide_work_order_item == false %} +
Auftragsposition::
+ {% if Workorder.Serialized.description|strlen > 0 %} + {{ Workorder.Serialized.description }} + {% elseif Workorder.Serialized.Item.description|strlen > 0 %} + {{ Workorder.Serialized.Item.description }} + {% endif %} + {% if Workorder.Serialized.colorName|strlen > 0 %} + / {{ Workorder.Serialized.colorName }} + {% endif %} + {% if Workorder.Serialized.sizeName|strlen > 0 %} + / {{ Workorder.Serialized.sizeName }} + {% endif %} + {% if Workorder.Serialized.serial|strlen > 0 %} + / {{ Workorder.Serialized.serial }} + {% endif %} + {% else %} + {% endif %} + {% endfor %} +

+ {% if hide_status == false %} + Status: {{ Workorder.WorkorderStatus.name }} + {% endif %} + {% if hide_warranty == false %} + {% if Workorder.warranty == 'true' %} +
Garantie: ja + {% else %} +
Garantie: nein + {% endif %} +
+ {% else %} + {% endif %} + {% if hide_start_and_date == false %} + Gestartet: {{Workorder.timeIn|correcttimezone|date ("m/d/y h:i a")}}
+ Auftragsende: {{Workorder.etaOut|correcttimezone|date ("m/d/y h:i a")}}
+ {% else %} + {% endif %} + {% if hide_employee == false %} + Mitarbeiter/in: {{ Workorder.Employee.firstName }} {{ Workorder.Employee.lastName }} + {% else %} + {% endif %} +

+
+ + + {% set servicerate = Workorder.Shop.serviceRate %} + {% set specialorder = false %} + + + + + + {% for WorkorderItem in Workorder.WorkorderItems.WorkorderItem %} + {% if WorkorderItem.itemFeeID == 0 %} + {% if WorkorderItem.isSpecialOrder == 'false' %} + {{ _self.line(WorkorderItem, parameters, _context) }} + {% else %} + {% set specialorder = true %} + {% endif %} + {% endif %} + {% endfor %} + + {% for WorkorderLine in Workorder.WorkorderLines.WorkorderLine %} + {% if WorkorderLine.itemFeeID == 0 %} + {{ _self.line(WorkorderLine, parameters, _context) }} + {% endif %} + {% endfor %} + + {% if specialorder == true %} + + + + + + {% for WorkorderItem in Workorder.WorkorderItems.WorkorderItem %} + {% if WorkorderItem.isSpecialOrder == 'true' %} + {{ _self.line(WorkorderItem, parameters, _context) }} + {% endif %} + {% endfor %} + {% endif %} +
Position/Tätigkeit#Preis
Sonderbestellungen
+ + + + + + + + + + + + + + {% if Workorder.MetaData.discount > 0 %} + + + + + {% endif %} + + {% if Workorder.MetaData.itemFeesSubtotal %} + + + + + {% endif %} + + + + + + + + + + + +
Arbeit + {{Workorder.MetaData.labor|money}} +
Teile + {{Workorder.MetaData.parts|money}} +
Rabatte + {{Workorder.MetaData.discount|getinverse|money}} +
Summe Gebührenbetrag + {{Workorder.MetaData.itemFeesSubtotal|money}} +
Steuern + {{Workorder.MetaData.tax|money}} +
Gesamtsumme + {{Workorder.MetaData.total|money}} +
+ + {% if notes_on_tag_only == false %} + {% if Workorder.note|strlen > 0 %} +
+

Notizen:

+ {{ Workorder.note|noteformat|raw }} +
+ {% endif %} + {% else %} + {% if Workorder.note|strlen > 0 and parameters.type == 'shop-tag' %} +
+

Notizen:

+ {{ Workorder.note|noteformat|raw }} +
+ {% endif %} + {% endif %} + + {% if parameters.type == 'shop-tag' %} + {% if Workorder.internalNote|strlen > 0 %} +
+

Interne Notizen:

+ {{ Workorder.internalNote|noteformat|raw }} +
+ {% endif %} + {% endif %} + + {% if hide_barcode == false %} + {% if hide_barcode_sku == true %} + {% set hide_text = 1 %} + {% else %} + {% set hide_text = 0 %} + {% endif %} + + {% endif %} + {% if hide_Work_Order_Agreement == false %} + {% if parameters.type == 'invoice' %} + {% if Workorder.Shop.ReceiptSetup.workorderAgree|strlen > 0 %} +
+

{{ Workorder.Shop.ReceiptSetup.workorderAgree|noteformat|raw }}

+ X_______________________________ +
+ {{ Workorder.Customer.firstName}} {{ Workorder.Customer.lastName}} +
+ {% endif %} + {% endif %} + {% endif %} +
+ {% endfor %} + +{% endblock content %} + + +{% macro date(Workorder) %} +

+ {{"now"|correcttimezone|date('m/d/Y h:i:s A')}} +

+{% endmacro %} + +{% macro line(Line,parameters,options) %} + + + {{ _self.lineDescription(Line,options) }} + {% if Line.Discount %} + Rabatt: '{{ Line.Discount.name }}' (-{{ Line.SaleLine.calcLineDiscount|money }}) + {% endif %} + + {% if options.per_line_subtotal == true %} + {% if options.itemized_hours_labor == true %} + {% if Line.unitPriceOverride > 0 %} + {{Line.unitQuantity}} x {{ Line.unitPriceOverride|money }} + {% elseif Line.hours > 0 or Line.minutes > 0 %} + {{ Line.hours }} Stunden {{ Line.minutes }} Minuten x {{ options.servicerate|money }}/Stunden + {% elseif Line.unitPrice > 0 %} + {{Line.unitQuantity}} x {{ Line.unitPrice|money }} + {% endif %} + {% else %} + {% if Line.unitPriceOverride > 0 %} + {{Line.unitQuantity}} x {{ Line.unitPriceOverride|money }} + {% elseif Line.unitPrice > 0 %} + {{Line.unitQuantity}} x {{ Line.unitPrice|money }} + {% endif %} + {% endif %} + {% elseif options.itemized_hours_labor == true and Line.unitPriceOverride == '0'%} + {% if Line.hours > 0 or Line.minutes > 0 %} + {{ Line.hours }} Stunden {{ Line.minutes }} Minuten + {% else %} + {{Line.unitQuantity}} + {% endif %} + {% else %} + {{Line.unitQuantity}} + {% endif %} + + {% if Line.warranty == 'false' %} + {{Line.SaleLine.displayableSubtotal|money}} + {% elseif Line.warranty == 'true' %} + €0.00 + {% endif %} + + + {% for WorkorderSaleLine in Line.SaleLine %} + {% if WorkorderSaleLine.itemFeeID != 0 and (WorkorderSaleLine.lineType == 'item_fee' or WorkorderSaleLine.lineType == 'item_fee_refund') %} + + +
+ {% autoescape true %}{{ WorkorderSaleLine.ItemFee.name|nl2br }}{% endautoescape %} +
+ + {{ WorkorderSaleLine.unitQuantity }} + {{ WorkorderSaleLine.ItemFee.feeValue|money }} + + {% endif %} + {% endfor %} +{% endmacro %} + +{% macro lineDescription(Line,options) %} + {% if Line.itemID != 0 %} +
+ {% autoescape true %}{{ Line.Item.description|nl2br }}{% endautoescape %} +
+ {% if Line.note|strlen > 0 %} +
+ {% autoescape true %}{{ Line.note|noteformat|raw }}{% endautoescape %} +
+ {% endif %} + {% if Line.isSpecialOrder == 'true' %} +
+ Mitarbeiter/in: {{ Line.Employee.firstName }} {{ Line.Employee.lastName }} +
+ {% endif %} + {% else %} +
+ {% autoescape true %}{{ Line.note|noteformat|raw }}{% endautoescape %} + {% if options.employee_name_on_labor_charges == true %} +
+ Mitarbeiter/in: {{ Line.Employee.firstName }} {{ Line.Employee.lastName }} +
+ {% endif %} +
+ {% endif %} +{% endmacro %} diff --git a/workorder/customizable_workorder_es.tpl b/workorder/customizable_workorder_es.tpl new file mode 100644 index 0000000..402ff70 --- /dev/null +++ b/workorder/customizable_workorder_es.tpl @@ -0,0 +1,581 @@ +{# + ***Begin Custom Options*** +Set any of the options in this section from 'false' to 'true' in order to enable them in the template +#} + +{% set chrome_right_margin_fix = false %} {# Fixes a potential issue where the right side of receipts are cut off in Chrome #} +{% set firefox_margin_fix = false %} {# Fixes issue with margins cutting off when printing on a letter printer on a Mac #} + +{% set itemized_hours_labor = false %} {# Shows time spent on Labor item if time spent is present in the charge #} +{% set per_line_subtotal = false %} {# Displays Subtotals for each Sale Line (ex. 1 x $5.00) #} +{% set employee_name_on_labor_charges = false %} {# Display Employee name on Labor Charges #} +{% set make_work_order_number_small = false %} {# Makes work order number inline with the header #} +{% set remove_logo = false %} {# Removes logo from receipt #} + +{% set tag_header_information = false %} {# Shows shop header information on Tags #} +{% set notes_on_tag_only = false %} {# Displays notes on tags only (these will still show up in the Sales screen when ringing out the Work Order) #} + +{% set hide_work_order_item = false %} {# Removes the Start and end date from receipts #} +{% set hide_status = false %} {# Removes the Status receipts #} +{% set hide_warranty = false %} {# Removes warranty line from receipts #} +{% set hide_start_and_date = false %} {# Removes the Start and end date from receipts #} + +{% set hide_employee = false %} {# Removes the the employee from the Work order header #} +{% set hide_Work_Order_Agreement = false %} {# Removes the the employee from the Work order header #} + + +{% set hide_barcode = false %} {# Removes barcode from bottom of receipts #} +{% set hide_barcode_sku = false %} {# Remove the System ID from displaying at the bottom of barcdoes #} + +{% set logo_width = '225px' %} {# Default width is 225px. A smaller number will scale logo down #} +{% set multi_shop_logos = false %} {# Allows multiple logos to be added for separate locations when used with options below #} + +{% set minimal_mode = false %} + +{# + Use the following shop_logo_array to enter all of your locations and the link to the logo image that you have uploaded to the internet. + Enter your EXACT shop name (Case Sensitive!) in the Quotes after the "name": entry and then enter the URL to your logo after the "logo": entry. + Be sure to set the multi_shop_logos setting above to true in order to have these logos take effect! +#} + +{% set shop_logo_array = + { + 0:{"name":"Example Shop", "logo_url":"http://logo.url.goes/here.jpg"}, + 1:{"name":"", "logo_url":""}, + 2:{"name":"", "logo_url":""}, + 3:{"name":"", "logo_url":""}, + 4:{"name":"", "logo_url":""}, + 5:{"name":"", "logo_url":""} + } +%} + +{# + ***End Custom Options*** +#} + + +{% extends parameters.print ? "printbase" : "base" %} +{% block extrastyles %} + + +@page { margin: 0px; } + +body { + font: normal 10pt 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin: 0; + {% if chrome_right_margin_fix == true %} + margin-right: .13in; + {% endif %} + {% if firefox_margin_fix == true %} + margin: 25px; + {% endif %} + padding: 1px; +} + +.workorder { + margin: 0px; + font: normal 10pt 'Helvetica Neue',Helvetica,Arial,sans-serif; +} + +.header { + text-align: center; + {% if minimal_mode == false %} + margin-bottom: 30px; + {% else %} + margin-bottom: 10px; + {% endif %} +} + +.header p { + margin: 0; +} + +.header h1 { + text-align: center; + font-size: 12pt; + margin-bottom: 0; +} + +.header h3 { + font-size: 10pt; + margin: 0; +} + +.header h1 strong { + border: 3px solid black; + font-size: 24pt; + padding: 10px; +} + +.header img { + display: block; + margin: 8px auto 4px; +} + +.detail { + margin-bottom: 1em; +} + +.detail h2, .detail h3 { + margin: 0px 0px 10px 0px; + padding: 0px; + {% if minimal_mode == false %} + font-size: 11pt; + {% else %} + font-size: 10pt; + {% endif %} +} + +.detail p { + margin: 0; +} + +.workOrderItem { + font-size: 15px; + font-weight: bold; +} + +table { + width: 100%; + border-collapse:collapse; + text-align: right; +} + +table th { + border-bottom: 1px solid #000; +} + +table th.specialorder { + padding-top: 10px; + text-align: left; +} + +table th.description { + text-align: left; +} + +table td.description { + font-weight: bold; + text-align: left; + width: 100%; +} + +table td.item_fee_line_name { + text-align: left; + padding-left: 10px; +} + +table .description small { + font-weight: normal; +} + +table td.quantity, table th.quantity { + text-align: center; + white-space: nowrap; +} + +table td.amount { + padding-left: 10px; +} + +table div.line_description { + text-align: left; + font-weight: bold; +} + +table div.line_note { + text-align: left; + font-weight: normal; +} + +table.totals td { + margin: 0; + width: 100%; +} + +table.totals { + text-align: right; + border-top: 1px solid #000; +} + +table.totals tr.total td { + font-weight: bold; +} + +.notes { + overflow: hidden; + margin: 0 0 1em; +} + +.notes h3 { + {% if minimal_mode == true %} + font-size: 10pt; + {% endif %} +} + +.workorderAgree { + margin-bottom: 40px; + {% if minimal_mode == true %} + font-size: 9pt; + {% endif %} +} + +img.barcode { + display: block; + {% if minimal_mode == false %} + margin: 2em auto; + {% else %} + margin: 0px auto; + {% endif %} +} + +{% endblock extrastyles %} + + +{% block content %} + + {% for Workorder in Workorders %} +
+ +
+ {% if parameters.type != 'shop-tag' or tag_header_information == true %} + {% if minimal_mode or remove_logo == false %} + {% set logo_printed = false %} + {% if multi_shop_logos == true %} + {% for shop in shop_logo_array %} + {% if shop.name == Workorder.Shop.name %} + {% if shop.logo_url|strlen > 0 %} + + {% set logo_printed = true %} + {% endif %} + {% endif %} + {% endfor %} + {% elseif Workorder.Shop.ReceiptSetup.hasLogo == 'true' %} + + {% set logo_printed = true %} + {% endif %} + {% endif %} + {% if logo_printed == false %} +

{{ Workorder.Shop.name }}

+ {% endif %} + {% if Workorder.Shop.ReceiptSetup.header|strlen > 0 %} + {{ Workorder.Shop.ReceiptSetup.header|nl2br|raw }} + {% else %} +

{{ Workorder.Shop.Contact.Addresses.ContactAddress.address1 }}

+

{{ Workorder.Shop.Contact.Addresses.ContactAddress.address2 }}

+

{{ Workorder.Shop.Contact.Addresses.ContactAddress.city }}, {{ Workorder.Shop.Contact.Addresses.ContactAddress.state }} {{ Workorder.Shop.Contact.Addresses.ContactAddress.zip }}

+

{{ Workorder.Shop.Contact.Phones.ContactPhone.number }}

+ {% endif %} + {% endif %} + {% if minimal_mode == true %} +

Núm. de orden de trabajo{{ Workorder.workorderID }}

+ {{ _self.date(Workorder) }} + {% else %} + {% if make_work_order_number_small == true %} +

Núm. de orden de trabajo{{ Workorder.workorderID }}

+ {{ _self.date(Workorder) }} + {% elseif make_work_order_number_small == false %} +

Orden de trabajo

+ {{ _self.date(Workorder) }} +
+

#{{ Workorder.workorderID }}

+
+ {% endif %} + {% endif %} + {% if parameters.type == 'shop-tag' %} + {% if Workorder.hookIn|strlen > 0 or Workorder.hookOut|strlen > 0 %} +

Enganche: {{Workorder.hookIn}}
+ Sacado: {{Workorder.hookOut}}

+ {% endif %} + {% endif %} +
+ +
+

Cliente:

+

{{ Workorder.Customer.firstName}} {{ Workorder.Customer.lastName}}

+

{{ Workorder.Customer.Contact.Addresses.ContactAddress.address1 }}

+

{{ Workorder.Customer.Contact.Addresses.ContactAddress.address2 }}

+

+ {{ Workorder.Customer.Contact.Addresses.ContactAddress.city }}{% if Workorder.Customer.Contact.Addresses.ContactAddress.city and (Workorder.Customer.Contact.Addresses.ContactAddress.state or Workorder.Customer.Contact.Addresses.ContactAddress.zip) %},{% endif %} + {{ Workorder.Customer.Contact.Addresses.ContactAddress.state }} + {{ Workorder.Customer.Contact.Addresses.ContactAddress.zip }} +

+

{{ Workorder.Customer.company }} + {% for ContactPhone in Workorder.Customer.Contact.Phones.ContactPhone %} +

{{ ContactPhone.number }} ({{ ContactPhone.useType }})

+ {% endfor %} + {% for ContactEmail in Workorder.Customer.Contact.Emails.ContactEmail %} +

{{ ContactEmail.address }}

+ {% endfor %} + {% for serializedID in Workorder.Serialized %} + {% if hide_work_order_item == false %} +
Artículo de orden de trabajo:
+ {% if Workorder.Serialized.description|strlen > 0 %} + {{ Workorder.Serialized.description }} + {% elseif Workorder.Serialized.Item.description|strlen > 0 %} + {{ Workorder.Serialized.Item.description }} + {% endif %} + {% if Workorder.Serialized.colorName|strlen > 0 %} + / {{ Workorder.Serialized.colorName }} + {% endif %} + {% if Workorder.Serialized.sizeName|strlen > 0 %} + / {{ Workorder.Serialized.sizeName }} + {% endif %} + {% if Workorder.Serialized.serial|strlen > 0 %} + / {{ Workorder.Serialized.serial }} + {% endif %} + {% else %} + {% endif %} + {% endfor %} +

+ {% if hide_status == false %} + Estado: {{ Workorder.WorkorderStatus.name }} + {% endif %} + {% if hide_warranty == false %} + {% if Workorder.warranty == 'true' %} +
Garantía: Sí + {% else %} +
Garantía: No + {% endif %} +
+ {% else %} + {% endif %} + {% if hide_start_and_date == false %} + Fecha de inicio: {{Workorder.timeIn|correcttimezone|date ("m/d/y h:i a")}}
+ Vencimiento: {{Workorder.etaOut|correcttimezone|date ("m/d/y h:i a")}}
+ {% else %} + {% endif %} + {% if hide_employee == false %} + Empleado: {{ Workorder.Employee.firstName }} {{ Workorder.Employee.lastName }} + {% else %} + {% endif %} +

+
+ + + {% set servicerate = Workorder.Shop.serviceRate %} + {% set specialorder = false %} + + + + + + {% for WorkorderItem in Workorder.WorkorderItems.WorkorderItem %} + {% if WorkorderItem.itemFeeID == 0 %} + {% if WorkorderItem.isSpecialOrder == 'false' %} + {{ _self.line(WorkorderItem, parameters, _context) }} + {% else %} + {% set specialorder = true %} + {% endif %} + {% endif %} + {% endfor %} + + {% for WorkorderLine in Workorder.WorkorderLines.WorkorderLine %} + {% if WorkorderLine.itemFeeID == 0 %} + {{ _self.line(WorkorderLine, parameters, _context) }} + {% endif %} + {% endfor %} + + {% if specialorder == true %} + + + + + + {% for WorkorderItem in Workorder.WorkorderItems.WorkorderItem %} + {% if WorkorderItem.isSpecialOrder == 'true' %} + {{ _self.line(WorkorderItem, parameters, _context) }} + {% endif %} + {% endfor %} + {% endif %} +
Artículo/Trabajo#Precio
Pedidos especiales
+ + + + + + + + + + + + + + {% if Workorder.MetaData.discount > 0 %} + + + + + {% endif %} + + {% if Workorder.MetaData.itemFeesSubtotal %} + + + + + {% endif %} + + + + + + + + + + + +
Mano de obra + {{Workorder.MetaData.labor|money}} +
Piezas + {{Workorder.MetaData.parts|money}} +
Descuentos + {{Workorder.MetaData.discount|getinverse|money}} +
Total de tarifas + {{Workorder.MetaData.itemFeesSubtotal|money}} +
Impuestos + {{Workorder.MetaData.tax|money}} +
Total + {{Workorder.MetaData.total|money}} +
+ + {% if notes_on_tag_only == false %} + {% if Workorder.note|strlen > 0 %} +
+

Notas:

+ {{ Workorder.note|noteformat|raw }} +
+ {% endif %} + {% else %} + {% if Workorder.note|strlen > 0 and parameters.type == 'shop-tag' %} +
+

Notas:

+ {{ Workorder.note|noteformat|raw }} +
+ {% endif %} + {% endif %} + + {% if parameters.type == 'shop-tag' %} + {% if Workorder.internalNote|strlen > 0 %} +
+

Notas internas:

+ {{ Workorder.internalNote|noteformat|raw }} +
+ {% endif %} + {% endif %} + + {% if hide_barcode == false %} + {% if hide_barcode_sku == true %} + {% set hide_text = 1 %} + {% else %} + {% set hide_text = 0 %} + {% endif %} + + {% endif %} + {% if hide_Work_Order_Agreement == false %} + {% if parameters.type == 'invoice' %} + {% if Workorder.Shop.ReceiptSetup.workorderAgree|strlen > 0 %} +
+

{{ Workorder.Shop.ReceiptSetup.workorderAgree|noteformat|raw }}

+ X_______________________________ +
+ {{ Workorder.Customer.firstName}} {{ Workorder.Customer.lastName}} +
+ {% endif %} + {% endif %} + {% endif %} +
+ {% endfor %} + +{% endblock content %} + + +{% macro date(Workorder) %} +

+ {{"now"|correcttimezone|date('m/d/Y h:i:s A')}} +

+{% endmacro %} + +{% macro line(Line,parameters,options) %} + + + {{ _self.lineDescription(Line,options) }} + {% if Line.Discount %} + Descuento: '{{ Line.Discount.name }}' (-{{ Line.SaleLine.calcLineDiscount|money }}) + {% endif %} + + {% if options.per_line_subtotal == true %} + {% if options.itemized_hours_labor == true %} + {% if Line.unitPriceOverride > 0 %} + {{Line.unitQuantity}} x {{ Line.unitPriceOverride|money }} + {% elseif Line.hours > 0 or Line.minutes > 0 %} + {{ Line.hours }} h {{ Line.minutes }} min x {{ options.servicerate|money }}/h. + {% elseif Line.unitPrice > 0 %} + {{Line.unitQuantity}} x {{ Line.unitPrice|money }} + {% endif %} + {% else %} + {% if Line.unitPriceOverride > 0 %} + {{Line.unitQuantity}} x {{ Line.unitPriceOverride|money }} + {% elseif Line.unitPrice > 0 %} + {{Line.unitQuantity}} x {{ Line.unitPrice|money }} + {% endif %} + {% endif %} + {% elseif options.itemized_hours_labor == true and Line.unitPriceOverride == '0'%} + {% if Line.hours > 0 or Line.minutes > 0 %} + {{ Line.hours }} h {{ Line.minutes }} min + {% else %} + {{Line.unitQuantity}} + {% endif %} + {% else %} + {{Line.unitQuantity}} + {% endif %} + + {% if Line.warranty == 'false' %} + {{Line.SaleLine.displayableSubtotal|money}} + {% elseif Line.warranty == 'true' %} + $0.00 + {% endif %} + + + {% for WorkorderSaleLine in Line.SaleLine %} + {% if WorkorderSaleLine.itemFeeID != 0 and (WorkorderSaleLine.lineType == 'item_fee' or WorkorderSaleLine.lineType == 'item_fee_refund') %} + + +
+ {% autoescape true %}{{ WorkorderSaleLine.ItemFee.name|nl2br }}{% endautoescape %} +
+ + {{ WorkorderSaleLine.unitQuantity }} + {{ WorkorderSaleLine.ItemFee.feeValue|money }} + + {% endif %} + {% endfor %} +{% endmacro %} + +{% macro lineDescription(Line,options) %} + {% if Line.itemID != 0 %} +
+ {% autoescape true %}{{ Line.Item.description|nl2br }}{% endautoescape %} +
+ {% if Line.note|strlen > 0 %} +
+ {% autoescape true %}{{ Line.note|noteformat|raw }}{% endautoescape %} +
+ {% endif %} + {% if Line.isSpecialOrder == 'true' %} +
+ Empleado: {{ Line.Employee.firstName }} {{ Line.Employee.lastName }} +
+ {% endif %} + {% else %} +
+ {% autoescape true %}{{ Line.note|noteformat|raw }}{% endautoescape %} + {% if options.employee_name_on_labor_charges == true %} +
+ Empleado: {{ Line.Employee.firstName }} {{ Line.Employee.lastName }} +
+ {% endif %} +
+ {% endif %} +{% endmacro %} diff --git a/workorder/customizable_workorder_nl.tpl b/workorder/customizable_workorder_nl.tpl new file mode 100644 index 0000000..52038b9 --- /dev/null +++ b/workorder/customizable_workorder_nl.tpl @@ -0,0 +1,581 @@ +{# + ***Begin Custom Options*** +Set any of the options in this section from 'false' to 'true' in order to enable them in the template +#} + +{% set chrome_right_margin_fix = false %} {# Fixes a potential issue where the right side of receipts are cut off in Chrome #} +{% set firefox_margin_fix = false %} {# Fixes issue with margins cutting off when printing on a letter printer on a Mac #} + +{% set itemized_hours_labor = false %} {# Shows time spent on Labor item if time spent is present in the charge #} +{% set per_line_subtotal = false %} {# Displays Subtotals for each Sale Line (ex. 1 x $5.00) #} +{% set employee_name_on_labor_charges = false %} {# Display Employee name on Labor Charges #} +{% set make_work_order_number_small = false %} {# Makes work order number inline with the header #} +{% set remove_logo = false %} {# Removes logo from receipt #} + +{% set tag_header_information = false %} {# Shows shop header information on Tags #} +{% set notes_on_tag_only = false %} {# Displays notes on tags only (these will still show up in the Sales screen when ringing out the Work Order) #} + +{% set hide_work_order_item = false %} {# Removes the Start and end date from receipts #} +{% set hide_status = false %} {# Removes the Status receipts #} +{% set hide_warranty = false %} {# Removes warranty line from receipts #} +{% set hide_start_and_date = false %} {# Removes the Start and end date from receipts #} + +{% set hide_employee = false %} {# Removes the the employee from the Work order header #} +{% set hide_Work_Order_Agreement = false %} {# Removes the the employee from the Work order header #} + + +{% set hide_barcode = false %} {# Removes barcode from bottom of receipts #} +{% set hide_barcode_sku = false %} {# Remove the System ID from displaying at the bottom of barcdoes #} + +{% set logo_width = '225px' %} {# Default width is 225px. A smaller number will scale logo down #} +{% set multi_shop_logos = false %} {# Allows multiple logos to be added for separate locations when used with options below #} + +{% set minimal_mode = false %} + +{# + Use the following shop_logo_array to enter all of your locations and the link to the logo image that you have uploaded to the internet. + Enter your EXACT shop name (Case Sensitive!) in the Quotes after the "name": entry and then enter the URL to your logo after the "logo": entry. + Be sure to set the multi_shop_logos setting above to true in order to have these logos take effect! +#} + +{% set shop_logo_array = + { + 0:{"name":"Example Shop", "logo_url":"http://logo.url.goes/here.jpg"}, + 1:{"name":"", "logo_url":""}, + 2:{"name":"", "logo_url":""}, + 3:{"name":"", "logo_url":""}, + 4:{"name":"", "logo_url":""}, + 5:{"name":"", "logo_url":""} + } +%} + +{# + ***End Custom Options*** +#} + + +{% extends parameters.print ? "printbase" : "base" %} +{% block extrastyles %} + + +@page { margin: 0px; } + +body { + font: normal 10pt 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin: 0; + {% if chrome_right_margin_fix == true %} + margin-right: .13in; + {% endif %} + {% if firefox_margin_fix == true %} + margin: 25px; + {% endif %} + padding: 1px; +} + +.workorder { + margin: 0px; + font: normal 10pt 'Helvetica Neue',Helvetica,Arial,sans-serif; +} + +.header { + text-align: center; + {% if minimal_mode == false %} + margin-bottom: 30px; + {% else %} + margin-bottom: 10px; + {% endif %} +} + +.header p { + margin: 0; +} + +.header h1 { + text-align: center; + font-size: 12pt; + margin-bottom: 0; +} + +.header h3 { + font-size: 10pt; + margin: 0; +} + +.header h1 strong { + border: 3px solid black; + font-size: 24pt; + padding: 10px; +} + +.header img { + display: block; + margin: 8px auto 4px; +} + +.detail { + margin-bottom: 1em; +} + +.detail h2, .detail h3 { + margin: 0px 0px 10px 0px; + padding: 0px; + {% if minimal_mode == false %} + font-size: 11pt; + {% else %} + font-size: 10pt; + {% endif %} +} + +.detail p { + margin: 0; +} + +.workOrderItem { + font-size: 15px; + font-weight: bold; +} + +table { + width: 100%; + border-collapse:collapse; + text-align: right; +} + +table th { + border-bottom: 1px solid #000; +} + +table th.specialorder { + padding-top: 10px; + text-align: left; +} + +table th.description { + text-align: left; +} + +table td.description { + font-weight: bold; + text-align: left; + width: 100%; +} + +table td.item_fee_line_name { + text-align: left; + padding-left: 10px; +} + +table .description small { + font-weight: normal; +} + +table td.quantity, table th.quantity { + text-align: center; + white-space: nowrap; +} + +table td.amount { + padding-left: 10px; +} + +table div.line_description { + text-align: left; + font-weight: bold; +} + +table div.line_note { + text-align: left; + font-weight: normal; +} + +table.totals td { + margin: 0; + width: 100%; +} + +table.totals { + text-align: right; + border-top: 1px solid #000; +} + +table.totals tr.total td { + font-weight: bold; +} + +.notes { + overflow: hidden; + margin: 0 0 1em; +} + +.notes h3 { + {% if minimal_mode == true %} + font-size: 10pt; + {% endif %} +} + +.workorderAgree { + margin-bottom: 40px; + {% if minimal_mode == true %} + font-size: 9pt; + {% endif %} +} + +img.barcode { + display: block; + {% if minimal_mode == false %} + margin: 2em auto; + {% else %} + margin: 0px auto; + {% endif %} +} + +{% endblock extrastyles %} + + +{% block content %} + + {% for Workorder in Workorders %} +
+ +
+ {% if parameters.type != 'shop-tag' or tag_header_information == true %} + {% if minimal_mode or remove_logo == false %} + {% set logo_printed = false %} + {% if multi_shop_logos == true %} + {% for shop in shop_logo_array %} + {% if shop.name == Workorder.Shop.name %} + {% if shop.logo_url|strlen > 0 %} + + {% set logo_printed = true %} + {% endif %} + {% endif %} + {% endfor %} + {% elseif Workorder.Shop.ReceiptSetup.hasLogo == 'true' %} + + {% set logo_printed = true %} + {% endif %} + {% endif %} + {% if logo_printed == false %} +

{{ Workorder.Shop.name }}

+ {% endif %} + {% if Workorder.Shop.ReceiptSetup.header|strlen > 0 %} + {{ Workorder.Shop.ReceiptSetup.header|nl2br|raw }} + {% else %} +

{{ Workorder.Shop.Contact.Addresses.ContactAddress.address1 }}

+

{{ Workorder.Shop.Contact.Addresses.ContactAddress.address2 }}

+

{{ Workorder.Shop.Contact.Addresses.ContactAddress.city }}, {{ Workorder.Shop.Contact.Addresses.ContactAddress.state }} {{ Workorder.Shop.Contact.Addresses.ContactAddress.zip }}

+

{{ Workorder.Shop.Contact.Phones.ContactPhone.number }}

+ {% endif %} + {% endif %} + {% if minimal_mode == true %} +

Werkordernr.{{ Workorder.workorderID }}

+ {{ _self.date(Workorder) }} + {% else %} + {% if make_work_order_number_small == true %} +

Werkordernr.{{ Workorder.workorderID }}

+ {{ _self.date(Workorder) }} + {% elseif make_work_order_number_small == false %} +

Werkorder

+ {{ _self.date(Workorder) }} +
+

#{{ Workorder.workorderID }}

+
+ {% endif %} + {% endif %} + {% if parameters.type == 'shop-tag' %} + {% if Workorder.hookIn|strlen > 0 or Workorder.hookOut|strlen > 0 %} +

In: {{Workorder.hookIn}}
+ Uit: {{Workorder.hookOut}}

+ {% endif %} + {% endif %} +
+ +
+

Klant:

+

{{ Workorder.Customer.firstName}} {{ Workorder.Customer.lastName}}

+

{{ Workorder.Customer.Contact.Addresses.ContactAddress.address1 }}

+

{{ Workorder.Customer.Contact.Addresses.ContactAddress.address2 }}

+

+ {{ Workorder.Customer.Contact.Addresses.ContactAddress.city }}{% if Workorder.Customer.Contact.Addresses.ContactAddress.city and (Workorder.Customer.Contact.Addresses.ContactAddress.state or Workorder.Customer.Contact.Addresses.ContactAddress.zip) %},{% endif %} + {{ Workorder.Customer.Contact.Addresses.ContactAddress.state }} + {{ Workorder.Customer.Contact.Addresses.ContactAddress.zip }} +

+

{{ Workorder.Customer.company }} + {% for ContactPhone in Workorder.Customer.Contact.Phones.ContactPhone %} +

{{ ContactPhone.number }} ({{ ContactPhone.useType }})

+ {% endfor %} + {% for ContactEmail in Workorder.Customer.Contact.Emails.ContactEmail %} +

{{ ContactEmail.address }}

+ {% endfor %} + {% for serializedID in Workorder.Serialized %} + {% if hide_work_order_item == false %} +
Werkorderitem::
+ {% if Workorder.Serialized.description|strlen > 0 %} + {{ Workorder.Serialized.description }} + {% elseif Workorder.Serialized.Item.description|strlen > 0 %} + {{ Workorder.Serialized.Item.description }} + {% endif %} + {% if Workorder.Serialized.colorName|strlen > 0 %} + / {{ Workorder.Serialized.colorName }} + {% endif %} + {% if Workorder.Serialized.sizeName|strlen > 0 %} + / {{ Workorder.Serialized.sizeName }} + {% endif %} + {% if Workorder.Serialized.serial|strlen > 0 %} + / {{ Workorder.Serialized.serial }} + {% endif %} + {% else %} + {% endif %} + {% endfor %} +

+ {% if hide_status == false %} + Status: {{ Workorder.WorkorderStatus.name }} + {% endif %} + {% if hide_warranty == false %} + {% if Workorder.warranty == 'true' %} +
Garantie: ja + {% else %} +
Garantie: nee + {% endif %} +
+ {% else %} + {% endif %} + {% if hide_start_and_date == false %} + Gestart: {{Workorder.timeIn|correcttimezone|date ("m/d/y h:i a")}}
+ Deadline: {{Workorder.etaOut|correcttimezone|date ("m/d/y h:i a")}}
+ {% else %} + {% endif %} + {% if hide_employee == false %} + Werknemer: {{ Workorder.Employee.firstName }} {{ Workorder.Employee.lastName }} + {% else %} + {% endif %} +

+
+ + + {% set servicerate = Workorder.Shop.serviceRate %} + {% set specialorder = false %} + + + + + + {% for WorkorderItem in Workorder.WorkorderItems.WorkorderItem %} + {% if WorkorderItem.itemFeeID == 0 %} + {% if WorkorderItem.isSpecialOrder == 'false' %} + {{ _self.line(WorkorderItem, parameters, _context) }} + {% else %} + {% set specialorder = true %} + {% endif %} + {% endif %} + {% endfor %} + + {% for WorkorderLine in Workorder.WorkorderLines.WorkorderLine %} + {% if WorkorderLine.itemFeeID == 0 %} + {{ _self.line(WorkorderLine, parameters, _context) }} + {% endif %} + {% endfor %} + + {% if specialorder == true %} + + + + + + {% for WorkorderItem in Workorder.WorkorderItems.WorkorderItem %} + {% if WorkorderItem.isSpecialOrder == 'true' %} + {{ _self.line(WorkorderItem, parameters, _context) }} + {% endif %} + {% endfor %} + {% endif %} +
Item/arbeid#Prijs
Speciale bestellingen
+ + + + + + + + + + + + + + {% if Workorder.MetaData.discount > 0 %} + + + + + {% endif %} + + {% if Workorder.MetaData.itemFeesSubtotal %} + + + + + {% endif %} + + + + + + + + + + + +
Arbeid + {{Workorder.MetaData.labor|money}} +
Onderdelen + {{Workorder.MetaData.parts|money}} +
Kortingen + {{Workorder.MetaData.discount|getinverse|money}} +
Totaal kosten + {{Workorder.MetaData.itemFeesSubtotal|money}} +
Btw + {{Workorder.MetaData.tax|money}} +
Totaal + {{Workorder.MetaData.total|money}} +
+ + {% if notes_on_tag_only == false %} + {% if Workorder.note|strlen > 0 %} +
+

Opmerkingen:

+ {{ Workorder.note|noteformat|raw }} +
+ {% endif %} + {% else %} + {% if Workorder.note|strlen > 0 and parameters.type == 'shop-tag' %} +
+

Opmerkingen:

+ {{ Workorder.note|noteformat|raw }} +
+ {% endif %} + {% endif %} + + {% if parameters.type == 'shop-tag' %} + {% if Workorder.internalNote|strlen > 0 %} +
+

Interne aantekeningen:

+ {{ Workorder.internalNote|noteformat|raw }} +
+ {% endif %} + {% endif %} + + {% if hide_barcode == false %} + {% if hide_barcode_sku == true %} + {% set hide_text = 1 %} + {% else %} + {% set hide_text = 0 %} + {% endif %} + + {% endif %} + {% if hide_Work_Order_Agreement == false %} + {% if parameters.type == 'invoice' %} + {% if Workorder.Shop.ReceiptSetup.workorderAgree|strlen > 0 %} +
+

{{ Workorder.Shop.ReceiptSetup.workorderAgree|noteformat|raw }}

+ X_______________________________ +
+ {{ Workorder.Customer.firstName}} {{ Workorder.Customer.lastName}} +
+ {% endif %} + {% endif %} + {% endif %} +
+ {% endfor %} + +{% endblock content %} + + +{% macro date(Workorder) %} +

+ {{"now"|correcttimezone|date('m/d/Y h:i:s A')}} +

+{% endmacro %} + +{% macro line(Line,parameters,options) %} + + + {{ _self.lineDescription(Line,options) }} + {% if Line.Discount %} + Korting: '{{ Line.Discount.name }}' (-{{ Line.SaleLine.calcLineDiscount|money }}) + {% endif %} + + {% if options.per_line_subtotal == true %} + {% if options.itemized_hours_labor == true %} + {% if Line.unitPriceOverride > 0 %} + {{Line.unitQuantity}} x {{ Line.unitPriceOverride|money }} + {% elseif Line.hours > 0 or Line.minutes > 0 %} + {{ Line.hours }} uren {{ Line.minutes }} minuten x {{ options.servicerate|money }}/uren + {% elseif Line.unitPrice > 0 %} + {{Line.unitQuantity}} x {{ Line.unitPrice|money }} + {% endif %} + {% else %} + {% if Line.unitPriceOverride > 0 %} + {{Line.unitQuantity}} x {{ Line.unitPriceOverride|money }} + {% elseif Line.unitPrice > 0 %} + {{Line.unitQuantity}} x {{ Line.unitPrice|money }} + {% endif %} + {% endif %} + {% elseif options.itemized_hours_labor == true and Line.unitPriceOverride == '0'%} + {% if Line.hours > 0 or Line.minutes > 0 %} + {{ Line.hours }} uren {{ Line.minutes }} minuten + {% else %} + {{Line.unitQuantity}} + {% endif %} + {% else %} + {{Line.unitQuantity}} + {% endif %} + + {% if Line.warranty == 'false' %} + {{Line.SaleLine.displayableSubtotal|money}} + {% elseif Line.warranty == 'true' %} + €0.00 + {% endif %} + + + {% for WorkorderSaleLine in Line.SaleLine %} + {% if WorkorderSaleLine.itemFeeID != 0 and (WorkorderSaleLine.lineType == 'item_fee' or WorkorderSaleLine.lineType == 'item_fee_refund') %} + + +
+ {% autoescape true %}{{ WorkorderSaleLine.ItemFee.name|nl2br }}{% endautoescape %} +
+ + {{ WorkorderSaleLine.unitQuantity }} + {{ WorkorderSaleLine.ItemFee.feeValue|money }} + + {% endif %} + {% endfor %} +{% endmacro %} + +{% macro lineDescription(Line,options) %} + {% if Line.itemID != 0 %} +
+ {% autoescape true %}{{ Line.Item.description|nl2br }}{% endautoescape %} +
+ {% if Line.note|strlen > 0 %} +
+ {% autoescape true %}{{ Line.note|noteformat|raw }}{% endautoescape %} +
+ {% endif %} + {% if Line.isSpecialOrder == 'true' %} +
+ Werknemer: {{ Line.Employee.firstName }} {{ Line.Employee.lastName }} +
+ {% endif %} + {% else %} +
+ {% autoescape true %}{{ Line.note|noteformat|raw }}{% endautoescape %} + {% if options.employee_name_on_labor_charges == true %} +
+ Werknemer: {{ Line.Employee.firstName }} {{ Line.Employee.lastName }} +
+ {% endif %} +
+ {% endif %} +{% endmacro %}