blob: bc34ad5ac50037acb569b23943319719d1565be3 [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>
s-aga-r20bdc632023-02-08 15:02:39 +053037 {% if show_pay_button %}
38 <div class="form-column col-sm-6">
39 <div class="page-header-actions-block" data-html-block="header-actions">
40 <p>
41 <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"
42 class="btn btn-primary btn-sm" id="pay-for-order">
43 {{ _("Pay") }} {{doc.get_formatted("grand_total") }}
44 </a>
45 </p>
46 </div>
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053047 </div>
s-aga-r20bdc632023-02-08 15:02:39 +053048 {% endif %}
marination3a325962021-10-27 10:57:48 +053049 </div>
Rushabh Mehtadbb51542017-08-10 21:06:09 +053050{% endblock %}
Rushabh Mehta156ce602015-09-11 18:49:59 +053051
Rushabh Mehta51008f22016-01-01 17:23:12 +053052{% block page_content %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053053 <div>
54 <div class="row transaction-subheading mt-1">
55 <div class="col-6 text-muted small mt-1">
56 {{ frappe.utils.format_date(doc.transaction_date, 'medium') }}
57 {% if doc.valid_till %}
58 <p>
59 {{ _("Valid Till") }}: {{ frappe.utils.format_date(doc.valid_till, 'medium') }}
60 </p>
Anupama4df1052020-09-24 13:21:54 +053061 {% endif %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053062 </div>
Manas Solankida486ee2018-07-06 12:36:57 +053063 </div>
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053064 <div class="row indicator-container mt-2">
65 <div class="col-10">
66 <span class="indicator-pill {{ doc.indicator_color or (" blue" if doc.docstatus==1 else "darkgrey" ) }}">
67 {% if doc.doctype == "Quotation" and not doc.docstatus %}
68 {{ _("Pending") }}
69 {% else %}
70 {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }}
marination3a325962021-10-27 10:57:48 +053071 {% endif %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053072 </span>
73 </div>
74 <div class="text-right col-2">
75 {%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase
76 Order'] else doc.customer_name %}
77 <b>{{ party_name }}</b>
78
79 {% if doc.contact_display and doc.contact_display != party_name %}
80 <br>
81 {{ doc.contact_display }}
82 {% endif %}
83 </div>
84 </div>
85
86 {% if doc._header %}
87 {{ doc._header }}
88 {% endif %}
89
90 <div class="order-container mt-4">
91 <!-- items -->
92 <div class="w-100">
93 <div class="order-items order-item-header mb-1 row text-muted">
94 <span class="col-5">
95 {{ _("Item") }}
96 </span>
97 <span class="d-s-n col-3">
98 {{ _("Quantity") }}
99 </span>
100 <span class="col-2 pl-10">
101 {{ _("Rate") }}
102 </span>
103 <span class="col-2 text-right">
104 {{ _("Amount") }}
105 </span>
106 </div>
107 {% for d in doc.items %}
108 <div class="order-items row align-items-center">
109 <span class="order-item-name col-5 pr-0">
110 {{ item_name_and_description(d) }}
111 </span>
112
113 <span class="d-s-n col-3 pl-10">
114 {{ d.get_formatted("qty") }}
115 </span>
116 <span class="order-rate pl-4 col-2">
117 {{ d.get_formatted("rate") }}
118 </span>
119 <span class="col-2 text-right">
120 {{ d.get_formatted("amount") }}
121 </span>
122 </div>
123 {% endfor %}
124 </div>
125
126 <!-- taxes -->
127 <div class="">
marination3a325962021-10-27 10:57:48 +0530128 {% include "erpnext/templates/includes/order/order_taxes.html" %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530129 </div>
marination3a325962021-10-27 10:57:48 +0530130 </div>
131 </div>
132
133 {% if enabled_checkout and ((doc.doctype=="Sales Order" and doc.per_billed <= 0)
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530134 or (doc.doctype=="Sales Invoice" and doc.outstanding_amount> 0)) %}
marination3a325962021-10-27 10:57:48 +0530135 <div class="panel panel-default">
marination3a325962021-10-27 10:57:48 +0530136 <div class="panel-collapse">
137 <div class="panel-body text-muted small">
138 <div class="row">
139 <div class="form-column col-sm-6">
140 {% if available_loyalty_points %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530141 <div class="panel-heading">
142 <div class="row">
143 <div class="form-column col-sm-6 address-title">
144 <strong>Loyalty Points</strong>
145 </div>
146 </div>
147 </div>
148
marination3a325962021-10-27 10:57:48 +0530149 <div class="form-group">
150 <div class="h6">Enter Loyalty Points</div>
151 <div class="control-input-wrapper">
152 <div class="control-input">
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530153 <input class="form-control" type="number" min="0"
154 max="{{ available_loyalty_points }}" id="loyalty-point-to-redeem">
marination3a325962021-10-27 10:57:48 +0530155 </div>
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530156 <p class="help-box small text-muted d-none d-sm-block"> Available Points: {{
157 available_loyalty_points }} </p>
marination3a325962021-10-27 10:57:48 +0530158 </div>
159 </div>
160 {% endif %}
161 </div>
marination3a325962021-10-27 10:57:48 +0530162 </div>
marination3a325962021-10-27 10:57:48 +0530163 </div>
164 </div>
165 </div>
166 {% endif %}
167
168
169 {% if attachments %}
170 <div class="order-item-table">
171 <div class="row order-items order-item-header text-muted">
172 <div class="col-sm-12 h6 text-uppercase">
173 {{ _("Attachments") }}
174 </div>
175 </div>
176 <div class="row order-items">
177 <div class="col-sm-12">
178 {% for attachment in attachments %}
179 <p class="small">
180 <a href="{{ attachment.file_url }}" target="blank"> {{ attachment.file_name }} </a>
181 </p>
182 {% endfor %}
183 </div>
184 </div>
185 </div>
186 {% endif %}
marination3a325962021-10-27 10:57:48 +0530187
188 {% if doc.terms %}
189 <div class="terms-and-condition text-muted small">
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530190 <hr>
191 <p>{{ doc.terms }}</p>
marination3a325962021-10-27 10:57:48 +0530192 </div>
193 {% endif %}
Rushabh Mehta156ce602015-09-11 18:49:59 +0530194{% endblock %}
Manas Solankida486ee2018-07-06 12:36:57 +0530195
196{% block script %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530197 <script> {% include "templates/pages/order.js" %}</script>
Manas Solankida486ee2018-07-06 12:36:57 +0530198 <script>
199 window.doc_info = {
200 customer: '{{doc.customer}}',
201 doctype: '{{ doc.doctype }}',
202 doctype_name: '{{ doc.name }}',
203 grand_total: '{{ doc.grand_total }}',
204 currency: '{{ doc.currency }}'
205 }
206 </script>
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530207{% endblock %}