53 lines
1.7 KiB
HTML
53 lines
1.7 KiB
HTML
{% var visible_columns = row.get_visible_columns(["item_code",
|
|
"item_name", "description", "amount", "stock_uom", "uom", "qty"]); %}
|
|
|
|
{% if(!doc) { %}
|
|
<div class="row">
|
|
<div class="col-sm-9">{%= __("Item") %}</div>
|
|
<div class="col-sm-3 text-right">{%= __("Qty") %}</div>
|
|
</div>
|
|
{% } else { %}
|
|
<div class="row">
|
|
<div class="col-sm-9"><strong>{%= doc.item_code %}</strong>
|
|
{% if(doc.item_name != doc.item_code) { %}
|
|
<br>{%= doc.item_name %}{% } %}
|
|
{% if(doc.item_name != doc.description) { %}
|
|
<p>{%= doc.description %}</p>{% } %}
|
|
{% include "templates/form_grid/includes/visible_cols.html" %}
|
|
{% if(doc.schedule_date) { %}
|
|
<br><span title="{%= __("Reqd By Date") %}" class="label {%=
|
|
(frappe.datetime.get_diff(doc.schedule_date) < 1
|
|
&& doc.ordered_qty < doc.qty)
|
|
? "label-danger" : "label-default" %}">
|
|
{%= row.get_formatted("schedule_date") %}</span>
|
|
{% } %}
|
|
</div>
|
|
|
|
<!-- qty -->
|
|
<div class="col-sm-3 text-right">
|
|
{%= row.get_formatted("qty") %}
|
|
<small>{%= doc.uom || doc.stock_uom %}</small>
|
|
{% var percent_delivered =
|
|
100 - cint((doc.qty - cint(doc.ordered_qty)) * 100 / doc.qty); %}
|
|
<div class="progress" title="% {%= __("Ordered") %}"
|
|
style="margin-bottom: 4px;">
|
|
<div class="progress-bar" role="progressbar"
|
|
aria-valuenow="{%= percent_delivered %}"
|
|
aria-valuemin="0" aria-valuemax="100"
|
|
style="width: {%= percent_delivered %}%">
|
|
{%= percent_delivered %}%
|
|
</div>
|
|
</div>
|
|
{% if(doc.warehouse) { %}
|
|
<div style="overflow:hidden; min-height: 25px;
|
|
white-space:nowrap; text-overflow: ellipsis;"
|
|
title="{%= __("For Warehouse") %}">
|
|
<span class="label label-default">
|
|
{%= doc.warehouse %}
|
|
</span>
|
|
</div>
|
|
{% } %}
|
|
</div>
|
|
</div>
|
|
{% } %}
|