discount calculation and in print view
diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py
index 5e27b3a..4e4e507 100644
--- a/erpnext/controllers/buying_controller.py
+++ b/erpnext/controllers/buying_controller.py
@@ -14,7 +14,7 @@
class BuyingController(StockController):
def __setup__(self):
- if hasattr(self, "items"):
+ if hasattr(self, "taxes"):
self.print_templates = {
"taxes": "templates/print_formats/includes/taxes.html"
}
diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py
index e6ec2af..9cee583 100644
--- a/erpnext/controllers/selling_controller.py
+++ b/erpnext/controllers/selling_controller.py
@@ -12,7 +12,7 @@
class SellingController(StockController):
def __setup__(self):
- if hasattr(self, "items"):
+ if hasattr(self, "taxes"):
self.print_templates = {
"taxes": "templates/print_formats/includes/taxes.html"
}
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py
index 640bcea..1b1527b 100644
--- a/erpnext/controllers/taxes_and_totals.py
+++ b/erpnext/controllers/taxes_and_totals.py
@@ -76,8 +76,9 @@
"tax_amount_for_current_item", "grand_total_for_current_item",
"tax_fraction_for_current_item", "grand_total_fraction_for_current_item"]
- if tax.charge_type != "Actual" and not self.discount_amount_applied:
- tax_fields.append("tax_amount")
+ if tax.charge_type != "Actual" and \
+ not (self.discount_amount_applied and self.doc.apply_discount_on=="Grand Total"):
+ tax_fields.append("tax_amount")
for fieldname in tax_fields:
tax.set(fieldname, 0.0)
@@ -215,8 +216,9 @@
current_tax_amount += actual_tax_dict[tax.idx]
# accumulate tax amount into tax.tax_amount
- if tax.charge_type != "Actual" and not self.discount_amount_applied:
- tax.tax_amount += current_tax_amount
+ if tax.charge_type != "Actual" and \
+ not (self.discount_amount_applied and self.doc.apply_discount_on=="Grand Total"):
+ tax.tax_amount += current_tax_amount
# store tax_amount for current item as it will be used for
# charge type = 'On Previous Row Amount'
@@ -250,8 +252,9 @@
self.round_off_totals(tax)
# adjust Discount Amount loss in last tax iteration
- if i == (len(self.doc.get("taxes")) - 1) and self.discount_amount_applied:
- self.adjust_discount_amount_loss(tax)
+ if i == (len(self.doc.get("taxes")) - 1) and self.discount_amount_applied \
+ and self.doc.apply_discount_on == "Grand Total":
+ self.adjust_discount_amount_loss(tax)
def get_current_tax_amount(self, item, tax, item_tax_map):
tax_rate = self._get_tax_rate(tax, item_tax_map)
@@ -291,7 +294,7 @@
tax.tax_amount = flt(tax.tax_amount, tax.precision("tax_amount"))
tax.tax_amount_after_discount_amount = flt(tax.tax_amount_after_discount_amount, tax.precision("tax_amount"))
- self._set_in_company_currency(tax, ["total", "tax_amount", "tax_amount_after_discount_amount"]);
+ self._set_in_company_currency(tax, ["total", "tax_amount", "tax_amount_after_discount_amount"])
def adjust_discount_amount_loss(self, tax):
discount_amount_loss = self.doc.grand_total - flt(self.doc.discount_amount) - tax.total
@@ -360,8 +363,8 @@
self.doc.base_discount_amount = 0
def get_total_for_discount_amount(self):
- if self.doc.apply_discount_on == "Print Total":
- return self.net_total
+ if self.doc.apply_discount_on == "Net Total":
+ return self.doc.net_total
else:
actual_taxes_dict = {}
diff --git a/erpnext/public/js/controllers/accounts.js b/erpnext/public/js/controllers/accounts.js
index 652350a..21ad71f 100644
--- a/erpnext/public/js/controllers/accounts.js
+++ b/erpnext/public/js/controllers/accounts.js
@@ -93,11 +93,11 @@
cur_frm.pformat.taxes= function(doc){
//function to make row of table
- var make_row = function(title, val, bold){
+ var make_row = function(title, val, bold, is_negative) {
var bstart = '<b>'; var bend = '</b>';
return '<tr><td style="width:50%;">' + (bold?bstart:'') + title + (bold?bend:'') + '</td>'
- + '<td style="width:50%;text-align:right;">' + format_currency(val, doc.currency) + '</td>'
- + '</tr>';
+ + '<td style="width:50%;text-align:right;">' + (is_negative ? '- ' : '')
+ + format_currency(val, doc.currency) + '</td></tr>';
}
function convert_rate(val) {
@@ -125,6 +125,10 @@
out += make_row('Net Total', doc.print_total, 1);
}
+ // Discount Amount on net total
+ if(!print_hide('discount_amount') && doc.apply_discount_on == "Net Total" && doc.discount_amount)
+ out += make_row('Discount Amount', doc.discount_amount, 0, 1);
+
// add rows
if(cl.length){
for(var i=0;i<cl.length;i++) {
@@ -133,9 +137,9 @@
}
}
- // Discount Amount
- if(!print_hide('discount_amount') && doc.discount_amount)
- out += make_row('Discount Amount', doc.discount_amount, 0);
+ // Discount Amount on grand total
+ if(!print_hide('discount_amount') && doc.apply_discount_on == "Grand Total" && doc.discount_amount)
+ out += make_row('Discount Amount', doc.discount_amount, 0, 1);
// grand total
if(!print_hide('grand_total'))
diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js
index e30099c..603b147 100644
--- a/erpnext/public/js/controllers/taxes_and_totals.js
+++ b/erpnext/public/js/controllers/taxes_and_totals.js
@@ -88,8 +88,9 @@
"tax_amount_for_current_item", "grand_total_for_current_item",
"tax_fraction_for_current_item", "grand_total_fraction_for_current_item"]
- if (cstr(tax.charge_type) != "Actual" && !me.discount_amount_applied)
- tax_fields.push("tax_amount");
+ if (cstr(tax.charge_type) != "Actual" &&
+ !(me.discount_amount_applied && me.frm.doc.apply_discount_on=="Grand Total"))
+ tax_fields.push("tax_amount");
$.each(tax_fields, function(i, fieldname) { tax[fieldname] = 0.0 });
@@ -217,8 +218,9 @@
}
// accumulate tax amount into tax.tax_amount
- if (tax.charge_type != "Actual" && !me.discount_amount_applied)
- tax.tax_amount += current_tax_amount;
+ if (tax.charge_type != "Actual" &&
+ !(me.discount_amount_applied && me.frm.doc.apply_discount_on=="Grand Total"))
+ tax.tax_amount += current_tax_amount;
// store tax_amount for current item as it will be used for
// charge type = 'On Previous Row Amount'
@@ -254,7 +256,7 @@
me.round_off_totals(tax);
// adjust Discount Amount loss in last tax iteration
- if ((i == me.frm.doc["taxes"].length - 1) && me.discount_amount_applied)
+ if ((i == me.frm.doc["taxes"].length - 1) && me.discount_amount_applied && me.frm.doc.apply_discount_on == "Grand Total")
me.adjust_discount_amount_loss(tax);
}
});
@@ -428,8 +430,8 @@
get_total_for_discount_amount: function() {
var me = this;
- if(this.apply_discount_amount == "Print Total") {
- return this.net_total
+ if(this.frm.doc.apply_discount_on == "Net Total") {
+ return this.frm.doc.net_total
} else {
var total_actual_tax = 0.0;
var actual_taxes_dict = {};
diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json
index d90f107..7a00237 100644
--- a/erpnext/selling/doctype/quotation/quotation.json
+++ b/erpnext/selling/doctype/quotation/quotation.json
@@ -1,974 +1,980 @@
{
- "allow_import": 1,
- "autoname": "naming_series:",
- "creation": "2013-05-24 19:29:08",
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Transaction",
+ "allow_import": 1,
+ "autoname": "naming_series:",
+ "creation": "2013-05-24 19:29:08",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Transaction",
"fields": [
{
- "fieldname": "customer_section",
- "fieldtype": "Section Break",
- "label": "",
- "options": "icon-user",
+ "fieldname": "customer_section",
+ "fieldtype": "Section Break",
+ "label": "",
+ "options": "icon-user",
"permlevel": 0
- },
+ },
{
- "fieldname": "column_break0",
- "fieldtype": "Column Break",
- "permlevel": 0,
- "read_only": 0,
+ "fieldname": "column_break0",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
+ "read_only": 0,
"width": "50%"
- },
+ },
{
- "fieldname": "naming_series",
- "fieldtype": "Select",
- "label": "Series",
- "no_copy": 1,
- "oldfieldname": "naming_series",
- "oldfieldtype": "Select",
- "options": "QTN-",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
+ "fieldname": "naming_series",
+ "fieldtype": "Select",
+ "label": "Series",
+ "no_copy": 1,
+ "oldfieldname": "naming_series",
+ "oldfieldtype": "Select",
+ "options": "QTN-",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "default": "Customer",
- "fieldname": "quotation_to",
- "fieldtype": "Select",
- "in_filter": 1,
- "label": "Quotation To",
- "oldfieldname": "quotation_to",
- "oldfieldtype": "Select",
- "options": "\nLead\nCustomer",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "report_hide": 0,
+ "default": "Customer",
+ "fieldname": "quotation_to",
+ "fieldtype": "Select",
+ "in_filter": 1,
+ "label": "Quotation To",
+ "oldfieldname": "quotation_to",
+ "oldfieldtype": "Select",
+ "options": "\nLead\nCustomer",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
+ "report_hide": 0,
"reqd": 1
- },
+ },
{
- "depends_on": "eval:doc.quotation_to == \"Customer\"",
- "fieldname": "customer",
- "fieldtype": "Link",
- "hidden": 0,
- "in_filter": 1,
- "label": "Customer",
- "oldfieldname": "customer",
- "oldfieldtype": "Link",
- "options": "Customer",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
+ "depends_on": "eval:doc.quotation_to == \"Customer\"",
+ "fieldname": "customer",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "in_filter": 1,
+ "label": "Customer",
+ "oldfieldname": "customer",
+ "oldfieldtype": "Link",
+ "options": "Customer",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
"search_index": 1
- },
+ },
{
- "depends_on": "eval:doc.quotation_to == \"Lead\"",
- "fieldname": "lead",
- "fieldtype": "Link",
- "hidden": 0,
- "in_filter": 1,
- "label": "Lead",
- "oldfieldname": "lead",
- "oldfieldtype": "Link",
- "options": "Lead",
- "permlevel": 0,
- "print_hide": 1,
+ "depends_on": "eval:doc.quotation_to == \"Lead\"",
+ "fieldname": "lead",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "in_filter": 1,
+ "label": "Lead",
+ "oldfieldname": "lead",
+ "oldfieldtype": "Link",
+ "options": "Lead",
+ "permlevel": 0,
+ "print_hide": 1,
"read_only": 0
- },
+ },
{
- "fieldname": "customer_name",
- "fieldtype": "Data",
- "hidden": 1,
- "in_list_view": 0,
- "label": "Customer / Lead Name",
- "permlevel": 0,
+ "fieldname": "customer_name",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "in_list_view": 0,
+ "label": "Customer / Lead Name",
+ "permlevel": 0,
"read_only": 1
- },
+ },
{
- "fieldname": "address_display",
- "fieldtype": "Small Text",
- "hidden": 1,
- "in_filter": 0,
- "label": "Address",
- "oldfieldname": "customer_address",
- "oldfieldtype": "Small Text",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 1,
- "reqd": 0,
+ "fieldname": "address_display",
+ "fieldtype": "Small Text",
+ "hidden": 1,
+ "in_filter": 0,
+ "label": "Address",
+ "oldfieldname": "customer_address",
+ "oldfieldtype": "Small Text",
+ "permlevel": 0,
+ "print_hide": 0,
+ "read_only": 1,
+ "reqd": 0,
"search_index": 0
- },
+ },
{
- "fieldname": "contact_display",
- "fieldtype": "Small Text",
- "hidden": 1,
- "in_filter": 0,
- "label": "Contact",
- "permlevel": 0,
- "print_hide": 0,
+ "fieldname": "contact_display",
+ "fieldtype": "Small Text",
+ "hidden": 1,
+ "in_filter": 0,
+ "label": "Contact",
+ "permlevel": 0,
+ "print_hide": 0,
"read_only": 1
- },
+ },
{
- "fieldname": "contact_mobile",
- "fieldtype": "Small Text",
- "hidden": 1,
- "label": "Mobile No",
- "permlevel": 0,
- "print_hide": 0,
+ "fieldname": "contact_mobile",
+ "fieldtype": "Small Text",
+ "hidden": 1,
+ "label": "Mobile No",
+ "permlevel": 0,
+ "print_hide": 0,
"read_only": 1
- },
+ },
{
- "fieldname": "contact_email",
- "fieldtype": "Small Text",
- "hidden": 1,
- "label": "Contact Email",
- "permlevel": 0,
- "print_hide": 1,
+ "fieldname": "contact_email",
+ "fieldtype": "Small Text",
+ "hidden": 1,
+ "label": "Contact Email",
+ "permlevel": 0,
+ "print_hide": 1,
"read_only": 1
- },
+ },
{
- "fieldname": "column_break1",
- "fieldtype": "Column Break",
- "oldfieldtype": "Column Break",
- "permlevel": 0,
- "read_only": 0,
+ "fieldname": "column_break1",
+ "fieldtype": "Column Break",
+ "oldfieldtype": "Column Break",
+ "permlevel": 0,
+ "read_only": 0,
"width": "50%"
- },
+ },
{
- "fieldname": "amended_from",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Amended From",
- "no_copy": 1,
- "oldfieldname": "amended_from",
- "oldfieldtype": "Data",
- "options": "Quotation",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1,
+ "fieldname": "amended_from",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Amended From",
+ "no_copy": 1,
+ "oldfieldname": "amended_from",
+ "oldfieldtype": "Data",
+ "options": "Quotation",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1,
"width": "150px"
- },
+ },
{
- "description": "",
- "fieldname": "company",
- "fieldtype": "Link",
- "in_filter": 1,
- "label": "Company",
- "oldfieldname": "company",
- "oldfieldtype": "Link",
- "options": "Company",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "reqd": 1,
- "search_index": 0,
+ "description": "",
+ "fieldname": "company",
+ "fieldtype": "Link",
+ "in_filter": 1,
+ "label": "Company",
+ "oldfieldname": "company",
+ "oldfieldtype": "Link",
+ "options": "Company",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
+ "reqd": 1,
+ "search_index": 0,
"width": "150px"
- },
+ },
{
- "default": "Today",
- "fieldname": "transaction_date",
- "fieldtype": "Date",
- "in_filter": 1,
- "label": "Date",
- "no_copy": 1,
- "oldfieldname": "transaction_date",
- "oldfieldtype": "Date",
- "permlevel": 0,
- "read_only": 0,
- "reqd": 1,
- "search_index": 1,
+ "default": "Today",
+ "fieldname": "transaction_date",
+ "fieldtype": "Date",
+ "in_filter": 1,
+ "label": "Date",
+ "no_copy": 1,
+ "oldfieldname": "transaction_date",
+ "oldfieldtype": "Date",
+ "permlevel": 0,
+ "read_only": 0,
+ "reqd": 1,
+ "search_index": 1,
"width": "100px"
- },
+ },
{
- "default": "Sales",
- "fieldname": "order_type",
- "fieldtype": "Select",
- "in_filter": 1,
- "label": "Order Type",
- "oldfieldname": "order_type",
- "oldfieldtype": "Select",
- "options": "\nSales\nMaintenance\nShopping Cart",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "reqd": 1,
+ "default": "Sales",
+ "fieldname": "order_type",
+ "fieldtype": "Select",
+ "in_filter": 1,
+ "label": "Order Type",
+ "oldfieldname": "order_type",
+ "oldfieldtype": "Select",
+ "options": "\nSales\nMaintenance\nShopping Cart",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
+ "reqd": 1,
"search_index": 0
- },
+ },
{
- "fieldname": "currency_and_price_list",
- "fieldtype": "Section Break",
- "label": "",
- "options": "icon-tag",
- "permlevel": 0,
+ "fieldname": "currency_and_price_list",
+ "fieldtype": "Section Break",
+ "label": "",
+ "options": "icon-tag",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "currency",
- "fieldtype": "Link",
- "in_filter": 1,
- "label": "Currency",
- "oldfieldname": "currency",
- "oldfieldtype": "Select",
- "options": "Currency",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "reqd": 1,
- "search_index": 0,
+ "fieldname": "currency",
+ "fieldtype": "Link",
+ "in_filter": 1,
+ "label": "Currency",
+ "oldfieldname": "currency",
+ "oldfieldtype": "Select",
+ "options": "Currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
+ "reqd": 1,
+ "search_index": 0,
"width": "100px"
- },
+ },
{
- "description": "Rate at which customer's currency is converted to company's base currency",
- "fieldname": "conversion_rate",
- "fieldtype": "Float",
- "label": "Exchange Rate",
- "oldfieldname": "conversion_rate",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "reqd": 1,
+ "description": "Rate at which customer's currency is converted to company's base currency",
+ "fieldname": "conversion_rate",
+ "fieldtype": "Float",
+ "label": "Exchange Rate",
+ "oldfieldname": "conversion_rate",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
+ "reqd": 1,
"width": "100px"
- },
+ },
{
- "fieldname": "column_break2",
- "fieldtype": "Column Break",
- "permlevel": 0,
- "read_only": 0,
+ "fieldname": "column_break2",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
+ "read_only": 0,
"width": "50%"
- },
+ },
{
- "fieldname": "selling_price_list",
- "fieldtype": "Link",
- "in_filter": 1,
- "label": "Price List",
- "oldfieldname": "price_list_name",
- "oldfieldtype": "Select",
- "options": "Price List",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "reqd": 1,
- "search_index": 0,
+ "fieldname": "selling_price_list",
+ "fieldtype": "Link",
+ "in_filter": 1,
+ "label": "Price List",
+ "oldfieldname": "price_list_name",
+ "oldfieldtype": "Select",
+ "options": "Price List",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
+ "reqd": 1,
+ "search_index": 0,
"width": "100px"
- },
+ },
{
- "fieldname": "price_list_currency",
- "fieldtype": "Link",
- "label": "Price List Currency",
- "options": "Currency",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1,
+ "fieldname": "price_list_currency",
+ "fieldtype": "Link",
+ "label": "Price List Currency",
+ "options": "Currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1,
"reqd": 1
- },
+ },
{
- "description": "Rate at which Price list currency is converted to company's base currency",
- "fieldname": "plc_conversion_rate",
- "fieldtype": "Float",
- "label": "Price List Exchange Rate",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
+ "description": "Rate at which Price list currency is converted to company's base currency",
+ "fieldname": "plc_conversion_rate",
+ "fieldtype": "Float",
+ "label": "Price List Exchange Rate",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "fieldname": "ignore_pricing_rule",
- "fieldtype": "Check",
- "label": "Ignore Pricing Rule",
- "no_copy": 1,
- "permlevel": 1,
+ "fieldname": "ignore_pricing_rule",
+ "fieldtype": "Check",
+ "label": "Ignore Pricing Rule",
+ "no_copy": 1,
+ "permlevel": 1,
"print_hide": 1
- },
+ },
{
- "fieldname": "items_section",
- "fieldtype": "Section Break",
- "label": "",
- "oldfieldtype": "Section Break",
- "options": "icon-shopping-cart",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
+ "fieldname": "items_section",
+ "fieldtype": "Section Break",
+ "label": "",
+ "oldfieldtype": "Section Break",
+ "options": "icon-shopping-cart",
+ "permlevel": 0,
+ "print_hide": 0,
+ "read_only": 0,
"search_index": 0
- },
+ },
{
- "allow_on_submit": 1,
- "fieldname": "items",
- "fieldtype": "Table",
- "label": "Items",
- "oldfieldname": "quotation_details",
- "oldfieldtype": "Table",
- "options": "Quotation Item",
- "permlevel": 0,
- "read_only": 0,
- "reqd": 0,
+ "allow_on_submit": 1,
+ "fieldname": "items",
+ "fieldtype": "Table",
+ "label": "Items",
+ "oldfieldname": "quotation_details",
+ "oldfieldtype": "Table",
+ "options": "Quotation Item",
+ "permlevel": 0,
+ "read_only": 0,
+ "reqd": 0,
"width": "40px"
- },
+ },
{
- "fieldname": "sec_break23",
- "fieldtype": "Section Break",
- "permlevel": 0,
+ "fieldname": "sec_break23",
+ "fieldtype": "Section Break",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "base_print_total",
- "fieldtype": "Currency",
- "label": "Print Total (Company Currency)",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
+ "fieldname": "base_print_total",
+ "fieldtype": "Currency",
+ "label": "Print Total (Company Currency)",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
"read_only": 1
- },
+ },
{
- "fieldname": "base_net_total",
- "fieldtype": "Currency",
- "label": "Net Total (Company Currency)",
- "no_copy": 0,
- "oldfieldname": "net_total",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1,
- "reqd": 0,
+ "fieldname": "base_net_total",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "label": "Net Total (Company Currency)",
+ "no_copy": 0,
+ "oldfieldname": "net_total",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1,
+ "reqd": 0,
"width": "100px"
- },
+ },
{
- "fieldname": "column_break_28",
- "fieldtype": "Column Break",
+ "fieldname": "column_break_28",
+ "fieldtype": "Column Break",
"permlevel": 0
- },
+ },
{
- "fieldname": "print_total",
- "fieldtype": "Currency",
- "label": "Print Total",
- "options": "currency",
- "permlevel": 0,
- "precision": "",
+ "fieldname": "print_total",
+ "fieldtype": "Currency",
+ "label": "Print Total",
+ "options": "currency",
+ "permlevel": 0,
+ "precision": "",
"read_only": 1
- },
+ },
{
- "fieldname": "net_total",
- "fieldtype": "Currency",
- "label": "Net Total",
- "options": "currency",
- "permlevel": 0,
+ "fieldname": "net_total",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "label": "Net Total",
+ "options": "currency",
+ "permlevel": 0,
+ "print_hide": 1,
"read_only": 1
- },
+ },
{
- "fieldname": "taxes_section",
- "fieldtype": "Section Break",
- "label": "Taxes and Charges",
- "oldfieldtype": "Section Break",
- "options": "icon-money",
- "permlevel": 0,
+ "fieldname": "taxes_section",
+ "fieldtype": "Section Break",
+ "label": "Taxes and Charges",
+ "oldfieldtype": "Section Break",
+ "options": "icon-money",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "taxes_and_charges",
- "fieldtype": "Link",
- "hidden": 0,
- "label": "Taxes and Charges",
- "oldfieldname": "charge",
- "oldfieldtype": "Link",
- "options": "Sales Taxes and Charges Master",
- "permlevel": 0,
- "print_hide": 1,
+ "fieldname": "taxes_and_charges",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "label": "Taxes and Charges",
+ "oldfieldname": "charge",
+ "oldfieldtype": "Link",
+ "options": "Sales Taxes and Charges Master",
+ "permlevel": 0,
+ "print_hide": 1,
"read_only": 0
- },
+ },
{
- "fieldname": "column_break_34",
- "fieldtype": "Column Break",
+ "fieldname": "column_break_34",
+ "fieldtype": "Column Break",
"permlevel": 0
- },
+ },
{
- "fieldname": "shipping_rule",
- "fieldtype": "Link",
- "hidden": 0,
- "label": "Shipping Rule",
- "oldfieldtype": "Button",
- "options": "Shipping Rule",
- "permlevel": 0,
- "print_hide": 1,
+ "fieldname": "shipping_rule",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "label": "Shipping Rule",
+ "oldfieldtype": "Button",
+ "options": "Shipping Rule",
+ "permlevel": 0,
+ "print_hide": 1,
"read_only": 0
- },
+ },
{
- "fieldname": "section_break_36",
- "fieldtype": "Section Break",
+ "fieldname": "section_break_36",
+ "fieldtype": "Section Break",
"permlevel": 0
- },
+ },
{
- "fieldname": "taxes",
- "fieldtype": "Table",
- "label": "Sales Taxes and Charges",
- "oldfieldname": "other_charges",
- "oldfieldtype": "Table",
- "options": "Sales Taxes and Charges",
- "permlevel": 0,
+ "fieldname": "taxes",
+ "fieldtype": "Table",
+ "label": "Sales Taxes and Charges",
+ "oldfieldname": "other_charges",
+ "oldfieldtype": "Table",
+ "options": "Sales Taxes and Charges",
+ "permlevel": 0,
+ "print_hide": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "other_charges_calculation",
- "fieldtype": "HTML",
- "label": "Taxes and Charges Calculation",
- "oldfieldtype": "HTML",
- "permlevel": 0,
- "print_hide": 1,
+ "fieldname": "other_charges_calculation",
+ "fieldtype": "HTML",
+ "label": "Taxes and Charges Calculation",
+ "oldfieldtype": "HTML",
+ "permlevel": 0,
+ "print_hide": 1,
"read_only": 0
- },
+ },
{
- "fieldname": "section_break_39",
- "fieldtype": "Section Break",
+ "fieldname": "section_break_39",
+ "fieldtype": "Section Break",
"permlevel": 0
- },
+ },
{
- "fieldname": "total_taxes_and_charges",
- "fieldtype": "Currency",
- "label": "Total Taxes and Charges",
- "options": "currency",
- "permlevel": 0,
- "print_hide": 1,
+ "fieldname": "total_taxes_and_charges",
+ "fieldtype": "Currency",
+ "label": "Total Taxes and Charges",
+ "options": "currency",
+ "permlevel": 0,
+ "print_hide": 1,
"read_only": 1
- },
+ },
{
- "fieldname": "base_total_taxes_and_charges",
- "fieldtype": "Currency",
- "label": "Total Taxes and Charges (Company Currency)",
- "oldfieldname": "other_charges_total",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
+ "fieldname": "base_total_taxes_and_charges",
+ "fieldtype": "Currency",
+ "label": "Total Taxes and Charges (Company Currency)",
+ "oldfieldname": "other_charges_total",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
"read_only": 1
- },
+ },
{
- "fieldname": "column_break_42",
- "fieldtype": "Column Break",
+ "fieldname": "column_break_42",
+ "fieldtype": "Column Break",
"permlevel": 0
- },
+ },
{
- "default": "Grand Total",
- "fieldname": "apply_discount_on",
- "fieldtype": "Select",
- "label": "Apply Discount On",
- "options": "\nGrand Total\nPrint Total",
- "permlevel": 0,
- "precision": ""
- },
- {
- "fieldname": "discount_amount",
- "fieldtype": "Currency",
- "label": "Discount Amount",
- "options": "currency",
- "permlevel": 0
- },
- {
- "fieldname": "base_discount_amount",
- "fieldtype": "Currency",
- "label": "Discount Amount (Company Currency)",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "read_only": 1
- },
- {
- "fieldname": "totals",
- "fieldtype": "Section Break",
- "label": "",
- "oldfieldtype": "Section Break",
- "options": "icon-money",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0
- },
- {
- "fieldname": "base_grand_total",
- "fieldtype": "Currency",
- "label": "Grand Total (Company Currency)",
- "no_copy": 0,
- "oldfieldname": "grand_total",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1,
- "reqd": 0,
- "width": "200px"
- },
- {
- "fieldname": "base_rounded_total",
- "fieldtype": "Currency",
- "label": "Rounded Total (Company Currency)",
- "no_copy": 0,
- "oldfieldname": "rounded_total",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1,
- "width": "200px"
- },
- {
- "description": "In Words will be visible once you save the Quotation.",
- "fieldname": "base_in_words",
- "fieldtype": "Data",
- "label": "In Words (Company Currency)",
- "no_copy": 0,
- "oldfieldname": "in_words",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1,
- "width": "200px"
- },
- {
- "fieldname": "column_break3",
- "fieldtype": "Column Break",
- "oldfieldtype": "Column Break",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "width": "50%"
- },
- {
- "fieldname": "grand_total",
- "fieldtype": "Currency",
- "in_list_view": 1,
- "label": "Grand Total",
- "no_copy": 0,
- "oldfieldname": "grand_total_export",
- "oldfieldtype": "Currency",
- "options": "currency",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 1,
- "reqd": 0,
- "width": "200px"
- },
- {
- "fieldname": "rounded_total",
- "fieldtype": "Currency",
- "label": "Rounded Total",
- "no_copy": 0,
- "oldfieldname": "rounded_total_export",
- "oldfieldtype": "Currency",
- "options": "currency",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 1,
- "reqd": 0,
- "width": "200px"
- },
- {
- "fieldname": "in_words",
- "fieldtype": "Data",
- "label": "In Words",
- "no_copy": 0,
- "oldfieldname": "in_words_export",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 1,
- "width": "200px"
- },
- {
- "fieldname": "fold",
- "fieldtype": "Fold",
- "label": "Fold",
- "permlevel": 0
- },
- {
- "fieldname": "terms_section_break",
- "fieldtype": "Section Break",
- "label": "Terms and Conditions",
- "oldfieldtype": "Section Break",
- "options": "icon-legal",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0
- },
- {
- "fieldname": "tc_name",
- "fieldtype": "Link",
- "label": "Terms",
- "oldfieldname": "tc_name",
- "oldfieldtype": "Link",
- "options": "Terms and Conditions",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "report_hide": 1
- },
- {
- "fieldname": "terms",
- "fieldtype": "Text Editor",
- "label": "Term Details",
- "oldfieldname": "terms",
- "oldfieldtype": "Text Editor",
- "permlevel": 0,
- "read_only": 0
- },
- {
- "fieldname": "contact_section",
- "fieldtype": "Section Break",
- "label": "Contact Info",
- "options": "icon-bullhorn",
- "permlevel": 0,
- "read_only": 0
- },
- {
- "description": "",
- "fieldname": "territory",
- "fieldtype": "Link",
- "hidden": 0,
- "in_filter": 1,
- "label": "Territory",
- "options": "Territory",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "reqd": 1,
- "search_index": 0
- },
- {
- "depends_on": "customer",
- "description": "",
- "fieldname": "customer_group",
- "fieldtype": "Link",
- "in_filter": 1,
- "label": "Customer Group",
- "oldfieldname": "customer_group",
- "oldfieldtype": "Link",
- "options": "Customer Group",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "reqd": 0,
- "search_index": 0
- },
- {
- "fieldname": "shipping_address_name",
- "fieldtype": "Link",
- "hidden": 0,
- "label": "Shipping Address",
- "options": "Address",
- "permlevel": 0,
+ "default": "Grand Total",
+ "fieldname": "apply_discount_on",
+ "fieldtype": "Select",
+ "label": "Apply Discount On",
+ "options": "\nGrand Total\nNet Total",
+ "permlevel": 0,
+ "precision": "",
"print_hide": 1
- },
+ },
{
- "fieldname": "shipping_address",
- "fieldtype": "Small Text",
- "hidden": 1,
- "label": "Shipping Address",
- "permlevel": 0,
- "print_hide": 1,
+ "fieldname": "discount_amount",
+ "fieldtype": "Currency",
+ "label": "Discount Amount",
+ "options": "currency",
+ "permlevel": 0,
+ "print_hide": 1
+ },
+ {
+ "fieldname": "base_discount_amount",
+ "fieldtype": "Currency",
+ "label": "Discount Amount (Company Currency)",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
"read_only": 1
- },
+ },
{
- "depends_on": "customer",
- "fieldname": "col_break98",
- "fieldtype": "Column Break",
- "permlevel": 0,
- "read_only": 0,
+ "fieldname": "totals",
+ "fieldtype": "Section Break",
+ "label": "",
+ "oldfieldtype": "Section Break",
+ "options": "icon-money",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0
+ },
+ {
+ "fieldname": "base_grand_total",
+ "fieldtype": "Currency",
+ "label": "Grand Total (Company Currency)",
+ "no_copy": 0,
+ "oldfieldname": "grand_total",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1,
+ "reqd": 0,
+ "width": "200px"
+ },
+ {
+ "fieldname": "base_rounded_total",
+ "fieldtype": "Currency",
+ "label": "Rounded Total (Company Currency)",
+ "no_copy": 0,
+ "oldfieldname": "rounded_total",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1,
+ "width": "200px"
+ },
+ {
+ "description": "In Words will be visible once you save the Quotation.",
+ "fieldname": "base_in_words",
+ "fieldtype": "Data",
+ "label": "In Words (Company Currency)",
+ "no_copy": 0,
+ "oldfieldname": "in_words",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1,
+ "width": "200px"
+ },
+ {
+ "fieldname": "column_break3",
+ "fieldtype": "Column Break",
+ "oldfieldtype": "Column Break",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
"width": "50%"
- },
+ },
{
- "fieldname": "customer_address",
- "fieldtype": "Link",
- "hidden": 0,
- "in_filter": 1,
- "label": "Customer Address",
- "options": "Address",
- "permlevel": 0,
- "print_hide": 1,
+ "fieldname": "grand_total",
+ "fieldtype": "Currency",
+ "in_list_view": 1,
+ "label": "Grand Total",
+ "no_copy": 0,
+ "oldfieldname": "grand_total_export",
+ "oldfieldtype": "Currency",
+ "options": "currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "read_only": 1,
+ "reqd": 0,
+ "width": "200px"
+ },
+ {
+ "fieldname": "rounded_total",
+ "fieldtype": "Currency",
+ "label": "Rounded Total",
+ "no_copy": 0,
+ "oldfieldname": "rounded_total_export",
+ "oldfieldtype": "Currency",
+ "options": "currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "read_only": 1,
+ "reqd": 0,
+ "width": "200px"
+ },
+ {
+ "fieldname": "in_words",
+ "fieldtype": "Data",
+ "label": "In Words",
+ "no_copy": 0,
+ "oldfieldname": "in_words_export",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 0,
+ "read_only": 1,
+ "width": "200px"
+ },
+ {
+ "fieldname": "fold",
+ "fieldtype": "Fold",
+ "label": "Fold",
+ "permlevel": 0
+ },
+ {
+ "fieldname": "terms_section_break",
+ "fieldtype": "Section Break",
+ "label": "Terms and Conditions",
+ "oldfieldtype": "Section Break",
+ "options": "icon-legal",
+ "permlevel": 0,
+ "print_hide": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.customer",
- "fieldname": "contact_person",
- "fieldtype": "Link",
- "hidden": 0,
- "in_filter": 1,
- "label": "Contact Person",
- "oldfieldname": "contact_person",
- "oldfieldtype": "Link",
- "options": "Contact",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "reqd": 0
- },
- {
- "fieldname": "more_info",
- "fieldtype": "Section Break",
- "label": "More Info",
- "oldfieldtype": "Section Break",
- "options": "icon-file-text",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0
- },
- {
- "fieldname": "campaign",
- "fieldtype": "Link",
- "hidden": 0,
- "label": "Campaign",
- "no_copy": 0,
- "oldfieldname": "campaign",
- "oldfieldtype": "Link",
- "options": "Campaign",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "report_hide": 0
- },
- {
- "fieldname": "source",
- "fieldtype": "Select",
- "hidden": 0,
- "label": "Source",
- "no_copy": 0,
- "oldfieldname": "source",
- "oldfieldtype": "Select",
- "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "report_hide": 0
- },
- {
- "allow_on_submit": 0,
- "default": "Draft",
- "fieldname": "status",
- "fieldtype": "Select",
- "in_filter": 1,
- "in_list_view": 1,
- "label": "Status",
- "no_copy": 1,
- "oldfieldname": "status",
- "oldfieldtype": "Select",
- "options": "Draft\nSubmitted\nOrdered\nLost\nCancelled\nOpen\nReplied",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1,
- "reqd": 1,
- "search_index": 0
- },
- {
- "allow_on_submit": 1,
- "fieldname": "order_lost_reason",
- "fieldtype": "Small Text",
- "label": "Quotation Lost Reason",
- "no_copy": 1,
- "oldfieldname": "order_lost_reason",
- "oldfieldtype": "Small Text",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0
- },
- {
- "fieldname": "column_break4",
- "fieldtype": "Column Break",
- "oldfieldtype": "Column Break",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "width": "50%"
- },
- {
- "allow_on_submit": 1,
- "fieldname": "letter_head",
- "fieldtype": "Link",
- "label": "Letter Head",
- "oldfieldname": "letter_head",
- "oldfieldtype": "Select",
- "options": "Letter Head",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0
- },
- {
- "allow_on_submit": 1,
- "fieldname": "select_print_heading",
- "fieldtype": "Link",
- "label": "Print Heading",
- "no_copy": 1,
- "oldfieldname": "select_print_heading",
- "oldfieldtype": "Link",
- "options": "Print Heading",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
+ "fieldname": "tc_name",
+ "fieldtype": "Link",
+ "label": "Terms",
+ "oldfieldname": "tc_name",
+ "oldfieldtype": "Link",
+ "options": "Terms and Conditions",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
"report_hide": 1
- },
+ },
{
- "fieldname": "fiscal_year",
- "fieldtype": "Link",
- "in_filter": 1,
- "label": "Fiscal Year",
- "oldfieldname": "fiscal_year",
- "oldfieldtype": "Select",
- "options": "Fiscal Year",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "reqd": 1,
+ "fieldname": "terms",
+ "fieldtype": "Text Editor",
+ "label": "Term Details",
+ "oldfieldname": "terms",
+ "oldfieldtype": "Text Editor",
+ "permlevel": 0,
+ "read_only": 0
+ },
+ {
+ "fieldname": "contact_section",
+ "fieldtype": "Section Break",
+ "label": "Contact Info",
+ "options": "icon-bullhorn",
+ "permlevel": 0,
+ "read_only": 0
+ },
+ {
+ "description": "",
+ "fieldname": "territory",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "in_filter": 1,
+ "label": "Territory",
+ "options": "Territory",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
+ "reqd": 1,
"search_index": 0
- },
+ },
{
- "fieldname": "enq_det",
- "fieldtype": "Text",
- "hidden": 1,
- "label": "Opportunity Item",
- "no_copy": 0,
- "oldfieldname": "enq_det",
- "oldfieldtype": "Text",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1,
+ "depends_on": "customer",
+ "description": "",
+ "fieldname": "customer_group",
+ "fieldtype": "Link",
+ "in_filter": 1,
+ "label": "Customer Group",
+ "oldfieldname": "customer_group",
+ "oldfieldtype": "Link",
+ "options": "Customer Group",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
+ "reqd": 0,
+ "search_index": 0
+ },
+ {
+ "fieldname": "shipping_address_name",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "label": "Shipping Address",
+ "options": "Address",
+ "permlevel": 0,
+ "print_hide": 1
+ },
+ {
+ "fieldname": "shipping_address",
+ "fieldtype": "Small Text",
+ "hidden": 1,
+ "label": "Shipping Address",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1
+ },
+ {
+ "depends_on": "customer",
+ "fieldname": "col_break98",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
+ "read_only": 0,
+ "width": "50%"
+ },
+ {
+ "fieldname": "customer_address",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "in_filter": 1,
+ "label": "Customer Address",
+ "options": "Address",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0
+ },
+ {
+ "depends_on": "eval:doc.customer",
+ "fieldname": "contact_person",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "in_filter": 1,
+ "label": "Contact Person",
+ "oldfieldname": "contact_person",
+ "oldfieldtype": "Link",
+ "options": "Contact",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
+ "reqd": 0
+ },
+ {
+ "fieldname": "more_info",
+ "fieldtype": "Section Break",
+ "label": "More Info",
+ "oldfieldtype": "Section Break",
+ "options": "icon-file-text",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0
+ },
+ {
+ "fieldname": "campaign",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "label": "Campaign",
+ "no_copy": 0,
+ "oldfieldname": "campaign",
+ "oldfieldtype": "Link",
+ "options": "Campaign",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
+ "report_hide": 0
+ },
+ {
+ "fieldname": "source",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "label": "Source",
+ "no_copy": 0,
+ "oldfieldname": "source",
+ "oldfieldtype": "Select",
+ "options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
+ "report_hide": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "default": "Draft",
+ "fieldname": "status",
+ "fieldtype": "Select",
+ "in_filter": 1,
+ "in_list_view": 1,
+ "label": "Status",
+ "no_copy": 1,
+ "oldfieldname": "status",
+ "oldfieldtype": "Select",
+ "options": "Draft\nSubmitted\nOrdered\nLost\nCancelled\nOpen\nReplied",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1,
+ "reqd": 1,
+ "search_index": 0
+ },
+ {
+ "allow_on_submit": 1,
+ "fieldname": "order_lost_reason",
+ "fieldtype": "Small Text",
+ "label": "Quotation Lost Reason",
+ "no_copy": 1,
+ "oldfieldname": "order_lost_reason",
+ "oldfieldtype": "Small Text",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0
+ },
+ {
+ "fieldname": "column_break4",
+ "fieldtype": "Column Break",
+ "oldfieldtype": "Column Break",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
+ "width": "50%"
+ },
+ {
+ "allow_on_submit": 1,
+ "fieldname": "letter_head",
+ "fieldtype": "Link",
+ "label": "Letter Head",
+ "oldfieldname": "letter_head",
+ "oldfieldtype": "Select",
+ "options": "Letter Head",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0
+ },
+ {
+ "allow_on_submit": 1,
+ "fieldname": "select_print_heading",
+ "fieldtype": "Link",
+ "label": "Print Heading",
+ "no_copy": 1,
+ "oldfieldname": "select_print_heading",
+ "oldfieldtype": "Link",
+ "options": "Print Heading",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
+ "report_hide": 1
+ },
+ {
+ "fieldname": "fiscal_year",
+ "fieldtype": "Link",
+ "in_filter": 1,
+ "label": "Fiscal Year",
+ "oldfieldname": "fiscal_year",
+ "oldfieldtype": "Select",
+ "options": "Fiscal Year",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
+ "reqd": 1,
+ "search_index": 0
+ },
+ {
+ "fieldname": "enq_det",
+ "fieldtype": "Text",
+ "hidden": 1,
+ "label": "Opportunity Item",
+ "no_copy": 0,
+ "oldfieldname": "enq_det",
+ "oldfieldtype": "Text",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1,
"report_hide": 0
}
- ],
- "hide_toolbar": 0,
- "icon": "icon-shopping-cart",
- "idx": 1,
- "is_submittable": 1,
- "max_attachments": 1,
- "modified": "2015-02-20 05:16:20.664025",
- "modified_by": "Administrator",
- "module": "Selling",
- "name": "Quotation",
- "owner": "Administrator",
+ ],
+ "hide_toolbar": 0,
+ "icon": "icon-shopping-cart",
+ "idx": 1,
+ "is_submittable": 1,
+ "max_attachments": 1,
+ "modified": "2015-02-23 00:55:17.519474",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Quotation",
+ "owner": "Administrator",
"permissions": [
{
- "amend": 1,
- "cancel": 1,
- "create": 1,
- "delete": 1,
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Sales User",
- "share": 1,
- "submit": 1,
+ "amend": 1,
+ "cancel": 1,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Sales User",
+ "share": 1,
+ "submit": 1,
"write": 1
- },
+ },
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
- "match": "",
- "permlevel": 1,
- "read": 1,
- "report": 1,
- "role": "Sales User",
- "submit": 0,
+ "amend": 0,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "match": "",
+ "permlevel": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Sales User",
+ "submit": 0,
"write": 0
- },
+ },
{
- "cancel": 0,
- "delete": 0,
- "email": 1,
- "match": "",
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
+ "cancel": 0,
+ "delete": 0,
+ "email": 1,
+ "match": "",
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
"role": "Customer"
- },
+ },
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
- "match": "",
- "permlevel": 1,
- "read": 1,
- "report": 1,
- "role": "Sales Manager",
- "submit": 0,
+ "amend": 0,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "match": "",
+ "permlevel": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Sales Manager",
+ "submit": 0,
"write": 0
- },
+ },
{
- "amend": 1,
- "cancel": 1,
- "create": 1,
- "delete": 1,
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Sales Manager",
- "share": 1,
- "submit": 1,
+ "amend": 1,
+ "cancel": 1,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Sales Manager",
+ "share": 1,
+ "submit": 1,
"write": 1
- },
+ },
{
- "amend": 1,
- "cancel": 1,
- "create": 1,
- "delete": 1,
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Maintenance Manager",
- "share": 1,
- "submit": 1,
+ "amend": 1,
+ "cancel": 1,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Maintenance Manager",
+ "share": 1,
+ "submit": 1,
"write": 1
- },
+ },
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
- "match": "",
- "permlevel": 1,
- "read": 1,
- "report": 1,
- "role": "Maintenance Manager",
+ "amend": 0,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "match": "",
+ "permlevel": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Maintenance Manager",
"submit": 0
- },
+ },
{
- "amend": 1,
- "cancel": 1,
- "create": 1,
- "delete": 1,
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Maintenance User",
- "share": 1,
- "submit": 1,
+ "amend": 1,
+ "cancel": 1,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Maintenance User",
+ "share": 1,
+ "submit": 1,
"write": 1
- },
+ },
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
- "match": "",
- "permlevel": 1,
- "read": 1,
- "report": 1,
- "role": "Maintenance User",
+ "amend": 0,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "match": "",
+ "permlevel": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Maintenance User",
"submit": 0
}
- ],
- "read_only_onload": 1,
- "search_fields": "status,transaction_date,customer,lead,order_type",
- "sort_field": "modified",
- "sort_order": "DESC",
+ ],
+ "read_only_onload": 1,
+ "search_fields": "status,transaction_date,customer,lead,order_type",
+ "sort_field": "modified",
+ "sort_order": "DESC",
"title_field": "customer_name"
-}
+}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.json b/erpnext/selling/doctype/quotation_item/quotation_item.json
index b2f9307..da7996a 100644
--- a/erpnext/selling/doctype/quotation_item/quotation_item.json
+++ b/erpnext/selling/doctype/quotation_item/quotation_item.json
@@ -1,396 +1,399 @@
{
- "autoname": "hash",
- "creation": "2013-03-07 11:42:57",
- "docstatus": 0,
- "doctype": "DocType",
+ "autoname": "QUOD/.#####",
+ "creation": "2013-03-07 11:42:57",
+ "docstatus": 0,
+ "doctype": "DocType",
"fields": [
{
- "fieldname": "item_code",
- "fieldtype": "Link",
- "hidden": 0,
- "in_filter": 1,
- "in_list_view": 1,
- "label": "Item Code",
- "oldfieldname": "item_code",
- "oldfieldtype": "Link",
- "options": "Item",
- "permlevel": 0,
- "print_hide": 0,
- "print_width": "150px",
- "read_only": 0,
- "reqd": 1,
- "search_index": 1,
+ "fieldname": "item_code",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "in_filter": 1,
+ "in_list_view": 1,
+ "label": "Item Code",
+ "oldfieldname": "item_code",
+ "oldfieldtype": "Link",
+ "options": "Item",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_width": "150px",
+ "read_only": 0,
+ "reqd": 1,
+ "search_index": 1,
"width": "150px"
- },
+ },
{
- "fieldname": "customer_item_code",
- "fieldtype": "Data",
- "hidden": 1,
- "label": "Customer's Item Code",
- "permlevel": 0,
- "print_hide": 1,
+ "fieldname": "customer_item_code",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "label": "Customer's Item Code",
+ "permlevel": 0,
+ "print_hide": 1,
"read_only": 1
- },
+ },
{
- "fieldname": "item_name",
- "fieldtype": "Data",
- "in_filter": 1,
- "in_list_view": 1,
- "label": "Item Name",
- "oldfieldname": "item_name",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "150px",
- "read_only": 0,
- "reqd": 1,
- "search_index": 1,
+ "fieldname": "item_name",
+ "fieldtype": "Data",
+ "in_filter": 1,
+ "in_list_view": 1,
+ "label": "Item Name",
+ "oldfieldname": "item_name",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "150px",
+ "read_only": 0,
+ "reqd": 1,
+ "search_index": 1,
"width": "150px"
- },
+ },
{
- "fieldname": "col_break1",
- "fieldtype": "Column Break",
+ "fieldname": "col_break1",
+ "fieldtype": "Column Break",
"permlevel": 0
- },
+ },
{
- "fieldname": "description",
- "fieldtype": "Small Text",
- "in_list_view": 1,
- "label": "Description",
- "oldfieldname": "description",
- "oldfieldtype": "Small Text",
- "permlevel": 0,
- "print_hide": 0,
- "print_width": "300px",
- "read_only": 0,
- "reqd": 1,
+ "fieldname": "description",
+ "fieldtype": "Small Text",
+ "in_list_view": 1,
+ "label": "Description",
+ "oldfieldname": "description",
+ "oldfieldtype": "Small Text",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_width": "300px",
+ "read_only": 0,
+ "reqd": 1,
"width": "300px"
- },
+ },
{
- "fieldname": "image",
- "fieldtype": "Attach",
- "hidden": 1,
- "label": "Image",
- "permlevel": 0,
- "precision": "",
+ "fieldname": "image",
+ "fieldtype": "Attach",
+ "hidden": 1,
+ "label": "Image",
+ "permlevel": 0,
+ "precision": "",
"print_hide": 1
- },
+ },
{
- "fieldname": "image_view",
- "fieldtype": "Image",
- "label": "Image View",
- "options": "image",
- "permlevel": 0,
+ "fieldname": "image_view",
+ "fieldtype": "Image",
+ "label": "Image View",
+ "options": "image",
+ "permlevel": 0,
"precision": ""
- },
+ },
{
- "fieldname": "quantity_and_rate",
- "fieldtype": "Section Break",
- "label": "Quantity and Rate",
+ "fieldname": "quantity_and_rate",
+ "fieldtype": "Section Break",
+ "label": "Quantity and Rate",
"permlevel": 0
- },
+ },
{
- "fieldname": "qty",
- "fieldtype": "Float",
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Quantity",
- "oldfieldname": "qty",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 0,
- "print_width": "100px",
- "read_only": 0,
- "reqd": 1,
- "search_index": 0,
+ "fieldname": "qty",
+ "fieldtype": "Float",
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Quantity",
+ "oldfieldname": "qty",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_width": "100px",
+ "read_only": 0,
+ "reqd": 1,
+ "search_index": 0,
"width": "100px"
- },
+ },
{
- "fieldname": "price_list_rate",
- "fieldtype": "Currency",
- "label": "Price List Rate",
- "oldfieldname": "ref_rate",
- "oldfieldtype": "Currency",
- "options": "currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "100px",
- "read_only": 1,
- "reqd": 0,
+ "fieldname": "price_list_rate",
+ "fieldtype": "Currency",
+ "label": "Price List Rate",
+ "oldfieldname": "ref_rate",
+ "oldfieldtype": "Currency",
+ "options": "currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "100px",
+ "read_only": 1,
+ "reqd": 0,
"width": "100px"
- },
+ },
{
- "fieldname": "discount_percentage",
- "fieldtype": "Percent",
- "in_list_view": 1,
- "label": "Discount (%)",
- "oldfieldname": "adj_rate",
- "oldfieldtype": "Float",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "100px",
- "read_only": 0,
+ "fieldname": "discount_percentage",
+ "fieldtype": "Percent",
+ "in_list_view": 1,
+ "label": "Discount (%)",
+ "oldfieldname": "adj_rate",
+ "oldfieldtype": "Float",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "100px",
+ "read_only": 0,
"width": "100px"
- },
+ },
{
- "fieldname": "col_break2",
- "fieldtype": "Column Break",
+ "fieldname": "col_break2",
+ "fieldtype": "Column Break",
"permlevel": 0
- },
+ },
{
- "fieldname": "stock_uom",
- "fieldtype": "Link",
- "in_list_view": 1,
- "label": "UOM",
- "oldfieldname": "stock_uom",
- "oldfieldtype": "Data",
- "options": "UOM",
- "permlevel": 0,
- "print_hide": 0,
- "print_width": "100px",
- "read_only": 1,
- "reqd": 0,
+ "fieldname": "stock_uom",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "UOM",
+ "oldfieldname": "stock_uom",
+ "oldfieldtype": "Data",
+ "options": "UOM",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_width": "100px",
+ "read_only": 1,
+ "reqd": 0,
"width": "100px"
- },
+ },
{
- "fieldname": "base_price_list_rate",
- "fieldtype": "Currency",
- "label": "Price List Rate (Company Currency)",
- "oldfieldname": "base_ref_rate",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "100px",
- "read_only": 1,
+ "fieldname": "base_price_list_rate",
+ "fieldtype": "Currency",
+ "label": "Price List Rate (Company Currency)",
+ "oldfieldname": "base_ref_rate",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "100px",
+ "read_only": 1,
"width": "100px"
- },
+ },
{
- "fieldname": "Section_break1",
- "fieldtype": "Section Break",
+ "fieldname": "Section_break1",
+ "fieldtype": "Section Break",
"permlevel": 0
- },
+ },
{
- "fieldname": "rate",
- "fieldtype": "Currency",
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Rate",
- "oldfieldname": "export_rate",
- "oldfieldtype": "Currency",
- "options": "currency",
- "permlevel": 0,
- "print_hide": 0,
- "print_width": "100px",
- "read_only": 0,
- "reqd": 0,
- "search_index": 0,
+ "fieldname": "rate",
+ "fieldtype": "Currency",
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Rate",
+ "oldfieldname": "export_rate",
+ "oldfieldtype": "Currency",
+ "options": "currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_width": "100px",
+ "read_only": 0,
+ "reqd": 0,
+ "search_index": 0,
"width": "100px"
- },
+ },
{
- "fieldname": "net_rate",
- "fieldtype": "Currency",
- "label": "Net Rate",
- "permlevel": 0,
- "precision": "",
+ "fieldname": "net_rate",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "label": "Net Rate",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
"read_only": 1
- },
+ },
{
- "fieldname": "amount",
- "fieldtype": "Currency",
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Amount",
- "oldfieldname": "export_amount",
- "oldfieldtype": "Currency",
- "options": "currency",
- "permlevel": 0,
- "print_hide": 0,
- "print_width": "100px",
- "read_only": 1,
- "reqd": 0,
- "search_index": 0,
+ "fieldname": "amount",
+ "fieldtype": "Currency",
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Amount",
+ "oldfieldname": "export_amount",
+ "oldfieldtype": "Currency",
+ "options": "currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_width": "100px",
+ "read_only": 1,
+ "reqd": 0,
+ "search_index": 0,
"width": "100px"
- },
+ },
{
- "fieldname": "net_amount",
- "fieldtype": "Currency",
- "label": "Net Amount",
- "options": "currency",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
+ "fieldname": "net_amount",
+ "fieldtype": "Currency",
+ "label": "Net Amount",
+ "options": "currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
"read_only": 1
- },
+ },
{
- "fieldname": "col_break3",
- "fieldtype": "Column Break",
+ "fieldname": "col_break3",
+ "fieldtype": "Column Break",
"permlevel": 0
- },
+ },
{
- "fieldname": "base_rate",
- "fieldtype": "Currency",
- "in_filter": 0,
- "label": "Rate (Company Currency)",
- "oldfieldname": "basic_rate",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "100px",
- "read_only": 1,
- "reqd": 0,
- "search_index": 0,
+ "fieldname": "base_rate",
+ "fieldtype": "Currency",
+ "in_filter": 0,
+ "label": "Rate (Company Currency)",
+ "oldfieldname": "basic_rate",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "100px",
+ "read_only": 1,
+ "reqd": 0,
+ "search_index": 0,
"width": "100px"
- },
+ },
{
- "fieldname": "base_net_rate",
- "fieldtype": "Currency",
- "label": "Net Rate (Company Currency)",
- "permlevel": 0,
- "precision": "",
+ "fieldname": "base_net_rate",
+ "fieldtype": "Currency",
+ "label": "Net Rate (Company Currency)",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
"read_only": 1
- },
+ },
{
- "fieldname": "base_amount",
- "fieldtype": "Currency",
- "in_filter": 0,
- "label": "Amount (Company Currency)",
- "oldfieldname": "amount",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "100px",
- "read_only": 1,
- "reqd": 0,
- "search_index": 0,
+ "fieldname": "base_amount",
+ "fieldtype": "Currency",
+ "in_filter": 0,
+ "label": "Amount (Company Currency)",
+ "oldfieldname": "amount",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "100px",
+ "read_only": 1,
+ "reqd": 0,
+ "search_index": 0,
"width": "100px"
- },
+ },
{
- "fieldname": "base_net_amount",
- "fieldtype": "Currency",
- "label": "Net Amount (Company Currency)",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
+ "fieldname": "base_net_amount",
+ "fieldtype": "Currency",
+ "label": "Net Amount (Company Currency)",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
"read_only": 1
- },
+ },
{
- "fieldname": "pricing_rule",
- "fieldtype": "Link",
- "label": "Pricing Rule",
- "options": "Pricing Rule",
- "permlevel": 0,
+ "fieldname": "pricing_rule",
+ "fieldtype": "Link",
+ "label": "Pricing Rule",
+ "options": "Pricing Rule",
+ "permlevel": 0,
"read_only": 1
- },
+ },
{
- "fieldname": "reference",
- "fieldtype": "Section Break",
- "label": "Reference",
+ "fieldname": "reference",
+ "fieldtype": "Section Break",
+ "label": "Reference",
"permlevel": 0
- },
+ },
{
- "fieldname": "prevdoc_doctype",
- "fieldtype": "Data",
- "hidden": 1,
- "label": "Against Doctype",
- "no_copy": 1,
- "oldfieldname": "prevdoc_doctype",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "150px",
- "read_only": 1,
- "report_hide": 0,
+ "fieldname": "prevdoc_doctype",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "label": "Against Doctype",
+ "no_copy": 1,
+ "oldfieldname": "prevdoc_doctype",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "150px",
+ "read_only": 1,
+ "report_hide": 0,
"width": "150px"
- },
+ },
{
- "fieldname": "prevdoc_docname",
- "fieldtype": "Data",
- "label": "Against Docname",
- "no_copy": 1,
- "oldfieldname": "prevdoc_docname",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "150px",
- "read_only": 1,
- "report_hide": 0,
+ "fieldname": "prevdoc_docname",
+ "fieldtype": "Data",
+ "label": "Against Docname",
+ "no_copy": 1,
+ "oldfieldname": "prevdoc_docname",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "150px",
+ "read_only": 1,
+ "report_hide": 0,
"width": "150px"
- },
+ },
{
- "fieldname": "item_tax_rate",
- "fieldtype": "Small Text",
- "hidden": 1,
- "label": "Item Tax Rate",
- "oldfieldname": "item_tax_rate",
- "oldfieldtype": "Small Text",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1,
+ "fieldname": "item_tax_rate",
+ "fieldtype": "Small Text",
+ "hidden": 1,
+ "label": "Item Tax Rate",
+ "oldfieldname": "item_tax_rate",
+ "oldfieldtype": "Small Text",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1,
"report_hide": 1
- },
+ },
{
- "fieldname": "col_break4",
- "fieldtype": "Column Break",
+ "fieldname": "col_break4",
+ "fieldtype": "Column Break",
"permlevel": 0
- },
+ },
{
- "allow_on_submit": 1,
- "fieldname": "page_break",
- "fieldtype": "Check",
- "hidden": 0,
- "label": "Page Break",
- "no_copy": 1,
- "oldfieldname": "page_break",
- "oldfieldtype": "Check",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
+ "allow_on_submit": 1,
+ "fieldname": "page_break",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "label": "Page Break",
+ "no_copy": 1,
+ "oldfieldname": "page_break",
+ "oldfieldtype": "Check",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
"report_hide": 1
- },
+ },
{
- "description": "",
- "fieldname": "item_group",
- "fieldtype": "Link",
- "hidden": 1,
- "in_filter": 1,
- "label": "Item Group",
- "oldfieldname": "item_group",
- "oldfieldtype": "Link",
- "options": "Item Group",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1,
+ "description": "",
+ "fieldname": "item_group",
+ "fieldtype": "Link",
+ "hidden": 1,
+ "in_filter": 1,
+ "label": "Item Group",
+ "oldfieldname": "item_group",
+ "oldfieldtype": "Link",
+ "options": "Item Group",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1,
"search_index": 1
- },
+ },
{
- "fieldname": "brand",
- "fieldtype": "Link",
- "hidden": 1,
- "in_filter": 1,
- "label": "Brand",
- "oldfieldname": "brand",
- "oldfieldtype": "Link",
- "options": "Brand",
- "permlevel": 0,
- "print_hide": 1,
- "print_width": "150px",
- "read_only": 1,
- "search_index": 1,
+ "fieldname": "brand",
+ "fieldtype": "Link",
+ "hidden": 1,
+ "in_filter": 1,
+ "label": "Brand",
+ "oldfieldname": "brand",
+ "oldfieldtype": "Link",
+ "options": "Brand",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_width": "150px",
+ "read_only": 1,
+ "search_index": 1,
"width": "150px"
}
- ],
- "idx": 1,
- "istable": 1,
- "modified": "2015-02-19 15:08:25.451407",
- "modified_by": "Administrator",
- "module": "Selling",
- "name": "Quotation Item",
- "owner": "Administrator",
- "permissions": [],
- "sort_field": "modified",
+ ],
+ "idx": 1,
+ "istable": 1,
+ "modified": "2015-02-23 00:48:08.477241",
+ "modified_by": "Administrator",
+ "module": "Selling",
+ "name": "Quotation Item",
+ "owner": "Administrator",
+ "permissions": [],
+ "sort_field": "modified",
"sort_order": "DESC"
-}
+}
\ No newline at end of file
diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js
index 13796c6..2c520f6 100644
--- a/erpnext/selling/sales_common.js
+++ b/erpnext/selling/sales_common.js
@@ -154,6 +154,10 @@
}
},
+ apply_discount_on: function() {
+ this.calculate_taxes_and_totals();
+ },
+
discount_amount: function() {
this.calculate_taxes_and_totals();
},
diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
index 2545b0a..ff13200 100644
--- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
+++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
@@ -443,17 +443,6 @@
"width": "150px"
},
{
- "fieldname": "buying_amount",
- "fieldtype": "Currency",
- "hidden": 1,
- "label": "Buying Amount",
- "no_copy": 1,
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1
- },
- {
"allow_on_submit": 1,
"fieldname": "page_break",
"fieldtype": "Check",
@@ -467,7 +456,7 @@
],
"idx": 1,
"istable": 1,
- "modified": "2015-02-19 01:06:59.675246",
+ "modified": "2015-02-23 00:06:50.441413",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note Item",
diff --git a/erpnext/templates/print_formats/includes/taxes.html b/erpnext/templates/print_formats/includes/taxes.html
index 61a78a3..9704d7e 100644
--- a/erpnext/templates/print_formats/includes/taxes.html
+++ b/erpnext/templates/print_formats/includes/taxes.html
@@ -1,6 +1,21 @@
+{%- macro render_discount_amount(doc) -%}
+ {%- if doc.discount_amount -%}
+ <div class="row">
+ <div class="col-xs-5 text-right">
+ <label>{{ "Discount Amount" }}</label></div>
+ <div class="col-xs-7 text-right">
+ - {{ doc.get_formatted("discount_amount", doc) }}
+ </div>
+ </div>
+ {%- endif -%}
+{%- endmacro -%}
+
<div class="row">
<div class="col-xs-6"></div>
<div class="col-xs-6">
+ {%- if doc.apply_discount_on == "Net Total" -%}
+ {{ render_discount_amount(doc) }}
+ {%- endif -%}
{%- for charge in data -%}
{%- if not charge.included_in_print_rate -%}
<div class="row">
@@ -13,5 +28,8 @@
</div>
{%- endif -%}
{%- endfor -%}
+ {%- if doc.apply_discount_on == "Grand Total" -%}
+ {{ render_discount_amount(doc) }}
+ {%- endif -%}
</div>
</div>