resolved conflict in patch
This commit is contained in:
commit
0275149074
@ -11,8 +11,8 @@ else:
|
||||
from_date = filter_values['posting_date']
|
||||
to_date = filter_values['posting_date1']
|
||||
|
||||
ysd, from_date_year = sql("select year_start_date, name from `tabFiscal Year` where %s between year_start_date and date_sub(date_add(year_start_date,interval 1 year), interval 1 day)",from_date)[0]
|
||||
|
||||
from_date_year = sql("select name from `tabFiscal Year` where %s between year_start_date and date_sub(date_add(year_start_date,interval 1 year), interval 1 day)",from_date)[0][0]
|
||||
#to_date_year = sql("select name from `tabFiscal Year` where %s between year_start_date and date_sub(date_add(year_start_date,interval 1 year), interval 1 day)",to_date)[0][0]
|
||||
|
||||
# define columns
|
||||
#---------------
|
||||
@ -49,13 +49,25 @@ total_diff = total_debit - total_credit
|
||||
|
||||
# opening
|
||||
account = filter_values.get('account')
|
||||
if account:
|
||||
if not account:
|
||||
msgprint('Select an account to proceed',raise_exception=0,small=1)
|
||||
|
||||
|
||||
acc_det = sql("select debit_or_credit, is_pl_account, lft, rgt, group_or_ledger from tabAccount where name = '%s'" % account)
|
||||
|
||||
opening_bal = get_obj('GL Control').get_as_on_balance(account, from_date_year, from_date, acc_det[0][0], acc_det[0][2], acc_det[0][3])[2]
|
||||
closing_bal = get_obj('GL Control').get_as_on_balance(account, from_date_year, to_date, acc_det[0][0], acc_det[0][2], acc_det[0][3])[2]
|
||||
if acc_det[0][0] == 'Credit':
|
||||
closing_bal = -1*closing_bal
|
||||
opening_bal = -1*opening_bal
|
||||
|
||||
out = []
|
||||
|
||||
t_row = ['' for i in range(len(colnames))]
|
||||
t_row[1] = 'Opening as on '+formatdate(from_date)
|
||||
t_row[col_idx['Debit']-1] = opening_bal
|
||||
out.append(t_row)
|
||||
|
||||
count = 0
|
||||
for r in res:
|
||||
count +=1
|
||||
@ -85,7 +97,7 @@ if total_debit != 0 or total_credit != 0:
|
||||
# closing
|
||||
if account:
|
||||
t_row = ['' for i in range(len(colnames))]
|
||||
t_row[1] = 'Closing Balance on ' + to_date
|
||||
t_row[1] = 'Closing Balance on ' + formatdate(to_date)
|
||||
t_row[col_idx['Debit']-1] = flt(closing_bal)
|
||||
out.append(t_row)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# REMEMBER to update this
|
||||
# ========================
|
||||
|
||||
last_patch = 354
|
||||
last_patch = 355
|
||||
|
||||
#-------------------------------------------
|
||||
|
||||
@ -291,5 +291,16 @@ def execute(patch_no):
|
||||
elif patch_no == 353:
|
||||
reload_doc('hr', 'doctype', 'salary_manager')
|
||||
elif patch_no == 354:
|
||||
reload_doc('setup', 'doctype','feature_setup')
|
||||
reload_doc('stock','doctype','item')
|
||||
sql("update tabDocField set label='Produced Qty',description='Updated after finished goods are transferred to FG Warehouse through Stock Entry' where parent='Production Order' and fieldname='produced_qty'")
|
||||
rs = sql("select fieldname from tabDocField where parent='Features Setup' and fieldname is not null")
|
||||
from webnotes.model.doc import Document
|
||||
m = Document('Features Setup')
|
||||
for d in rs:
|
||||
m.fields[d[0]] = 1
|
||||
m.save()
|
||||
elif patch_no == 355:
|
||||
reload_doc('hr', 'doctype', 'salary_slip')
|
||||
delete_doc('DocType', 'Salary Control Panel')
|
||||
|
||||
|
@ -5,13 +5,14 @@
|
||||
{
|
||||
'creation': '2010-08-08 17:09:14',
|
||||
'docstatus': 0,
|
||||
'modified': '2010-12-23 11:08:12',
|
||||
'modified_by': 'umair@iwebnotes.com',
|
||||
'modified': '2011-08-31 10:03:21',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'_last_update': '1313485457',
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocType',
|
||||
'in_create': 0,
|
||||
@ -20,7 +21,7 @@
|
||||
'section_style': 'Tabbed',
|
||||
'server_code_error': ' ',
|
||||
'show_in_menu': 0,
|
||||
'version': 179
|
||||
'version': 180
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -54,7 +55,6 @@
|
||||
'cancel': 1,
|
||||
'create': 1,
|
||||
'doctype': 'DocPerm',
|
||||
'idx': 1,
|
||||
'permlevel': 0,
|
||||
'role': 'System Manager',
|
||||
'submit': 1,
|
||||
@ -64,7 +64,6 @@
|
||||
# DocPerm
|
||||
{
|
||||
'doctype': 'DocPerm',
|
||||
'idx': 2,
|
||||
'permlevel': 1,
|
||||
'role': 'All'
|
||||
},
|
||||
@ -75,7 +74,6 @@
|
||||
'cancel': 1,
|
||||
'create': 1,
|
||||
'doctype': 'DocPerm',
|
||||
'idx': 3,
|
||||
'permlevel': 0,
|
||||
'role': 'Production Manager',
|
||||
'submit': 1,
|
||||
@ -88,7 +86,6 @@
|
||||
'cancel': 1,
|
||||
'create': 1,
|
||||
'doctype': 'DocPerm',
|
||||
'idx': 4,
|
||||
'permlevel': 0,
|
||||
'role': 'Production User',
|
||||
'submit': 1,
|
||||
@ -99,7 +96,6 @@
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'idx': 1,
|
||||
'label': 'Production Order',
|
||||
'oldfieldtype': 'Section Break',
|
||||
'permlevel': 0
|
||||
@ -112,7 +108,6 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'transaction_date',
|
||||
'fieldtype': 'Date',
|
||||
'idx': 2,
|
||||
'label': 'Transaction Date',
|
||||
'oldfieldname': 'transaction_date',
|
||||
'oldfieldtype': 'Date',
|
||||
@ -127,7 +122,6 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'posting_date',
|
||||
'fieldtype': 'Date',
|
||||
'idx': 3,
|
||||
'label': 'Posting Date',
|
||||
'oldfieldname': 'posting_date',
|
||||
'oldfieldtype': 'Date',
|
||||
@ -142,7 +136,6 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'production_item',
|
||||
'fieldtype': 'Link',
|
||||
'idx': 4,
|
||||
'in_filter': 1,
|
||||
'label': 'Production Item',
|
||||
'oldfieldname': 'production_item',
|
||||
@ -158,7 +151,6 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'description',
|
||||
'fieldtype': 'Text',
|
||||
'idx': 5,
|
||||
'label': 'Description',
|
||||
'oldfieldname': 'description',
|
||||
'oldfieldtype': 'Text',
|
||||
@ -173,14 +165,12 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'bom_no',
|
||||
'fieldtype': 'Link',
|
||||
'idx': 7,
|
||||
'label': 'BOM No',
|
||||
'oldfieldname': 'bom_no',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Bill Of Materials',
|
||||
'permlevel': 1,
|
||||
'reqd': 1,
|
||||
'search_index': 0,
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
@ -189,7 +179,6 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'origin',
|
||||
'fieldtype': 'Select',
|
||||
'idx': 8,
|
||||
'in_filter': 1,
|
||||
'label': 'Origin',
|
||||
'no_copy': 1,
|
||||
@ -207,7 +196,6 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'qty',
|
||||
'fieldtype': 'Currency',
|
||||
'idx': 9,
|
||||
'label': 'Qty',
|
||||
'oldfieldname': 'qty',
|
||||
'oldfieldtype': 'Currency',
|
||||
@ -221,7 +209,6 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'project_name',
|
||||
'fieldtype': 'Link',
|
||||
'idx': 9,
|
||||
'in_filter': 1,
|
||||
'label': 'Project Name',
|
||||
'oldfieldname': 'project_name',
|
||||
@ -236,7 +223,6 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'amended_from',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 10,
|
||||
'label': 'Amended From',
|
||||
'oldfieldname': 'amended_from',
|
||||
'oldfieldtype': 'Data',
|
||||
@ -248,7 +234,6 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'amendment_date',
|
||||
'fieldtype': 'Date',
|
||||
'idx': 11,
|
||||
'label': 'Amendment Date',
|
||||
'oldfieldname': 'amendment_date',
|
||||
'oldfieldtype': 'Date',
|
||||
@ -259,7 +244,6 @@
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Column Break',
|
||||
'idx': 12,
|
||||
'oldfieldtype': 'Column Break',
|
||||
'permlevel': 0
|
||||
},
|
||||
@ -269,7 +253,6 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'stock_uom',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 12,
|
||||
'label': 'Stock UOM',
|
||||
'oldfieldname': 'stock_uom',
|
||||
'oldfieldtype': 'Data',
|
||||
@ -281,7 +264,6 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'status',
|
||||
'fieldtype': 'Select',
|
||||
'idx': 13,
|
||||
'in_filter': 1,
|
||||
'label': 'Status',
|
||||
'no_copy': 1,
|
||||
@ -300,15 +282,13 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'fg_warehouse',
|
||||
'fieldtype': 'Link',
|
||||
'idx': 14,
|
||||
'in_filter': 1,
|
||||
'label': 'FG Warehouse',
|
||||
'oldfieldname': 'fg_warehouse',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Warehouse',
|
||||
'permlevel': 0,
|
||||
'reqd': 1,
|
||||
'search_index': 0
|
||||
'reqd': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
@ -318,15 +298,13 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'wip_warehouse',
|
||||
'fieldtype': 'Link',
|
||||
'idx': 15,
|
||||
'in_filter': 1,
|
||||
'label': 'WIP Warehouse',
|
||||
'oldfieldname': 'wip_warehouse',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Warehouse',
|
||||
'permlevel': 0,
|
||||
'reqd': 1,
|
||||
'search_index': 0
|
||||
'reqd': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
@ -336,7 +314,6 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'consider_sa_items',
|
||||
'fieldtype': 'Select',
|
||||
'idx': 16,
|
||||
'in_filter': 1,
|
||||
'label': 'Consider SA Items',
|
||||
'oldfieldname': 'consider_sa_items',
|
||||
@ -349,11 +326,11 @@
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'Updated after finished goods are transferred to FG Warehouse through Stock Entry',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'produced_qty',
|
||||
'fieldtype': 'Currency',
|
||||
'idx': 18,
|
||||
'label': 'Produced Qty (Updated after finished goods are transferred to FG Warehouse through Stock Entry)',
|
||||
'label': 'Produced Qty',
|
||||
'oldfieldname': 'produced_qty',
|
||||
'oldfieldtype': 'Currency',
|
||||
'permlevel': 1
|
||||
@ -364,14 +341,12 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'company',
|
||||
'fieldtype': 'Link',
|
||||
'idx': 19,
|
||||
'label': 'Company',
|
||||
'oldfieldname': 'company',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Company',
|
||||
'permlevel': 0,
|
||||
'reqd': 1,
|
||||
'search_index': 0
|
||||
'reqd': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
@ -379,7 +354,6 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'fiscal_year',
|
||||
'fieldtype': 'Select',
|
||||
'idx': 20,
|
||||
'in_filter': 1,
|
||||
'label': 'Fiscal Year',
|
||||
'oldfieldname': 'fiscal_year',
|
||||
@ -393,7 +367,6 @@
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'idx': 21,
|
||||
'label': 'Next Steps',
|
||||
'oldfieldtype': 'Section Break',
|
||||
'permlevel': 0
|
||||
@ -405,7 +378,6 @@
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Button',
|
||||
'idx': 22,
|
||||
'label': 'Material Transfer',
|
||||
'oldfieldtype': 'Button',
|
||||
'permlevel': 0,
|
||||
@ -416,7 +388,6 @@
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Column Break',
|
||||
'idx': 23,
|
||||
'oldfieldtype': 'Column Break',
|
||||
'permlevel': 0
|
||||
},
|
||||
@ -427,7 +398,6 @@
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Button',
|
||||
'idx': 24,
|
||||
'label': 'Backflush',
|
||||
'oldfieldtype': 'Button',
|
||||
'permlevel': 0,
|
||||
@ -438,7 +408,6 @@
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Column Break',
|
||||
'idx': 25,
|
||||
'oldfieldtype': 'Column Break',
|
||||
'permlevel': 0
|
||||
},
|
||||
@ -449,7 +418,6 @@
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Button',
|
||||
'idx': 26,
|
||||
'label': 'Stop Production Order',
|
||||
'oldfieldtype': 'Button',
|
||||
'permlevel': 0,
|
||||
@ -462,7 +430,6 @@
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Button',
|
||||
'idx': 27,
|
||||
'label': 'Unstop Production Order',
|
||||
'oldfieldtype': 'Button',
|
||||
'permlevel': 0,
|
||||
|
@ -70,7 +70,6 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
} else {
|
||||
hide_field(['Repair Sales Order', 'Send SMS', 'message', 'customer_mobile_no'])
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//customer
|
||||
|
0
setup/doctype/features_setup/__init__.py
Normal file
0
setup/doctype/features_setup/__init__.py
Normal file
13
setup/doctype/features_setup/features_setup.py
Normal file
13
setup/doctype/features_setup/features_setup.py
Normal file
@ -0,0 +1,13 @@
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
|
||||
def validate(self):
|
||||
"""
|
||||
update settings in defaults
|
||||
"""
|
||||
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])
|
288
setup/doctype/features_setup/features_setup.txt
Normal file
288
setup/doctype/features_setup/features_setup.txt
Normal file
@ -0,0 +1,288 @@
|
||||
# DocType, Features Setup
|
||||
[
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2011-08-25 16:53:56',
|
||||
'docstatus': 0,
|
||||
'modified': '2011-08-31 15:05:53',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'_last_update': '1314783102',
|
||||
'colour': 'White:FFF',
|
||||
'doctype': 'DocType',
|
||||
'issingle': 1,
|
||||
'module': 'Setup',
|
||||
'name': '__common__',
|
||||
'name_case': 'Title Case',
|
||||
'section_style': 'Simple',
|
||||
'show_in_menu': 1,
|
||||
'version': 16
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'name': '__common__',
|
||||
'parent': 'Features Setup',
|
||||
'parentfield': 'fields',
|
||||
'parenttype': 'DocType',
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# These values are common for all DocPerm
|
||||
{
|
||||
'create': 1,
|
||||
'doctype': 'DocPerm',
|
||||
'name': '__common__',
|
||||
'parent': 'Features Setup',
|
||||
'parentfield': 'permissions',
|
||||
'parenttype': 'DocType',
|
||||
'permlevel': 0,
|
||||
'read': 1,
|
||||
'write': 1
|
||||
},
|
||||
|
||||
# DocType, Features Setup
|
||||
{
|
||||
'doctype': 'DocType',
|
||||
'name': 'Features Setup'
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'doctype': 'DocPerm',
|
||||
'role': 'System Manager'
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'doctype': 'DocPerm',
|
||||
'role': 'Administrator'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'label': 'Materials'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'To track item in sales and purchase documents based on their serial nos. This is can also used to track warranty details of the product.',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'item_searial_nos',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'Item Serial Nos'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'To track items in sales and purchase documents with batch nos<br><b>Preferred Industry: Chemicals etc</b>',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'item_batch_nos',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'Item Batch Nos'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'To track brand name in the following documents<br>\nDelivery Note, Enuiry, Indent, Item, Purchase Order, Purchase Voucher, Purchaser Receipt, Quotation, Receivable Voucher, Sales BOM, Sales Order, Serial No',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'brands',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'Brands'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Column Break'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': '1. To maintain the customer wise item code and to make them searchable based on their code use this option',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'item_advanced',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'Item Advanced'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'If Sale BOM is defined, the actual BOM of the Pack is displayed as table.\nAvailable in Delivery Note and Sales Order',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'packing_details',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'Packing Detials'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'To get Item Group in details table',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'item_group_in_details',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'Item Groups in Details'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'label': 'Sales and Purchase'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'All export related fields like currency, conversion rate, export total, export grand total etc are available in <br>\nDelivery Note, POS, Quotation, Sales Invoice, Sales Order etc.',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'exports',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'Exports'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'All import related fields like currency, conversion rate, import total, import grand total etc are available in <br>\nPurchase Receipt, Supplier Quotation, Purchase Invoice, Purchase Order etc.',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'imports',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'Imports'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Column Break'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'Field available in Delivery Note, Quotation, Receivable Voucher, Sales Order',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'discounts',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'Discounts'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'To track any installation or commissioning related work after sales',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'after_sales_installations',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'After Sale Installations'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'description': 'Available in \nBill Of Materials, Delivery Note, Payable Voucher, Production Order, Purchase Order, Purchase Receipt, Receivable Voucher, Sales Order, Stock Entry, Timesheet',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'projects',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'Projects'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'If you have Sales Team and Sale Partners (Channel Partners) they can be tagged and maintain their contribution in the sales activity',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'sales_extras',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'Sales Extras'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'label': 'Production'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'If you involve in manufacturing activity<br>\nEnables item <b>Is Manufactured</b>',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'manufacturing',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'Manufacturing'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Column Break'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'If you follow Quality Inspection<br>\nEnables item QA Required and QA No in Purchase Receipt',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'quality',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'Quality'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'To enable <b>Point of Sale</b> features',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'pos',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'Point of Sale'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'label': 'Miscelleneous'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'If you have long print formats, this feature can be used to split the page to be printed on multiple pages with all headers and footers on each page',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'page_break',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'Page Break'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Column Break'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': 'White:FFF',
|
||||
'description': 'Enables <b>More Info.</b> in all documents',
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'more_info',
|
||||
'fieldtype': 'Check',
|
||||
'label': 'More Info'
|
||||
}
|
||||
]
|
@ -539,4 +539,182 @@ pscript.set_user_fullname = function(ele,username,get_latest){
|
||||
// ====================================================================
|
||||
startup_setup();
|
||||
|
||||
$(document).bind('form_refresh', function() { })
|
||||
/* features setup "Dictionary", "Script"
|
||||
Dictionary Format
|
||||
'projects': {
|
||||
'Sales Order': {
|
||||
'fields':['project_name'],
|
||||
'sales_order_details':['projected_qty']
|
||||
},
|
||||
'Purchase Order': {
|
||||
'fields':['project_name']
|
||||
}
|
||||
}
|
||||
// ====================================================================*/
|
||||
pscript.feature_dict = {
|
||||
'projects': {
|
||||
'Bill Of Materials': {'fields':['project_name']},
|
||||
'Delivery Note': {'fields':['project_name']},
|
||||
'Payable Voucher': {'fields':['project_name']},
|
||||
'Production Order': {'fields':['project_name']},
|
||||
'Purchase Order': {'fields':['project_name']},
|
||||
'Purchase Receipt': {'fields':['project_name']},
|
||||
'Receivable Voucher': {'fields':['project_name']},
|
||||
'Sales Order': {'fields':['project_name']},
|
||||
'Stock Entry': {'fields':['project_name']},
|
||||
'Timesheet': {'timesheet_details':['project_name']}
|
||||
},
|
||||
'packing_details': {
|
||||
'Delivery Note': {'fields':['packing_details','print_packing_slip'],'delivery_note_details':['no_of_packs','pack_gross_wt','pack_nett_wt','pack_no','pack_unit']},
|
||||
'Sales Order': {'fields':['packing_details']}
|
||||
},
|
||||
'discounts': {
|
||||
'Delivery Note': {'delivery_note_details':['adj_rate']},
|
||||
'Quotation': {'quotation_details':['adj_rate']},
|
||||
'Receivable Voucher': {'entries':['adj_rate']},
|
||||
'Sales Order': {'sales_order_details':['adj_rate','ref_rate']}
|
||||
},
|
||||
'brands': {
|
||||
'Delivery Note': {'delivery_note_details':['brand']},
|
||||
'Indent': {'indent_details':['brand']},
|
||||
'Item': {'fields':['brand']},
|
||||
'Purchase Order': {'po_details':['brand']},
|
||||
'Payable Voucher': {'entries':['brand']},
|
||||
'Quotation': {'quotation_details':['brand']},
|
||||
'Receivable Voucher': {'entries':['brand']},
|
||||
'Sales BOM': {'fields':['new_item_brand']},
|
||||
'Sales Order': {'sales_order_details':['brand']},
|
||||
'Serial No': {'fields':['brand']}
|
||||
},
|
||||
'after_sales_installations': {
|
||||
'Delivery Note': {'fields':['installation_status','per_installed'],'delivery_note_details':['installed_qty']}
|
||||
},
|
||||
'item_batch_nos': {
|
||||
'Delivery Note': {'delivery_note_details':['batch_no']},
|
||||
'Item': {'fields':['has_batch_no']},
|
||||
'Purchase Receipt': {'purchase_receipt_details':['batch_no']},
|
||||
'QA Inspection Report': {'fields':['batch_no']},
|
||||
'Sales and Pruchase Return Wizard': {'return_details':['batch_no']},
|
||||
'Receivable Voucher': {'entries':['batch_no']},
|
||||
'Stock Entry': {'mtn_details':['batch_no']},
|
||||
'Stock Ledger Entry': {'fields':['batch_no']}
|
||||
},
|
||||
'item_serial_nos': {
|
||||
'Customer Issue': {'fields':['serial_no']},
|
||||
'Delivery Note': {'delivery_note_details':['serial_no'],'packing_details':['serial_no']},
|
||||
'Installation Note': {'installed_item_details':['serial_no']},
|
||||
'Item': {'fields':['has_serial_no']},
|
||||
'Maintenance Schedule': {'item_maintenance_details':['serial_no'],'maintenance_schedule_details':['serial_no']},
|
||||
'Maintenance Visit': {'maintenance_visit_details':['serial_no']},
|
||||
'Purchase Receipt': {'purchase_receipt_details':['serial_no']},
|
||||
'QA Inspection Report': {'fields':['item_serial_no']},
|
||||
'Sales and Pruchase Return Wizard': {'return_details':['serial_no']},
|
||||
'Receivable Voucher': {'entries':['serial_no']},
|
||||
'Stock Entry': {'mtn_details':['serial_no']},
|
||||
'Stock Ledger Entry': {'fields':['serial_no']}
|
||||
},
|
||||
'item_group_in_details': {
|
||||
'Delivery Note': {'delivery_note_details':['item_group']},
|
||||
'Enquiry': {'enquiry_details':['item_group']},
|
||||
'Indent': {'indent_details':['item_group']},
|
||||
'Item': {'fields':['item_group']},
|
||||
'Manage Account': {'fields':['default_item_group']},
|
||||
'Purchase Order': {'po_details':['item_group']},
|
||||
'Purchase Receipt': {'purchase_receipt_details':['item_group']},
|
||||
'Purchase Voucher': {'entries':['item_group']},
|
||||
'Quotation': {'quotation_details':['item_group']},
|
||||
'Receivable Voucher': {'entries':['item_group']},
|
||||
'Sales BOM': {'fields':['serial_no']},
|
||||
'Sales Order': {'sales_order_details':['item_group']},
|
||||
'Serial No': {'fields':['item_group']},
|
||||
'Sales Partner': {'partner_target_details':['item_group']},
|
||||
'Sales Person': {'target_details':['item_group']},
|
||||
'Territory': {'target_details':['item_group']}
|
||||
},
|
||||
'page_break': {
|
||||
'Delivery Note': {'delivery_note_details':['page_break'],'packing_details':['page_break']},
|
||||
'Indent': {'indent_details':['page_break']},
|
||||
'Purchase Order': {'po_details':['page_break']},
|
||||
'Purchase Receipt': {'purchase_receipt_details':['page_break']},
|
||||
'Purchase Voucher': {'entries':['page_break']},
|
||||
'Quotation': {'quotation_details':['page_break']},
|
||||
'Receivable Voucher': {'entries':['page_break']},
|
||||
'Sales Order': {'sales_order_details':['page_break']}
|
||||
},
|
||||
'exports': {
|
||||
'Delivery Note': {'fields':['Note','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'delivery_note_details':['base_ref_rate','export_amount','export_rate']},
|
||||
'POS Setting': {'fields':['conversion_rate','currency']},
|
||||
'Quotation': {'fields':['Note HTML','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'quotation_details':['base_ref_rate','export_amount','export_rate']},
|
||||
'Receivable Voucher': {'fields':['conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'entries':['base_ref_rate','export_amount','export_rate']},
|
||||
'Item': {'ref_rate_details':['ref_currency']},
|
||||
'Sales BOM': {'fields':['currency']},
|
||||
'Sales Order': {'fields':['Note1','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'sales_order_details':['base_ref_rate','export_amount','export_rate']}
|
||||
},
|
||||
'imports': {
|
||||
'Payable Voucher': {'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'entries':['import_amount','import_rate']},
|
||||
'Purchase Order': {'fields':['Note HTML','conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'po_details':['import_amount','import_rate']},
|
||||
'Purchase Receipt': {'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'purchase_receipt_details':['import_amount','import_rate']},
|
||||
'Supplier Quotation': {'fields':['conversion_rate','currency']}
|
||||
},
|
||||
'item_advanced': {
|
||||
'Item': {'fields':['item_customer_details']}
|
||||
},
|
||||
'sales_extras': {
|
||||
'Address': {'fields':['sales_partner']},
|
||||
'Contact': {'fields':['sales_partner']},
|
||||
'Customer': {'fields':['sales_team']},
|
||||
'Delivery Note': {'fields':['sales_team','Packing List']},
|
||||
'Item': {'fields':['item_customer_details']},
|
||||
'Receivable Voucher': {'fields':['sales_team']},
|
||||
'Sales Order': {'fields':['sales_team','Packing List']}
|
||||
},
|
||||
'more_info': {
|
||||
'Customer': {'fields':['More Info']},
|
||||
'Delivery Note': {'fields':['More Info']},
|
||||
'Enquiry': {'fields':['More Info']},
|
||||
'Indent': {'fields':['More Info']},
|
||||
'Lead': {'fields':['More Info']},
|
||||
'Payable Voucher': {'fields':['More Info']},
|
||||
'Purchase Order': {'fields':['More Info']},
|
||||
'Purchase Receipt': {'fields':['More Info']},
|
||||
'Quotation': {'fields':['More Info']},
|
||||
'Receivable Voucher': {'fields':['More Info']},
|
||||
'Sales Order': {'fields':['More Info']},
|
||||
'Serial No': {'fields':['More Info']},
|
||||
'Supplier': {'fields':['More Info']}
|
||||
},
|
||||
'quality': {
|
||||
'Item': {'fields':['Item Inspection Criteria','inspection_required']},
|
||||
'Purchase Receipt': {'purchase_receipt_details':['qa_no']}
|
||||
},
|
||||
'manufacturing': {
|
||||
'Item': {'fields':['Manufacturing']}
|
||||
},
|
||||
'pos': {
|
||||
'Receivable Voucher': {'fields':['is_pos']}
|
||||
}
|
||||
}
|
||||
|
||||
$(document).bind('form_refresh', function() {
|
||||
for(sys_feat in sys_defaults)
|
||||
{
|
||||
if(sys_defaults[sys_feat]=='0' && (sys_feat in pscript.feature_dict)) //"Features to hide" exists
|
||||
{
|
||||
if(cur_frm.doc.doctype in pscript.feature_dict[sys_feat])
|
||||
{
|
||||
for(fort in pscript.feature_dict[sys_feat][cur_frm.doc.doctype])
|
||||
{
|
||||
if(fort=='fields')
|
||||
hide_field(pscript.feature_dict[sys_feat][cur_frm.doc.doctype][fort]);
|
||||
else if(cur_frm.fields_dict[fort])
|
||||
{
|
||||
for(grid_field in pscript.feature_dict[sys_feat][cur_frm.doc.doctype][fort])
|
||||
cur_frm.fields_dict[fort].grid.set_column_disp(pscript.feature_dict[sys_feat][cur_frm.doc.doctype][fort][grid_field], false);
|
||||
}
|
||||
else
|
||||
msgprint('Grid "'+fort+'" does not exists');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -110,3 +110,9 @@ cur_frm.cscript.weight_to_validate = function(doc,cdt,cdn){
|
||||
cur_frm.cscript.validate = function(doc,cdt,cdn){
|
||||
cur_frm.cscript.weight_to_validate(doc,cdt,cdn);
|
||||
}
|
||||
|
||||
//===========Fill Default Currency in "Ref Rate Details====================
|
||||
cur_frm.fields_dict['ref_rate_details'].grid.onrowadd = function(doc, cdt, cdn){
|
||||
locals[cdt][cdn].ref_currency = sys_defaults.currency;
|
||||
refresh_field('ref_currency',cdn,'ref_rate_details');
|
||||
}
|
@ -5,8 +5,8 @@
|
||||
{
|
||||
'creation': '2010-08-08 17:09:19',
|
||||
'docstatus': 0,
|
||||
'modified': '2010-09-20 14:06:57',
|
||||
'modified_by': 'umair@iwebnotes.com',
|
||||
'modified': '2011-08-31 11:36:41',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
'section_style': 'Tray',
|
||||
'server_code_error': ' ',
|
||||
'show_in_menu': 0,
|
||||
'version': 2
|
||||
'version': 3
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -34,7 +34,8 @@
|
||||
'parent': 'Ref Rate Detail',
|
||||
'parentfield': 'fields',
|
||||
'parenttype': 'DocType',
|
||||
'permlevel': 0
|
||||
'permlevel': 0,
|
||||
'search_index': 1
|
||||
},
|
||||
|
||||
# DocType, Ref Rate Detail
|
||||
@ -48,13 +49,12 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'price_list_name',
|
||||
'fieldtype': 'Select',
|
||||
'idx': 1,
|
||||
'label': 'Price List Name',
|
||||
'oldfieldname': 'price_list_name',
|
||||
'oldfieldtype': 'Select',
|
||||
'options': 'link:Price List',
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'trigger': 'Client'
|
||||
},
|
||||
|
||||
# DocField
|
||||
@ -62,12 +62,10 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'ref_rate',
|
||||
'fieldtype': 'Currency',
|
||||
'idx': 2,
|
||||
'label': 'Ref Rate',
|
||||
'oldfieldname': 'ref_rate',
|
||||
'oldfieldtype': 'Currency',
|
||||
'reqd': 0,
|
||||
'search_index': 0
|
||||
'reqd': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
@ -75,12 +73,10 @@
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'ref_currency',
|
||||
'fieldtype': 'Select',
|
||||
'idx': 3,
|
||||
'label': 'Currency',
|
||||
'oldfieldname': 'ref_currency',
|
||||
'oldfieldtype': 'Select',
|
||||
'options': 'link:Currency',
|
||||
'reqd': 1,
|
||||
'search_index': 1
|
||||
'reqd': 1
|
||||
}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user