-
-
Save MaxMorais/0044b4313fbebc1d7790 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
table.black { | |
background-color: #000 !important; | |
height: 1px; | |
width: 100%; | |
} | |
table.black > tr > td { | |
color: white; | |
text-decoration: bold; | |
font-weight: 3; | |
} | |
table.black > tr > td.fs4 { | |
font-weight: 4; | |
} | |
</style> | |
{%- macro add_header(page_num, max_pages, doc) -%} | |
{%- if doc.meta.is_submittable and doc.docstatus==2-%} | |
<div class="alert alert-danger text-center"> | |
<h4 style="margin: 0px;">{{ _("CANCELLED") }}</h4></div> | |
{%- endif -%} | |
{% if max_pages > 1 %} | |
<p class="text-right">{{ _("Page #{0} of {1}").format(page_num, max_pages) }}</p> | |
{% endif %} | |
{%- endmacro -%} | |
<small> | |
<font face="verdana"> | |
<table style="width: 100%; height: 60px;"> | |
<tr> | |
<td style="width: 40%;"><img src="/files/Mclean Logo for email.jpg" height="75" width="179"></td> | |
<td style="width: 30%;"><img src="http://www.barcodes4.me/barcode/qr/myfilename.png?value=https://mcleanimages.frappecloud.com/desk%23Form/Sales%20Order/{{ doc.name }}"> | |
</td> | |
<td style="width: 20%; text-align: left;"><font size="4">Order No:</font> <font size="5"><b> | |
{%- if doc.deco_no -%} | |
{{ doc.deco_no }} | |
{%- else -%} | |
{{ doc.name }} | |
{%- endif -%} | |
</b></font></td> | |
</tr> | |
</table> | |
<table class="black"> | |
<tr> | |
<td class="fs4">{{ doc.contact_display }} | {{ doc.customer_name }}</td> | |
</tr> | |
</table> | |
<p> | |
<font size="3"> <b> Job Name: {{ doc.job_name }} </b> </font><p> | |
<div class="row"> | |
<div class="col-xs-7"> | |
<div class="row"> | |
<div class="col-xs-4 text-left"><big><b>Shipping Address:</b></big></div> | |
<div class="col-xs-8 "><big>{% if doc.manual_address_1 %} | |
{{ doc.manual_contact }}<br>{{ doc.manual_address_1.replace('\n', "<br/>") }} | |
{% else %} | |
{{ doc.contact_display }}<br> | |
{{ doc.customer_name }}<br> | |
{{ doc.address_display }} | |
{% endif %}</big> </div> | |
</div> | |
<div class="row"> | |
<div class="col-xs-8 text-left"><big>{{ frappe.db.get_value("Address", {"customer": doc.customer}, "phone") }}</big></div> | |
</div> | |
</div> | |
<div class="col-xs-5"> | |
<div class="row"> | |
<div class="col-xs-6 text-right"><big><b>Cust Order No:</b></big></div> | |
<div class="col-xs-6 "><big>{{ doc.po_no or '' }}</big> </div> | |
</div> | |
<div class="row"> | |
<div class="col-xs-6 text-right"> <big><b>Order Date:</b></big> </div> | |
<div class="col-xs-6 "> | |
<big>{{ doc.get_formatted("transaction_date") }}</big></div> | |
</div> | |
<div class="row"> | |
<font color = "red"> | |
<div class="col-xs-6 text-right"><big><b>Due Date:</b></big></div> | |
<div class="col-xs-6 "><big><b>{{ doc.get_formatted("delivery_date") }}</b></big> </div> | |
</font> | |
</div> | |
<div class="row"> | |
<div class="col-xs-6 text-right"> <big><b>Ship By:</b></big> </div> | |
<div class="col-xs-6 "> | |
<big>{{ doc.ship_by }}</big></div> | |
</div> | |
</div> | |
</div> | |
<br> | |
<table class="black"> | |
<tr> | |
<td> Items </td> | |
</tr> | |
</table> | |
<table class="table table-condensed table-hover table-bordered"> | |
{%- for row in doc.sales_order_details -%} | |
{% if frappe.db.get_value("Item", row.item_code, "item_group") != 'Services' %} | |
<tr> | |
<td style="width: 5%; vertical-align: top; font-size:9pt"><br>{{ row.idx }}</td> | |
<td style="width: 95%; text-align: left; font-size:9pt"> | |
<b> Quantity: </b> {{ '%4d' % row.qty or '' }} <br> | |
{%- if row.job_type -%} | |
<b> Job Type: </b> {{ row.job_type or '' }} <br> | |
{%- endif -%} | |
{%- if row.description -%} | |
<b> Description: </b> {{ row.description.replace('\n', "<br/>") or '' }} <br> | |
{%- endif -%} | |
{%- if row.print_process -%} | |
<b> Print Process: </b> {{ row.print_process or '' }} <br> | |
{%- endif -%} | |
{%- if row.stock -%} | |
<b> Stock: </b> {{ row.stock or '' }} <br> | |
{%- endif -%} | |
{%- if row.stock_colour -%} | |
<b> Stock Colour(s): </b> {{ row.stock_colour or '' }} <br> | |
{%- endif -%} | |
{%- if row.code_or_supplier -%} | |
<b> Code or Supplier: </b> {{ row.code_or_supplier or '' }} <br> | |
{%- endif -%} | |
{%- if row.size -%} | |
<b> Size: </b> {{ row.size.replace('\n', "<br/>") or '' }} <br> | |
{%- endif -%} | |
{%- if row.thickness -%} | |
<b> Thickness: </b> {{ row.thickness or '' }} <br> | |
{%- endif -%} | |
{%- if row.print_pms_colours -%} | |
<b> Print Colours: </b> {{ row.print_pms_colours or '' }} <br> | |
{%- endif -%} | |
{%- if row.print_positions -%} | |
<b> Print Position(s): </b> {{ row.print_positions.replace('\n', "<br/>") or '' }} <br> | |
{%- endif -%} | |
{%- if row.sides -%} | |
<b> Sides: </b> {{ row.sides or '' }} <br> | |
{%- endif -%} | |
{%- if row.copy_type -%} | |
<b> Copy Type: </b> {{ row.copy_type or '' }} <br> | |
{%- endif -%} | |
{%- if row.perforation -%} | |
<b> Perforation: </b> {{ row.perforation or '' }} <br> | |
{%- endif -%} | |
{%- if row.tape -%} | |
<b> Tape: </b> {{ row.tape or '' }} <br> | |
{%- endif -%} | |
{%- if row.binding_type -%} | |
<b> Binding Type: </b> {{ row.binding_type or '' }} <br> | |
{%- endif -%} | |
{%- if row.cover -%} | |
<b> Cover: </b> {{ row.cover or '' }} <br> | |
{%- endif -%} | |
{%- if row.starting_number -%} | |
<b> Start Number: </b> {{ row.starting_number or '' }} <br> | |
{%- endif -%} | |
{%- if row.terms_and_conditions -%} | |
<b> Ts & Cs: </b> {{ row.terms_and_conditions or '' }} <br> | |
{%- endif -%} | |
{%- if row.magnet_grade -%} | |
<b> Magnet Grade: </b> {{ row.magnet_grade or '' }} <br> | |
{%- endif -%} | |
{%- if row.number_up -%} | |
<b> Number Up: </b> {{ row.number_up or '' }} <br> | |
{%- endif -%} | |
{%- if row.application -%} | |
<b> Application: </b> {{ row.application or '' }} <br> | |
{%- endif -%} | |
{%- if row.finishing -%} | |
<b> Finishing: </b> {{ row.finishing or '' }} <br> | |
{%- endif -%} | |
{%- if row.finishing_gen -%} | |
<b> Finishing: </b> {{ row.finishing_gen or '' }} <br> | |
{%- endif -%} | |
{%- if row.finishing_mgt -%} | |
<b> Finishing: </b> {{ row.finishing_mgt or '' }} <br> | |
{%- endif -%} | |
{%- if row.finishing_cor -%} | |
<b> Finishing: </b> {{ row.finishing_cor or '' }} <br> | |
{%- endif -%} | |
{%- if row.finishing_bsc -%} | |
<b> Finishing: </b> {{ row.finishing_bsc or '' }} <br> | |
{%- endif -%} | |
{%- if row.finishing_stk -%} | |
<b> Finishing: </b> {{ row.finishing_stk or '' }} <br> | |
{%- endif -%} | |
{%- if row.other_details -%} | |
<b> Other: </b> {{ row.other_details.replace('\n', "<br/>") or '' }} <br> | |
{%- endif -%} | |
</td> | |
<td style="font-size:9pt"> | |
<div style="width: 250px">{{ doc.artwork }}</div><br> | |
{%- if row.artwork_instructions -%} | |
<b> Artwork Instructions: </b> {{ row.artwork_instructions.replace('\n', "<br/>") or '' }} <br> | |
{%- endif -%} | |
</td> | |
</tr> | |
{% endif %} | |
{%- endfor -%} | |
</tbody> | |
</table> | |
{%- if doc.general_information -%} | |
{{ doc.general_information }} | |
{%- endif -%} | |
<p> | |
{%- if doc.despatch_instructions -%} | |
<table class="table table-condensed table-hover table-bordered"> | |
<tr> | |
<th class="text-left"><b>Special Despatch Instructions:</b></th> | |
</tr> | |
<tr> | |
<td> | |
<!-- Some fun with disco balls :) | |
<img src="https://images.blogthings.com/thediscoballtest/disco-ball-6.png" height="75" width="75"><img src="http://cloud.graphicleftovers.com/22015/390070/disco-ball.jpg" height="75" width="75"><img src="http://www.zoomwollongong.com.au/wp-content/uploads/2014/11/disco-ball.jpg" height="75" width="75"><img src="http://cloud.graphicleftovers.com/22015/390040/disco-ball-and-dancing-people.jpg" height="75" width="75"><img src="http://cloud.graphicleftovers.com/22015/390040/disco-ball-and-dancing-people.jpg" height="75" width="75"><img src="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQ_UzATTvsF8HeOKBQh-hYXVGe9EXhQvQDHClDFSucsJNl0JaNx" height="75" width="75"><img src="http://www.pssl.com/images/ProdImage01/1500/12-BALL.jpg" height="75" width="75"><img src="http://thumbs.dreamstime.com/z/colorful-disco-ball-17691781.jpg" height="75" width="75"> | |
--> | |
<b><font size="3"><font color="red">{{ doc.despatch_instructions }}</font></b></td> | |
</tr> | |
{%- endif -%} | |
<p> | |
<!-- Can use this to print terms on the document | |
<div class="row"> | |
<div class="col-xs-12 text-left">{{ doc.terms }}</div> | |
</div> | |
--> | |
</small> | |
</font> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment