Compare commits

...

30 Commits

Author SHA1 Message Date
Nabin Hait
d4321ec18b Merge branch 'hotfix' 2016-09-23 12:16:02 +05:30
Nabin Hait
84fa3dfac8 bumped to version 7.0.47 2016-09-23 12:46:01 +06:00
Nabin Hait
aca857e708 Merge pull request #6447 from nabinhait/patch_fix_legacy_migration
Patch fixed for legacy migration
2016-09-23 12:15:06 +05:30
Nabin Hait
d03087d3ab Patch fixed for legacy migration 2016-09-23 11:08:02 +05:30
Nabin Hait
4ed0653c7f Merge pull request #6444 from rohitwaghchaure/supplier_status_issue
[fix] Supplier status stuck at Open forever
2016-09-22 18:52:26 +05:30
Rohit Waghchaure
b2382c0b8e [fix] Supplier status stuck at Open forever 2016-09-22 18:45:24 +05:30
Nabin Hait
f79b3f8c3c Merge pull request #6443 from rohitwaghchaure/pos_discount_issue
[POS] minor fix
2016-09-22 18:00:55 +05:30
Rohit Waghchaure
481ca832b0 minor fix 2016-09-22 17:21:37 +05:30
Nabin Hait
22e1665244 Merge pull request #6440 from rohitwaghchaure/additional_discount_amount_issue
[Fix] Additional Discount Amount can't be refresh automatically #6199
2016-09-22 16:03:00 +05:30
Rohit Waghchaure
deaee7c08b [Fix] Additional Discount Amount can't be refresh automatically #6199 2016-09-22 14:02:53 +05:30
Nabin Hait
0d36862917 Merge pull request #6434 from rohitwaghchaure/net_rate_issue
[Fix] Discount copied during making of PO from SO
2016-09-22 12:34:08 +05:30
Rohit Waghchaure
bd599b0169 [Fix] Discount copied during making of PO from SO 2016-09-22 11:47:17 +05:30
Nabin Hait
0967b17320 Merge branch 'hotfix' 2016-09-22 11:33:32 +05:30
Nabin Hait
b1041072a2 bumped to version 7.0.46 2016-09-22 12:03:32 +06:00
Nabin Hait
a58a65457f Sales Register report minor fix 2016-09-22 11:31:42 +05:30
Nabin Hait
993d7ca630 Merge pull request #6424 from rohitwaghchaure/daily_timesheet_summary_permission_issue
[Fix] Daily timesheet summary permission issue
2016-09-21 18:41:54 +05:30
Nabin Hait
7108991039 Patch order changed 2016-09-21 16:34:44 +05:30
Rohit Waghchaure
342ec18b83 [Fix] Daily timesheet summary permission issue 2016-09-21 13:22:15 +05:30
Nabin Hait
6835a6fb49 Merge branch 'hotfix' 2016-09-21 13:05:26 +05:30
Nabin Hait
4fead63419 bumped to version 7.0.45 2016-09-21 13:35:26 +06:00
Nabin Hait
06131dd0b1 Merge pull request #6420 from nabinhait/sales_reg_fix
Fix in Sales Register for multiple mode of payments
2016-09-21 12:54:25 +05:30
Nabin Hait
aac32d644d Fix in Sales Register for multiple mode of payments 2016-09-21 11:46:07 +05:30
Nabin Hait
d12990ff57 Update update_home_page.py 2016-09-20 18:20:58 +05:30
Nabin Hait
429a38f90b Merge pull request #6415 from rmehta/hotfix
[minor] bring back old grid style in material request
2016-09-20 18:05:32 +05:30
Rushabh Mehta
57a1905576 [minor] bring back old grid style in material request 2016-09-20 17:22:54 +05:30
Nabin Hait
30a25e11f7 Merge branch 'hotfix' 2016-09-20 16:52:10 +05:30
Nabin Hait
1f912f67ae bumped to version 7.0.44 2016-09-20 17:22:10 +06:00
Nabin Hait
af03de3d00 Merge pull request #6399 from rohitwaghchaure/pos_payment_mode_type_missing_issue
[Fix] POS, mode of payment issue
2016-09-20 10:56:54 +05:30
Rohit Waghchaure
414199a5db [Fix] Mode of payment issue 2016-09-19 23:43:47 +05:30
Nabin Hait
759ef4c00d Allowed past dates in next depreciation date 2016-09-15 12:24:33 +05:30
22 changed files with 168 additions and 41 deletions

View File

@@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
__version__ = '7.0.43'
__version__ = '7.0.47'
def get_default_company(user=None):
'''Get default company for user'''

View File

@@ -80,7 +80,7 @@ class Asset(Document):
frappe.throw(_("Number of Depreciations Booked cannot be greater than Total Number of Depreciations"))
if self.next_depreciation_date and getdate(self.next_depreciation_date) < getdate(nowdate()):
frappe.throw(_("Next Depreciation Date must be on or after today"))
frappe.msgprint(_("Next Depreciation Date is entered as past date"))
if (flt(self.value_after_depreciation) > flt(self.expected_value_after_useful_life)
and not self.next_depreciation_date):

View File

@@ -51,6 +51,9 @@ class Budget(Document):
def validate_expense_against_budget(args):
args = frappe._dict(args)
if not args.cost_center:
return
if frappe.db.get_value("Account", {"name": args.account, "root_type": "Expense"}):
cc_lft, cc_rgt = frappe.db.get_value("Cost Center", args.cost_center, ["lft", "rgt"])

View File

@@ -655,7 +655,6 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
show_items_in_item_cart: function() {
var me = this;
var $items = this.wrapper.find(".items").empty();
me.frm.doc.net_total = 0.0
$.each(this.frm.doc.items|| [], function(i, d) {
$(frappe.render_template("pos_bill_item", {
item_code: d.item_code,

View File

@@ -55,7 +55,6 @@ def notify_status(doc, method=None):
if party.status == 'Open':
# may be open elsewhere, check
# default status
party.status = status
update_status(party)
party.update_modified()

View File

@@ -5,6 +5,7 @@ from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt
from erpnext.accounts.report.sales_register.sales_register import get_mode_of_payments
def execute(filters=None):
if not filters: filters = {}
@@ -21,6 +22,7 @@ def execute(filters=None):
"width": 80
})
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
mode_of_payments = get_mode_of_payments(set([d.parent for d in item_list]))
data = []
for d in item_list:
@@ -32,7 +34,8 @@ def execute(filters=None):
from `tabDelivery Note Item` where docstatus=1 and so_detail=%s""", d.so_detail))
row = [d.item_code, d.item_name, d.item_group, d.parent, d.posting_date, d.customer, d.customer_name,
d.customer_group, d.debit_to, d.mode_of_payment, d.territory, d.project, d.company, d.sales_order,
d.customer_group, d.debit_to, ", ".join(mode_of_payments.get(d.parent, [])),
d.territory, d.project, d.company, d.sales_order,
delivery_note, d.income_account, d.cost_center, d.qty, d.base_net_rate, d.base_net_amount]
for tax in tax_accounts:
@@ -52,7 +55,7 @@ def get_columns():
_("Posting Date") + ":Date:80", _("Customer") + ":Link/Customer:120",
_("Customer Name") + "::120", _("Customer Group") + ":Link/Customer Group:120",
_("Receivable Account") + ":Link/Account:120",
_("Mode of Payment") + ":Link/Mode of Payment:80", _("Territory") + ":Link/Territory:80",
_("Mode of Payment") + "::120", _("Territory") + ":Link/Territory:80",
_("Project") + ":Link/Project:80", _("Company") + ":Link/Company:100",
_("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100",
_("Income Account") + ":Link/Account:140", _("Cost Center") + ":Link/Cost Center:140",
@@ -68,10 +71,14 @@ def get_conditions(filters):
("customer", " and si.customer = %(customer)s"),
("item_code", " and si_item.item_code = %(item_code)s"),
("from_date", " and si.posting_date>=%(from_date)s"),
("to_date", " and si.posting_date<=%(to_date)s"),
("mode_of_payment", " and ifnull(mode_of_payment, '') = %(mode_of_payment)s")):
("to_date", " and si.posting_date<=%(to_date)s")):
if filters.get(opts[0]):
conditions += opts[1]
if filters.get("mode_of_payment"):
conditions += """ and exists(select name from `tabSales Invoice Payment`
where parent=si.name
and ifnull(`tabSales Invoice Payment`.mode_of_payment, '') = %(mode_of_payment)s)"""
return conditions
@@ -84,7 +91,7 @@ def get_items(filters):
si_item.item_code, si_item.item_name, si_item.item_group, si_item.sales_order,
si_item.delivery_note, si_item.income_account, si_item.cost_center, si_item.qty,
si_item.base_net_rate, si_item.base_net_amount, si.customer_name,
si.customer_group, si_item.so_detail, si.mode_of_payment
si.customer_group, si_item.so_detail
from `tabSales Invoice` si, `tabSales Invoice Item` si_item
where si.name = si_item.parent and si.docstatus = 1 %s
order by si.posting_date desc, si_item.item_code desc""" % conditions, filters, as_dict=1)

View File

@@ -23,6 +23,7 @@ def execute(filters=None):
invoice_so_dn_map = get_invoice_so_dn_map(invoice_list)
customer_map = get_customer_deatils(invoice_list)
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
mode_of_payments = get_mode_of_payments([inv.name for inv in invoice_list])
data = []
for inv in invoice_list:
@@ -33,7 +34,7 @@ def execute(filters=None):
row = [inv.name, inv.posting_date, inv.customer, inv.customer_name,
customer_map.get(inv.customer, {}).get("customer_group"),
customer_map.get(inv.customer, {}).get("territory"),
inv.debit_to, inv.mode_of_payment, inv.project, inv.remarks,
inv.debit_to, ", ".join(mode_of_payments.get(inv.name, [])), inv.project, inv.remarks,
", ".join(sales_order), ", ".join(delivery_note), company_currency]
# map income values
@@ -68,7 +69,7 @@ def get_columns(invoice_list):
_("Invoice") + ":Link/Sales Invoice:120", _("Posting Date") + ":Date:80",
_("Customer Id") + "::120", _("Customer Name") + "::120",
_("Customer Group") + ":Link/Customer Group:120", _("Territory") + ":Link/Territory:80",
_("Receivable Account") + ":Link/Account:120", _("Mode of Payment") + ":Link/Mode of Payment:80",
_("Receivable Account") + ":Link/Account:120", _("Mode of Payment") + "::120",
_("Project") +":Link/Project:80", _("Remarks") + "::150",
_("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100",
{
@@ -113,14 +114,17 @@ def get_conditions(filters):
if filters.get("from_date"): conditions += " and posting_date >= %(from_date)s"
if filters.get("to_date"): conditions += " and posting_date <= %(to_date)s"
if filters.get("mode_of_payment"): conditions += " and ifnull(mode_of_payment, '') = %(mode_of_payment)s"
if filters.get("mode_of_payment"):
conditions += """ and exists(select name from `tabSales Invoice Payment`
where parent=`tabSales Invoice`.name
and ifnull(`tabSales Invoice Payment`.mode_of_payment, '') = %(mode_of_payment)s)"""
return conditions
def get_invoices(filters):
conditions = get_conditions(filters)
return frappe.db.sql("""select name, posting_date, debit_to, project, customer, customer_name, remarks,
base_net_total, base_grand_total, base_rounded_total, outstanding_amount, mode_of_payment
base_net_total, base_grand_total, base_rounded_total, outstanding_amount
from `tabSales Invoice`
where docstatus = 1 %s order by posting_date desc, name desc""" %
conditions, filters, as_dict=1)
@@ -188,3 +192,16 @@ def get_customer_deatils(invoice_list):
customer_map.setdefault(cust.name, cust)
return customer_map
def get_mode_of_payments(invoice_list):
mode_of_payments = {}
if invoice_list:
inv_mop = frappe.db.sql("""select parent, mode_of_payment
from `tabSales Invoice Payment` where parent in (%s) group by parent, mode_of_payment""" %
', '.join(['%s']*len(invoice_list)), tuple(invoice_list), as_dict=1)
for d in inv_mop:
mode_of_payments.setdefault(d.parent, []).append(d.mode_of_payment)
return mode_of_payments

View File

@@ -173,6 +173,7 @@ execute:frappe.db.set_value("Backup Manager", None, "send_backups_to_dropbox", 1
execute:frappe.db.sql_list("delete from `tabDocPerm` where parent='Issue' and modified_by='Administrator' and role='Guest'")
erpnext.patches.v5_0.update_item_and_description_again
erpnext.patches.v6_0.multi_currency
erpnext.patches.v7_0.create_budget_record
erpnext.patches.v5_0.repost_gle_for_jv_with_multiple_party
erpnext.patches.v5_0.portal_fixes
erpnext.patches.v5_0.reset_values_in_tools # 02-05-2016
@@ -235,7 +236,6 @@ execute:frappe.delete_doc_if_exists("DocType", "Shopping Cart Taxes and Charges
erpnext.patches.v6_4.set_user_in_contact
erpnext.patches.v6_4.make_image_thumbnail #2015-10-20
erpnext.patches.v6_5.show_in_website_for_template_item
erpnext.patches.v7_0.create_budget_record
erpnext.patches.v6_4.fix_expense_included_in_valuation
execute:frappe.delete_doc_if_exists("Report", "Item-wise Last Purchase Rate")
erpnext.patches.v6_6.fix_website_image
@@ -266,7 +266,7 @@ erpnext.patches.v6_20x.remove_fiscal_year_from_holiday_list
erpnext.patches.v6_24.map_customer_address_to_shipping_address_on_po
erpnext.patches.v6_27.fix_recurring_order_status
erpnext.patches.v6_20x.update_product_bundle_description
erpnext.patches.v7_0.update_party_status
erpnext.patches.v7_0.update_party_status #2016-09-22
erpnext.patches.v7_0.update_item_projected
erpnext.patches.v7_0.remove_features_setup
erpnext.patches.v7_0.update_home_page
@@ -317,3 +317,4 @@ erpnext.patches.v7_0.update_missing_employee_in_timesheet
erpnext.patches.v7_0.update_status_for_timesheet
erpnext.patches.v7_0.set_party_name_in_payment_entry
execute:frappe.db.sql("update `tabTimesheet` ts, `tabEmployee` emp set ts.employee_name = emp.employee_name where emp.name = ts.employee and ts.employee_name is null and ts.employee is not null")
erpnext.patches.v7_0.update_mode_of_payment_type

View File

@@ -27,6 +27,7 @@ def execute():
time_sheet.update_cost()
time_sheet.calculate_total_amounts()
time_sheet.flags.ignore_validate = True
time_sheet.flags.ignore_links = True
time_sheet.save(ignore_permissions=True)
# To ignore validate_mandatory_fields function

View File

@@ -17,10 +17,10 @@ def execute():
add_timesheet_detail(time_sheet, args)
time_sheet.docstatus = tlb.docstatus
time_sheet.flags.ignore_links = True
time_sheet.save(ignore_permissions=True)
def get_timesheet_data(data):
time_log = frappe.get_all('Time Log', fields=["*"],
filters = {'name': data.time_log})[0]
return get_timelog_data(time_log)
time_log = frappe.get_all('Time Log', fields=["*"], filters = {'name': data.time_log})
if time_log:
return get_timelog_data(time_log[0])

View File

@@ -5,6 +5,8 @@ def execute():
frappe.reload_doc('accounts', 'doctype', 'sales_invoice_payment')
for time_sheet in frappe.db.sql(""" select sales_invoice, name, total_billing_amount from `tabTimesheet`
where sales_invoice is not null and docstatus < 2""", as_dict=True):
if not frappe.db.exists('Sales Invoice', time_sheet.sales_invoice):
continue
si_doc = frappe.get_doc('Sales Invoice', time_sheet.sales_invoice)
ts = si_doc.append('timesheets',{})
ts.time_sheet = time_sheet.name

View File

@@ -7,6 +7,8 @@ def execute():
frappe.reload_doctype('Stock Settings')
stock_settings = frappe.get_doc('Stock Settings', 'Stock Settings')
stock_settings.show_barcode_field = cint(frappe.db.get_value("Features Setup", None, "fs_item_barcode"))
if not frappe.db.exists("UOM", stock_settings.stock_uom):
stock_settings.stock_uom = None
stock_settings.save()
create_compact_item_print_custom_field()

View File

@@ -16,4 +16,5 @@ def execute():
"company": frappe.db.get_value("Account", expense_claim_type.default_account, "company"),
"default_account": expense_claim_type.default_account,
})
doc.flags.ignore_mandatory = True
doc.save(ignore_permissions=True)

View File

@@ -13,7 +13,7 @@ def execute():
header = frappe.db.get_value('Web Page', website_settings.home_page, 'header')
if header and header.startswith("<div class='hero text-center'>"):
homepage = frappe.get_doc('Homepage', 'Homepage')
homepage.company = erpnext.get_default_company()
homepage.company = erpnext.get_default_company() or frappe.get_all("Company")[0].name
if '<h1>' in header:
homepage.tag_line = header.split('<h1>')[1].split('</h1>')[0] or 'Default Website'
else:

View File

@@ -0,0 +1,29 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import flt
def execute():
frappe.reload_doc('accounts', 'doctype', 'mode_of_payment')
frappe.db.sql(""" update `tabMode of Payment` set type = 'Cash' where (type is null or type = '') and name = 'Cash'""")
for data in frappe.db.sql("""select name from `tabSales Invoice` where is_pos=1 and docstatus<2 and
(ifnull(paid_amount, 0) - ifnull(change_amount, 0)) > ifnull(grand_total, 0) and modified > '2016-05-01'""", as_dict=1):
if data.name:
si_doc = frappe.get_doc("Sales Invoice", data.name)
remove_payment = []
mode_of_payment = [d.mode_of_payment for d in si_doc.payments if flt(d.amount) > 0]
if mode_of_payment != set(mode_of_payment):
for payment_data in si_doc.payments:
if payment_data.idx != 1 and payment_data.amount == si_doc.grand_total:
remove_payment.append(payment_data)
frappe.db.sql(""" delete from `tabSales Invoice Payment`
where name = %(name)s""", {'name': payment_data.name})
if len(remove_payment) > 0:
for d in remove_payment:
si_doc.remove(d)
si_doc.set_paid_amount()
si_doc.db_set("paid_amount", si_doc.paid_amount, update_modified = False)
si_doc.db_set("base_paid_amount", si_doc.base_paid_amount, update_modified = False)

View File

@@ -4,6 +4,7 @@
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.desk.reportview import build_match_conditions
def execute(filters=None):
if not filters:
@@ -12,25 +13,36 @@ def execute(filters=None):
filters["from_time"] = "00:00:00"
filters["to_time"] = "24:00:00"
columns = [_("Timesheet") + ":Link/Timesheet:120", _("Employee") + "::150", _("Employee Name") + "::150",
_("From Datetime") + "::140", _("To Datetime") + "::140", _("Hours") + "::70",
_("Activity Type") + "::120", _("Task") + ":Link/Task:150",
_("Project") + ":Link/Project:120", _("Status") + "::70"]
conditions = "ts.docstatus = 1"
if filters.get("from_date"):
conditions += " and tsd.from_time >= timestamp(%(from_date)s, %(from_time)s)"
if filters.get("to_date"):
conditions += " and tsd.to_time <= timestamp(%(to_date)s, %(to_time)s)"
columns = get_column()
conditions = get_conditions(filters)
data = get_data(conditions, filters)
return columns, data
def get_column():
return [_("Timesheet") + ":Link/Timesheet:120", _("Employee") + "::150", _("Employee Name") + "::150",
_("From Datetime") + "::140", _("To Datetime") + "::140", _("Hours") + "::70",
_("Activity Type") + "::120", _("Task") + ":Link/Task:150",
_("Project") + ":Link/Project:120", _("Status") + "::70"]
def get_data(conditions, filters):
time_sheet = frappe.db.sql(""" select ts.name, ts.employee, ts.employee_name,
tsd.from_time, tsd.to_time, tsd.hours,
tsd.activity_type, tsd.task, tsd.project, ts.status from `tabTimesheet Detail` tsd,
`tabTimesheet` ts where ts.name = tsd.parent and %s order by ts.name"""%(conditions), filters, as_list=1)
time_sheet = frappe.db.sql(""" select `tabTimesheet`.name, `tabTimesheet`.employee, `tabTimesheet`.employee_name,
`tabTimesheet Detail`.from_time, `tabTimesheet Detail`.to_time, `tabTimesheet Detail`.hours,
`tabTimesheet Detail`.activity_type, `tabTimesheet Detail`.task, `tabTimesheet Detail`.project,
`tabTimesheet`.status from `tabTimesheet Detail`, `tabTimesheet` where
`tabTimesheet Detail`.parent = `tabTimesheet`.name and %s order by `tabTimesheet`.name"""%(conditions), filters, as_list=1)
return time_sheet
def get_conditions(filters):
conditions = "`tabTimesheet`.docstatus = 1"
if filters.get("from_date"):
conditions += " and `tabTimesheet Detail`.from_time >= timestamp(%(from_date)s, %(from_time)s)"
if filters.get("to_date"):
conditions += " and `tabTimesheet Detail`.to_time <= timestamp(%(to_date)s, %(to_time)s)"
match_conditions = build_match_conditions("Timesheet")
if match_conditions:
conditions += " and %s" % match_conditions
return conditions

View File

@@ -678,6 +678,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
me._set_values_for_item_list(r.message);
if(item) me.set_gross_profit(item);
if(calculate_taxes_and_totals) me.calculate_taxes_and_totals();
if(me.frm.doc.apply_discount_on) me.frm.trigger("apply_discount_on")
}
}
});

View File

@@ -553,6 +553,9 @@ def get_events(start, end, filters=None):
def make_purchase_order_for_drop_shipment(source_name, for_supplier, target_doc=None):
def set_missing_values(source, target):
target.supplier = for_supplier
target.apply_discount_on = ""
target.additional_discount_percentage = 0.0
target.discount_amount = 0.0
default_price_list = frappe.get_value("Supplier", for_supplier, "default_price_list")
if default_price_list:

View File

@@ -63,7 +63,8 @@ def get_domain(domain):
'Education': {
'desktop_icons': ['Student', 'Program', 'Course', 'Student Group', 'Instructor',
'Fees', 'ToDo', 'Schools'],
'allow_roles': ['Academics User', 'Accounts User', 'Accounts Manager', 'Website Manager'],
'allow_roles': ['Academics User', 'Accounts User', 'Accounts Manager', 'Item Manager',
'Website Manager', 'HR User', 'HR Manager', 'Purchase User', 'Purchase Manager'],
'allow_sidebar_items': ['/announcement', '/course', '/assessment', '/fees']
},
}

View File

@@ -15,9 +15,9 @@ from erpnext.controllers.buying_controller import BuyingController
from erpnext.manufacturing.doctype.production_order.production_order import get_item_details
# form_grid_templates = {
# "items": "templates/form_grid/material_request_grid.html"
# }
form_grid_templates = {
"items": "templates/form_grid/material_request_grid.html"
}
class MaterialRequest(BuyingController):
def get_feed(self):

View File

@@ -71,7 +71,7 @@ class Warehouse(NestedSet):
"freeze_account": "No"
})
ac_doc.flags.ignore_permissions = True
ac_doc.flags.ignore_mandatory = True
try:
ac_doc.insert()
msgprint(_("Account head {0} created").format(ac_doc.name))

View File

@@ -0,0 +1,49 @@
{% var visible_columns = row.get_visible_columns(["item_code", "warehouse",
"item_name", "amount", "stock_uom", "uom", "qty", "schedule_date"]); %}
{% if(!doc) { %}
<div class="row">
<div class="col-sm-4">{%= __("Item") %}</div>
<div class="col-sm-3">{%= __("Required On") %}</div>
<div class="col-sm-3">{%= __("Warehouse") %}</div>
<div class="col-sm-2 text-right">{%= __("Qty") %}</div>
</div>
{% } else { %}
<div class="row">
<div class="col-sm-4">
<span class="indicator {%= (doc.qty<=doc.ordered_qty) ? "green" : "orange" %}">{%= 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" %}
</div>
<div class="col-sm-3">
{% if(doc.schedule_date) { %}
<span title="{%= __("Reqd By Date") %}" class="{%=
(frappe.datetime.get_diff(doc.schedule_date, frappe.datetime.get_today()) < 0
&& doc.ordered_qty < doc.qty)
? "text-danger" : "text-muted" %}">
{%= doc.get_formatted("schedule_date") %}</span>
{% } %}
</div>
<!-- warehouse -->
<div class="col-sm-3">
{% if(doc.warehouse) { %}
<span class="label label-default" title="{%= __("For Warehouse") %}"
style="margin-right: 10px;">
{%= doc.warehouse %}
</span>
{% } %}
</div>
<!-- qty -->
<div class="col-sm-2 text-right">
{%= doc.get_formatted("qty") %}
<span class="small">{%= doc.uom || doc.stock_uom %}</span>
</div>
</div>
{% } %}