{% var visible_columns = row.get_visible_columns(["item_code", "item_name", "description", "qty", "rate", "amount", "stock_uom", "uom", "discount_percentage", "schedule_date", "warehouse", "against_sales_order", "sales_order"]); %} {% if(!doc) { %}
{%= __("Items") %}
{%= __("Amount") %}
{% } else { %}
{%= doc.item_code %} {% if(doc.item_name != doc.item_code) { %}
{%= doc.item_name %}{% } %} {% if(doc.item_name != doc.description) { %}

{%= doc.description %}

{% } %}
{% if(doc.sales_order || doc.against_sales_order) { %} {%= doc.sales_order || doc.against_sales_order %} {% } %} {% if(doc.warehouse) { var label_class = "label-default", title = "Warehouse", actual_qty = (doc.doctype==="Sales Order" ? doc.projected_qty : doc.actual_qty); if(actual_qty != undefined) { if(actual_qty > doc.qty) { var label_class = "label-success"; var title = "In Stock" } else { var title = "Not In Stock" } } %} {%= doc.warehouse %} {% } %}
{% include "templates/form_grid/includes/visible_cols.html" %} {% if(doc.schedule_date) { %}
{%= doc.get_formatted("schedule_date") %}
{% } %}
{% if (!frappe.perm.is_visible("amount", doc, frm.perm)) { %} {%= __("hidden") %} {% } else { %} {%= doc.get_formatted("amount") %} {% } %} {% if(in_list(["Sales Order Item", "Purchase Order Item"], doc.doctype) && frm.doc.docstatus===1 && doc.amount) { var completed = 100 - cint((flt(doc.amount) - flt(doc.billed_amt)) * 100 / flt(doc.amount)), title = __("Billed"); %}
  {% include "templates/form_grid/includes/progress.html" %} {% } %} {% if (frappe.perm.is_visible("rate", doc, frm.perm)) { %}
{%= doc.get_formatted("qty") %} {%= doc.uom || doc.stock_uom %} x {%= doc.get_formatted("rate") %}
{% } %}
{% } %}