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

This commit is contained in:
Anand Doshi 2011-06-28 13:11:45 +05:30
commit 3766a5598d
40 changed files with 2657 additions and 1405 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*.pyc
*.comp.js
.DS_Store

View File

@ -1,6 +1,6 @@
[
{
'_last_update': None,
'_last_update': '1308811650',
'allow_attach': None,
'allow_copy': 1,
'allow_email': None,
@ -29,7 +29,7 @@
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2011-03-18 14:30:09',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'module': 'Accounts',
'name': 'Account',
@ -50,8 +50,10 @@
'server_code_error': ' ',
'show_in_menu': 0,
'smallicon': None,
'subject': None,
'tag_fields': None,
'use_template': None,
'version': 145
'version': 133
},
{
'amend': None,
@ -63,7 +65,7 @@
'execute': None,
'idx': 1,
'match': None,
'modified': '2010-08-08 17:08:51',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'PERM00042',
'owner': 'Administrator',
@ -86,7 +88,7 @@
'execute': None,
'idx': 2,
'match': None,
'modified': '2010-08-08 17:08:51',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'PERM00043',
'owner': 'Administrator',
@ -109,7 +111,7 @@
'execute': None,
'idx': 3,
'match': None,
'modified': '2010-08-08 17:08:51',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'PERM00044',
'owner': 'Administrator',
@ -132,7 +134,7 @@
'execute': None,
'idx': 4,
'match': None,
'modified': '2010-08-08 17:08:51',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'PERM00045',
'owner': 'Administrator',
@ -155,7 +157,7 @@
'execute': None,
'idx': 5,
'match': None,
'modified': '2010-08-08 17:08:51',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'PERM00046',
'owner': 'Administrator',
@ -178,7 +180,7 @@
'execute': None,
'idx': 6,
'match': None,
'modified': '2010-08-08 17:08:51',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'PERM00047',
'owner': 'Administrator',
@ -201,7 +203,7 @@
'execute': None,
'idx': 7,
'match': None,
'modified': '2010-08-08 17:08:51',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'PERM00048',
'owner': 'Administrator',
@ -224,7 +226,7 @@
'execute': None,
'idx': 8,
'match': None,
'modified': '2010-08-08 17:08:51',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'PERM00049',
'owner': 'Administrator',
@ -240,7 +242,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-09 10:50:47',
'creation': '2011-03-21 11:13:07',
'default': None,
'depends_on': None,
'description': None,
@ -253,9 +255,10 @@
'idx': 1,
'in_filter': None,
'label': 'Properties',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': '000000166',
'name': '000013925',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Section Break',
@ -275,7 +278,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-09 10:50:47',
'creation': '2011-03-21 11:13:07',
'default': None,
'depends_on': None,
'description': None,
@ -288,9 +291,10 @@
'idx': 2,
'in_filter': None,
'label': None,
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': '000000167',
'name': '000013926',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
@ -323,9 +327,10 @@
'idx': 3,
'in_filter': 1,
'label': 'Account Name',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00433',
'no_column': None,
'no_copy': 1,
'oldfieldname': 'account_name',
'oldfieldtype': 'Data',
@ -358,9 +363,10 @@
'idx': 4,
'in_filter': None,
'label': 'Parent Account',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00434',
'no_column': None,
'no_copy': None,
'oldfieldname': 'parent_account',
'oldfieldtype': 'Link',
@ -391,11 +397,12 @@
'hidden': 1,
'icon': None,
'idx': 5,
'in_filter': 0,
'in_filter': None,
'label': 'Level',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00435',
'no_column': None,
'no_copy': None,
'oldfieldname': 'level',
'oldfieldtype': 'Int',
@ -408,7 +415,7 @@
'print_hide': 1,
'report_hide': None,
'reqd': None,
'search_index': 0,
'search_index': None,
'trigger': None,
'width': None
},
@ -428,9 +435,10 @@
'idx': 6,
'in_filter': 1,
'label': 'Group or Ledger',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00436',
'no_column': None,
'no_copy': None,
'oldfieldname': 'group_or_ledger',
'oldfieldtype': 'Select',
@ -450,7 +458,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-09 10:50:47',
'creation': '2011-03-21 11:13:07',
'default': None,
'depends_on': None,
'description': None,
@ -463,9 +471,10 @@
'idx': 7,
'in_filter': None,
'label': 'Convert to Group',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': '000000163',
'name': '000013923',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
@ -485,7 +494,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-09 10:50:47',
'creation': '2011-03-21 11:13:07',
'default': None,
'depends_on': None,
'description': None,
@ -498,9 +507,10 @@
'idx': 8,
'in_filter': None,
'label': 'Convert to Ledger',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': '000000164',
'name': '000013924',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
@ -533,9 +543,10 @@
'idx': 9,
'in_filter': 1,
'label': 'Debit or Credit',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00441',
'no_column': None,
'no_copy': None,
'oldfieldname': 'debit_or_credit',
'oldfieldtype': 'Data',
@ -568,9 +579,10 @@
'idx': 10,
'in_filter': 1,
'label': 'Is PL Account',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00437',
'no_column': None,
'no_copy': None,
'oldfieldname': 'is_pl_account',
'oldfieldtype': 'Select',
@ -603,9 +615,10 @@
'idx': 11,
'in_filter': 1,
'label': 'Account Type',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00439',
'no_column': None,
'no_copy': None,
'oldfieldname': 'account_type',
'oldfieldtype': 'Select',
@ -638,9 +651,10 @@
'idx': 12,
'in_filter': None,
'label': 'Rate',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00440',
'no_column': None,
'no_copy': None,
'oldfieldname': 'tax_rate',
'oldfieldtype': 'Currency',
@ -660,7 +674,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-09 10:50:47',
'creation': '2011-03-21 11:13:07',
'default': None,
'depends_on': None,
'description': None,
@ -673,9 +687,10 @@
'idx': 13,
'in_filter': None,
'label': None,
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': '000000168',
'name': '000013927',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
@ -708,9 +723,10 @@
'idx': 14,
'in_filter': None,
'label': 'Freeze Account',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00438',
'no_column': None,
'no_copy': None,
'oldfieldname': 'freeze_account',
'oldfieldtype': 'Select',
@ -743,9 +759,10 @@
'idx': 15,
'in_filter': 1,
'label': 'Company',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00442',
'no_column': None,
'no_copy': None,
'oldfieldname': 'company',
'oldfieldtype': 'Link',
@ -778,9 +795,10 @@
'idx': 16,
'in_filter': None,
'label': 'Credit Days',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00443',
'no_column': None,
'no_copy': None,
'oldfieldname': 'credit_days',
'oldfieldtype': 'Int',
@ -813,9 +831,10 @@
'idx': 17,
'in_filter': None,
'label': 'Credit Limit',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00444',
'no_column': None,
'no_copy': None,
'oldfieldname': 'credit_limit',
'oldfieldtype': 'Currency',
@ -848,9 +867,10 @@
'idx': 18,
'in_filter': None,
'label': 'Master Type',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00453',
'no_column': None,
'no_copy': None,
'oldfieldname': 'master_type',
'oldfieldtype': 'Select',
@ -883,9 +903,10 @@
'idx': 19,
'in_filter': None,
'label': 'Master Name',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00454',
'no_column': None,
'no_copy': None,
'oldfieldname': 'master_name',
'oldfieldtype': 'Link',
@ -905,42 +926,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:51',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'address',
'fieldtype': 'Small Text',
'hidden': None,
'icon': None,
'idx': 20,
'in_filter': None,
'label': 'Address',
'modified': '2011-05-09 10:50:47',
'modified_by': 'Administrator',
'name': 'FL00455',
'no_copy': None,
'oldfieldname': 'address',
'oldfieldtype': 'Small Text',
'options': None,
'owner': 'Administrator',
'parent': 'Account',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-09 10:50:47',
'creation': '2011-03-21 11:13:07',
'default': None,
'depends_on': None,
'description': None,
@ -950,12 +936,13 @@
'fieldtype': 'Section Break',
'hidden': None,
'icon': None,
'idx': 21,
'idx': 20,
'in_filter': None,
'label': 'TDS',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': '000000169',
'name': '000013928',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Section Break',
@ -985,12 +972,13 @@
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 22,
'idx': 21,
'in_filter': None,
'label': 'PAN Number',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00451',
'no_column': None,
'no_copy': None,
'oldfieldname': 'pan_number',
'oldfieldtype': 'Data',
@ -1020,12 +1008,13 @@
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 23,
'idx': 22,
'in_filter': None,
'label': 'TDS Applicable',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00452',
'no_column': None,
'no_copy': None,
'oldfieldname': 'tds_applicable',
'oldfieldtype': 'Select',
@ -1055,12 +1044,13 @@
'fieldtype': 'Table',
'hidden': None,
'icon': None,
'idx': 24,
'idx': 23,
'in_filter': None,
'label': 'TDS Details',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00456',
'no_column': None,
'no_copy': None,
'oldfieldname': 'tds_details',
'oldfieldtype': 'Table',
@ -1077,76 +1067,6 @@
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-09 10:50:47',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'Section Break',
'hidden': None,
'icon': None,
'idx': 25,
'in_filter': None,
'label': 'Balances',
'modified': '2011-05-09 10:50:47',
'modified_by': 'Administrator',
'name': '000000170',
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Section Break',
'options': None,
'owner': 'Administrator',
'parent': 'Account',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2010-08-08 17:08:51',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'account_balances',
'fieldtype': 'Table',
'hidden': None,
'icon': None,
'idx': 26,
'in_filter': None,
'label': 'Account Balances',
'modified': '2011-05-09 10:50:47',
'modified_by': 'Administrator',
'name': 'FL00446',
'no_copy': None,
'oldfieldname': 'account_balances',
'oldfieldtype': 'Table',
'options': 'Account Balance',
'owner': 'Administrator',
'parent': 'Account',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 1,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
@ -1160,12 +1080,13 @@
'fieldtype': 'Data',
'hidden': 1,
'icon': None,
'idx': 27,
'idx': 24,
'in_filter': None,
'label': 'Old Parent',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00447',
'no_column': None,
'no_copy': 1,
'oldfieldname': 'old_parent',
'oldfieldtype': 'Data',
@ -1195,12 +1116,13 @@
'fieldtype': 'Int',
'hidden': 1,
'icon': None,
'idx': 28,
'idx': 25,
'in_filter': 1,
'label': 'Lft',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00448',
'no_column': None,
'no_copy': 1,
'oldfieldname': 'lft',
'oldfieldtype': 'Int',
@ -1230,12 +1152,13 @@
'fieldtype': 'Int',
'hidden': 1,
'icon': None,
'idx': 29,
'idx': 26,
'in_filter': 1,
'label': 'Rgt',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00449',
'no_column': None,
'no_copy': 1,
'oldfieldname': 'rgt',
'oldfieldtype': 'Int',
@ -1265,12 +1188,13 @@
'fieldtype': 'Small Text',
'hidden': None,
'icon': None,
'idx': 30,
'idx': 27,
'in_filter': None,
'label': 'Trash Reason',
'modified': '2011-05-09 10:50:47',
'modified': '2011-06-23 12:36:56',
'modified_by': 'Administrator',
'name': 'FL00457',
'no_column': None,
'no_copy': None,
'oldfieldname': 'trash_reason',
'oldfieldtype': 'Small Text',

View File

@ -22,6 +22,9 @@ class DocType:
self.doc, self.doclist = d,dl
def repost(self):
if not self.doc.company:
msgprint("Please select company", raise_exception=1)
if not in_transaction:
sql("start transaction")
@ -100,9 +103,7 @@ class DocType:
def post_entries(self):
sql("LOCK TABLE `tabGL Entry` WRITE")
# post each gl entry (batch or complete)
gle = sql("select name, account, debit, credit, is_opening, posting_date from `tabGL Entry` where fiscal_year=%s and ifnull(is_cancelled,'No')='No' and company=%s
", (self.doc.name, self.doc.company))
gle = sql("select name, account, debit, credit, is_opening, posting_date from `tabGL Entry` where fiscal_year=%s and ifnull(is_cancelled,'No')='No' and company=%s", (self.doc.name, self.doc.company))
account_details = {}
cnt = 0

View File

@ -1,7 +1,10 @@
report.customize_filters = function() {
this.hide_all_filters();
this.add_filter({fieldname:'show_group_balance', label:'Show Group Balance', fieldtype:'Select', options:'Yes'+NEWLINE+'No',ignore : 1, parent:'Account', 'report_default':'No','in_first_page':1});
this.add_filter({fieldname:'show_group_ledger', label:'Show Group/Ledger', fieldtype:'Select', options:'Only Groups'+NEWLINE+'Only Ledgers'+NEWLINE+'Both But Without Group Balance'+NEWLINE+'Both With Balance',ignore : 1, parent:'Account', 'report_default':'Both With Balance','in_first_page':1,single_select:1});
this.add_filter({fieldname:'show_zero_balance', label:'Show Zero Balance', fieldtype:'Select', options:'Yes'+NEWLINE+'No',ignore : 1, parent:'Account', 'report_default':'Yes','in_first_page':1,single_select:1});
this.add_filter({fieldname:'transaction_date', label:'Date', fieldtype:'Date', options:'',ignore : 1, parent:'Account', 'in_first_page':1});
this.filter_fields_dict['Account'+FILTER_SEP +'Company'].df.filter_hide = 0;
@ -22,10 +25,21 @@ report.customize_filters = function() {
report.aftertableprint = function(t) {
$yt(t,'*',1,{whiteSpace:'pre'});
}
if(window.location.href.search('/v170/') != -1) {
this.mytabs.items['More Filters'].hide();
this.mytabs.items['Select Columns'].hide();
} else {
$dh(this.mytabs.tabs['More Filters']);
$dh(this.mytabs.tabs['Select Columns']);
report.get_query = function() {
var g_or_l = this.get_filter('Account', 'Show Group/Ledger').get_value();
var comp = this.get_filter('Account', 'Company').get_value();
if (g_or_l == 'Only Ledgers') {
var q = "SELECT name FROM tabAccount WHERE group_or_ledger = 'Ledger' and company = '" + comp + "' and docstatus != 2 ORDER BY lft";
} else if (g_or_l == 'Only Groups') {
var q = "SELECT CONCAT( REPEAT(' ', COUNT(parent.name) - 1), node.name) AS name FROM tabAccount AS node,tabAccount AS parent WHERE (node.lft BETWEEN parent.lft AND parent.rgt) and node.group_or_ledger = 'Group' and node.company = '" + comp + "' and node.docstatus != 2 GROUP BY node.name ORDER BY node.lft";
} else {
var q = "SELECT CONCAT( REPEAT(' ', COUNT(parent.name) - 1), node.name) AS name FROM tabAccount AS node,tabAccount AS parent WHERE node.lft BETWEEN parent.lft AND parent.rgt and node.company = '" + comp + "' and node.docstatus != 2 GROUP BY node.name ORDER BY node.lft";
}
return q;
}

View File

@ -1,4 +1,3 @@
# Columns
#----------
cl = [['Account','Data', '200px'],['Debit/Credit', 'Data', '100px'], ['Group/Ledger', 'Data', '100px'], ['Is PL Account', 'Data', '100px'], ['Opening','Data', '100px'],['Debit', 'Data', '100px'],['Credit', 'Data', '100px'],['Closing', 'Data', '100px']]
@ -42,7 +41,7 @@ total_debit, total_credit = 0,0
glc = get_obj('GL Control')
# Main logic
# ----------------
# ----------
for r in res:
# Fetch account details
acc = r[col_idx['Account']].strip()
@ -51,8 +50,8 @@ for r in res:
r.append(acc_det[0][4])
r.append(acc_det[0][1])
# if group, check user input
if acc_det[0][4] == 'Group' and filter_values.get('show_group_balance') == 'No':
#if shows group and ledger both but without group balance
if filter_values.get('show_group_ledger') == 'Both But Without Group Balance' and acc_det[0][4] == 'Group':
for i in range(4):
r.append('')
continue
@ -70,7 +69,7 @@ for r in res:
if from_date_year == to_date_year:
debit = flt(debit_on_todate) - flt(debit_on_fromdate)
credit = flt(credit_on_todate) - flt(credit_on_fromdate)
else: # may be wrong
else: # if from date is start date of the year
debit = flt(debit_on_todate)
credit = flt(credit_on_todate)
@ -89,20 +88,18 @@ for r in res:
r.append(flt(closing))
# Remove accounts if closing bal = debit = credit = 0
# -----------------------------------------------------
out =[]
for r in res:
if r[col_idx['Opening']] or r[col_idx['Debit']] or r[col_idx['Credit']] or r[col_idx['Closing']]:
# Remove accounts if opening bal = debit = credit = closing bal = 0
# ------------------------------------------------------------------
if filter_values.get('show_zero_balance') != 'No':
out.append(r)
if r[col_idx['Group/Ledger']] == 'Group' and filter_values.get('show_group_balance') == 'No':
elif r[col_idx['Opening']] or r[col_idx['Debit']] or r[col_idx['Credit']] or r[col_idx['Closing']] or (r[col_idx['Group/Ledger']] == 'Group' and filter_values.get('show_group_ledger') == 'Both But Without Group Balance'):
out.append(r)
# Total Debit / Credit
# --------------------------
if filter_values.get('show_group_balance') == 'No':
if filter_values.get('show_group_ledger') in ['Only Ledgers', 'Both But Without Group Balance']:
t_row = ['' for i in range(len(colnames))]
t_row[col_idx['Account']] = 'Total'
t_row[col_idx['Debit']] = total_debit

View File

@ -1 +0,0 @@
SELECT CONCAT( REPEAT(' ', COUNT(parent.name) - 1), node.name) AS name FROM tabAccount AS node,tabAccount AS parent WHERE node.lft BETWEEN parent.lft AND parent.rgt and node.company = '%(company)s' and node.docstatus != 2 GROUP BY node.name ORDER BY node.lft

View File

@ -1,24 +1,24 @@
[
{
'add_col': None,
'add_cond': '',
'add_cond': None,
'add_tab': None,
'columns': 'Account\x01ID',
'creation': '2010-12-14 10:33:08',
'creation': '2010-12-14 10:23:28',
'criteria_name': 'Trial Balance',
'custom_query': None,
'custom_query': '',
'description': 'Trial Balance',
'dis_filters': 'transaction_date',
'disabled': None,
'doc_type': 'Account',
'docstatus': 0,
'doctype': 'Search Criteria',
'filters': "{'Account\x01Group or Ledger':'Ledger','Account\x01Is PL Account':'','Account\x01Account Type':'','Account\x01Show Group Balance':''}",
'filters': "{'Account\x01Is PL Account':'','Account\x01Account Type':''}",
'graph_series': None,
'graph_values': None,
'group_by': None,
'idx': None,
'modified': '2010-11-25 12:25:28',
'modified': '2011-06-22 12:29:43',
'modified_by': 'Administrator',
'module': 'Accounts',
'name': 'trial_balance',

View File

@ -43,14 +43,15 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
}
}
if(doc.enquiry_from == 'Lead' && doc.lead) {
cur_frm.cscript.lead(doc,cdt,cdn);
}
// setup fetch
cur_frm.cscript.set_fetch();
}
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
if(doc.enquiry_from == 'Lead' && doc.lead) {
cur_frm.cscript.lead(doc,cdt,cdn);
}
}
// fetch
// ===============================================================

View File

@ -22,11 +22,6 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(!doc.company && sys_defaults.company) set_multiple(cdt,cdn,{company:sys_defaults.company});
if(!doc.fiscal_year && sys_defaults.fiscal_year) set_multiple(cdt,cdn,{fiscal_year:sys_defaults.fiscal_year});
// load default charges
if(doc.__islocal && !getchildren('RV Tax Detail', doc.name, 'other_charges', doc.doctype).length) cur_frm.cscript.load_taxes(doc, cdt, cdn);
if(doc.__islocal==1){ cur_frm.cscript.price_list_name(doc, cdt, cdn);}
if(doc.quotation_to) {
if(doc.quotation_to == 'Customer') {
hide_field(['lead', 'lead_name']);
@ -37,6 +32,12 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
}
}
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
// load default charges
if(doc.__islocal && !getchildren('RV Tax Detail', doc.name, 'other_charges', doc.doctype).length)
cur_frm.cscript.load_taxes(doc, cdt, cdn);
}
// hide - unhide fields based on lead or customer..
// =======================================================================================================================
cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){

View File

@ -27,6 +27,8 @@ $.extend(cur_frm.cscript, {
]
})
}
if(!doc.customer) hide_field(['customer_name','address_display','contact_display','contact_mobile','contact_email']);
},
refresh: function(doc) {
@ -76,6 +78,15 @@ $.extend(cur_frm.cscript, {
refresh_field('new_response');
cs.make_listing(doc);
});
},
customer: function(doc, dt, dn) {
var callback = function(r,rt) {
var doc = locals[cur_frm.doctype][cur_frm.docname];
cur_frm.refresh();
}
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback);
if(doc.customer) unhide_field(['customer_name','address_display','contact_display','contact_mobile','contact_email']);
}
})

View File

@ -1,6 +1,8 @@
import webnotes
class DocType:
from utilities.transaction_base import TransactionBase
class DocType(TransactionBase):
def __init__(self, doc, doclist=[]):
self.doc = doc
self.doclist = doclist

View File

@ -1,6 +1,6 @@
[
{
'_last_update': '1306413048',
'_last_update': '1308914721',
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
@ -13,7 +13,7 @@
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'description': None,
'docstatus': 0,
'doctype': 'DocType',
@ -29,7 +29,7 @@
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'module': 'Maintenance',
'name': 'Support Ticket',
@ -51,23 +51,23 @@
'show_in_menu': 0,
'smallicon': None,
'subject': '%(subject)s',
'tag_fields': 'status',
'tag_fields': 'status,allocated_to',
'use_template': None,
'version': 138
'version': 143
},
{
'amend': 0,
'cancel': 0,
'create': 1,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 1,
'match': None,
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'PERM00838',
'name': 'PERM00823',
'owner': 'Administrator',
'parent': 'Support Ticket',
'parentfield': 'permissions',
@ -82,15 +82,15 @@
'amend': None,
'cancel': None,
'create': 1,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 2,
'match': 'customer',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'PERM00839',
'name': 'PERM00824',
'owner': 'Administrator',
'parent': 'Support Ticket',
'parentfield': 'permissions',
@ -105,15 +105,15 @@
'amend': None,
'cancel': 1,
'create': 1,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 3,
'match': None,
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'PERM00840',
'name': 'PERM00825',
'owner': 'Administrator',
'parent': 'Support Ticket',
'parentfield': 'permissions',
@ -128,15 +128,15 @@
'amend': None,
'cancel': 0,
'create': 0,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 4,
'match': 'allocated_to',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'PERM00841',
'name': 'PERM00826',
'owner': 'Administrator',
'parent': 'Support Ticket',
'parentfield': 'permissions',
@ -151,15 +151,15 @@
'amend': None,
'cancel': None,
'create': None,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 5,
'match': None,
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'PERM00842',
'name': 'PERM00827',
'owner': 'Administrator',
'parent': 'Support Ticket',
'parentfield': 'permissions',
@ -173,7 +173,7 @@
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'default': 'Open',
'depends_on': None,
'description': None,
@ -186,9 +186,9 @@
'idx': 1,
'in_filter': 0,
'label': 'Status',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05022',
'name': 'FL04803',
'no_column': None,
'no_copy': 1,
'oldfieldname': 'status',
@ -209,7 +209,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'default': None,
'depends_on': None,
'description': None,
@ -222,9 +222,9 @@
'idx': 2,
'in_filter': 1,
'label': 'Subject',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05023',
'name': 'FL04804',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -245,7 +245,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'default': None,
'depends_on': 'eval:doc.__islocal',
'description': None,
@ -258,9 +258,9 @@
'idx': 3,
'in_filter': 1,
'label': 'Raised By (Email)',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05024',
'name': 'FL04805',
'no_column': None,
'no_copy': None,
'oldfieldname': 'raised_by',
@ -281,7 +281,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'default': None,
'depends_on': 'eval:doc.__islocal',
'description': None,
@ -294,9 +294,9 @@
'idx': 4,
'in_filter': None,
'label': 'Description',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05025',
'name': 'FL04806',
'no_column': None,
'no_copy': None,
'oldfieldname': 'problem_description',
@ -317,7 +317,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-28 10:12:57',
'creation': '2011-05-27 13:07:26',
'default': None,
'depends_on': None,
'description': None,
@ -330,9 +330,9 @@
'idx': 5,
'in_filter': None,
'label': 'Problem Description',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05475',
'name': 'FL05248',
'no_column': None,
'no_copy': None,
'oldfieldname': 'problem_description',
@ -353,7 +353,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-28 10:26:08',
'creation': '2011-06-24 11:54:03',
'default': None,
'depends_on': 'eval:!doc.__islocal',
'description': None,
@ -366,9 +366,9 @@
'idx': 6,
'in_filter': None,
'label': 'Thread HTML',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05530',
'name': 'FL05356',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -389,7 +389,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'default': None,
'depends_on': 'eval:!doc.__islocal',
'description': None,
@ -402,9 +402,9 @@
'idx': 7,
'in_filter': None,
'label': 'New Response',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05027',
'name': 'FL04808',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -425,7 +425,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'default': None,
'depends_on': 'eval:!doc.__islocal',
'description': None,
@ -438,9 +438,9 @@
'idx': 8,
'in_filter': None,
'label': 'Send',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05028',
'name': 'FL04809',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -461,7 +461,7 @@
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-05-28 10:26:09',
'creation': '2011-06-24 11:54:03',
'default': None,
'depends_on': None,
'description': None,
@ -474,9 +474,9 @@
'idx': 9,
'in_filter': None,
'label': 'Additional Info',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05531',
'name': 'FL05357',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -497,7 +497,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-28 10:26:09',
'creation': '2011-06-24 11:54:03',
'default': None,
'depends_on': 'eval:!doc.__islocal',
'description': None,
@ -510,9 +510,9 @@
'idx': 10,
'in_filter': None,
'label': None,
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05532',
'name': 'FL05358',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -533,7 +533,7 @@
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'default': None,
'depends_on': None,
'description': None,
@ -546,9 +546,9 @@
'idx': 11,
'in_filter': 1,
'label': 'Customer',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05031',
'name': 'FL04812',
'no_column': None,
'no_copy': None,
'oldfieldname': 'customer',
@ -569,7 +569,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'default': None,
'depends_on': None,
'description': None,
@ -582,9 +582,9 @@
'idx': 12,
'in_filter': 1,
'label': 'Customer Name',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05032',
'name': 'FL04813',
'no_column': None,
'no_copy': None,
'oldfieldname': 'customer_name',
@ -594,7 +594,7 @@
'parent': 'Support Ticket',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 1,
'permlevel': 2,
'print_hide': None,
'report_hide': None,
'reqd': 0,
@ -605,32 +605,32 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-23 14:50:46',
'creation': '2011-06-24 12:20:56',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'contact_no',
'fieldtype': 'Data',
'fieldname': 'address_display',
'fieldtype': 'Small Text',
'hidden': None,
'icon': None,
'idx': 13,
'in_filter': None,
'label': 'Contact No',
'modified': '2011-06-20 13:46:30',
'label': 'Address',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05033',
'name': 'FL05399',
'no_column': None,
'no_copy': None,
'oldfieldname': 'contact_no',
'oldfieldtype': 'Data',
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Support Ticket',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 1,
'permlevel': 2,
'print_hide': None,
'report_hide': None,
'reqd': None,
@ -641,7 +641,115 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-23 14:50:46',
'creation': '2011-06-24 12:20:56',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'contact_display',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 14,
'in_filter': None,
'label': 'Contact Name',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05401',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Support Ticket',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 2,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-06-24 12:20:56',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'contact_mobile',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 15,
'in_filter': None,
'label': 'Mobile No',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05400',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Support Ticket',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 2,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-23 10:18:58',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'contact_email',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 16,
'in_filter': None,
'label': 'Contact Email',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL04814',
'no_column': None,
'no_copy': None,
'oldfieldname': 'contact_no',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Support Ticket',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 2,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-23 10:18:58',
'default': 'Today',
'depends_on': None,
'description': None,
@ -651,12 +759,12 @@
'fieldtype': 'Date',
'hidden': None,
'icon': None,
'idx': 14,
'idx': 17,
'in_filter': None,
'label': 'Opening Date',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05034',
'name': 'FL04815',
'no_column': None,
'no_copy': 1,
'oldfieldname': 'opening_date',
@ -677,7 +785,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'default': None,
'depends_on': None,
'description': None,
@ -687,12 +795,12 @@
'fieldtype': 'Time',
'hidden': None,
'icon': None,
'idx': 15,
'idx': 18,
'in_filter': None,
'label': 'Opening Time',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05035',
'name': 'FL04816',
'no_column': None,
'no_copy': 1,
'oldfieldname': 'opening_time',
@ -713,7 +821,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-28 10:26:09',
'creation': '2011-06-24 11:54:03',
'default': None,
'depends_on': 'eval:!doc.__islocal',
'description': None,
@ -723,12 +831,12 @@
'fieldtype': 'Column Break',
'hidden': None,
'icon': None,
'idx': 16,
'idx': 19,
'in_filter': None,
'label': None,
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05533',
'name': 'FL05359',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -749,7 +857,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'default': None,
'depends_on': 'eval:!doc.__islocal',
'description': None,
@ -759,12 +867,12 @@
'fieldtype': 'Link',
'hidden': None,
'icon': None,
'idx': 17,
'idx': 20,
'in_filter': 1,
'label': 'Allocated To',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05037',
'name': 'FL04818',
'no_column': None,
'no_copy': None,
'oldfieldname': 'allocated_to',
@ -785,7 +893,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'default': None,
'depends_on': 'eval:!doc.__islocal',
'description': None,
@ -795,12 +903,12 @@
'fieldtype': 'Text',
'hidden': None,
'icon': None,
'idx': 18,
'idx': 21,
'in_filter': None,
'label': 'Resolution Details',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05038',
'name': 'FL04819',
'no_column': None,
'no_copy': 1,
'oldfieldname': 'resolution_details',
@ -821,7 +929,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'default': None,
'depends_on': 'eval:!doc.__islocal',
'description': None,
@ -831,12 +939,12 @@
'fieldtype': 'Date',
'hidden': None,
'icon': None,
'idx': 19,
'idx': 22,
'in_filter': 0,
'label': 'Resolution Date',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05039',
'name': 'FL04820',
'no_column': None,
'no_copy': 1,
'oldfieldname': 'resolution_date',
@ -857,7 +965,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-05-23 14:50:46',
'creation': '2011-05-23 10:18:58',
'default': None,
'depends_on': 'eval:!doc.__islocal',
'description': None,
@ -867,12 +975,12 @@
'fieldtype': 'Time',
'hidden': None,
'icon': None,
'idx': 20,
'idx': 23,
'in_filter': None,
'label': 'Resolution Time',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05040',
'name': 'FL04821',
'no_column': None,
'no_copy': None,
'oldfieldname': 'resolution_time',
@ -893,7 +1001,7 @@
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-05-28 10:12:58',
'creation': '2011-05-27 13:07:26',
'default': None,
'depends_on': None,
'description': None,
@ -903,12 +1011,12 @@
'fieldtype': 'Data',
'hidden': 1,
'icon': None,
'idx': 21,
'idx': 24,
'in_filter': None,
'label': 'Content Type',
'modified': '2011-06-20 13:46:30',
'modified': '2011-06-27 11:30:33',
'modified_by': 'Administrator',
'name': 'FL05478',
'name': 'FL05251',
'no_column': None,
'no_copy': None,
'oldfieldname': None,

Binary file not shown.

View File

@ -260,17 +260,6 @@ class DocType:
sql("update `tabBin` set valuation_rate=%s, actual_qty=%s, stock_value = %s where name=%s", \
(flt(val_rate), cqty, flt(stock_val), self.doc.name))
# item re-order
# -------------
def reorder_item(self):
projected_qty = flt(self.doc.actual_qty) + flt(self.doc.indented_qty) + flt(self.doc.ordered_qty)
item_reorder_level = sql("select reorder_level from `%sItem` where name = '%s'" % (self.prefix, self.doc.item_code))[0][0] or 0
if flt(item_reorder_level) > flt(projected_qty):
msgprint("Item: " + self.doc.item_code + " is to be re-ordered. Indent raised (Not Implemented).")
# validate
def validate(self):
self.validate_mandatory()
# item re-order
# -------------

View File

@ -14,10 +14,6 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
if (!doc.transaction_date) doc.transaction_date = dateutil.obj_to_str(new Date());
if (!doc.status) doc.status = 'Draft';
if(doc.__islocal){
cur_frm.cscript.get_default_schedule_date(doc);
}
if(doc.__islocal){
hide_field(['supplier_name','supplier_address','contact_person','address_display','contact_display','contact_mobile','contact_email']);
}
@ -26,6 +22,12 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
}
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
if(doc.__islocal){
cur_frm.cscript.get_default_schedule_date(doc);
}
}
//========================== Refresh ===============================================================
cur_frm.cscript.refresh = function(doc, cdt, cdn) {

View File

@ -235,3 +235,10 @@ class DocType:
sle_obj.validate()
sle.save(new = 1)
return sle.name
def repost(self):
"""
Repost everything!
"""
for wh in sql("select name from tabWarehouse"):
get_obj('Warehouse', wh[0]).repost_stock()

View File

@ -34,13 +34,13 @@ def get_values(msgprint, flt, posting_date, item_code = '', warehouse = ''):
if item_code and not warehouse:
war_list = sql("select distinct warehouse from `tabStock Ledger Entry` where item_code = %s", item_code)
for d in war_list:
act = sql("select bin_aqat, stock_value from `tabStock Ledger Entry` where item_code = %s and warehouse = %s and posting_date <= %s Order by posting_date DESC, posting_time DESC, name DESC LIMIT 1", (item_code, d[0], posting_date))
act = sql("select bin_aqat, stock_value from `tabStock Ledger Entry` where item_code = %s and warehouse = %s and ifnull(is_cancelled, 'No') = 'No' and timestamp(posting_date, posting_time) <= timestamp(%s, %s) Order by timestamp(posting_date, posting_time) DESC, name DESC LIMIT 1", (item_code, d[0], posting_date, '23:55'))
cl_bal += act and flt(act[0][0]) or 0.00
stock_val += act and flt(act[0][1]) or 0.00
elif warehouse and not item_code:
item_list = sql("select distinct item_code from `tabStock Ledger Entry` where warehouse = %s", warehouse)
for d in item_list:
act = sql("select bin_aqat, stock_value from `tabStock Ledger Entry` where item_code = %s and warehouse = %s and posting_date <= %s Order by posting_date DESC, posting_time DESC, name DESC LIMIT 1", (d[0], warehouse, posting_date))
act = sql("select bin_aqat, stock_value from `tabStock Ledger Entry` where item_code = %s and warehouse = %s and ifnull(is_cancelled, 'No') = 'No' and timestamp(posting_date, posting_time) <= timestamp(%s, %s) Order by timestamp(posting_date, posting_time) DESC, name DESC LIMIT 1", (d[0], warehouse, posting_date, '23:55'))
cl_bal += act and flt(act[0][0]) or 0.00
stock_val += act and flt(act[0][1]) or 0.00
return cl_bal, stock_val
@ -55,7 +55,8 @@ for r in res:
r.append(closing_balance)
r.append(stock_value)
else:
det = sql("select bin_aqat, stock_value from `tabStock Ledger Entry` where item_code = %s and warehouse = %s and posting_date <= %s Order by posting_date DESC, posting_time DESC, name DESC LIMIT 1", (r[col_idx['Item Code']], r[col_idx['Warehouse']], posting_date))
det = sql("select bin_aqat, stock_value from `tabStock Ledger Entry` where item_code = %s and warehouse = %s and ifnull(is_cancelled, 'No') = 'No' and timestamp(posting_date, posting_time) <= timestamp(%s, %s) Order by timestamp(posting_date, posting_time) DESC, name DESC LIMIT 1", (r[col_idx['Item Code']], r[col_idx['Warehouse']], posting_date, '23:55'))
r.append(det and flt(det[0][0]) or 0.00)
r.append(det and flt(det[0][1]) or 0.00)
cl_bal += flt(r[col_idx['Closing Balance']])

View File

@ -1,6 +1,6 @@
# REMEMBER to update this
# ========================
last_patch = 290
last_patch = 299
#-------------------------------------------
@ -1160,3 +1160,35 @@ def execute(patch_no):
md.module_name = 'Home'
md.module_label = 'Home'
md.save(1)
elif patch_no == 291:
reload_doc('tools','doctype','rename_tool')
elif patch_no == 292:
reload_doc('accounts', 'search_criteria', 'trial_balance')
elif patch_no == 293:
sql("delete from tabDocField where parent='Account' and fieldname='address'")
reload_doc('accounts', 'doctype', 'account')
elif patch_no == 294:
# new account profile fix
ul = sql("select name from tabProfile where ifnull(name,'') not in ('Administrator', 'Guest', '')")
# if one user and one user has no roles
if len(ul)==1 and not sql("select parent from tabUserRole where role='System Manager' and parent=%s", ul[0][0]):
get_obj('Setup Control').add_roles(Document('Profile', ul[0][0]))
elif patch_no == 295:
sql("update `tabDocField` set options = 'Delivered\nNot Delivered\nPartly Delivered\nClosed\nNot Applicable' where parent = 'Sales Order' and fieldname = 'delivery_status'")
sql("update `tabDocField` set options = 'Billed\nNot Billed\nPartly Billed\nClosed' where parent = 'Sales Order' and fieldname = 'billing_status'")
elif patch_no == 296:
sql("delete from tabDocField where parent='Support Ticket' and fieldname='contact_no'")
reload_doc('maintenance', 'doctype', 'support_ticket')
elif patch_no == 297:
reload_doc('payroll', 'doctype', 'employee')
reload_doc('payroll', 'doctype', 'attendance')
reload_doc('payroll', 'doctype', 'expense_voucher')
reload_doc('payroll', 'doctype', 'appraisal')
reload_doc('payroll', 'doctype', 'salary_structure')
reload_doc('payroll', 'doctype', 'salary_slip')
elif patch_no == 298:
sql("update `tabDocField` set options = 'Link:Company' where parent = 'Attendance' and fieldname = 'company'")
sql("update `tabDocField` set options = 'Link:Company' where parent = 'Expense Voucher' and fieldname = 'company'")
sql("update `tabDocField` set options = 'Link:Company' where parent = 'Appraisal' and fieldname = 'company'")
elif patch_no == 299:
sql("update `tabDocPerm` set `match` = NULL where parent = 'Employee' and role = 'Employee'")

View File

@ -1,3 +1,5 @@
cur_frm.add_fetch('employee', 'company', 'company');
cur_frm.cscript.onload = function(doc,cdt,cdn){
if(!doc.status) set_multiple(dt,dn,{status:'Draft'});
if(doc.employee) cur_frm.cscript.employee(doc,cdt,cdn);

View File

@ -1,6 +1,6 @@
[
{
'_last_update': None,
'_last_update': '1308808105',
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
@ -29,17 +29,17 @@
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2010-09-20 14:06:57',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'module': 'Payroll',
'name': 'Appraisal',
'name_case': '',
'name_case': None,
'owner': 'ashwini@webnotestech.com',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': '',
'print_outline': None,
'read_only': None,
'read_only_onload': None,
'search_fields': 'status, employee, employee_name',
@ -48,12 +48,12 @@
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': None,
'show_in_menu': 0,
'smallicon': None,
'subject': '',
'tag_fields': '',
'subject': None,
'tag_fields': None,
'use_template': None,
'version': 159
'version': 160
},
{
'amend': 1,
@ -65,7 +65,7 @@
'execute': None,
'idx': 1,
'match': None,
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'PERM00658',
'owner': 'ashwini@webnotestech.com',
@ -74,7 +74,7 @@
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'Administrator',
'role': 'System Manager',
'submit': 1,
'write': 1
},
@ -88,7 +88,7 @@
'execute': None,
'idx': 2,
'match': None,
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'PERM00659',
'owner': 'ashwini@webnotestech.com',
@ -97,7 +97,7 @@
'parenttype': 'DocType',
'permlevel': 1,
'read': 1,
'role': 'Administrator',
'role': 'System Manager',
'submit': None,
'write': None
},
@ -111,7 +111,7 @@
'execute': None,
'idx': 3,
'match': None,
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'PERM00660',
'owner': 'ashwini@webnotestech.com',
@ -134,7 +134,7 @@
'execute': None,
'idx': 4,
'match': None,
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'PERM00661',
'owner': 'ashwini@webnotestech.com',
@ -157,7 +157,7 @@
'execute': None,
'idx': 5,
'match': None,
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'PERM00662',
'owner': 'ashwini@webnotestech.com',
@ -180,7 +180,7 @@
'execute': None,
'idx': 6,
'match': None,
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'PERM00663',
'owner': 'ashwini@webnotestech.com',
@ -203,7 +203,7 @@
'execute': None,
'idx': 7,
'match': None,
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'PERM00664',
'owner': 'ashwini@webnotestech.com',
@ -226,7 +226,7 @@
'execute': None,
'idx': 8,
'match': None,
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'PERM00665',
'owner': 'ashwini@webnotestech.com',
@ -255,7 +255,7 @@
'idx': 1,
'in_filter': None,
'label': 'Employee Details',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'FL03790',
'no_column': None,
@ -291,7 +291,7 @@
'idx': 2,
'in_filter': 1,
'label': 'Status',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'FL03791',
'no_column': None,
@ -308,7 +308,7 @@
'report_hide': None,
'reqd': 1,
'search_index': 1,
'trigger': '',
'trigger': None,
'width': None
},
{
@ -327,7 +327,7 @@
'idx': 3,
'in_filter': 1,
'label': 'Employee',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'FL03792',
'no_column': None,
@ -363,7 +363,7 @@
'idx': 4,
'in_filter': 1,
'label': 'Employee Name',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'FL03793',
'no_column': None,
@ -399,7 +399,7 @@
'idx': 5,
'in_filter': 1,
'label': 'Fiscal Year',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'FL03794',
'no_column': None,
@ -429,20 +429,20 @@
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'company',
'fieldtype': 'Link',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 6,
'in_filter': 1,
'label': 'Company',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'FL03795',
'no_column': None,
'no_copy': None,
'oldfieldname': 'company',
'oldfieldtype': 'Link',
'options': 'Company',
'options': 'Link:Company',
'owner': 'ashwini@webnotestech.com',
'parent': 'Appraisal',
'parentfield': 'fields',
@ -470,8 +470,8 @@
'icon': None,
'idx': 7,
'in_filter': None,
'label': '',
'modified': '2010-09-01 15:47:54',
'label': None,
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'FL03796',
'no_column': None,
@ -507,7 +507,7 @@
'idx': 8,
'in_filter': 1,
'label': 'Start Date',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'FL03797',
'no_column': None,
@ -543,7 +543,7 @@
'idx': 9,
'in_filter': 1,
'label': 'End Date',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'FL03798',
'no_column': None,
@ -579,14 +579,14 @@
'idx': 10,
'in_filter': 0,
'label': 'Approver',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'FL03799',
'no_column': None,
'no_copy': None,
'oldfieldname': 'kra_approver',
'oldfieldtype': 'Select',
'options': '',
'options': None,
'owner': 'ashwini@webnotestech.com',
'parent': 'Appraisal',
'parentfield': 'fields',
@ -615,7 +615,7 @@
'idx': 11,
'in_filter': None,
'label': 'Amended From',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'FL03800',
'no_column': None,
@ -651,7 +651,7 @@
'idx': 12,
'in_filter': None,
'label': 'Amendment Date',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'FL03801',
'no_column': None,
@ -687,14 +687,14 @@
'idx': 13,
'in_filter': None,
'label': 'Declare Completed',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'FL03802',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Button',
'options': '',
'options': None,
'owner': 'ashwini@webnotestech.com',
'parent': 'Appraisal',
'parentfield': 'fields',
@ -722,8 +722,8 @@
'icon': None,
'idx': 14,
'in_filter': None,
'label': '',
'modified': '2010-09-01 15:47:54',
'label': None,
'modified': '2011-06-24 18:47:36',
'modified_by': 'Administrator',
'name': 'FL03803',
'no_column': None,
@ -759,7 +759,7 @@
'idx': 15,
'in_filter': None,
'label': 'KRA Template',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:37',
'modified_by': 'Administrator',
'name': 'FL03804',
'no_column': None,
@ -776,7 +776,7 @@
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': '',
'trigger': None,
'width': None
},
{
@ -795,7 +795,7 @@
'idx': 16,
'in_filter': None,
'label': 'Fetch Template',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:37',
'modified_by': 'Administrator',
'name': 'FL03805',
'no_column': None,
@ -831,14 +831,14 @@
'idx': 17,
'in_filter': None,
'label': 'Update',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:37',
'modified_by': 'Administrator',
'name': 'FL03806',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Button',
'options': '',
'options': None,
'owner': 'ashwini@webnotestech.com',
'parent': 'Appraisal',
'parentfield': 'fields',
@ -867,7 +867,7 @@
'idx': 18,
'in_filter': None,
'label': 'Appraisal Details',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:37',
'modified_by': 'Administrator',
'name': 'FL03807',
'no_column': None,
@ -884,7 +884,7 @@
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': '',
'trigger': None,
'width': None
},
{
@ -903,7 +903,7 @@
'idx': 19,
'in_filter': None,
'label': 'Calculate Total Score',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:37',
'modified_by': 'Administrator',
'name': 'FL03808',
'no_column': None,
@ -939,7 +939,7 @@
'idx': 20,
'in_filter': None,
'label': 'Total Score',
'modified': '2010-09-01 15:47:54',
'modified': '2011-06-24 18:47:37',
'modified_by': 'Administrator',
'name': 'FL03809',
'no_column': None,

View File

@ -1,3 +1,5 @@
cur_frm.add_fetch('employee', 'company', 'company');
//get employee's name based on employee id selected
cur_frm.cscript.employee = function(doc,cdt,cdn){
if(doc.employee) get_server_fields('get_emp_name', '', '', doc, cdt, cdn, 1);

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,7 @@
cur_frm.add_fetch('employee', 'company', 'company');
cur_frm.cscript.onload = function(doc,cdt,cdn){
cur_frm.cscript.get_tips(doc, cdt, cdn);
//cur_frm.cscript.get_tips(doc, cdt, cdn);
if(!doc.approval_status) set_multiple(cdt,cdn,{approval_status:'Draft'});
if(doc.employee) cur_frm.cscript.employee(doc,cdt,cdn);

View File

@ -1,6 +1,6 @@
[
{
'_last_update': None,
'_last_update': '1308808105',
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
@ -29,17 +29,17 @@
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2010-10-14 11:41:31',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'module': 'Payroll',
'name': 'Expense Voucher',
'name_case': '',
'name_case': None,
'owner': 'harshada@webnotestech.com',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': '',
'print_outline': None,
'read_only': None,
'read_only_onload': None,
'search_fields': 'approval_status,employee,employee_name',
@ -48,31 +48,31 @@
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': ' ',
'show_in_menu': None,
'show_in_menu': 0,
'smallicon': None,
'subject': 'From %(employee_name)s for %(total_claimed_amount)s (claimed)',
'tag_fields': 'approval_status',
'use_template': None,
'version': 133
'version': 134
},
{
'amend': 1,
'cancel': 1,
'create': 1,
'creation': '2011-03-05 17:16:47',
'creation': '2011-05-12 23:27:50',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': None,
'idx': 1,
'match': 'owner',
'modified': '2011-03-05 17:16:47',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'PERM00815',
'owner': 'Administrator',
'name': '000011972',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Expense Voucher',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': None,
'permlevel': 0,
'read': 1,
'role': 'Employee',
'submit': 1,
@ -82,20 +82,20 @@
'amend': 1,
'cancel': 1,
'create': 1,
'creation': '2011-03-05 17:16:47',
'creation': '2011-05-29 14:17:03',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': None,
'idx': 2,
'match': None,
'modified': '2011-03-05 17:16:47',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'PERM00816',
'owner': 'Administrator',
'name': 'PERM00841',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Expense Voucher',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': None,
'permlevel': 0,
'read': 1,
'role': 'HR Manager',
'submit': 1,
@ -105,47 +105,185 @@
'amend': 1,
'cancel': 1,
'create': 1,
'creation': '2011-03-05 17:16:47',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': None,
'match': None,
'modified': '2011-03-05 17:16:47',
'modified_by': 'Administrator',
'name': 'PERM00817',
'owner': 'Administrator',
'parent': 'Expense Voucher',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': None,
'read': 1,
'role': 'HR User',
'submit': 1,
'write': 1
},
{
'amend': None,
'cancel': None,
'create': None,
'creation': '2010-09-03 16:45:05',
'creation': '2011-05-29 14:17:03',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 3,
'match': '',
'modified': '2010-09-03 16:45:05',
'match': 'owner',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'PERM00677',
'owner': 'harshada@webnotestech.com',
'name': 'PERM00840',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Expense Voucher',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 1,
'permlevel': 0,
'read': 1,
'role': 'All',
'submit': None,
'write': None
'role': 'Employee',
'submit': 1,
'write': 1
},
{
'amend': 1,
'cancel': 1,
'create': 1,
'creation': '2011-05-29 14:16:33',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 4,
'match': None,
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'PERM00839',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Expense Voucher',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'System Manager',
'submit': 1,
'write': 1
},
{
'amend': 1,
'cancel': 0,
'create': 1,
'creation': '2011-02-27 18:38:25',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 5,
'match': None,
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'PERM00817',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Expense Voucher',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'HR User',
'submit': 0,
'write': 1
},
{
'amend': 1,
'cancel': 1,
'create': 1,
'creation': '2011-02-27 18:38:25',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 6,
'match': None,
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'PERM00816',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Expense Voucher',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'HR Manager',
'submit': 1,
'write': 1
},
{
'amend': 1,
'cancel': 1,
'create': 1,
'creation': '2011-02-27 18:38:25',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 7,
'match': 'owner',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'PERM00815',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Expense Voucher',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'Employee',
'submit': 1,
'write': 1
},
{
'amend': 1,
'cancel': 0,
'create': 1,
'creation': '2011-05-12 23:27:50',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 8,
'match': None,
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': '000011974',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Expense Voucher',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'HR User',
'submit': 0,
'write': 1
},
{
'amend': 1,
'cancel': 1,
'create': 1,
'creation': '2011-05-12 23:27:50',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 9,
'match': None,
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': '000011973',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Expense Voucher',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'HR Manager',
'submit': 1,
'write': 1
},
{
'amend': 1,
'cancel': 0,
'create': 1,
'creation': '2011-05-29 14:17:03',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 10,
'match': None,
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'PERM00842',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Expense Voucher',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'HR User',
'submit': 0,
'write': 1
},
{
'allow_on_submit': None,
@ -163,7 +301,7 @@
'idx': 1,
'in_filter': None,
'label': 'Details',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03870',
'no_column': None,
@ -199,7 +337,7 @@
'idx': 2,
'in_filter': 1,
'label': 'Approval Status',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03871',
'no_column': None,
@ -216,7 +354,7 @@
'report_hide': None,
'reqd': None,
'search_index': 1,
'trigger': '',
'trigger': None,
'width': None
},
{
@ -235,7 +373,7 @@
'idx': 3,
'in_filter': 1,
'label': 'From Employee',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03872',
'no_column': None,
@ -271,7 +409,7 @@
'idx': 4,
'in_filter': 1,
'label': 'Employee Name',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03873',
'no_column': None,
@ -307,7 +445,7 @@
'idx': 5,
'in_filter': 1,
'label': 'Fiscal Year',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03874',
'no_column': None,
@ -337,20 +475,20 @@
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'company',
'fieldtype': 'Link',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 6,
'in_filter': 1,
'label': 'Company',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03875',
'no_column': None,
'no_copy': None,
'oldfieldname': 'company',
'oldfieldtype': 'Link',
'options': 'Company',
'options': 'Link:Company',
'owner': 'ashwini@webnotestech.com',
'parent': 'Expense Voucher',
'parentfield': 'fields',
@ -378,8 +516,8 @@
'icon': None,
'idx': 7,
'in_filter': None,
'label': '',
'modified': '2010-09-03 16:45:05',
'label': None,
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03876',
'no_column': None,
@ -415,7 +553,7 @@
'idx': 8,
'in_filter': 1,
'label': 'Posting Date',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03877',
'no_column': None,
@ -451,14 +589,14 @@
'idx': 9,
'in_filter': None,
'label': 'Approver',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03878',
'no_column': None,
'no_copy': None,
'oldfieldname': 'exp_approver',
'oldfieldtype': 'Select',
'options': '',
'options': None,
'owner': 'harshada@webnotestech.com',
'parent': 'Expense Voucher',
'parentfield': 'fields',
@ -487,7 +625,7 @@
'idx': 10,
'in_filter': None,
'label': 'Remark',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03879',
'no_column': None,
@ -504,7 +642,7 @@
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': '',
'trigger': None,
'width': None
},
{
@ -523,7 +661,7 @@
'idx': 11,
'in_filter': None,
'label': 'Amended From',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03880',
'no_column': None,
@ -540,7 +678,7 @@
'report_hide': 1,
'reqd': None,
'search_index': None,
'trigger': '',
'trigger': None,
'width': '160px'
},
{
@ -559,7 +697,7 @@
'idx': 12,
'in_filter': None,
'label': 'Amendment Date',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03881',
'no_column': None,
@ -576,7 +714,7 @@
'report_hide': 1,
'reqd': None,
'search_index': None,
'trigger': '',
'trigger': None,
'width': '160px'
},
{
@ -595,7 +733,7 @@
'idx': 13,
'in_filter': None,
'label': 'Approve',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03882',
'no_column': None,
@ -631,7 +769,7 @@
'idx': 14,
'in_filter': None,
'label': 'Reject',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03883',
'no_column': None,
@ -667,7 +805,7 @@
'idx': 15,
'in_filter': None,
'label': 'Expense Details',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03884',
'no_column': None,
@ -703,7 +841,7 @@
'idx': 16,
'in_filter': None,
'label': 'Calculate Total Amount',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03885',
'no_column': None,
@ -739,7 +877,7 @@
'idx': 17,
'in_filter': 0,
'label': 'Total Claimed Amount',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03886',
'no_column': None,
@ -756,7 +894,7 @@
'report_hide': None,
'reqd': 0,
'search_index': None,
'trigger': '',
'trigger': None,
'width': '160px'
},
{
@ -775,7 +913,7 @@
'idx': 18,
'in_filter': 0,
'label': 'Total Sanctioned Amount',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03887',
'no_column': None,
@ -792,7 +930,7 @@
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': '',
'trigger': None,
'width': '160px'
},
{
@ -811,14 +949,14 @@
'idx': 19,
'in_filter': None,
'label': 'Update Voucher',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03888',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': 'Button',
'options': '',
'options': None,
'owner': 'harshada@webnotestech.com',
'parent': 'Expense Voucher',
'parentfield': 'fields',
@ -847,7 +985,7 @@
'idx': 20,
'in_filter': None,
'label': 'Expense Voucher Details',
'modified': '2010-09-03 16:45:05',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03889',
'no_column': None,
@ -864,7 +1002,7 @@
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': '',
'trigger': None,
'width': None
},
{
@ -883,7 +1021,7 @@
'idx': 21,
'in_filter': None,
'label': 'Employees Email Id',
'modified': '2010-10-15 14:56:33',
'modified': '2011-06-24 18:24:25',
'modified_by': 'Administrator',
'name': 'FL03982',
'no_column': None,

View File

@ -1,3 +1,5 @@
cur_frm.add_fetch('employee', 'company', 'company');
// On load
// -------------------------------------------------------------------
cur_frm.cscript.onload = function(doc,dt,dn){

View File

@ -1,6 +1,6 @@
[
{
'_last_update': '1303273503',
'_last_update': '1308808105',
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
@ -29,7 +29,7 @@
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2011-02-18 14:16:13',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'module': 'Payroll',
'name': 'Salary Slip',
@ -53,57 +53,57 @@
'subject': 'For %(employee_name)s, %(designation)s',
'tag_fields': None,
'use_template': None,
'version': 372
'version': 388
},
{
'amend': 0,
'cancel': 0,
'create': 0,
'creation': '2011-02-21 09:23:54',
'creation': '2011-02-17 13:25:56',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': None,
'idx': 1,
'match': 'owner',
'modified': '2011-02-21 09:23:54',
'modified_by': 'Administrator',
'name': 'PERM00797',
'owner': 'Administrator',
'parent': 'Salary Slip',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': None,
'read': 1,
'role': 'Employee',
'submit': 0,
'write': 0
},
{
'amend': 0,
'cancel': 0,
'create': 0,
'creation': '2011-02-21 09:23:54',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': None,
'match': 'owner',
'modified': '2011-02-21 09:23:54',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'PERM00798',
'owner': 'Administrator',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Salary Slip',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': None,
'permlevel': 0,
'read': 1,
'role': 'Employee',
'submit': 0,
'write': 0
},
{
'amend': 1,
'cancel': 1,
'create': 1,
'creation': '2011-05-31 10:10:38',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 2,
'match': None,
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'PERM00853',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Salary Slip',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'System Manager',
'submit': 1,
'write': 1
},
{
'amend': 0,
'cancel': None,
'cancel': 0,
'create': 1,
'creation': '2010-08-08 17:09:20',
'docstatus': 0,
@ -111,7 +111,7 @@
'execute': None,
'idx': 3,
'match': None,
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'PERM00455',
'owner': 'harshada@webnotestech.com',
@ -125,8 +125,8 @@
'write': 1
},
{
'amend': 1,
'cancel': 1,
'amend': 0,
'cancel': 0,
'create': 1,
'creation': '2010-08-08 17:09:20',
'docstatus': 0,
@ -134,7 +134,7 @@
'execute': None,
'idx': 4,
'match': None,
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'PERM00456',
'owner': 'harshada@webnotestech.com',
@ -148,16 +148,16 @@
'write': 1
},
{
'amend': None,
'cancel': None,
'create': None,
'amend': 0,
'cancel': 0,
'create': 0,
'creation': '2010-08-08 17:09:20',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 5,
'match': None,
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'PERM00457',
'owner': 'harshada@webnotestech.com',
@ -167,20 +167,20 @@
'permlevel': 1,
'read': 1,
'role': 'HR User',
'submit': None,
'write': None
'submit': 0,
'write': 0
},
{
'amend': None,
'cancel': None,
'create': None,
'amend': 0,
'cancel': 0,
'create': 0,
'creation': '2010-08-08 17:09:20',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 6,
'match': None,
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'PERM00458',
'owner': 'harshada@webnotestech.com',
@ -190,13 +190,13 @@
'permlevel': 1,
'read': 1,
'role': 'HR Manager',
'submit': None,
'write': None
'submit': 0,
'write': 0
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-21 09:23:57',
'creation': '2011-04-05 17:13:17',
'default': None,
'depends_on': None,
'description': None,
@ -209,9 +209,9 @@
'idx': 1,
'in_filter': None,
'label': 'Basic Info',
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL04663',
'name': '000002460',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -232,7 +232,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-21 09:23:57',
'creation': '2011-04-05 17:13:17',
'default': None,
'depends_on': None,
'description': None,
@ -245,9 +245,9 @@
'idx': 2,
'in_filter': None,
'label': None,
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL04664',
'name': '000002461',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -281,7 +281,7 @@
'idx': 3,
'in_filter': 1,
'label': 'Employee',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02891',
'no_column': None,
@ -298,8 +298,8 @@
'report_hide': None,
'reqd': 1,
'search_index': 0,
'trigger': '',
'width': ''
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
@ -317,7 +317,7 @@
'idx': 4,
'in_filter': 1,
'label': 'Employee Name',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02893',
'no_column': None,
@ -353,7 +353,7 @@
'idx': 5,
'in_filter': 1,
'label': 'Department',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02894',
'no_column': None,
@ -389,7 +389,7 @@
'idx': 6,
'in_filter': 1,
'label': 'Designation',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02895',
'no_column': None,
@ -425,7 +425,7 @@
'idx': 7,
'in_filter': 1,
'label': 'Branch',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02896',
'no_column': None,
@ -461,7 +461,7 @@
'idx': 8,
'in_filter': 1,
'label': 'Grade',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02897',
'no_column': None,
@ -497,7 +497,7 @@
'idx': 9,
'in_filter': None,
'label': 'PF No.',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02898',
'no_column': None,
@ -533,7 +533,7 @@
'idx': 10,
'in_filter': None,
'label': 'ESIC No.',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02899',
'no_column': None,
@ -556,7 +556,43 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-21 09:23:57',
'creation': '2011-04-19 11:19:04',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'letter_head',
'fieldtype': 'Link',
'hidden': None,
'icon': None,
'idx': 11,
'in_filter': None,
'label': 'Letter Head',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': '000003743',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': 'Letter Head',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Salary Slip',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-05 17:13:17',
'default': None,
'depends_on': None,
'description': None,
@ -566,12 +602,12 @@
'fieldtype': 'Column Break',
'hidden': None,
'icon': None,
'idx': 11,
'idx': 12,
'in_filter': None,
'label': None,
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL04665',
'name': '000002462',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -602,10 +638,10 @@
'fieldtype': 'Link',
'hidden': None,
'icon': None,
'idx': 12,
'idx': 13,
'in_filter': 1,
'label': 'Fiscal Year',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02884',
'no_column': None,
@ -622,8 +658,44 @@
'report_hide': None,
'reqd': 1,
'search_index': 1,
'trigger': '',
'width': ''
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-06-27 11:12:33',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'company',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 14,
'in_filter': 1,
'label': 'Company',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL05405',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': 'Link:Company',
'owner': 'Administrator',
'parent': 'Salary Slip',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
@ -638,10 +710,10 @@
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 13,
'idx': 15,
'in_filter': 1,
'label': 'Month',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02886',
'no_column': None,
@ -674,10 +746,10 @@
'fieldtype': 'Int',
'hidden': None,
'icon': None,
'idx': 14,
'idx': 16,
'in_filter': None,
'label': 'Total days in month',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02903',
'no_column': None,
@ -699,7 +771,7 @@
},
{
'allow_on_submit': None,
'colour': None,
'colour': 'White:FFF',
'creation': '2010-08-08 17:09:20',
'default': None,
'depends_on': None,
@ -710,10 +782,10 @@
'fieldtype': 'Currency',
'hidden': None,
'icon': None,
'idx': 15,
'idx': 17,
'in_filter': None,
'label': 'Leave Without Pay',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02904',
'no_column': None,
@ -746,10 +818,10 @@
'fieldtype': 'Float',
'hidden': None,
'icon': None,
'idx': 16,
'idx': 18,
'in_filter': None,
'label': 'Payment days',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02907',
'no_column': None,
@ -782,10 +854,10 @@
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 17,
'idx': 19,
'in_filter': None,
'label': 'Bank Name',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02905',
'no_column': None,
@ -818,10 +890,10 @@
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 18,
'idx': 20,
'in_filter': None,
'label': 'Bank Account No.',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02906',
'no_column': None,
@ -854,10 +926,10 @@
'fieldtype': 'Check',
'hidden': None,
'icon': None,
'idx': 19,
'idx': 21,
'in_filter': None,
'label': 'Email',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02908',
'no_column': None,
@ -874,7 +946,7 @@
'report_hide': 1,
'reqd': None,
'search_index': None,
'trigger': '',
'trigger': None,
'width': None
},
{
@ -890,10 +962,10 @@
'fieldtype': 'Data',
'hidden': 0,
'icon': None,
'idx': 20,
'idx': 22,
'in_filter': None,
'label': 'Amended From',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02901',
'no_column': None,
@ -926,10 +998,10 @@
'fieldtype': 'Date',
'hidden': 0,
'icon': None,
'idx': 21,
'idx': 23,
'in_filter': None,
'label': 'Amendment Date',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02902',
'no_column': None,
@ -952,7 +1024,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-21 09:23:57',
'creation': '2011-04-05 17:13:17',
'default': None,
'depends_on': None,
'description': None,
@ -962,12 +1034,12 @@
'fieldtype': 'Section Break',
'hidden': None,
'icon': None,
'idx': 22,
'idx': 24,
'in_filter': None,
'label': 'Earning & Deduction',
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL04666',
'name': '000002463',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -988,7 +1060,7 @@
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-02-21 09:23:57',
'creation': '2011-04-05 17:13:17',
'default': None,
'depends_on': None,
'description': None,
@ -998,12 +1070,12 @@
'fieldtype': 'Column Break',
'hidden': None,
'icon': None,
'idx': 23,
'idx': 25,
'in_filter': None,
'label': 'Earning',
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL04667',
'name': '000002464',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -1034,10 +1106,10 @@
'fieldtype': 'Table',
'hidden': None,
'icon': None,
'idx': 24,
'idx': 26,
'in_filter': None,
'label': 'Earning Details',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02914',
'no_column': None,
@ -1054,13 +1126,13 @@
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': '',
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-02-21 09:23:57',
'creation': '2011-04-05 17:13:17',
'default': None,
'depends_on': None,
'description': None,
@ -1070,12 +1142,12 @@
'fieldtype': 'Column Break',
'hidden': None,
'icon': None,
'idx': 25,
'idx': 27,
'in_filter': None,
'label': 'Deduction',
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL04668',
'name': '000002465',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -1106,10 +1178,10 @@
'fieldtype': 'Table',
'hidden': None,
'icon': None,
'idx': 26,
'idx': 28,
'in_filter': None,
'label': 'Deduction Details',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02917',
'no_column': None,
@ -1127,12 +1199,12 @@
'reqd': None,
'search_index': None,
'trigger': None,
'width': ''
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-21 09:23:57',
'creation': '2011-04-05 17:13:17',
'default': None,
'depends_on': None,
'description': None,
@ -1142,12 +1214,12 @@
'fieldtype': 'Section Break',
'hidden': None,
'icon': None,
'idx': 27,
'idx': 29,
'in_filter': None,
'label': 'Totals',
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL04669',
'name': '000002466',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -1168,7 +1240,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-21 09:23:57',
'creation': '2011-04-05 17:13:17',
'default': None,
'depends_on': None,
'description': None,
@ -1178,12 +1250,12 @@
'fieldtype': 'Column Break',
'hidden': None,
'icon': None,
'idx': 28,
'idx': 30,
'in_filter': None,
'label': None,
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL04670',
'name': '000002467',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -1214,10 +1286,10 @@
'fieldtype': 'Currency',
'hidden': None,
'icon': None,
'idx': 29,
'idx': 31,
'in_filter': None,
'label': 'Arrear Amount',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02909',
'no_column': None,
@ -1240,7 +1312,7 @@
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-02-21 09:23:54',
'creation': '2011-02-17 13:25:56',
'default': None,
'depends_on': None,
'description': None,
@ -1250,16 +1322,16 @@
'fieldtype': 'Currency',
'hidden': None,
'icon': None,
'idx': 30,
'idx': 32,
'in_filter': None,
'label': 'Leave Encashment Amount',
'modified': '2011-02-21 09:23:54',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL04572',
'name': 'FL04573',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'oldfieldname': 'encashment_amount',
'oldfieldtype': 'Currency',
'options': None,
'owner': 'harshada@webnotestech.com',
'parent': 'Salary Slip',
@ -1286,10 +1358,10 @@
'fieldtype': 'Currency',
'hidden': None,
'icon': None,
'idx': 31,
'idx': 33,
'in_filter': None,
'label': 'Gross Pay',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02920',
'no_column': None,
@ -1322,10 +1394,10 @@
'fieldtype': 'Currency',
'hidden': None,
'icon': None,
'idx': 32,
'idx': 34,
'in_filter': None,
'label': 'Total Deduction',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02922',
'no_column': None,
@ -1348,7 +1420,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-21 09:23:57',
'creation': '2011-04-05 17:13:17',
'default': None,
'depends_on': None,
'description': None,
@ -1358,12 +1430,12 @@
'fieldtype': 'Column Break',
'hidden': None,
'icon': None,
'idx': 33,
'idx': 35,
'in_filter': None,
'label': None,
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL04671',
'name': '000002468',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -1394,10 +1466,10 @@
'fieldtype': 'Currency',
'hidden': None,
'icon': None,
'idx': 34,
'idx': 36,
'in_filter': None,
'label': 'Net Pay',
'modified': '2010-08-08 17:09:20',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': 'FL02924',
'no_column': None,
@ -1414,7 +1486,79 @@
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': '',
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-05 17:13:17',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'rounded_total',
'fieldtype': 'Currency',
'hidden': None,
'icon': None,
'idx': 37,
'in_filter': None,
'label': 'Rounded Total',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': '000002458',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Salary Slip',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 1,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-04-05 17:13:17',
'default': None,
'depends_on': None,
'description': 'Net Pay (in words) will be visible once you save the Salary Slip.',
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'total_in_words',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 38,
'in_filter': None,
'label': 'Total in words',
'modified': '2011-06-27 11:12:33',
'modified_by': 'Administrator',
'name': '000002459',
'no_column': None,
'no_copy': None,
'oldfieldname': 'net_pay_in_words',
'oldfieldtype': 'Data',
'options': None,
'owner': 'Administrator',
'parent': 'Salary Slip',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 1,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

View File

@ -1,3 +1,5 @@
cur_frm.add_fetch('employee', 'company', 'company');
// On load
//=======================================================================
cur_frm.cscript.onload = function(doc, dt, dn){

View File

@ -1,6 +1,6 @@
[
{
'_last_update': None,
'_last_update': '1308808105',
'allow_attach': None,
'allow_copy': None,
'allow_email': None,
@ -29,7 +29,7 @@
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2011-02-18 14:17:16',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'module': 'Payroll',
'name': 'Salary Structure',
@ -51,90 +51,136 @@
'show_in_menu': 0,
'smallicon': None,
'subject': 'For %(employee_name)s',
'tag_fields': '',
'tag_fields': None,
'use_template': None,
'version': 585
'version': 586
},
{
'amend': 0,
'cancel': 1,
'create': 1,
'creation': '2011-04-26 17:22:35',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 1,
'match': None,
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': '000005552',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Salary Structure',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'System Manager',
'submit': 0,
'write': 1
},
{
'amend': 0,
'cancel': 0,
'create': 0,
'creation': '2011-02-21 09:23:54',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': None,
'match': 'owner',
'modified': '2011-02-21 09:23:54',
'modified_by': 'Administrator',
'name': 'PERM00795',
'owner': 'Administrator',
'parent': 'Salary Structure',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': None,
'read': 1,
'role': 'Employee',
'submit': 0,
'write': 0
},
{
'amend': 0,
'cancel': 0,
'create': 0,
'creation': '2011-02-21 09:23:54',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': None,
'match': 'owner',
'modified': '2011-02-21 09:23:54',
'modified_by': 'Administrator',
'name': 'PERM00796',
'owner': 'Administrator',
'parent': 'Salary Structure',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': None,
'read': 1,
'role': 'Employee',
'submit': 0,
'write': 0
},
{
'amend': None,
'cancel': None,
'create': None,
'creation': '2010-12-30 13:02:27',
'creation': '2011-04-26 17:22:57',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 2,
'match': None,
'modified': '2010-12-30 13:02:27',
'match': 'owner',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'PERM00785',
'owner': 'Administrator',
'name': '000005553',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Salary Structure',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 1,
'permlevel': 0,
'read': 1,
'role': 'All',
'submit': None,
'role': 'Employee',
'submit': 0,
'write': 0
},
{
'amend': None,
'cancel': None,
'amend': 0,
'cancel': 0,
'create': 0,
'creation': '2011-05-12 23:34:49',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 3,
'match': 'owner',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': '000011977',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Salary Structure',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'Employee',
'submit': 0,
'write': 0
},
{
'amend': 0,
'cancel': 0,
'create': 0,
'creation': '2011-02-17 13:25:56',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 4,
'match': 'owner',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'PERM00795',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Salary Structure',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'Employee',
'submit': 0,
'write': 0
},
{
'amend': 0,
'cancel': 0,
'create': 0,
'creation': '2011-02-17 13:25:56',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 5,
'match': 'owner',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'PERM00796',
'owner': 'sanjeeva@vencesystem.com',
'parent': 'Salary Structure',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'Employee',
'submit': 0,
'write': 0
},
{
'amend': 0,
'cancel': 0,
'create': 1,
'creation': '2010-12-30 13:02:27',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 3,
'idx': 6,
'match': None,
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'PERM00786',
'owner': 'harshada@webnotestech.com',
@ -144,20 +190,20 @@
'permlevel': 0,
'read': 1,
'role': 'HR User',
'submit': None,
'submit': 0,
'write': 1
},
{
'amend': None,
'cancel': None,
'amend': 0,
'cancel': 0,
'create': 1,
'creation': '2010-12-30 13:02:27',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 4,
'idx': 7,
'match': None,
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'PERM00787',
'owner': 'harshada@webnotestech.com',
@ -167,20 +213,20 @@
'permlevel': 0,
'read': 1,
'role': 'HR Manager',
'submit': None,
'submit': 0,
'write': 1
},
{
'amend': None,
'cancel': None,
'create': None,
'amend': 0,
'cancel': 0,
'create': 0,
'creation': '2010-12-30 13:02:27',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 5,
'idx': 8,
'match': None,
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'PERM00788',
'owner': 'harshada@webnotestech.com',
@ -190,20 +236,20 @@
'permlevel': 1,
'read': 1,
'role': 'HR Manager',
'submit': None,
'write': None
'submit': 0,
'write': 0
},
{
'amend': None,
'cancel': None,
'create': None,
'amend': 0,
'cancel': 0,
'create': 0,
'creation': '2010-12-30 13:02:27',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 6,
'idx': 9,
'match': None,
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'PERM00789',
'owner': 'harshada@webnotestech.com',
@ -213,13 +259,13 @@
'permlevel': 1,
'read': 1,
'role': 'HR User',
'submit': None,
'write': None
'submit': 0,
'write': 0
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-21 09:23:57',
'creation': '2011-02-18 22:32:31',
'default': None,
'depends_on': None,
'description': None,
@ -232,9 +278,9 @@
'idx': 1,
'in_filter': None,
'label': 'Basic Info',
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04654',
'name': 'FL04655',
'no_column': None,
'no_copy': None,
'oldfieldname': 'basic_info',
@ -255,7 +301,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-21 09:23:57',
'creation': '2011-02-18 22:32:31',
'default': None,
'depends_on': None,
'description': None,
@ -268,9 +314,9 @@
'idx': 2,
'in_filter': None,
'label': None,
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04655',
'name': 'FL04656',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -304,7 +350,7 @@
'idx': 3,
'in_filter': 1,
'label': 'Employee',
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04446',
'no_column': None,
@ -340,7 +386,7 @@
'idx': 4,
'in_filter': None,
'label': 'Employee Name',
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04447',
'no_column': None,
@ -376,7 +422,7 @@
'idx': 5,
'in_filter': 1,
'label': 'Branch',
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04448',
'no_column': None,
@ -393,7 +439,7 @@
'report_hide': None,
'reqd': 0,
'search_index': None,
'trigger': '',
'trigger': None,
'width': None
},
{
@ -412,7 +458,7 @@
'idx': 6,
'in_filter': 1,
'label': 'Designation',
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04449',
'no_column': None,
@ -429,7 +475,7 @@
'report_hide': None,
'reqd': 0,
'search_index': None,
'trigger': '',
'trigger': None,
'width': None
},
{
@ -448,7 +494,7 @@
'idx': 7,
'in_filter': 1,
'label': 'Department',
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04450',
'no_column': None,
@ -465,7 +511,7 @@
'report_hide': None,
'reqd': 0,
'search_index': None,
'trigger': '',
'trigger': None,
'width': None
},
{
@ -480,11 +526,11 @@
'fieldname': 'grade',
'fieldtype': 'Select',
'hidden': None,
'icon': '',
'icon': None,
'idx': 8,
'in_filter': 1,
'label': 'Grade',
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04451',
'no_column': None,
@ -501,13 +547,13 @@
'report_hide': None,
'reqd': 0,
'search_index': None,
'trigger': '',
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-21 09:23:57',
'creation': '2011-02-18 22:32:31',
'default': None,
'depends_on': None,
'description': None,
@ -520,9 +566,9 @@
'idx': 9,
'in_filter': None,
'label': None,
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04656',
'name': 'FL04657',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -556,7 +602,7 @@
'idx': 10,
'in_filter': 1,
'label': 'Is Active',
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04453',
'no_column': None,
@ -573,7 +619,7 @@
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': '',
'trigger': None,
'width': None
},
{
@ -592,7 +638,7 @@
'idx': 11,
'in_filter': None,
'label': 'From Date',
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04454',
'no_column': None,
@ -628,7 +674,7 @@
'idx': 12,
'in_filter': None,
'label': 'To Date',
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04455',
'no_column': None,
@ -664,7 +710,7 @@
'idx': 13,
'in_filter': 1,
'label': 'CTC',
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04456',
'no_column': None,
@ -681,13 +727,49 @@
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': '',
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-21 09:23:57',
'creation': '2011-06-27 11:09:01',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'company',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 14,
'in_filter': 1,
'label': 'Company',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL05404',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': 'Link:Company',
'owner': 'Administrator',
'parent': 'Salary Structure',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': 1,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-18 22:32:31',
'default': None,
'depends_on': None,
'description': 'You can create more earning and deduction type from Setup --> HR',
@ -697,12 +779,12 @@
'fieldtype': 'Section Break',
'hidden': None,
'icon': None,
'idx': 14,
'idx': 15,
'in_filter': None,
'label': 'Earning & Deduction',
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04657',
'name': 'FL04658',
'no_column': None,
'no_copy': None,
'oldfieldname': 'earning_deduction',
@ -723,7 +805,7 @@
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-02-21 09:23:57',
'creation': '2011-02-18 22:32:31',
'default': None,
'depends_on': None,
'description': None,
@ -733,12 +815,12 @@
'fieldtype': 'Column Break',
'hidden': 0,
'icon': None,
'idx': 15,
'idx': 16,
'in_filter': None,
'label': 'Earning',
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04658',
'name': 'FL04659',
'no_column': None,
'no_copy': None,
'oldfieldname': 'col_brk2',
@ -769,10 +851,10 @@
'fieldtype': 'Table',
'hidden': 0,
'icon': None,
'idx': 16,
'idx': 17,
'in_filter': None,
'label': 'Earning1',
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04459',
'no_column': None,
@ -789,13 +871,13 @@
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': '',
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': 'White:FFF',
'creation': '2011-02-21 09:23:57',
'creation': '2011-02-18 22:32:31',
'default': None,
'depends_on': None,
'description': None,
@ -805,12 +887,12 @@
'fieldtype': 'Column Break',
'hidden': 0,
'icon': None,
'idx': 17,
'idx': 18,
'in_filter': None,
'label': 'Deduction',
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04659',
'name': 'FL04660',
'no_column': None,
'no_copy': None,
'oldfieldname': 'col_brk3',
@ -841,10 +923,10 @@
'fieldtype': 'Table',
'hidden': 0,
'icon': None,
'idx': 18,
'idx': 19,
'in_filter': None,
'label': 'Deduction1',
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04462',
'no_column': None,
@ -861,13 +943,13 @@
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': '',
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-21 09:23:57',
'creation': '2011-02-18 22:32:31',
'default': None,
'depends_on': None,
'description': None,
@ -877,12 +959,12 @@
'fieldtype': 'Section Break',
'hidden': None,
'icon': None,
'idx': 19,
'idx': 20,
'in_filter': None,
'label': None,
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04660',
'name': 'FL04661',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -903,7 +985,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-21 09:23:57',
'creation': '2011-02-18 22:32:31',
'default': None,
'depends_on': None,
'description': None,
@ -913,12 +995,12 @@
'fieldtype': 'Column Break',
'hidden': None,
'icon': None,
'idx': 20,
'idx': 21,
'in_filter': None,
'label': None,
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04661',
'name': 'FL04662',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -949,10 +1031,10 @@
'fieldtype': 'Currency',
'hidden': None,
'icon': None,
'idx': 21,
'idx': 22,
'in_filter': None,
'label': 'Total Earning',
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04465',
'no_column': None,
@ -985,10 +1067,10 @@
'fieldtype': 'Currency',
'hidden': None,
'icon': None,
'idx': 22,
'idx': 23,
'in_filter': None,
'label': 'Total Deduction',
'modified': '2010-12-30 13:02:27',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04468',
'no_column': None,
@ -1011,7 +1093,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-21 09:23:57',
'creation': '2011-02-18 22:32:31',
'default': None,
'depends_on': None,
'description': None,
@ -1021,12 +1103,12 @@
'fieldtype': 'Column Break',
'hidden': None,
'icon': None,
'idx': 23,
'idx': 24,
'in_filter': None,
'label': None,
'modified': '2011-02-21 09:23:57',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04662',
'name': 'FL04663',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
@ -1047,7 +1129,7 @@
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-02-21 09:23:54',
'creation': '2011-02-17 13:25:56',
'default': None,
'depends_on': None,
'description': None,
@ -1057,10 +1139,10 @@
'fieldtype': 'Currency',
'hidden': None,
'icon': None,
'idx': 24,
'idx': 25,
'in_filter': None,
'label': 'Net Pay',
'modified': '2011-02-21 09:23:54',
'modified': '2011-06-27 11:09:01',
'modified_by': 'Administrator',
'name': 'FL04559',
'no_column': None,

View File

@ -6,6 +6,7 @@ from webnotes.model.doclist import getlist
from webnotes.model.code import get_obj
from webnotes import session, form, is_testing, msgprint, errprint
sql = webnotes.conn.sql
convert_to_lists = webnotes.conn.convert_to_lists
@ -36,7 +37,7 @@ class DocType:
def validate(self):
from webnotes.utils import flt
for d in getlist(self.doclist, 'target_details'):
if not flt(d.target_qty) and not flt(d.target_amount):
msgprint("Either target qty or target amount is mandatory.")

View File

@ -142,23 +142,27 @@ class DocType:
# Create Profile
# --------------
def create_profile(self, user_email, user_fname, user_lname):
roles_list = ['System Manager','Sales Manager','Sales User','Purchase Manager','Purchase User','Material Manager','Material User','Accounts Manager','Accounts User','HR Manager','HR User','Production Manager','Production User','Sales Master Manager','Purchase Master Manager','Material Master Manager','Quality Manager','Maintenance User','Maintenance Manager']
pr = Document('Profile')
pr.first_name = user_fname
pr.last_name = user_lname
pr.email = user_email
pr.enabled = 1
pr.save(1)
self.add_roles(pr)
def add_roles(self, pr):
roles_list = ['System Manager','Sales Manager','Sales User','Purchase Manager','Purchase User','Material Manager','Material User','Accounts Manager','Accounts User','HR Manager','HR User','Production Manager','Production User','Sales Master Manager','Purchase Master Manager','Material Master Manager','Quality Manager','Maintenance User','Maintenance Manager']
for r in roles_list:
d = addchild(pr, 'userroles', 'UserRole', 1)
d.role = r
d.save()
d.save(1)
# Add roles to Administrator profile
pr_obj = get_obj('Profile','Administrator')
for r in roles_list:
d = addchild(pr_obj.doc,'userroles', 'UserRole', 1)
d.role = r
d.save()
d.save(1)
# Update WN ERP Client Control
# -----------------------------

View File

@ -182,6 +182,7 @@ SetupData = function(cnty){
['Currency',1,'Currency','','Manage list of currencies'],
['Country',1,'Country','','Country master'],
['State',1,'State','','State master'],
['Rename Tool',3,'Rename Tool','','Rename a record'],
['Activty Type',1,'Activity Type','','Types of activities that you can select in your Timesheet'],
['City',1,'City','','City master']]};

View File

@ -9,6 +9,9 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
if (!doc.transaction_date) doc.transaction_date = dateutil.obj_to_str(new Date())
if (!doc.status) doc.status = 'Draft';
}
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
// second call
if(doc.__islocal){
cur_frm.cscript.get_item_defaults(doc);

View File

@ -17,11 +17,13 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(!doc.transaction_date) set_multiple(cdt,cdn,{transaction_date:get_today()});
if(doc.__islocal){
cur_frm.cscript.get_default_schedule_date(doc);
hide_field(['supplier_name','supplier_address','contact_person','address_display','contact_display','contact_mobile','contact_email']);
}
}
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
if(doc.__islocal){
hide_field(['supplier_name','supplier_address','contact_person','address_display','contact_display','contact_mobile','contact_email']);
cur_frm.cscript.get_default_schedule_date(doc);
}
}

View File

View File

@ -0,0 +1,5 @@
// over-ride the link query to return relevant link names
cur_frm.fields_dict.document_to_rename.get_query = function(doc, dt, dn) {
return "SELECT name FROM `tab"+doc.select_doctype+"` WHERE docstatus<2 AND name LIKE '%s' LIMIT 50";
}

View File

@ -0,0 +1,20 @@
class DocType:
def __init__(self, d, dl=[]):
self.doc, self.doclist = d, dl
def rename(self):
"""
Generate update quereies for rename
"""
import webnotes.model
from webnotes.model.code import get_obj
# call on_rename method if exists
obj = get_obj(self.doc.select_doctype, self.doc.document_to_rename)
if hasattr(obj, 'on_rename'):
obj.on_rename(self.doc.new_name)
# rename the document
webnotes.model.rename(self.doc.select_doctype, self.doc.document_to_rename, self.doc.new_name)
webnotes.msgprint("Item renamed successfully")

View File

@ -0,0 +1,225 @@
[
{
'_last_update': '1308739509',
'allow_attach': None,
'allow_copy': None,
'allow_email': 1,
'allow_print': 1,
'allow_rename': None,
'allow_trash': None,
'autoname': None,
'change_log': None,
'client_script': None,
'client_script_core': None,
'client_string': None,
'colour': 'White:FFF',
'creation': '2011-06-22 16:08:49',
'description': None,
'docstatus': 0,
'doctype': 'DocType',
'document_type': None,
'dt_template': None,
'hide_heading': 0,
'hide_toolbar': 0,
'idx': None,
'in_create': None,
'in_dialog': None,
'is_transaction_doc': None,
'issingle': 1,
'istable': None,
'max_attachments': None,
'menu_index': None,
'modified': '2011-06-22 16:24:18',
'modified_by': 'Administrator',
'module': 'Tools',
'name': 'Rename Tool',
'name_case': None,
'owner': 'Administrator',
'parent': None,
'parent_node': None,
'parentfield': None,
'parenttype': None,
'print_outline': None,
'read_only': None,
'read_only_onload': None,
'search_fields': None,
'section_style': 'Simple',
'server_code': None,
'server_code_compiled': None,
'server_code_core': None,
'server_code_error': None,
'show_in_menu': 0,
'smallicon': None,
'subject': None,
'tag_fields': None,
'use_template': None,
'version': 6
},
{
'amend': None,
'cancel': None,
'create': 1,
'creation': '2011-06-22 16:08:49',
'docstatus': 0,
'doctype': 'DocPerm',
'execute': None,
'idx': 1,
'match': None,
'modified': '2011-06-22 16:24:18',
'modified_by': 'Administrator',
'name': 'PERM00829',
'owner': 'Administrator',
'parent': 'Rename Tool',
'parentfield': 'permissions',
'parenttype': 'DocType',
'permlevel': 0,
'read': 1,
'role': 'System Manager',
'submit': None,
'write': 1
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-06-22 16:08:49',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'select_doctype',
'fieldtype': 'Select',
'hidden': None,
'icon': None,
'idx': 1,
'in_filter': None,
'label': 'Select DocType',
'modified': '2011-06-22 16:24:18',
'modified_by': 'Administrator',
'name': 'FL05282',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': 'link:DocType',
'owner': 'Administrator',
'parent': 'Rename Tool',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-06-22 16:08:49',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'document_to_rename',
'fieldtype': 'Link',
'hidden': None,
'icon': None,
'idx': 2,
'in_filter': None,
'label': 'Document to rename',
'modified': '2011-06-22 16:24:18',
'modified_by': 'Administrator',
'name': 'FL05283',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Rename Tool',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-06-22 16:08:49',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': 'new_name',
'fieldtype': 'Data',
'hidden': None,
'icon': None,
'idx': 3,
'in_filter': None,
'label': 'New Name',
'modified': '2011-06-22 16:24:18',
'modified_by': 'Administrator',
'name': 'FL05284',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': None,
'owner': 'Administrator',
'parent': 'Rename Tool',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
},
{
'allow_on_submit': None,
'colour': None,
'creation': '2011-06-22 16:08:49',
'default': None,
'depends_on': None,
'description': None,
'docstatus': 0,
'doctype': 'DocField',
'fieldname': None,
'fieldtype': 'Button',
'hidden': None,
'icon': None,
'idx': 4,
'in_filter': None,
'label': 'Rename',
'modified': '2011-06-22 16:24:18',
'modified_by': 'Administrator',
'name': 'FL05285',
'no_column': None,
'no_copy': None,
'oldfieldname': None,
'oldfieldtype': None,
'options': 'rename',
'owner': 'Administrator',
'parent': 'Rename Tool',
'parentfield': 'fields',
'parenttype': 'DocType',
'permlevel': 0,
'print_hide': None,
'report_hide': None,
'reqd': None,
'search_index': None,
'trigger': None,
'width': None
}
]

View File

@ -23,6 +23,8 @@ class DocType:
self.doclist = doclist
self.msg = []
# =============================================================================
def get_count_for_reposting(self, args):
args = eval(args)
if args['check'] == 'Bin':
@ -39,6 +41,7 @@ class DocType:
return [d[0] for d in sql("select name from `tabAccount` ")]
# =============================================================================
def get_bin_qty(self, wh, item):
# get actual_qty
act_qty = sql("select ifnull(actual_qty, 0) from `tabBin` where warehouse = '%s' and item_code = '%s'" % (wh, item))
@ -52,6 +55,7 @@ class DocType:
ord_qty = sql("select sum(if ( ifnull(t2.qty, 0) > ifnull(t2.received_qty, 0), (ifnull(t2.qty, 0) - ifnull(t2.received_qty, 0)) * ifnull(t2.conversion_factor, 0) , 0) ) from `tabPurchase Order` t1, `tabPO Detail` t2 where t1.name = t2.parent and t1.docstatus = 1 and t2.warehouse = '%s' and t2.item_code = '%s'" % (wh, item))
ord_qty = ord_qty and flt(ord_qty[0][0]) or 0
# get reserved_qty
res_qty =sql("select sum(if ( ifnull(t2.qty, 0) > ifnull(t2.delivered_qty, 0), ifnull(t2.qty, 0) - ifnull(t2.delivered_qty, 0) , 0) ) from `tabSales Order` t1, `tabSales Order Detail` t2 where t1.name = t2.parent and t1.docstatus = 1 and t2.reserved_warehouse = '%s' and t2.item_code = '%s' " % (wh, item))
res_qty = res_qty and flt(res_qty[0][0]) or 0
@ -62,6 +66,7 @@ class DocType:
return {'actual_qty': act_qty, 'indented_qty': ind_qty, 'ordered_qty': ord_qty, 'reserved_qty': res_qty, 'planned_qty': plan_qty }
# =============================================================================
def check_bin_qty(self, bin_obj, qty_dict):
label_dict = {'actual_qty': 'Actual Qty', 'indented_qty': 'Indent Qty', 'ordered_qty': 'Ordered Qty', 'reserved_qty': 'Reserved Qty', 'planned_qty': 'Planned Qty'}
for f in qty_dict:
@ -75,6 +80,8 @@ class DocType:
msgprint('<div style="color: RED">Difference found in Projected Qty for Item:= %s and Warehouse:= %s (Before : %s; After : %s)</div>' % (bin_obj.doc.item_code, bin_obj.doc.warehouse, bin_obj.doc.projected_qty, cstr(projected_qty)))
self.msg.append('<div style="color: RED">Difference found in Projected Qty for Item:= %s and Warehouse:= %s (Before : %s; After : %s)</div>' % (bin_obj.doc.item_code, bin_obj.doc.warehouse, bin_obj.doc.projected_qty, cstr(projected_qty)))
# =============================================================================
def repair_bin(self, bin):
import webnotes
bin_obj = get_obj('Bin',bin)
@ -99,6 +106,19 @@ class DocType:
msgprint('<div style="color: RED"> Handle Item %s and Warehouse %s seprately. </div> <div style="color: RED"> ERROR: %s</div>' % (bin_obj.doc.item_code, bin_obj.doc.warehouse, str(webnotes.utils.getTraceback())))
self.msg.append('<div style="color: RED"> ERROR: %s</div>' % (str(webnotes.utils.getTraceback())))
# =============================================================================
def repair_all_bins(self):
bins = sql("select name from tabBin")
cnt = 0
for bin in bins:
if cnt % 20 == 0:
sql("commit")
sql("start transaction")
cnt += 1
self.repair_bin(bin[0])
# =============================================================================
def repair_opening_bal(self, d, acc_obj, past_yr, fiscal_yr):
# check opening balance
opbal = sql("select balance from `tabAccount Balance` where account=%s and period = %s", (acc_obj.doc.name, past_yr))
@ -107,6 +127,8 @@ class DocType:
self.msg.append('<div style="color: RED"> Difference found in Opening of Account %s for Period %s in Fiscal Year %s (Before : %s; After : %s) </div>' % (acc_obj.doc.name, d.period, fiscal_yr, flt(d.opening), opbal and flt(opbal[0][0]) or 0))
sql("update `tabAccount Balance` set opening = '%s' where period = '%s' and account = '%s' " % (opbal and flt(opbal[0][0]) or 0, fiscal_yr, acc_obj.doc.name))
# =============================================================================
def repair_bal(self, d, acc_obj, fiscal_yr):
# check balances
ysd = get_value('Fiscal Year', fiscal_yr, 'year_start_date')
@ -116,6 +138,8 @@ class DocType:
self.msg.append('<div style="color: RED"> Difference found in Balance of Account %s for Period %s in Fiscal Year %s (Before : %s; After : %s) </div>' % (acc_obj.doc.name, d.period, fiscal_yr, flt(d.balance), flt(bal)))
sql("update `tabAccount Balance` set balance = '%s' where period = '%s' and account = '%s' " % (bal, d.period, acc_obj.doc.name))
# =============================================================================
def repair_acc_bal(self, acc, past_yr = '' , fiscal_yr = ''):
# get account obj
acc_obj = get_obj('Account', acc, with_children = 1)
@ -140,6 +164,8 @@ class DocType:
return self.msg
# =============================================================================
def send_mail(self, args):
args = eval(args)
self.msg, subject = args['msg'], args['subject']
@ -153,4 +179,4 @@ In Account := %s User := %s has Reposted %s and following was found:-
""" % (get_value('Control Panel', None,'account_id'), session['user'], subject, '\n'.join(self.msg))
sendmail(['saumil@iwebnotes.com','nabin@iwebnotes.com'], subject='Repair of ' + cstr(subject), parts = [('text/plain', email_msg)])
sendmail(['support@iwebnotes.com'], subject='Repair of ' + cstr(subject), parts = [('text/plain', email_msg)])