messages and merge

This commit is contained in:
Rushabh Mehta 2012-02-28 17:44:16 +05:30
commit 75d8f51e7d
47 changed files with 7103 additions and 7129 deletions

View File

@ -0,0 +1,7 @@
cur_frm.cscript.refresh = function(doc, dt, dn) {
if (doc.__islocal) {
hide_field(['Repost Account Balances', 'Repost Voucher Outstanding']);
set_multiple(dt, dn, {'is_fiscal_year_closed': 'No'});
}
else unhide_field(['Repost Account Balances', 'Repost Voucher Outstanding']);
}

View File

@ -43,10 +43,10 @@ class DocType:
if not in_transaction:
sql("start transaction")
self.clear_account_balances()
self.create_account_balances()
self.update_opening()
self.update_opening(self.doc.company)
self.post_entries()
sql("commit")
@ -97,17 +97,17 @@ class DocType:
return periods
# ====================================================================================
def update_opening(self):
def update_opening(self, company):
"""
set opening from last year closing
"""
abl = sql("select t1.account, t1.balance from `tabAccount Balance` t1, tabAccount t2 where t1.period= '%s' and t2.company= '%s' and ifnull(t2.is_pl_account, 'No') = 'No' and t1.account = t2.name for update" % (self.doc.past_year, self.doc.company))
abl = sql("select t1.account, t1.balance from `tabAccount Balance` t1, tabAccount t2 where t1.period= '%s' and t2.company= '%s' and ifnull(t2.is_pl_account, 'No') = 'No' and t1.account = t2.name for update" % (self.doc.past_year, company))
cnt = 0
for ab in abl:
if cnt % 100 == 0:
if cnt % 100 == 0:
sql("commit")
sql("start transaction")
@ -200,10 +200,19 @@ class DocType:
def create_periods(self):
get_obj('Period Control').generate_periods(self.doc.name)
def validate(self):
if sql("select name from `tabFiscal Year` where year_start_date < %s", self.doc.year_start_date) and not self.doc.past_year:
msgprint("Please enter Past Year", raise_exception=1)
if not self.doc.is_fiscal_year_closed:
self.doc.is_fiscal_year_closed = 'No'
# on update
def on_update(self):
if not self.doc.is_fiscal_year_closed:
self.is_fiscal_year_closed = 'No'
self.doc.save()
self.create_periods()
self.create_account_balances()
if self.doc.fields.get('localname', '')[:15] == 'New Fiscal Year':
for d in sql("select name from tabCompany"):
self.update_opening(d[0])

View File

@ -151,12 +151,9 @@ class DocType:
# amount to debit
amt = flt(self.doc.debit) - flt(self.doc.credit)
if det[0][2] == 'Credit': amt = -amt
if cancel:
debit = -1 * flt(self.doc.credit)
credit = -1 * flt(self.doc.debit)
else:
debit = flt(self.doc.debit)
credit = flt(self.doc.credit)
debit = cancel and -1 * flt(self.doc.credit) or flt(self.doc.debit)
credit = cancel and -1 * flt(self.doc.debit) or flt(self.doc.credit)
self.create_new_balances(det)
@ -174,6 +171,7 @@ class DocType:
,'fiscal_year': self.doc.fiscal_year
}
# Update account balance for current year
sql("""update `tabAccount Balance` ab, `tabAccount` a
set
ab.debit = ifnull(ab.debit,0) + %(debit)s
@ -187,6 +185,34 @@ class DocType:
%(end_date_condition)s
and ab.fiscal_year = '%(fiscal_year)s' """ % p)
# Future year balances
# Update opening only where period_type is Year
sql("""update `tabAccount Balance` ab, `tabAccount` a, `tabFiscal Year` fy
set
ab.opening = ifnull(ab.opening,0) + %(diff)s
where
a.lft <= %(lft)s
and a.rgt >= %(rgt)s
and ab.account = a.name
and ifnull(a.is_pl_account, 'No') = 'No'
and ab.period = ab.fiscal_year
and fy.name = ab.fiscal_year
and fy.year_start_date > %(posting_date)s""" % p)
# Update balance for all period for future years
sql("""update `tabAccount Balance` ab, `tabAccount` a, `tabFiscal Year` fy
set
ab.balance = ifnull(ab.balance,0) + %(diff)s
where
a.lft <= %(lft)s
and a.rgt >= %(rgt)s
and ab.account = a.name
and ifnull(a.is_pl_account, 'No') = 'No'
and fy.name = ab.fiscal_year
and fy.year_start_date > %(posting_date)s""" % p)
# Get periods(month and year)
#-----------------------------

View File

@ -58,6 +58,9 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
cur_frm.clear_custom_buttons();
cur_frm.cscript.dynamic_label(doc, cdt, cdn);
// Show / Hide button
if(doc.docstatus==1 && doc.outstanding_amount > 0)
cur_frm.add_custom_button('Make Payment Entry', cur_frm.cscript['Make Bank Voucher']);

View File

@ -166,6 +166,10 @@ class DocType(TransactionBase):
rate = sql("select tax_rate from `tabAccount` where name='%s'"%(acc))
ret={'add_tax_rate' :rate and flt(rate[0][0]) or 0 }
return ret
def get_comp_base_currency(self):
return get_obj('Purchase Common').get_comp_base_currency(self.doc.company)
# *************************** Server Utility Functions *****************************

File diff suppressed because it is too large Load Diff

View File

@ -5,195 +5,199 @@
{
'creation': '2010-08-08 17:09:16',
'docstatus': 0,
'modified': '2011-11-16 15:41:42',
'modified_by': 'Administrator',
'owner': 'wasim@webnotestech.com'
'modified': '2012-02-27 18:28:24',
'modified_by': u'Administrator',
'owner': u'wasim@webnotestech.com'
},
# These values are common for all DocType
{
'autoname': 'PVTD.######',
'colour': 'White:FFF',
'default_print_format': 'Standard',
'_last_update': u'1322549700',
'autoname': u'PVTD.######',
'colour': u'White:FFF',
'default_print_format': u'Standard',
'doctype': 'DocType',
'hide_heading': 1,
'istable': 1,
'module': 'Accounts',
'module': u'Accounts',
'name': '__common__',
'section_style': 'Tray',
'server_code_error': ' ',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 12
'version': 13
},
# These values are common for all DocField
{
'doctype': 'DocField',
'doctype': u'DocField',
'name': '__common__',
'parent': 'Purchase Tax Detail',
'parentfield': 'fields',
'parenttype': 'DocType'
'parent': u'Purchase Tax Detail',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# DocType, Purchase Tax Detail
{
'doctype': 'DocType',
'name': 'Purchase Tax Detail'
'name': u'Purchase Tax Detail'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'category',
'fieldtype': 'Select',
'label': 'Category',
'oldfieldname': 'category',
'oldfieldtype': 'Select',
'options': '\nFor Total\nFor Valuation\nFor Both',
'doctype': u'DocField',
'fieldname': u'category',
'fieldtype': u'Select',
'label': u'Category',
'oldfieldname': u'category',
'oldfieldtype': u'Select',
'options': u'\nFor Total\nFor Valuation\nFor Both',
'permlevel': 0,
'reqd': 1
},
# DocField
{
'default': 'Add',
'doctype': 'DocField',
'fieldname': 'add_deduct_tax',
'fieldtype': 'Select',
'label': 'Add or Deduct',
'oldfieldname': 'add_deduct_tax',
'oldfieldtype': 'Select',
'options': '\nAdd\nDeduct',
'default': u'Add',
'doctype': u'DocField',
'fieldname': u'add_deduct_tax',
'fieldtype': u'Select',
'label': u'Add or Deduct',
'oldfieldname': u'add_deduct_tax',
'oldfieldtype': u'Select',
'options': u'\nAdd\nDeduct',
'permlevel': 0,
'reqd': 1,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'charge_type',
'fieldtype': 'Select',
'label': 'Type',
'oldfieldname': 'charge_type',
'oldfieldtype': 'Select',
'options': '\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total',
'doctype': u'DocField',
'fieldname': u'charge_type',
'fieldtype': u'Select',
'label': u'Type',
'oldfieldname': u'charge_type',
'oldfieldtype': u'Select',
'options': u'\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total',
'permlevel': 0,
'reqd': 1,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'row_id',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'row_id',
'fieldtype': u'Data',
'hidden': 0,
'label': 'Enter Row',
'oldfieldname': 'row_id',
'oldfieldtype': 'Data',
'label': u'Enter Row',
'oldfieldname': u'row_id',
'oldfieldtype': u'Data',
'permlevel': 0,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_wise_tax_detail',
'fieldtype': 'Small Text',
'label': 'Item Wise Tax Detail ',
'oldfieldname': 'item_wise_tax_detail',
'oldfieldtype': 'Small Text',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'item_wise_tax_detail',
'fieldtype': u'Small Text',
'hidden': 1,
'label': u'Item Wise Tax Detail ',
'oldfieldname': u'item_wise_tax_detail',
'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'description',
'fieldtype': u'Small Text',
'label': u'Description',
'oldfieldname': u'description',
'oldfieldtype': u'Small Text',
'permlevel': 0,
'reqd': 1,
'width': u'300px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'account_head',
'fieldtype': u'Link',
'label': u'Account Head',
'oldfieldname': u'account_head',
'oldfieldtype': u'Link',
'options': u'Account',
'permlevel': 0,
'reqd': 1,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'cost_center',
'fieldtype': u'Link',
'label': u'Cost Center',
'oldfieldname': u'cost_center',
'oldfieldtype': u'Link',
'options': u'Cost Center',
'permlevel': 0,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'rate',
'fieldtype': u'Currency',
'label': u'Rate',
'oldfieldname': u'rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 0,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'tax_amount',
'fieldtype': u'Currency',
'label': u'Amount',
'oldfieldname': u'tax_amount',
'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 0,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'total',
'fieldtype': u'Currency',
'label': u'Aggregate Total',
'oldfieldname': u'total',
'oldfieldtype': u'Currency',
'permlevel': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'description',
'fieldtype': 'Small Text',
'label': 'Description',
'oldfieldname': 'description',
'oldfieldtype': 'Small Text',
'permlevel': 0,
'reqd': 1,
'width': '300px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'account_head',
'fieldtype': 'Link',
'label': 'Account Head',
'oldfieldname': 'account_head',
'oldfieldtype': 'Link',
'options': 'Account',
'permlevel': 0,
'reqd': 1,
'trigger': 'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'cost_center',
'fieldtype': 'Link',
'label': 'Cost Center',
'oldfieldname': 'cost_center',
'oldfieldtype': 'Link',
'options': 'Cost Center',
'permlevel': 0,
'trigger': 'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'rate',
'fieldtype': 'Currency',
'label': 'Rate',
'oldfieldname': 'rate',
'oldfieldtype': 'Currency',
'permlevel': 0,
'reqd': 0,
'trigger': 'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'tax_amount',
'fieldtype': 'Currency',
'label': 'Amount',
'oldfieldname': 'tax_amount',
'oldfieldtype': 'Currency',
'permlevel': 0,
'reqd': 0,
'trigger': 'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'total',
'fieldtype': 'Currency',
'label': 'Aggregate Total',
'oldfieldname': 'total',
'oldfieldtype': 'Currency',
'permlevel': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'parenttype',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'parenttype',
'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
'label': 'Parenttype',
'oldfieldname': 'parenttype',
'oldfieldtype': 'Data',
'label': u'Parenttype',
'oldfieldname': u'parenttype',
'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'search_index': 0
@ -201,15 +205,15 @@
# DocField
{
'description': 'Cheating Field\nPlease do not delete ',
'doctype': 'DocField',
'fieldname': 'total_tax_amount',
'fieldtype': 'Currency',
'description': u'Cheating Field\nPlease do not delete ',
'doctype': u'DocField',
'fieldname': u'total_tax_amount',
'fieldtype': u'Currency',
'hidden': 1,
'label': 'Total +Tax',
'label': u'Total +Tax',
'no_copy': 1,
'oldfieldname': 'total_tax_amount',
'oldfieldtype': 'Currency',
'oldfieldname': u'total_tax_amount',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
@ -217,15 +221,15 @@
# DocField
{
'description': 'Cheating Field\nPlease do not delete ',
'doctype': 'DocField',
'fieldname': 'total_amount',
'fieldtype': 'Currency',
'description': u'Cheating Field\nPlease do not delete ',
'doctype': u'DocField',
'fieldname': u'total_amount',
'fieldtype': u'Currency',
'hidden': 1,
'label': 'Tax Amount',
'label': u'Tax Amount',
'no_copy': 1,
'oldfieldname': 'total_amount',
'oldfieldtype': 'Currency',
'oldfieldname': u'total_amount',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1

View File

@ -5,67 +5,67 @@
{
'creation': '2010-08-08 17:09:17',
'docstatus': 0,
'modified': '2011-12-14 10:44:21',
'modified_by': 'Administrator',
'owner': 'Administrator'
'modified': '2012-02-27 18:42:06',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'autoname': 'EVD.######',
'colour': 'White:FFF',
'default_print_format': 'Standard',
'autoname': u'EVD.######',
'colour': u'White:FFF',
'default_print_format': u'Standard',
'doctype': 'DocType',
'istable': 1,
'module': 'Accounts',
'module': u'Accounts',
'name': '__common__',
'section_style': 'Tray',
'server_code_error': ' ',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 42
'version': 43
},
# These values are common for all DocField
{
'doctype': 'DocField',
'doctype': u'DocField',
'name': '__common__',
'parent': 'PV Detail',
'parentfield': 'fields',
'parenttype': 'DocType'
'parent': u'PV Detail',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# DocType, PV Detail
{
'doctype': 'DocType',
'name': 'PV Detail'
'name': u'PV Detail'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_code',
'fieldtype': 'Link',
'doctype': u'DocField',
'fieldname': u'item_code',
'fieldtype': u'Link',
'in_filter': 1,
'label': 'Item',
'oldfieldname': 'item_code',
'oldfieldtype': 'Link',
'options': 'Item',
'label': u'Item',
'oldfieldname': u'item_code',
'oldfieldtype': u'Link',
'options': u'Item',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'search_index': 1,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_name',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'item_name',
'fieldtype': u'Data',
'in_filter': 0,
'label': 'Item Name',
'oldfieldname': 'item_name',
'oldfieldtype': 'Data',
'label': u'Item Name',
'oldfieldname': u'item_name',
'oldfieldtype': u'Data',
'permlevel': 0,
'reqd': 1,
'search_index': 0
@ -73,108 +73,108 @@
# DocField
{
'doctype': 'DocField',
'fieldname': 'description',
'fieldtype': 'Text',
'label': 'Description',
'oldfieldname': 'description',
'oldfieldtype': 'Text',
'doctype': u'DocField',
'fieldname': u'description',
'fieldtype': u'Text',
'label': u'Description',
'oldfieldname': u'description',
'oldfieldtype': u'Text',
'permlevel': 0,
'width': '300px'
'width': u'300px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'qty',
'fieldtype': 'Currency',
'label': 'Qty',
'oldfieldname': 'qty',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'qty',
'fieldtype': u'Currency',
'label': u'Qty',
'oldfieldname': u'qty',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'import_ref_rate',
'fieldtype': 'Currency',
'label': 'Ref Rate ',
'doctype': u'DocField',
'fieldname': u'import_ref_rate',
'fieldtype': u'Currency',
'label': u'Ref Rate ',
'permlevel': 0,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'discount_rate',
'fieldtype': 'Currency',
'label': 'Discount %',
'doctype': u'DocField',
'fieldname': u'discount_rate',
'fieldtype': u'Currency',
'label': u'Discount %',
'permlevel': 0,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'import_rate',
'fieldtype': 'Currency',
'label': 'Rate ',
'oldfieldname': 'import_rate',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'import_rate',
'fieldtype': u'Currency',
'label': u'Rate ',
'oldfieldname': u'import_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'import_amount',
'fieldtype': 'Currency',
'label': 'Amount',
'oldfieldname': 'import_amount',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'import_amount',
'fieldtype': u'Currency',
'label': u'Amount',
'oldfieldname': u'import_amount',
'oldfieldtype': u'Currency',
'permlevel': 1,
'reqd': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'purchase_ref_rate',
'fieldtype': 'Currency',
'label': 'Ref Rate *',
'doctype': u'DocField',
'fieldname': u'purchase_ref_rate',
'fieldtype': u'Currency',
'label': u'Ref Rate *',
'permlevel': 0,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'rate',
'fieldtype': 'Currency',
'label': 'Rate *(Default Curr.)',
'oldfieldname': 'rate',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'rate',
'fieldtype': u'Currency',
'label': u'Rate *(Default Curr.)',
'oldfieldname': u'rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'amount',
'fieldtype': 'Currency',
'label': 'Amount (Default Curr.)',
'oldfieldname': 'amount',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'amount',
'fieldtype': u'Currency',
'label': u'Amount (Default Curr.)',
'oldfieldname': u'amount',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 1
@ -182,102 +182,74 @@
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'expense_head',
'fieldtype': 'Link',
'label': 'Expense Head',
'oldfieldname': 'expense_head',
'oldfieldtype': 'Link',
'options': 'Account',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'expense_head',
'fieldtype': u'Link',
'label': u'Expense Head',
'oldfieldname': u'expense_head',
'oldfieldtype': u'Link',
'options': u'Account',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'trigger': 'Client',
'width': '120px'
'trigger': u'Client',
'width': u'120px'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'cost_center',
'fieldtype': 'Link',
'label': 'Cost Center',
'oldfieldname': 'cost_center',
'oldfieldtype': 'Link',
'options': 'Cost Center',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'cost_center',
'fieldtype': u'Link',
'label': u'Cost Center',
'oldfieldname': u'cost_center',
'oldfieldtype': u'Link',
'options': u'Cost Center',
'permlevel': 0,
'print_hide': 1,
'trigger': 'Client',
'width': '120px'
'trigger': u'Client',
'width': u'120px'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'project_name',
'fieldtype': 'Link',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'project_name',
'fieldtype': u'Link',
'in_filter': 1,
'label': 'Project Name',
'options': 'Project',
'label': u'Project Name',
'options': u'Project',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'brand',
'fieldtype': 'Data',
'label': 'Brand',
'oldfieldname': 'brand',
'oldfieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'brand',
'fieldtype': u'Data',
'hidden': 1,
'label': u'Brand',
'oldfieldname': u'brand',
'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_group',
'fieldtype': 'Link',
'in_filter': 1,
'label': 'Item Group',
'oldfieldname': 'item_group',
'oldfieldtype': 'Link',
'options': 'Item Group',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'purchase_order',
'fieldtype': 'Link',
'in_filter': 1,
'label': 'Pur Order',
'oldfieldname': 'purchase_order',
'oldfieldtype': 'Link',
'options': 'Purchase Order',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'po_detail',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'item_group',
'fieldtype': u'Link',
'hidden': 1,
'in_filter': 1,
'label': 'PO Detail',
'oldfieldname': 'po_detail',
'oldfieldtype': 'Data',
'label': u'Item Group',
'oldfieldname': u'item_group',
'oldfieldtype': u'Link',
'options': u'Item Group',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@ -285,14 +257,14 @@
# DocField
{
'doctype': 'DocField',
'fieldname': 'purchase_receipt',
'fieldtype': 'Link',
'doctype': u'DocField',
'fieldname': u'purchase_order',
'fieldtype': u'Link',
'in_filter': 1,
'label': 'Pur Receipt',
'oldfieldname': 'purchase_receipt',
'oldfieldtype': 'Link',
'options': 'Purchase Receipt',
'label': u'Pur Order',
'oldfieldname': u'purchase_order',
'oldfieldtype': u'Link',
'options': u'Purchase Order',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@ -300,14 +272,14 @@
# DocField
{
'doctype': 'DocField',
'fieldname': 'pr_detail',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'po_detail',
'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
'label': 'PR Detail',
'oldfieldname': 'pr_detail',
'oldfieldtype': 'Data',
'label': u'PO Detail',
'oldfieldname': u'po_detail',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@ -315,13 +287,44 @@
# DocField
{
'description': 'Tax detail table fetched from item master as a string and stored in this field.\nUsed for Purchase Other Charges',
'doctype': 'DocField',
'fieldname': 'item_tax_rate',
'fieldtype': 'Small Text',
'label': 'Item Tax Rate',
'oldfieldname': 'item_tax_rate',
'oldfieldtype': 'Small Text',
'doctype': u'DocField',
'fieldname': u'purchase_receipt',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Pur Receipt',
'oldfieldname': u'purchase_receipt',
'oldfieldtype': u'Link',
'options': u'Purchase Receipt',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'pr_detail',
'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
'label': u'PR Detail',
'oldfieldname': u'pr_detail',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
},
# DocField
{
'description': u'Tax detail table fetched from item master as a string and stored in this field.\nUsed for Purchase Other Charges',
'doctype': u'DocField',
'fieldname': u'item_tax_rate',
'fieldtype': u'Small Text',
'hidden': 1,
'label': u'Item Tax Rate',
'oldfieldname': u'item_tax_rate',
'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1
@ -330,10 +333,10 @@
# DocField
{
'allow_on_submit': 1,
'doctype': 'DocField',
'fieldname': 'page_break',
'fieldtype': 'Check',
'label': 'Page Break',
'doctype': u'DocField',
'fieldname': u'page_break',
'fieldtype': u'Check',
'label': u'Page Break',
'no_copy': 1,
'permlevel': 0,
'print_hide': 1,

View File

@ -69,24 +69,19 @@ cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
// Hide Fields
// ------------
cur_frm.cscript.hide_fields = function(doc, cdt, cdn) {
par_flds = ['project_name', 'due_date', 'posting_time', 'sales_order_main', 'delivery_note_main', 'Get Items', 'is_opening', 'conversion_rate', 'source', 'cancel_reason', 'total_advance', 'gross_profit', 'gross_profit_percent', 'Get Advances Received', 'advance_adjustment_details', 'sales_partner', 'commission_rate', 'total_commission', 'Repair Outstanding Amt'];
par_flds = ['project_name', 'due_date', 'sales_order_main', 'delivery_note_main', 'Get Items', 'is_opening', 'conversion_rate', 'source', 'cancel_reason', 'total_advance', 'gross_profit', 'gross_profit_percent', 'Get Advances Received', 'advance_adjustment_details', 'sales_partner', 'commission_rate', 'total_commission', 'Repair Outstanding Amt'];
ch_flds = {'entries': ['sales_order', 'delivery_note']}
item_flds_normal = ['sales_order', 'delivery_note']
item_flds_pos = ['warehouse', 'serial_no', 'batch_no', 'actual_qty', 'delivered_qty']
if(cint(doc.is_pos) == 1) {
hide_field(par_flds);
for(t in ch_flds) {
for(f in ch_flds[t]) {
cur_frm.fields_dict[t].grid.set_column_disp(ch_flds[t][f], false);
}
}
hide_field(par_flds);
for(f in item_flds_normal) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_normal[f], false);
for(f in item_flds_pos) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_pos[f], (doc.update_stock==1?true:false));
} else {
unhide_field(par_flds);
for (t in ch_flds) {
for (f in ch_flds[t]) {
cur_frm.fields_dict[t].grid.set_column_disp(ch_flds[t][f], true);
}
}
for(f in item_flds_normal) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_normal[f], true);
for(f in item_flds_pos) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_pos[f], false);
}
// India related fields
@ -100,9 +95,14 @@ cur_frm.cscript.hide_fields = function(doc, cdt, cdn) {
// Refresh
// -------
cur_frm.cscript.refresh = function(doc, dt, dn) {
cur_frm.cscript.is_opening(doc, dt, dn);
cur_frm.cscript.hide_fields(doc, cdt, cdn);
cur_frm.cscript.hide_fields(doc, dt, dn);
var callback = function() {
cur_frm.cscript.dynamic_label(doc, dt, dn);
}
cur_frm.cscript.hide_price_list_currency(doc, dt, dn, callback);
// Show / Hide button
cur_frm.clear_custom_buttons();
@ -125,7 +125,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
//fetch retail transaction related fields
//--------------------------------------------
cur_frm.cscript.is_pos = function(doc,dt,dn,callback){
cur_frm.cscript.hide_fields(doc, cdt, cdn);
cur_frm.cscript.hide_fields(doc, dt, dn);
if(doc.is_pos == 1){
if (!doc.company) {
msgprint("Please select company to proceed");
@ -143,6 +143,11 @@ cur_frm.cscript.is_pos = function(doc,dt,dn,callback){
}
cur_frm.cscript.update_stock = function(doc, dt, dn) {
cur_frm.cscript.hide_fields(doc, dt, dn);
}
cur_frm.cscript.warehouse = function(doc, cdt , cdn) {
var d = locals[cdt][cdn];
if (!d.item_code) {alert("please enter item code first"); return};

View File

@ -23,7 +23,6 @@ from webnotes.model.doc import Document, addchild, removechild, getchildren, mak
from webnotes.model.doclist import getlist, copy_doclist
from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
from webnotes import session, form, is_testing, msgprint, errprint
from webnotes.utils.scheduler import set_event, cancel_event, Scheduler
in_transaction = webnotes.conn.in_transaction
convert_to_lists = webnotes.conn.convert_to_lists
@ -90,9 +89,9 @@ class DocType(TransactionBase):
for d in getlist(self.doclist,'entries'):
# overwrite if mentioned in item
item = webnotes.conn.sql("select default_income_account, default_sales_cost_center, default_warehouse from tabItem where name = '%s'" %(d.item_code), as_dict=1)
d.income_account = item and item[0]['default_income_account'] or dtl and dtl[0]['income_account'] or ''
d.cost_center = item and item[0]['default_sales_cost_center'] or dtl and dtl[0]['cost_center'] or ''
d.warehouse = item and item[0]['default_warehouse'] or dtl and dtl[0]['warehouse'] or ''
d.income_account = item and item[0]['default_income_account'] or dtl and dtl[0]['income_account'] or d.income_account
d.cost_center = item and item[0]['default_sales_cost_center'] or dtl and dtl[0]['cost_center'] or d.cost_center
d.warehouse = item and item[0]['default_warehouse'] or dtl and dtl[0]['warehouse'] or d.warehouse
@ -167,31 +166,36 @@ class DocType(TransactionBase):
# Item Details
# -------------
def get_item_details(self, item_code=None):
if item_code:
ret = get_obj('Sales Common').get_item_details(item_code, self)
return self.get_pos_details(item_code, ret)
def get_item_details(self, args=None):
args = eval(args)
if args['item_code']:
ret = get_obj('Sales Common').get_item_details(args, self)
return self.get_pos_details(args, ret)
else:
obj = get_obj('Sales Common')
for doc in self.doclist:
if doc.fields.get('item_code'):
ret = obj.get_item_details(doc.item_code, self)
ret = self.get_pos_details(item_code, ret)
ret = self.get_pos_details(doc.item_code, ret)
for r in ret:
if not doc.fields.get(r):
doc.fields[r] = ret[r]
doc.fields[r] = ret[r]
def get_pos_details(self, item_code, ret):
if item_code and cint(self.doc.is_pos) == 1:
def get_pos_details(self, args, ret):
if args['item_code'] and cint(self.doc.is_pos) == 1:
dtl = webnotes.conn.sql("select income_account, warehouse, cost_center from `tabPOS Setting` where user = '%s' and company = '%s'" % (session['user'], self.doc.company), as_dict=1)
if not dtl:
dtl = webnotes.conn.sql("select income_account, warehouse, cost_center from `tabPOS Setting` where ifnull(user,'') = '' and company = '%s'" % (self.doc.company), as_dict=1)
if dtl and not ret['income_account'] and dtl[0]['income_account']: ret['income_account'] = dtl and dtl[0]['income_account']
if dtl and not ret['cost_center'] and dtl[0]['cost_center']: ret['cost_center'] = dtl and dtl[0]['cost_center']
if dtl and not ret['warehouse'] and dtl[0]['warehouse']: ret['warehouse'] = dtl and dtl[0]['warehouse']
item = webnotes.conn.sql("select default_income_account, default_sales_cost_center, default_warehouse from tabItem where name = '%s'" %(args['item_code']), as_dict=1)
ret['income_account'] = item and item[0]['default_income_account'] or dtl and dtl[0]['income_account'] or args['income_account']
ret['cost_center'] = item and item[0]['default_sales_cost_center'] or dtl and dtl[0]['cost_center'] or args['cost_center']
ret['warehouse'] = item and item[0]['default_warehouse'] or dtl and dtl[0]['warehouse'] or args['warehouse']
if ret['warehouse']:
actual_qty = webnotes.conn.sql("select actual_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (item_code, ret['warehouse']))
actual_qty = webnotes.conn.sql("select actual_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (args['item_code'], ret['warehouse']))
ret['actual_qty']= actual_qty and flt(actual_qty[0][0]) or 0
return ret
@ -201,6 +205,14 @@ class DocType(TransactionBase):
get_obj('Sales Common').get_adj_percent(self)
def get_comp_base_currency(self):
return get_obj('Sales Common').get_comp_base_currency(self.doc.company)
def get_price_list_currency(self):
return get_obj('Sales Common').get_price_list_currency(self.doc.price_list_name, self.doc.company)
# Get tax rate if account type is tax
# ------------------------------------
def get_rate(self,arg):
@ -692,29 +704,6 @@ class DocType(TransactionBase):
elif self.doc.recurring_id:
webnotes.conn.sql("""update `tabReceivable Voucher` set convert_into_recurring_invoice = 0 where recurring_id = %s""", self.doc.recurring_id)
self.manage_scheduler()
def manage_scheduler(self):
""" set/cancel event in scheduler """
event = 'accounts.doctype.gl_control.gl_control.manage_recurring_invoices'
if webnotes.conn.sql("select name from `tabReceivable Voucher` where ifnull(convert_into_recurring_invoice, 0) = 1 and next_date <= end_date"):
if not self.check_event_exists(event):
set_event(event, interval = 60*60, recurring = 1)
else:
cancel_event(event)
def check_event_exists(self, event):
try:
ev = Scheduler().get_events()
except:
msgprint("Scheduler database not exists. Please mail to support@erpnext.com", raise_exception=1)
if event in [d['event'] for d in ev]:
return 1
def set_next_date(self):
""" Set next date on which auto invoice will be created"""

View File

@ -5,7 +5,7 @@
{
'creation': '2010-08-08 17:09:18',
'docstatus': 0,
'modified': '2012-02-15 14:24:14',
'modified': '2012-02-27 17:34:46',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@ -21,7 +21,7 @@
# These values are common for all DocType
{
'_last_update': u'1329295537',
'_last_update': u'1330344021',
'change_log': u'1. Change in pull_details method dt.-26-06-2009',
'colour': u'White:FFF',
'default_print_format': u'Standard',
@ -34,7 +34,7 @@
'server_code_error': u' ',
'show_in_menu': 0,
'subject': u'To %(customer_name)s worth %(currency)s %(grand_total_export)s due on %(due_date)s | %(outstanding_amount)s outstanding',
'version': 394
'version': 414
},
# These values are common for all DocFormat
@ -337,18 +337,32 @@
{
'colour': u'White:FFF',
'default': u'Today',
'description': u"This is the date on which this voucher is made in the system. Today's date comes by default.",
'description': u'The date at which current entry will get or has actually executed.',
'doctype': u'DocField',
'fieldname': u'voucher_date',
'fieldname': u'posting_date',
'fieldtype': u'Date',
'in_filter': 1,
'label': u'Voucher Date',
'label': u'Posting Date',
'no_copy': 1,
'oldfieldname': u'voucher_date',
'oldfieldname': u'posting_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
'search_index': 0
'search_index': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'posting_time',
'fieldtype': u'Time',
'label': u'Posting Time',
'no_copy': 1,
'oldfieldname': u'posting_time',
'oldfieldtype': u'Time',
'permlevel': 0,
'print_hide': 1
},
# DocField
@ -369,38 +383,6 @@
'search_index': 0
},
# DocField
{
'colour': u'White:FFF',
'default': u'Today',
'description': u'The date at which current entry will get or has actually executed.',
'doctype': u'DocField',
'fieldname': u'posting_date',
'fieldtype': u'Date',
'in_filter': 1,
'label': u'Posting Date',
'no_copy': 1,
'oldfieldname': u'posting_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'posting_time',
'fieldtype': u'Time',
'label': u'Posting Time',
'no_copy': 1,
'oldfieldname': u'posting_time',
'oldfieldtype': u'Time',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'description': u'The date at which current entry is corrected in the system.',
@ -509,7 +491,7 @@
# DocField
{
'colour': u'White:FFF',
'description': u'Rate at which Price list currency is converted to your currency',
'description': u"Rate at which Price list currency is converted to customer's base currency",
'doctype': u'DocField',
'fieldname': u'plc_conversion_rate',
'fieldtype': u'Currency',
@ -543,7 +525,9 @@
# DocField
{
'colour': u'White:FFF',
'default': u'1.00',
'description': u"Rate at which Customer Currency is converted to customer's base currency",
'doctype': u'DocField',
'fieldname': u'conversion_rate',
'fieldtype': u'Currency',
@ -600,6 +584,7 @@
{
'doctype': u'DocField',
'fieldtype': u'Section Break',
'options': u'Simple',
'permlevel': 0
},
@ -825,290 +810,6 @@
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'Section Break',
'label': u'Terms',
'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'tc_name',
'fieldtype': u'Link',
'label': u'Select Terms',
'oldfieldname': u'tc_name',
'oldfieldtype': u'Link',
'options': u'Term',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'Button',
'label': u'Get Terms',
'oldfieldtype': u'Button',
'options': u'get_tc_details',
'permlevel': 0,
'print_hide': 1,
'trigger': u'Server'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'HTML',
'label': u'Terms HTML',
'oldfieldtype': u'HTML',
'options': u'You can add Terms and Notes that will be printed in the Transaction',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'terms',
'fieldtype': u'Text Editor',
'label': u'Term Details',
'oldfieldname': u'terms',
'oldfieldtype': u'Text Editor',
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'Section Break',
'label': u'More Info',
'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'Column Break',
'oldfieldtype': u'Column Break',
'permlevel': 0,
'print_hide': 1,
'width': u'50%'
},
# DocField
{
'colour': u'White:FFF',
'default': u'No',
'doctype': u'DocField',
'fieldname': u'is_opening',
'fieldtype': u'Select',
'in_filter': 1,
'label': u'Is Opening',
'oldfieldname': u'is_opening',
'oldfieldtype': u'Select',
'options': u'No\nYes',
'permlevel': 0,
'print_hide': 1,
'search_index': 0,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'aging_date',
'fieldtype': u'Date',
'label': u'Aging Date',
'oldfieldname': u'aging_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'allow_on_submit': 1,
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'letter_head',
'fieldtype': u'Select',
'label': u'Letter Head',
'oldfieldname': u'letter_head',
'oldfieldtype': u'Select',
'options': u'link:Letter Head',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'source',
'fieldtype': u'Select',
'label': u'Source',
'oldfieldname': u'source',
'oldfieldtype': u'Select',
'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',
'depends_on': u"eval:doc.source == 'Campaign'",
'doctype': u'DocField',
'fieldname': u'campaign',
'fieldtype': u'Link',
'label': u'Campaign',
'oldfieldname': u'campaign',
'oldfieldtype': u'Link',
'options': u'Campaign',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'allow_on_submit': 1,
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'select_print_heading',
'fieldtype': u'Link',
'label': u'Select Print Heading',
'no_copy': 1,
'oldfieldname': u'select_print_heading',
'oldfieldtype': u'Link',
'options': u'Print Heading',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1,
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
'description': u'Track this Sales Invoice against any Project',
'doctype': u'DocField',
'fieldname': u'project_name',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Project Name',
'oldfieldname': u'project_name',
'oldfieldtype': u'Link',
'options': u'Project',
'permlevel': 0,
'search_index': 1,
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'Column Break',
'oldfieldtype': u'Column Break',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'c_form_applicable',
'fieldtype': u'Select',
'label': u'C-Form Applicable',
'no_copy': 1,
'options': u'No\nYes',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'c_form_no',
'fieldtype': u'Link',
'label': u'C-Form No',
'no_copy': 1,
'options': u'C-Form',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'company',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Company',
'oldfieldname': u'company',
'oldfieldtype': u'Link',
'options': u'Company',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'fiscal_year',
'fieldtype': u'Select',
'in_filter': 1,
'label': u'Fiscal Year',
'no_copy': 0,
'oldfieldname': u'fiscal_year',
'oldfieldtype': u'Select',
'options': u'link:Fiscal Year',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0
},
# DocField
{
'colour': u'White:FFF',
'depends_on': u'eval:!doc.__islocal',
'doctype': u'DocField',
'fieldname': u'cancel_reason',
'fieldtype': u'Data',
'label': u'Cancel Reason',
'oldfieldname': u'cancel_reason',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'remarks',
'fieldtype': u'Small Text',
'label': u'Remarks',
'no_copy': 1,
'oldfieldname': u'remarks',
'oldfieldtype': u'Text',
'permlevel': 0,
'print_hide': 1,
'reqd': 0
},
# DocField
{
'colour': u'White:FFF',
@ -1238,7 +939,6 @@
# DocField
{
'colour': u'White:FFF',
'description': u'In Words (Export) will be visible once you save the Sales Invoice.',
'doctype': u'DocField',
'fieldname': u'in_words_export',
'fieldtype': u'Data',
@ -1278,6 +978,309 @@
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'Section Break',
'label': u'Terms',
'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'tc_name',
'fieldtype': u'Link',
'label': u'Select Terms',
'oldfieldname': u'tc_name',
'oldfieldtype': u'Link',
'options': u'Term',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'Button',
'label': u'Get Terms',
'oldfieldtype': u'Button',
'options': u'get_tc_details',
'permlevel': 0,
'print_hide': 1,
'trigger': u'Server'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'HTML',
'label': u'Terms HTML',
'oldfieldtype': u'HTML',
'options': u'You can add Terms and Notes that will be printed in the Transaction',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'terms',
'fieldtype': u'Text Editor',
'label': u'Term Details',
'oldfieldname': u'terms',
'oldfieldtype': u'Text Editor',
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'Section Break',
'label': u'More Info',
'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'Column Break',
'oldfieldtype': u'Column Break',
'permlevel': 0,
'print_hide': 1,
'width': u'50%'
},
# DocField
{
'colour': u'White:FFF',
'default': u'No',
'doctype': u'DocField',
'fieldname': u'is_opening',
'fieldtype': u'Select',
'in_filter': 1,
'label': u'Is Opening',
'oldfieldname': u'is_opening',
'oldfieldtype': u'Select',
'options': u'No\nYes',
'permlevel': 0,
'print_hide': 1,
'search_index': 0,
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
'default': u'Today',
'description': u"This is the date on which this voucher is made in the system. Today's date comes by default.",
'doctype': u'DocField',
'fieldname': u'voucher_date',
'fieldtype': u'Date',
'in_filter': 1,
'label': u'Voucher Date',
'no_copy': 1,
'oldfieldname': u'voucher_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'reqd': 1,
'search_index': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'aging_date',
'fieldtype': u'Date',
'label': u'Aging Date',
'oldfieldname': u'aging_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'allow_on_submit': 1,
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'letter_head',
'fieldtype': u'Select',
'label': u'Letter Head',
'oldfieldname': u'letter_head',
'oldfieldtype': u'Select',
'options': u'link:Letter Head',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'c_form_applicable',
'fieldtype': u'Select',
'label': u'C-Form Applicable',
'no_copy': 1,
'options': u'No\nYes',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'c_form_no',
'fieldtype': u'Link',
'label': u'C-Form No',
'no_copy': 1,
'options': u'C-Form',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',
'depends_on': u"eval:doc.source == 'Campaign'",
'doctype': u'DocField',
'fieldname': u'campaign',
'fieldtype': u'Link',
'label': u'Campaign',
'oldfieldname': u'campaign',
'oldfieldtype': u'Link',
'options': u'Campaign',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',
'description': u'Track this Sales Invoice against any Project',
'doctype': u'DocField',
'fieldname': u'project_name',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Project Name',
'oldfieldname': u'project_name',
'oldfieldtype': u'Link',
'options': u'Project',
'permlevel': 0,
'search_index': 1,
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'Column Break',
'oldfieldtype': u'Column Break',
'permlevel': 0
},
# DocField
{
'allow_on_submit': 1,
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'select_print_heading',
'fieldtype': u'Link',
'label': u'Select Print Heading',
'no_copy': 1,
'oldfieldname': u'select_print_heading',
'oldfieldtype': u'Link',
'options': u'Print Heading',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'source',
'fieldtype': u'Select',
'label': u'Source',
'oldfieldname': u'source',
'oldfieldtype': u'Select',
'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'company',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Company',
'oldfieldname': u'company',
'oldfieldtype': u'Link',
'options': u'Company',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'fiscal_year',
'fieldtype': u'Select',
'in_filter': 1,
'label': u'Fiscal Year',
'no_copy': 0,
'oldfieldname': u'fiscal_year',
'oldfieldtype': u'Select',
'options': u'link:Fiscal Year',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0
},
# DocField
{
'colour': u'White:FFF',
'depends_on': u'eval:!doc.__islocal',
'doctype': u'DocField',
'fieldname': u'cancel_reason',
'fieldtype': u'Data',
'label': u'Cancel Reason',
'oldfieldname': u'cancel_reason',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'remarks',
'fieldtype': u'Small Text',
'label': u'Remarks',
'no_copy': 1,
'oldfieldname': u'remarks',
'oldfieldtype': u'Text',
'permlevel': 0,
'print_hide': 1,
'reqd': 0
},
# DocField
{
'colour': u'White:FFF',
'depends_on': u'eval:!doc.is_pos',
'doctype': u'DocField',
'fieldtype': u'Section Break',
'label': u'Advances',
'oldfieldtype': u'Section Break',
'permlevel': 0,
@ -1326,7 +1329,7 @@
'oldfieldtype': u'Column Break',
'permlevel': 0,
'print_hide': 1,
'width': u'45%'
'width': u'50%'
},
# DocField
@ -1344,6 +1347,17 @@
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'Column Break',
'oldfieldtype': u'Column Break',
'permlevel': 0,
'print_hide': 1,
'width': u'50%'
},
# DocField
{
'doctype': u'DocField',
@ -1373,13 +1387,10 @@
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'Column Break',
'oldfieldtype': u'Column Break',
'permlevel': 0,
'print_hide': 1,
'width': u'55%'
'fieldtype': u'Section Break',
'options': u'Simple',
'permlevel': 0
},
# DocField
@ -1395,33 +1406,6 @@
'print_hide': 1
},
# DocField
{
'allow_on_submit': 1,
'doctype': u'DocField',
'fieldtype': u'Button',
'label': u'Repair Outstanding Amt',
'oldfieldtype': u'Button',
'options': u'repair_rv_outstanding',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'against_income_account',
'fieldtype': u'Small Text',
'hidden': 1,
'label': u'Against Income Account',
'no_copy': 1,
'oldfieldname': u'against_income_account',
'oldfieldtype': u'Small Text',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
},
# DocField
{
'depends_on': u'eval:doc.docstatus==1',
@ -1530,5 +1514,32 @@
'no_copy': 1,
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'against_income_account',
'fieldtype': u'Small Text',
'hidden': 1,
'label': u'Against Income Account',
'no_copy': 1,
'oldfieldname': u'against_income_account',
'oldfieldtype': u'Small Text',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
},
# DocField
{
'allow_on_submit': 1,
'doctype': u'DocField',
'fieldtype': u'Button',
'label': u'Repair Outstanding Amt',
'oldfieldtype': u'Button',
'options': u'repair_rv_outstanding',
'permlevel': 0,
'print_hide': 1
}
]

View File

@ -5,209 +5,199 @@
{
'creation': '2010-08-08 17:09:20',
'docstatus': 0,
'modified': '2011-06-20 13:02:03',
'modified_by': 'Administrator',
'owner': 'Administrator'
'modified': '2012-02-24 16:14:38',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'autoname': 'INVD.######',
'colour': 'White:FFF',
'autoname': u'INVD.######',
'colour': u'White:FFF',
'default_print_format': u'Standard',
'doctype': 'DocType',
'istable': 1,
'module': 'Accounts',
'module': u'Accounts',
'name': '__common__',
'section_style': 'Tray',
'server_code_error': ' ',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 22
'version': 25
},
# These values are common for all DocField
{
'doctype': 'DocField',
'doctype': u'DocField',
'name': '__common__',
'parent': 'RV Detail',
'parentfield': 'fields',
'parenttype': 'DocType'
'parent': u'RV Detail',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# DocType, RV Detail
{
'doctype': 'DocType',
'name': 'RV Detail'
'name': u'RV Detail'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_code',
'fieldtype': 'Link',
'idx': 1,
'doctype': u'DocField',
'fieldname': u'item_code',
'fieldtype': u'Link',
'in_filter': 1,
'label': 'Item',
'oldfieldname': 'item_code',
'oldfieldtype': 'Link',
'options': 'Item',
'label': u'Item',
'oldfieldname': u'item_code',
'oldfieldtype': u'Link',
'options': u'Item',
'permlevel': 0,
'print_hide': 1,
'print_hide': 0,
'reqd': 0,
'search_index': 1,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_name',
'fieldtype': 'Data',
'idx': 2,
'doctype': u'DocField',
'fieldname': u'item_name',
'fieldtype': u'Data',
'in_filter': 0,
'label': 'Item Name',
'oldfieldname': 'item_name',
'oldfieldtype': 'Data',
'label': u'Item Name',
'oldfieldname': u'item_name',
'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'description',
'fieldtype': 'Text',
'idx': 3,
'label': 'Description',
'oldfieldname': 'description',
'oldfieldtype': 'Text',
'doctype': u'DocField',
'fieldname': u'description',
'fieldtype': u'Text',
'label': u'Description',
'oldfieldname': u'description',
'oldfieldtype': u'Text',
'permlevel': 0,
'reqd': 1,
'width': '300px'
'width': u'200px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'stock_uom',
'fieldtype': 'Data',
'idx': 4,
'label': 'UOM',
'doctype': u'DocField',
'fieldname': u'stock_uom',
'fieldtype': u'Data',
'label': u'UOM',
'permlevel': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'qty',
'fieldtype': 'Currency',
'idx': 5,
'label': 'Qty',
'oldfieldname': 'qty',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'qty',
'fieldtype': u'Currency',
'label': u'Qty',
'oldfieldname': u'qty',
'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 0,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'ref_rate',
'fieldtype': 'Currency',
'idx': 6,
'label': 'Ref Rate',
'oldfieldname': 'ref_rate',
'oldfieldtype': 'Currency',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'ref_rate',
'fieldtype': u'Currency',
'label': u'Price List Rate',
'oldfieldname': u'ref_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'adj_rate',
'fieldtype': 'Float',
'idx': 7,
'label': 'Discount (%)',
'oldfieldname': 'adj_rate',
'oldfieldtype': 'Float',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'adj_rate',
'fieldtype': u'Float',
'label': u'Discount (%)',
'oldfieldname': u'adj_rate',
'oldfieldtype': u'Float',
'permlevel': 0,
'print_hide': 1,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'export_rate',
'fieldtype': 'Currency',
'idx': 8,
'label': 'Basic Rate',
'oldfieldname': 'export_rate',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'export_rate',
'fieldtype': u'Currency',
'label': u'Basic Rate',
'oldfieldname': u'export_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 1,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'export_amount',
'fieldtype': 'Currency',
'idx': 9,
'label': 'Amount',
'oldfieldname': 'export_amount',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'export_amount',
'fieldtype': u'Currency',
'label': u'Amount',
'oldfieldname': u'export_amount',
'oldfieldtype': u'Currency',
'permlevel': 1,
'reqd': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'base_ref_rate',
'fieldtype': 'Currency',
'idx': 10,
'label': 'Ref Rate*',
'oldfieldname': 'base_ref_rate',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'base_ref_rate',
'fieldtype': u'Currency',
'label': u'Price List Rate*',
'oldfieldname': u'base_ref_rate',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'basic_rate',
'fieldtype': 'Currency',
'idx': 11,
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'basic_rate',
'fieldtype': u'Currency',
'in_filter': 0,
'label': 'Basic Rate*',
'oldfieldname': 'basic_rate',
'oldfieldtype': 'Currency',
'label': u'Basic Rate*',
'oldfieldname': u'basic_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'amount',
'fieldtype': 'Currency',
'idx': 12,
'label': 'Amount*',
'oldfieldname': 'amount',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'amount',
'fieldtype': u'Currency',
'label': u'Amount*',
'oldfieldname': u'amount',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 1
@ -215,167 +205,158 @@
# DocField
{
'doctype': 'DocField',
'fieldname': 'warehouse',
'fieldtype': 'Link',
'doctype': u'DocField',
'fieldname': u'warehouse',
'fieldtype': u'Link',
'hidden': 0,
'idx': 13,
'label': 'Warehouse',
'oldfieldname': 'warehouse',
'oldfieldtype': 'Link',
'options': 'Warehouse',
'label': u'Warehouse',
'oldfieldname': u'warehouse',
'oldfieldtype': u'Link',
'options': u'Warehouse',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'income_account',
'fieldtype': 'Link',
'idx': 14,
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'income_account',
'fieldtype': u'Link',
'in_filter': 1,
'label': 'Income Account',
'oldfieldname': 'income_account',
'oldfieldtype': 'Link',
'options': 'Account',
'label': u'Income Account',
'oldfieldname': u'income_account',
'oldfieldtype': u'Link',
'options': u'Account',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 1,
'trigger': 'Client',
'width': '120px'
'trigger': u'Client',
'width': u'120px'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'cost_center',
'fieldtype': 'Link',
'idx': 15,
'colour': u'White:FFF',
'default': u'Purchase - TC',
'doctype': u'DocField',
'fieldname': u'cost_center',
'fieldtype': u'Link',
'in_filter': 1,
'label': 'Cost Center',
'oldfieldname': 'cost_center',
'oldfieldtype': 'Link',
'options': 'Cost Center',
'label': u'Cost Center',
'oldfieldname': u'cost_center',
'oldfieldtype': u'Link',
'options': u'Cost Center',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'search_index': 1,
'trigger': 'Client',
'width': '120px'
'trigger': u'Client',
'width': u'120px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'serial_no',
'fieldtype': 'Small Text',
'idx': 16,
'label': 'Serial No',
'oldfieldname': 'serial_no',
'oldfieldtype': 'Small Text',
'permlevel': 0,
'print_hide': 0
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'batch_no',
'fieldtype': 'Link',
'idx': 17,
'label': 'Batch No',
'options': 'Batch',
'permlevel': 0,
'print_hide': 0
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_group',
'fieldtype': 'Link',
'idx': 18,
'doctype': u'DocField',
'fieldname': u'serial_no',
'fieldtype': u'Small Text',
'in_filter': 1,
'label': 'Item Group',
'oldfieldname': 'item_group',
'oldfieldtype': 'Link',
'options': 'Item Group',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'brand',
'fieldtype': 'Data',
'idx': 19,
'in_filter': 1,
'label': 'Brand Name',
'oldfieldname': 'brand',
'oldfieldtype': 'Data',
'label': u'Serial No',
'oldfieldname': u'serial_no',
'oldfieldtype': u'Small Text',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'actual_qty',
'fieldtype': 'Currency',
'idx': 20,
'label': 'Available Qty at Warehouse',
'oldfieldname': 'actual_qty',
'oldfieldtype': 'Currency',
'permlevel': 1,
'doctype': u'DocField',
'fieldname': u'batch_no',
'fieldtype': u'Link',
'label': u'Batch No',
'options': u'Batch',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'delivered_qty',
'fieldtype': 'Currency',
'idx': 21,
'label': 'Delivered Qty',
'oldfieldname': 'delivered_qty',
'oldfieldtype': 'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'sales_order',
'fieldtype': 'Link',
'idx': 22,
'doctype': u'DocField',
'fieldname': u'item_group',
'fieldtype': u'Link',
'hidden': 1,
'in_filter': 1,
'label': 'Sales Order',
'oldfieldname': 'sales_order',
'oldfieldtype': 'Link',
'options': 'Sales Order',
'label': u'Item Group',
'oldfieldname': u'item_group',
'oldfieldtype': u'Link',
'options': u'Item Group',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'brand',
'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
'label': u'Brand Name',
'oldfieldname': u'brand',
'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'actual_qty',
'fieldtype': u'Currency',
'label': u'Available Qty at Warehouse',
'oldfieldname': u'actual_qty',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'delivered_qty',
'fieldtype': u'Currency',
'label': u'Delivered Qty',
'oldfieldname': u'delivered_qty',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'sales_order',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Sales Order',
'oldfieldname': u'sales_order',
'oldfieldtype': u'Link',
'options': u'Sales Order',
'permlevel': 1,
'print_hide': 1,
'search_index': 1,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'so_detail',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'so_detail',
'fieldtype': u'Data',
'hidden': 1,
'idx': 23,
'in_filter': 1,
'label': 'SO Detail ',
'oldfieldname': 'so_detail',
'oldfieldtype': 'Data',
'label': u'SO Detail ',
'oldfieldname': u'so_detail',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@ -383,32 +364,30 @@
# DocField
{
'doctype': 'DocField',
'fieldname': 'delivery_note',
'fieldtype': 'Link',
'idx': 24,
'doctype': u'DocField',
'fieldname': u'delivery_note',
'fieldtype': u'Link',
'in_filter': 1,
'label': 'Delivery Note',
'oldfieldname': 'delivery_note',
'oldfieldtype': 'Link',
'options': 'Delivery Note',
'label': u'Delivery Note',
'oldfieldname': u'delivery_note',
'oldfieldtype': u'Link',
'options': u'Delivery Note',
'permlevel': 1,
'print_hide': 1,
'search_index': 1,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'dn_detail',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'dn_detail',
'fieldtype': u'Data',
'hidden': 1,
'idx': 25,
'in_filter': 1,
'label': 'DN Detail',
'oldfieldname': 'dn_detail',
'oldfieldtype': 'Data',
'label': u'DN Detail',
'oldfieldname': u'dn_detail',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@ -416,29 +395,27 @@
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_tax_rate',
'fieldtype': 'Small Text',
'doctype': u'DocField',
'fieldname': u'item_tax_rate',
'fieldtype': u'Small Text',
'hidden': 1,
'idx': 26,
'label': 'Item Tax Rate',
'oldfieldname': 'item_tax_rate',
'oldfieldtype': 'Small Text',
'label': u'Item Tax Rate',
'oldfieldname': u'item_tax_rate',
'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'clear_pending',
'fieldtype': 'Check',
'doctype': u'DocField',
'fieldname': u'clear_pending',
'fieldtype': u'Check',
'hidden': 1,
'idx': 27,
'label': 'Clear Pending',
'label': u'Clear Pending',
'no_copy': 1,
'oldfieldname': 'clear_pending',
'oldfieldtype': 'Check',
'oldfieldname': u'clear_pending',
'oldfieldtype': u'Check',
'permlevel': 1,
'print_hide': 1
},
@ -446,12 +423,10 @@
# DocField
{
'allow_on_submit': 1,
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'page_break',
'fieldtype': 'Check',
'idx': 28,
'label': 'Page Break',
'doctype': u'DocField',
'fieldname': u'page_break',
'fieldtype': u'Check',
'label': u'Page Break',
'no_copy': 1,
'permlevel': 0,
'print_hide': 1,

View File

@ -5,166 +5,169 @@
{
'creation': '2010-08-08 17:09:20',
'docstatus': 0,
'modified': '2011-12-28 17:33:30',
'modified_by': 'Administrator',
'owner': 'Administrator'
'modified': '2012-02-23 15:49:43',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'autoname': 'INVTD.######',
'colour': 'White:FFF',
'default_print_format': 'Standard',
'autoname': u'INVTD.######',
'colour': u'White:FFF',
'default_print_format': u'Standard',
'doctype': 'DocType',
'hide_heading': 1,
'istable': 1,
'module': 'Accounts',
'module': u'Accounts',
'name': '__common__',
'section_style': 'Tray',
'server_code_error': ' ',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 18
'version': 20
},
# These values are common for all DocField
{
'doctype': 'DocField',
'doctype': u'DocField',
'name': '__common__',
'parent': 'RV Tax Detail',
'parentfield': 'fields',
'parenttype': 'DocType'
'parent': u'RV Tax Detail',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# DocType, RV Tax Detail
{
'doctype': 'DocType',
'name': 'RV Tax Detail'
'name': u'RV Tax Detail'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'charge_type',
'fieldtype': 'Select',
'label': 'Type',
'oldfieldname': 'charge_type',
'oldfieldtype': 'Select',
'options': '\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total',
'doctype': u'DocField',
'fieldname': u'charge_type',
'fieldtype': u'Select',
'label': u'Type',
'oldfieldname': u'charge_type',
'oldfieldtype': u'Select',
'options': u'\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total',
'permlevel': 0,
'reqd': 1,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'account_head',
'fieldtype': 'Link',
'label': 'Account Head',
'oldfieldname': 'account_head',
'oldfieldtype': 'Link',
'options': 'Account',
'doctype': u'DocField',
'fieldname': u'account_head',
'fieldtype': u'Link',
'label': u'Account Head',
'oldfieldname': u'account_head',
'oldfieldtype': u'Link',
'options': u'Account',
'permlevel': 0,
'reqd': 1,
'trigger': 'Client'
'search_index': 1,
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'cost_center_other_charges',
'fieldtype': 'Link',
'label': 'Cost Center',
'oldfieldname': 'cost_center_other_charges',
'oldfieldtype': 'Link',
'options': 'Cost Center',
'doctype': u'DocField',
'fieldname': u'cost_center_other_charges',
'fieldtype': u'Link',
'label': u'Cost Center',
'oldfieldname': u'cost_center_other_charges',
'oldfieldtype': u'Link',
'options': u'Cost Center',
'permlevel': 0
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'description',
'fieldtype': 'Small Text',
'label': 'Description',
'oldfieldname': 'description',
'oldfieldtype': 'Small Text',
'doctype': u'DocField',
'fieldname': u'description',
'fieldtype': u'Small Text',
'label': u'Description',
'oldfieldname': u'description',
'oldfieldtype': u'Small Text',
'permlevel': 0,
'reqd': 1,
'width': '300px'
'width': u'300px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'rate',
'fieldtype': 'Currency',
'label': 'Rate',
'oldfieldname': 'rate',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'rate',
'fieldtype': u'Currency',
'label': u'Rate',
'oldfieldname': u'rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 0,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'tax_amount',
'fieldtype': 'Currency',
'label': 'Amount*',
'oldfieldname': 'tax_amount',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'tax_amount',
'fieldtype': u'Currency',
'label': u'Amount*',
'oldfieldname': u'tax_amount',
'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 0,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'total',
'fieldtype': 'Currency',
'label': 'Total*',
'oldfieldname': 'total',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'total',
'fieldtype': u'Currency',
'label': u'Total*',
'oldfieldname': u'total',
'oldfieldtype': u'Currency',
'permlevel': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'row_id',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'row_id',
'fieldtype': u'Data',
'hidden': 0,
'label': 'Enter Row',
'oldfieldname': 'row_id',
'oldfieldtype': 'Data',
'label': u'Enter Row',
'oldfieldname': u'row_id',
'oldfieldtype': u'Data',
'permlevel': 0,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_wise_tax_detail',
'fieldtype': 'Small Text',
'label': 'Item Wise Tax Detail ',
'oldfieldname': 'item_wise_tax_detail',
'oldfieldtype': 'Small Text',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'item_wise_tax_detail',
'fieldtype': u'Small Text',
'hidden': 1,
'label': u'Item Wise Tax Detail ',
'oldfieldname': u'item_wise_tax_detail',
'oldfieldtype': u'Small Text',
'permlevel': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'parenttype',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'parenttype',
'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
'label': 'Parenttype',
'oldfieldname': 'parenttype',
'oldfieldtype': 'Data',
'label': u'Parenttype',
'oldfieldname': u'parenttype',
'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'search_index': 1
@ -172,16 +175,16 @@
# DocField
{
'colour': 'White:FFF',
'description': 'Cheating Field\nPlease do not delete ',
'doctype': 'DocField',
'fieldname': 'total_tax_amount',
'fieldtype': 'Currency',
'colour': u'White:FFF',
'description': u'Cheating Field\nPlease do not delete ',
'doctype': u'DocField',
'fieldname': u'total_tax_amount',
'fieldtype': u'Currency',
'hidden': 1,
'label': 'Total Tax Amount',
'label': u'Total Tax Amount',
'no_copy': 1,
'oldfieldname': 'total_tax_amount',
'oldfieldtype': 'Currency',
'oldfieldname': u'total_tax_amount',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
@ -189,15 +192,15 @@
# DocField
{
'description': 'Cheating Field\nPlease do not delete ',
'doctype': 'DocField',
'fieldname': 'total_amount',
'fieldtype': 'Currency',
'description': u'Cheating Field\nPlease do not delete ',
'doctype': u'DocField',
'fieldname': u'total_amount',
'fieldtype': u'Currency',
'hidden': 1,
'label': 'Total Amount',
'label': u'Total Amount',
'no_copy': 1,
'oldfieldname': 'total_amount',
'oldfieldtype': 'Currency',
'oldfieldname': u'total_amount',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
@ -206,11 +209,11 @@
# DocField
{
'allow_on_submit': 0,
'description': 'If checked, the tax amount will be considered as already included in the Print Rate / Print Amount',
'doctype': 'DocField',
'fieldname': 'included_in_print_rate',
'fieldtype': 'Check',
'label': 'Included in Print Rate',
'description': u'If checked, the tax amount will be considered as already included in the Print Rate / Print Amount',
'doctype': u'DocField',
'fieldname': u'included_in_print_rate',
'fieldtype': u'Check',
'label': u'Included in Print Rate',
'no_column': 0,
'no_copy': 1,
'permlevel': 0,

View File

@ -5,52 +5,52 @@
{
'creation': '2010-08-08 17:09:12',
'docstatus': 0,
'modified': '2012-01-10 16:38:21',
'modified_by': 'Administrator',
'owner': 'Administrator'
'modified': '2012-02-27 14:47:48',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'autoname': 'POD/.#####',
'colour': 'White:FFF',
'default_print_format': 'Standard',
'autoname': u'POD/.#####',
'colour': u'White:FFF',
'default_print_format': u'Standard',
'doctype': 'DocType',
'istable': 1,
'module': 'Buying',
'module': u'Buying',
'name': '__common__',
'section_style': 'Tray',
'server_code_error': ' ',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 61
'version': 62
},
# These values are common for all DocField
{
'doctype': 'DocField',
'doctype': u'DocField',
'name': '__common__',
'parent': 'PO Detail',
'parentfield': 'fields',
'parenttype': 'DocType'
'parent': u'PO Detail',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# DocType, PO Detail
{
'doctype': 'DocType',
'name': 'PO Detail'
'name': u'PO Detail'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'schedule_date',
'fieldtype': 'Date',
'doctype': u'DocField',
'fieldname': u'schedule_date',
'fieldtype': u'Date',
'hidden': 0,
'in_filter': 1,
'label': 'Reqd By Date',
'label': u'Reqd By Date',
'no_copy': 1,
'oldfieldname': 'schedule_date',
'oldfieldtype': 'Date',
'oldfieldname': u'schedule_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
@ -59,31 +59,31 @@
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_code',
'fieldtype': 'Link',
'doctype': u'DocField',
'fieldname': u'item_code',
'fieldtype': u'Link',
'in_filter': 1,
'label': 'Item Code',
'oldfieldname': 'item_code',
'oldfieldtype': 'Link',
'options': 'Item',
'label': u'Item Code',
'oldfieldname': u'item_code',
'oldfieldtype': u'Link',
'options': u'Item',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
'search_index': 1,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_name',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'item_name',
'fieldtype': u'Data',
'hidden': 0,
'in_filter': 1,
'label': 'Item Name',
'oldfieldname': 'item_name',
'oldfieldtype': 'Data',
'label': u'Item Name',
'oldfieldname': u'item_name',
'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
@ -92,110 +92,110 @@
# DocField
{
'doctype': 'DocField',
'fieldname': 'description',
'fieldtype': 'Small Text',
'label': 'Description',
'oldfieldname': 'description',
'oldfieldtype': 'Small Text',
'doctype': u'DocField',
'fieldname': u'description',
'fieldtype': u'Small Text',
'label': u'Description',
'oldfieldname': u'description',
'oldfieldtype': u'Small Text',
'permlevel': 0,
'reqd': 1,
'width': '300px'
'width': u'300px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'qty',
'fieldtype': 'Currency',
'label': 'Quantity',
'oldfieldname': 'qty',
'oldfieldtype': 'Currency',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'qty',
'fieldtype': u'Currency',
'label': u'Quantity',
'oldfieldname': u'qty',
'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 1,
'trigger': 'Client',
'width': '60px'
'trigger': u'Client',
'width': u'60px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'import_ref_rate',
'fieldtype': 'Currency',
'label': 'Ref Rate ',
'doctype': u'DocField',
'fieldname': u'import_ref_rate',
'fieldtype': u'Currency',
'label': u'Ref Rate ',
'permlevel': 0
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'discount_rate',
'fieldtype': 'Currency',
'label': 'Discount %',
'doctype': u'DocField',
'fieldname': u'discount_rate',
'fieldtype': u'Currency',
'label': u'Discount %',
'permlevel': 0,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'import_rate',
'fieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'import_rate',
'fieldtype': u'Currency',
'hidden': 0,
'label': 'Rate ',
'oldfieldname': 'import_rate',
'oldfieldtype': 'Currency',
'label': u'Rate ',
'oldfieldname': u'import_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 0,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'import_amount',
'fieldtype': 'Currency',
'label': 'Amount',
'oldfieldname': 'import_amount',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'import_amount',
'fieldtype': u'Currency',
'label': u'Amount',
'oldfieldname': u'import_amount',
'oldfieldtype': u'Currency',
'permlevel': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'purchase_ref_rate',
'fieldtype': 'Currency',
'label': 'Ref Rate *',
'doctype': u'DocField',
'fieldname': u'purchase_ref_rate',
'fieldtype': u'Currency',
'label': u'Ref Rate *',
'permlevel': 0
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'purchase_rate',
'fieldtype': 'Currency',
'label': 'Rate (Default Curr.) *',
'oldfieldname': 'purchase_rate',
'oldfieldtype': 'Currency',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'purchase_rate',
'fieldtype': u'Currency',
'label': u'Rate (Default Curr.) *',
'oldfieldname': u'purchase_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'amount',
'fieldtype': 'Currency',
'label': 'Amount (Default Curr.)',
'oldfieldname': 'amount',
'oldfieldtype': 'Currency',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'amount',
'fieldtype': u'Currency',
'label': u'Amount (Default Curr.)',
'oldfieldname': u'amount',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 1
@ -203,28 +203,28 @@
# DocField
{
'doctype': 'DocField',
'fieldname': 'warehouse',
'fieldtype': 'Link',
'doctype': u'DocField',
'fieldname': u'warehouse',
'fieldtype': u'Link',
'hidden': 0,
'label': 'Warehouse',
'oldfieldname': 'warehouse',
'oldfieldtype': 'Link',
'options': 'Warehouse',
'label': u'Warehouse',
'oldfieldname': u'warehouse',
'oldfieldtype': u'Link',
'options': u'Warehouse',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'project_name',
'fieldtype': 'Link',
'doctype': u'DocField',
'fieldname': u'project_name',
'fieldtype': u'Link',
'in_filter': 1,
'label': 'Project Name',
'options': 'Project',
'label': u'Project Name',
'options': u'Project',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0
@ -232,96 +232,96 @@
# DocField
{
'doctype': 'DocField',
'fieldname': 'uom',
'fieldtype': 'Link',
'label': 'UOM',
'oldfieldname': 'uom',
'oldfieldtype': 'Link',
'options': 'UOM',
'doctype': u'DocField',
'fieldname': u'uom',
'fieldtype': u'Link',
'label': u'UOM',
'oldfieldname': u'uom',
'oldfieldtype': u'Link',
'options': u'UOM',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'conversion_factor',
'fieldtype': 'Currency',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'conversion_factor',
'fieldtype': u'Currency',
'hidden': 0,
'label': 'Conversion Factor',
'oldfieldname': 'conversion_factor',
'oldfieldtype': 'Currency',
'label': u'UOM Conversion Factor',
'oldfieldname': u'conversion_factor',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'stock_uom',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'stock_uom',
'fieldtype': u'Data',
'hidden': 0,
'label': 'Stock UOM',
'oldfieldname': 'stock_uom',
'oldfieldtype': 'Data',
'label': u'Stock UOM',
'oldfieldname': u'stock_uom',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'reqd': 1,
'width': '100px'
'width': u'100px'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'prevdoc_doctype',
'fieldtype': 'Data',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'prevdoc_doctype',
'fieldtype': u'Data',
'hidden': 1,
'label': 'Prevdoc DocType',
'label': u'Prevdoc DocType',
'no_copy': 0,
'oldfieldname': 'prevdoc_doctype',
'oldfieldtype': 'Data',
'oldfieldname': u'prevdoc_doctype',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'prevdoc_docname',
'fieldtype': 'Link',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'prevdoc_docname',
'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
'label': 'Purchase Requisition No',
'label': u'Purchase Requisition No',
'no_copy': 0,
'oldfieldname': 'prevdoc_docname',
'oldfieldtype': 'Link',
'options': 'Indent',
'oldfieldname': u'prevdoc_docname',
'oldfieldtype': u'Link',
'options': u'Indent',
'permlevel': 1,
'print_hide': 1,
'search_index': 1,
'width': '120px'
'width': u'120px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'prevdoc_date',
'fieldtype': 'Date',
'hidden': 0,
'doctype': u'DocField',
'fieldname': u'prevdoc_date',
'fieldtype': u'Date',
'hidden': 1,
'in_filter': 1,
'label': 'Purchase Requisition Date',
'oldfieldname': 'prevdoc_date',
'oldfieldtype': 'Date',
'label': u'Purchase Requisition Date',
'oldfieldname': u'prevdoc_date',
'oldfieldtype': u'Date',
'permlevel': 1,
'print_hide': 1,
'search_index': 0
@ -329,16 +329,16 @@
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'prevdoc_detail_docname',
'fieldtype': 'Data',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'prevdoc_detail_docname',
'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
'label': 'Purchase Requisition Detail No',
'label': u'Purchase Requisition Detail No',
'no_copy': 0,
'oldfieldname': 'prevdoc_detail_docname',
'oldfieldtype': 'Data',
'oldfieldname': u'prevdoc_detail_docname',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@ -346,91 +346,91 @@
# DocField
{
'doctype': 'DocField',
'fieldname': 'brand',
'fieldtype': 'Link',
'hidden': 0,
'label': 'Brand',
'oldfieldname': 'brand',
'oldfieldtype': 'Link',
'options': 'Brand',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_group',
'fieldtype': 'Link',
'hidden': 0,
'in_filter': 1,
'label': 'Item Group',
'oldfieldname': 'item_group',
'oldfieldtype': 'Link',
'options': 'Item Group',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'stock_qty',
'fieldtype': 'Currency',
'hidden': 0,
'label': 'Stock Qty',
'no_copy': 1,
'oldfieldname': 'stock_qty',
'oldfieldtype': 'Currency',
'permlevel': 1,
'print_hide': 1,
'trigger': 'Client',
'width': '100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'received_qty',
'fieldtype': 'Currency',
'hidden': 0,
'label': 'Received Qty',
'no_copy': 1,
'oldfieldname': 'received_qty',
'oldfieldtype': 'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'billed_qty',
'fieldtype': 'Currency',
'hidden': 0,
'label': 'Billed Quantity',
'no_copy': 1,
'oldfieldname': 'billed_qty',
'oldfieldtype': 'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'colour': 'White:FFF',
'description': 'Tax detail table fetched from item master as a string and stored in this field.\nUsed for Purchase Other Charges',
'doctype': 'DocField',
'fieldname': 'item_tax_rate',
'fieldtype': 'Small Text',
'doctype': u'DocField',
'fieldname': u'brand',
'fieldtype': u'Link',
'hidden': 1,
'label': 'Item Tax Rate',
'oldfieldname': 'item_tax_rate',
'oldfieldtype': 'Small Text',
'label': u'Brand',
'oldfieldname': u'brand',
'oldfieldtype': u'Link',
'options': u'Brand',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'item_group',
'fieldtype': u'Link',
'hidden': 1,
'in_filter': 1,
'label': u'Item Group',
'oldfieldname': u'item_group',
'oldfieldtype': u'Link',
'options': u'Item Group',
'permlevel': 1,
'print_hide': 1,
'search_index': 0
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'stock_qty',
'fieldtype': u'Currency',
'hidden': 0,
'label': u'Stock Qty',
'no_copy': 1,
'oldfieldname': u'stock_qty',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'received_qty',
'fieldtype': u'Currency',
'hidden': 0,
'label': u'Received Qty',
'no_copy': 1,
'oldfieldname': u'received_qty',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'billed_qty',
'fieldtype': u'Currency',
'hidden': 0,
'label': u'Billed Quantity',
'no_copy': 1,
'oldfieldname': u'billed_qty',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',
'description': u'Tax detail table fetched from item master as a string and stored in this field.\nUsed for Purchase Other Charges',
'doctype': u'DocField',
'fieldname': u'item_tax_rate',
'fieldtype': u'Small Text',
'hidden': 1,
'label': u'Item Tax Rate',
'oldfieldname': u'item_tax_rate',
'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1
@ -439,14 +439,14 @@
# DocField
{
'allow_on_submit': 1,
'doctype': 'DocField',
'fieldname': 'page_break',
'fieldtype': 'Check',
'doctype': u'DocField',
'fieldname': u'page_break',
'fieldtype': u'Check',
'hidden': 0,
'label': 'Page Break',
'label': u'Page Break',
'no_copy': 1,
'oldfieldname': 'page_break',
'oldfieldtype': 'Check',
'oldfieldname': u'page_break',
'oldfieldtype': u'Check',
'permlevel': 0,
'print_hide': 1
}

View File

@ -66,6 +66,89 @@ cur_frm.cscript.update_item_details = function(doc, dt, dn, callback) {
}
var set_dynamic_label_par = function(doc, cdt, cdn, base_curr) {
//parent flds
par_cols_base = {'net_total': 'Net Total', 'total_tax': 'Total Tax', 'grand_total': 'Grand Total', /*'rounded_total': 'Rounded Total',*/
'in_words': 'In Words', 'other_charges_added': 'Other Charges Added', 'other_charges_deducted': 'Other Charges Deducted'}
par_cols_import = {'net_total_import': 'Net Total', 'grand_total_import': 'Grand Total', 'in_words_import': 'In Words',
'other_charges_added_import': 'Other Charges Added', 'other_charges_deducted_import': 'Other Charges Deducted'};
for (d in par_cols_base) cur_frm.fields_dict[d].label_area.innerHTML = par_cols_base[d]+' (' + base_curr + ')';
for (d in par_cols_import) cur_frm.fields_dict[d].label_area.innerHTML = par_cols_import[d]+' (' + doc.currency + ')';
cur_frm.fields_dict['conversion_rate'].label_area.innerHTML = "Conversion Rate (" + doc.currency +' -> '+ base_curr + ')';
if (doc.doctype == 'Payable Voucher') {
cur_frm.fields_dict['total_tds_on_voucher'].label_area.innerHTML = 'Total TDS On Voucher (' + base_curr + ')';
cur_frm.fields_dict['outstanding_amount'].label_area.innerHTML = 'Outstanding Amount (' + base_curr + ')';
cur_frm.fields_dict['tds_amount_on_advance'].label_area.innerHTML = 'TDS Amount On Advance (' + base_curr + ')';
cur_frm.fields_dict['total_advance'].label_area.innerHTML = 'Total Advance (Incl. TDS) (' + base_curr + ')';
cur_frm.fields_dict['total_amount_to_pay'].label_area.innerHTML = 'Total Amount To Pay (' + base_curr + ')';
cur_frm.fields_dict['ded_amount'].label_area.innerHTML = 'TDS Amount (' + base_curr + ')';
} else cur_frm.fields_dict['rounded_total'].label_area.innerHTML = 'Rounded Total (' + base_curr + ')';
}
var set_dynamic_label_child = function(doc, cdt, cdn, base_curr) {
// item table flds
item_cols_base = {'purchase_ref_rate': 'Ref Rate', 'amount': 'Amount'};
item_cols_import = {'import_rate': 'Rate', 'import_ref_rate': 'Ref Rate', 'import_amount': 'Amount'};
for (d in item_cols_base) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_base[d]+' ('+base_curr+')');
for (d in item_cols_import) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_import[d]+' ('+doc.currency+')');
var hide = (doc.currency == sys_defaults['currency']) ? false : true;
for (f in item_cols_base) cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide);
if (doc.doctype == 'Payable Voucher') {
$('[data-grid-fieldname="'+cur_frm.cscript.tname+'-rate"]').html('Rate ('+base_curr+')');
cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('rate', hide);
// advance table flds
adv_cols = {'advance_amount': 'Advance Amount', 'allocated_amount': 'Allocated Amount', 'tds_amount': 'TDS Amount', 'tds_allocated': 'TDS Allocated'}
for (d in adv_cols) $('[data-grid-fieldname="Advance Allocation Detail-'+d+'"]').html(adv_cols[d]+' ('+base_curr+')');
}
else {
$('[data-grid-fieldname="'+cur_frm.cscript.tname+'-purchase_rate"]').html('Rate ('+base_curr+')');
cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('purchase_rate', hide);
}
//tax table flds
tax_cols = {'tax_amount': 'Amount', 'total': 'Aggregate Total'};
for (d in tax_cols) $('[data-grid-fieldname="Purchase Tax Detail-'+d+'"]').html(tax_cols[d]+' ('+base_curr+')');
}
// Change label dynamically based on currency
//------------------------------------------------------------------
cur_frm.cscript.dynamic_label = function(doc, cdt, cdn) {
var callback = function(r, rt) {
if (r.message) base_curr = r.message;
else base_curr = sys_defaults['currency'];
if (base_curr == doc.currency) {
set_multiple(cdt, cdn, {conversion_rate:1});
hide_field(['conversion_rate', 'net_total_import','grand_total_import', 'in_words_import', 'other_charges_added_import', 'other_charges_deducted_import']);
} else unhide_field(['conversion_rate', 'net_total_import','grand_total_import', 'in_words_import', 'other_charges_added_import', 'other_charges_deducted_import']);
set_dynamic_label_par(doc, cdt, cdn, base_curr);
set_dynamic_label_child(doc, cdt, cdn, base_curr);
}
if (doc.company == sys_defaults['company']) callback('', '');
else $c_obj(make_doclist(doc.doctype, doc.name), 'get_comp_base_currency', '', callback);
}
cur_frm.cscript.currency = function(doc, cdt, cdn) {
cur_frm.cscript.dynamic_label(doc, cdt, cdn);
}
cur_frm.cscript.company = cur_frm.cscript.currency;
// ======================== Conversion Rate ==========================================
cur_frm.cscript.conversion_rate = function(doc,cdt,cdn) {
cur_frm.cscript.calc_amount( doc, 1);

View File

@ -196,6 +196,13 @@ class DocType(TransactionBase):
if not rate[0]['last_purchase_rate']:
msgprint("%s has no Last Purchase Rate."% d.item_code)
def get_comp_base_currency(self, comp):
""" get default currency of company"""
return webnotes.conn.sql("select default_currency from `tabCompany` where name = %s", comp)[0][0]
# validation
# -------------------------------------------------------------------------------------------------------

View File

@ -48,10 +48,12 @@ cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
// ================================== Refresh ==========================================
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
// Show buttons
// ---------------------------------
cur_frm.clear_custom_buttons();
cur_frm.cscript.dynamic_label(doc, cdt, cdn);
if(doc.docstatus == 1 && doc.status != 'Stopped'){
var ch = getchildren('PO Detail',doc.name,'po_details');
var allow_billing = 0; var allow_receipt = 0;

View File

@ -99,6 +99,12 @@ class DocType(TransactionBase):
def get_tc_details(self):
return get_obj('Purchase Common').get_tc_details(self)
def get_comp_base_currency(self):
return get_obj('Purchase Common').get_comp_base_currency(self.doc.company)
# validate if indent has been pulled twice
def validate_prev_docname(self):
for d in getlist(self.doclist, 'po_details'):

File diff suppressed because it is too large Load Diff

View File

@ -46,7 +46,7 @@ class DocType:
def get_leave_balance(self):
leave_all = sql("select total_leaves_allocated from `tabLeave Allocation` where employee = '%s' and leave_type = '%s' and fiscal_year = '%s' and docstatus = 1" % (self.doc.employee, self.doc.leave_type, self.doc.fiscal_year))
leave_all = leave_all and flt(leave_all[0][0]) or 0
leave_app = sql("select total_leave_days from `tabLeave Application` where employee = '%s' and leave_type = '%s' and fiscal_year = '%s' and docstatus = 1" % (self.doc.employee, self.doc.leave_type, self.doc.fiscal_year))
leave_app = sql("select SUM(total_leave_days) from `tabLeave Application` where employee = '%s' and leave_type = '%s' and fiscal_year = '%s' and docstatus = 1" % (self.doc.employee, self.doc.leave_type, self.doc.fiscal_year))
leave_app = leave_app and flt(leave_app[0][0]) or 0
ret = {'leave_balance':leave_all - leave_app}
return ret

View File

@ -20,13 +20,6 @@ def execute():
sql = webnotes.conn.sql
from webnotes.model.code import get_obj
# stop session
webnotes.conn.set_global('__session_status', 'stop')
webnotes.conn.set_global('__session_status_message', 'Patch is running in background. \nPlease wait until it completed...\n')
webnotes.conn.commit()
webnotes.conn.begin()
# repost
comp = sql("select name from tabCompany where docstatus!=2")
fy = sql("select name from `tabFiscal Year` order by year_start_date asc")
@ -37,11 +30,9 @@ def execute():
fy_obj.doc.past_year = prev_fy
fy_obj.doc.company = c[0]
fy_obj.doc.save()
fy_obj = get_obj('Fiscal Year', f[0])
fy_obj.repost()
prev_fy = f[0]
sql("commit")
sql("start transaction")
# free session
webnotes.conn.set_global('__session_status', '')
webnotes.conn.set_global('__session_status_message', '')

View File

@ -0,0 +1,42 @@
def execute():
import webnotes
from webnotes.model import delete_doc
from webnotes.modules.module_manager import reload_doc
dt = {
'selling': ['quotation', 'sales_order', 'quotation_detail', 'sales_order_detail'],
'stock': ['delivery_note', 'delivery_note_detail', 'purchase_receipt', 'purchase_receipt_detail'],
'accounts': ['receivable_voucher', 'payable_voucher', 'rv_detail', 'pv_detail', 'rv_tax_detail', 'purchase_tax_detail'],
'buying': ['purchase_order', 'po_detail']
}
for m in dt:
for d in dt[m]:
reload_doc(m, 'doctype', d)
webnotes.conn.sql("""delete from `tabDocField`
where label in ('Note1', 'OT Notes', 'Note', 'Note HTML', 'Rates HTML')
and parent in ('Quotation', 'Sales Order', 'Delivery Note', 'Receivable Voucher', 'Purchase Order')""")
del_flds = {
'Sales Order Detail': "'delivery_date', 'confirmation_date'",
'Delivery Note': "'supplier', 'supplier_address', 'purchase_receipt_no', 'purchase_order_no', 'transaction_date'",
'Receivable Voucher': "'voucher_date'",
'Payable Voucher': "'voucher_date'",
'Purchase Receipt': "'transaction_date'"
}
del_labels = {
'Delivery Note': "'Supplier Details'",
'Purchase Receipt': "'Get Currrent Stock'"
}
for d in del_flds:
webnotes.conn.sql("delete from `tabDocField` where fieldname in (%s) and parent = %s", (del_flds[d], d))
for d in del_labels:
webnotes.conn.sql("delete from `tabDocField` where label in (%s) and parent = %s", (del_labels[d], d))
delete_doc('DocType', 'Update Delivery Date Detail')

View File

@ -47,7 +47,6 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
hide_field(['customer','customer_address','contact_person', 'customer_name','contact_display', 'customer_group']);
}
}
}
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
@ -84,6 +83,12 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.clear_custom_buttons();
var callback = function() {
cur_frm.cscript.dynamic_label(doc, cdt, cdn);
}
cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn, callback);
if(doc.docstatus == 1 && doc.status!='Order Lost') {
cur_frm.add_custom_button('Make Sales Order', cur_frm.cscript['Make Sales Order']);
cur_frm.add_custom_button('Set as Lost', cur_frm.cscript['Declare Order Lost']);

View File

@ -76,9 +76,10 @@ class DocType(TransactionBase):
# Get Item Details
# -----------------
def get_item_details(self, item_code=None):
if item_code:
return get_obj('Sales Common').get_item_details(item_code, self)
def get_item_details(self, args=None):
args = eval(args)
if args['item_code']:
return get_obj('Sales Common').get_item_details(args, self)
else:
obj = get_obj('Sales Common')
for doc in self.doclist:
@ -93,6 +94,13 @@ class DocType(TransactionBase):
# --------------------------------------------------------------
def get_adj_percent(self, arg=''):
get_obj('Sales Common').get_adj_percent(self)
def get_comp_base_currency(self):
return get_obj('Sales Common').get_comp_base_currency(self.doc.company)
def get_price_list_currency(self):
return get_obj('Sales Common').get_price_list_currency(self.doc.price_list_name, self.doc.company)
# OTHER CHARGES TRIGGER FUNCTIONS
@ -220,7 +228,6 @@ class DocType(TransactionBase):
def on_update(self):
# Add to calendar
#if self.doc.contact_date and self.doc.last_contact_date != self.doc.contact_date:
if self.doc.contact_date and self.doc.contact_date_ref != self.doc.contact_date:
if self.doc.contact_by:
self.add_calendar_event()

File diff suppressed because it is too large Load Diff

View File

@ -5,343 +5,330 @@
{
'creation': '2010-08-08 17:09:18',
'docstatus': 0,
'modified': '2011-02-23 11:28:36',
'modified_by': 'Administrator',
'owner': 'Administrator'
'modified': '2012-02-24 13:21:21',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'autoname': 'QUOD/.#####',
'colour': 'White:FFF',
'autoname': u'QUOD/.#####',
'colour': u'White:FFF',
'default_print_format': u'Standard',
'doctype': 'DocType',
'is_transaction_doc': 0,
'istable': 1,
'module': 'Selling',
'module': u'Selling',
'name': '__common__',
'section_style': 'Tray',
'server_code_error': ' ',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 26
'version': 30
},
# These values are common for all DocField
{
'doctype': 'DocField',
'doctype': u'DocField',
'name': '__common__',
'parent': 'Quotation Detail',
'parentfield': 'fields',
'parenttype': 'DocType'
'parent': u'Quotation Detail',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# DocType, Quotation Detail
{
'doctype': 'DocType',
'name': 'Quotation Detail'
'name': u'Quotation Detail'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_code',
'fieldtype': 'Link',
'doctype': u'DocField',
'fieldname': u'item_code',
'fieldtype': u'Link',
'hidden': 0,
'idx': 1,
'in_filter': 1,
'label': 'Item Code',
'oldfieldname': 'item_code',
'oldfieldtype': 'Link',
'options': 'Item',
'label': u'Item Code',
'oldfieldname': u'item_code',
'oldfieldtype': u'Link',
'options': u'Item',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
'search_index': 1,
'trigger': 'Client',
'width': '150px'
'trigger': u'Client',
'width': u'150px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_name',
'fieldtype': 'Data',
'idx': 2,
'doctype': u'DocField',
'fieldname': u'item_name',
'fieldtype': u'Data',
'in_filter': 1,
'label': 'Item Name',
'oldfieldname': 'item_name',
'oldfieldtype': 'Data',
'label': u'Item Name',
'oldfieldname': u'item_name',
'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0,
'width': '150px'
'search_index': 1,
'width': u'150px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'description',
'fieldtype': 'Small Text',
'idx': 3,
'label': 'Description',
'oldfieldname': 'description',
'oldfieldtype': 'Small Text',
'doctype': u'DocField',
'fieldname': u'description',
'fieldtype': u'Small Text',
'label': u'Description',
'oldfieldname': u'description',
'oldfieldtype': u'Small Text',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
'width': '300px'
'width': u'300px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'qty',
'fieldtype': 'Currency',
'idx': 4,
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'ref_rate',
'fieldtype': u'Currency',
'label': u'Price List Rate',
'oldfieldname': u'ref_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'adj_rate',
'fieldtype': u'Float',
'label': u'Discount (%)',
'oldfieldname': u'adj_rate',
'oldfieldtype': u'Float',
'permlevel': 0,
'print_hide': 0,
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'export_rate',
'fieldtype': u'Currency',
'in_filter': 0,
'label': 'Quantity',
'oldfieldname': 'qty',
'oldfieldtype': 'Currency',
'label': u'Rate',
'oldfieldname': u'export_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 0,
'reqd': 0,
'search_index': 0,
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'qty',
'fieldtype': u'Currency',
'in_filter': 0,
'label': u'Quantity',
'oldfieldname': u'qty',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
'search_index': 0,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'stock_uom',
'fieldtype': 'Data',
'idx': 5,
'label': 'UOM',
'oldfieldname': 'stock_uom',
'oldfieldtype': 'Data',
'permlevel': 1,
'reqd': 0,
'width': '100px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'ref_rate',
'fieldtype': 'Currency',
'idx': 6,
'label': 'Ref Rate',
'oldfieldname': 'ref_rate',
'oldfieldtype': 'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'trigger': 'Client',
'width': '100px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'adj_rate',
'fieldtype': 'Float',
'idx': 7,
'label': 'Discount (%)',
'oldfieldname': 'adj_rate',
'oldfieldtype': 'Float',
'permlevel': 0,
'print_hide': 1,
'trigger': 'Client',
'width': '100px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'export_rate',
'fieldtype': 'Currency',
'idx': 8,
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'export_amount',
'fieldtype': u'Currency',
'in_filter': 0,
'label': 'Rate',
'oldfieldname': 'export_rate',
'oldfieldtype': 'Currency',
'permlevel': 0,
'print_hide': 0,
'reqd': 0,
'search_index': 0,
'trigger': 'Client',
'width': '100px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'export_amount',
'fieldtype': 'Currency',
'idx': 9,
'in_filter': 0,
'label': 'Amount',
'oldfieldname': 'export_amount',
'oldfieldtype': 'Currency',
'label': u'Amount',
'oldfieldname': u'export_amount',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
'search_index': 0,
'width': '100px'
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'base_ref_rate',
'fieldtype': 'Currency',
'idx': 10,
'label': 'Ref Rate*',
'oldfieldname': 'base_ref_rate',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'base_ref_rate',
'fieldtype': u'Currency',
'label': u'Price List Rate*',
'oldfieldname': u'base_ref_rate',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'width': '100px'
'width': u'100px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'basic_rate',
'fieldtype': 'Currency',
'idx': 11,
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'basic_rate',
'fieldtype': u'Currency',
'in_filter': 0,
'label': 'Basic Rate*',
'oldfieldname': 'basic_rate',
'oldfieldtype': 'Currency',
'label': u'Basic Rate*',
'oldfieldname': u'basic_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'search_index': 0,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'amount',
'fieldtype': 'Currency',
'idx': 12,
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'stock_uom',
'fieldtype': u'Data',
'label': u'UOM',
'oldfieldname': u'stock_uom',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
'width': u'100px'
},
# DocField
{
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'amount',
'fieldtype': u'Currency',
'in_filter': 0,
'label': 'Amount*',
'oldfieldname': 'amount',
'oldfieldtype': 'Currency',
'label': u'Amount*',
'oldfieldname': u'amount',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 0,
'search_index': 0,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_group',
'fieldtype': 'Link',
'idx': 13,
'doctype': u'DocField',
'fieldname': u'item_group',
'fieldtype': u'Link',
'hidden': 1,
'in_filter': 1,
'label': 'Item Group',
'oldfieldname': 'item_group',
'oldfieldtype': 'Link',
'options': 'Item Group',
'label': u'Item Group',
'oldfieldname': u'item_group',
'oldfieldtype': u'Link',
'options': u'Item Group',
'permlevel': 1,
'print_hide': 1,
'search_index': 0
'search_index': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'brand',
'fieldtype': 'Link',
'idx': 14,
'doctype': u'DocField',
'fieldname': u'brand',
'fieldtype': u'Link',
'hidden': 1,
'in_filter': 1,
'label': 'Brand',
'oldfieldname': 'brand',
'oldfieldtype': 'Link',
'options': 'Brand',
'label': u'Brand',
'oldfieldname': u'brand',
'oldfieldtype': u'Link',
'options': u'Brand',
'permlevel': 1,
'print_hide': 1,
'search_index': 0,
'width': '150px'
'search_index': 1,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'item_tax_rate',
'fieldtype': u'Small Text',
'hidden': 1,
'label': u'Item Tax Rate',
'oldfieldname': u'item_tax_rate',
'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'prevdoc_docname',
'fieldtype': u'Data',
'label': u'Against Docname',
'no_copy': 1,
'oldfieldname': u'prevdoc_docname',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'report_hide': 0,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'prevdoc_doctype',
'fieldtype': u'Data',
'hidden': 1,
'label': u'Against Doctype',
'no_copy': 1,
'oldfieldname': u'prevdoc_doctype',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'report_hide': 0,
'width': u'150px'
},
# DocField
{
'allow_on_submit': 1,
'doctype': 'DocField',
'fieldname': 'page_break',
'fieldtype': 'Check',
'doctype': u'DocField',
'fieldname': u'page_break',
'fieldtype': u'Check',
'hidden': 0,
'idx': 15,
'label': 'Page Break',
'label': u'Page Break',
'no_copy': 1,
'oldfieldname': 'page_break',
'oldfieldtype': 'Check',
'oldfieldname': u'page_break',
'oldfieldtype': u'Check',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_tax_rate',
'fieldtype': 'Small Text',
'hidden': 1,
'idx': 16,
'label': 'Item Tax Rate',
'oldfieldname': 'item_tax_rate',
'oldfieldtype': 'Small Text',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'prevdoc_docname',
'fieldtype': 'Data',
'idx': 17,
'label': 'Against Docname',
'no_copy': 1,
'oldfieldname': 'prevdoc_docname',
'oldfieldtype': 'Data',
'permlevel': 1,
'print_hide': 1,
'report_hide': 0,
'width': '150px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'prevdoc_doctype',
'fieldtype': 'Data',
'hidden': 1,
'idx': 18,
'label': 'Against Doctype',
'no_copy': 1,
'oldfieldname': 'prevdoc_doctype',
'oldfieldtype': 'Data',
'permlevel': 1,
'print_hide': 1,
'report_hide': 0,
'width': '150px'
}
]

View File

@ -61,7 +61,7 @@ cur_frm.cscript.update_item_details = function(doc, dt, dn, callback) {
doc = locals[doc.doctype][doc.name];
if(!cur_frm.doc.__islocal) return;
var children = getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname);
if(children) {
if(children.length) {
$c_obj(make_doclist(doc.doctype, doc.name), 'get_item_details', '',
function(r, rt) {
if(!r.exc) {
@ -74,13 +74,6 @@ cur_frm.cscript.update_item_details = function(doc, dt, dn, callback) {
}
// -----------------
// Shipping Address
// -----------------
cur_frm.add_fetch('company', 'default_currency', 'currency');
cur_frm.add_fetch('company', 'default_currency', 'price_list_currency');
// ============== Customer and its primary contact Details ============================
@ -99,6 +92,94 @@ cur_frm.cscript.customer = function(doc, cdt, cdn) {
}
}
var set_dynamic_label_par = function(doc, cdt, cdn, base_curr) {
//parent flds
par_cols_base = {'net_total': 'Net Total', 'other_charges_total': 'Other Charges Total',
'grand_total': 'Grand Total', 'rounded_total': 'Rounded Total', 'in_words': 'In Words'}
par_cols_export = {'grand_total_export': 'Grand Total', 'rounded_total_export': 'Rounded Total', 'in_words_export': 'In Words'};
for (d in par_cols_base) cur_frm.fields_dict[d].label_area.innerHTML = par_cols_base[d]+' (' + base_curr + ')';
for (d in par_cols_export) cur_frm.fields_dict[d].label_area.innerHTML = par_cols_export[d]+' (' + doc.currency + ')';
cur_frm.fields_dict['conversion_rate'].label_area.innerHTML = "Conversion Rate (" + doc.currency +' -> '+ base_curr + ')';
cur_frm.fields_dict['plc_conversion_rate'].label_area.innerHTML = 'Price List Currency Conversion Rate (' + doc.price_list_currency +' -> '+ base_curr + ')';
if (doc.doctype == 'Receivable Voucher') {
cur_frm.fields_dict['total_advance'].label_area.innerHTML = 'Total Advance (' + base_curr + ')';
cur_frm.fields_dict['outstanding_amount'].label_area.innerHTML = 'Outstanding Amount (' + base_curr + ')';
}
}
var set_dynamic_label_child = function(doc, cdt, cdn, base_curr) {
// item table flds
item_cols_base = {'basic_rate': 'Basic Rate', 'base_ref_rate': 'Price List Rate', 'amount': 'Amount'};
item_cols_export = {'export_rate': 'Basic Rate', 'ref_rate': 'Price List Rate', 'export_amount': 'Amount'};
for (d in item_cols_base) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_base[d]+' ('+base_curr+')');
for (d in item_cols_export) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_export[d]+' ('+doc.currency+')');
var hide = (doc.currency == sys_defaults['currency']) ? false : true;
for (f in item_cols_base) cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide);
//tax table flds
tax_cols = {'tax_amount': 'Amount', 'total': 'Total'};
for (d in tax_cols) $('[data-grid-fieldname="RV Tax Detail-'+d+'"]').html(tax_cols[d]+' ('+base_curr+')');
if (doc.doctype == 'Receivable Voucher') {
// advance table flds
adv_cols = {'advance_amount': 'Advance Amount', 'allocated_amount': 'Allocated Amount'}
for (d in adv_cols) $('[data-grid-fieldname="Advance Adjustment Detail-'+d+'"]').html(adv_cols[d]+' ('+base_curr+')');
}
}
// Change label dynamically based on currency
//------------------------------------------------------------------
cur_frm.cscript.dynamic_label = function(doc, cdt, cdn) {
var callback = function(r, rt) {
if (r.message) base_curr = r.message;
else base_curr = sys_defaults['currency'];
set_dynamic_label_par(doc, cdt, cdn, base_curr);
set_dynamic_label_child(doc, cdt, cdn, base_curr);
}
if (doc.company == sys_defaults['company']) callback('', '');
else $c_obj(make_doclist(doc.doctype, doc.name), 'get_comp_base_currency', '', callback);
}
// hide / unhide price list currency based on availability of price list in customer's currency
//---------------------------------------------------------------------------------------------------
cur_frm.cscript.hide_price_list_currency = function(doc, cdt, cdn, callback1) {
if (doc.price_list_name && doc.currency) {
var callback = function(r, rt) {
pl_currency = r.message[0]?r.message[0]:[];
if (pl_currency.length==1) {
if (pl_currency[0] == doc.currency) set_multiple(cdt, cdn, {price_list_currency:doc.currency, plc_conversion_rate:doc.conversion_rate});
else if (pl_currency[0] = r.message[1]) set_multiple(cdt, cdn, {price_list_currency:pl_currency[0], plc_conversion_rate:1})
hide_field(['price_list_currency', 'plc_conversion_rate']);
} else unhide_field(['price_list_currency', 'plc_conversion_rate']);
if (r.message[1] == doc.currency) {
set_multiple(cdt, cdn, {conversion_rate:1});
hide_field(['conversion_rate', 'grand_total_export', 'in_words_export', 'rounded_total_export']);
} else unhide_field(['conversion_rate', 'grand_total_export', 'in_words_export', 'rounded_total_export']);
if (r.message[1] == doc.price_list_currency) {
set_multiple(cdt, cdn, {plc_conversion_rate:1});
hide_field('plc_conversion_rate');
} else unhide_field('plc_conversion_rate');
callback1()
}
$c_obj(make_doclist(doc.doctype, doc.name), 'get_price_list_currency', '', callback);
}
}
//====================opens territory tree page ==================
cur_frm.cscript.TerritoryHelp = function(doc,dt,dn){
var call_back = function(){
@ -123,29 +204,42 @@ cur_frm.cscript.CGHelp = function(doc,dt,dn){
// =====================================================================================================
// ********************* CURRENCY ******************************
cur_frm.cscript.currency = function(doc, cdt, cdn) {
cur_frm.cscript.price_list_name(doc, cdt, cdn);
cur_frm.cscript.currency = function(doc, cdt, cdn) {
cur_frm.cscript.price_list_name(doc, cdt, cdn);
}
cur_frm.cscript.price_list_currency = cur_frm.cscript.currency;
cur_frm.cscript.conversion_rate = cur_frm.cscript.currency;
cur_frm.cscript.plc_conversion_rate = cur_frm.cscript.currency;
cur_frm.cscript.company = function(doc, dt, dn) {
var callback = function(r, rt) {
var doc = locals[dt][dn];
set_multiple(doc.doctype, doc.name, {currency:r.message,price_list_currency:r.message});
cur_frm.cscript.currency(doc, cdt, cdn);
}
$c_obj(make_doclist(doc.doctype, doc.name), 'get_comp_base_currency', '', callback);
}
// ******************** PRICE LIST ******************************
cur_frm.cscript.price_list_name = function(doc, cdt, cdn) {
var fname = cur_frm.cscript.fname;
var cl = getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname);
if(doc.price_list_name && doc.currency && doc.price_list_currency && doc.conversion_rate && doc.plc_conversion_rate && cl.length) {
$c_obj(make_doclist(doc.doctype, doc.name), 'get_adj_percent', '',
function(r, rt) {
refresh_field(fname);
var doc = locals[cdt][cdn];
cur_frm.cscript.recalc(doc,3); //this is to re-calculate BASIC RATE and AMOUNT on basis of changed REF RATE
}
);
var callback = function() {
var fname = cur_frm.cscript.fname;
var cl = getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname);
if(doc.price_list_name && doc.currency && doc.price_list_currency && doc.conversion_rate && doc.plc_conversion_rate) {
$c_obj(make_doclist(doc.doctype, doc.name), 'get_adj_percent', '',
function(r, rt) {
refresh_field(fname);
var doc = locals[cdt][cdn];
cur_frm.cscript.recalc(doc,3); //this is to re-calculate BASIC RATE and AMOUNT on basis of changed REF RATE
cur_frm.cscript.dynamic_label(doc, cdt, cdn);
}
);
}
}
cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn, callback);
}
@ -171,7 +265,8 @@ cur_frm.cscript.item_code = function(doc, cdt, cdn) {
var callback = function(r, rt){
cur_frm.cscript.recalc(doc, 1);
}
get_server_fields('get_item_details',d.item_code, fname,doc,cdt,cdn,1,callback);
var args = {'item_code':d.item_code, 'income_account':d.income_account, 'cost_center': d.cost_center, 'warehouse': d.warehouse};
get_server_fields('get_item_details',JSON.stringify(args), fname,doc,cdt,cdn,1,callback);
}
}
if(cur_frm.cscript.custom_item_code){

View File

@ -124,13 +124,13 @@ class DocType(TransactionBase):
# Get Item Details
# ===============================================================
def get_item_details(self, item_code, obj):
def get_item_details(self, args, obj):
import json
if not obj.doc.price_list_name:
msgprint("Please Select Price List before selecting Items")
raise Exception
item = webnotes.conn.sql("select description, item_name, brand, item_group, stock_uom, default_warehouse, default_income_account, default_sales_cost_center, description_html from `tabItem` where name = '%s' and (ifnull(end_of_life,'')='' or end_of_life > now() or end_of_life = '0000-00-00') and (is_sales_item = 'Yes' or is_service_item = 'Yes')" % (item_code), as_dict=1)
tax = webnotes.conn.sql("select tax_type, tax_rate from `tabItem Tax` where parent = %s" , item_code)
item = webnotes.conn.sql("select description, item_name, brand, item_group, stock_uom, default_warehouse, default_income_account, default_sales_cost_center, description_html from `tabItem` where name = '%s' and (ifnull(end_of_life,'')='' or end_of_life > now() or end_of_life = '0000-00-00') and (is_sales_item = 'Yes' or is_service_item = 'Yes')" % (args['item_code']), as_dict=1)
tax = webnotes.conn.sql("select tax_type, tax_rate from `tabItem Tax` where parent = %s" , args['item_code'])
t = {}
for x in tax: t[x[0]] = flt(x[1])
ret = {
@ -140,9 +140,9 @@ class DocType(TransactionBase):
'brand' : item and item[0]['brand'] or '',
'stock_uom' : item and item[0]['stock_uom'] or '',
'reserved_warehouse' : item and item[0]['default_warehouse'] or '',
'warehouse' : item and item[0]['default_warehouse'] or '',
'income_account' : item and item[0]['default_income_account'] or '',
'cost_center' : item and item[0]['default_sales_cost_center'] or '',
'warehouse' : item and item[0]['default_warehouse'] or args.get('warehouse'),
'income_account' : item and item[0]['default_income_account'] or args.get('income_account'),
'cost_center' : item and item[0]['default_sales_cost_center'] or args.get('cost_center'),
'qty' : 1.00, # this is done coz if item once fetched is fetched again thn its qty shld be reset to 1
'adj_rate' : 0,
'amount' : 0,
@ -151,7 +151,7 @@ class DocType(TransactionBase):
'batch_no' : ''
}
if(obj.doc.price_list_name and item): #this is done to fetch the changed BASIC RATE and REF RATE based on PRICE LIST
base_ref_rate = self.get_ref_rate(item_code, obj.doc.price_list_name, obj.doc.price_list_currency, obj.doc.plc_conversion_rate)
base_ref_rate = self.get_ref_rate(args['item_code'], obj.doc.price_list_name, obj.doc.price_list_currency, obj.doc.plc_conversion_rate)
ret['ref_rate'] = flt(base_ref_rate)/flt(obj.doc.conversion_rate)
ret['export_rate'] = flt(base_ref_rate)/flt(obj.doc.conversion_rate)
ret['base_ref_rate'] = flt(base_ref_rate)
@ -174,8 +174,22 @@ class DocType(TransactionBase):
d.basic_rate = flt(base_ref_rate)
d.base_ref_rate = flt(base_ref_rate)
d.export_rate = flt(base_ref_rate)/flt(obj.doc.conversion_rate)
d.amount = flt(d.qty)*flt(base_ref_rate)
d.export_amount = flt(d.qty)*flt(base_ref_rate)/flt(obj.doc.conversion_rate)
def get_comp_base_currency(self, comp):
""" get default currency of company"""
return webnotes.conn.sql("select default_currency from `tabCompany` where name = %s", comp)[0][0]
def get_price_list_currency(self, price_list, comp):
""" Get all currency in which price list is maintained"""
plc = webnotes.conn.sql("select distinct ref_currency from `tabRef Rate Detail` where price_list_name = %s", price_list)
plc = [d[0] for d in plc]
base_currency = self.get_comp_base_currency(comp)
return plc, base_currency
# Load Default Taxes
# ====================
def load_default_taxes(self, obj):

View File

@ -38,21 +38,26 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(doc.__islocal){
hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','shipping_address']);
}
}
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
if(doc.__islocal) {
// defined in sales_common.js
cur_frm.cscript.update_item_details(doc, cdt, cdn, callback);
cur_frm.cscript.update_item_details(doc, cdt, cdn);
}
}
// Refresh
//==================
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.clear_custom_buttons();
var callback = function() {
cur_frm.cscript.dynamic_label(doc, cdt, cdn);
}
cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn, callback);
if(doc.docstatus==1) {
if(doc.status != 'Stopped') {
cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
@ -98,7 +103,7 @@ cur_frm.cscript.customer = function(doc,dt,dn) {
}
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback);
if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','shipping_address']);
if(doc.customer) unhide_field(['customer_address', 'contact_person', 'customer_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory','customer_group','shipping_address']);
}
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
@ -151,13 +156,6 @@ cur_frm.cscript.new_contact = function(){
// DOCTYPE TRIGGERS
// ================================================================================================
/*
// ***************** get shipping address based on customer selected *****************
cur_frm.fields_dict['ship_det_no'].get_query = function(doc, cdt, cdn) {
return 'SELECT `tabShipping Address`.`name`, `tabShipping Address`.`ship_to`, `tabShipping Address`.`shipping_address` FROM `tabShipping Address` WHERE `tabShipping Address`.customer = "'+ doc.customer+'" AND `tabShipping Address`.`docstatus` != 2 AND `tabShipping Address`.`name` LIKE "%s" ORDER BY `tabShipping Address`.name ASC LIMIT 50';
}
*/
// ***************** Get project name *****************
cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {

View File

@ -101,9 +101,10 @@ class DocType(TransactionBase):
# ================================================================================
# Get Item Details
# ----------------
def get_item_details(self, item_code=None):
if item_code:
return get_obj('Sales Common').get_item_details(item_code, self)
def get_item_details(self, args=None):
args = eval(args)
if args['item_code']:
return get_obj('Sales Common').get_item_details(args, self)
else:
obj = get_obj('Sales Common')
for doc in self.doclist:
@ -119,6 +120,15 @@ class DocType(TransactionBase):
def get_adj_percent(self, arg=''):
get_obj('Sales Common').get_adj_percent(self)
def get_comp_base_currency(self):
return get_obj('Sales Common').get_comp_base_currency(self.doc.company)
def get_price_list_currency(self):
return get_obj('Sales Common').get_price_list_currency(self.doc.price_list_name, self.doc.company)
# Get projected qty of item based on warehouse selected
# -----------------------------------------------------
def get_available_qty(self,args):

File diff suppressed because it is too large Load Diff

View File

@ -5,342 +5,295 @@
{
'creation': '2010-08-08 17:09:22',
'docstatus': 0,
'modified': '2011-04-12 14:08:58',
'modified_by': 'Administrator',
'owner': 'Administrator'
'modified': '2012-02-24 10:38:06',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'autoname': 'SOD/.#####',
'colour': 'White:FFF',
'autoname': u'SOD/.#####',
'colour': u'White:FFF',
'default_print_format': u'Standard',
'doctype': 'DocType',
'istable': 1,
'module': 'Selling',
'module': u'Selling',
'name': '__common__',
'section_style': 'Tray',
'server_code_error': ' ',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 52
'version': 49
},
# These values are common for all DocField
{
'doctype': 'DocField',
'doctype': u'DocField',
'name': '__common__',
'parent': 'Sales Order Detail',
'parentfield': 'fields',
'parenttype': 'DocType'
'parent': u'Sales Order Detail',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# DocType, Sales Order Detail
{
'doctype': 'DocType',
'name': 'Sales Order Detail'
'name': u'Sales Order Detail'
},
# DocField
{
'allow_on_submit': 0,
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'item_code',
'fieldtype': 'Link',
'idx': 1,
'doctype': u'DocField',
'fieldname': u'item_code',
'fieldtype': u'Link',
'in_filter': 1,
'label': 'Item Code',
'oldfieldname': 'item_code',
'oldfieldtype': 'Link',
'options': 'Item',
'label': u'Item Code',
'oldfieldname': u'item_code',
'oldfieldtype': u'Link',
'options': u'Item',
'permlevel': 0,
'reqd': 1,
'search_index': 1,
'trigger': 'Client',
'width': '150px'
'trigger': u'Client',
'width': u'150px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_name',
'fieldtype': 'Data',
'idx': 2,
'label': 'Item Name',
'oldfieldname': 'item_name',
'oldfieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'item_name',
'fieldtype': u'Data',
'label': u'Item Name',
'oldfieldname': u'item_name',
'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'width': '150'
'width': u'150'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'description',
'fieldtype': 'Small Text',
'idx': 3,
'doctype': u'DocField',
'fieldname': u'description',
'fieldtype': u'Small Text',
'in_filter': 1,
'label': 'Description',
'oldfieldname': 'description',
'oldfieldtype': 'Small Text',
'label': u'Description',
'oldfieldname': u'description',
'oldfieldtype': u'Small Text',
'permlevel': 0,
'reqd': 1,
'search_index': 1,
'width': '300px'
'width': u'300px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'qty',
'fieldtype': 'Currency',
'idx': 4,
'label': 'Quantity',
'oldfieldname': 'qty',
'oldfieldtype': 'Currency',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'qty',
'fieldtype': u'Currency',
'label': u'Quantity',
'oldfieldname': u'qty',
'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 1,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'stock_uom',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'stock_uom',
'fieldtype': u'Data',
'hidden': 0,
'idx': 5,
'label': 'UOM',
'oldfieldname': 'stock_uom',
'oldfieldtype': 'Data',
'label': u'UOM',
'oldfieldname': u'stock_uom',
'oldfieldtype': u'Data',
'permlevel': 1,
'reqd': 0,
'width': '70px'
'width': u'70px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'ref_rate',
'fieldtype': 'Currency',
'idx': 6,
'label': 'Ref Rate',
'oldfieldname': 'ref_rate',
'oldfieldtype': 'Currency',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'ref_rate',
'fieldtype': u'Currency',
'label': u'Price List Rate',
'oldfieldname': u'ref_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'trigger': 'Client',
'width': '70px'
'trigger': u'Client',
'width': u'70px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'adj_rate',
'fieldtype': 'Float',
'idx': 7,
'label': 'Discount(%)',
'oldfieldname': 'adj_rate',
'oldfieldtype': 'Float',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'adj_rate',
'fieldtype': u'Float',
'label': u'Discount(%)',
'oldfieldname': u'adj_rate',
'oldfieldtype': u'Float',
'permlevel': 0,
'print_hide': 1,
'trigger': 'Client',
'width': '70px'
'trigger': u'Client',
'width': u'70px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'export_rate',
'fieldtype': 'Currency',
'idx': 8,
'label': 'Rate',
'oldfieldname': 'export_rate',
'oldfieldtype': 'Currency',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'export_rate',
'fieldtype': u'Currency',
'label': u'Rate',
'oldfieldname': u'export_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 0,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'export_amount',
'fieldtype': 'Currency',
'idx': 9,
'label': 'Amount',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'export_amount',
'fieldtype': u'Currency',
'label': u'Amount',
'no_copy': 0,
'oldfieldname': 'export_amount',
'oldfieldtype': 'Currency',
'oldfieldname': u'export_amount',
'oldfieldtype': u'Currency',
'permlevel': 1,
'reqd': 0,
'width': '100px'
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'base_ref_rate',
'fieldtype': 'Currency',
'idx': 10,
'label': 'Ref Rate*',
'oldfieldname': 'base_ref_rate',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'base_ref_rate',
'fieldtype': u'Currency',
'label': u'Price List Rate*',
'oldfieldname': u'base_ref_rate',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'width': '100px'
'width': u'100px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'basic_rate',
'fieldtype': 'Currency',
'idx': 11,
'label': 'Basic Rate*',
'oldfieldname': 'basic_rate',
'oldfieldtype': 'Currency',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'basic_rate',
'fieldtype': u'Currency',
'label': u'Basic Rate*',
'oldfieldname': u'basic_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'amount',
'fieldtype': 'Currency',
'idx': 12,
'label': 'Amount*',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'amount',
'fieldtype': u'Currency',
'label': u'Amount*',
'no_copy': 0,
'oldfieldname': 'amount',
'oldfieldtype': 'Currency',
'oldfieldname': u'amount',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 0,
'width': '100px'
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'reserved_warehouse',
'fieldtype': 'Link',
'idx': 13,
'label': 'Reserved Warehouse',
'doctype': u'DocField',
'fieldname': u'reserved_warehouse',
'fieldtype': u'Link',
'label': u'Reserved Warehouse',
'no_copy': 1,
'oldfieldname': 'reserved_warehouse',
'oldfieldtype': 'Link',
'options': 'Warehouse',
'oldfieldname': u'reserved_warehouse',
'oldfieldtype': u'Link',
'options': u'Warehouse',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'trigger': 'Client',
'width': '150px'
'trigger': u'Client',
'width': u'150px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'projected_qty',
'fieldtype': 'Currency',
'idx': 14,
'label': 'Projected Qty',
'colour': u'White:FFF',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'projected_qty',
'fieldtype': u'Currency',
'hidden': 1,
'label': u'Projected Qty',
'no_copy': 1,
'oldfieldname': 'projected_qty',
'oldfieldtype': 'Currency',
'oldfieldname': u'projected_qty',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'width': '70px'
'width': u'70px'
},
# DocField
{
'colour': 'White:FFF',
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'actual_qty',
'fieldtype': 'Currency',
'idx': 15,
'label': 'Actual Qty',
'colour': u'White:FFF',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'actual_qty',
'fieldtype': u'Currency',
'label': u'Actual Qty',
'no_copy': 1,
'permlevel': 1,
'print_hide': 1,
'width': '70px'
'width': u'70px'
},
# DocField
{
'colour': 'White:FFF',
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'indented_qty',
'fieldtype': 'Currency',
'idx': 16,
'label': 'Indented Qty',
'no_copy': 1,
'permlevel': 1,
'print_hide': 1,
'width': '70px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'delivered_qty',
'fieldtype': 'Currency',
'colour': u'White:FFF',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'delivered_qty',
'fieldtype': u'Currency',
'hidden': 0,
'idx': 17,
'in_filter': 0,
'label': 'Delivered Qty',
'label': u'Delivered Qty',
'no_copy': 1,
'oldfieldname': 'delivered_qty',
'oldfieldtype': 'Currency',
'oldfieldname': u'delivered_qty',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'search_index': 0,
'width': '100px'
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'billed_qty',
'fieldtype': 'Currency',
'idx': 18,
'in_filter': 0,
'label': 'Billed Qty',
'no_copy': 1,
'oldfieldname': 'billed_qty',
'oldfieldtype': 'Currency',
'permlevel': 1,
'print_hide': 1,
'search_index': 0,
'width': '100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'billed_amt',
'fieldtype': 'Currency',
'idx': 19,
'label': 'Billed Amt',
'doctype': u'DocField',
'fieldname': u'billed_amt',
'fieldtype': u'Currency',
'label': u'Billed Amt',
'no_copy': 1,
'permlevel': 1,
'print_hide': 1
@ -348,83 +301,84 @@
# DocField
{
'description': 'For Production',
'doctype': 'DocField',
'fieldname': 'planned_qty',
'fieldtype': 'Currency',
'colour': u'White:FFF',
'description': u'For Production',
'doctype': u'DocField',
'fieldname': u'planned_qty',
'fieldtype': u'Currency',
'hidden': 1,
'idx': 20,
'label': 'Planned Quantity',
'label': u'Planned Quantity',
'no_copy': 1,
'oldfieldname': 'planned_qty',
'oldfieldtype': 'Currency',
'oldfieldname': u'planned_qty',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1,
'width': '50px'
'width': u'50px'
},
# DocField
{
'description': 'For Production',
'doctype': 'DocField',
'fieldname': 'produced_qty',
'fieldtype': 'Currency',
'colour': u'White:FFF',
'description': u'For Production',
'doctype': u'DocField',
'fieldname': u'produced_qty',
'fieldtype': u'Currency',
'hidden': 1,
'idx': 21,
'label': 'Produced Quantity',
'oldfieldname': 'produced_qty',
'oldfieldtype': 'Currency',
'label': u'Produced Quantity',
'oldfieldname': u'produced_qty',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1,
'width': '50px'
'width': u'50px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'brand',
'fieldtype': 'Link',
'idx': 22,
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'brand',
'fieldtype': u'Link',
'hidden': 1,
'in_filter': 1,
'label': 'Brand Name',
'oldfieldname': 'brand',
'oldfieldtype': 'Link',
'options': 'Brand',
'label': u'Brand Name',
'oldfieldname': u'brand',
'oldfieldtype': u'Link',
'options': u'Brand',
'permlevel': 1,
'print_hide': 1,
'search_index': 0
'search_index': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_group',
'fieldtype': 'Link',
'idx': 23,
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'item_group',
'fieldtype': u'Link',
'hidden': 1,
'in_filter': 1,
'label': 'Item Group',
'oldfieldname': 'item_group',
'oldfieldtype': 'Link',
'options': 'Item Group',
'label': u'Item Group',
'oldfieldname': u'item_group',
'oldfieldtype': u'Link',
'options': u'Item Group',
'permlevel': 1,
'print_hide': 1,
'search_index': 0
'search_index': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'prevdoc_docname',
'fieldtype': 'Link',
'doctype': u'DocField',
'fieldname': u'prevdoc_docname',
'fieldtype': u'Link',
'hidden': 0,
'idx': 24,
'in_filter': 1,
'label': 'Quotation No.',
'oldfieldname': 'prevdoc_docname',
'oldfieldtype': 'Link',
'options': 'Quotation',
'label': u'Quotation No.',
'oldfieldname': u'prevdoc_docname',
'oldfieldtype': u'Link',
'options': u'Quotation',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@ -433,13 +387,12 @@
# DocField
{
'allow_on_submit': 1,
'doctype': 'DocField',
'fieldname': 'page_break',
'fieldtype': 'Check',
'idx': 25,
'label': 'Page Break',
'oldfieldname': 'page_break',
'oldfieldtype': 'Check',
'doctype': u'DocField',
'fieldname': u'page_break',
'fieldtype': u'Check',
'label': u'Page Break',
'oldfieldname': u'page_break',
'oldfieldtype': u'Check',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
@ -447,15 +400,15 @@
# DocField
{
'description': 'required for production. will be used later.',
'doctype': 'DocField',
'fieldname': 'delivery_date',
'fieldtype': 'Date',
'hidden': 0,
'idx': 26,
'label': 'Expected Delivery Date',
'oldfieldname': 'delivery_date',
'oldfieldtype': 'Date',
'colour': u'White:FFF',
'description': u'required for production. will be used later.',
'doctype': u'DocField',
'fieldname': u'delivery_date',
'fieldtype': u'Date',
'hidden': 1,
'label': u'Expected Delivery Date',
'oldfieldname': u'delivery_date',
'oldfieldtype': u'Date',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1
@ -464,16 +417,16 @@
# DocField
{
'allow_on_submit': 1,
'description': 'required for production. will be used later.',
'doctype': 'DocField',
'fieldname': 'confirmation_date',
'fieldtype': 'Date',
'colour': u'White:FFF',
'description': u'required for production. will be used later.',
'doctype': u'DocField',
'fieldname': u'confirmation_date',
'fieldtype': u'Date',
'hidden': 0,
'idx': 27,
'in_filter': 1,
'label': 'Confirmed Delivery Date',
'oldfieldname': 'confirmation_date',
'oldfieldtype': 'Date',
'label': u'Confirmed Delivery Date',
'oldfieldname': u'confirmation_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1,
@ -482,14 +435,14 @@
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_tax_rate',
'fieldtype': 'Small Text',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'item_tax_rate',
'fieldtype': u'Small Text',
'hidden': 1,
'idx': 28,
'label': 'Item Tax Rate',
'oldfieldname': 'item_tax_rate',
'oldfieldtype': 'Small Text',
'label': u'Item Tax Rate',
'oldfieldname': u'item_tax_rate',
'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1
@ -497,16 +450,16 @@
# DocField
{
'description': 'The date at which current entry is made in system.',
'doctype': 'DocField',
'fieldname': 'transaction_date',
'fieldtype': 'Date',
'colour': u'White:FFF',
'description': u'The date at which current entry is made in system.',
'doctype': u'DocField',
'fieldname': u'transaction_date',
'fieldtype': u'Date',
'hidden': 1,
'idx': 29,
'in_filter': 0,
'label': 'Sales Order Date',
'oldfieldname': 'transaction_date',
'oldfieldtype': 'Date',
'label': u'Sales Order Date',
'oldfieldname': u'transaction_date',
'oldfieldtype': u'Date',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1,

View File

@ -422,49 +422,6 @@ class DocType:
#webnotes.errprint(webnotes.getTraceback())
def on_update(self):
"""
"""
import webnotes
args = {
'db_name': webnotes.conn.get_value('Control Panel', '', 'account_id'),
'event': 'setup.doctype.email_digest.email_digest.send'
}
from webnotes.utils.scheduler import Scheduler
#print "before scheduler"
sch = Scheduler()
sch.connect()
if self.doc.enabled == 1:
# Create scheduler entry
res = sch.conn.sql("""
SELECT * FROM Event
WHERE
db_name = %(db_name)s AND
event = %(event)s
""", args)
if not (res and res[0]):
args['next_execution'] = self.get_next_execution()
sch.conn.begin()
sch.conn.sql("""
INSERT INTO Event (db_name, event, `interval`, next_execution, recurring)
VALUES (%(db_name)s, %(event)s, 86400, %(next_execution)s, 1)
""", args)
sch.conn.commit()
else:
# delete scheduler entry if no other email digest is enabled
res = webnotes.conn.sql("""
SELECT * FROM `tabEmail Digest`
WHERE enabled=1
""")
if not (res and res[0]):
sch.clear(args['db_name'], args['event'])
#print "after on update"
def get_next_sending(self):
"""

View File

@ -17,13 +17,40 @@
"""will be called by scheduler"""
import webnotes
from webnotes.utils import scheduler
def execute_all():
"""get support email"""
from support.doctype.support_ticket import get_support_mails
get_support_mails()
"""
* get support email
* recurring invoice
"""
try:
from support.doctype.support_ticket import get_support_mails
get_support_mails()
except Exception, e:
scheduler.log('get_support_mails')
try:
from accounts.doctype.gl_control.gl_control import manage_recurring_invoices
manage_recurring_invoices()
except Exception, e:
scheduler.log('manage_recurring_invoices')
def execute_daily():
"""email digest"""
from setup.doctype.email_digest.email_digest import send
send()
try:
from setup.doctype.email_digest.email_digest import send
send()
except Exception, e:
scheduler.log('email_digest.send')
def execute_weekly():
pass
def execute_monthly():
pass
def execute_hourly():
pass

View File

@ -38,24 +38,23 @@ cur_frm.cscript.onload = function(doc, dt, dn) {
if(doc.__islocal){
hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
}
}
}
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
// defined in sales_common.js
//cur_frm.cscript.update_item_details(doc, cdt, cdn);
// load default charges
if(doc.__islocal && !getchildren('RV Tax Detail', doc.name, 'other_charges', doc.doctype).length)
cur_frm.cscript.load_taxes(doc, cdt, cdn);
if(doc.__islocal) cur_frm.cscript.update_item_details(doc, dt, dn);
}
// REFRESH
// ================================================================================================
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.clear_custom_buttons();
var callback = function() {
cur_frm.cscript.dynamic_label(doc, cdt, cdn);
}
cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn, callback);
if(doc.per_billed < 100 && doc.docstatus==1) cur_frm.add_custom_button('Make Invoice', cur_frm.cscript['Make Sales Invoice']);
@ -160,61 +159,6 @@ cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
return repl('SELECT `tabProject`.name FROM `tabProject` WHERE `tabProject`.status = "Open" AND %(cond)s `tabProject`.name LIKE "%s" ORDER BY `tabProject`.name ASC LIMIT 50', {cond:cond});
}
/*
//---- get customer details ----------------------------
cur_frm.cscript.project_name = function(doc,cdt,cdn){
$c_obj(make_doclist(doc.doctype, doc.name),'pull_project_customer','', function(r,rt){
refresh_many(['customer','customer_name', 'customer_address', 'contact_person', 'territory', 'contact_no', 'email_id', 'customer_group']);
});
}
*/
// UTILITY FUNCTIONS
// ================================================================================================
/*
var cfn_set_fields = function(doc, cdt, cdn) {
var supplier_field_list = ['Supplier','supplier','supplier_address'];
var customer_field_list = ['Customer','customer','customer_name','customer_address','territory','customer_group','Business Associate','sales_partner','commission_rate','total_commission','sales_order_no','Get Items'];
if (doc.delivery_type == 'Rejected' && doc.purchase_receipt_no) {
unhide_field('purchase_receipt_no');
unhide_field(supplier_field_list);
hide_field(customer_field_list);
get_field(doc.doctype, 'delivery_type' , doc.name).permlevel = 1;
}
else if (doc.delivery_type == 'Subcontract' && doc.purchase_order_no) {
unhide_field('purchase_order_no');
unhide_field(supplier_field_list);
hide_field(cutomer_field_list);
get_field(doc.doctype, 'delivery_type' , doc.name).permlevel = 1;
}
else if (doc.delivery_type == 'Sample') unhide_field('to_warehouse');
else get_field(doc.doctype, 'delivery_type' , doc.name).permlevel = 0;
}
*/
// DOCTYPE TRIGGERS
// ================================================================================================
/*
// ***************** Get Contact Person based on customer selected *****************
cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
return 'SELECT `tabContact`.contact_name FROM `tabContact` WHERE ((`tabContact`.is_customer = 1 AND `tabContact`.customer = "'+ doc.customer+'") or (`tabContact`.is_sales_partner = 1 AND `tabContact`.sales_partner = "'+ doc.sales_partner+'")) AND `tabContact`.docstatus != 2 AND `tabContact`.contact_name LIKE "%s" ORDER BY `tabContact`.contact_name ASC LIMIT 50';
}
*/
/*
// ***************** get shipping address based on customer selected *****************
cur_frm.fields_dict['ship_det_no'].get_query = function(doc, cdt, cdn) {
return 'SELECT `tabShipping Address`.`name`, `tabShipping Address`.`ship_to`, `tabShipping Address`.`shipping_address` FROM `tabShipping Address` WHERE `tabShipping Address`.customer = "'+ doc.customer+'" AND `tabShipping Address`.`docstatus` != 2 AND `tabShipping Address`.`name` LIKE "%s" ORDER BY `tabShipping Address`.name ASC LIMIT 50';
}
*/
// *************** Customized link query for SALES ORDER based on customer and currency*****************************
cur_frm.fields_dict['sales_order_no'].get_query = function(doc) {
@ -248,13 +192,6 @@ cur_frm.cscript.serial_no = function(doc, cdt , cdn) {
}
}
/*
// this won't work in case of Sales Bom item where item.is_stock_item = 'No'
cur_frm.fields_dict['delivery_note_details'].grid.get_field('warehouse').get_query= function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
return "SELECT `tabBin`.`warehouse`, `tabBin`.`actual_qty` FROM `tabBin` WHERE `tabBin`.`item_code` = '"+ d.item_code +"' AND ifnull(`tabBin`.`actual_qty`,0) > 0 AND `tabBin`.`warehouse` like '%s' ORDER BY `tabBin`.`warehouse` DESC LIMIT 50";
}
*/
cur_frm.cscript.warehouse = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];

View File

@ -116,9 +116,10 @@ class DocType(TransactionBase):
# ================================================================================
# ***************** Get Item Details ******************************
def get_item_details(self, item_code=None):
if item_code:
return get_obj('Sales Common').get_item_details(item_code, self)
def get_item_details(self, args=None):
args = eval(args)
if args['item_code']:
return get_obj('Sales Common').get_item_details(args, self)
else:
obj = get_obj('Sales Common')
for doc in self.doclist:
@ -133,6 +134,14 @@ class DocType(TransactionBase):
def get_adj_percent(self, arg=''):
get_obj('Sales Common').get_adj_percent(self)
def get_comp_base_currency(self):
return get_obj('Sales Common').get_comp_base_currency(self.doc.company)
def get_price_list_currency(self):
return get_obj('Sales Common').get_price_list_currency(self.doc.price_list_name, self.doc.company)
# ********** Get Actual Qty of item in warehouse selected *************
def get_actual_qty(self,args):
args = eval(args)

File diff suppressed because it is too large Load Diff

View File

@ -5,403 +5,419 @@
{
'creation': '2010-08-08 17:08:58',
'docstatus': 0,
'modified': '2012-02-01 16:08:06',
'modified_by': 'Administrator',
'owner': 'Administrator'
'modified': '2012-02-24 11:33:58',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'_last_update': '1311621379',
'autoname': 'DND/.#######',
'colour': 'White:FFF',
'default_print_format': 'Standard',
'_last_update': u'1311621379',
'autoname': u'DND/.#######',
'colour': u'White:FFF',
'default_print_format': u'Standard',
'doctype': 'DocType',
'istable': 1,
'module': 'Stock',
'module': u'Stock',
'name': '__common__',
'section_style': 'Tray',
'server_code_error': ' ',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 51
'version': 53
},
# These values are common for all DocField
{
'doctype': 'DocField',
'doctype': u'DocField',
'name': '__common__',
'parent': 'Delivery Note Detail',
'parentfield': 'fields',
'parenttype': 'DocType'
'parent': u'Delivery Note Detail',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# DocType, Delivery Note Detail
{
'doctype': 'DocType',
'name': 'Delivery Note Detail'
'name': u'Delivery Note Detail'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_code',
'fieldtype': 'Link',
'doctype': u'DocField',
'fieldname': u'item_code',
'fieldtype': u'Link',
'in_filter': 1,
'label': 'Item Code',
'oldfieldname': 'item_code',
'oldfieldtype': 'Link',
'options': 'Item',
'label': u'Item Code',
'oldfieldname': u'item_code',
'oldfieldtype': u'Link',
'options': u'Item',
'permlevel': 0,
'reqd': 1,
'search_index': 1,
'trigger': 'Client',
'width': '150px'
'trigger': u'Client',
'width': u'150px'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'item_name',
'fieldtype': 'Data',
'label': 'Item Name',
'oldfieldname': 'item_name',
'oldfieldtype': 'Data',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'item_name',
'fieldtype': u'Data',
'label': u'Item Name',
'oldfieldname': u'item_name',
'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'width': '150px'
'width': u'150px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'description',
'fieldtype': 'Small Text',
'label': 'Description',
'oldfieldname': 'description',
'oldfieldtype': 'Small Text',
'doctype': u'DocField',
'fieldname': u'description',
'fieldtype': u'Small Text',
'label': u'Description',
'oldfieldname': u'description',
'oldfieldtype': u'Small Text',
'permlevel': 0,
'reqd': 1,
'width': '300px'
'width': u'300px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'qty',
'fieldtype': 'Currency',
'label': 'Quantity',
'oldfieldname': 'qty',
'oldfieldtype': 'Currency',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'qty',
'fieldtype': u'Currency',
'label': u'Quantity',
'oldfieldname': u'qty',
'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 1,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'stock_uom',
'fieldtype': 'Data',
'label': 'UOM',
'oldfieldname': 'stock_uom',
'oldfieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'stock_uom',
'fieldtype': u'Data',
'label': u'UOM',
'oldfieldname': u'stock_uom',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 0,
'reqd': 1,
'width': '50px'
'width': u'50px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'ref_rate',
'fieldtype': 'Currency',
'label': 'Ref Rate',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'ref_rate',
'fieldtype': u'Currency',
'label': u'Price List Rate',
'no_copy': 0,
'oldfieldname': 'ref_rate',
'oldfieldtype': 'Currency',
'oldfieldname': u'ref_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'adj_rate',
'fieldtype': 'Float',
'label': 'Discount (%)',
'oldfieldname': 'adj_rate',
'oldfieldtype': 'Float',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'adj_rate',
'fieldtype': u'Float',
'label': u'Discount (%)',
'oldfieldname': u'adj_rate',
'oldfieldtype': u'Float',
'permlevel': 0,
'print_hide': 1,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'export_rate',
'fieldtype': 'Currency',
'label': 'Rate',
'oldfieldname': 'export_rate',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'export_rate',
'fieldtype': u'Currency',
'label': u'Rate',
'oldfieldname': u'export_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 0,
'reqd': 0,
'trigger': 'Client',
'width': '150px'
'trigger': u'Client',
'width': u'150px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'export_amount',
'fieldtype': 'Currency',
'label': 'Amount',
'oldfieldname': 'export_amount',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'export_amount',
'fieldtype': u'Currency',
'label': u'Amount',
'oldfieldname': u'export_amount',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
'width': '100px'
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'base_ref_rate',
'fieldtype': 'Currency',
'label': 'Ref Rate*',
'oldfieldname': 'base_ref_rate',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'base_ref_rate',
'fieldtype': u'Currency',
'label': u'Price List Rate*',
'oldfieldname': u'base_ref_rate',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'width': '100px'
'width': u'100px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'basic_rate',
'fieldtype': 'Currency',
'label': 'Rate*',
'oldfieldname': 'basic_rate',
'oldfieldtype': 'Currency',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'basic_rate',
'fieldtype': u'Currency',
'label': u'Rate*',
'oldfieldname': u'basic_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'trigger': 'Client',
'width': '150px'
'trigger': u'Client',
'width': u'150px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'amount',
'fieldtype': 'Currency',
'label': 'Amount*',
'oldfieldname': 'amount',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'amount',
'fieldtype': u'Currency',
'label': u'Amount*',
'oldfieldname': u'amount',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 0,
'width': '100px'
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'warehouse',
'fieldtype': 'Link',
'label': 'Warehouse',
'oldfieldname': 'warehouse',
'oldfieldtype': 'Link',
'options': 'Warehouse',
'doctype': u'DocField',
'fieldname': u'warehouse',
'fieldtype': u'Link',
'label': u'Warehouse',
'oldfieldname': u'warehouse',
'oldfieldtype': u'Link',
'options': u'Warehouse',
'permlevel': 0,
'print_hide': 1,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'serial_no',
'fieldtype': 'Text',
'doctype': u'DocField',
'fieldname': u'serial_no',
'fieldtype': u'Text',
'in_filter': 1,
'label': 'Serial No',
'label': u'Serial No',
'no_copy': 1,
'oldfieldname': 'serial_no',
'oldfieldtype': 'Text',
'oldfieldname': u'serial_no',
'oldfieldtype': u'Text',
'permlevel': 0,
'print_hide': 1,
'trigger': 'Client'
'trigger': u'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'batch_no',
'fieldtype': 'Link',
'label': 'Batch No',
'oldfieldname': 'batch_no',
'oldfieldtype': 'Link',
'options': 'Batch',
'doctype': u'DocField',
'fieldname': u'batch_no',
'fieldtype': u'Link',
'label': u'Batch No',
'oldfieldname': u'batch_no',
'oldfieldtype': u'Link',
'options': u'Batch',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_group',
'fieldtype': 'Link',
'label': 'Item Group',
'oldfieldname': 'item_group',
'oldfieldtype': 'Link',
'options': 'Item Group',
'doctype': u'DocField',
'fieldname': u'item_group',
'fieldtype': u'Link',
'hidden': 1,
'label': u'Item Group',
'oldfieldname': u'item_group',
'oldfieldtype': u'Link',
'options': u'Item Group',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'brand',
'fieldtype': 'Link',
'label': 'Brand Name',
'oldfieldname': 'brand',
'oldfieldtype': 'Link',
'options': 'Brand',
'doctype': u'DocField',
'fieldname': u'brand',
'fieldtype': u'Link',
'hidden': 1,
'label': u'Brand Name',
'oldfieldname': u'brand',
'oldfieldtype': u'Link',
'options': u'Brand',
'permlevel': 1,
'print_hide': 1,
'width': '150px'
'width': u'150px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'installed_qty',
'fieldtype': 'Currency',
'label': 'Installed Qty',
'doctype': u'DocField',
'fieldname': u'actual_qty',
'fieldtype': u'Currency',
'label': u'Available Qty at Warehouse',
'no_copy': 1,
'oldfieldname': 'installed_qty',
'oldfieldtype': 'Currency',
'oldfieldname': u'actual_qty',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'width': '150px'
'width': u'150px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'actual_qty',
'fieldtype': 'Currency',
'label': 'Available Qty at Warehouse',
'no_copy': 1,
'oldfieldname': 'actual_qty',
'oldfieldtype': 'Currency',
'permlevel': 1,
'print_hide': 1,
'width': '150px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'billed_amt',
'fieldtype': 'Currency',
'label': 'Billed Amt',
'doctype': u'DocField',
'fieldname': u'billed_amt',
'fieldtype': u'Currency',
'label': u'Billed Amt',
'no_copy': 1,
'permlevel': 1,
'print_hide': 1,
'width': '100px'
'width': u'100px'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'prevdoc_docname',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'installed_qty',
'fieldtype': u'Currency',
'label': u'Installed Qty',
'no_copy': 1,
'oldfieldname': u'installed_qty',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'width': u'150px'
},
# DocField
{
'allow_on_submit': 1,
'colour': u'White:FFF',
'default': u'0',
'doctype': u'DocField',
'fieldname': u'packed_qty',
'fieldtype': u'Currency',
'label': u'Packed Quantity',
'no_copy': 1,
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'prevdoc_doctype',
'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
'label': u'Document Type',
'oldfieldname': u'prevdoc_doctype',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1,
'width': u'150px'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'prevdoc_docname',
'fieldtype': u'Data',
'hidden': 0,
'in_filter': 1,
'label': 'Against Document No',
'label': u'Against Document No',
'no_copy': 1,
'oldfieldname': 'prevdoc_docname',
'oldfieldtype': 'Data',
'oldfieldname': u'prevdoc_docname',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1,
'width': '150px'
'width': u'150px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'prevdoc_doctype',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'prevdoc_date',
'fieldtype': u'Date',
'hidden': 1,
'in_filter': 1,
'label': 'Document Type',
'oldfieldname': 'prevdoc_doctype',
'oldfieldtype': 'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1,
'width': '150px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'prevdoc_date',
'fieldtype': 'Date',
'hidden': 1,
'in_filter': 1,
'label': 'Against Document Date',
'oldfieldname': 'prevdoc_date',
'oldfieldtype': 'Date',
'label': u'Against Document Date',
'oldfieldname': u'prevdoc_date',
'oldfieldtype': u'Date',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'prevdoc_detail_docname',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'prevdoc_detail_docname',
'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
'label': 'Against Document Detail No',
'oldfieldname': 'prevdoc_detail_docname',
'oldfieldtype': 'Data',
'label': u'Against Document Detail No',
'oldfieldname': u'prevdoc_detail_docname',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 0,
'width': '150px'
'width': u'150px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_tax_rate',
'fieldtype': 'Small Text',
'doctype': u'DocField',
'fieldname': u'item_tax_rate',
'fieldtype': u'Small Text',
'hidden': 1,
'label': 'Item Tax Rate',
'oldfieldname': 'item_tax_rate',
'oldfieldtype': 'Small Text',
'label': u'Item Tax Rate',
'oldfieldname': u'item_tax_rate',
'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1
},
@ -409,26 +425,12 @@
# DocField
{
'allow_on_submit': 1,
'colour': 'White:FFF',
'default': '0',
'doctype': 'DocField',
'fieldname': 'packed_qty',
'fieldtype': 'Currency',
'label': 'Packed Quantity',
'no_copy': 1,
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'allow_on_submit': 1,
'doctype': 'DocField',
'fieldname': 'page_break',
'fieldtype': 'Check',
'label': 'Page Break',
'oldfieldname': 'page_break',
'oldfieldtype': 'Check',
'doctype': u'DocField',
'fieldname': u'page_break',
'fieldtype': u'Check',
'label': u'Page Break',
'oldfieldname': u'page_break',
'oldfieldtype': u'Check',
'permlevel': 0,
'print_hide': 1
}

View File

@ -54,6 +54,9 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
// Unhide Fields in Next Steps
// ---------------------------------
cur_frm.clear_custom_buttons();
cur_frm.cscript.dynamic_label(doc, cdt, cdn);
if(doc.docstatus == 1){
var ch = getchildren('Purchase Receipt Detail',doc.name,'purchase_receipt_details');
allow_billing = 0;

View File

@ -88,6 +88,11 @@ class DocType(TransactionBase):
def get_tc_details(self):
return get_obj('Purchase Common').get_tc_details(self)
def get_comp_base_currency(self):
return get_obj('Purchase Common').get_comp_base_currency(self.doc.company)
# get available qty at warehouse
def get_bin_details(self, arg = ''):
return get_obj(dt='Purchase Common').get_bin_details(arg)

File diff suppressed because it is too large Load Diff

View File

@ -5,67 +5,67 @@
{
'creation': '2010-08-08 17:09:16',
'docstatus': 0,
'modified': '2011-12-14 10:50:00',
'modified_by': 'Administrator',
'owner': 'Administrator'
'modified': '2012-02-27 18:43:39',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'autoname': 'GRND/.#######',
'colour': 'White:FFF',
'default_print_format': 'Standard',
'autoname': u'GRND/.#######',
'colour': u'White:FFF',
'default_print_format': u'Standard',
'doctype': 'DocType',
'istable': 1,
'module': 'Stock',
'module': u'Stock',
'name': '__common__',
'section_style': 'Tray',
'server_code_error': ' ',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 73
'version': 74
},
# These values are common for all DocField
{
'doctype': 'DocField',
'doctype': u'DocField',
'name': '__common__',
'parent': 'Purchase Receipt Detail',
'parentfield': 'fields',
'parenttype': 'DocType'
'parent': u'Purchase Receipt Detail',
'parentfield': u'fields',
'parenttype': u'DocType'
},
# DocType, Purchase Receipt Detail
{
'doctype': 'DocType',
'name': 'Purchase Receipt Detail'
'name': u'Purchase Receipt Detail'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_code',
'fieldtype': 'Link',
'doctype': u'DocField',
'fieldname': u'item_code',
'fieldtype': u'Link',
'in_filter': 1,
'label': 'Item Code',
'oldfieldname': 'item_code',
'oldfieldtype': 'Link',
'options': 'Item',
'label': u'Item Code',
'oldfieldname': u'item_code',
'oldfieldtype': u'Link',
'options': u'Item',
'permlevel': 0,
'reqd': 1,
'search_index': 1,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_name',
'fieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'item_name',
'fieldtype': u'Data',
'in_filter': 0,
'label': 'Item Name',
'oldfieldname': 'item_name',
'oldfieldtype': 'Data',
'label': u'Item Name',
'oldfieldname': u'item_name',
'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
@ -74,236 +74,267 @@
# DocField
{
'doctype': 'DocField',
'fieldname': 'description',
'fieldtype': 'Text',
'label': 'Description',
'oldfieldname': 'description',
'oldfieldtype': 'Text',
'doctype': u'DocField',
'fieldname': u'description',
'fieldtype': u'Text',
'label': u'Description',
'oldfieldname': u'description',
'oldfieldtype': u'Text',
'permlevel': 0,
'reqd': 1,
'width': '300px'
'width': u'300px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'received_qty',
'fieldtype': 'Currency',
'label': 'Recd Quantity',
'oldfieldname': 'received_qty',
'oldfieldtype': 'Currency',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'received_qty',
'fieldtype': u'Currency',
'label': u'Recd Quantity',
'oldfieldname': u'received_qty',
'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 1,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'qty',
'fieldtype': 'Currency',
'label': 'Accepted Quantity',
'oldfieldname': 'qty',
'oldfieldtype': 'Currency',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'qty',
'fieldtype': u'Currency',
'label': u'Accepted Quantity',
'oldfieldname': u'qty',
'oldfieldtype': u'Currency',
'permlevel': 0,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'rejected_qty',
'fieldtype': 'Currency',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'rejected_qty',
'fieldtype': u'Currency',
'in_filter': 0,
'label': 'Rejected Quantity',
'oldfieldname': 'rejected_qty',
'oldfieldtype': 'Currency',
'label': u'Rejected Quantity',
'oldfieldname': u'rejected_qty',
'oldfieldtype': u'Currency',
'permlevel': 0,
'search_index': 0,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'import_ref_rate',
'fieldtype': 'Currency',
'label': 'Ref Rate ',
'doctype': u'DocField',
'fieldname': u'import_ref_rate',
'fieldtype': u'Currency',
'label': u'Ref Rate ',
'permlevel': 0
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'discount_rate',
'fieldtype': 'Currency',
'label': 'Discount %',
'doctype': u'DocField',
'fieldname': u'discount_rate',
'fieldtype': u'Currency',
'label': u'Discount %',
'permlevel': 0
},
# DocField
{
'colour': 'White:FFF',
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'import_rate',
'fieldtype': 'Currency',
'label': 'Rate',
'oldfieldname': 'import_rate',
'oldfieldtype': 'Currency',
'colour': u'White:FFF',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'import_rate',
'fieldtype': u'Currency',
'label': u'Rate',
'oldfieldname': u'import_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 0,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'import_amount',
'fieldtype': 'Currency',
'label': 'Amount',
'oldfieldname': 'import_amount',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'import_amount',
'fieldtype': u'Currency',
'label': u'Amount',
'oldfieldname': u'import_amount',
'oldfieldtype': u'Currency',
'permlevel': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'purchase_ref_rate',
'fieldtype': 'Currency',
'label': 'Ref Rate *',
'doctype': u'DocField',
'fieldname': u'purchase_ref_rate',
'fieldtype': u'Currency',
'label': u'Ref Rate *',
'permlevel': 0
},
# DocField
{
'colour': 'White:FFF',
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'purchase_rate',
'fieldtype': 'Currency',
'label': 'Rate *(Default Curr.)',
'oldfieldname': 'purchase_rate',
'oldfieldtype': 'Currency',
'colour': u'White:FFF',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'purchase_rate',
'fieldtype': u'Currency',
'label': u'Rate *(Default Curr.)',
'oldfieldname': u'purchase_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'amount',
'fieldtype': 'Currency',
'label': 'Amount (Default Curr.)',
'oldfieldname': 'amount',
'oldfieldtype': 'Currency',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'amount',
'fieldtype': u'Currency',
'label': u'Amount (Default Curr.)',
'oldfieldname': u'amount',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'warehouse',
'fieldtype': 'Link',
'doctype': u'DocField',
'fieldname': u'warehouse',
'fieldtype': u'Link',
'hidden': 0,
'label': 'Accepted Warehouse',
'oldfieldname': 'warehouse',
'oldfieldtype': 'Link',
'options': 'Warehouse',
'label': u'Accepted Warehouse',
'oldfieldname': u'warehouse',
'oldfieldtype': u'Link',
'options': u'Warehouse',
'permlevel': 0,
'print_hide': 0,
'width': '100px'
'width': u'100px'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'uom',
'fieldtype': 'Link',
'label': 'UOM',
'oldfieldname': 'uom',
'oldfieldtype': 'Link',
'options': 'UOM',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'uom',
'fieldtype': u'Link',
'label': u'UOM',
'oldfieldname': u'uom',
'oldfieldtype': u'Link',
'options': u'UOM',
'permlevel': 0,
'reqd': 1,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'conversion_factor',
'fieldtype': 'Currency',
'label': 'Conversion Factor',
'oldfieldname': 'conversion_factor',
'oldfieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'conversion_factor',
'fieldtype': u'Currency',
'label': u'Conversion Factor',
'oldfieldname': u'conversion_factor',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'trigger': 'Client',
'width': '100px'
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'stock_uom',
'fieldtype': 'Data',
'label': 'Stock UOM',
'oldfieldname': 'stock_uom',
'oldfieldtype': 'Data',
'doctype': u'DocField',
'fieldname': u'stock_uom',
'fieldtype': u'Data',
'label': u'Stock UOM',
'oldfieldname': u'stock_uom',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'reqd': 1,
'width': '100px'
'width': u'100px'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'rejected_warehouse',
'fieldtype': 'Link',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'serial_no',
'fieldtype': u'Text',
'in_filter': 1,
'label': u'Serial No',
'no_copy': 1,
'oldfieldname': u'serial_no',
'oldfieldtype': u'Text',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'batch_no',
'fieldtype': u'Link',
'label': u'Batch No',
'oldfieldname': u'batch_no',
'oldfieldtype': u'Link',
'options': u'Batch',
'permlevel': 0,
'print_hide': 1,
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'rejected_warehouse',
'fieldtype': u'Link',
'hidden': 1,
'label': 'Rejected Warehouse',
'label': u'Rejected Warehouse',
'no_copy': 1,
'oldfieldname': 'rejected_warehouse',
'oldfieldtype': 'Link',
'options': 'Warehouse',
'oldfieldname': u'rejected_warehouse',
'oldfieldtype': u'Link',
'options': u'Warehouse',
'permlevel': 1,
'print_hide': 1,
'width': '100px'
'width': u'100px'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'schedule_date',
'fieldtype': 'Date',
'label': 'Schedule date',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'schedule_date',
'fieldtype': u'Date',
'label': u'Schedule date',
'no_copy': 1,
'oldfieldname': 'schedule_date',
'oldfieldtype': 'Date',
'oldfieldname': u'schedule_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
@ -312,57 +343,57 @@
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'project_name',
'fieldtype': 'Link',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'project_name',
'fieldtype': u'Link',
'in_filter': 1,
'label': 'Project Name',
'options': 'Project',
'label': u'Project Name',
'options': u'Project',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'qa_no',
'fieldtype': 'Link',
'label': 'QA No',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'qa_no',
'fieldtype': u'Link',
'label': u'QA No',
'no_copy': 1,
'oldfieldname': 'qa_no',
'oldfieldtype': 'Link',
'options': 'QA Inspection Report',
'oldfieldname': u'qa_no',
'oldfieldtype': u'Link',
'options': u'QA Inspection Report',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'brand',
'fieldtype': 'Link',
'doctype': u'DocField',
'fieldname': u'brand',
'fieldtype': u'Link',
'hidden': 1,
'label': 'Brand',
'oldfieldname': 'brand',
'oldfieldtype': 'Link',
'options': 'Brand',
'label': u'Brand',
'oldfieldname': u'brand',
'oldfieldtype': u'Link',
'options': u'Brand',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'item_group',
'fieldtype': 'Link',
'doctype': u'DocField',
'fieldname': u'item_group',
'fieldtype': u'Link',
'hidden': 1,
'in_filter': 1,
'label': 'Item Group',
'oldfieldname': 'item_group',
'oldfieldtype': 'Link',
'options': 'Item Group',
'label': u'Item Group',
'oldfieldname': u'item_group',
'oldfieldtype': u'Link',
'options': u'Item Group',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@ -370,192 +401,161 @@
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'serial_no',
'fieldtype': 'Text',
'in_filter': 1,
'label': 'Serial No',
'no_copy': 1,
'oldfieldname': 'serial_no',
'oldfieldtype': 'Text',
'doctype': u'DocField',
'fieldname': u'stock_qty',
'fieldtype': u'Currency',
'label': u'Stock Qty',
'oldfieldname': u'stock_qty',
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0
'trigger': u'Client',
'width': u'100px'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'batch_no',
'fieldtype': 'Link',
'label': 'Batch No',
'oldfieldname': 'batch_no',
'oldfieldtype': 'Link',
'options': 'Batch',
'permlevel': 0,
'print_hide': 1,
'trigger': 'Client'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'stock_qty',
'fieldtype': 'Currency',
'label': 'Stock Qty',
'oldfieldname': 'stock_qty',
'oldfieldtype': 'Currency',
'permlevel': 0,
'print_hide': 1,
'trigger': 'Client',
'width': '100px'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'prevdoc_doctype',
'fieldtype': 'Data',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'prevdoc_doctype',
'fieldtype': u'Data',
'hidden': 1,
'label': 'Prevdoc Doctype',
'oldfieldname': 'prevdoc_doctype',
'oldfieldtype': 'Data',
'label': u'Prevdoc Doctype',
'oldfieldname': u'prevdoc_doctype',
'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'prevdoc_docname',
'fieldtype': 'Link',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'prevdoc_docname',
'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
'label': 'PO No',
'label': u'PO No',
'no_copy': 0,
'oldfieldname': 'prevdoc_docname',
'oldfieldtype': 'Link',
'options': 'Purchase Order',
'oldfieldname': u'prevdoc_docname',
'oldfieldtype': u'Link',
'options': u'Purchase Order',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
'search_index': 1,
'width': '150px'
'width': u'150px'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'prevdoc_date',
'fieldtype': 'Date',
'doctype': u'DocField',
'fieldname': u'prevdoc_date',
'fieldtype': u'Date',
'hidden': 1,
'in_filter': 1,
'label': 'PO Date',
'oldfieldname': 'prevdoc_date',
'oldfieldtype': 'Date',
'label': u'PO Date',
'oldfieldname': u'prevdoc_date',
'oldfieldtype': u'Date',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'rm_supp_cost',
'fieldtype': 'Currency',
'doctype': u'DocField',
'fieldname': u'rm_supp_cost',
'fieldtype': u'Currency',
'hidden': 1,
'in_filter': 0,
'label': 'Raw Materials Supplied Cost',
'oldfieldname': 'rm_supp_cost',
'oldfieldtype': 'Currency',
'label': u'Raw Materials Supplied Cost',
'oldfieldname': u'rm_supp_cost',
'oldfieldtype': u'Currency',
'permlevel': 2,
'print_hide': 1,
'width': '150px'
'width': u'150px'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'item_tax_amount',
'fieldtype': 'Currency',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'item_tax_amount',
'fieldtype': u'Currency',
'hidden': 1,
'label': 'Item Tax Amount',
'label': u'Item Tax Amount',
'no_copy': 1,
'oldfieldname': 'item_tax_amount',
'oldfieldtype': 'Currency',
'oldfieldname': u'item_tax_amount',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 0,
'search_index': 1,
'width': '150px'
'width': u'150px'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'prevdoc_detail_docname',
'fieldtype': 'Data',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'prevdoc_detail_docname',
'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
'label': 'PO Detail No',
'label': u'PO Detail No',
'no_copy': 0,
'oldfieldname': 'prevdoc_detail_docname',
'oldfieldtype': 'Data',
'oldfieldname': u'prevdoc_detail_docname',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1,
'width': '150px'
'width': u'150px'
},
# DocField
{
'default': '0.00',
'doctype': 'DocField',
'fieldname': 'billed_qty',
'fieldtype': 'Currency',
'label': 'Billed Quantity',
'default': u'0.00',
'doctype': u'DocField',
'fieldname': u'billed_qty',
'fieldtype': u'Currency',
'label': u'Billed Quantity',
'no_copy': 1,
'oldfieldname': 'billed_qty',
'oldfieldtype': 'Currency',
'oldfieldname': u'billed_qty',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'width': '100px'
'width': u'100px'
},
# DocField
{
'colour': 'White:FFF',
'doctype': 'DocField',
'fieldname': 'valuation_rate',
'fieldtype': 'Currency',
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'valuation_rate',
'fieldtype': u'Currency',
'hidden': 1,
'in_filter': 0,
'label': 'Valuation Rate',
'label': u'Valuation Rate',
'no_copy': 1,
'oldfieldname': 'valuation_rate',
'oldfieldtype': 'Currency',
'oldfieldname': u'valuation_rate',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'width': '80px'
'width': u'80px'
},
# DocField
{
'colour': 'White:FFF',
'description': 'Tax detail table fetched from item master as a string and stored in this field.\nUsed for Purchase Other Charges',
'doctype': 'DocField',
'fieldname': 'item_tax_rate',
'fieldtype': 'Small Text',
'colour': u'White:FFF',
'description': u'Tax detail table fetched from item master as a string and stored in this field.\nUsed for Purchase Other Charges',
'doctype': u'DocField',
'fieldname': u'item_tax_rate',
'fieldtype': u'Small Text',
'hidden': 1,
'in_filter': 0,
'label': 'Item Tax Rate',
'oldfieldname': 'item_tax_rate',
'oldfieldtype': 'Small Text',
'label': u'Item Tax Rate',
'oldfieldname': u'item_tax_rate',
'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1
@ -564,12 +564,12 @@
# DocField
{
'allow_on_submit': 1,
'doctype': 'DocField',
'fieldname': 'page_break',
'fieldtype': 'Check',
'label': 'Page Break',
'oldfieldname': 'page_break',
'oldfieldtype': 'Check',
'doctype': u'DocField',
'fieldname': u'page_break',
'fieldtype': u'Check',
'label': u'Page Break',
'oldfieldname': u'page_break',
'oldfieldtype': u'Check',
'permlevel': 0,
'print_hide': 1
}

View File

@ -249,4 +249,4 @@
'permlevel': 0,
'print_hide': 1
}
]
]

View File

@ -38,10 +38,25 @@ def init():
# init request
try:
webnotes.http_request = webnotes.auth.HTTPRequest()
return True
except webnotes.AuthenticationError, e:
pass
except webnotes.UnknownDomainError, e:
print "Location: " + (webnotes.defs.redirect_404)
except webnotes.SessionStopped, e:
if 'cmd' in webnotes.form_dict:
webnotes.handler.print_json()
else:
print "Content-Type: text/html"
print
print """<html>
<body style="background-color: #EEE;">
<h3 style="width: 900px; background-color: #FFF; border: 2px solid #AAA; padding: 20px; font-family: Arial; margin: 20px auto">
Updating.
We will be back in a few moments...
</h3>
</body>
</html>"""
def respond():
import webnotes
@ -55,5 +70,5 @@ def respond():
print webnotes.cms.index.get()
if __name__=="__main__":
init()
respond()
if init():
respond()

View File

@ -697,7 +697,7 @@ var tmpid=0;_f.ButtonField=function(){};_f.ButtonField.prototype=new Field();_f.
this.wrapper=this.prev_button.wrapper;this.input_area=this.prev_button.input_area;this.disp_area=this.prev_button.disp_area;this.button_area=$a(this.prev_button.input_area,'span');}}}
_f.ButtonField.prototype.make_input=function(){var me=this;if(!this.prev_button){$y(this.input_area,{marginTop:'4px',marginBottom:'4px'});}
if(!this.button_area)
this.button_area=$a(this.input_area,'span','',{marginRight:'4px'});this.input=$btn(this.button_area,me.df.label.substr(0,20)+((me.df.label.length>20)?'..':''),null,{maxWidth:'170px',fontWeight:'bold'},null,1)
this.button_area=$a(this.input_area,'span','',{marginRight:'4px'});this.input=$btn(this.button_area,me.df.label,null,{fontWeight:'bold'},null,1)
this.input.onclick=function(){if(me.not_in_form)return;this.disabled='disabled';if(cur_frm.cscript[me.df.label]&&(!me.in_filter)){cur_frm.runclientscript(me.df.label,me.doctype,me.docname);this.disabled=false;}else{cur_frm.runscript(me.df.options,me);this.disabled=false;}}}
_f.ButtonField.prototype.hide=function(){$dh(this.button_area);};_f.ButtonField.prototype.show=function(){$ds(this.button_area);};_f.ButtonField.prototype.set=function(v){};_f.ButtonField.prototype.set_disp=function(val){}
function make_field(docfield,doctype,parent,frm,in_grid,hide_label){switch(docfield.fieldtype.toLowerCase()){case'data':var f=new DataField();break;case'password':var f=new DataField();break;case'int':var f=new IntField();break;case'float':var f=new FloatField();break;case'currency':var f=new CurrencyField();break;case'read only':var f=new ReadOnlyField();break;case'link':var f=new LinkField();break;case'date':var f=new DateField();break;case'time':var f=new TimeField();break;case'html':var f=new HTMLField();break;case'check':var f=new CheckField();break;case'text':var f=new TextField();break;case'small text':var f=new TextField();break;case'select':var f=new SelectField();break;case'button':var f=new _f.ButtonField();break;case'code':var f=new _f.CodeField();break;case'text editor':var f=new _f.CodeField();break;case'table':var f=new _f.TableField();break;case'section break':var f=new _f.SectionBreak();break;case'column break':var f=new _f.ColumnBreak();break;case'image':var f=new _f.ImageField();break;}
@ -1576,7 +1576,7 @@ var tmpid=0;_f.ButtonField=function(){};_f.ButtonField.prototype=new Field();_f.
this.wrapper=this.prev_button.wrapper;this.input_area=this.prev_button.input_area;this.disp_area=this.prev_button.disp_area;this.button_area=$a(this.prev_button.input_area,'span');}}}
_f.ButtonField.prototype.make_input=function(){var me=this;if(!this.prev_button){$y(this.input_area,{marginTop:'4px',marginBottom:'4px'});}
if(!this.button_area)
this.button_area=$a(this.input_area,'span','',{marginRight:'4px'});this.input=$btn(this.button_area,me.df.label.substr(0,20)+((me.df.label.length>20)?'..':''),null,{maxWidth:'170px',fontWeight:'bold'},null,1)
this.button_area=$a(this.input_area,'span','',{marginRight:'4px'});this.input=$btn(this.button_area,me.df.label,null,{fontWeight:'bold'},null,1)
this.input.onclick=function(){if(me.not_in_form)return;this.disabled='disabled';if(cur_frm.cscript[me.df.label]&&(!me.in_filter)){cur_frm.runclientscript(me.df.label,me.doctype,me.docname);this.disabled=false;}else{cur_frm.runscript(me.df.options,me);this.disabled=false;}}}
_f.ButtonField.prototype.hide=function(){$dh(this.button_area);};_f.ButtonField.prototype.show=function(){$ds(this.button_area);};_f.ButtonField.prototype.set=function(v){};_f.ButtonField.prototype.set_disp=function(val){}
function make_field(docfield,doctype,parent,frm,in_grid,hide_label){switch(docfield.fieldtype.toLowerCase()){case'data':var f=new DataField();break;case'password':var f=new DataField();break;case'int':var f=new IntField();break;case'float':var f=new FloatField();break;case'currency':var f=new CurrencyField();break;case'read only':var f=new ReadOnlyField();break;case'link':var f=new LinkField();break;case'date':var f=new DateField();break;case'time':var f=new TimeField();break;case'html':var f=new HTMLField();break;case'check':var f=new CheckField();break;case'text':var f=new TextField();break;case'small text':var f=new TextField();break;case'select':var f=new SelectField();break;case'button':var f=new _f.ButtonField();break;case'code':var f=new _f.CodeField();break;case'text editor':var f=new _f.CodeField();break;case'table':var f=new _f.TableField();break;case'section break':var f=new _f.SectionBreak();break;case'column break':var f=new _f.ColumnBreak();break;case'image':var f=new _f.ImageField();break;}
@ -1858,7 +1858,7 @@ _f.Grid.prototype.show=function(){if(this.can_edit&&this.field.df['default'].toL
$ds(this.wrapper);}
_f.Grid.prototype.hide=function(){$dh(this.wrapper);$dh(this.tbar_div);}
_f.Grid.prototype.insert_column=function(doctype,fieldname,fieldtype,label,width,options,perm,reqd){var idx=this.head_row.cells.length;if(!width)width='100px';if((width+'').slice(-2)!='px'){width=width+'px';}
var col=this.head_row.insertCell(idx);col.doctype=doctype;col.fieldname=fieldname;col.fieldtype=fieldtype;col.innerHTML='<div>'+label+'</div>';col.label=label;if(reqd)
var col=this.head_row.insertCell(idx);col.doctype=doctype;col.fieldname=fieldname;col.fieldtype=fieldtype;col.innerHTML='<div data-grid-fieldname = "'+doctype+'-'+fieldname+'">'+label+'</div>';col.label=label;if(reqd)
col.childNodes[0].style.color="#D22";col.style.width=width;col.options=options;col.perm=perm;this.col_idx_by_name[fieldname]=idx;}
_f.Grid.prototype.reset_table_width=function(){var w=0;for(var i=0,len=this.head_row.cells.length;i<len;i++){w+=cint(this.head_row.cells[i].style.width);}
this.head_tab.style.width=w+'px';this.tab.style.width=w+'px';}

View File

@ -606,7 +606,7 @@ var tmpid=0;_f.ButtonField=function(){};_f.ButtonField.prototype=new Field();_f.
this.wrapper=this.prev_button.wrapper;this.input_area=this.prev_button.input_area;this.disp_area=this.prev_button.disp_area;this.button_area=$a(this.prev_button.input_area,'span');}}}
_f.ButtonField.prototype.make_input=function(){var me=this;if(!this.prev_button){$y(this.input_area,{marginTop:'4px',marginBottom:'4px'});}
if(!this.button_area)
this.button_area=$a(this.input_area,'span','',{marginRight:'4px'});this.input=$btn(this.button_area,me.df.label.substr(0,20)+((me.df.label.length>20)?'..':''),null,{maxWidth:'170px',fontWeight:'bold'},null,1)
this.button_area=$a(this.input_area,'span','',{marginRight:'4px'});this.input=$btn(this.button_area,me.df.label,null,{fontWeight:'bold'},null,1)
this.input.onclick=function(){if(me.not_in_form)return;this.disabled='disabled';if(cur_frm.cscript[me.df.label]&&(!me.in_filter)){cur_frm.runclientscript(me.df.label,me.doctype,me.docname);this.disabled=false;}else{cur_frm.runscript(me.df.options,me);this.disabled=false;}}}
_f.ButtonField.prototype.hide=function(){$dh(this.button_area);};_f.ButtonField.prototype.show=function(){$ds(this.button_area);};_f.ButtonField.prototype.set=function(v){};_f.ButtonField.prototype.set_disp=function(val){}
function make_field(docfield,doctype,parent,frm,in_grid,hide_label){switch(docfield.fieldtype.toLowerCase()){case'data':var f=new DataField();break;case'password':var f=new DataField();break;case'int':var f=new IntField();break;case'float':var f=new FloatField();break;case'currency':var f=new CurrencyField();break;case'read only':var f=new ReadOnlyField();break;case'link':var f=new LinkField();break;case'date':var f=new DateField();break;case'time':var f=new TimeField();break;case'html':var f=new HTMLField();break;case'check':var f=new CheckField();break;case'text':var f=new TextField();break;case'small text':var f=new TextField();break;case'select':var f=new SelectField();break;case'button':var f=new _f.ButtonField();break;case'code':var f=new _f.CodeField();break;case'text editor':var f=new _f.CodeField();break;case'table':var f=new _f.TableField();break;case'section break':var f=new _f.SectionBreak();break;case'column break':var f=new _f.ColumnBreak();break;case'image':var f=new _f.ImageField();break;}
@ -1086,4 +1086,4 @@ item.route=item.url||item.custom_page;$parent_li.find('.dropdown-menu').append(r
<a href="https://erpnext.com">erpnext.com</a></div>\
</div>',wn.boot.website_settings));this.make_items();},make_items:function(){var items=wn.boot.website_menus
for(var i=0;i<items.length;i++){var item=items[i];if(!item.parent_label&&item.parentfield=='footer_items'){item.route=item.url||item.custom_page;$('.web-footer-menu ul').append(repl('<li><a href="#!%(route)s" \
data-label="%(label)s">%(label)s</a></li>',item))}}}});$(document).bind('startup',function(){erpnext.footer=new erpnext.Footer();erpnext.navbar.navbar=new erpnext.navbar.navbar();})
data-label="%(label)s">%(label)s</a></li>',item))}}}});$(document).bind('startup',function(){erpnext.footer=new erpnext.Footer();erpnext.navbar.navbar=new erpnext.navbar.navbar();})

View File

@ -1 +1,5 @@
748
<<<<<<< HEAD
748
=======
747
>>>>>>> da27db4c7d46e37d65c57d14c384b873ce4b94b3