Merge pull request #144 from anandpdoshi/master

Changes in spartan print formats to show border in chrome
diff --git a/erpnext/accounts/doctype/payable_voucher/payable_voucher.py b/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
index 9f77935..c4f0bc5 100644
--- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
+++ b/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
@@ -235,7 +235,7 @@
 		if self.doc.supplier and self.doc.credit_to:
 			acc_head = sql("select master_name from `tabAccount` where name = %s", self.doc.credit_to)
 			
-			if (acc_head and cstr(acc_head[0][0]) != cstr(self.doc.credit_to)) or (not acc_head and (self.doc.credit_to != cstr(self.doc.supplier) + " - " + self.get_company_abbr())):
+			if (acc_head and cstr(acc_head[0][0]) != cstr(self.doc.supplier)) or (not acc_head and (self.doc.credit_to != cstr(self.doc.supplier) + " - " + self.get_company_abbr())):
 				msgprint("Credit To: %s do not match with Supplier: %s for Company: %s.\n If both correctly entered, please select Master Type and Master Name in account master." %(self.doc.credit_to,self.doc.supplier,self.doc.company), raise_exception=1)
 				
 	# Check for Stopped PO
diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py
index 1175540..10bccaf 100644
--- a/erpnext/selling/doctype/quotation/quotation.py
+++ b/erpnext/selling/doctype/quotation/quotation.py
@@ -133,24 +133,13 @@
   # Does not allow same item code to be entered twice
   # -------------------------------------------------
   def validate_for_items(self):
-    check_list=[]
     chk_dupl_itm = []
     for d in getlist(self.doclist,'quotation_details'):
-      ch = sql("select is_stock_item from `tabItem` where name = '%s'"%d.item_code)
-      if ch and ch[0][0]=='Yes':
-        if cstr(d.item_code) in check_list:
-	  msgprint("Item %s has been entered twice." % d.item_code)
-	  raise Exception
-	else:
-	  check_list.append(cstr(d.item_code))
-      
-      if ch and ch[0][0]=='No':
-        f = [cstr(d.item_code),cstr(d.description)]
-	if f in chk_dupl_itm:
-	  msgprint("Item %s has been entered twice." % d.item_code)
-	  raise Exception
-	else:
-	  chk_dupl_itm.append(f)
+      if [cstr(d.item_code),cstr(d.description)] in chk_dupl_itm:
+        msgprint("Item %s has been entered twice. Please change description atleast to continue" % d.item_code)
+        raise Exception
+      else:
+        chk_dupl_itm.append([cstr(d.item_code),cstr(d.description)])
 
 
   #do not allow sales item in maintenance quotation and service item in sales quotation