2016-03-23 06:42:38 +00:00
|
|
|
{% extends "templates/web.html" %}
|
2016-04-22 13:23:21 +00:00
|
|
|
{% from "erpnext/templates/includes/order/order_macros.html" import item_name_and_description %}
|
2015-09-11 13:19:59 +00:00
|
|
|
|
2016-01-06 09:51:21 +00:00
|
|
|
{% block breadcrumbs %}
|
|
|
|
{% include "templates/includes/breadcrumbs.html" %}
|
|
|
|
{% endblock %}
|
|
|
|
|
2022-10-04 04:27:07 +00:00
|
|
|
{% block title %}
|
|
|
|
{{ doc.name }}
|
|
|
|
{% endblock %}
|
2016-06-23 12:55:50 +00:00
|
|
|
|
2017-08-10 15:36:09 +00:00
|
|
|
{% block header %}
|
2022-10-04 04:27:07 +00:00
|
|
|
<h3 class="m-0">{{ doc.name }}</h3>
|
2017-08-10 15:36:09 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block header_actions %}
|
2022-10-04 04:27:07 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="dropdown">
|
|
|
|
<button class="btn btn-sm btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
|
|
|
<span class="font-md">{{ _('Actions') }}</span>
|
|
|
|
<b class="caret"></b>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
|
|
|
{% if doc.doctype == 'Purchase Order' and show_make_pi_button %}
|
|
|
|
<a class="dropdown-item"
|
|
|
|
href="/api/method/erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_invoice_from_portal?purchase_order_name={{ doc.name }}"
|
|
|
|
data-action="make_purchase_invoice">{{ _("Make Purchase Invoice") }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
<a class="dropdown-item"
|
|
|
|
href='/printview?doctype={{ doc.doctype}}&name={{ doc.name }}&format={{ print_format }}' target="_blank"
|
|
|
|
rel="noopener noreferrer">
|
|
|
|
{{ _("Print") }}
|
|
|
|
</a>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2023-02-08 09:32:39 +00:00
|
|
|
{% if show_pay_button %}
|
|
|
|
<div class="form-column col-sm-6">
|
|
|
|
<div class="page-header-actions-block" data-html-block="header-actions">
|
|
|
|
<p>
|
|
|
|
<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"
|
|
|
|
class="btn btn-primary btn-sm" id="pay-for-order">
|
|
|
|
{{ _("Pay") }} {{doc.get_formatted("grand_total") }}
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
2022-10-04 04:27:07 +00:00
|
|
|
</div>
|
2023-02-08 09:32:39 +00:00
|
|
|
{% endif %}
|
2021-10-27 05:27:48 +00:00
|
|
|
</div>
|
2017-08-10 15:36:09 +00:00
|
|
|
{% endblock %}
|
2015-09-11 13:19:59 +00:00
|
|
|
|
2016-01-01 11:53:12 +00:00
|
|
|
{% block page_content %}
|
2022-10-04 04:27:07 +00:00
|
|
|
<div>
|
|
|
|
<div class="row transaction-subheading mt-1">
|
|
|
|
<div class="col-6 text-muted small mt-1">
|
|
|
|
{{ frappe.utils.format_date(doc.transaction_date, 'medium') }}
|
|
|
|
{% if doc.valid_till %}
|
|
|
|
<p>
|
|
|
|
{{ _("Valid Till") }}: {{ frappe.utils.format_date(doc.valid_till, 'medium') }}
|
|
|
|
</p>
|
2021-10-27 05:27:48 +00:00
|
|
|
{% endif %}
|
2022-10-04 04:27:07 +00:00
|
|
|
</div>
|
2021-10-27 05:27:48 +00:00
|
|
|
</div>
|
2022-10-04 04:27:07 +00:00
|
|
|
<div class="row indicator-container mt-2">
|
|
|
|
<div class="col-10">
|
|
|
|
<span class="indicator-pill {{ doc.indicator_color or (" blue" if doc.docstatus==1 else "darkgrey" ) }}">
|
|
|
|
{% if doc.doctype == "Quotation" and not doc.docstatus %}
|
|
|
|
{{ _("Pending") }}
|
|
|
|
{% else %}
|
|
|
|
{{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }}
|
|
|
|
{% endif %}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="text-right col-2">
|
|
|
|
{%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase
|
|
|
|
Order'] else doc.customer_name %}
|
|
|
|
<b>{{ party_name }}</b>
|
|
|
|
|
|
|
|
{% if doc.contact_display and doc.contact_display != party_name %}
|
|
|
|
<br>
|
|
|
|
{{ doc.contact_display }}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2021-10-27 05:27:48 +00:00
|
|
|
</div>
|
2019-03-19 06:18:32 +00:00
|
|
|
|
2022-10-04 04:27:07 +00:00
|
|
|
{% if doc._header %}
|
|
|
|
{{ doc._header }}
|
2021-10-27 05:27:48 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2022-10-04 04:27:07 +00:00
|
|
|
<div class="order-container mt-4">
|
|
|
|
<!-- items -->
|
|
|
|
<div class="w-100">
|
|
|
|
<div class="order-items order-item-header mb-1 row text-muted">
|
|
|
|
<span class="col-5">
|
|
|
|
{{ _("Item") }}
|
|
|
|
</span>
|
|
|
|
<span class="d-s-n col-3">
|
|
|
|
{{ _("Quantity") }}
|
|
|
|
</span>
|
|
|
|
<span class="col-2 pl-10">
|
|
|
|
{{ _("Rate") }}
|
|
|
|
</span>
|
|
|
|
<span class="col-2 text-right">
|
|
|
|
{{ _("Amount") }}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{% for d in doc.items %}
|
|
|
|
<div class="order-items row align-items-center">
|
|
|
|
<span class="order-item-name col-5 pr-0">
|
|
|
|
{{ item_name_and_description(d) }}
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="d-s-n col-3 pl-10">
|
|
|
|
{{ d.get_formatted("qty") }}
|
|
|
|
</span>
|
|
|
|
<span class="order-rate pl-4 col-2">
|
|
|
|
{{ d.get_formatted("rate") }}
|
|
|
|
</span>
|
|
|
|
<span class="col-2 text-right">
|
|
|
|
{{ d.get_formatted("amount") }}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2021-10-27 05:27:48 +00:00
|
|
|
|
2022-10-04 04:27:07 +00:00
|
|
|
<!-- taxes -->
|
|
|
|
<div class="">
|
2021-10-27 05:27:48 +00:00
|
|
|
{% include "erpnext/templates/includes/order/order_taxes.html" %}
|
2022-10-04 04:27:07 +00:00
|
|
|
</div>
|
2021-10-27 05:27:48 +00:00
|
|
|
</div>
|
2018-07-06 07:06:57 +00:00
|
|
|
</div>
|
|
|
|
|
2021-10-27 05:27:48 +00:00
|
|
|
{% if enabled_checkout and ((doc.doctype=="Sales Order" and doc.per_billed <= 0)
|
2022-10-04 04:27:07 +00:00
|
|
|
or (doc.doctype=="Sales Invoice" and doc.outstanding_amount> 0)) %}
|
2021-10-27 05:27:48 +00:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-collapse">
|
|
|
|
<div class="panel-body text-muted small">
|
|
|
|
<div class="row">
|
|
|
|
<div class="form-column col-sm-6">
|
|
|
|
{% if available_loyalty_points %}
|
2022-10-04 04:27:07 +00:00
|
|
|
<div class="panel-heading">
|
|
|
|
<div class="row">
|
|
|
|
<div class="form-column col-sm-6 address-title">
|
|
|
|
<strong>Loyalty Points</strong>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-10-27 05:27:48 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="h6">Enter Loyalty Points</div>
|
|
|
|
<div class="control-input-wrapper">
|
|
|
|
<div class="control-input">
|
2022-10-04 04:27:07 +00:00
|
|
|
<input class="form-control" type="number" min="0"
|
|
|
|
max="{{ available_loyalty_points }}" id="loyalty-point-to-redeem">
|
2021-10-27 05:27:48 +00:00
|
|
|
</div>
|
2022-10-04 04:27:07 +00:00
|
|
|
<p class="help-box small text-muted d-none d-sm-block"> Available Points: {{
|
|
|
|
available_loyalty_points }} </p>
|
2021-10-27 05:27:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2018-07-06 07:06:57 +00:00
|
|
|
</div>
|
2021-10-27 05:27:48 +00:00
|
|
|
</div>
|
2018-07-06 07:06:57 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-10-27 05:27:48 +00:00
|
|
|
{% endif %}
|
2018-07-06 07:06:57 +00:00
|
|
|
|
2017-08-10 15:36:09 +00:00
|
|
|
|
2021-10-27 05:27:48 +00:00
|
|
|
{% if attachments %}
|
|
|
|
<div class="order-item-table">
|
|
|
|
<div class="row order-items order-item-header text-muted">
|
|
|
|
<div class="col-sm-12 h6 text-uppercase">
|
|
|
|
{{ _("Attachments") }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row order-items">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
{% for attachment in attachments %}
|
|
|
|
<p class="small">
|
|
|
|
<a href="{{ attachment.file_url }}" target="blank"> {{ attachment.file_name }} </a>
|
|
|
|
</p>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-05-19 10:34:10 +00:00
|
|
|
</div>
|
2021-10-27 05:27:48 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if doc.terms %}
|
|
|
|
<div class="terms-and-condition text-muted small">
|
2022-10-04 04:27:07 +00:00
|
|
|
<hr>
|
|
|
|
<p>{{ doc.terms }}</p>
|
2017-05-19 10:34:10 +00:00
|
|
|
</div>
|
2021-10-27 05:27:48 +00:00
|
|
|
{% endif %}
|
2015-09-11 13:19:59 +00:00
|
|
|
{% endblock %}
|
2018-07-06 07:06:57 +00:00
|
|
|
|
|
|
|
{% block script %}
|
2022-10-04 04:27:07 +00:00
|
|
|
<script> {% include "templates/pages/order.js" %}</script>
|
2018-07-06 07:06:57 +00:00
|
|
|
<script>
|
|
|
|
window.doc_info = {
|
|
|
|
customer: '{{doc.customer}}',
|
|
|
|
doctype: '{{ doc.doctype }}',
|
|
|
|
doctype_name: '{{ doc.name }}',
|
|
|
|
grand_total: '{{ doc.grand_total }}',
|
|
|
|
currency: '{{ doc.currency }}'
|
|
|
|
}
|
|
|
|
</script>
|
2022-10-04 04:27:07 +00:00
|
|
|
{% endblock %}
|