Merge pull request #73 from nabinhait/master

issue fixed
diff --git a/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt b/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt
index f1f7710..78431f5 100644
--- a/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt
+++ b/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-08-08 16:56:40',
+		'modified': '2011-08-31 16:53:11',
 		'modified_by': 'Administrator',
 		'owner': 'Administrator'
 	},
@@ -31,7 +31,7 @@
 
 	# These values are common for all DocType Mapper
 	{
-		'doctype': 'DocType Mapper',
+		'doctype': u'DocType Mapper',
 		'from_doctype': 'Sales Order',
 		'module': 'Accounts',
 		'name': '__common__',
@@ -41,7 +41,7 @@
 
 	# DocType Mapper, Sales Order-Receivable Voucher
 	{
-		'doctype': 'DocType Mapper',
+		'doctype': u'DocType Mapper',
 		'name': 'Sales Order-Receivable Voucher'
 	},
 
@@ -128,7 +128,7 @@
 		'match_id': 1,
 		'to_field': 'entries',
 		'to_table': 'RV Detail',
-		'validation_logic': 'amount > ifnull(billed_amt, 0) and docstatus = 1'
+		'validation_logic': 'docstatus = 1'
 	},
 
 	# Table Mapper Detail
diff --git a/patches/patch.py b/patches/patch.py
index f550aa9..906e039 100644
--- a/patches/patch.py
+++ b/patches/patch.py
@@ -1,7 +1,7 @@
 # REMEMBER to update this
 # ========================
 
-last_patch = 355
+last_patch = 356
 
 #-------------------------------------------
 
@@ -305,4 +305,6 @@
 	elif patch_no == 355:
 		reload_doc('hr', 'doctype', 'salary_slip')
 		delete_doc('DocType', 'Salary Control Panel')
-
+	elif patch_no == 356:
+		reload_doc('doctype', 'core', 'doctype')
+		sql("update `tabDocType` set default_print_format = 'Standard'")
diff --git a/stock/doctype/delivery_note/delivery_note.py b/stock/doctype/delivery_note/delivery_note.py
index e5acd16..00711978 100644
--- a/stock/doctype/delivery_note/delivery_note.py
+++ b/stock/doctype/delivery_note/delivery_note.py
@@ -444,7 +444,7 @@
   def update_pack_nett_weight(self):
       for d in getlist(self.doclist, 'delivery_note_details'):
         if d.item_name:
-          item_wt = sql("select nett_weight from `tabItem` where item_name = '%s'" % (d.item_name))
+          item_wt = sql("select nett_weight from `tabItem` where item_name = %s", (d.item_name))
           d.pack_nett_wt = item_wt and flt(item_wt[0][0])*flt(d.qty) or 0
 
   # ==========================================