blob: 712eefd8cf63d6cd44e3763dae551e84df397a8f [file] [log] [blame]
Anand Doshi1947b172016-03-23 12:12:38 +05301{% extends "templates/web.html" %}
Anand Doshie3bd78e2016-04-22 18:53:21 +05302{% from "erpnext/templates/includes/order/order_macros.html" import item_name_and_description %}
Rushabh Mehta156ce602015-09-11 18:49:59 +05303
Saurabhdf2783d2016-01-06 15:21:21 +05304{% block breadcrumbs %}
5 {% include "templates/includes/breadcrumbs.html" %}
6{% endblock %}
7
Rushabh Mehtaa3340622016-06-23 18:25:50 +05308{% block title %}{{ doc.name }}{% endblock %}
9
Rushabh Mehtadbb51542017-08-10 21:06:09 +053010{% block header %}
11 <h1>{{ doc.name }}</h1>
12{% endblock %}
13
14{% block header_actions %}
15<a class='btn btn-xs btn-default' href='/printview?doctype={{ doc.doctype}}&name={{ doc.name }}&format={{ print_format }}' target="_blank" rel="noopener noreferrer">{{ _("Print") }}</a>
16{% endblock %}
Rushabh Mehta156ce602015-09-11 18:49:59 +053017
Rushabh Mehta51008f22016-01-01 17:23:12 +053018{% block page_content %}
Rushabh Mehta156ce602015-09-11 18:49:59 +053019
Anand Doshie3bd78e2016-04-22 18:53:21 +053020<div class="row transaction-subheading">
Manas Solankida486ee2018-07-06 12:36:57 +053021 <div class="col-xs-6">
22 <span class="indicator {{ doc.indicator_color or ("blue" if doc.docstatus==1 else "darkgrey") }}">
23 {{ _(doc.indicator_title) or _(doc.status) or _("Submitted") }}
24 </span>
Saurabh0a0c7872016-01-04 17:37:54 +053025 </div>
Manas Solankida486ee2018-07-06 12:36:57 +053026 <div class="col-xs-6 text-muted text-right small">
27 {{ frappe.utils.formatdate(doc.transaction_date, 'medium') }}
Rushabh Mehtadbb51542017-08-10 21:06:09 +053028 {% if doc.valid_till %}
29 <p>
Manas Solankida486ee2018-07-06 12:36:57 +053030 {{ _("Valid Till") }}: {{ frappe.utils.formatdate(doc.valid_till, 'medium') }}
Rushabh Mehtadbb51542017-08-10 21:06:09 +053031 </p>
32 {% endif %}
Manas Solankida486ee2018-07-06 12:36:57 +053033 </div>
Rushabh Mehta156ce602015-09-11 18:49:59 +053034</div>
35
Rushabh Mehtadbb51542017-08-10 21:06:09 +053036<p class='small' style='padding-top: 15px;'>
37{% if doc.doctype == 'Supplier Quotation' %}
Manas Solankida486ee2018-07-06 12:36:57 +053038 <b>{{ doc.supplier_name}}</b>
Rushabh Mehtadbb51542017-08-10 21:06:09 +053039{% else %}
Manas Solankida486ee2018-07-06 12:36:57 +053040 <b>{{ doc.customer_name}}</b>
Rushabh Mehtadbb51542017-08-10 21:06:09 +053041{% endif %}
42{% if doc.contact_display %}
43 <br>
44 {{ doc.contact_display }}
45{% endif %}
46</p>
47
Rushabh Mehta156ce602015-09-11 18:49:59 +053048{% if doc._header %}
49{{ doc._header }}
50{% endif %}
51
52<div class="order-container">
53
Manas Solankida486ee2018-07-06 12:36:57 +053054 <!-- items -->
55 <div class="order-item-table">
56 <div class="row order-items order-item-header text-muted">
57 <div class="col-sm-6 col-xs-6 h6 text-uppercase">
58 {{ _("Item") }}
59 </div>
60 <div class="col-sm-3 col-xs-3 text-right h6 text-uppercase">
61 {{ _("Quantity") }}
62 </div>
63 <div class="col-sm-3 col-xs-3 text-right h6 text-uppercase">
64 {{ _("Amount") }}
65 </div>
66 </div>
67 {% for d in doc.items %}
68 <div class="row order-items">
69 <div class="col-sm-6 col-xs-6">
70 {{ item_name_and_description(d) }}
71 </div>
72 <div class="col-sm-3 col-xs-3 text-right">
73 {{ d.qty }}
74 {% if d.delivered_qty is defined and d.delivered_qty != None %}
75 <p class="text-muted small">{{
76 _("Delivered: {0}").format(d.delivered_qty) }}</p>
77 {% endif %}
78 </div>
79 <div class="col-sm-3 col-xs-3 text-right">
80 {{ d.get_formatted("amount") }}
81 <p class="text-muted small">{{
82 _("@ {0}").format(d.get_formatted("rate")) }}</p>
83 </div>
84 </div>
85 {% endfor %}
86 </div>
Rushabh Mehta156ce602015-09-11 18:49:59 +053087
Manas Solankida486ee2018-07-06 12:36:57 +053088 <!-- taxes -->
89 <div class="order-taxes row">
90 <div class="col-sm-6"><!-- empty --></div>
91 <div class="col-sm-6 text-right">
92 {% include "erpnext/templates/includes/order/order_taxes.html" %}
93 </div>
94 </div>
Rushabh Mehta156ce602015-09-11 18:49:59 +053095</div>
96
Manas Solankida486ee2018-07-06 12:36:57 +053097{% if enabled_checkout and ((doc.doctype=="Sales Order" and doc.per_billed <= 0)
98 or (doc.doctype=="Sales Invoice" and doc.outstanding_amount > 0)) %}
99
100<div class="panel panel-default">
101 <div class="panel-heading">
102 <div class="row">
103 <div class="form-column col-sm-6 address-title">
104 <strong>Payment</strong>
Saurabh0a0c7872016-01-04 17:37:54 +0530105 </div>
Manas Solankida486ee2018-07-06 12:36:57 +0530106 </div>
Saurabh0a0c7872016-01-04 17:37:54 +0530107 </div>
Manas Solankida486ee2018-07-06 12:36:57 +0530108 <div class="panel-collapse">
109 <div class="panel-body text-muted small">
110 <div class="row">
111 <div class="form-column col-sm-6">
112 {% if available_loyalty_points %}
113 <div class="form-group">
114 <div class="h6">Enter Loyalty Points</div>
115 <div class="control-input-wrapper">
116 <div class="control-input">
117 <input class="form-control" type="number" min="0" max="{{ available_loyalty_points }}" id="loyalty-point-to-redeem">
118 </div>
119 <p class="help-box small text-muted hidden-xs"> Available Points: {{ available_loyalty_points }} </p>
120 </div>
121 </div>
122 {% endif %}
123 </div>
124
125 <div class="form-column col-sm-6">
126 <div id="loyalty-points-status" style="text-align: right"></div>
127 <div class="page-header-actions-block" data-html-block="header-actions">
128 <p>
129 <a href="/api/method/erpnext.accounts.doctype.payment_request.payment_request.make_payment_request?dn={{ doc.name }}&dt={{ doc.doctype }}&submit_doc=1&order_type=Shopping Cart"
130 class="btn btn-primary btn-sm" id="pay-for-order">{{ _("Pay") }} {{ doc.get_formatted("grand_total") }} </a>
131 </p>
132 </div>
133 </div>
134
135 </div>
136
137 </div>
138 </div>
139</div>
140{% endif %}
141
Rushabh Mehtadbb51542017-08-10 21:06:09 +0530142
Charles-Henri Decultot2de1cd32017-05-19 12:34:10 +0200143{% if attachments %}
144<div class="order-item-table">
145 <div class="row order-items order-item-header text-muted">
146 <div class="col-sm-12 h6 text-uppercase">
147 {{ _("Attachments") }}
148 </div>
149 </div>
150 <div class="row order-items">
151 <div class="col-sm-12">
152 {% for attachment in attachments %}
153 <p class="small">
154 <a href="{{ attachment.file_url }}" target="blank"> {{ attachment.file_name }} </a>
155 </p>
156 {% endfor %}
157 </div>
158 </div>
Saurabh276d3e62015-12-31 13:26:36 +0530159</div>
Charles-Henri Decultot2de1cd32017-05-19 12:34:10 +0200160{% endif %}
161</div>
Rushabh Mehtadbb51542017-08-10 21:06:09 +0530162{% if doc.terms %}
163<div class="terms-and-condition text-muted small">
Manas Solankida486ee2018-07-06 12:36:57 +0530164 <hr><p>{{ doc.terms }}</p>
Rushabh Mehtadbb51542017-08-10 21:06:09 +0530165</div>
166{% endif %}
Rushabh Mehta156ce602015-09-11 18:49:59 +0530167{% endblock %}
Manas Solankida486ee2018-07-06 12:36:57 +0530168
169{% block script %}
170 <script> {% include "templates/pages/order.js" %} </script>
171 <script>
172 window.doc_info = {
173 customer: '{{doc.customer}}',
174 doctype: '{{ doc.doctype }}',
175 doctype_name: '{{ doc.name }}',
176 grand_total: '{{ doc.grand_total }}',
177 currency: '{{ doc.currency }}'
178 }
179 </script>
180{% endblock %}