blob: 6b354b2fab6d5a0a06a512029a1f146b9faec127 [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
Summayya Hashmanida43a5e2022-10-04 09:57:07 +05308{% block title %}
9 {{ doc.name }}
10{% endblock %}
Rushabh Mehtaa3340622016-06-23 18:25:50 +053011
Rushabh Mehtadbb51542017-08-10 21:06:09 +053012{% block header %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053013 <h3 class="m-0">{{ doc.name }}</h3>
Rushabh Mehtadbb51542017-08-10 21:06:09 +053014{% endblock %}
15
16{% block header_actions %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053017 <div class="row">
18 <div class="dropdown">
19 <button class="btn btn-sm btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
20 <span class="font-md">{{ _('Actions') }}</span>
21 <b class="caret"></b>
22 </button>
23 <ul class="dropdown-menu dropdown-menu-right" role="menu">
24 {% if doc.doctype == 'Purchase Order' and show_make_pi_button %}
25 <a class="dropdown-item"
26 href="/api/method/erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_invoice_from_portal?purchase_order_name={{ doc.name }}"
27 data-action="make_purchase_invoice">{{ _("Make Purchase Invoice") }}
28 </a>
29 {% endif %}
30 <a class="dropdown-item"
31 href='/printview?doctype={{ doc.doctype}}&name={{ doc.name }}&format={{ print_format }}' target="_blank"
32 rel="noopener noreferrer">
33 {{ _("Print") }}
34 </a>
35 </ul>
36 </div>
37 <div class="form-column col-sm-6">
38 <div class="page-header-actions-block" data-html-block="header-actions">
39 <p>
40 <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"
41 class="btn btn-primary btn-sm" id="pay-for-order">
42 {{ _("Pay") }} {{doc.get_formatted("grand_total") }}
43 </a>
44 </p>
45 </div>
46 </div>
marination3a325962021-10-27 10:57:48 +053047 </div>
Rushabh Mehtadbb51542017-08-10 21:06:09 +053048{% endblock %}
Rushabh Mehta156ce602015-09-11 18:49:59 +053049
Rushabh Mehta51008f22016-01-01 17:23:12 +053050{% block page_content %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053051 <div>
52 <div class="row transaction-subheading mt-1">
53 <div class="col-6 text-muted small mt-1">
54 {{ frappe.utils.format_date(doc.transaction_date, 'medium') }}
55 {% if doc.valid_till %}
56 <p>
57 {{ _("Valid Till") }}: {{ frappe.utils.format_date(doc.valid_till, 'medium') }}
58 </p>
Anupama4df1052020-09-24 13:21:54 +053059 {% endif %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053060 </div>
Manas Solankida486ee2018-07-06 12:36:57 +053061 </div>
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053062 <div class="row indicator-container mt-2">
63 <div class="col-10">
64 <span class="indicator-pill {{ doc.indicator_color or (" blue" if doc.docstatus==1 else "darkgrey" ) }}">
65 {% if doc.doctype == "Quotation" and not doc.docstatus %}
66 {{ _("Pending") }}
67 {% else %}
68 {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }}
marination3a325962021-10-27 10:57:48 +053069 {% endif %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053070 </span>
71 </div>
72 <div class="text-right col-2">
73 {%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase
74 Order'] else doc.customer_name %}
75 <b>{{ party_name }}</b>
76
77 {% if doc.contact_display and doc.contact_display != party_name %}
78 <br>
79 {{ doc.contact_display }}
80 {% endif %}
81 </div>
82 </div>
83
84 {% if doc._header %}
85 {{ doc._header }}
86 {% endif %}
87
88 <div class="order-container mt-4">
89 <!-- items -->
90 <div class="w-100">
91 <div class="order-items order-item-header mb-1 row text-muted">
92 <span class="col-5">
93 {{ _("Item") }}
94 </span>
95 <span class="d-s-n col-3">
96 {{ _("Quantity") }}
97 </span>
98 <span class="col-2 pl-10">
99 {{ _("Rate") }}
100 </span>
101 <span class="col-2 text-right">
102 {{ _("Amount") }}
103 </span>
104 </div>
105 {% for d in doc.items %}
106 <div class="order-items row align-items-center">
107 <span class="order-item-name col-5 pr-0">
108 {{ item_name_and_description(d) }}
109 </span>
110
111 <span class="d-s-n col-3 pl-10">
112 {{ d.get_formatted("qty") }}
113 </span>
114 <span class="order-rate pl-4 col-2">
115 {{ d.get_formatted("rate") }}
116 </span>
117 <span class="col-2 text-right">
118 {{ d.get_formatted("amount") }}
119 </span>
120 </div>
121 {% endfor %}
122 </div>
123
124 <!-- taxes -->
125 <div class="">
marination3a325962021-10-27 10:57:48 +0530126 {% include "erpnext/templates/includes/order/order_taxes.html" %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530127 </div>
marination3a325962021-10-27 10:57:48 +0530128 </div>
129 </div>
130
131 {% if enabled_checkout and ((doc.doctype=="Sales Order" and doc.per_billed <= 0)
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530132 or (doc.doctype=="Sales Invoice" and doc.outstanding_amount> 0)) %}
marination3a325962021-10-27 10:57:48 +0530133 <div class="panel panel-default">
marination3a325962021-10-27 10:57:48 +0530134 <div class="panel-collapse">
135 <div class="panel-body text-muted small">
136 <div class="row">
137 <div class="form-column col-sm-6">
138 {% if available_loyalty_points %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530139 <div class="panel-heading">
140 <div class="row">
141 <div class="form-column col-sm-6 address-title">
142 <strong>Loyalty Points</strong>
143 </div>
144 </div>
145 </div>
146
marination3a325962021-10-27 10:57:48 +0530147 <div class="form-group">
148 <div class="h6">Enter Loyalty Points</div>
149 <div class="control-input-wrapper">
150 <div class="control-input">
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530151 <input class="form-control" type="number" min="0"
152 max="{{ available_loyalty_points }}" id="loyalty-point-to-redeem">
marination3a325962021-10-27 10:57:48 +0530153 </div>
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530154 <p class="help-box small text-muted d-none d-sm-block"> Available Points: {{
155 available_loyalty_points }} </p>
marination3a325962021-10-27 10:57:48 +0530156 </div>
157 </div>
158 {% endif %}
159 </div>
marination3a325962021-10-27 10:57:48 +0530160 </div>
marination3a325962021-10-27 10:57:48 +0530161 </div>
162 </div>
163 </div>
164 {% endif %}
165
166
167 {% if attachments %}
168 <div class="order-item-table">
169 <div class="row order-items order-item-header text-muted">
170 <div class="col-sm-12 h6 text-uppercase">
171 {{ _("Attachments") }}
172 </div>
173 </div>
174 <div class="row order-items">
175 <div class="col-sm-12">
176 {% for attachment in attachments %}
177 <p class="small">
178 <a href="{{ attachment.file_url }}" target="blank"> {{ attachment.file_name }} </a>
179 </p>
180 {% endfor %}
181 </div>
182 </div>
183 </div>
184 {% endif %}
marination3a325962021-10-27 10:57:48 +0530185
186 {% if doc.terms %}
187 <div class="terms-and-condition text-muted small">
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530188 <hr>
189 <p>{{ doc.terms }}</p>
marination3a325962021-10-27 10:57:48 +0530190 </div>
191 {% endif %}
Rushabh Mehta156ce602015-09-11 18:49:59 +0530192{% endblock %}
Manas Solankida486ee2018-07-06 12:36:57 +0530193
194{% block script %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530195 <script> {% include "templates/pages/order.js" %}</script>
Manas Solankida486ee2018-07-06 12:36:57 +0530196 <script>
197 window.doc_info = {
198 customer: '{{doc.customer}}',
199 doctype: '{{ doc.doctype }}',
200 doctype_name: '{{ doc.name }}',
201 grand_total: '{{ doc.grand_total }}',
202 currency: '{{ doc.currency }}'
203 }
204 </script>
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530205{% endblock %}