fix in company setup
diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py
index dc9f1dd..6c66f75 100644
--- a/erpnext/patches/patch_list.py
+++ b/erpnext/patches/patch_list.py
@@ -121,4 +121,40 @@
 		'patch_file': 'fix_packing_slip',
 		'description': 'Update Mapper Delivery Note-Packing Slip'
 	},
+	{
+		'patch_module': 'patches.jan_mar_2012.apps',
+		'patch_file': 'todo_item',
+		'description': 'Reloads todo item'
+	},
+	{
+		'patch_module': 'patches.jan_mar_2012',
+		'patch_file': 'convert_tables_to_utf8',
+		'description': 'Convert tables to UTF-8'
+	},
+	{
+		'patch_module': 'patches.jan_mar_2012',
+		'patch_file': 'pending_patches',
+	},
+	{
+		'patch_module': 'patches.jan_mar_2012',
+		'patch_file': 'pos_setting_patch',
+	},
+	{
+		'patch_module': 'patches.jan_mar_2012',
+		'patch_file': 'reload_doctype',
+	},
+	{
+		'patch_module': 'patches.jan_mar_2012',
+		'patch_file': 'reload_po_pr_mapper',
+	},
+	{
+		'patch_module': 'patches.jan_mar_2012',
+		'patch_file': 'delete_pur_of_service',
+		'description': 'Deletes purpose of service'
+	},
+	{
+		'patch_module': 'patches.jan_mar_2012',
+		'patch_file': 'navupdate',
+		'description': 'New Navigation Pages'
+	},
 ]
diff --git a/erpnext/setup/doctype/setup_control/setup_control.py b/erpnext/setup/doctype/setup_control/setup_control.py
index 75cc038..708b32a 100644
--- a/erpnext/setup/doctype/setup_control/setup_control.py
+++ b/erpnext/setup/doctype/setup_control/setup_control.py
@@ -65,16 +65,18 @@
 	# ---------------
 	def setup_account(self, args):
 		import webnotes, json
-		locals().update(args)
+		args = json.loads(args)
 
-		curr_fiscal_year, fy_start_date = self.get_fy_details(fy_start)
-		self.currency = currency
+		curr_fiscal_year, fy_start_date = self.get_fy_details(args.get('fy_start'))
+
+		args['name'] = webnotes.session.get('user')
 
 		# Update Profile
-		if last_name=='None': last_name = None
+		if not args.get('last_name') or args.get('last_name')=='None': args['last_name'] = None
 		webnotes.conn.sql("""\
-			UPDATE `tabProfile` SET first_name=%s, last_name=%s
-			WHERE name=%s AND docstatus<2""", (first_name, last_name, webnotes.user.name))
+			UPDATE `tabProfile` SET first_name=%(first_name)s,
+			last_name=%(last_name)s
+			WHERE name=%(name)s AND docstatus<2""", args)
 			
 		
 		# Fiscal Year
@@ -82,15 +84,15 @@
 		self.create_records(master_dict)
 		
 		# Company
-		master_dict = {'Company':{'company_name':company_name,
-								  'abbr':company_abbr,
-								  'default_currency':currency
-															}}
+		master_dict = {'Company':{'company_name':args.get('company_name'),
+								  'abbr':args.get('company_abbr'),
+								  'default_currency':args.get('currency')
+								}}
 		self.create_records(master_dict)
 		
 		def_args = {'current_fiscal_year':curr_fiscal_year,
-								'default_currency': currency,
-								'default_company':company_name,
+								'default_currency': args.get('currency'),
+								'default_company':args.get('company_name'),
 								'default_valuation_method':'FIFO',
 								'default_stock_uom':'Nos',
 								'date_format':'dd-mm-yyyy',
@@ -102,7 +104,8 @@
 								'emp_created_by':'Naming Series',
 								'cust_master_name':'Customer Name', 
 								'supp_master_name':'Supplier Name',
-								'default_currency_format': (currency=='INR') and 'Lacs' or 'Millions'
+								'default_currency_format': \
+										(args.get('currency')=='INR') and 'Lacs' or 'Millions'
 					}
 
 		# Set 
@@ -114,31 +117,35 @@
 		msgprint("Company setup is complete")
 		
 		import webnotes.utils
-		user_fullname = (first_name or '') + (last_name and (" " + last_name) or '')
+		user_fullname = (args.get('first_name') or '') + (args.get('last_name')
+				and (" " + args.get('last_name')) or '')
 		return {'sys_defaults': webnotes.utils.get_defaults(), 'user_fullname': user_fullname}
 
 	def create_feed_and_todo(self):
 		"""update activty feed and create todo for creation of item, customer, vendor"""
 		import home
-		home.make_feed('Comment', '', '', webnotes.session['user'],
-			'<i>"' + doc.comment + '"</i>', '#6B24B3')
+		home.make_feed('Comment', 'ToDo Item', '', webnotes.session['user'],
+			'<i>"' + 'Setup Complete. Please check your To Do List' + '"</i>', '#6B24B3')
 
 		d = Document('ToDo Item')
-		d.description = 'Create your first <a href="#!List/Customer">Customer</a>'
+		d.description = 'Create your first Customer'
 		d.priority = 'High'
 		d.date = nowdate()
+		d.reference_type = 'Customer'
 		d.save(1)
 
 		d = Document('ToDo Item')
-		d.description = 'Create your first <a href="#!List/Item">Item</a>'
+		d.description = 'Create your first Item'
 		d.priority = 'High'
 		d.date = nowdate()
+		d.reference_type = 'Item'
 		d.save(1)
 
 		d = Document('ToDo Item')
-		d.description = 'Create your first <a href="#!List/Supplier">Supplier</a>'
+		d.description = 'Create your first Supplier'
 		d.priority = 'High'
 		d.date = nowdate()
+		d.reference_type = 'Supplier'
 		d.save(1)
 
 		
diff --git a/erpnext/startup/js/complete_setup.js b/erpnext/startup/js/complete_setup.js
index 663c7b9..26b2d3b 100644
--- a/erpnext/startup/js/complete_setup.js
+++ b/erpnext/startup/js/complete_setup.js
@@ -35,7 +35,7 @@
 	var d = new wn.widgets.Dialog({
 		title: "Setup",
 		fields: [
-			{fieldname:'first_name', label:'Your First Name', fieldtype:'Data'},
+			{fieldname:'first_name', label:'Your First Name', fieldtype:'Data', reqd: 1},
 			{fieldname:'last_name', label:'Your Last Name', fieldtype:'Data'},
 			{fieldname:'company_name', label:'Company Name', fieldtype:'Data', reqd:1,
 				description: 'e.g. "My Company LLC"'},
@@ -43,9 +43,9 @@
 				description:'e.g. "MC"',reqd:1},
 			{fieldname:'fy_start', label:'Financial Year Start Date', fieldtype:'Select',
 				description:'Your financial year begins on"', reqd:1,
-				options=['', '1st Jan', '1st Apr', '1st Jul', '1st Oct'].join('\n')},
-			{fieldname:'currency': label: 'Default Currency', reqd:1,
-				options=currency_list.join('\n')},
+				options: ['', '1st Jan', '1st Apr', '1st Jul', '1st Oct'].join('\n')},
+			{fieldname:'currency', label: 'Default Currency', reqd:1,
+				options: currency_list.join('\n'), fieldtype: 'Select'},
 			{fieldname:'update', label:'Setup',fieldtype:'Button'}
 		]
 	})
@@ -65,7 +65,7 @@
 	
 	// set first name, last name
 	if(user_fullname) {
-		u = user_fullname.spilt(' ');
+		u = user_fullname.split(' ');
 		if(u[0]) {
 			d.fields_dict.first_name.input.value = u[0];
 		}
@@ -90,4 +90,4 @@
 	}
 	
 	d.show();
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
index 3c50836..73dfd4b 100644
--- a/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
+++ b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2010-08-08 17:09:35',
 		'docstatus': 0,
-		'modified': '2012-02-07 13:28:20',
+		'modified': '2012-02-29 17:55:13',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -22,7 +22,6 @@
 	# These values are common for all Field Mapper Detail
 	{
 		'doctype': u'Field Mapper Detail',
-		'map': u'Yes',
 		'name': '__common__',
 		'parent': u'Purchase Order-Purchase Receipt',
 		'parentfield': u'field_mapper_details',
@@ -50,6 +49,7 @@
 		'checking_operator': u'=',
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'supplier',
+		'map': u'Yes',
 		'match_id': 0,
 		'to_field': u'supplier'
 	},
@@ -59,6 +59,7 @@
 		'checking_operator': u'=',
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'company',
+		'map': u'Yes',
 		'match_id': 0,
 		'to_field': u'company'
 	},
@@ -68,6 +69,7 @@
 		'checking_operator': u'=',
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'currency',
+		'map': u'Yes',
 		'match_id': 0,
 		'to_field': u'currency'
 	},
@@ -76,6 +78,7 @@
 	{
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'name',
+		'map': u'Yes',
 		'match_id': 1,
 		'to_field': u'prevdoc_detail_docname'
 	},
@@ -84,6 +87,7 @@
 	{
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'parent',
+		'map': u'Yes',
 		'match_id': 1,
 		'to_field': u'prevdoc_docname'
 	},
@@ -92,6 +96,7 @@
 	{
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'parenttype',
+		'map': u'Yes',
 		'match_id': 1,
 		'to_field': u'prevdoc_doctype'
 	},
@@ -101,6 +106,7 @@
 		'checking_operator': u'=',
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'item_code',
+		'map': u'Yes',
 		'match_id': 1,
 		'to_field': u'item_code'
 	},
@@ -109,6 +115,7 @@
 	{
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) ',
+		'map': u'Yes',
 		'match_id': 1,
 		'to_field': u'received_qty'
 	},
@@ -117,6 +124,7 @@
 	{
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) ',
+		'map': u'Yes',
 		'match_id': 1,
 		'to_field': u'qty'
 	},
@@ -125,6 +133,7 @@
 	{
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) * flt(obj.conversion_factor)',
+		'map': u'Yes',
 		'match_id': 1,
 		'to_field': u'stock_qty'
 	},
@@ -133,6 +142,7 @@
 	{
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) * flt(obj.import_rate)',
+		'map': u'Yes',
 		'match_id': 1,
 		'to_field': u'import_amount'
 	},
@@ -141,6 +151,7 @@
 	{
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) * flt(obj.purchase_rate)',
+		'map': u'Yes',
 		'match_id': 1,
 		'to_field': u'amount'
 	},
@@ -149,6 +160,7 @@
 	{
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'schedule_date',
+		'map': u'Yes',
 		'match_id': 1,
 		'to_field': u'schedule_date'
 	},
@@ -157,6 +169,7 @@
 	{
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'net_total',
+		'map': u'Yes',
 		'match_id': 0,
 		'to_field': u'net_total'
 	},
@@ -165,6 +178,7 @@
 	{
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'grand_total',
+		'map': u'Yes',
 		'match_id': 0,
 		'to_field': u'grand_total'
 	},
@@ -173,6 +187,7 @@
 	{
 		'doctype': u'Field Mapper Detail',
 		'from_field': u'total_tax',
+		'map': u'Yes',
 		'match_id': 0,
 		'to_field': u'total_tax'
 	},
@@ -180,7 +195,17 @@
 	# Field Mapper Detail
 	{
 		'doctype': u'Field Mapper Detail',
+		'from_field': u'transaction_date',
+		'map': u'No',
+		'match_id': 0,
+		'to_field': u'transaction_date'
+	},
+
+	# Field Mapper Detail
+	{
+		'doctype': u'Field Mapper Detail',
 		'from_field': u'conversion_rate',
+		'map': u'Yes',
 		'match_id': 0,
 		'to_field': u'conversion_rate'
 	},
diff --git a/erpnext/utilities/page/todo/todo.js b/erpnext/utilities/page/todo/todo.js
index 4350023..dfaa7cd 100644
--- a/erpnext/utilities/page/todo/todo.js
+++ b/erpnext/utilities/page/todo/todo.js
@@ -46,14 +46,22 @@
 		}
 		todo.labelclass = label_map[todo.priority];
 		todo.userdate = dateutil.str_to_user(todo.date);
+		if(todo.reference_name && todo.reference_type) {
+			todo.link = repl('<a href="#!Form/%(reference_type)s/%(reference_name)s">\
+						%(reference_name)s</a>', todo);
+		} else if(todo.reference_type) {
+			todo.link = repl('<a href="#!List/%(reference_type)s">\
+						%(reference_type)s</a>', todo);
+		} else {
+			todo.link = '';
+		}
 		$('#todo-list').append(repl('<div class="todoitem">\
 				<span class="description">\
 					<span class="label %(labelclass)s">%(priority)s</span>\
 					<span class="help" style="margin-right: 7px">%(userdate)s</span>\
 					%(description)s</span>\
 					<span class="ref_link">&rarr;\
-					<a href="#!Form/%(reference_type)s/%(reference_name)s">\
-						[%(reference_name)s]</a></span>\
+					%(link)s</span>\
 					<a href="#" class="close">&times;</a>\
 		</div>', todo));
 		$todo = $('div.todoitem:last');
@@ -62,7 +70,7 @@
 			$todo.find('.description').css('text-decoration', 'line-through');
 		}
 		
-		if(!todo.reference_name)
+		if(!todo.reference_type)
 			$todo.find('.ref_link').toggle(false);
 		
 		$todo.find('.description')
@@ -145,4 +153,4 @@
 wn.pages.todo.onload = function() {
 	// load todos
 	erpnext.todo.refresh();
-}
\ No newline at end of file
+}
diff --git a/js/all-app.js b/js/all-app.js
index 09e92a5..aaa12db 100644
--- a/js/all-app.js
+++ b/js/all-app.js
Binary files differ
diff --git a/js/all-web.js b/js/all-web.js
index 98e1a7a..0395fc2 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -55,13 +55,13 @@
 else if((match=/^\x25{2}/.exec(_fmt))!==null){parse_tree.push('%');}
 else if((match=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt))!==null){if(match[2]){arg_names|=1;var field_list=[],replacement_field=match[2],field_match=[];if((field_match=/^([a-z_][a-z_\d]*)/i.exec(replacement_field))!==null){field_list.push(field_match[1]);while((replacement_field=replacement_field.substring(field_match[0].length))!==''){if((field_match=/^\.([a-z_][a-z_\d]*)/i.exec(replacement_field))!==null){field_list.push(field_match[1]);}
 else if((field_match=/^\[(\d+)\]/.exec(replacement_field))!==null){field_list.push(field_match[1]);}
-else{}}}
-else{}
+else{throw('[sprintf] huh?');}}}
+else{throw('[sprintf] huh?');}
 match[2]=field_list;}
 else{arg_names|=2;}
 if(arg_names===3){throw('[sprintf] mixing positional and named placeholders is not (yet) supported');}
 parse_tree.push(match);}
-else{}
+else{throw('[sprintf] huh?');}
 _fmt=_fmt.substring(match[0].length);}
 return parse_tree;};return str_format;})();var vsprintf=function(fmt,argv){argv.unshift(fmt);return sprintf.apply(null,argv);};
 /*
diff --git a/version.num b/version.num
index d6ee760..c189136 100644
--- a/version.num
+++ b/version.num
@@ -1 +1 @@
-762
\ No newline at end of file
+769
\ No newline at end of file