-
Notifications
You must be signed in to change notification settings - Fork 197
/
printbase.tpl
58 lines (55 loc) · 1.22 KB
/
printbase.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{% extends "base" %}
{% macro autoPrint() %}
<script type="text/javascript">
$(document).ready(function() {
{% if Sales %}
var printer_name = "receipt";
{% elseif Labels %}
var printer_name = "label";
{% else %}
var printer_name = "report";
{% endif %}
try {
merchantos.print.print(printer_name);
window.focus();
} catch (e) {
// do nothing
}
});
</script>
{% endmacro %}
{% block head %}
<head>
<title>{% block title %}MerchantOS - Print{% endblock %}</title>
<link rel="shortcut icon" href="/graphics/favicon.ico" type="image/vnd.microsoft.icon" />
{% block merchantos_js_css %}
$asset_block
{% endblock %}
{% block style %}
<style type="text/css">
* {
font-size: 10pt;
font-family: Arial,Helvetica,sans-serif;
}
@page {
margin: 0px:
}
html {
background: #FFFFFF;
}
body {
margin: 0px;
background: #FFFFFF;
color: #000000;
}
{% block extrastyles %}
{% endblock %}
</style>
{% endblock style %}
{% block autoprint %}
{% if not parameters.no_auto_print %}
{{ _self.autoPrint() }}
{% endif %}
{% endblock %}
</head>
{% endblock head %}