Merge branch 'handlerupdate' of github.com:webnotes/erpnext into handlerupdate

This commit is contained in:
Anand Doshi
2012-03-29 15:22:15 +05:30
12 changed files with 64 additions and 29 deletions

View File

@@ -134,6 +134,16 @@
'to_field': 'serial_no' 'to_field': 'serial_no'
}, },
# Field Mapper Detail
{
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'export_rate',
'map': u'Yes',
'match_id': 1,
'to_field': u'export_rate'
},
# Table Mapper Detail # Table Mapper Detail
{ {
'doctype': 'Table Mapper Detail', 'doctype': 'Table Mapper Detail',
@@ -143,17 +153,6 @@
'validation_logic': 'docstatus=1' 'validation_logic': 'docstatus=1'
}, },
# Table Mapper Detail
{
'doctype': 'Table Mapper Detail',
'from_field': 'delivery_note_details',
'from_table': 'Delivery Note Detail',
'match_id': 1,
'to_field': 'entries',
'to_table': 'RV Detail',
'validation_logic': 'amount > ifnull(billed_amt, 0) and docstatus = 1'
},
# Table Mapper Detail # Table Mapper Detail
{ {
'doctype': 'Table Mapper Detail', 'doctype': 'Table Mapper Detail',
@@ -186,4 +185,4 @@
'to_table': 'Sales Team', 'to_table': 'Sales Team',
'validation_logic': 'name is not null' 'validation_logic': 'name is not null'
} }
] ]

View File

@@ -136,6 +136,16 @@
'to_field': 'incentives' 'to_field': 'incentives'
}, },
# Field Mapper Detail
{
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'export_rate',
'map': u'Yes',
'match_id': 1,
'to_field': u'export_rate'
},
# Table Mapper Detail # Table Mapper Detail
{ {
'doctype': 'Table Mapper Detail', 'doctype': 'Table Mapper Detail',
@@ -188,4 +198,4 @@
'to_table': 'Sales Team', 'to_table': 'Sales Team',
'validation_logic': 'name is not null' 'validation_logic': 'name is not null'
} }
] ]

View File

@@ -935,7 +935,7 @@
'oldfieldname': u'in_words_export', 'oldfieldname': u'in_words_export',
'oldfieldtype': u'Data', 'oldfieldtype': u'Data',
'permlevel': 1, 'permlevel': 1,
'print_hide': 1 'print_hide': 0
}, },
# DocField # DocField
@@ -1518,4 +1518,4 @@
'permlevel': 0, 'permlevel': 0,
'print_hide': 1 'print_hide': 1
} }
] ]

View File

@@ -0,0 +1,3 @@
def execute():
import webnotes
webnotes.conn.sql("delete from `tabTable Mapper Detail` where to_table = 'RV Detail' and parent = 'Delivery Note-Receivable Voucher' and validation_logic = 'amount > ifnull(billed_amt, 0) and docstatus = 1'")

View File

@@ -0,0 +1,9 @@
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
reload_doc('stock', 'DocType Mapper', 'Sales Order-Delivery Note')
reload_doc('accounts', 'DocType Mapper', 'Sales Order-Receivable Voucher')
reload_doc('accounts', 'DocType Mapper', 'Delivery Note-Receivable Voucher')
webnotes.conn.sql("delete from `tabField Mapper Detail` where parent = 'Sales Order-Delivery Note' and from_field = 'basic_rate' and to_field = 'basic_rate'")

View File

@@ -207,5 +207,15 @@ patch_list = [
'patch_file': 'update_se_fld_options', 'patch_file': 'update_se_fld_options',
'description': 'Purpose SE: Others to Other' 'description': 'Purpose SE: Others to Other'
}, },
{
'patch_module': 'patches.jan_mar_2012',
'patch_file': 'reload_mapper',
'description': 'SO-DN, SO-Rv, DN-RV'
},
{
'patch_module': 'patches.jan_mar_2012',
'patch_file': 'mapper_fix',
'description': 'DN-RV duplicate table entry'
},
] ]

View File

@@ -875,7 +875,7 @@
'oldfieldname': u'in_words_export', 'oldfieldname': u'in_words_export',
'oldfieldtype': u'Data', 'oldfieldtype': u'Data',
'permlevel': 1, 'permlevel': 1,
'print_hide': 1, 'print_hide': 0,
'width': u'200px' 'width': u'200px'
}, },
@@ -1199,4 +1199,4 @@
'permlevel': 0, 'permlevel': 0,
'print_hide': 1 'print_hide': 1
} }
] ]

View File

@@ -963,7 +963,7 @@
'oldfieldname': u'in_words_export', 'oldfieldname': u'in_words_export',
'oldfieldtype': u'Data', 'oldfieldtype': u'Data',
'permlevel': 1, 'permlevel': 1,
'print_hide': 1, 'print_hide': 0,
'width': u'200px' 'width': u'200px'
}, },
@@ -1333,4 +1333,4 @@
'permlevel': 0, 'permlevel': 0,
'print_hide': 1 'print_hide': 1
} }
] ]

View File

@@ -36,6 +36,10 @@ cur_frm.pformat.rounded_total_export = function(doc) {
return ''; return '';
} }
cur_frm.pformat.in_words_export = function(doc) {
return '';
}
cur_frm.pformat.other_charges= function(doc){ cur_frm.pformat.other_charges= function(doc){
//function to make row of table //function to make row of table
var make_row = function(title,val,bold){ var make_row = function(title,val,bold){
@@ -89,7 +93,7 @@ cur_frm.pformat.other_charges= function(doc){
out += make_row('Rounded Total',fmt_money(doc.rounded_total_export),1); out += make_row('Rounded Total',fmt_money(doc.rounded_total_export),1);
} }
if(doc.in_words_export){ if(doc.in_words_export && !print_hide_dict['in_words_export']){
out +='</table></td></tr>'; out +='</table></td></tr>';
out += '<tr><td colspan = "2">'; out += '<tr><td colspan = "2">';
out += '<table><tr><td style="width:25%;"><b>In Words</b></td>' out += '<table><tr><td style="width:25%;"><b>In Words</b></td>'

View File

@@ -131,10 +131,10 @@
{ {
'checking_operator': u'=', 'checking_operator': u'=',
'doctype': u'Field Mapper Detail', 'doctype': u'Field Mapper Detail',
'from_field': u'basic_rate', 'from_field': u'export_rate',
'map': u'Yes', 'map': u'Yes',
'match_id': 1, 'match_id': 1,
'to_field': u'basic_rate' 'to_field': u'export_rate'
}, },
# Field Mapper Detail # Field Mapper Detail
@@ -264,4 +264,4 @@
'to_table': u'Delivery Note', 'to_table': u'Delivery Note',
'validation_logic': u'docstatus = 1' 'validation_logic': u'docstatus = 1'
} }
] ]

View File

@@ -337,12 +337,12 @@ class DocType:
and t1.docstatus != 2 and t1.docstatus != 2
""", self.doc.item_code) """, self.doc.item_code)
if ((flt(ret[0]['re_order_level']) > flt(current_qty)) and ret[0]['re_order_level']): if ((flt(ret[0]['re_order_level']) > flt(current_qty[0][0])) and ret[0]['re_order_level']):
self.create_auto_indent(ret[0], doc_type, doc_name) self.create_auto_indent(ret[0], doc_type, doc_name, current_qty[0][0])
def create_auto_indent(self, i , doc_type, doc_name): def create_auto_indent(self, i , doc_type, doc_name, cur_qty):
""" Create indent on reaching reorder level """ """ Create indent on reaching reorder level """
indent = Document('Indent') indent = Document('Indent')
@@ -361,7 +361,7 @@ class DocType:
indent_details_child.item_name = i['item_name'] indent_details_child.item_name = i['item_name']
indent_details_child.description = i['description'] indent_details_child.description = i['description']
indent_details_child.item_group = i['item_group'] indent_details_child.item_group = i['item_group']
indent_details_child.qty = i['re_order_qty'] indent_details_child.qty = i['re_order_qty'] or (flt(i['re_order_level']) - flt(cur_qty))
indent_details_child.brand = i['brand'] indent_details_child.brand = i['brand']
indent_details_child.save() indent_details_child.save()
indent_obj = get_obj('Indent',indent.name,with_children=1) indent_obj = get_obj('Indent',indent.name,with_children=1)

View File

@@ -869,7 +869,7 @@
'oldfieldname': u'in_words_export', 'oldfieldname': u'in_words_export',
'oldfieldtype': u'Data', 'oldfieldtype': u'Data',
'permlevel': 1, 'permlevel': 1,
'print_hide': 1, 'print_hide': 0,
'width': u'150px' 'width': u'150px'
}, },
@@ -1346,4 +1346,4 @@
'permlevel': 0, 'permlevel': 0,
'print_hide': 1 'print_hide': 1
} }
] ]