Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Nabin Hait 2013-01-24 11:03:24 +05:30
commit fd23153f50
110 changed files with 1122 additions and 882 deletions

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-19 10:23:33",
"docstatus": 0,
"modified": "2013-01-22 15:05:18",
"modified": "2013-01-23 17:11:26",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -169,7 +169,7 @@
"description": "Rate at which this tax is applied",
"doctype": "DocField",
"fieldname": "tax_rate",
"fieldtype": "Currency",
"fieldtype": "Float",
"hidden": 0,
"label": "Rate",
"oldfieldname": "tax_rate",
@ -207,6 +207,7 @@
"label": "Credit Limit",
"oldfieldname": "credit_limit",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"permlevel": 0,
"print_hide": 1
},

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
cur_frm.add_fetch("bank_account", "company", "company");
cur_frm.cscript.onload = function(doc, cdt, cdn){
// add page head
var ph = new PageHeader(cur_frm.fields_dict['head_html'].wrapper, 'Bank Reconciliation', '');
}

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:05",
"docstatus": 0,
"modified": "2013-01-22 14:55:57",
"modified": "2013-01-23 17:11:16",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -37,7 +37,7 @@
"parenttype": "DocType",
"permlevel": 0,
"read": 1,
"report": 1,
"report": 0,
"role": "Accounts User",
"submit": 0,
"write": 1
@ -55,6 +55,16 @@
"options": "Account",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "company",
"fieldtype": "Link",
"hidden": 1,
"label": "Company",
"options": "Company",
"print_hide": 1,
"reqd": 0
},
{
"doctype": "DocField",
"fieldname": "from_date",
@ -95,6 +105,7 @@
"fieldname": "total_amount",
"fieldtype": "Currency",
"label": "Total Amount",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:05",
"docstatus": 0,
"modified": "2013-01-22 14:16:42",
"modified": "2013-01-23 17:11:16",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -79,6 +79,7 @@
"label": "Debit",
"oldfieldname": "debit",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@ -88,6 +89,7 @@
"label": "Credit",
"oldfieldname": "credit",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:05",
"docstatus": 0,
"modified": "2013-01-22 14:18:30",
"modified": "2013-01-23 17:02:32",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -44,6 +44,7 @@
"label": "Budget Allocated",
"oldfieldname": "budget_allocated",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency(cur_frm.doc.company_name)",
"reqd": 1
},
{
@ -53,6 +54,7 @@
"label": "Actual",
"oldfieldname": "actual",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency(cur_frm.doc.company_name)",
"read_only": 1
},
{

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-19 10:23:34",
"docstatus": 0,
"modified": "2013-01-22 14:55:58",
"modified": "2013-01-23 17:11:26",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -120,6 +120,7 @@
"fieldname": "total_amount",
"fieldtype": "Currency",
"label": "Total Amount",
"options": "eval:erpnext.get_currency()",
"read_only": 0,
"reqd": 1
},
@ -151,6 +152,7 @@
"fieldname": "total_invoiced_amount",
"fieldtype": "Currency",
"label": "Total Invoiced Amount",
"options": "eval:erpnext.get_currency()",
"print_hide": 0,
"read_only": 1
},

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:06",
"docstatus": 0,
"modified": "2013-01-22 14:18:52",
"modified": "2013-01-23 17:11:16",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -54,6 +54,7 @@
"fieldname": "net_total",
"fieldtype": "Currency",
"label": "Net Total",
"options": "eval:erpnext.get_currency()",
"read_only": 1,
"width": "120px"
},
@ -62,6 +63,7 @@
"fieldname": "grand_total",
"fieldtype": "Currency",
"label": "Grand Total",
"options": "eval:erpnext.get_currency()",
"read_only": 1,
"width": "120px"
}

View File

@ -1,250 +1,244 @@
[
{
"owner": "Administrator",
"creation": "2013-01-10 16:34:06",
"docstatus": 0,
"creation": "2012-03-27 14:35:42",
"modified": "2013-01-23 17:11:17",
"modified_by": "Administrator",
"modified": "2012-03-27 14:35:42"
"owner": "Administrator"
},
{
"section_style": "Simple",
"in_create": 1,
"search_fields": "voucher_no,account,posting_date,against_voucher",
"module": "Accounts",
"server_code_error": " ",
"autoname": "GL.#######",
"_last_update": "1319016431",
"name": "__common__",
"colour": "White:FFF",
"doctype": "DocType",
"show_in_menu": 0,
"version": 103
"in_create": 1,
"module": "Accounts",
"name": "__common__",
"search_fields": "voucher_no,account,posting_date,against_voucher"
},
{
"name": "__common__",
"parent": "GL Entry",
"doctype": "DocField",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
},
{
"name": "__common__",
"parent": "GL Entry",
"read": 1,
"create": 0,
"doctype": "DocPerm",
"write": 0,
"report": 1,
"parentfield": "fields",
"parenttype": "DocType",
"parentfield": "permissions"
},
{
"name": "GL Entry",
"doctype": "DocType"
},
{
"amend": 0,
"cancel": 0,
"role": "Accounts User",
"doctype": "DocPerm",
"submit": 0
},
{
"amend": 0,
"doctype": "DocPerm",
"submit": 0,
"role": "Accounts Manager",
"cancel": 0,
"permlevel": 0
},
{
"role": "System Manager",
"create": 0,
"doctype": "DocPerm",
"name": "__common__",
"parent": "GL Entry",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"doctype": "DocPerm"
"read": 1,
"report": 1,
"submit": 0,
"write": 0
},
{
"doctype": "DocType",
"name": "GL Entry"
},
{
"description": "The date at which current entry will get or has actually executed.",
"search_index": 1,
"doctype": "DocField",
"label": "Posting Date",
"oldfieldname": "posting_date",
"fieldname": "posting_date",
"fieldtype": "Date",
"in_filter": 1,
"label": "Posting Date",
"oldfieldname": "posting_date",
"oldfieldtype": "Date",
"in_filter": 1
"search_index": 1
},
{
"description": "The date at which current entry is made in system.",
"oldfieldtype": "Date",
"doctype": "DocField",
"fieldname": "transaction_date",
"fieldtype": "Date",
"label": "Transaction Date",
"oldfieldname": "transaction_date",
"fieldname": "transaction_date",
"fieldtype": "Date"
"oldfieldtype": "Date"
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Aging Date",
"oldfieldname": "aging_date",
"fieldname": "aging_date",
"fieldtype": "Date",
"in_filter": 1,
"label": "Aging Date",
"oldfieldname": "aging_date",
"oldfieldtype": "Date",
"in_filter": 1
"search_index": 0
},
{
"search_index": 1,
"doctype": "DocField",
"label": "Account",
"oldfieldname": "account",
"fieldname": "account",
"fieldtype": "Link",
"in_filter": 1,
"label": "Account",
"oldfieldname": "account",
"oldfieldtype": "Link",
"options": "Account",
"in_filter": 1
"search_index": 1
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Cost Center",
"oldfieldname": "cost_center",
"fieldname": "cost_center",
"fieldtype": "Link",
"in_filter": 1,
"label": "Cost Center",
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
"options": "Cost Center",
"in_filter": 1
"search_index": 0
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"fieldname": "debit",
"fieldtype": "Currency",
"label": "Debit Amt",
"oldfieldname": "debit",
"fieldname": "debit",
"fieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"fieldname": "credit",
"fieldtype": "Currency",
"label": "Credit Amt",
"oldfieldname": "credit",
"fieldname": "credit",
"fieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
},
{
"oldfieldtype": "Text",
"doctype": "DocField",
"label": "Against",
"oldfieldname": "against",
"fieldname": "against",
"fieldtype": "Text",
"in_filter": 1
"in_filter": 1,
"label": "Against",
"oldfieldname": "against",
"oldfieldtype": "Text"
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Against Voucher",
"oldfieldname": "against_voucher",
"fieldname": "against_voucher",
"fieldtype": "Data",
"in_filter": 1,
"label": "Against Voucher",
"oldfieldname": "against_voucher",
"oldfieldtype": "Data",
"in_filter": 1
"search_index": 0
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Against Voucher Type",
"oldfieldname": "against_voucher_type",
"fieldname": "against_voucher_type",
"fieldtype": "Data",
"in_filter": 0,
"label": "Against Voucher Type",
"oldfieldname": "against_voucher_type",
"oldfieldtype": "Data",
"in_filter": 0
"search_index": 0
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Voucher Type",
"oldfieldname": "voucher_type",
"fieldname": "voucher_type",
"fieldtype": "Select",
"in_filter": 1,
"label": "Voucher Type",
"oldfieldname": "voucher_type",
"oldfieldtype": "Select",
"options": "Journal Voucher\nSales Invoice\nPurchase Invoice",
"in_filter": 1
"search_index": 0
},
{
"search_index": 1,
"doctype": "DocField",
"label": "Voucher No",
"oldfieldname": "voucher_no",
"fieldname": "voucher_no",
"fieldtype": "Data",
"in_filter": 1,
"label": "Voucher No",
"oldfieldname": "voucher_no",
"oldfieldtype": "Data",
"in_filter": 1
"search_index": 1
},
{
"no_copy": 1,
"search_index": 0,
"doctype": "DocField",
"label": "Remarks",
"oldfieldname": "remarks",
"fieldname": "remarks",
"fieldtype": "Text",
"in_filter": 1,
"label": "Remarks",
"no_copy": 1,
"oldfieldname": "remarks",
"oldfieldtype": "Text",
"in_filter": 1
"search_index": 0
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Is Cancelled",
"oldfieldname": "is_cancelled",
"fieldname": "is_cancelled",
"fieldtype": "Select",
"in_filter": 1,
"label": "Is Cancelled",
"oldfieldname": "is_cancelled",
"oldfieldtype": "Select",
"options": "No\nYes",
"in_filter": 1
"search_index": 0
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Is Opening",
"oldfieldname": "is_opening",
"fieldname": "is_opening",
"fieldtype": "Select",
"in_filter": 1,
"label": "Is Opening",
"oldfieldname": "is_opening",
"oldfieldtype": "Select",
"options": "No\nYes",
"in_filter": 1
"search_index": 0
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Is Advance",
"oldfieldname": "is_advance",
"fieldname": "is_advance",
"fieldtype": "Select",
"in_filter": 0,
"label": "Is Advance",
"oldfieldname": "is_advance",
"oldfieldtype": "Select",
"options": "No\nYes",
"in_filter": 0
"search_index": 0
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Fiscal Year",
"oldfieldname": "fiscal_year",
"fieldname": "fiscal_year",
"fieldtype": "Select",
"in_filter": 1,
"label": "Fiscal Year",
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
"options": "link:Fiscal Year",
"in_filter": 1
"search_index": 0
},
{
"search_index": 0,
"doctype": "DocField",
"label": "Company",
"oldfieldname": "company",
"fieldname": "company",
"fieldtype": "Link",
"in_filter": 1,
"label": "Company",
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
"in_filter": 1
"search_index": 0
},
{
"amend": 0,
"cancel": 0,
"doctype": "DocPerm",
"role": "Accounts User"
},
{
"amend": 0,
"cancel": 0,
"doctype": "DocPerm",
"role": "Accounts Manager"
},
{
"doctype": "DocPerm",
"role": "System Manager"
}
]

View File

@ -151,7 +151,7 @@ cur_frm.cscript.account = function(doc,dt,dn) {
method: "accounts.utils.get_balance_on",
args: {account: d.account, date: doc.posting_date},
callback: function(r) {
d.balance = fmt_money(r.message);
d.balance = format_currency(r.message, erpnext.get_currency(doc.company));
refresh_field('balance', d.name, 'entries');
}
});
@ -161,7 +161,6 @@ cur_frm.cscript.validate = function(doc,cdt,cdn) {
cur_frm.cscript.update_totals(doc);
}
// ***************** Get Print Heading based on Sales Invoice *****************
cur_frm.fields_dict['select_print_heading'].get_query = function(doc, cdt, cdn) {
return 'SELECT `tabPrint Heading`.name FROM `tabPrint Heading` WHERE `tabPrint Heading`.docstatus !=2 AND `tabPrint Heading`.name LIKE "%s" ORDER BY `tabPrint Heading`.name ASC LIMIT 50';
}

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-19 10:23:34",
"docstatus": 0,
"modified": "2013-01-22 14:56:03",
"modified": "2013-01-23 17:11:27",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -123,6 +123,7 @@
"no_copy": 1,
"oldfieldname": "total_debit",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@ -134,6 +135,7 @@
"no_copy": 1,
"oldfieldname": "total_credit",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@ -149,6 +151,7 @@
"no_copy": 1,
"oldfieldname": "difference",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -308,6 +311,7 @@
"fieldname": "write_off_amount",
"fieldtype": "Currency",
"label": "Write Off Amount <=",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"report_hide": 1
},

View File

@ -28,7 +28,7 @@ wn.doclistviews['Journal Voucher'] = wn.views.ListView.extend({
{
width: '18%',
content: function(parent, data) {
$(parent).html(wn.boot.company[data.company].default_currency + ' ' + fmt_money(data.total_debit))
$(parent).html(format_currency(data.total_debit, erpnext.get_currency(data.company)));
},
css: {'text-align':'right'}
},

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:06",
"docstatus": 0,
"modified": "2013-01-22 14:47:01",
"modified": "2013-01-23 17:11:17",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -44,7 +44,8 @@
"fieldtype": "Currency",
"label": "Debit",
"oldfieldname": "debit",
"oldfieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",
@ -52,7 +53,8 @@
"fieldtype": "Currency",
"label": "Credit",
"oldfieldname": "credit",
"oldfieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",

View File

@ -17,6 +17,8 @@
// Booking Entry Id
// --------------------
cur_frm.add_fetch("account", "company", "company")
cur_frm.cscript.onload_post_render = function(doc) {
$(cur_frm.get_field("reconcile").input).addClass("btn-info");
}

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-23 15:27:14",
"docstatus": 0,
"modified": "2013-01-23 15:56:55",
"modified": "2013-01-23 17:11:27",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -32,6 +32,7 @@
"permlevel": 0,
"read": 1,
"report": 0,
"role": "Accounts User",
"submit": 0,
"write": 1
},
@ -47,6 +48,15 @@
"options": "Account",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "company",
"fieldtype": "Link",
"hidden": 1,
"label": "Company",
"options": "Company",
"print_hide": 1
},
{
"doctype": "DocField",
"fieldname": "account_type",
@ -90,6 +100,7 @@
"fieldname": "total_amount",
"fieldtype": "Currency",
"label": "Total Amount",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@ -97,6 +108,7 @@
"fieldname": "pending_amt_to_reconcile",
"fieldtype": "Currency",
"label": "Outstanding Amount",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@ -174,15 +186,6 @@
"label": "Amount <="
},
{
"doctype": "DocPerm",
"role": "System Manager"
},
{
"doctype": "DocPerm",
"role": "Accounts Manager"
},
{
"doctype": "DocPerm",
"role": "Accounts User"
"doctype": "DocPerm"
}
]

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:07",
"docstatus": 0,
"modified": "2013-01-22 14:47:04",
"modified": "2013-01-23 17:11:17",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -40,6 +40,7 @@
"fieldname": "amt_due",
"fieldtype": "Currency",
"label": "Unmatched Amount",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@ -47,6 +48,7 @@
"fieldname": "amt_to_be_reconciled",
"fieldtype": "Currency",
"label": "Allocated Amount",
"options": "eval:erpnext.get_currency()",
"reqd": 1
},
{
@ -61,6 +63,7 @@
"fieldname": "total_amt",
"fieldtype": "Currency",
"label": "Total Amount",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{

View File

@ -1,230 +1,217 @@
[
{
"owner": "Administrator",
"creation": "2013-01-10 16:34:07",
"docstatus": 0,
"creation": "2012-06-11 12:09:53",
"modified": "2013-01-22 16:55:20",
"modified_by": "Administrator",
"modified": "2012-07-16 16:27:51"
"owner": "Administrator"
},
{
"section_style": "Simple",
"module": "Accounts",
"doctype": "DocType",
"server_code_error": " ",
"autoname": "POS/.####",
"name": "__common__",
"colour": "White:FFF",
"_last_update": "1322549700",
"show_in_menu": 0,
"version": 1
"doctype": "DocType",
"module": "Accounts",
"name": "__common__"
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "POS Setting",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0
},
{
"doctype": "DocPerm",
"name": "__common__",
"parent": "POS Setting",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
},
{
"name": "__common__",
"parent": "POS Setting",
"read": 1,
"doctype": "DocPerm",
"parenttype": "DocType",
"report": 1,
"permlevel": 0,
"parentfield": "permissions"
},
{
"name": "POS Setting",
"doctype": "DocType"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "User",
"oldfieldname": "user",
"fieldname": "user",
"fieldtype": "Link",
"options": "Profile"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Territory",
"oldfieldname": "territory",
"fieldname": "territory",
"fieldtype": "Link",
"reqd": 1,
"options": "Territory"
},
{
"no_copy": 1,
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Series",
"oldfieldname": "naming_series",
"fieldname": "naming_series",
"fieldtype": "Select",
"reqd": 1
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Currency",
"oldfieldname": "currency",
"fieldname": "currency",
"fieldtype": "Select",
"reqd": 1,
"options": "link:Currency"
},
{
"default": "1",
"oldfieldtype": "Currency",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Conversion Rate",
"oldfieldname": "conversion_rate",
"fieldname": "conversion_rate",
"fieldtype": "Float",
"reqd": 1
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Price List",
"oldfieldname": "price_list_name",
"fieldname": "price_list_name",
"fieldtype": "Select",
"reqd": 1,
"options": "link:Price List"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Company",
"oldfieldname": "company",
"fieldname": "company",
"fieldtype": "Link",
"reqd": 1,
"options": "Company"
},
{
"oldfieldtype": "Column Break",
"fieldname": "column_break0",
"fieldtype": "Column Break",
"doctype": "DocField"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Customer Account",
"oldfieldname": "customer_account",
"fieldname": "customer_account",
"fieldtype": "Link",
"reqd": 0,
"options": "Account"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Cash/Bank Account",
"oldfieldname": "cash_bank_account",
"fieldname": "cash_bank_account",
"fieldtype": "Link",
"reqd": 1,
"options": "Account"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Income Account",
"oldfieldname": "income_account",
"fieldname": "income_account",
"fieldtype": "Link",
"reqd": 1,
"options": "Account"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Warehouse",
"oldfieldname": "warehouse",
"fieldname": "warehouse",
"fieldtype": "Link",
"reqd": 1,
"options": "Warehouse"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Cost Center",
"oldfieldname": "cost_center",
"fieldname": "cost_center",
"fieldtype": "Link",
"reqd": 1,
"options": "Cost Center"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Charge",
"oldfieldname": "charge",
"fieldname": "charge",
"fieldtype": "Link",
"options": "Sales Taxes and Charges Master"
},
{
"print_hide": 1,
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Letter Head",
"oldfieldname": "letter_head",
"fieldname": "letter_head",
"fieldtype": "Select",
"options": "link:Letter Head"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Terms and Conditions",
"oldfieldname": "tc_name",
"fieldname": "tc_name",
"fieldtype": "Link",
"options": "Terms and Conditions"
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Select Print Heading",
"oldfieldname": "select_print_heading",
"fieldname": "select_print_heading",
"fieldtype": "Select",
"options": "link:Print Heading",
"in_filter": 0
},
{
"write": 1,
"create": 1,
"role": "System Manager",
"doctype": "DocPerm",
"submit": 0
},
{
"write": 1,
"doctype": "DocType",
"name": "POS Setting"
},
{
"doctype": "DocField",
"fieldname": "user",
"fieldtype": "Link",
"label": "User",
"oldfieldname": "user",
"oldfieldtype": "Link",
"options": "Profile"
},
{
"doctype": "DocField",
"fieldname": "territory",
"fieldtype": "Link",
"label": "Territory",
"oldfieldname": "territory",
"oldfieldtype": "Link",
"options": "Territory",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "naming_series",
"fieldtype": "Select",
"label": "Series",
"no_copy": 1,
"oldfieldname": "naming_series",
"oldfieldtype": "Select",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "currency",
"fieldtype": "Link",
"label": "Currency",
"oldfieldname": "currency",
"oldfieldtype": "Select",
"options": "Currency",
"reqd": 1
},
{
"default": "1",
"doctype": "DocField",
"fieldname": "conversion_rate",
"fieldtype": "Float",
"label": "Conversion Rate",
"oldfieldname": "conversion_rate",
"oldfieldtype": "Currency",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "price_list_name",
"fieldtype": "Select",
"label": "Price List",
"oldfieldname": "price_list_name",
"oldfieldtype": "Select",
"options": "link:Price List",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "column_break0",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break"
},
{
"doctype": "DocField",
"fieldname": "customer_account",
"fieldtype": "Link",
"label": "Customer Account",
"oldfieldname": "customer_account",
"oldfieldtype": "Link",
"options": "Account",
"reqd": 0
},
{
"doctype": "DocField",
"fieldname": "cash_bank_account",
"fieldtype": "Link",
"label": "Cash/Bank Account",
"oldfieldname": "cash_bank_account",
"oldfieldtype": "Link",
"options": "Account",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "income_account",
"fieldtype": "Link",
"label": "Income Account",
"oldfieldname": "income_account",
"oldfieldtype": "Link",
"options": "Account",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "warehouse",
"fieldtype": "Link",
"label": "Warehouse",
"oldfieldname": "warehouse",
"oldfieldtype": "Link",
"options": "Warehouse",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "cost_center",
"fieldtype": "Link",
"label": "Cost Center",
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
"options": "Cost Center",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "charge",
"fieldtype": "Link",
"label": "Charge",
"oldfieldname": "charge",
"oldfieldtype": "Link",
"options": "Sales Taxes and Charges Master"
},
{
"doctype": "DocField",
"fieldname": "letter_head",
"fieldtype": "Select",
"label": "Letter Head",
"oldfieldname": "letter_head",
"oldfieldtype": "Select",
"options": "link:Letter Head",
"print_hide": 1
},
{
"doctype": "DocField",
"fieldname": "tc_name",
"fieldtype": "Link",
"label": "Terms and Conditions",
"oldfieldname": "tc_name",
"oldfieldtype": "Link",
"options": "Terms and Conditions"
},
{
"doctype": "DocField",
"fieldname": "select_print_heading",
"fieldtype": "Select",
"in_filter": 0,
"label": "Select Print Heading",
"oldfieldname": "select_print_heading",
"oldfieldtype": "Select",
"options": "link:Print Heading"
},
{
"create": 1,
"doctype": "DocPerm",
"role": "System Manager",
"doctype": "DocPerm"
"write": 1
},
{
"write": 1,
"create": 1,
"doctype": "DocPerm",
"role": "Accounts Manager",
"doctype": "DocPerm"
"write": 1
},
{
"role": "Accounts User",
"doctype": "DocPerm"
"doctype": "DocPerm",
"role": "Accounts User"
}
]

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-21 18:19:17",
"docstatus": 0,
"modified": "2013-01-22 14:56:42",
"modified": "2013-01-23 17:25:09",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -73,6 +73,17 @@
"reqd": 1,
"search_index": 1
},
{
"doctype": "DocField",
"fieldname": "supplier",
"fieldtype": "Link",
"hidden": 0,
"label": "Supplier",
"oldfieldname": "supplier",
"oldfieldtype": "Link",
"options": "Supplier",
"print_hide": 1
},
{
"doctype": "DocField",
"fieldname": "supplier_name",
@ -238,11 +249,11 @@
{
"doctype": "DocField",
"fieldname": "currency",
"fieldtype": "Select",
"fieldtype": "Link",
"label": "Currency",
"oldfieldname": "currency",
"oldfieldtype": "Select",
"options": "link:Currency",
"options": "Currency",
"print_hide": 1
},
{
@ -346,6 +357,7 @@
"label": "Total Tax",
"oldfieldname": "total_tax",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -355,17 +367,6 @@
"fieldtype": "Section Break",
"label": "Contact Info"
},
{
"doctype": "DocField",
"fieldname": "supplier",
"fieldtype": "Link",
"hidden": 0,
"label": "Supplier",
"oldfieldname": "supplier",
"oldfieldtype": "Link",
"options": "Supplier",
"print_hide": 1
},
{
"depends_on": "eval:doc.supplier",
"doctype": "DocField",
@ -403,6 +404,7 @@
"label": "Net Total (Import)",
"oldfieldname": "net_total_import",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"read_only": 1
},
@ -413,6 +415,7 @@
"label": "Taxes and Charges Added (Import)",
"oldfieldname": "other_charges_added_import",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"read_only": 1
},
@ -423,6 +426,7 @@
"label": "Taxes and Charges Deducted (Import)",
"oldfieldname": "other_charges_deducted_import",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"read_only": 1
},
@ -433,6 +437,7 @@
"label": "Grand Total (Import)",
"oldfieldname": "grand_total_import",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"read_only": 1
},
@ -455,6 +460,7 @@
"no_copy": 1,
"oldfieldname": "total_amount_to_pay",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -466,6 +472,7 @@
"no_copy": 1,
"oldfieldname": "total_advance",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -478,6 +485,7 @@
"no_copy": 1,
"oldfieldname": "outstanding_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"search_index": 1
@ -498,6 +506,7 @@
"label": "Net Total",
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -508,6 +517,7 @@
"label": "Taxes and Charges Added",
"oldfieldname": "other_charges_added",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -518,6 +528,7 @@
"label": "Taxes and Charges Deducted",
"oldfieldname": "other_charges_deducted",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -528,6 +539,7 @@
"label": "Grand Total",
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -548,6 +560,7 @@
"fieldtype": "Currency",
"label": "Write Off Amount",
"no_copy": 1,
"options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{

View File

@ -35,7 +35,7 @@ wn.doclistviews['Purchase Invoice'] = wn.views.ListView.extend({
{
width: '18%',
content: function(parent, data) {
$(parent).html(data.currency + ' ' + fmt_money(data.grand_total_import))
$(parent).html(format_currency(data.grand_total_import, data.currency))
},
css: {'text-align':'right'}
},

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:08",
"docstatus": 0,
"modified": "2013-01-22 14:47:52",
"modified": "2013-01-23 17:11:17",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -55,6 +55,7 @@
"label": "Advance Amount",
"oldfieldname": "advance_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1,
"width": "100px"
},
@ -65,6 +66,7 @@
"label": "Allocated Amount",
"oldfieldname": "allocated_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"width": "100px"
},
{

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:08",
"docstatus": 0,
"modified": "2013-01-22 14:47:52",
"modified": "2013-01-23 17:11:17",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -82,6 +82,7 @@
"fieldname": "import_ref_rate",
"fieldtype": "Currency",
"label": "Ref Rate ",
"options": "currency",
"print_hide": 1
},
{
@ -98,6 +99,7 @@
"label": "Rate ",
"oldfieldname": "import_rate",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"reqd": 1
},
@ -108,6 +110,7 @@
"label": "Amount",
"oldfieldname": "import_amount",
"oldfieldtype": "Currency",
"options": "currency",
"read_only": 1,
"reqd": 1
},
@ -116,6 +119,7 @@
"fieldname": "purchase_ref_rate",
"fieldtype": "Currency",
"label": "Ref Rate *",
"options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{
@ -125,6 +129,7 @@
"label": "Rate *(Default Curr.)",
"oldfieldname": "rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"reqd": 1
},
@ -135,6 +140,7 @@
"label": "Amount (Default Curr.)",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 1

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:08",
"docstatus": 0,
"modified": "2013-01-22 14:47:56",
"modified": "2013-01-23 17:11:17",
"modified_by": "Administrator",
"owner": "wasim@webnotestech.com"
},
@ -72,6 +72,7 @@
"label": "Rate",
"oldfieldname": "rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"reqd": 0
},
{
@ -81,6 +82,7 @@
"label": "Amount",
"oldfieldname": "tax_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"reqd": 0
},
{
@ -90,6 +92,7 @@
"label": "Total",
"oldfieldname": "total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@ -156,6 +159,7 @@
"no_copy": 1,
"oldfieldname": "total_tax_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"report_hide": 1
},
@ -169,6 +173,7 @@
"no_copy": 1,
"oldfieldname": "total_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"report_hide": 1
}

View File

@ -31,8 +31,8 @@ cur_frm.pformat.purchase_tax_details= function(doc){
var make_row = function(title,val,bold){
var bstart = '<b>'; var bend = '</b>';
return '<tr><td style="width:50%;">'+(bold?bstart:'')+title+(bold?bend:'')+'</td>'
+'<td style="width:25%;text-align:right;">'+doc.currency+'</td>'
+'<td style="width:25%;text-align:right;">'+val+'</td>'
+'<td style="width:25%;text-align:right;"></td>'
+'<td style="width:25%;text-align:right;">'+format_currency(val, doc.currency)+'</td>'
+'</tr>'
}
@ -44,20 +44,22 @@ cur_frm.pformat.purchase_tax_details= function(doc){
var cl = getchildren('Purchase Taxes and Charges',doc.name,'purchase_tax_details');
// outer table
var out='<div><table class="noborder" style="width:100%"><tr><td style="width: 60%"></td><td>';
var out='<div><table class="noborder" style="width:100%">\
<tr><td style="width: 60%"></td><td>';
// main table
out +='<table class="noborder" style="width:100%">'+make_row('Net Total',fmt_money(convert_rate(doc.net_total)),1);
out +='<table class="noborder" style="width:100%">'
+make_row('Net Total',convert_rate(doc.net_total),1);
// add rows
if(cl.length){
for(var i=0;i<cl.length;i++){
out += make_row(cl[i].description,fmt_money(convert_rate(cl[i].tax_amount)),0);
out += make_row(cl[i].description,convert_rate(cl[i].tax_amount),0);
}
}
// grand total
out +=make_row('Grand Total',fmt_money(doc.grand_total_import),1)
out +=make_row('Grand Total',doc.grand_total_import,1)
if(doc.in_words_import){
out +='</table></td></tr>';
out += '<tr><td colspan = "2">';

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:08",
"docstatus": 0,
"modified": "2013-01-22 15:03:42",
"modified": "2013-01-23 17:11:17",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -244,6 +244,7 @@
"label": "Net Total*",
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 0,
"read_only": 1,
"reqd": 1
@ -319,9 +320,9 @@
"description": "Select the currency in which price list is maintained",
"doctype": "DocField",
"fieldname": "price_list_currency",
"fieldtype": "Select",
"fieldtype": "Link",
"label": "Price List Currency",
"options": "link:Currency",
"options": "Currency",
"print_hide": 1,
"reqd": 1
},
@ -343,11 +344,11 @@
{
"doctype": "DocField",
"fieldname": "currency",
"fieldtype": "Select",
"fieldtype": "Link",
"label": "Currency",
"oldfieldname": "currency",
"oldfieldtype": "Select",
"options": "link:Currency",
"options": "Currency",
"print_hide": 1,
"reqd": 1
},
@ -413,6 +414,7 @@
"label": "Total Taxes and Charges",
"oldfieldname": "other_charges_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -448,6 +450,7 @@
"label": "Grand Total",
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 1,
@ -460,6 +463,7 @@
"label": "Rounded Total",
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -481,6 +485,7 @@
"label": "Total Advance",
"oldfieldname": "total_advance",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -492,6 +497,7 @@
"no_copy": 1,
"oldfieldname": "outstanding_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -510,6 +516,7 @@
"label": "Grand Total (Export)",
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"read_only": 1,
"reqd": 1
@ -521,6 +528,7 @@
"label": "Rounded Total (Export)",
"oldfieldname": "rounded_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"read_only": 1
},
@ -541,13 +549,14 @@
"label": "Gross Profit",
"oldfieldname": "gross_profit",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "gross_profit_percent",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Gross Profit (%)",
"oldfieldname": "gross_profit_percent",
"oldfieldtype": "Currency",
@ -573,6 +582,7 @@
"label": "Paid Amount",
"oldfieldname": "paid_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{
@ -603,6 +613,7 @@
"fieldname": "write_off_amount",
"fieldtype": "Currency",
"label": "Write Off Amount",
"options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{
@ -1016,6 +1027,7 @@
"label": "Total Commission",
"oldfieldname": "total_commission",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{

View File

@ -32,7 +32,7 @@ wn.doclistviews['Sales Invoice'] = wn.views.ListView.extend({
{
width: '18%',
content: function(parent, data) {
$(parent).html(data.currency + ' ' + fmt_money(data.grand_total_export))
$(parent).html(format_currency(data.grand_total_export, data.currency))
},
css: {'text-align':'right'}
},

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:09",
"docstatus": 0,
"modified": "2013-01-22 14:48:41",
"modified": "2013-01-23 17:11:18",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -55,6 +55,7 @@
"label": "Advance amount",
"oldfieldname": "advance_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1,
"width": "120px"
},
@ -65,6 +66,7 @@
"label": "Allocated amount",
"oldfieldname": "allocated_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"width": "120px"
},
{

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:09",
"docstatus": 0,
"modified": "2013-01-22 15:01:34",
"modified": "2013-01-23 17:11:18",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -99,6 +99,7 @@
"label": "Price List Rate",
"oldfieldname": "ref_rate",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"reqd": 0
},
@ -118,6 +119,7 @@
"label": "Basic Rate",
"oldfieldname": "export_rate",
"oldfieldtype": "Currency",
"options": "currency",
"reqd": 1
},
{
@ -127,6 +129,7 @@
"label": "Amount",
"oldfieldname": "export_amount",
"oldfieldtype": "Currency",
"options": "currency",
"read_only": 1,
"reqd": 1
},
@ -137,6 +140,7 @@
"label": "Price List Rate*",
"oldfieldname": "base_ref_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -148,6 +152,7 @@
"label": "Basic Rate*",
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"reqd": 1,
"search_index": 0
@ -159,6 +164,7 @@
"label": "Amount*",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 1

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:09",
"docstatus": 0,
"modified": "2013-01-22 14:48:42",
"modified": "2013-01-23 17:11:18",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -69,7 +69,7 @@
{
"doctype": "DocField",
"fieldname": "rate",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Rate",
"oldfieldname": "rate",
"oldfieldtype": "Currency",
@ -82,6 +82,7 @@
"label": "Amount",
"oldfieldname": "tax_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"reqd": 0
},
{
@ -91,6 +92,7 @@
"label": "Total",
"oldfieldname": "total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@ -134,6 +136,7 @@
"no_copy": 1,
"oldfieldname": "total_tax_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"report_hide": 1
},
@ -147,6 +150,7 @@
"no_copy": 1,
"oldfieldname": "total_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"report_hide": 1
},

View File

@ -45,8 +45,8 @@ cur_frm.pformat.other_charges= function(doc){
var make_row = function(title,val,bold){
var bstart = '<b>'; var bend = '</b>';
return '<tr><td style="width:50%;">'+(bold?bstart:'')+title+(bold?bend:'')+'</td>'
+'<td style="width:25%;text-align:right;">'+doc.currency+'</td>'
+'<td style="width:25%;text-align:right;">'+val+'</td>'
+'<td style="width:25%;text-align:right;"></td>'
+'<td style="width:25%;text-align:right;">'+format_currency(val, doc.currency)+'</td>'
+'</tr>'
}
@ -73,24 +73,24 @@ cur_frm.pformat.other_charges= function(doc){
out +='<table class="noborder" style="width:100%">';
if(!print_hide_dict['net_total']) {
out +=make_row('Net Total',fmt_money(convert_rate(doc.net_total)),1);
out +=make_row('Net Total',convert_rate(doc.net_total),1);
}
// add rows
if(cl.length){
for(var i=0;i<cl.length;i++){
if(fmt_money(convert_rate(cl[i].tax_amount))!=0 && !cl[i].included_in_print_rate)
out += make_row(cl[i].description,fmt_money(convert_rate(cl[i].tax_amount)),0);
if(convert_rate(cl[i].tax_amount)!=0 && !cl[i].included_in_print_rate)
out += make_row(cl[i].description,convert_rate(cl[i].tax_amount),0);
}
}
// grand total
if(!print_hide_dict['grand_total_export']) {
out += make_row('Grand Total',fmt_money(doc.grand_total_export),1);
out += make_row('Grand Total',doc.grand_total_export,1);
}
if(!print_hide_dict['rounded_total_export']) {
out += make_row('Rounded Total',fmt_money(doc.rounded_total_export),1);
out += make_row('Rounded Total',doc.rounded_total_export,1);
}
if(doc.in_words_export && !print_hide_dict['in_words_export']){
@ -184,4 +184,4 @@ cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
}
validated = false;
refresh_field('tax_amount',d.name,'other_charges');
}
};

View File

@ -112,9 +112,8 @@ erpnext.AccountsChart = Class.extend({
if (ctype == 'Account') {
var bal = treenode.data && treenode.data.balance.split(' ') || ['',''];
if (bal && flt(bal[1])) {
treenode.parent.append('<span class="balance-area">\
<span style="color: #aaa">'+ bal[0] + '</span> '
+ fmt_money(bal[1]) + '</span>');
treenode.parent.append('<span class="balance-area">'
+ format_currency(bal[1], bal[0]) + '</span>');
}
}
}

View File

@ -1,6 +1,6 @@
from __future__ import unicode_literals
import webnotes
from webnotes.utils import get_defaults, fmt_money
from webnotes.utils import get_defaults
from accounts.utils import get_balance_on
@webnotes.whitelist()

View File

@ -83,9 +83,11 @@ pscript.stmt_new = function(stmt,company_name,level,period,year) {
$i('stmt_tree').innerHTML = 'Refreshing....';
$i('stmt_tree').style.display = 'block';
var company = sel_val($i('stmt_company'))
var arg = {
statement:sel_val($i('stmt_type'))
,company:sel_val($i('stmt_company'))
,company:company,
,period:sel_val($i('stmt_period'))
,year:sel_val($i('stmt_fiscal_year'))
}
@ -136,9 +138,12 @@ pscript.stmt_new = function(stmt,company_name,level,period,year) {
}
if(nl[i][0] != 0){
if(nl[i][j]) {
if (i==0) per.innerHTML = (nl[i][j]+'').bold();
else if(nl[i][0] == 1 || nl[i][0] == 4) per.innerHTML = (cstr(fmt_money(nl[i][j]))+'').bold();
else per.innerHTML = fmt_money(nl[i][j])
if (i==0)
per.innerHTML = (nl[i][j]+'').bold();
else if(nl[i][0] == 1 || nl[i][0] == 4)
per.innerHTML = format_currency(nl[i][j], erpnext.get_currency(company)).bold();
else
per.innerHTML = format_currency(nl[i][j], erpnext.get_currency(company))
} else
per.innerHTML = '-';
}

View File

@ -242,8 +242,7 @@ erpnext.buying.BuyingController = erpnext.utils.Controller.extend({
},
get_company_currency: function() {
return (wn.boot.company[this.frm.doc.company].default_currency ||
sys_defaults['currency']);
return erpnext.get_currency(this.frm.doc.company);
}
});
@ -648,9 +647,9 @@ cur_frm.cscript.calc_other_charges = function(doc , tname , fname , other_fname)
//prev_total += flt(tax[t].total_amount); // for previous row total
if(tax[t].charge_type == 'Actual')
$td(otc,i+1,t+1).innerHTML = fmt_money(tax[t].total_amount);
$td(otc,i+1,t+1).innerHTML = format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
else
$td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +fmt_money(tax[t].total_amount);
$td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
if (tax[t].category != "Total"){
item_tax += tax[t].total_amount;
@ -676,9 +675,9 @@ cur_frm.cscript.calc_other_charges = function(doc , tname , fname , other_fname)
//prev_total += flt(tax[t].total_amount); // for previous row total
if(tax[t].charge_type == 'Actual')
$td(otc,i+1,t+1).innerHTML = fmt_money(tax[t].total_amount);
$td(otc,i+1,t+1).innerHTML = format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
else
$td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +fmt_money(tax[t].total_amount);
$td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
if (tax[t].category != "Total"){
item_tax -= tax[t].total_amount;

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-21 18:19:18",
"creation": "2013-01-22 15:11:37",
"docstatus": 0,
"modified": "2013-01-22 14:56:42",
"modified": "2013-01-23 17:11:28",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -242,12 +242,12 @@
"description": "Supplier's currency",
"doctype": "DocField",
"fieldname": "currency",
"fieldtype": "Select",
"fieldtype": "Link",
"label": "Currency",
"no_copy": 0,
"oldfieldname": "currency",
"oldfieldtype": "Select",
"options": "link:Currency",
"options": "Currency",
"print_hide": 1,
"reqd": 1
},
@ -367,6 +367,7 @@
"no_copy": 0,
"oldfieldname": "net_total_import",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"read_only": 1
},
@ -378,6 +379,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_added_import",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"read_only": 1,
"report_hide": 0
@ -390,6 +392,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_deducted_import",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"read_only": 1,
"report_hide": 0
@ -402,6 +405,7 @@
"no_copy": 0,
"oldfieldname": "grand_total_import",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"read_only": 1,
"report_hide": 0
@ -431,6 +435,7 @@
"no_copy": 1,
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 0
@ -443,6 +448,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_added",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -454,6 +460,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_deducted",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -465,6 +472,7 @@
"no_copy": 1,
"oldfieldname": "total_tax",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -476,6 +484,7 @@
"no_copy": 1,
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -486,6 +495,7 @@
"label": "Rounded Total",
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},

View File

@ -23,7 +23,7 @@ wn.doclistviews['Purchase Order'] = wn.views.ListView.extend({
{
width: '18%',
content: function(parent, data) {
$(parent).html(data.currency + ' ' + fmt_money(data.grand_total_import))
$(parent).html(format_currency(data.grand_total_import, data.currency))
},
css: {'text-align':'right'}
},

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:10",
"docstatus": 0,
"modified": "2013-01-22 15:02:01",
"modified": "2013-01-23 17:11:19",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -116,6 +116,7 @@
"fieldname": "import_ref_rate",
"fieldtype": "Currency",
"label": "Ref Rate ",
"options": "currency",
"print_hide": 1
},
{
@ -133,6 +134,7 @@
"label": "Rate ",
"oldfieldname": "import_rate",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0
},
{
@ -142,6 +144,7 @@
"label": "Amount",
"oldfieldname": "import_amount",
"oldfieldtype": "Currency",
"options": "currency",
"read_only": 1
},
{
@ -149,6 +152,7 @@
"fieldname": "purchase_ref_rate",
"fieldtype": "Currency",
"label": "Ref Rate *",
"options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{
@ -159,6 +163,7 @@
"label": "Rate (Default Curr.) *",
"oldfieldname": "purchase_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "100px",
"reqd": 1,
@ -172,6 +177,7 @@
"label": "Amount (Default Curr.)",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 1

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:10",
"docstatus": 0,
"modified": "2013-01-22 14:47:54",
"modified": "2013-01-23 17:11:19",
"modified_by": "Administrator",
"owner": "dhanalekshmi@webnotestech.com"
},
@ -79,7 +79,8 @@
"fieldtype": "Currency",
"label": "Rate",
"oldfieldname": "rate",
"oldfieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",
@ -88,6 +89,7 @@
"label": "Amount",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:10",
"docstatus": 0,
"modified": "2013-01-22 14:47:55",
"modified": "2013-01-23 17:11:19",
"modified_by": "Administrator",
"owner": "wasim@webnotestech.com"
},
@ -97,7 +97,8 @@
"fieldtype": "Currency",
"label": "Rate",
"oldfieldname": "rate",
"oldfieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",
@ -116,6 +117,7 @@
"label": "Amount",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@ -130,7 +132,7 @@
{
"doctype": "DocField",
"fieldname": "current_stock",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Current Stock",
"oldfieldname": "current_stock",
"oldfieldtype": "Currency",

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-21 18:19:20",
"docstatus": 0,
"modified": "2013-01-22 14:56:44",
"modified": "2013-01-23 16:59:33",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -242,7 +242,7 @@
"description": "% of materials ordered against this Purchase Requisition",
"doctype": "DocField",
"fieldname": "per_ordered",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "% Ordered",
"no_copy": 1,
"oldfieldname": "per_ordered",

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:11",
"docstatus": 0,
"modified": "2013-01-22 14:57:25",
"modified": "2013-01-22 16:55:25",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -162,10 +162,10 @@
"description": "This currency will get fetched in Purchase transactions of this supplier",
"doctype": "DocField",
"fieldname": "default_currency",
"fieldtype": "Select",
"fieldtype": "Link",
"label": "Default Currency",
"no_copy": 1,
"options": "link:Currency"
"options": "Currency"
},
{
"description": "Statutory info and other general information about your Supplier",

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-21 18:19:20",
"docstatus": 0,
"modified": "2013-01-22 14:57:25",
"modified": "2013-01-23 17:11:28",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -196,12 +196,12 @@
"description": "Supplier's currency",
"doctype": "DocField",
"fieldname": "currency",
"fieldtype": "Select",
"fieldtype": "Link",
"label": "Currency",
"no_copy": 0,
"oldfieldname": "currency",
"oldfieldtype": "Select",
"options": "link:Currency",
"options": "Currency",
"print_hide": 1,
"reqd": 1
},
@ -322,6 +322,7 @@
"no_copy": 0,
"oldfieldname": "net_total_import",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"read_only": 1
},
@ -333,6 +334,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_added_import",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"read_only": 1,
"report_hide": 0
@ -345,6 +347,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_deducted_import",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"read_only": 1,
"report_hide": 0
@ -357,6 +360,7 @@
"no_copy": 0,
"oldfieldname": "grand_total_import",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"read_only": 1,
"report_hide": 0
@ -386,6 +390,7 @@
"no_copy": 1,
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 0
@ -398,6 +403,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_added",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -409,6 +415,7 @@
"no_copy": 0,
"oldfieldname": "other_charges_deducted",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -420,6 +427,7 @@
"no_copy": 1,
"oldfieldname": "total_tax",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -431,6 +439,7 @@
"no_copy": 1,
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -441,6 +450,7 @@
"label": "Rounded Total",
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},

View File

@ -20,7 +20,7 @@ wn.doclistviews['Supplier Quotation'] = wn.views.ListView.extend({
{
width: '18%',
content: function(parent, data) {
$(parent).html(data.currency + ' ' + fmt_money(data.grand_total_import))
$(parent).html(format_currency(data.grand_total_import, data.currency))
},
css: {'text-align':'right'}
},

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:12",
"docstatus": 0,
"modified": "2013-01-22 14:50:08",
"modified": "2013-01-23 17:11:19",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -102,6 +102,7 @@
"fieldname": "import_ref_rate",
"fieldtype": "Currency",
"label": "Ref Rate ",
"options": "currency",
"print_hide": 1
},
{
@ -119,6 +120,7 @@
"label": "Rate ",
"oldfieldname": "import_rate",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0
},
{
@ -128,6 +130,7 @@
"label": "Amount",
"oldfieldname": "import_amount",
"oldfieldtype": "Currency",
"options": "currency",
"read_only": 1
},
{
@ -135,6 +138,7 @@
"fieldname": "purchase_ref_rate",
"fieldtype": "Currency",
"label": "Ref Rate *",
"options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{
@ -145,6 +149,7 @@
"label": "Rate (Default Curr.) *",
"oldfieldname": "purchase_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "100px",
"reqd": 1,
@ -158,6 +163,7 @@
"label": "Amount (Default Curr.)",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 1

View File

@ -2,11 +2,12 @@
{
"creation": "2013-01-10 16:34:13",
"docstatus": 0,
"modified": "2013-01-22 14:18:28",
"modified": "2013-01-22 17:36:37",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"allow_rename": 1,
"autoname": "field:branch",
"doctype": "DocType",
"document_type": "Master",

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:13",
"docstatus": 0,
"modified": "2013-01-22 14:46:41",
"modified": "2013-01-23 16:32:07",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -81,7 +81,7 @@
"depends_on": "eval:doc.taxable=='No'",
"doctype": "DocField",
"fieldname": "exemption_limit",
"fieldtype": "Currency",
"fieldtype": "Float",
"hidden": 1,
"label": "Exemption Limit",
"oldfieldname": "exemption_limit",

View File

@ -1,75 +1,76 @@
[
{
"owner": "Administrator",
"creation": "2013-01-10 16:34:14",
"docstatus": 0,
"creation": "2012-07-03 13:29:41",
"modified": "2013-01-23 17:11:20",
"modified_by": "Administrator",
"modified": "2012-11-30 11:57:58"
"owner": "Administrator"
},
{
"istable": 1,
"name": "__common__",
"doctype": "DocType",
"module": "HR"
"istable": 1,
"module": "HR",
"name": "__common__"
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Employee External Work History",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"name": "Employee External Work History",
"doctype": "DocType"
"doctype": "DocType",
"name": "Employee External Work History"
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"fieldname": "company_name",
"fieldtype": "Data",
"label": "Company",
"oldfieldname": "company_name",
"fieldname": "company_name",
"fieldtype": "Data"
"oldfieldtype": "Data"
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"fieldname": "designation",
"fieldtype": "Data",
"label": "Designation",
"oldfieldname": "designation",
"fieldname": "designation",
"fieldtype": "Data"
"oldfieldtype": "Data"
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"fieldname": "salary",
"fieldtype": "Currency",
"label": "Salary",
"oldfieldname": "salary",
"fieldname": "salary",
"fieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
},
{
"oldfieldtype": "Small Text",
"doctype": "DocField",
"fieldname": "address",
"fieldtype": "Small Text",
"label": "Address",
"oldfieldname": "address",
"fieldname": "address",
"fieldtype": "Small Text"
"oldfieldtype": "Small Text"
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"fieldname": "contact",
"fieldtype": "Data",
"label": "Contact",
"oldfieldname": "contact",
"fieldname": "contact",
"fieldtype": "Data"
"oldfieldtype": "Data"
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"fieldname": "total_experience",
"fieldtype": "Data",
"label": "Total Experience",
"oldfieldname": "total_experience",
"fieldname": "total_experience",
"fieldtype": "Data"
"oldfieldtype": "Data"
}
]

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:14",
"docstatus": 0,
"modified": "2013-01-22 14:56:02",
"modified": "2013-01-23 17:11:20",
"modified_by": "Administrator",
"owner": "harshada@webnotestech.com"
},
@ -76,6 +76,7 @@
"no_copy": 1,
"oldfieldname": "total_claimed_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1,
"reqd": 0,
"width": "160px"
@ -89,6 +90,7 @@
"no_copy": 1,
"oldfieldname": "total_sanctioned_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1,
"width": "160px"
},

View File

@ -17,8 +17,7 @@ wn.doclistviews['Expense Claim'] = wn.views.ListView.extend({
this._super(data);
data.posting_date = wn.datetime.str_to_user(data.posting_date);
data.employee_name = data.employee_name + ' claimed '
+ wn.boot.company[data.company].default_currency + ' '
+ fmt_money(data.total_claimed_amount);
+ format_currency(data.total_claimed_amount, erpnext.get_currency(data.company));
},
columns: [
@ -31,8 +30,8 @@ wn.doclistviews['Expense Claim'] = wn.views.ListView.extend({
{
width: '12%',
content: function(parent, data) {
$(parent).html(wn.boot.company[data.company].default_currency
+ ' ' + fmt_money(data.total_sanctioned_amount));
$(parent).html(format_currency(data.total_sanctioned_amount,
erpnext.get_currency(data.company)));
},
css: {'text-align': 'right'},
},

View File

@ -1,80 +1,80 @@
[
{
"owner": "harshada@webnotestech.com",
"creation": "2013-01-10 16:34:14",
"docstatus": 0,
"creation": "2012-07-03 13:30:39",
"modified": "2013-01-23 17:11:20",
"modified_by": "Administrator",
"modified": "2012-12-05 14:22:03"
"owner": "harshada@webnotestech.com"
},
{
"istable": 1,
"name": "__common__",
"doctype": "DocType",
"module": "HR"
"istable": 1,
"module": "HR",
"name": "__common__"
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Expense Claim Detail",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"name": "Expense Claim Detail",
"doctype": "DocType"
"doctype": "DocType",
"name": "Expense Claim Detail"
},
{
"oldfieldtype": "Date",
"doctype": "DocField",
"label": "Expense Date",
"oldfieldname": "expense_date",
"width": "150px",
"fieldname": "expense_date",
"fieldtype": "Date",
"reqd": 0
"label": "Expense Date",
"oldfieldname": "expense_date",
"oldfieldtype": "Date",
"reqd": 0,
"width": "150px"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Expense Claim Type",
"oldfieldname": "expense_type",
"width": "150px",
"fieldname": "expense_type",
"fieldtype": "Select",
"label": "Expense Claim Type",
"oldfieldname": "expense_type",
"oldfieldtype": "Link",
"options": "link:Expense Claim Type",
"reqd": 1,
"options": "link:Expense Claim Type"
"width": "150px"
},
{
"oldfieldtype": "Small Text",
"doctype": "DocField",
"fieldname": "description",
"fieldtype": "Small Text",
"label": "Description",
"oldfieldname": "description",
"width": "300px",
"fieldname": "description",
"fieldtype": "Small Text"
"oldfieldtype": "Small Text",
"width": "300px"
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Claim Amount",
"oldfieldname": "claim_amount",
"width": "150px",
"trigger": "Client",
"fieldname": "claim_amount",
"fieldtype": "Currency",
"reqd": 1
"label": "Claim Amount",
"oldfieldname": "claim_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"reqd": 1,
"width": "150px"
},
{
"no_copy": 1,
"oldfieldtype": "Currency",
"allow_on_submit": 0,
"doctype": "DocField",
"label": "Sanctioned Amount",
"oldfieldname": "sanctioned_amount",
"width": "150px",
"trigger": "Client",
"fieldname": "sanctioned_amount",
"fieldtype": "Currency"
"fieldtype": "Currency",
"label": "Sanctioned Amount",
"no_copy": 1,
"oldfieldname": "sanctioned_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"width": "150px"
}
]

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:15",
"docstatus": 0,
"modified": "2013-01-22 14:57:22",
"modified": "2013-01-23 17:11:20",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -325,7 +325,8 @@
"fieldtype": "Currency",
"label": "Arrear Amount",
"oldfieldname": "arrear_amount",
"oldfieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",
@ -333,7 +334,8 @@
"fieldtype": "Currency",
"label": "Leave Encashment Amount",
"oldfieldname": "encashment_amount",
"oldfieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",
@ -342,6 +344,7 @@
"label": "Gross Pay",
"oldfieldname": "gross_pay",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@ -351,6 +354,7 @@
"label": "Total Deduction",
"oldfieldname": "total_deduction",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@ -368,6 +372,7 @@
"label": "Net Pay",
"oldfieldname": "net_pay",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@ -375,6 +380,7 @@
"fieldname": "rounded_total",
"fieldtype": "Currency",
"label": "Rounded Total",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{

View File

@ -33,13 +33,8 @@ wn.doclistviews['Salary Slip'] = wn.views.ListView.extend({
{
width: '16%',
content: function(parent, data) {
$(parent).html(
(
data.company
? wn.boot.company[data.company].default_currency
: sys_defaults.currency
)
+ ' ' + fmt_money(data.rounded_total));
$(parent).html(format_currency(data.rounded_total,
erpnext.get_currency(data.company)));
},
css: {'text-align': 'right'},
},

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:15",
"docstatus": 0,
"modified": "2013-01-22 14:47:58",
"modified": "2013-01-23 17:11:20",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -55,13 +55,15 @@
"label": "Amount",
"oldfieldname": "d_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "d_modified_amount",
"fieldtype": "Currency",
"label": "Modified Amount"
"label": "Modified Amount",
"options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:15",
"docstatus": 0,
"modified": "2013-01-22 14:47:59",
"modified": "2013-01-23 17:11:20",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -55,13 +55,15 @@
"label": "Amount",
"oldfieldname": "e_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "e_modified_amount",
"fieldtype": "Currency",
"label": "Modified Amount"
"label": "Modified Amount",
"options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:15",
"docstatus": 0,
"modified": "2013-01-22 14:57:22",
"modified": "2013-01-23 17:11:20",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -155,6 +155,7 @@
"label": "CTC",
"oldfieldname": "ctc",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"reqd": 1
},
{
@ -234,6 +235,7 @@
"label": "Total Earning",
"oldfieldname": "total_earning",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@ -243,6 +245,7 @@
"label": "Total Deduction",
"oldfieldname": "total_deduction",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{
@ -256,6 +259,7 @@
"fieldname": "net_pay",
"fieldtype": "Currency",
"label": "Net Pay",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{

View File

@ -33,13 +33,8 @@ wn.doclistviews['Salary Structure'] = wn.views.ListView.extend({
{
width: '15%',
content: function(parent, data) {
$(parent).html(
(
data.company
? wn.boot.company[data.company].default_currency
: sys_defaults.currency
)
+ ' ' + fmt_money(data.net_pay));
$(parent).html(format_currency(data.net_pay,
erpnext.get_currency(data.company)));
},
css: {'text-align': 'right'},
},

View File

@ -1,59 +1,55 @@
[
{
"owner": "Administrator",
"creation": "2013-01-10 16:34:16",
"docstatus": 0,
"creation": "2012-03-27 14:35:54",
"modified": "2013-01-23 17:11:21",
"modified_by": "Administrator",
"modified": "2012-03-27 14:35:54"
"owner": "Administrator"
},
{
"section_style": "Simple",
"doctype": "DocType",
"istable": 1,
"name": "__common__",
"colour": "White:FFF",
"module": "HR",
"show_in_menu": 0,
"version": 14,
"server_code_error": " ",
"doctype": "DocType"
"name": "__common__"
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Salary Structure Deduction",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"name": "Salary Structure Deduction",
"doctype": "DocType"
"doctype": "DocType",
"name": "Salary Structure Deduction"
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Type",
"oldfieldname": "d_type",
"width": "200px",
"fieldname": "d_type",
"fieldtype": "Link",
"label": "Type",
"oldfieldname": "d_type",
"oldfieldtype": "Select",
"options": "Deduction Type",
"reqd": 1,
"options": "Deduction Type"
"width": "200px"
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"fieldname": "d_modified_amt",
"fieldtype": "Currency",
"label": "Amount",
"oldfieldname": "d_modified_amt",
"fieldname": "d_modified_amt",
"fieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
},
{
"oldfieldtype": "Check",
"doctype": "DocField",
"fieldname": "depend_on_lwp",
"fieldtype": "Check",
"label": "Depend on LWP",
"oldfieldname": "depend_on_lwp",
"fieldname": "depend_on_lwp",
"fieldtype": "Check"
"oldfieldtype": "Check"
}
]

View File

@ -1,62 +1,57 @@
[
{
"owner": "Administrator",
"creation": "2013-01-10 16:34:16",
"docstatus": 0,
"creation": "2012-03-27 14:35:54",
"modified": "2013-01-23 17:11:21",
"modified_by": "Administrator",
"modified": "2012-03-27 14:35:54"
"owner": "Administrator"
},
{
"section_style": "Simple",
"doctype": "DocType",
"hide_heading": 0,
"hide_toolbar": 0,
"istable": 1,
"module": "HR",
"doctype": "DocType",
"show_in_menu": 0,
"hide_heading": 0,
"name": "__common__",
"colour": "White:FFF",
"server_code_error": " ",
"version": 26,
"hide_toolbar": 0
"name": "__common__"
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Salary Structure Earning",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"name": "Salary Structure Earning",
"doctype": "DocType"
"doctype": "DocType",
"name": "Salary Structure Earning"
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Type",
"oldfieldname": "e_type",
"width": "200px",
"fieldname": "e_type",
"fieldtype": "Link",
"label": "Type",
"oldfieldname": "e_type",
"oldfieldtype": "Data",
"options": "Earning Type",
"reqd": 1,
"options": "Earning Type"
"width": "200px"
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"fieldname": "modified_value",
"fieldtype": "Currency",
"label": "Amount",
"oldfieldname": "modified_value",
"trigger": "Client",
"fieldname": "modified_value",
"fieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
},
{
"oldfieldtype": "Check",
"doctype": "DocField",
"fieldname": "depend_on_lwp",
"fieldtype": "Check",
"label": "Depend on LWP",
"oldfieldname": "depend_on_lwp",
"fieldname": "depend_on_lwp",
"fieldtype": "Check"
"oldfieldtype": "Check"
}
]

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:16",
"creation": "2013-01-22 15:11:38",
"docstatus": 0,
"modified": "2013-01-22 14:55:57",
"modified": "2013-01-23 17:00:25",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -150,7 +150,7 @@
{
"doctype": "DocField",
"fieldname": "total_cost",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Total Cost",
"read_only": 1
},
@ -162,14 +162,14 @@
{
"doctype": "DocField",
"fieldname": "raw_material_cost",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Total Raw Material Cost",
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "operating_cost",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Total Operating Cost",
"read_only": 1
},

View File

@ -36,8 +36,7 @@ wn.doclistviews['BOM'] = wn.views.ListView.extend({
{
width: '20%',
content: function(parent, data) {
$(parent).html(sys_defaults.currency + " "
+ fmt_money(data.total_cost));
$(parent).html(format_currency(data.total_cost));
},
css: {'text-align': 'right'},
},

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:16",
"docstatus": 0,
"modified": "2013-01-22 14:18:20",
"modified": "2013-01-23 16:43:10",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -65,7 +65,7 @@
{
"doctype": "DocField",
"fieldname": "amount",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Amount",
"oldfieldname": "amount_as_per_sr",
"oldfieldtype": "Currency"

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:16",
"docstatus": 0,
"modified": "2013-01-22 14:55:58",
"modified": "2013-01-23 16:43:11",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -99,7 +99,7 @@
{
"doctype": "DocField",
"fieldname": "amount",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Amount",
"oldfieldname": "amount_as_per_mar",
"oldfieldtype": "Currency",

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:16",
"docstatus": 0,
"modified": "2013-01-22 14:55:58",
"modified": "2013-01-23 16:43:12",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -68,7 +68,7 @@
{
"doctype": "DocField",
"fieldname": "hour_rate",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Hour Rate",
"oldfieldname": "hour_rate",
"oldfieldtype": "Currency",
@ -87,7 +87,7 @@
"allow_on_submit": 0,
"doctype": "DocField",
"fieldname": "operating_cost",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Operating Cost",
"oldfieldname": "operating_cost",
"oldfieldtype": "Currency",

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:17",
"docstatus": 0,
"modified": "2013-01-22 14:56:41",
"modified": "2013-01-23 17:11:21",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -72,6 +72,7 @@
"fieldname": "grand_total",
"fieldtype": "Currency",
"label": "Grand Total",
"options": "eval:erpnext.get_currency()",
"read_only": 1,
"width": "120px"
},

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:17",
"docstatus": 0,
"modified": "2013-01-22 14:50:39",
"modified": "2013-01-23 16:43:17",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -102,7 +102,7 @@
{
"doctype": "DocField",
"fieldname": "hour_rate_labour",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Hour Rate Labour",
"oldfieldname": "hour_rate_labour",
"oldfieldtype": "Currency",
@ -118,7 +118,7 @@
{
"doctype": "DocField",
"fieldname": "hour_rate_electricity",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Hour Rate Electricity",
"oldfieldname": "hour_rate_electricity",
"oldfieldtype": "Currency"
@ -126,7 +126,7 @@
{
"doctype": "DocField",
"fieldname": "hour_rate_consumable",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Hour Rate Consumable",
"oldfieldname": "hour_rate_consumable",
"oldfieldtype": "Currency"
@ -134,7 +134,7 @@
{
"doctype": "DocField",
"fieldname": "hour_rate_rent",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Hour Rate Rent",
"oldfieldname": "hour_rate_rent",
"oldfieldtype": "Currency"
@ -142,7 +142,7 @@
{
"doctype": "DocField",
"fieldname": "overhead",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Overhead",
"oldfieldname": "overhead",
"oldfieldtype": "Currency",
@ -158,7 +158,7 @@
{
"doctype": "DocField",
"fieldname": "hour_rate",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Hour Rate",
"oldfieldname": "hour_rate",
"oldfieldtype": "Currency",

View File

@ -0,0 +1,16 @@
import webnotes
def execute():
# get all currencies
webnotes.reload_doc("setup", "doctype", "currency")
clist = [webnotes.conn.get_default("currency")]
for f in webnotes.conn.sql("""select parent, fieldname from tabDocField
where options in ('Currency', 'link:Currency')""", as_dict=1):
if not webnotes.conn.get_value("DocType", f.parent, "issingle"):
clist += [c[0] for c in webnotes.conn.sql("""select distinct `%s`
from `tab%s`""" % (f.fieldname, f.parent))]
clist = list(set(clist))
for c in clist:
if c:
webnotes.conn.sql("""update tabCurrency set `enabled`=1 where name=%s""", c)

View File

@ -155,6 +155,7 @@ patch_list = [
"patches.january_2013.purchase_price_list",
"execute:webnotes.reload_doc('accounts','Print Format','Payment Receipt Voucher')",
"patches.january_2013.update_fraction_for_usd",
"patches.january_2013.enable_currencies",
"patches.january_2013.remove_unwanted_permission",
"patches.january_2013.remove_landed_cost_master",
]

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:17",
"docstatus": 0,
"modified": "2013-01-22 14:56:41",
"modified": "2013-01-23 17:11:21",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -196,6 +196,13 @@
"oldfieldtype": "Text Editor",
"search_index": 0
},
{
"doctype": "DocField",
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company"
},
{
"doctype": "DocField",
"fieldname": "project_details",
@ -212,6 +219,7 @@
"no_copy": 0,
"oldfieldname": "project_value",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"reqd": 0,
"search_index": 0
},
@ -223,6 +231,7 @@
"no_copy": 0,
"oldfieldname": "est_material_cost",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"search_index": 0
},
{
@ -241,6 +250,7 @@
"no_copy": 0,
"oldfieldname": "gross_margin_value",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"reqd": 0,
"search_index": 0
},
@ -252,6 +262,7 @@
"no_copy": 0,
"oldfieldname": "per_gross_margin",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"reqd": 0,
"search_index": 0
},

View File

@ -34,15 +34,14 @@ wn.doclistviews['Project'] = wn.views.ListView.extend({
{
width: '15%',
content: function(parent, data) {
$(parent).html(sys_defaults.currency + " "
+ fmt_money(data.project_value));
$(parent).html(format_currency(data.project_value));
},
css: {'text-align': 'right'},
},
{
width: '10%',
content: function(parent, data) {
$(parent).html(fmt_money(data.per_gross_margin) + " %");
$(parent).html(format_number(data.per_gross_margin) + " %");
},
css: {'text-align': 'right'},
},

View File

@ -16,6 +16,8 @@
wn.provide("erpnext.projects");
cur_frm.add_fetch("project", "company", "company");
erpnext.projects.Task = erpnext.utils.Controller.extend({
setup: function() {
this.frm.fields_dict.project.get_query = function() {

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:17",
"docstatus": 0,
"modified": "2013-01-22 14:57:26",
"modified": "2013-01-23 17:11:21",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -170,7 +170,8 @@
"fieldtype": "Currency",
"label": "Allocated Budget",
"oldfieldname": "allocated_budget",
"oldfieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",
@ -203,7 +204,8 @@
"fieldtype": "Currency",
"label": "Actual Budget",
"oldfieldname": "actual_budget",
"oldfieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
},
{
"doctype": "DocField",
@ -231,6 +233,18 @@
"oldfieldname": "closing_date",
"oldfieldtype": "Date"
},
{
"doctype": "DocField",
"fieldname": "column_break_22",
"fieldtype": "Column Break"
},
{
"doctype": "DocField",
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company"
},
{
"doctype": "DocField",
"fieldname": "file_list",

View File

@ -16,6 +16,15 @@
wn.provide('erpnext.utils');
erpnext.get_currency = function(company) {
if(!company && cur_frm)
company = cur_frm.doc.company;
if(company)
return wn.boot.company[company].default_currency || wn.boot.sysdefaults.currency;
else
return wn.boot.sysdefaults.currency;
}
// TODO
erpnext.utils.Controller = Class.extend({
init: function(opts) {

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:18",
"docstatus": 0,
"modified": "2013-01-22 15:06:09",
"modified": "2013-01-23 17:11:21",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -238,10 +238,10 @@
"description": "This currency will get fetched in Sales transactions of this customer",
"doctype": "DocField",
"fieldname": "default_currency",
"fieldtype": "Select",
"fieldtype": "Link",
"label": "Default Currency",
"no_copy": 1,
"options": "link:Currency",
"options": "Currency",
"permlevel": 0
},
{
@ -277,6 +277,7 @@
"label": "Credit Limit",
"oldfieldname": "credit_limit",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"permlevel": 2
},
{

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:19",
"docstatus": 0,
"modified": "2013-01-22 13:41:28",
"modified": "2013-01-23 17:11:22",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -85,6 +85,7 @@
"label": "Basic Rate",
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:19",
"docstatus": 0,
"modified": "2013-01-22 14:57:22",
"modified": "2013-01-23 17:11:22",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -242,6 +242,7 @@
"no_copy": 0,
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 0,
"read_only": 1,
"reqd": 0,
@ -313,9 +314,9 @@
"description": "Select the currency in which price list is maintained",
"doctype": "DocField",
"fieldname": "price_list_currency",
"fieldtype": "Select",
"fieldtype": "Link",
"label": "Price List Currency",
"options": "link:Currency",
"options": "Currency",
"print_hide": 1,
"reqd": 1
},
@ -338,12 +339,12 @@
"description": "Customer's currency - If you want to select a currency that is not the default currency, then you must also specify the Currency Conversion Rate.",
"doctype": "DocField",
"fieldname": "currency",
"fieldtype": "Select",
"fieldtype": "Link",
"in_filter": 1,
"label": "Currency",
"oldfieldname": "currency",
"oldfieldtype": "Select",
"options": "link:Currency",
"options": "Currency",
"print_hide": 1,
"reqd": 1,
"search_index": 0,
@ -413,6 +414,7 @@
"label": "Taxes and Charges Total*",
"oldfieldname": "other_charges_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1
},
@ -440,6 +442,7 @@
"no_copy": 0,
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 0,
@ -453,6 +456,7 @@
"no_copy": 0,
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"width": "200px"
@ -486,6 +490,7 @@
"no_copy": 0,
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"read_only": 1,
"reqd": 0,
@ -499,6 +504,7 @@
"no_copy": 0,
"oldfieldname": "rounded_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"read_only": 1,
"reqd": 0,

View File

@ -31,7 +31,7 @@ wn.doclistviews['Quotation'] = wn.views.ListView.extend({
{
width: '18%',
content: function(parent, data) {
$(parent).html(data.currency + ' ' + fmt_money(data.grand_total_export))
$(parent).html(format_currency(data.grand_total_export, data.currency))
},
css: {'text-align':'right'}
},

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:19",
"docstatus": 0,
"modified": "2013-01-22 14:47:57",
"modified": "2013-01-23 15:46:18",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -107,6 +107,7 @@
"label": "Price List Rate",
"oldfieldname": "ref_rate",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"reqd": 0,
"width": "100px"
@ -131,6 +132,7 @@
"label": "Rate",
"oldfieldname": "export_rate",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"reqd": 0,
"search_index": 0,
@ -145,6 +147,7 @@
"label": "Amount",
"oldfieldname": "export_amount",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"read_only": 1,
"reqd": 0,
@ -158,6 +161,7 @@
"label": "Price List Rate*",
"oldfieldname": "base_ref_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency(cur_frm.doc.company);",
"print_hide": 1,
"read_only": 1,
"width": "100px"
@ -171,6 +175,7 @@
"label": "Basic Rate*",
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency(cur_frm.doc.company);",
"print_hide": 1,
"reqd": 0,
"search_index": 0,
@ -185,6 +190,7 @@
"label": "Amount*",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency(cur_frm.doc.company);",
"print_hide": 1,
"read_only": 1,
"reqd": 0,

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:20",
"docstatus": 0,
"modified": "2013-01-22 14:47:59",
"modified": "2013-01-23 17:11:22",
"modified_by": "Administrator",
"owner": "wasim@webnotestech.com"
},
@ -63,6 +63,7 @@
"label": "Rate",
"oldfieldname": "rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"read_only": 1
},
{

View File

@ -172,23 +172,28 @@ cur_frm.cscript.hide_price_list_currency = function(doc, cdt, cdn, callback1) {
unhide_field(['price_list_currency', 'plc_conversion_rate']);
if (pl_currency.length==1) {
if (doc.price_list_currency != pl_currency[0]) set_multiple(cdt, cdn, {price_list_currency:pl_currency[0]});
if (doc.price_list_currency != pl_currency[0])
set_multiple(cdt, cdn, {price_list_currency:pl_currency[0]});
if (pl_currency[0] == doc.currency) {
if(doc.plc_conversion_rate != doc.conversion_rate) set_multiple(cdt, cdn, {plc_conversion_rate:doc.conversion_rate});
if(doc.plc_conversion_rate != doc.conversion_rate)
set_multiple(cdt, cdn, {plc_conversion_rate:doc.conversion_rate});
hide_field(['price_list_currency', 'plc_conversion_rate']);
} else if (pl_currency[0] == r.message[1]) {
if (doc.plc_conversion_rate != 1) set_multiple(cdt, cdn, {plc_conversion_rate:1})
if (doc.plc_conversion_rate != 1)
set_multiple(cdt, cdn, {plc_conversion_rate:1})
hide_field(['price_list_currency', 'plc_conversion_rate']);
}
}
if (r.message[1] == doc.currency) {
if (doc.conversion_rate != 1) set_multiple(cdt, cdn, {conversion_rate:1});
if (doc.conversion_rate != 1)
set_multiple(cdt, cdn, {conversion_rate:1});
hide_field(['conversion_rate', 'grand_total_export', 'in_words_export', 'rounded_total_export']);
} else unhide_field(['conversion_rate', 'grand_total_export', 'in_words_export', 'rounded_total_export']);
if (r.message[1] == doc.price_list_currency) {
if (doc.plc_conversion_rate != 1) set_multiple(cdt, cdn, {plc_conversion_rate:1});
if (doc.plc_conversion_rate != 1)
set_multiple(cdt, cdn, {plc_conversion_rate:1});
hide_field('plc_conversion_rate');
} else unhide_field('plc_conversion_rate');
@ -573,9 +578,9 @@ cur_frm.cscript.calc_other_charges = function(doc , tname , fname , other_fname)
total += flt(tax[t].tax_amount); // for adding total to previous amount
if(tax[t].charge_type == 'Actual')
$td(otc,i+1,t+1).innerHTML = fmt_money(tax[t].total_amount);
$td(otc,i+1,t+1).innerHTML = format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
else
$td(otc,i+1,t+1).innerHTML = '('+fmt_money(rate) + '%) ' +fmt_money(tax[t].total_amount);
$td(otc,i+1,t+1).innerHTML = '('+format_number(rate) + '%) ' +format_currency(tax[t].total_amount, erpnext.get_currency(doc.company));
}
}

View File

@ -27,8 +27,6 @@ wn.require('app/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_
wn.require('app/utilities/doctype/sms_control/sms_control.js');
// ONLOAD
// ================================================================================================
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
if(!doc.transaction_date) set_multiple(cdt,cdn,{transaction_date:get_today()});
@ -148,7 +146,6 @@ cur_frm.cscript.pull_quotation_details = function(doc,dt,dn) {
}
//================ create new contact ============================================================================
cur_frm.cscript.new_contact = function(){
tn = wn.model.make_new_doc_and_get_name('Contact');
locals['Contact'][tn].is_customer = 1;
@ -156,11 +153,6 @@ cur_frm.cscript.new_contact = function(){
loaddoc('Contact', tn);
}
// DOCTYPE TRIGGERS
// ================================================================================================
// ***************** Get project name *****************
cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
var cond = '';
if(doc.customer) cond = '(`tabProject`.customer = "'+doc.customer+'" OR IFNULL(`tabProject`.customer,"")="") AND';
@ -171,20 +163,22 @@ cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
}
// *************** Customized link query for QUOTATION *****************************
cur_frm.fields_dict['quotation_no'].get_query = function(doc) {
var cond='';
if(doc.order_type) cond = ' ifnull(`tabQuotation`.order_type, "") = "'+doc.order_type+'" and';
if(doc.customer) cond += ' ifnull(`tabQuotation`.customer, "") = "'+doc.customer+'" and';
if(doc.order_type) cond = ' ifnull(`tabQuotation`.order_type, "") = "'
+doc.order_type+'" and';
if(doc.customer) cond += ' ifnull(`tabQuotation`.customer, "") = "'
+doc.customer+'" and';
return repl('SELECT DISTINCT name, customer, transaction_date FROM `tabQuotation` WHERE `tabQuotation`.company = "' + doc.company + '" and `tabQuotation`.`docstatus` = 1 and `tabQuotation`.status != "Order Lost" and %(cond)s `tabQuotation`.%(key)s LIKE "%s" ORDER BY `tabQuotation`.`name` DESC LIMIT 50', {cond:cond});
return repl('SELECT DISTINCT name, customer, transaction_date FROM `tabQuotation` \
WHERE `tabQuotation`.company = "'
+ doc.company + '" and `tabQuotation`.`docstatus` = 1 \
and `tabQuotation`.status != "Order Lost" \
and %(cond)s `tabQuotation`.%(key)s LIKE "%s" \
ORDER BY `tabQuotation`.`name` DESC LIMIT 50', {cond:cond});
}
// SALES ORDER DETAILS TRIGGERS
// ================================================================================================
// ***************** Get available qty in warehouse of item selected ****************
cur_frm.cscript.reserved_warehouse = function(doc, cdt , cdn) {
var d = locals[cdt][cdn];
if (d.reserved_warehouse) {
@ -222,7 +216,6 @@ cur_frm.cscript['Make Maintenance Schedule'] = function() {
}
}
//------------ make maintenance visit ------------
cur_frm.cscript.make_maintenance_visit = function() {
var doc = cur_frm.doc;
@ -251,8 +244,6 @@ cur_frm.cscript.make_maintenance_visit = function() {
}
}
// make indent
// ================================================================================================
cur_frm.cscript['Make Purchase Request'] = function() {
var doc = cur_frm.doc;
if (doc.docstatus == 1) {
@ -272,8 +263,6 @@ cur_frm.cscript['Make Purchase Request'] = function() {
}
// MAKE DELIVERY NOTE
// ================================================================================================
cur_frm.cscript['Make Delivery Note'] = function() {
var doc = cur_frm.doc;
if (doc.docstatus == 1) {
@ -293,8 +282,6 @@ cur_frm.cscript['Make Delivery Note'] = function() {
}
// MAKE SALES INVOICE
// ================================================================================================
cur_frm.cscript['Make Sales Invoice'] = function() {
var doc = cur_frm.doc;
@ -312,36 +299,36 @@ cur_frm.cscript['Make Sales Invoice'] = function() {
}
// STOP SALES ORDER
// ==================================================================================================
cur_frm.cscript['Stop Sales Order'] = function() {
var doc = cur_frm.doc;
var check = confirm("Are you sure you want to STOP " + doc.name);
if (check) {
$c('runserverobj', args={'method':'stop_sales_order', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) {
$c('runserverobj', {
'method':'stop_sales_order',
'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))
}, function(r,rt) {
cur_frm.refresh();
});
}
}
// UNSTOP SALES ORDER
// ==================================================================================================
cur_frm.cscript['Unstop Sales Order'] = function() {
var doc = cur_frm.doc;
var check = confirm("Are you sure you want to UNSTOP " + doc.name);
if (check) {
$c('runserverobj', args={'method':'unstop_sales_order', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) {
$c('runserverobj', {
'method':'unstop_sales_order',
'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))
}, function(r,rt) {
cur_frm.refresh();
});
}
}
//get query select Territory
//=======================================================================================================================
cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50';
}
@ -350,4 +337,4 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
if(cint(wn.boot.notification_settings.sales_order)) {
cur_frm.email_doc(wn.boot.notification_settings.sales_order_message);
}
}
};

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:20",
"creation": "2013-01-22 15:24:17",
"docstatus": 0,
"modified": "2013-01-22 13:52:58",
"modified": "2013-01-23 17:11:29",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -249,6 +249,7 @@
"label": "Net Total*",
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 0,
"read_only": 1,
"reqd": 0,
@ -331,9 +332,9 @@
"description": "Select the currency in which price list is maintained",
"doctype": "DocField",
"fieldname": "price_list_currency",
"fieldtype": "Select",
"fieldtype": "Link",
"label": "Price List Currency",
"options": "link:Currency",
"options": "Currency",
"print_hide": 1,
"reqd": 1
},
@ -356,11 +357,11 @@
"description": "Customer's currency",
"doctype": "DocField",
"fieldname": "currency",
"fieldtype": "Select",
"fieldtype": "Link",
"label": "Currency",
"oldfieldname": "currency",
"oldfieldtype": "Select",
"options": "link:Currency",
"options": "Currency",
"print_hide": 1,
"reqd": 1,
"width": "100px"
@ -427,6 +428,7 @@
"label": "Taxes and Charges Total*",
"oldfieldname": "other_charges_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"width": "150px"
@ -454,6 +456,7 @@
"label": "Grand Total*",
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 0,
@ -466,6 +469,7 @@
"label": "Rounded Total",
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"width": "150px"
@ -497,6 +501,7 @@
"label": "Grand Total (Export)",
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"read_only": 1,
"reqd": 0,
@ -509,6 +514,7 @@
"label": "Rounded Total (Export)",
"oldfieldname": "rounded_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"read_only": 1,
"width": "150px"
@ -920,6 +926,7 @@
"label": "Total Commission",
"oldfieldname": "total_commission",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1
},
{

View File

@ -24,7 +24,7 @@ wn.doclistviews['Sales Order'] = wn.views.ListView.extend({
{
width: '18%',
content: function(parent, data) {
$(parent).html(data.currency + ' ' + fmt_money(data.grand_total_export))
$(parent).html(format_currency(data.grand_total_export, data.currency))
},
css: {'text-align':'right'}
},

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:21",
"docstatus": 0,
"modified": "2013-01-22 13:47:03",
"modified": "2013-01-23 17:11:22",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -101,6 +101,7 @@
"label": "Price List Rate",
"oldfieldname": "ref_rate",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"reqd": 0,
"width": "70px"
@ -124,6 +125,7 @@
"label": "Rate",
"oldfieldname": "export_rate",
"oldfieldtype": "Currency",
"options": "currency",
"reqd": 0,
"width": "100px"
},
@ -136,6 +138,7 @@
"no_copy": 0,
"oldfieldname": "export_amount",
"oldfieldtype": "Currency",
"options": "currency",
"read_only": 1,
"reqd": 0,
"width": "100px"
@ -147,6 +150,7 @@
"label": "Price List Rate*",
"oldfieldname": "base_ref_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"width": "100px"
@ -159,6 +163,7 @@
"label": "Basic Rate*",
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"reqd": 0,
"width": "100px"
@ -172,6 +177,7 @@
"no_copy": 0,
"oldfieldname": "amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 0,
@ -237,6 +243,7 @@
"fieldtype": "Currency",
"label": "Billed Amt",
"no_copy": 1,
"options": "currency",
"print_hide": 1,
"read_only": 1
},

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:22",
"docstatus": 0,
"modified": "2013-01-22 13:47:40",
"modified": "2013-01-23 17:11:23",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -73,6 +73,7 @@
"label": "Allocated Amount",
"oldfieldname": "allocated_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"reqd": 0,
"width": "120px"
},
@ -94,6 +95,7 @@
"fieldtype": "Currency",
"label": "Incentives",
"oldfieldname": "incentives",
"oldfieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
}
]

View File

@ -1,162 +1,160 @@
[
{
"owner": "Administrator",
"creation": "2013-01-10 16:34:22",
"docstatus": 0,
"creation": "2012-12-14 14:27:06",
"modified": "2013-01-23 16:51:17",
"modified_by": "Administrator",
"modified": "2012-12-17 17:59:54"
"owner": "Administrator"
},
{
"document_type": "Master",
"name": "__common__",
"autoname": "AR.####",
"module": "Setup",
"doctype": "DocType",
"document_type": "Master",
"module": "Setup",
"name": "__common__",
"search_fields": "transaction,based_on,system_user,system_role,approving_user,approving_role"
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Authorization Rule",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"name": "__common__",
"parent": "Authorization Rule",
"read": 1,
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
"write": 1,
"cancel": 1,
"name": "__common__",
"parent": "Authorization Rule",
"parentfield": "permissions",
"parenttype": "DocType",
"role": "System Manager",
"report": 1,
"permlevel": 0,
"parentfield": "permissions"
"read": 1,
"report": 1,
"role": "System Manager",
"submit": 0,
"write": 1
},
{
"name": "Authorization Rule",
"doctype": "DocType"
"doctype": "DocType",
"name": "Authorization Rule"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Company",
"oldfieldname": "company",
"fieldname": "company",
"fieldtype": "Link",
"search_index": 0,
"label": "Company",
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
"reqd": 0,
"options": "Company"
"search_index": 0
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Transaction",
"oldfieldname": "transaction",
"fieldname": "transaction",
"fieldtype": "Select",
"reqd": 1,
"options": "\nDelivery Note\nPurchase Invoice\nPurchase Order\nPurchase Receipt\nQuotation\nSales Invoice\nSales Order\nAppraisal"
"label": "Transaction",
"oldfieldname": "transaction",
"oldfieldtype": "Select",
"options": "\nDelivery Note\nPurchase Invoice\nPurchase Order\nPurchase Receipt\nQuotation\nSales Invoice\nSales Order\nAppraisal",
"reqd": 1
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Based On",
"oldfieldname": "based_on",
"fieldname": "based_on",
"fieldtype": "Select",
"reqd": 1,
"options": "\nGrand Total\nAverage Discount\nCustomerwise Discount\nItemwise Discount\nNot Applicable"
"label": "Based On",
"oldfieldname": "based_on",
"oldfieldtype": "Select",
"options": "\nGrand Total\nAverage Discount\nCustomerwise Discount\nItemwise Discount\nNot Applicable",
"reqd": 1
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Customer / Item Name",
"oldfieldname": "master_name",
"fieldname": "master_name",
"fieldtype": "Link",
"label": "Customer / Item Name",
"oldfieldname": "master_name",
"oldfieldtype": "Link",
"options": "[Select]"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Applicable To (Role)",
"oldfieldname": "system_role",
"fieldname": "system_role",
"fieldtype": "Link",
"label": "Applicable To (Role)",
"oldfieldname": "system_role",
"oldfieldtype": "Link",
"options": "Role"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Applicable To (User)",
"oldfieldname": "system_user",
"fieldname": "system_user",
"fieldtype": "Link",
"label": "Applicable To (User)",
"oldfieldname": "system_user",
"oldfieldtype": "Link",
"options": "Profile"
},
{
"description": "This will be used for setting rule in HR module",
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Applicable To (Employee)",
"oldfieldname": "to_emp",
"fieldname": "to_emp",
"fieldtype": "Link",
"search_index": 0,
"options": "Employee"
"label": "Applicable To (Employee)",
"oldfieldname": "to_emp",
"oldfieldtype": "Link",
"options": "Employee",
"search_index": 0
},
{
"description": "This will be used for setting rule in HR module",
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Applicable To (Designation)",
"oldfieldname": "to_designation",
"fieldname": "to_designation",
"fieldtype": "Link",
"search_index": 0,
"options": "Designation"
"label": "Applicable To (Designation)",
"oldfieldname": "to_designation",
"oldfieldtype": "Link",
"options": "Designation",
"search_index": 0
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Approving Role",
"oldfieldname": "approving_role",
"fieldname": "approving_role",
"fieldtype": "Link",
"label": "Approving Role",
"oldfieldname": "approving_role",
"oldfieldtype": "Link",
"options": "Role"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Approving User",
"oldfieldname": "approving_user",
"fieldname": "approving_user",
"fieldtype": "Link",
"label": "Approving User",
"oldfieldname": "approving_user",
"oldfieldtype": "Link",
"options": "Profile"
},
{
"default": "0.00",
"oldfieldtype": "Currency",
"doctype": "DocField",
"fieldname": "value",
"fieldtype": "Float",
"label": "Above Value",
"oldfieldname": "value",
"fieldname": "value",
"fieldtype": "Currency"
"oldfieldtype": "Currency"
},
{
"oldfieldtype": "Small Text",
"doctype": "DocField",
"fieldname": "trash_reason",
"fieldtype": "Small Text",
"label": "Trash Reason",
"oldfieldname": "trash_reason",
"fieldname": "trash_reason",
"fieldtype": "Small Text"
},
{
"doctype": "DocPerm"
"oldfieldtype": "Small Text"
},
{
"doctype": "DocPerm"

View File

@ -213,7 +213,9 @@ class DocType:
cc = sql("select name from `tabCost Center` where cost_center_name = 'Root' and company_name = '%s'"%(self.doc.name))
if not cc:
self.create_default_cost_center()
if self.doc.default_currency:
webnotes.conn.set_value("Currency", self.doc.default_currency, "enabled", 1)
def on_trash(self):
"""

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-22 16:50:36",
"docstatus": 0,
"modified": "2013-01-23 15:56:48",
"modified": "2013-01-23 16:51:54",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -86,9 +86,9 @@
{
"doctype": "DocField",
"fieldname": "default_currency",
"fieldtype": "Select",
"fieldtype": "Link",
"label": "Default Currency",
"options": "link:Currency",
"options": "Currency",
"reqd": 1
},
{
@ -147,7 +147,8 @@
"fieldtype": "Currency",
"label": "Credit Limit",
"oldfieldname": "credit_limit",
"oldfieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "default_currency"
},
{
"depends_on": "eval:!doc.__islocal",

View File

@ -1,2 +1,6 @@
cur_frm.cscript.refresh = function(doc) {
cur_frm.set_intro("");
if(!cur_frm.doc.enabled) {
cur_frm.set_intro(wn._("This Currency is disabled. Enable to use in transactions"))
}
}

View File

@ -0,0 +1,19 @@
wn.doclistviews['Currency'] = wn.views.ListView.extend({
init: function(d) {
this._super(d)
this.fields = this.fields.concat([
"`tabCurrency`.enabled",
]);
this.stats = this.stats.concat(['enabled']);
this.order_by = "`tabCurrency`.`enabled` desc, `tabCurrency`.modified desc";
},
columns: [
{width: '3%', content: 'check'},
{width: '5%', content: 'avatar'},
{width: '3%', content: "enabled"},
{width: '70%', content: 'name'},
{width: '20%', content:'modified',
css: {'text-align': 'right', 'color': '#777'}},
]
});

View File

@ -65,7 +65,11 @@ class DocType:
webnotes.conn.set_default('year_start_date', ysd.strftime('%Y-%m-%d'))
webnotes.conn.set_default('year_end_date', \
get_last_day(get_first_day(ysd,0,11)).strftime('%Y-%m-%d'))
# enable default currency
if self.doc.default_currency:
webnotes.conn.set_value("Currency", self.doc.default_currency, "enabled", 1)
# clear cache
webnotes.clear_cache()

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:23",
"docstatus": 0,
"modified": "2013-01-22 14:56:02",
"modified": "2013-01-22 16:54:48",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -101,9 +101,9 @@
"default": "INR",
"doctype": "DocField",
"fieldname": "default_currency",
"fieldtype": "Select",
"fieldtype": "Link",
"label": "Default Currency",
"options": "link:Currency",
"options": "Currency",
"reqd": 1
},
{

View File

@ -53,6 +53,7 @@ class DocType:
}}
self.create_records(master_dict)
# Company
master_dict = {'Company': {
'company_name':args.get('company_name'),
@ -60,6 +61,10 @@ class DocType:
'default_currency':args.get('currency')
}}
self.create_records(master_dict)
# enable default currency
webnotes.conn.set_value("Currency", args.get("currency"), "enabled", 1)
def_args = {
'current_fiscal_year':curr_fiscal_year,

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:24",
"docstatus": 0,
"modified": "2013-01-22 13:48:39",
"modified": "2013-01-23 16:52:10",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -59,7 +59,7 @@
{
"doctype": "DocField",
"fieldname": "target_amount",
"fieldtype": "Currency",
"fieldtype": "Float",
"in_filter": 1,
"label": "Target Amount",
"oldfieldname": "target_amount",

View File

@ -2,11 +2,12 @@
{
"creation": "2013-01-10 16:34:24",
"docstatus": 0,
"modified": "2013-01-22 14:57:26",
"modified": "2013-01-22 17:36:24",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"allow_rename": 1,
"autoname": "field:title",
"description": "Standard Terms and Conditions that can be added to Sales and Purchases.\n\nExamples:\n\n1. Validity of the offer.\n1. Payment Terms (In Advance, On Credit, part advance etc).\n1. What is extra (or payable by the Customer).\n1. Safety / usage warning.\n1. Warranty if any.\n1. Returns Policy.\n1. Terms of shipping, if applicable.\n1. Ways of addressing disputes, indemnity, liability, etc.\n1. Address and Contact of your Company.",
"doctype": "DocType",

View File

@ -19,7 +19,7 @@ wn.module_page["Setup"] = [
{
"doctype":"Currency",
"label": wn._("Currency"),
"description": wn._("Currency Master")
"description": wn._("Enable / disable currencies.")
},
]
},

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:25",
"docstatus": 0,
"modified": "2013-01-22 13:50:19",
"modified": "2013-01-23 16:53:15",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -136,7 +136,7 @@
{
"doctype": "DocField",
"fieldname": "ma_rate",
"fieldtype": "Currency",
"fieldtype": "Float",
"hidden": 1,
"in_filter": 0,
"label": "Moving Average Rate",
@ -159,7 +159,7 @@
{
"doctype": "DocField",
"fieldname": "fcfs_rate",
"fieldtype": "Currency",
"fieldtype": "Float",
"hidden": 1,
"label": "FCFS Rate",
"oldfieldname": "fcfs_rate",
@ -170,7 +170,7 @@
{
"doctype": "DocField",
"fieldname": "valuation_rate",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Valuation Rate",
"oldfieldname": "valuation_rate",
"oldfieldtype": "Currency"
@ -178,7 +178,7 @@
{
"doctype": "DocField",
"fieldname": "stock_value",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Stock Value",
"oldfieldname": "stock_value",
"oldfieldtype": "Currency"

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:25",
"docstatus": 0,
"modified": "2013-01-22 14:56:00",
"modified": "2013-01-23 17:11:24",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -254,6 +254,7 @@
"no_copy": 0,
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 0,
"print_width": "150px",
"read_only": 1,
@ -328,9 +329,9 @@
"description": "Select the currency in which price list is maintained",
"doctype": "DocField",
"fieldname": "price_list_currency",
"fieldtype": "Select",
"fieldtype": "Link",
"label": "Price List Currency",
"options": "link:Currency",
"options": "Currency",
"print_hide": 1,
"read_only": 0,
"reqd": 1
@ -357,11 +358,11 @@
"description": "Customer's Currency",
"doctype": "DocField",
"fieldname": "currency",
"fieldtype": "Select",
"fieldtype": "Link",
"label": "Currency",
"oldfieldname": "currency",
"oldfieldtype": "Select",
"options": "link:Currency",
"options": "Currency",
"print_hide": 1,
"read_only": 0,
"reqd": 1
@ -427,6 +428,7 @@
"label": "Taxes and Charges Total",
"oldfieldname": "other_charges_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
@ -466,6 +468,7 @@
"no_copy": 0,
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
@ -480,6 +483,7 @@
"no_copy": 0,
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
@ -514,6 +518,7 @@
"no_copy": 0,
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"print_width": "150px",
"read_only": 1,
@ -528,6 +533,7 @@
"no_copy": 0,
"oldfieldname": "rounded_total_export",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"print_width": "150px",
"read_only": 1,
@ -853,7 +859,7 @@
"description": "% of materials billed against this Delivery Note",
"doctype": "DocField",
"fieldname": "per_billed",
"fieldtype": "Currency",
"fieldtype": "Float",
"in_filter": 1,
"label": "% Amount Billed",
"no_copy": 1,
@ -1088,6 +1094,7 @@
"no_copy": 0,
"oldfieldname": "total_commission",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 0
},

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:26",
"docstatus": 0,
"modified": "2013-01-22 14:26:18",
"modified": "2013-01-23 17:11:24",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -107,6 +107,7 @@
"no_copy": 0,
"oldfieldname": "ref_rate",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"reqd": 0,
"width": "100px"
@ -129,6 +130,7 @@
"label": "Rate",
"oldfieldname": "export_rate",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"reqd": 0,
"width": "150px"
@ -140,6 +142,7 @@
"label": "Amount",
"oldfieldname": "export_amount",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"read_only": 1,
"reqd": 0,
@ -152,6 +155,7 @@
"label": "Price List Rate*",
"oldfieldname": "base_ref_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"width": "100px"
@ -164,6 +168,7 @@
"label": "Rate*",
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"reqd": 0,
"width": "150px"
@ -175,6 +180,7 @@
"label": "Amount*",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"print_hide": 1,
"read_only": 1,
"reqd": 0,
@ -255,6 +261,7 @@
"fieldtype": "Currency",
"label": "Billed Amt",
"no_copy": 1,
"options": "currency",
"print_hide": 1,
"read_only": 1,
"width": "100px"

View File

@ -2,7 +2,7 @@
{
"creation": "2013-01-21 18:19:22",
"docstatus": 0,
"modified": "2013-01-22 14:47:00",
"modified": "2013-01-23 17:00:07",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -381,7 +381,7 @@
"description": "Buying Cost will be updated from Purchase Orders and Purchase Receipts. <br>The buying cost will calculated by moving average method.",
"doctype": "DocField",
"fieldname": "buying_cost",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Buying Cost",
"no_copy": 1,
"oldfieldname": "buying_cost",
@ -392,7 +392,7 @@
"depends_on": "eval:doc.is_purchase_item==\"Yes\"",
"doctype": "DocField",
"fieldname": "last_purchase_rate",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Last Purchase Rate",
"no_copy": 1,
"oldfieldname": "last_purchase_rate",
@ -403,7 +403,7 @@
"depends_on": "eval:doc.is_purchase_item==\"Yes\"",
"doctype": "DocField",
"fieldname": "standard_rate",
"fieldtype": "Currency",
"fieldtype": "Float",
"label": "Standard Rate",
"oldfieldname": "standard_rate",
"oldfieldtype": "Currency"
@ -525,7 +525,7 @@
"depends_on": "eval:doc.is_sales_item==\"Yes\"",
"doctype": "DocField",
"fieldname": "sales_rate",
"fieldtype": "Currency",
"fieldtype": "Float",
"hidden": 1,
"label": "Sales Rate",
"oldfieldname": "sales_rate",

View File

@ -1,79 +1,80 @@
[
{
"owner": "Administrator",
"creation": "2013-01-21 18:19:14",
"docstatus": 0,
"creation": "2013-01-15 18:43:18",
"modified": "2013-01-23 16:57:49",
"modified_by": "Administrator",
"modified": "2013-01-17 17:53:42"
"owner": "Administrator"
},
{
"read_only": 0,
"istable": 1,
"autoname": "RFD/.#####",
"in_create": 1,
"doctype": "DocType",
"in_create": 1,
"istable": 1,
"module": "Stock",
"name": "__common__"
"name": "__common__",
"read_only": 0
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Item Price",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"name": "Item Price",
"doctype": "DocType"
"doctype": "DocType",
"name": "Item Price"
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"label": "Price List Name",
"oldfieldname": "price_list_name",
"fieldname": "price_list_name",
"fieldtype": "Link",
"search_index": 1,
"reqd": 1,
"in_filter": 1,
"label": "Price List Name",
"oldfieldname": "price_list_name",
"oldfieldtype": "Select",
"options": "Price List",
"in_filter": 1
"reqd": 1,
"search_index": 1
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"label": "Ref Rate",
"oldfieldname": "ref_rate",
"fieldname": "ref_rate",
"fieldtype": "Currency",
"search_index": 0,
"in_filter": 1,
"label": "Ref Rate",
"oldfieldname": "ref_rate",
"oldfieldtype": "Currency",
"options": "ref_currency",
"reqd": 0,
"in_filter": 1
"search_index": 0
},
{
"oldfieldtype": "Select",
"doctype": "DocField",
"fieldname": "ref_currency",
"fieldtype": "Link",
"in_filter": 1,
"label": "Currency",
"oldfieldname": "ref_currency",
"fieldname": "ref_currency",
"fieldtype": "Select",
"search_index": 1,
"oldfieldtype": "Select",
"options": "Currency",
"reqd": 1,
"options": "link:Currency",
"in_filter": 1
"search_index": 1
},
{
"description": "Allow this price in sales related forms",
"doctype": "DocField",
"label": "For Selling",
"fieldname": "selling",
"fieldtype": "Check"
"fieldtype": "Check",
"label": "For Selling"
},
{
"description": "Allow this price in purchase related forms",
"doctype": "DocField",
"label": "For Buying",
"fieldname": "buying",
"fieldtype": "Check"
"fieldtype": "Check",
"label": "For Buying"
}
]

View File

@ -1,51 +1,46 @@
[
{
"owner": "Administrator",
"creation": "2013-01-10 16:34:27",
"docstatus": 0,
"creation": "2012-03-27 14:36:33",
"modified": "2013-01-23 16:54:25",
"modified_by": "Administrator",
"modified": "2012-03-27 14:36:33"
"owner": "Administrator"
},
{
"section_style": "Tray",
"doctype": "DocType",
"istable": 1,
"name": "__common__",
"colour": "White:FFF",
"module": "Stock",
"show_in_menu": 0,
"server_code_error": " ",
"doctype": "DocType"
"name": "__common__"
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Item Tax",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"name": "Item Tax",
"doctype": "DocType"
"doctype": "DocType",
"name": "Item Tax"
},
{
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Tax",
"oldfieldname": "tax_type",
"trigger": "Client",
"fieldname": "tax_type",
"fieldtype": "Link",
"reqd": 1,
"options": "Account"
"label": "Tax",
"oldfieldname": "tax_type",
"oldfieldtype": "Link",
"options": "Account",
"reqd": 1
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"fieldname": "tax_rate",
"fieldtype": "Float",
"label": "Tax Rate",
"oldfieldname": "tax_rate",
"fieldname": "tax_rate",
"fieldtype": "Currency",
"oldfieldtype": "Currency",
"reqd": 0
}
]

View File

@ -1,60 +1,56 @@
[
{
"owner": "wasim@webnotestech.com",
"creation": "2013-01-10 16:34:27",
"docstatus": 0,
"creation": "2012-05-03 11:00:55",
"modified": "2013-01-23 16:55:26",
"modified_by": "Administrator",
"modified": "2012-05-04 13:02:26"
"owner": "wasim@webnotestech.com"
},
{
"section_style": "Simple",
"doctype": "DocType",
"istable": 1,
"name": "__common__",
"colour": "White:FFF",
"module": "Stock",
"show_in_menu": 0,
"version": 1,
"server_code_error": " ",
"doctype": "DocType"
"name": "__common__"
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Landed Cost Item",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"reqd": 1,
"permlevel": 0,
"parentfield": "fields"
"reqd": 1
},
{
"name": "Landed Cost Item",
"doctype": "DocType"
"doctype": "DocType",
"name": "Landed Cost Item"
},
{
"search_index": 1,
"doctype": "DocField",
"label": "Account Head",
"oldfieldname": "account_head",
"fieldname": "account_head",
"fieldtype": "Link",
"label": "Account Head",
"oldfieldname": "account_head",
"oldfieldtype": "Link",
"options": "Account"
"options": "Account",
"search_index": 1
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"fieldname": "description",
"fieldtype": "Data",
"label": "Description",
"oldfieldname": "description",
"width": "300px",
"fieldname": "description",
"fieldtype": "Data"
"oldfieldtype": "Data",
"width": "300px"
},
{
"oldfieldtype": "Currency",
"doctype": "DocField",
"fieldname": "amount",
"fieldtype": "Currency",
"label": "Amount",
"oldfieldname": "amount",
"fieldname": "amount",
"fieldtype": "Currency"
"oldfieldtype": "Currency",
"options": "currency"
}
]

Some files were not shown because too many files have changed in this diff Show More