Purchase Discount option in Features Setup
This commit is contained in:
		
							parent
							
								
									f21ceb283c
								
							
						
					
					
						commit
						3a2fcba15f
					
				| @ -7,3 +7,8 @@ def execute(): | ||||
| 	reload_doc('stock', 'doctype', 'purchase_receipt_detail') | ||||
| 	if webnotes.conn.sql("select name from `tabDocField` where parent = 'PO Detail' and fieldname = 'discount'"): | ||||
| 		webnotes.conn.sql("update `tabPO Detail` set discount_rate=discount") | ||||
| 
 | ||||
| 	# Features setup | ||||
| 	reload_doc('setup', 'doctype', 'features_setup') | ||||
| 	from webnotes.model.code import get_obj | ||||
| 	get_obj('Features Setup').validate() | ||||
|  | ||||
| @ -5,4 +5,5 @@ def execute(): | ||||
| 
 | ||||
| 	reload_doc('accounts', 'doctype', 'receivable_voucher') | ||||
| 
 | ||||
| 	reload_doc('setup', 'doctype', 'features_setup') | ||||
| 	get_obj('Features setup').validate() | ||||
|  | ||||
| @ -8,7 +8,6 @@ class DocType: | ||||
| 		""" | ||||
| 		from webnotes.model import default_fields  | ||||
| 		from webnotes.utils import set_default | ||||
| 		 | ||||
| 		for key in self.doc.fields: | ||||
| 			if key not in default_fields: | ||||
| 				set_default(key, self.doc.fields[key]) | ||||
|  | ||||
| @ -5,14 +5,14 @@ | ||||
| 	{ | ||||
| 		'creation': '2011-09-07 11:59:05', | ||||
| 		'docstatus': 0, | ||||
| 		'modified': '2011-12-06 18:48:53', | ||||
| 		'modified': '2011-12-14 11:05:55', | ||||
| 		'modified_by': 'Administrator', | ||||
| 		'owner': 'Administrator' | ||||
| 	}, | ||||
| 
 | ||||
| 	# These values are common for all DocType | ||||
| 	{ | ||||
| 		'_last_update': '1323176623', | ||||
| 		'_last_update': '1323840127', | ||||
| 		'colour': 'White:FFF', | ||||
| 		'default_print_format': 'Standard', | ||||
| 		'doctype': 'DocType', | ||||
| @ -22,7 +22,7 @@ | ||||
| 		'name_case': 'Title Case', | ||||
| 		'section_style': 'Simple', | ||||
| 		'show_in_menu': 1, | ||||
| 		'version': 24 | ||||
| 		'version': 26 | ||||
| 	}, | ||||
| 
 | ||||
| 	# These values are common for all DocField | ||||
| @ -179,7 +179,17 @@ | ||||
| 		'doctype': 'DocField', | ||||
| 		'fieldname': 'fs_discounts', | ||||
| 		'fieldtype': 'Check', | ||||
| 		'label': 'Discounts' | ||||
| 		'label': 'Sales Discounts' | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocField | ||||
| 	{ | ||||
| 		'colour': 'White:FFF', | ||||
| 		'description': 'Discount Fields will be available in Purchase Order, Purchase Receipt, Purchase Invoice', | ||||
| 		'doctype': 'DocField', | ||||
| 		'fieldname': 'fs_purchase_discounts', | ||||
| 		'fieldtype': 'Check', | ||||
| 		'label': 'Purchase Discounts' | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocField | ||||
|  | ||||
| @ -572,6 +572,11 @@ pscript.feature_dict = { | ||||
| 		'Receivable Voucher': {'entries':['adj_rate']}, | ||||
| 		'Sales Order': {'sales_order_details':['adj_rate','ref_rate']} | ||||
| 	}, | ||||
| 	'fs_purchase_discounts': { | ||||
| 		'Purchase Order': {'po_details':['purchase_ref_rate', 'discount_rate', 'import_ref_rate']}, | ||||
| 		'Purchase Receipt': {'purchase_receipt_details':['purchase_ref_rate', 'discount_rate', 'import_ref_rate']}, | ||||
| 		'Payable Voucher': {'entries':['purchase_ref_rate', 'discount_rate', 'import_ref_rate']} | ||||
| 	}, | ||||
| 	'fs_brands': { | ||||
| 		'Delivery Note': {'delivery_note_details':['brand']}, | ||||
| 		'Indent': {'indent_details':['brand']}, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user