Fields added in all sales and purchase doctypes

This commit is contained in:
Nabin Hait 2015-02-23 16:01:33 +05:30
parent 613d081a60
commit 37b047d9a8
23 changed files with 2109 additions and 1251 deletions

View File

@ -263,6 +263,16 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "base_total",
"fieldtype": "Currency",
"label": "Total (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{ {
"description": "Will be calculated automatically when you enter the details", "description": "Will be calculated automatically when you enter the details",
"fieldname": "base_net_total", "fieldname": "base_net_total",
@ -280,6 +290,17 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "total",
"fieldtype": "Currency",
"hidden": 0,
"label": "Total",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{ {
"fieldname": "net_total", "fieldname": "net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -373,35 +394,10 @@
"read_only": 1 "read_only": 1
}, },
{ {
"fieldname": "base_grand_total", "fieldname": "column_break_40",
"fieldtype": "Currency",
"label": "Grand Total (Company Currency)",
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"description": "In Words will be visible once you save the Purchase Invoice.",
"fieldname": "base_in_words",
"fieldtype": "Data",
"label": "In Words (Company Currency)",
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break8",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "precision": ""
"read_only": 0,
"width": "50%"
}, },
{ {
"fieldname": "taxes_and_charges_added", "fieldname": "taxes_and_charges_added",
@ -433,6 +429,84 @@
"permlevel": 0, "permlevel": 0,
"precision": "" "precision": ""
}, },
{
"fieldname": "section_break_44",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"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": "column_break_46",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "discount_amount",
"fieldtype": "Currency",
"label": "Discount Amount",
"options": "currency",
"permlevel": 0,
"precision": "",
"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
},
{
"fieldname": "section_break_49",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "base_grand_total",
"fieldtype": "Currency",
"label": "Grand Total (Company Currency)",
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"description": "In Words will be visible once you save the Purchase Invoice.",
"fieldname": "base_in_words",
"fieldtype": "Data",
"label": "In Words (Company Currency)",
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break8",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"width": "50%"
},
{ {
"fieldname": "grand_total", "fieldname": "grand_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -888,7 +962,7 @@
"icon": "icon-file-text", "icon": "icon-file-text",
"idx": 1, "idx": 1,
"is_submittable": 1, "is_submittable": 1,
"modified": "2015-02-20 05:16:22.693978", "modified": "2015-02-23 15:33:28.554922",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Purchase Invoice", "name": "Purchase Invoice",

View File

@ -194,6 +194,58 @@
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "section_break_22",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "net_rate",
"fieldtype": "Currency",
"label": "Net Rate",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "net_amount",
"fieldtype": "Currency",
"label": "Net Amount",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_25",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "base_net_rate",
"fieldtype": "Currency",
"label": "Net Rate (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 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": "accounting", "fieldname": "accounting",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -399,7 +451,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2015-02-19 01:07:01.060411", "modified": "2015-02-23 15:35:32.895515",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Purchase Invoice Item", "name": "Purchase Invoice Item",

View File

@ -53,17 +53,13 @@
"read_only": 0 "read_only": 0
}, },
{ {
"fieldname": "description", "description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount",
"fieldtype": "Small Text", "fieldname": "included_in_print_rate",
"in_list_view": 1, "fieldtype": "Check",
"label": "Description", "label": "Is this Tax included in Basic Rate?",
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"permlevel": 0, "permlevel": 0,
"print_width": "300px", "precision": "",
"read_only": 0, "report_hide": 1
"reqd": 1,
"width": "300px"
}, },
{ {
"fieldname": "col_break1", "fieldname": "col_break1",
@ -94,6 +90,19 @@
"permlevel": 0, "permlevel": 0,
"read_only": 0 "read_only": 0
}, },
{
"fieldname": "description",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_width": "300px",
"read_only": 0,
"reqd": 1,
"width": "300px"
},
{ {
"fieldname": "rate", "fieldname": "rate",
"fieldtype": "Float", "fieldtype": "Float",
@ -105,6 +114,12 @@
"read_only": 0, "read_only": 0,
"reqd": 0 "reqd": 0
}, },
{
"fieldname": "section_break_9",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{ {
"fieldname": "tax_amount", "fieldname": "tax_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -112,19 +127,65 @@
"label": "Amount", "label": "Amount",
"oldfieldname": "tax_amount", "oldfieldname": "tax_amount",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": "Company:company:default_currency", "options": "currency",
"permlevel": 0, "permlevel": 0,
"read_only": 1, "read_only": 1,
"reqd": 0 "reqd": 0
}, },
{
"fieldname": "tax_amount_after_discount_amount",
"fieldtype": "Currency",
"label": "Tax Amount After Discount Amount",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{ {
"fieldname": "total", "fieldname": "total",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Total", "label": "Total",
"oldfieldname": "total", "oldfieldname": "total",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "column_break_14",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "base_tax_amount",
"fieldtype": "Currency",
"label": "Amount (Company Currency)",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"permlevel": 0, "permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "base_total",
"fieldtype": "Currency",
"hidden": 1,
"label": "Total (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1
},
{
"fieldname": "base_tax_amount_after_discount_amount",
"fieldtype": "Currency",
"label": "Tax Amount After Discount Amount",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{ {
@ -155,7 +216,7 @@
"hide_heading": 1, "hide_heading": 1,
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2015-02-19 01:07:01.581115", "modified": "2015-02-23 15:01:31.895131",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Purchase Taxes and Charges", "name": "Purchase Taxes and Charges",

View File

@ -1,8 +1,6 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors // Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt // License: GNU General Public License v3. See license.txt
cur_frm.cscript.tax_table = "Purchase Taxes and Charges";
{% include "public/js/controllers/accounts.js" %} {% include "public/js/controllers/accounts.js" %}
frappe.ui.form.on("Purchase Taxes and Charges", "add_deduct_tax", function(doc, cdt, cdn) { frappe.ui.form.on("Purchase Taxes and Charges", "add_deduct_tax", function(doc, cdt, cdn) {
@ -17,4 +15,4 @@ frappe.ui.form.on("Purchase Taxes and Charges", "add_deduct_tax", function(doc,
d.add_deduct_tax = ''; d.add_deduct_tax = '';
} }
refresh_field('add_deduct_tax', d.name, 'taxes'); refresh_field('add_deduct_tax', d.name, 'taxes');
} });

View File

@ -331,6 +331,16 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "base_total",
"fieldtype": "Currency",
"label": "Total (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{ {
"fieldname": "base_net_total", "fieldname": "base_net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -348,6 +358,16 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "total",
"fieldtype": "Currency",
"label": "Total",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{ {
"fieldname": "net_total", "fieldname": "net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -431,6 +451,12 @@
"print_hide": 1, "print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "column_break_47",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{ {
"fieldname": "base_total_taxes_and_charges", "fieldname": "base_total_taxes_and_charges",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -443,7 +469,23 @@
"read_only": 1 "read_only": 1
}, },
{ {
"fieldname": "column_break_45", "fieldname": "section_break_49",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"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": "column_break_51",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "permlevel": 0
}, },
@ -1202,7 +1244,7 @@
"icon": "icon-file-text", "icon": "icon-file-text",
"idx": 1, "idx": 1,
"is_submittable": 1, "is_submittable": 1,
"modified": "2015-02-20 05:16:19.256361", "modified": "2015-02-23 15:53:37.894033",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Sales Invoice", "name": "Sales Invoice",

View File

@ -201,6 +201,58 @@
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "section_break_21",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "net_rate",
"fieldtype": "Currency",
"label": "Net Rate",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "net_amount",
"fieldtype": "Currency",
"label": "Net Amount",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_24",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "base_net_rate",
"fieldtype": "Currency",
"label": "Net Rate (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 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": "accounting", "fieldname": "accounting",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -439,7 +491,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2015-02-19 01:07:01.862525", "modified": "2015-02-23 15:55:23.143072",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Sales Invoice Item", "name": "Sales Invoice Item",

View File

@ -1,5 +1,5 @@
{ {
"autoname": "hash", "autoname": "INVTD.######",
"creation": "2013-04-24 11:39:32", "creation": "2013-04-24 11:39:32",
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
@ -25,24 +25,6 @@
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "description",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_width": "300px",
"reqd": 1,
"width": "300px"
},
{
"fieldname": "col_break_1",
"fieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
{ {
"fieldname": "account_head", "fieldname": "account_head",
"fieldtype": "Link", "fieldtype": "Link",
@ -76,6 +58,43 @@
"permlevel": 0, "permlevel": 0,
"reqd": 1 "reqd": 1
}, },
{
"fieldname": "col_break_1",
"fieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
{
"fieldname": "description",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_width": "300px",
"reqd": 1,
"width": "300px"
},
{
"allow_on_submit": 0,
"description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount",
"fieldname": "included_in_print_rate",
"fieldtype": "Check",
"label": "Is this Tax included in Basic Rate?",
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
"print_width": "150px",
"report_hide": 1,
"width": "150px"
},
{
"fieldname": "section_break_9",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{ {
"fieldname": "tax_amount", "fieldname": "tax_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -85,6 +104,30 @@
"permlevel": 0, "permlevel": 0,
"precision": "" "precision": ""
}, },
{
"fieldname": "total",
"fieldtype": "Currency",
"label": "Total",
"options": "currency",
"permlevel": 0,
"precision": "",
"read_only": 1
},
{
"fieldname": "tax_amount_after_discount_amount",
"fieldtype": "Currency",
"label": "Tax Amount After Discount Amount",
"options": "currency",
"permlevel": 0,
"precision": "",
"read_only": 1
},
{
"fieldname": "column_break_13",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{ {
"fieldname": "base_tax_amount", "fieldname": "base_tax_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -97,15 +140,6 @@
"read_only": 1, "read_only": 1,
"reqd": 0 "reqd": 0
}, },
{
"fieldname": "total",
"fieldtype": "Currency",
"label": "Total",
"options": "currency",
"permlevel": 0,
"precision": "",
"read_only": 1
},
{ {
"fieldname": "base_total", "fieldname": "base_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -116,28 +150,6 @@
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
}, },
{
"allow_on_submit": 0,
"description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount",
"fieldname": "included_in_print_rate",
"fieldtype": "Check",
"label": "Is this Tax included in Basic Rate?",
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
"print_width": "150px",
"report_hide": 1,
"width": "150px"
},
{
"fieldname": "tax_amount_after_discount_amount",
"fieldtype": "Currency",
"label": "Tax Amount After Discount Amount",
"options": "currency",
"permlevel": 0,
"precision": "",
"read_only": 1
},
{ {
"depends_on": "eval:parent.discount_amount", "depends_on": "eval:parent.discount_amount",
"fieldname": "base_tax_amount_after_discount_amount", "fieldname": "base_tax_amount_after_discount_amount",
@ -174,7 +186,7 @@
"hide_heading": 1, "hide_heading": 1,
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2015-02-19 17:00:07.949352", "modified": "2015-02-23 12:36:02.213508",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Sales Taxes and Charges", "name": "Sales Taxes and Charges",

View File

@ -1,10 +1,11 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors // Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt // License: GNU General Public License v3. See license.txt
frappe.provide("erpnext.buying");
cur_frm.cscript.tax_table = "Purchase Taxes and Charges"; cur_frm.cscript.tax_table = "Purchase Taxes and Charges";
{% include 'accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js' %} {% include 'accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js' %}
frappe.provide("erpnext.buying");
frappe.require("assets/erpnext/js/controllers/transaction.js"); frappe.require("assets/erpnext/js/controllers/transaction.js");
cur_frm.email_field = "contact_email"; cur_frm.email_field = "contact_email";

View File

@ -224,11 +224,29 @@
"options": "Purchase Order Item", "options": "Purchase Order Item",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "get_last_purchase_rate",
"fieldtype": "Button",
"label": "Get Last Purchase Rate",
"oldfieldtype": "Button",
"permlevel": 0,
"print_hide": 0
},
{ {
"fieldname": "sb_last_purchase", "fieldname": "sb_last_purchase",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "base_total",
"fieldtype": "Currency",
"label": "Total (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{ {
"fieldname": "base_net_total", "fieldname": "base_net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -247,6 +265,16 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "total",
"fieldtype": "Currency",
"label": "Total",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{ {
"fieldname": "net_total", "fieldname": "net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -259,14 +287,6 @@
"print_hide": 0, "print_hide": 0,
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "get_last_purchase_rate",
"fieldtype": "Button",
"label": "Get Last Purchase Rate",
"oldfieldtype": "Button",
"permlevel": 0,
"print_hide": 0
},
{ {
"fieldname": "taxes_section", "fieldname": "taxes_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -351,6 +371,93 @@
"print_hide": 1, "print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "column_break_39",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "taxes_and_charges_added",
"fieldtype": "Currency",
"label": "Taxes and Charges Added",
"no_copy": 0,
"oldfieldname": "other_charges_added_import",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1,
"report_hide": 0
},
{
"fieldname": "taxes_and_charges_deducted",
"fieldtype": "Currency",
"label": "Taxes and Charges Deducted",
"no_copy": 0,
"oldfieldname": "other_charges_deducted_import",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1,
"report_hide": 0
},
{
"fieldname": "total_taxes_and_charges",
"fieldtype": "Currency",
"label": "Total Taxes and Charges",
"options": "currency",
"permlevel": 0,
"precision": "",
"read_only": 1
},
{
"fieldname": "discount_section",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"default": "Grand Total",
"fieldname": "apply_discount_on",
"fieldtype": "Select",
"label": "Apply Discount On",
"options": "\nGrand Total\nNet Total",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "column_break_45",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "discount_amount",
"fieldtype": "Currency",
"label": "Discount Amount",
"options": "currency",
"permlevel": 0,
"precision": "",
"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
},
{
"fieldname": "totals_section",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{ {
"fieldname": "base_grand_total", "fieldname": "base_grand_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -400,40 +507,6 @@
"permlevel": 0, "permlevel": 0,
"print_hide": 0 "print_hide": 0
}, },
{
"fieldname": "taxes_and_charges_added",
"fieldtype": "Currency",
"label": "Taxes and Charges Added",
"no_copy": 0,
"oldfieldname": "other_charges_added_import",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1,
"report_hide": 0
},
{
"fieldname": "taxes_and_charges_deducted",
"fieldtype": "Currency",
"label": "Taxes and Charges Deducted",
"no_copy": 0,
"oldfieldname": "other_charges_deducted_import",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1,
"report_hide": 0
},
{
"fieldname": "total_taxes_and_charges",
"fieldtype": "Currency",
"label": "Total Taxes and Charges",
"options": "currency",
"permlevel": 0,
"precision": ""
},
{ {
"fieldname": "grand_total", "fieldname": "grand_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -783,7 +856,7 @@
"icon": "icon-file-text", "icon": "icon-file-text",
"idx": 1, "idx": 1,
"is_submittable": 1, "is_submittable": 1,
"modified": "2015-02-20 05:16:19.990723", "modified": "2015-02-23 15:10:05.156787",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Buying", "module": "Buying",
"name": "Purchase Order", "name": "Purchase Order",

View File

@ -281,6 +281,58 @@
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "section_break_29",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "net_rate",
"fieldtype": "Currency",
"label": "Net Rate",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "net_amount",
"fieldtype": "Currency",
"label": "Net Amount",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_32",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "base_net_rate",
"fieldtype": "Currency",
"label": "Net Rate (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 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": "warehouse_and_reference", "fieldname": "warehouse_and_reference",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -484,7 +536,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2015-02-19 01:07:01.224244", "modified": "2015-02-23 12:21:53.399279",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Buying", "module": "Buying",
"name": "Purchase Order Item", "name": "Purchase Order Item",

View File

@ -228,6 +228,16 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "base_total",
"fieldtype": "Currency",
"label": "Total (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{ {
"fieldname": "base_net_total", "fieldname": "base_net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -246,6 +256,16 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "total",
"fieldtype": "Currency",
"label": "Total",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{ {
"fieldname": "net_total", "fieldname": "net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -342,45 +362,10 @@
"read_only": 1 "read_only": 1
}, },
{ {
"fieldname": "base_grand_total", "fieldname": "column_break_37",
"fieldtype": "Currency",
"label": "Grand Total (Company Currency)",
"no_copy": 1,
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "base_rounded_total",
"fieldtype": "Currency",
"label": "Rounded Total (Company Currency)",
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"description": "In Words will be visible once you save the Purchase Order.",
"fieldname": "base_in_words",
"fieldtype": "Data",
"label": "In Words (Company Currency)",
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break4",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0, "permlevel": 0,
"print_hide": 0 "precision": ""
}, },
{ {
"fieldname": "taxes_and_charges_added", "fieldname": "taxes_and_charges_added",
@ -417,6 +402,94 @@
"precision": "", "precision": "",
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "section_break_41",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"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": "column_break_43",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "discount_amount",
"fieldtype": "Currency",
"label": "Discount Amount",
"options": "currency",
"permlevel": 0,
"precision": "",
"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
},
{
"fieldname": "section_break_46",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "base_grand_total",
"fieldtype": "Currency",
"label": "Grand Total (Company Currency)",
"no_copy": 1,
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"description": "In Words will be visible once you save the Purchase Order.",
"fieldname": "base_in_words",
"fieldtype": "Data",
"label": "In Words (Company Currency)",
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "base_rounded_total",
"fieldtype": "Currency",
"label": "Rounded Total (Company Currency)",
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break4",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0
},
{ {
"fieldname": "grand_total", "fieldname": "grand_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -584,7 +657,7 @@
"icon": "icon-shopping-cart", "icon": "icon-shopping-cart",
"idx": 1, "idx": 1,
"is_submittable": 1, "is_submittable": 1,
"modified": "2015-02-20 05:16:21.307774", "modified": "2015-02-23 15:24:02.428061",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Buying", "module": "Buying",
"name": "Supplier Quotation", "name": "Supplier Quotation",

View File

@ -225,6 +225,57 @@
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "section_break_24",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "net_rate",
"fieldtype": "Currency",
"label": "Net Rate",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "net_amount",
"fieldtype": "Currency",
"label": "Net Amount",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_27",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "base_net_rate",
"fieldtype": "Currency",
"label": "Net Rate (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 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": "warehouse_and_reference", "fieldname": "warehouse_and_reference",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -360,7 +411,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2015-02-19 01:07:02.403267", "modified": "2015-02-23 15:28:03.712608",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Buying", "module": "Buying",
"name": "Supplier Quotation Item", "name": "Supplier Quotation Item",

View File

@ -359,11 +359,9 @@ def validate_conversion_rate(currency, conversion_rate, conversion_rate_label, c
conversion_rate_label, currency, company_currency)) conversion_rate_label, currency, company_currency))
def validate_taxes_and_charges(tax): def validate_taxes_and_charges(tax):
if not tax.charge_type and (tax.row_id or tax.rate or tax.tax_amount): if tax.charge_type in ['Actual', 'On Net Total'] and tax.row_id:
frappe.throw(_("Please select Charge Type first"))
elif tax.charge_type in ['Actual', 'On Net Total'] and tax.row_id:
frappe.throw(_("Can refer row only if the charge type is 'On Previous Row Amount' or 'Previous Row Total'")) frappe.throw(_("Can refer row only if the charge type is 'On Previous Row Amount' or 'Previous Row Total'"))
elif tax.charge_type in ['On Previous Row Amount', 'On Previous Row Total'] and tax.row_id: elif tax.charge_type in ['On Previous Row Amount', 'On Previous Row Total']:
if cint(tax.idx) == 1: if cint(tax.idx) == 1:
frappe.throw(_("Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for first row")) frappe.throw(_("Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"))
elif not tax.row_id: elif not tax.row_id:

View File

@ -3,6 +3,8 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import json import json
import frappe
from frappe import _
from frappe.utils import cint, flt, rounded from frappe.utils import cint, flt, rounded
from erpnext.setup.utils import get_company_currency from erpnext.setup.utils import get_company_currency
from erpnext.controllers.accounts_controller import validate_conversion_rate, \ from erpnext.controllers.accounts_controller import validate_conversion_rate, \
@ -89,9 +91,8 @@ class calculate_taxes_and_totals(object):
self.doc.round_floats_in(tax) self.doc.round_floats_in(tax)
def determine_exclusive_rate(self): def determine_exclusive_rate(self):
if not any((cint(tax.included_in_print_rate) for tax in self.doc.get("taxes"))) or \ if not any((cint(tax.included_in_print_rate) for tax in self.doc.get("taxes"))):
self.doc.doctype not in ["Quotation", "Sales Order", "Delivery Note", "Sales Invoice"]: return
return
for item in self.doc.get("items"): for item in self.doc.get("items"):
item_tax_map = self._load_item_tax_rate(item.item_tax_rate) item_tax_map = self._load_item_tax_rate(item.item_tax_rate)
@ -317,6 +318,9 @@ class calculate_taxes_and_totals(object):
def apply_discount_amount(self): def apply_discount_amount(self):
if self.doc.discount_amount: if self.doc.discount_amount:
if not self.doc.apply_discount_on:
frappe.throw(_("Please select Apply Discount On"))
self.doc.base_discount_amount = flt(self.doc.discount_amount * self.doc.conversion_rate, self.doc.base_discount_amount = flt(self.doc.discount_amount * self.doc.conversion_rate,
self.doc.precision("base_discount_amount")) self.doc.precision("base_discount_amount"))

View File

@ -107,8 +107,7 @@ erpnext.taxes_and_totals = erpnext.stock.StockController.extend({
$.each(me.frm.doc["taxes"] || [], function(i, row) { $.each(me.frm.doc["taxes"] || [], function(i, row) {
if(cint(row.included_in_print_rate)) has_inclusive_tax = true; if(cint(row.included_in_print_rate)) has_inclusive_tax = true;
}) })
if(has_inclusive_tax==false || !in_list(["Quotation", "Sales Order", "Delivery Note", "Sales Invoice"], this.frm.doc.doctype)) if(has_inclusive_tax==false) return;
return;
$.each(me.frm.doc["items"] || [], function(n, item) { $.each(me.frm.doc["items"] || [], function(n, item) {
var item_tax_map = me._load_item_tax_rate(item.item_tax_rate); var item_tax_map = me._load_item_tax_rate(item.item_tax_rate);
@ -402,6 +401,9 @@ erpnext.taxes_and_totals = erpnext.stock.StockController.extend({
var distributed_amount = 0.0; var distributed_amount = 0.0;
if (this.frm.doc.discount_amount) { if (this.frm.doc.discount_amount) {
if(!this.frm.doc.apply_discount_on)
frappe.throw(__("Please select Apply Discount On"));
this.frm.set_value("base_discount_amount", this.frm.set_value("base_discount_amount",
flt(this.frm.doc.discount_amount * this.frm.doc.conversion_rate, precision("base_discount_amount"))) flt(this.frm.doc.discount_amount * this.frm.doc.conversion_rate, precision("base_discount_amount")))

View File

@ -285,7 +285,6 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
this.frm.refresh_fields(); this.frm.refresh_fields();
}, },
change_form_labels: function(company_currency) { change_form_labels: function(company_currency) {
var me = this; var me = this;
var field_label_map = {}; var field_label_map = {};
@ -302,8 +301,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
setup_field_label_map(["base_total", "base_net_total", "base_total_taxes_and_charges", setup_field_label_map(["base_total", "base_net_total", "base_total_taxes_and_charges",
"base_discount_amount", "base_grand_total", "base_rounded_total", "base_in_words", "base_discount_amount", "base_grand_total", "base_rounded_total", "base_in_words",
"base_taxes_and_charges_added", "base_taxes_and_charges_deducted", "total_amount_to_pay", "base_taxes_and_charges_added", "base_taxes_and_charges_deducted", "total_amount_to_pay",
"outstanding_amount", "total_advance", "paid_amount", "write_off_amount"], "outstanding_amount", "total_advance", "paid_amount", "write_off_amount"], company_currency);
company_currency);
setup_field_label_map(["total", "net_total", "total_taxes_and_charges", "discount_amount", setup_field_label_map(["total", "net_total", "total_taxes_and_charges", "discount_amount",
"grand_total", "taxes_and_charges_added", "taxes_and_charges_deducted", "grand_total", "taxes_and_charges_added", "taxes_and_charges_deducted",
@ -330,6 +328,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
$.each(field_label_map, function(fname, label) { $.each(field_label_map, function(fname, label) {
me.frm.fields_dict[fname].set_label(label); me.frm.fields_dict[fname].set_label(label);
}); });
}, },
change_grid_labels: function(company_currency) { change_grid_labels: function(company_currency) {
@ -500,9 +499,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
apply_price_list: function(item) { apply_price_list: function(item) {
var me = this; var me = this;
var args = this._get_args(item); var args = this._get_args(item);
if(!args.item_list.length) {
return;
}
return this.frm.call({ return this.frm.call({
method: "erpnext.stock.get_item_details.apply_price_list", method: "erpnext.stock.get_item_details.apply_price_list",
args: { args: args }, args: { args: args },
@ -512,7 +509,10 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
me.frm.set_value("price_list_currency", r.message.parent.price_list_currency); me.frm.set_value("price_list_currency", r.message.parent.price_list_currency);
me.frm.set_value("plc_conversion_rate", r.message.parent.plc_conversion_rate); me.frm.set_value("plc_conversion_rate", r.message.parent.plc_conversion_rate);
me.in_apply_price_list = false; me.in_apply_price_list = false;
me._set_values_for_item_list(r.message.children);
if(args.item_list.length) {
me._set_values_for_item_list(r.message.children);
}
} }
} }
}); });
@ -704,3 +704,11 @@ frappe.ui.form.on(cur_frm.cscript.tax_table, "row_id", function(frm, cdt, cdn) {
frappe.ui.form.on(cur_frm.cscript.tax_table, "included_in_print_rate", function(frm, cdt, cdn) { frappe.ui.form.on(cur_frm.cscript.tax_table, "included_in_print_rate", function(frm, cdt, cdn) {
cur_frm.cscript.calculate_taxes_and_totals(); cur_frm.cscript.calculate_taxes_and_totals();
}) })
frappe.ui.form.on(cur_frm.doctype, "apply_discount_on", function(frm) {
cur_frm.cscript.calculate_taxes_and_totals();
})
frappe.ui.form.on(cur_frm.doctype, "discount_amount", function(frm) {
cur_frm.cscript.calculate_taxes_and_totals();
})

View File

@ -325,6 +325,16 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "base_total",
"fieldtype": "Currency",
"label": "Total (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{ {
"fieldname": "base_net_total", "fieldname": "base_net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -343,6 +353,16 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "total",
"fieldtype": "Currency",
"label": "Total",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{ {
"fieldname": "net_total", "fieldname": "net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -420,6 +440,12 @@
"print_hide": 1, "print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "column_break_46",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{ {
"fieldname": "base_total_taxes_and_charges", "fieldname": "base_total_taxes_and_charges",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -433,7 +459,23 @@
"width": "150px" "width": "150px"
}, },
{ {
"fieldname": "column_break_46", "fieldname": "section_break_48",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"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": "column_break_50",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "permlevel": 0
}, },
@ -1034,7 +1076,7 @@
"idx": 1, "idx": 1,
"is_submittable": 1, "is_submittable": 1,
"issingle": 0, "issingle": 0,
"modified": "2015-02-20 05:16:18.207123", "modified": "2015-02-23 15:40:17.414233",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Sales Order", "name": "Sales Order",

View File

@ -247,6 +247,58 @@
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "section_break_24",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "net_rate",
"fieldtype": "Currency",
"label": "Net Rate",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "net_amount",
"fieldtype": "Currency",
"label": "Net Amount",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_27",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "base_net_rate",
"fieldtype": "Currency",
"label": "Net Rate (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 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": "warehouse_and_reference", "fieldname": "warehouse_and_reference",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -444,7 +496,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2015-02-19 01:07:02.025024", "modified": "2015-02-23 15:43:08.156543",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Sales Order Item", "name": "Sales Order Item",

View File

@ -155,14 +155,6 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
} }
}, },
apply_discount_on: function() {
this.calculate_taxes_and_totals();
},
discount_amount: function() {
this.calculate_taxes_and_totals();
},
commission_rate: function() { commission_rate: function() {
this.calculate_commission(); this.calculate_commission();
refresh_field("total_commission"); refresh_field("total_commission");

View File

@ -340,6 +340,16 @@
"fieldtype": "Section Break", "fieldtype": "Section Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "base_total",
"fieldtype": "Currency",
"label": "Total (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{ {
"fieldname": "base_net_total", "fieldname": "base_net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -360,6 +370,16 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "total",
"fieldtype": "Currency",
"label": "Total",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{ {
"fieldname": "net_total", "fieldname": "net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -443,6 +463,12 @@
"print_hide": 1, "print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "column_break_47",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{ {
"fieldname": "base_total_taxes_and_charges", "fieldname": "base_total_taxes_and_charges",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -457,7 +483,22 @@
"width": "150px" "width": "150px"
}, },
{ {
"fieldname": "column_break_47", "fieldname": "section_break_49",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"default": "Grand Total",
"fieldname": "apply_discount_on",
"fieldtype": "Select",
"label": "Apply Discount On",
"options": "\nGrand Total\nNet Total",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "column_break_51",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "permlevel": 0
}, },
@ -1024,7 +1065,7 @@
"idx": 1, "idx": 1,
"in_create": 0, "in_create": 0,
"is_submittable": 1, "is_submittable": 1,
"modified": "2015-02-20 05:16:21.997931", "modified": "2015-02-23 15:49:10.972483",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Delivery Note", "name": "Delivery Note",

View File

@ -254,6 +254,58 @@
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "section_break_25",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "net_rate",
"fieldtype": "Currency",
"label": "Net Rate",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "net_amount",
"fieldtype": "Currency",
"label": "Net Amount",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_28",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "base_net_rate",
"fieldtype": "Currency",
"label": "Net Rate (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 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": "warehouse_and_reference", "fieldname": "warehouse_and_reference",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -456,7 +508,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2015-02-23 00:06:50.441413", "modified": "2015-02-23 15:51:20.772564",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Delivery Note Item", "name": "Delivery Note Item",

View File

@ -222,12 +222,31 @@
"print_hide": 0, "print_hide": 0,
"reqd": 0 "reqd": 0
}, },
{
"fieldname": "get_current_stock",
"fieldtype": "Button",
"label": "Get Current Stock",
"oldfieldtype": "Button",
"options": "get_current_stock",
"permlevel": 0,
"print_hide": 1
},
{ {
"fieldname": "section_break0", "fieldname": "section_break0",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "base_total",
"fieldtype": "Currency",
"label": "Total (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{ {
"fieldname": "base_net_total", "fieldname": "base_net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -242,20 +261,22 @@
"reqd": 1, "reqd": 1,
"width": "150px" "width": "150px"
}, },
{
"fieldname": "get_current_stock",
"fieldtype": "Button",
"label": "Get Current Stock",
"oldfieldtype": "Button",
"options": "get_current_stock",
"permlevel": 0,
"print_hide": 1
},
{ {
"fieldname": "column_break_27", "fieldname": "column_break_27",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "total",
"fieldtype": "Currency",
"hidden": 0,
"label": "Total",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{ {
"fieldname": "net_total", "fieldname": "net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -346,39 +367,6 @@
"print_hide": 1, "print_hide": 1,
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "base_grand_total",
"fieldtype": "Currency",
"label": "Grand Total (Company Currency)",
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "base_rounded_total",
"fieldtype": "Currency",
"label": "Rounded Total (Company Currency)",
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"description": "In Words will be visible once you save the Purchase Receipt.",
"fieldname": "base_in_words",
"fieldtype": "Data",
"label": "In Words (Company Currency)",
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{ {
"fieldname": "column_break3", "fieldname": "column_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
@ -416,6 +404,92 @@
"permlevel": 0, "permlevel": 0,
"precision": "" "precision": ""
}, },
{
"fieldname": "section_break_42",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"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": "column_break_44",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "discount_amount",
"fieldtype": "Currency",
"label": "Discount Amount",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 0
},
{
"fieldname": "base_discount_amount",
"fieldtype": "Currency",
"label": "Discount Amount (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"read_only": 1
},
{
"fieldname": "section_break_46",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "base_grand_total",
"fieldtype": "Currency",
"label": "Grand Total (Company Currency)",
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"description": "In Words will be visible once you save the Purchase Receipt.",
"fieldname": "base_in_words",
"fieldtype": "Data",
"label": "In Words (Company Currency)",
"oldfieldname": "in_words",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "base_rounded_total",
"fieldtype": "Currency",
"label": "Rounded Total (Company Currency)",
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_50",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{ {
"fieldname": "grand_total", "fieldname": "grand_total",
"fieldtype": "Currency", "fieldtype": "Currency",
@ -775,7 +849,7 @@
"icon": "icon-truck", "icon": "icon-truck",
"idx": 1, "idx": 1,
"is_submittable": 1, "is_submittable": 1,
"modified": "2015-02-20 05:16:24.035630", "modified": "2015-02-23 15:16:36.617354",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Purchase Receipt", "name": "Purchase Receipt",

View File

@ -283,6 +283,58 @@
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "section_break_29",
"fieldtype": "Section Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "net_rate",
"fieldtype": "Currency",
"label": "Net Rate",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "net_amount",
"fieldtype": "Currency",
"label": "Net Amount",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_32",
"fieldtype": "Column Break",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "base_net_rate",
"fieldtype": "Currency",
"label": "Net Rate (Company Currency)",
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 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": "warehouse_and_reference", "fieldname": "warehouse_and_reference",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@ -588,7 +640,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2015-02-19 01:07:01.405923", "modified": "2015-02-23 15:19:26.294450",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Purchase Receipt Item", "name": "Purchase Receipt Item",