mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 22:19:18 +00:00
[fixed] frappe.require is now async 💥
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-xs-8">
|
||||
{% if(doc.warehouse) {
|
||||
var label_class = "label-default",
|
||||
var color = "grey",
|
||||
title = "Warehouse",
|
||||
actual_qty = (frm.doc.doctype==="Sales Order"
|
||||
? doc.projected_qty : doc.actual_qty);
|
||||
@@ -21,16 +21,16 @@
|
||||
&& in_list(["Sales Order Item", "Delivery Note Item"], doc.doctype)) {
|
||||
if(actual_qty != undefined) {
|
||||
if(actual_qty >= doc.qty) {
|
||||
var label_class = "label-success";
|
||||
var color = "green";
|
||||
var title = "In Stock"
|
||||
} else {
|
||||
var label_class = "label-danger";
|
||||
var color = "red";
|
||||
var title = "Not In Stock"
|
||||
}
|
||||
}
|
||||
} %}
|
||||
<span class="pull-right" title="{%= title %}">
|
||||
<span class="label {%= label_class %}">
|
||||
<span class="pull-right" title="{%= title %}" style="margin-left: 10px;">
|
||||
<span class="indicator {{ color }}">
|
||||
{%= doc.warehouse %}
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@@ -16,21 +16,27 @@
|
||||
{% if(doc.item_name != doc.item_code) { %}
|
||||
<br>{%= doc.item_name %}{% } %}
|
||||
{% include "templates/form_grid/includes/visible_cols.html" %}
|
||||
{% if(frm.doc.docstatus==0 && doc.s_warehouse && doc.actual_qty < doc.qty) { %}
|
||||
<span class="text-danger small" style="margin-left: 15px;">
|
||||
Not in Stock
|
||||
</span>
|
||||
{% } %}
|
||||
</div>
|
||||
|
||||
<!-- warehouse -->
|
||||
<div class="col-sm-3 col-xs-4">
|
||||
{% if(doc.s_warehouse) { %}
|
||||
<span class="label label-default grid-label" title="{% __("Source" )%}">
|
||||
{%= doc.s_warehouse || "" %}</span>
|
||||
{% } %}
|
||||
{% if(doc.t_warehouse) { %}<span class="label label-primary grid-label" title="{% __("Target" )%}">
|
||||
{%= doc.t_warehouse || "" %}</span>{% } %}
|
||||
{% if(doc.s_warehouse) {
|
||||
if(frm.doc.docstatus==0) {
|
||||
var color = (doc.s_warehouse && doc.actual_qty < doc.qty) ? "red" : "green";
|
||||
var title = color === "red" ? __("Not in Stock") : __("In Stock");
|
||||
} else {
|
||||
var color = "grey";
|
||||
var title = __("Source");
|
||||
}
|
||||
%}
|
||||
<span class="indicator {{ color }}" title="{{ title }}">
|
||||
{%= doc.s_warehouse %}</span>
|
||||
{% }; %}
|
||||
{% if(doc.t_warehouse) { %}
|
||||
<div><span class="indicator {{ doc.docstatus==1 ? "blue" : "grey" }}" title="{{ __("Target" ) }}">
|
||||
{%= doc.t_warehouse %}</span>
|
||||
</div>
|
||||
{% }; %}
|
||||
</div>
|
||||
|
||||
<!-- qty -->
|
||||
|
||||
Reference in New Issue
Block a user