Skip to content

Commit

Permalink
LSR-27518: [Receipts] - Update Print Templates Repo (#95)
Browse files Browse the repository at this point in the history
* LSR-27518: update print templates for item fees feature

* LSR-27518: update print templates for item fees feature

* LSR-27518: update print templates for item fees feature

* LSR-27518: update print templates for item fees feature

* LSR-27518: update print templates for item fees feature

* LSR-27518: update print templates for item fees feature
  • Loading branch information
ls-lindsay-powerharding authored Mar 20, 2024
1 parent 93b59f5 commit 234fe96
Show file tree
Hide file tree
Showing 13 changed files with 282 additions and 16 deletions.
15 changes: 15 additions & 0 deletions receipt/SaleReceipt.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,14 @@ table div.line_serial {
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;
Expand Down Expand Up @@ -681,6 +689,10 @@ table.payments td.label {
<div class='line_description'>
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
</div>
{% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %}
<div class="line_description_item_fee">
{{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}
</div>
{% endif %}
{% if Line.Note %}
<div class='line_note'>
Expand Down Expand Up @@ -974,6 +986,9 @@ table.payments td.label {
{% if not parameters.gift_receipt %}
<table class="saletotals totals">
<tbody id="receiptSaleTotals">
{% if Sale.MetaData.itemFeesSubtotal %}
<tr><td width="100%">Fee total</td><td id="receiptSaleItemFeesTotal" class="amount">{{Sale.MetaData.itemFeesSubtotal|money}}</td></tr>
{% endif %}
<tr>
<td width="100%">
{% if options.discounted_line_items and Sale.calcDiscount != 0 %}
Expand Down
15 changes: 15 additions & 0 deletions receipt/SaleReceipt_de_CH.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,14 @@ table div.line_serial {
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;
Expand Down Expand Up @@ -681,6 +689,10 @@ table.payments td.label {
<div class='line_description'>
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
</div>
{% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %}
<div class="line_description_item_fee">
{{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}
</div>
{% endif %}
{% if Line.Note %}
<div class='line_note'>
Expand Down Expand Up @@ -974,6 +986,9 @@ table.payments td.label {
{% if not parameters.gift_receipt %}
<table class="saletotals totals">
<tbody id="receiptSaleTotals">
{% if Sale.MetaData.itemFeesSubtotal %}
<tr><td width="100%">Summe Gebührenbetrag</td><td id="receiptSaleItemFeesTotal" class="amount">{{Sale.MetaData.itemFeesSubtotal|money}}</td></tr>
{% endif %}
<tr>
<td width="100%">
{% if options.discounted_line_items and Sale.calcDiscount != 0 %}
Expand Down
15 changes: 15 additions & 0 deletions receipt/SaleReceipt_es.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,14 @@ table div.line_serial {
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;
Expand Down Expand Up @@ -681,6 +689,10 @@ table.payments td.label {
<div class='line_description'>
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
</div>
{% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %}
<div class="line_description_item_fee">
{{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}
</div>
{% endif %}
{% if Line.Note %}
<div class='line_note'>
Expand Down Expand Up @@ -974,6 +986,9 @@ table.payments td.label {
{% if not parameters.gift_receipt %}
<table class="saletotals totals">
<tbody id="receiptSaleTotals">
{% if Sale.MetaData.itemFeesSubtotal %}
<tr><td width="100%">Total de tarifas</td><td id="receiptSaleItemFeesTotal" class="amount">{{Sale.MetaData.itemFeesSubtotal|money}}</td></tr>
{% endif %}
<tr>
<td width="100%">
{% if options.discounted_line_items and Sale.calcDiscount != 0 %}
Expand Down
15 changes: 15 additions & 0 deletions receipt/SaleReceipt_fr_BE.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,14 @@ table div.line_serial {
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;
Expand Down Expand Up @@ -681,6 +689,10 @@ table.payments td.label {
<div class='line_description'>
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
</div>
{% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %}
<div class="line_description_item_fee">
{{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}
</div>
{% endif %}
{% if Line.Note %}
<div class='line_note'>
Expand Down Expand Up @@ -974,6 +986,9 @@ table.payments td.label {
{% if not parameters.gift_receipt %}
<table class="saletotals totals">
<tbody id="receiptSaleTotals">
{% if Sale.MetaData.itemFeesSubtotal %}
<tr><td width="100%">Total des frais</td><td id="receiptSaleItemFeesTotal" class="amount">{{Sale.MetaData.itemFeesSubtotal|money}}</td></tr>
{% endif %}
<tr>
<td width="100%">
{% if options.discounted_line_items and Sale.calcDiscount != 0 %}
Expand Down
15 changes: 15 additions & 0 deletions receipt/SaleReceipt_fr_CA-QC.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ table div.line_serial {
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;
Expand Down Expand Up @@ -685,6 +693,10 @@ table.payments td.label {
<div class='line_description'>
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
</div>
{% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %}
<div class="line_description_item_fee">
{{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}
</div>
{% endif %}
{% if Line.Note %}
<div class='line_note'>
Expand Down Expand Up @@ -978,6 +990,9 @@ table.payments td.label {
{% if not parameters.gift_receipt %}
<table class="saletotals totals">
<tbody id="receiptSaleTotals">
{% if Sale.MetaData.itemFeesSubtotal %}
<tr><td width="100%">Total des frais</td><td id="receiptSaleItemFeesTotal" class="amount">{{Sale.MetaData.itemFeesSubtotal|money}}</td></tr>
{% endif %}
<tr>
<td width="100%">
{% if options.discounted_line_items and Sale.calcDiscount != 0 %}
Expand Down
15 changes: 15 additions & 0 deletions receipt/SaleReceipt_fr_CH.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,14 @@ table div.line_serial {
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;
Expand Down Expand Up @@ -681,6 +689,10 @@ table.payments td.label {
<div class='line_description'>
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
</div>
{% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %}
<div class="line_description_item_fee">
{{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}
</div>
{% endif %}
{% if Line.Note %}
<div class='line_note'>
Expand Down Expand Up @@ -974,6 +986,9 @@ table.payments td.label {
{% if not parameters.gift_receipt %}
<table class="saletotals totals">
<tbody id="receiptSaleTotals">
{% if Sale.MetaData.itemFeesSubtotal %}
<tr><td width="100%">Total des frais</td><td id="receiptSaleItemFeesTotal" class="amount">{{Sale.MetaData.itemFeesSubtotal|money}}</td></tr>
{% endif %}
<tr>
<td width="100%">
{% if options.discounted_line_items and Sale.calcDiscount != 0 %}
Expand Down
15 changes: 15 additions & 0 deletions receipt/SaleReceipt_nl_BE.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,14 @@ table div.line_serial {
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;
Expand Down Expand Up @@ -681,6 +689,10 @@ table.payments td.label {
<div class='line_description'>
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
</div>
{% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %}
<div class="line_description_item_fee">
{{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}
</div>
{% endif %}
{% if Line.Note %}
<div class='line_note'>
Expand Down Expand Up @@ -974,6 +986,9 @@ table.payments td.label {
{% if not parameters.gift_receipt %}
<table class="saletotals totals">
<tbody id="receiptSaleTotals">
{% if Sale.MetaData.itemFeesSubtotal %}
<tr><td width="100%">Totaal kosten</td><td id="receiptSaleItemFeesTotal" class="amount">{{Sale.MetaData.itemFeesSubtotal|money}}</td></tr>
{% endif %}
<tr>
<td width="100%">
{% if options.discounted_line_items and Sale.calcDiscount != 0 %}
Expand Down
15 changes: 15 additions & 0 deletions receipt/SaleReceipt_nl_NL.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,14 @@ table div.line_serial {
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;
Expand Down Expand Up @@ -681,6 +689,10 @@ table.payments td.label {
<div class='line_description'>
{% autoescape true %}{{ Line.Item.description|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}{% endautoescape %}
</div>
{% elseif Line.ItemFee and Line.itemFeeID and (Line.lineType == 'item_fee' or Line.lineType == 'item_fee_refund') %}
<div class="line_description_item_fee">
{{ Line.ItemFee.name|nl2br }}{% if Line.tax == 'false' or (Line.calcTax1 == 0 and Line.calcTax2 == 0) %}*{% endif %}
</div>
{% endif %}
{% if Line.Note %}
<div class='line_note'>
Expand Down Expand Up @@ -974,6 +986,9 @@ table.payments td.label {
{% if not parameters.gift_receipt %}
<table class="saletotals totals">
<tbody id="receiptSaleTotals">
{% if Sale.MetaData.itemFeesSubtotal %}
<tr><td width="100%">Totaal kosten</td><td id="receiptSaleItemFeesTotal" class="amount">{{Sale.MetaData.itemFeesSubtotal|money}}</td></tr>
{% endif %}
<tr>
<td width="100%">
{% if options.discounted_line_items and Sale.calcDiscount != 0 %}
Expand Down
30 changes: 30 additions & 0 deletions workorder/customizable_workorder.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -356,11 +362,13 @@ img.barcode {
<th class="amount">Price</th>
</tr>
{% 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 %} <!--this loop is necessary for showing labor charges -->
Expand Down Expand Up @@ -406,6 +414,15 @@ img.barcode {
</tr>
{% endif %}

{% if Workorder.MetaData.itemFeesSubtotal %}
<tr>
<td>Fee total</td>
<td id="totalsFeesValue" class="amount">
{{Workorder.MetaData.itemFeesSubtotal|money}}
</td>
</tr>
{% endif %}

<tr>
<td>Tax</td>
<td id="totalsTaxValue" class="amount">
Expand Down Expand Up @@ -520,6 +537,19 @@ img.barcode {
{% endif %}
</td>
</tr>
{% for WorkorderSaleLine in Line.SaleLine %}
{% if WorkorderSaleLine.itemFeeID != 0 and (WorkorderSaleLine.lineType == 'item_fee' or WorkorderSaleLine.lineType == 'item_fee_refund') %}
<tr data-automation="lineItemRow">
<td data-automation="lineItemRowItemFee" class="item_fee_line_name">
<div>
{% autoescape true %}{{ WorkorderSaleLine.ItemFee.name|nl2br }}{% endautoescape %}
</div>
</td>
<td data-automation="lineItemFeeQuantity" class="quantity">{{ WorkorderSaleLine.unitQuantity }}</td>
<td data-automation="lineItemFeeRowCharge" class="amount">{{ WorkorderSaleLine.ItemFee.feeValue|money }}</td>
</tr>
{% endif %}
{% endfor %}
{% endmacro %}

{% macro lineDescription(Line,options) %}
Expand Down
Loading

0 comments on commit 234fe96

Please sign in to comment.