blob: 97bf48727cfbdd3b2ead070e9cdae3f4afd76d6e [file] [log] [blame]
Anand Doshi1947b172016-03-23 12:12:38 +05301{% extends "templates/web.html" %}
rohitwaghchaure2851a412023-10-18 16:31:35 +05302{% from "erpnext/templates/includes/macros.html" import product_image %}
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>
marination3a325962021-10-27 10:57:48 +053037 </div>
Rushabh Mehtadbb51542017-08-10 21:06:09 +053038{% endblock %}
Rushabh Mehta156ce602015-09-11 18:49:59 +053039
Rushabh Mehta51008f22016-01-01 17:23:12 +053040{% block page_content %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053041 <div>
42 <div class="row transaction-subheading mt-1">
43 <div class="col-6 text-muted small mt-1">
44 {{ frappe.utils.format_date(doc.transaction_date, 'medium') }}
45 {% if doc.valid_till %}
46 <p>
47 {{ _("Valid Till") }}: {{ frappe.utils.format_date(doc.valid_till, 'medium') }}
48 </p>
Anupama4df1052020-09-24 13:21:54 +053049 {% endif %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053050 </div>
Manas Solankida486ee2018-07-06 12:36:57 +053051 </div>
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053052 <div class="row indicator-container mt-2">
53 <div class="col-10">
54 <span class="indicator-pill {{ doc.indicator_color or (" blue" if doc.docstatus==1 else "darkgrey" ) }}">
55 {% if doc.doctype == "Quotation" and not doc.docstatus %}
56 {{ _("Pending") }}
57 {% else %}
58 {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }}
marination3a325962021-10-27 10:57:48 +053059 {% endif %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053060 </span>
61 </div>
62 <div class="text-right col-2">
63 {%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase
64 Order'] else doc.customer_name %}
65 <b>{{ party_name }}</b>
66
67 {% if doc.contact_display and doc.contact_display != party_name %}
68 <br>
69 {{ doc.contact_display }}
70 {% endif %}
71 </div>
72 </div>
73
74 {% if doc._header %}
75 {{ doc._header }}
76 {% endif %}
77
78 <div class="order-container mt-4">
79 <!-- items -->
80 <div class="w-100">
81 <div class="order-items order-item-header mb-1 row text-muted">
82 <span class="col-5">
83 {{ _("Item") }}
84 </span>
85 <span class="d-s-n col-3">
86 {{ _("Quantity") }}
87 </span>
88 <span class="col-2 pl-10">
89 {{ _("Rate") }}
90 </span>
91 <span class="col-2 text-right">
92 {{ _("Amount") }}
93 </span>
94 </div>
95 {% for d in doc.items %}
96 <div class="order-items row align-items-center">
97 <span class="order-item-name col-5 pr-0">
98 {{ item_name_and_description(d) }}
99 </span>
100
101 <span class="d-s-n col-3 pl-10">
102 {{ d.get_formatted("qty") }}
103 </span>
104 <span class="order-rate pl-4 col-2">
105 {{ d.get_formatted("rate") }}
106 </span>
107 <span class="col-2 text-right">
108 {{ d.get_formatted("amount") }}
109 </span>
110 </div>
111 {% endfor %}
112 </div>
113
114 <!-- taxes -->
115 <div class="">
marination3a325962021-10-27 10:57:48 +0530116 {% include "erpnext/templates/includes/order/order_taxes.html" %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530117 </div>
marination3a325962021-10-27 10:57:48 +0530118 </div>
119 </div>
120
marination3a325962021-10-27 10:57:48 +0530121 {% if attachments %}
122 <div class="order-item-table">
123 <div class="row order-items order-item-header text-muted">
124 <div class="col-sm-12 h6 text-uppercase">
125 {{ _("Attachments") }}
126 </div>
127 </div>
128 <div class="row order-items">
129 <div class="col-sm-12">
130 {% for attachment in attachments %}
131 <p class="small">
132 <a href="{{ attachment.file_url }}" target="blank"> {{ attachment.file_name }} </a>
133 </p>
134 {% endfor %}
135 </div>
136 </div>
137 </div>
138 {% endif %}
marination3a325962021-10-27 10:57:48 +0530139
140 {% if doc.terms %}
141 <div class="terms-and-condition text-muted small">
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530142 <hr>
143 <p>{{ doc.terms }}</p>
marination3a325962021-10-27 10:57:48 +0530144 </div>
145 {% endif %}
Rushabh Mehta156ce602015-09-11 18:49:59 +0530146{% endblock %}
Manas Solankida486ee2018-07-06 12:36:57 +0530147
rohitwaghchaure2851a412023-10-18 16:31:35 +0530148{% macro item_name_and_description(d) %}
149 <div class="row item_name_and_description">
150 <div class="col-xs-4 col-sm-2 order-image-col">
151 <div class="order-image h-100">
152 {% if d.thumbnail or d.image %}
153 {{ product_image(d.thumbnail or d.image, no_border=True) }}
154 {% else %}
155 <div class="no-image-cart-item" style="min-height: 100px;">
156 {{ frappe.utils.get_abbr(d.item_name) or "NA" }}
157 </div>
158 {% endif %}
159 </div>
160 </div>
161 <div class="col-xs-8 col-sm-10">
162 {{ d.item_code }}
163 <div class="text-muted small item-description">
164 {{ html2text(d.description) | truncate(140) }}
165 </div>
166 <span class="text-muted mt-2 d-l-n order-qty">
167 {{ _("Qty ") }}({{ d.get_formatted("qty") }})
168 </span>
169 </div>
170 </div>
171{% endmacro %}