Merge branch 'edge'

This commit is contained in:
Rushabh Mehta
2013-01-17 18:24:09 +05:30
23 changed files with 476 additions and 1702 deletions

View File

@@ -2,20 +2,20 @@
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-11-16 10:32:50",
"creation": "2013-01-17 12:30:10",
"modified_by": "Administrator",
"modified": "2012-12-03 11:26:49"
"modified": "2013-01-17 13:16:31"
},
{
"in_create": 1,
"allow_rename": 1,
"description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.",
"search_fields": "debit_or_credit, group_or_ledger",
"module": "Accounts",
"document_type": "Master",
"description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.",
"name": "__common__",
"allow_rename": 1,
"doctype": "DocType",
"allow_copy": 1
"allow_copy": 1,
"document_type": "Master",
"name": "__common__"
},
{
"name": "__common__",
@@ -28,8 +28,8 @@
"name": "__common__",
"parent": "Account",
"amend": 0,
"submit": 0,
"doctype": "DocPerm",
"submit": 0,
"read": 1,
"parenttype": "DocType",
"parentfield": "permissions"
@@ -139,32 +139,28 @@
"doctype": "DocField",
"label": "Parent Account",
"oldfieldname": "parent_account",
"trigger": "Client",
"options": "Account",
"fieldname": "parent_account",
"fieldtype": "Link",
"search_index": 1,
"options": "Account",
"permlevel": 0
},
{
"description": "Setting Account Type helps in selecting this Account in transactions.",
"oldfieldtype": "Select",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Account Type",
"oldfieldname": "account_type",
"permlevel": 0,
"trigger": "Client",
"options": "\nFixed Asset Account\nBank or Cash\nExpense Account\nTax\nIncome Account\nChargeable",
"fieldname": "account_type",
"fieldtype": "Select",
"search_index": 0,
"in_filter": 1,
"options": "\nFixed Asset Account\nBank or Cash\nExpense Account\nTax\nIncome Account\nChargeable"
"permlevel": 0,
"in_filter": 1
},
{
"description": "Rate at which this tax is applied",
"oldfieldtype": "Currency",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Rate",
"oldfieldname": "tax_rate",
@@ -177,7 +173,6 @@
{
"description": "If the account is frozen, entries are allowed for the \"Account Manager\" only.",
"oldfieldtype": "Select",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Frozen",
"oldfieldname": "freeze_account",
@@ -189,7 +184,6 @@
{
"print_hide": 1,
"oldfieldtype": "Int",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Credit Days",
"oldfieldname": "credit_days",
@@ -212,7 +206,6 @@
{
"description": "If this Account represents a Customer, Supplier or Employee, set it here.",
"oldfieldtype": "Select",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Master Type",
"oldfieldname": "master_type",
@@ -226,98 +219,127 @@
"doctype": "DocField",
"label": "Master Name",
"oldfieldname": "master_name",
"trigger": "Client",
"options": "[Select]",
"fieldname": "master_name",
"fieldtype": "Link",
"options": "[Select]",
"permlevel": 0
},
{
"read_only": 1,
"print_hide": 1,
"doctype": "DocField",
"label": "Lft",
"fieldname": "lft",
"fieldtype": "Int",
"hidden": 1,
"permlevel": 0
},
{
"read_only": 1,
"print_hide": 1,
"doctype": "DocField",
"label": "Rgt",
"fieldname": "rgt",
"fieldtype": "Int",
"hidden": 1,
"permlevel": 0
},
{
"read_only": 1,
"print_hide": 1,
"doctype": "DocField",
"label": "Old Parent",
"fieldname": "old_parent",
"fieldtype": "Data",
"hidden": 1,
"permlevel": 0
},
{
"create": 0,
"doctype": "DocPerm",
"write": 1,
"cancel": 0,
"role": "Auditor",
"cancel": 0,
"permlevel": 0
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"cancel": 0,
"role": "Auditor",
"cancel": 0,
"permlevel": 2
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"cancel": 0,
"role": "Auditor",
"cancel": 0,
"permlevel": 1
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"cancel": 0,
"role": "Sales User",
"cancel": 0,
"permlevel": 0
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"cancel": 0,
"role": "Purchase User",
"cancel": 0,
"permlevel": 0
},
{
"create": 0,
"doctype": "DocPerm",
"write": 1,
"cancel": 0,
"role": "Accounts User",
"cancel": 0,
"permlevel": 0
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"cancel": 1,
"role": "Accounts Manager",
"cancel": 1,
"permlevel": 0
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"cancel": 0,
"role": "Accounts User",
"cancel": 0,
"permlevel": 1
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"cancel": 0,
"role": "Accounts Manager",
"cancel": 0,
"permlevel": 1
},
{
"create": 0,
"doctype": "DocPerm",
"write": 1,
"cancel": 0,
"role": "Accounts Manager",
"cancel": 0,
"permlevel": 2
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"cancel": 0,
"role": "Accounts User",
"cancel": 0,
"permlevel": 2
}
]

View File

@@ -218,7 +218,7 @@ class DocType:
and (t2.against_invoice is null or t2.against_invoice = '')
and (t2.against_jv is null or t2.against_jv = '')
and t2.account = '%s' and t2.is_advance = 'Yes' and t1.docstatus = 1
order by t1.voucher_date """ % (dr_or_cr,account_head))
order by t1.posting_date""" % (dr_or_cr,account_head))
# clear advance table
obj.doclist = obj.doc.clear_table(obj.doclist,table_field_name)
# Create advance table

View File

@@ -15,8 +15,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if (!doc.voucher_date) doc.voucher_date = dateutil.obj_to_str(new Date());
cur_frm.cscript.load_defaults(doc, cdt, cdn);
}

View File

@@ -2,14 +2,14 @@
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-12-03 17:26:38",
"creation": "2013-01-17 12:30:11",
"modified_by": "Administrator",
"modified": "2012-12-04 18:47:42"
"modified": "2013-01-17 14:27:43"
},
{
"is_submittable": 1,
"autoname": "naming_series:",
"name": "__common__",
"is_submittable": 1,
"search_fields": "voucher_type,posting_date, due_date, cheque_no",
"module": "Accounts",
"doctype": "DocType",
@@ -47,7 +47,6 @@
"description": "To manage multiple series please go to Setup > Manage Series",
"no_copy": 1,
"oldfieldtype": "Select",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Series",
"oldfieldname": "naming_series",
@@ -103,8 +102,8 @@
},
{
"print_hide": 0,
"allow_on_submit": 1,
"oldfieldtype": "Table",
"allow_on_submit": 1,
"doctype": "DocField",
"label": "Entries",
"oldfieldname": "entries",
@@ -163,7 +162,6 @@
"oldfieldtype": "Button",
"doctype": "DocField",
"label": "Make Difference Entry",
"trigger": "Client",
"fieldname": "get_balance",
"fieldtype": "Button",
"permlevel": 0
@@ -179,15 +177,14 @@
"description": "eg. Cheque Number",
"no_copy": 1,
"oldfieldtype": "Data",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Reference Number",
"oldfieldname": "cheque_no",
"fieldname": "cheque_no",
"fieldtype": "Data",
"search_index": 1,
"in_filter": 1,
"permlevel": 0
"permlevel": 0,
"in_filter": 1
},
{
"no_copy": 1,
@@ -291,12 +288,10 @@
"print_hide": 1,
"default": "No",
"oldfieldtype": "Select",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Is Opening",
"oldfieldname": "is_opening",
"permlevel": 0,
"trigger": "Client",
"fieldname": "is_opening",
"fieldtype": "Select",
"search_index": 1,
@@ -308,7 +303,6 @@
"description": "For opening invoice entry, this date will reflect in the period-wise aging report.",
"no_copy": 0,
"oldfieldtype": "Date",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Aging Date",
"oldfieldname": "aging_date",
@@ -320,7 +314,6 @@
"print_hide": 1,
"default": "Accounts Receivable",
"depends_on": "eval:doc.voucher_type == 'Write Off Voucher'",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Write Off Based On",
"options": "Accounts Receivable\nAccounts Payable",
@@ -332,7 +325,6 @@
{
"print_hide": 1,
"depends_on": "eval:doc.voucher_type == 'Write Off Voucher'",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Write Off Amount <=",
"fieldname": "write_off_amount",
@@ -343,30 +335,11 @@
{
"print_hide": 1,
"depends_on": "eval:doc.voucher_type == 'Write Off Voucher'",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Get Outstanding Invoices",
"trigger": "Server",
"options": "get_outstanding_invoices",
"fieldname": "get_outstanding_invoices",
"fieldtype": "Button",
"options": "get_outstanding_invoices",
"permlevel": 0
},
{
"print_hide": 0,
"description": "Date of entry (not posting to ledgers)",
"default": "Today",
"oldfieldtype": "Date",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Voucher Date",
"oldfieldname": "voucher_date",
"no_copy": 1,
"fieldname": "voucher_date",
"fieldtype": "Date",
"search_index": 1,
"reqd": 1,
"in_filter": 1,
"permlevel": 0
},
{
@@ -442,13 +415,11 @@
"print_hide": 1,
"no_copy": 1,
"oldfieldtype": "Link",
"colour": "White:FFF",
"allow_on_submit": 1,
"doctype": "DocField",
"label": "Select Print Heading",
"oldfieldname": "select_print_heading",
"permlevel": 0,
"trigger": "Client",
"fieldname": "select_print_heading",
"fieldtype": "Link",
"options": "Print Heading",
@@ -493,16 +464,14 @@
"print_hide": 1,
"no_copy": 1,
"oldfieldtype": "Link",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Supplier Account",
"oldfieldname": "supplier_account",
"permlevel": 0,
"trigger": "Client",
"options": "Account",
"fieldname": "supplier_account",
"fieldtype": "Link",
"hidden": 0,
"options": "Account"
"permlevel": 0
},
{
"amend": 1,
@@ -510,8 +479,8 @@
"doctype": "DocPerm",
"submit": 1,
"write": 1,
"cancel": 1,
"role": "Accounts User",
"cancel": 1,
"permlevel": 0
},
{
@@ -520,8 +489,8 @@
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"cancel": 0,
"role": "Accounts User",
"cancel": 0,
"permlevel": 1
},
{
@@ -530,8 +499,8 @@
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"cancel": 0,
"role": "Accounts Manager",
"cancel": 0,
"permlevel": 1
},
{
@@ -540,8 +509,8 @@
"doctype": "DocPerm",
"submit": 1,
"write": 1,
"cancel": 1,
"role": "Accounts Manager",
"cancel": 1,
"permlevel": 0
},
{
@@ -550,8 +519,8 @@
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"cancel": 0,
"role": "Auditor",
"cancel": 0,
"permlevel": 0
},
{
@@ -560,8 +529,8 @@
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"cancel": 0,
"role": "Auditor",
"cancel": 0,
"permlevel": 1
}
]

View File

@@ -21,7 +21,6 @@ wn.require('app/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxe
wn.require('app/buying/doctype/purchase_common/purchase_common.js');
cur_frm.cscript.onload = function(doc,dt,dn) {
if(!doc.voucher_date) set_multiple(dt,dn,{voucher_date:get_today()});
if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()});
}

View File

@@ -31,7 +31,6 @@ wn.require('app/utilities/doctype/sms_control/sms_control.js');
cur_frm.cscript.onload = function(doc,dt,dn) {
if(!doc.customer && doc.debit_to) wn.meta.get_docfield(dt, 'debit_to', dn).print_hide = 0;
if (doc.__islocal) {
//if(!doc.voucher_date) set_multiple(dt,dn,{voucher_date:get_today()});
if(!doc.due_date) set_multiple(dt,dn,{due_date:get_today()});
if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()});
if(!doc.currency && sys_defaults.currency) set_multiple(dt,dn,{currency:sys_defaults.currency});

View File

@@ -45,7 +45,7 @@ report.get_query = function() {
date_fld = 'transaction_date';
if(based_on == 'Sales Invoice') {
based_on = 'Sales Invoice';
date_fld = 'voucher_date';
date_fld = 'posting_date';
}
sp_cond = '';