diff --git a/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt b/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt index ee94be8e4df..c06c3b80881 100644 --- a/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:34', 'docstatus': 0, - 'modified': '2011-09-13 13:23:44', + 'modified': '2011-09-14 12:36:24', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -125,6 +125,33 @@ 'to_field': 'incentives' }, + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'eval: flt(obj.qty) - flt(obj.billed_qty)', + 'map': 'Yes', + 'match_id': 1, + 'to_field': 'qty' + }, + + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'eval: (flt(obj.qty) - flt(obj.billed_qty)) * flt(obj.basic_rate)', + 'map': 'Yes', + 'match_id': 1, + 'to_field': 'amount' + }, + + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'eval: (flt(obj.qty) - flt(obj.billed_qty)) * flt(obj.export_rate)', + 'map': 'Yes', + 'match_id': 1, + 'to_field': 'export_amount' + }, + # Table Mapper Detail { 'doctype': 'Table Mapper Detail', diff --git a/erpnext/accounts/DocType Mapper/Purchase Order-Payable Voucher/Purchase Order-Payable Voucher.txt b/erpnext/accounts/DocType Mapper/Purchase Order-Payable Voucher/Purchase Order-Payable Voucher.txt index 17b63634c54..9527347367e 100644 --- a/erpnext/accounts/DocType Mapper/Purchase Order-Payable Voucher/Purchase Order-Payable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Purchase Order-Payable Voucher/Purchase Order-Payable Voucher.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:35', 'docstatus': 0, - 'modified': '2011-09-07 12:10:30', + 'modified': '2011-09-14 12:36:24', 'modified_by': 'Administrator', 'owner': 'Administrator' }, diff --git a/erpnext/accounts/DocType Mapper/Purchase Receipt-Payable Voucher/Purchase Receipt-Payable Voucher.txt b/erpnext/accounts/DocType Mapper/Purchase Receipt-Payable Voucher/Purchase Receipt-Payable Voucher.txt index d755954fc27..fae1006edfd 100644 --- a/erpnext/accounts/DocType Mapper/Purchase Receipt-Payable Voucher/Purchase Receipt-Payable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Purchase Receipt-Payable Voucher/Purchase Receipt-Payable Voucher.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:35', 'docstatus': 0, - 'modified': '2011-09-07 12:09:55', + 'modified': '2011-09-14 12:36:24', 'modified_by': 'Administrator', 'owner': 'Administrator' }, diff --git a/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt b/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt index 97b1cb2380e..ae0acedc55f 100644 --- a/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:36', 'docstatus': 0, - 'modified': '2011-09-13 13:23:04', + 'modified': '2011-09-14 12:36:25', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -136,6 +136,33 @@ 'to_field': 'incentives' }, + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'eval: flt(obj.qty) - flt(obj.billed_qty)', + 'map': 'Yes', + 'match_id': 1, + 'to_field': 'qty' + }, + + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'eval: (flt(obj.qty) - flt(obj.billed_qty)) * flt(obj.basic_rate)', + 'map': 'Yes', + 'match_id': 1, + 'to_field': 'amount' + }, + + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'eval: (flt(obj.qty) - flt(obj.billed_qty)) * flt(obj.export_rate)', + 'map': 'Yes', + 'match_id': 1, + 'to_field': 'export_amount' + }, + # Table Mapper Detail { 'doctype': 'Table Mapper Detail', diff --git a/erpnext/buying/DocType Mapper/Sales Order-Indent/Sales Order-Indent.txt b/erpnext/buying/DocType Mapper/Sales Order-Indent/Sales Order-Indent.txt index d32aeb63ce0..b4dafc9a2f7 100755 --- a/erpnext/buying/DocType Mapper/Sales Order-Indent/Sales Order-Indent.txt +++ b/erpnext/buying/DocType Mapper/Sales Order-Indent/Sales Order-Indent.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2011-05-05 15:58:13', + 'creation': '2011-05-20 10:07:55', 'docstatus': 0, - 'modified': '2011-05-05 16:20:10', + 'modified': '2011-09-14 12:36:25', 'modified_by': 'Administrator', 'owner': 'Administrator' }, diff --git a/erpnext/home/doctype/home_control/home_control.py b/erpnext/home/doctype/home_control/home_control.py index b25e420f2d3..8242e744315 100644 --- a/erpnext/home/doctype/home_control/home_control.py +++ b/erpnext/home/doctype/home_control/home_control.py @@ -121,24 +121,6 @@ class DocType: def get_dt_help(self,dt): return sql("select description from tabDocType where name=%s",dt)[0][0] or '' - - # ---------------------------------------------------------------------------------------- - def welcome_done(self): - if cint(get_defaults().get('welcome_done')): - return 'Yes' - else: - return 'No' - - def set_welcome_done(self): - set_default('welcome_done', '1') - - # Check Complete Registration - # ---------------------- - def registration_complete(self): - if cint(get_defaults().get('registration_complete')): - return 'Yes' - else: - return 'No' # get dashboard counts # -------------------- @@ -235,29 +217,6 @@ class DocType: # ------------------------------------------------------------------------------------------------------- - def get_status_details(self, arg=''): - # no of users online - count = sql("select count(distinct user) from tabSessions t2 where user not in ('Guest','Administrator') and TIMESTAMPDIFF(HOUR,t2.lastupdate,NOW()) <= 1") - - # unread messages - unread = sql("select count(t1.name) from `tabMail` t1, `tabMail Participant Details` t2 where t2.participant_name = '%s' and t2.parent = t1.name and (t2.read_status = 'No' or t2.read_status is NULL) and (t2.delete_status = 'No' or t2.delete_status is NULL) and t1.last_updated_by != t2.participant_name" % arg) - - # system messages - msg_id = webnotes.conn.get_global('system_message_id') - msg = '' - - if msg_id and msg_id != webnotes.conn.get_global('system_message_id', session['user']): - msg = webnotes.conn.get_global('system_message') - - return { - 'user_count': count and cint(count[0][0]) or 0, - 'unread': unread and cint(unread[0][0]) or 0, - 'system_message':msg, - 'registration_complete': self.registration_complete() - } - - # ------------------------------------------------------------------------------------------------------- - def dismiss_message(self, arg=''): msg_id = webnotes.conn.get_global('system_message_id') webnotes.conn.set_global('system_message_id', msg_id, session['user']) diff --git a/erpnext/home/page/event_updates/event_updates.js b/erpnext/home/page/event_updates/event_updates.js index 2eda138e9a4..b58a0c09146 100644 --- a/erpnext/home/page/event_updates/event_updates.js +++ b/erpnext/home/page/event_updates/event_updates.js @@ -610,7 +610,7 @@ pscript.home_make_status = function() { // complete registration if(in_list(user_roles,'System Manager')) { - pscript.complete_registration(r.registration_complete); + pscript.complete_registration(r.message.registration_complete); } // setup wizard @@ -630,17 +630,24 @@ pscript.complete_registration = function(is_complete) { d.no_cancel(); // Hide close image $dh(page_body.wntoolbar.wrapper); } - $($a(d.body,'div','', {margin:'8px', color:'#888'})).html('Company Name : '+locals['Control Panel']['Control Panel'].company_name); - d.make_body( - [ - ['Data','Company Abbreviation'], - ['Select','Fiscal Year Start Date'], - ['Select','Default Currency'], - ['Button','Save'], + d.make_body([ + ['Data','Company Name','Example: Your Company LLC'], + ['Data','Company Abbreviation', 'Example: YC (all your acconts will have this as a suffix)'], + ['Select','Fiscal Year Start Date'], + ['Select','Default Currency'], + ['Button','Save'], ]); - //d.widgets['Save'].disabled = true; // disable Save button + // if company name is set, set the input value + // and disable it + if(locals['Control Panel']['Control Panel'].company_name) { + d.widgets['Company Name'].value = locals['Control Panel']['Control Panel'].company_name; + d.widgets['Company Name'].disabled = 1; + } + + + //d.widgets['Save'].disabled = true; // disable Save button pscript.make_dialog_field(d); // submit details @@ -652,7 +659,7 @@ pscript.complete_registration = function(is_complete) { if(flag) { var args = [ - locals['Control Panel']['Control Panel'].company_name, + d.widgets['Company Name'].value, d.widgets['Company Abbreviation'].value, d.widgets['Fiscal Year Start Date'].value, d.widgets['Default Currency'].value diff --git a/erpnext/home/page/event_updates/event_updates.py b/erpnext/home/page/event_updates/event_updates.py index 11342734904..1d1d1b20404 100644 --- a/erpnext/home/page/event_updates/event_updates.py +++ b/erpnext/home/page/event_updates/event_updates.py @@ -24,7 +24,7 @@ def get_unread_messages(): # Get toolbar items # def get_status_details(arg=None): - from webnotes.utils import cint, date_diff, nowdate + from webnotes.utils import cint, date_diff, nowdate, get_defaults online = get_online_users() @@ -35,7 +35,8 @@ def get_status_details(arg=None): 'online_users': online or [], 'is_trial': webnotes.conn.get_global('is_trial'), 'days_to_expiry': (webnotes.conn.get_global('days_to_expiry') or '0'), - 'setup_status': get_setup_status() + 'setup_status': get_setup_status(), + 'registration_complete': cint(get_defaults('registration_complete')) and 'Yes' or 'No' } return ret @@ -53,7 +54,7 @@ def get_setup_status(): header = webnotes.conn.get_value('Control Panel', None, 'client_name') or '' if header.startswith('