diff --git a/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt b/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt index ee94be8e4d..40cdad38f2 100644 --- a/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt +++ b/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:34', 'docstatus': 0, - 'modified': '2011-09-13 13:23:44', + 'modified': '2011-09-13 17:35:54', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -47,7 +47,7 @@ # Field Mapper Detail { 'doctype': 'Field Mapper Detail', - 'from_field': 'eval: (flt(obj.amount) - flt(obj.billed_amt)) / flt(obj.basic_rate)', + 'from_field': 'eval: obj.basic_rate and (flt(obj.amount) - flt(obj.billed_amt)) / flt(obj.basic_rate) or obj.qty', 'map': 'Yes', 'match_id': 1, 'to_field': 'qty' @@ -125,6 +125,15 @@ 'to_field': 'incentives' }, + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'serial_no', + 'map': 'Yes', + 'match_id': 1, + 'to_field': 'serial_no' + }, + # Table Mapper Detail { 'doctype': 'Table Mapper Detail', @@ -142,7 +151,7 @@ 'match_id': 1, 'to_field': 'entries', 'to_table': 'RV Detail', - 'validation_logic': 'amount > ifnull(billed_amt, 0) and docstatus = 1' + 'validation_logic': '(ifnull(amount, 0) = 0 or amount > ifnull(billed_amt, 0)) and docstatus = 1' }, # Table Mapper Detail diff --git a/accounts/DocType Mapper/Purchase Order-Payable Voucher/Purchase Order-Payable Voucher.txt b/accounts/DocType Mapper/Purchase Order-Payable Voucher/Purchase Order-Payable Voucher.txt index 17b63634c5..61ee9b6d64 100644 --- a/accounts/DocType Mapper/Purchase Order-Payable Voucher/Purchase Order-Payable Voucher.txt +++ b/accounts/DocType Mapper/Purchase Order-Payable Voucher/Purchase Order-Payable Voucher.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:35', 'docstatus': 0, - 'modified': '2011-09-07 12:10:30', + 'modified': '2011-09-13 17:37:09', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -124,7 +124,7 @@ 'match_id': 1, 'to_field': 'entries', 'to_table': 'PV Detail', - 'validation_logic': 'ifnull(billed_qty,0) < qty' + 'validation_logic': 'ifnull(billed_qty,0) < qty and docstatus = 1' }, # Table Mapper Detail diff --git a/accounts/DocType Mapper/Purchase Receipt-Payable Voucher/Purchase Receipt-Payable Voucher.txt b/accounts/DocType Mapper/Purchase Receipt-Payable Voucher/Purchase Receipt-Payable Voucher.txt index d755954fc2..b2baa57c62 100644 --- a/accounts/DocType Mapper/Purchase Receipt-Payable Voucher/Purchase Receipt-Payable Voucher.txt +++ b/accounts/DocType Mapper/Purchase Receipt-Payable Voucher/Purchase Receipt-Payable Voucher.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:35', 'docstatus': 0, - 'modified': '2011-09-07 12:09:55', + 'modified': '2011-09-13 17:27:32', 'modified_by': 'Administrator', 'owner': 'Administrator' }, diff --git a/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt b/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt index 97b1cb2380..ebbdbcd0b5 100644 --- a/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt +++ b/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt @@ -5,7 +5,7 @@ { 'creation': '2010-08-08 17:09:36', 'docstatus': 0, - 'modified': '2011-09-13 13:23:04', + 'modified': '2011-09-13 17:36:31', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -57,7 +57,7 @@ # Field Mapper Detail { 'doctype': 'Field Mapper Detail', - 'from_field': 'eval: (flt(obj.amount) - flt(obj.billed_amt))/flt(obj.basic_rate)', + 'from_field': 'eval: obj.basic_rate and (flt(obj.amount) - flt(obj.billed_amt))/flt(obj.basic_rate) or obj.qty', 'map': 'Yes', 'match_id': 1, 'to_field': 'qty' @@ -153,7 +153,7 @@ 'match_id': 1, 'to_field': 'entries', 'to_table': 'RV Detail', - 'validation_logic': 'docstatus = 1' + 'validation_logic': '(ifnull(amount, 0) = 0 or amount > ifnull(billed_amt, 0)) and docstatus = 1' }, # Table Mapper Detail diff --git a/patches/patch.py b/patches/patch.py index cee21311e3..fa3afca7cb 100644 --- a/patches/patch.py +++ b/patches/patch.py @@ -1,7 +1,7 @@ # REMEMBER to update this # ======================== -last_patch = 363 +last_patch = 364 #------------------------------------------- @@ -328,3 +328,12 @@ def execute(patch_no): for d in mappers: if d[0] and d[1]: reload_doc(d[1].lower(), 'DocType Mapper', d[0]) + elif patch_no == 364: + sql("""delete from `tabField Mapper Detail` + where to_field in ('qty', 'amount', 'export_amount') + and parent in ('Sales Order-Receivable Voucher', 'Delivery Note-Receivable Voucher') + """) + mappers = sql("select name, module from `tabDocType Mapper`") + for d in mappers: + if d[0] and d[1]: + reload_doc(d[1].lower(), 'DocType Mapper', d[0]) diff --git a/selling/DocType Mapper/Delivery Note-Installation Note/Delivery Note-Installation Note.txt b/selling/DocType Mapper/Delivery Note-Installation Note/Delivery Note-Installation Note.txt index 67abbdc3b0..e45c48767d 100644 --- a/selling/DocType Mapper/Delivery Note-Installation Note/Delivery Note-Installation Note.txt +++ b/selling/DocType Mapper/Delivery Note-Installation Note/Delivery Note-Installation Note.txt @@ -5,8 +5,8 @@ { 'creation': '2010-08-08 17:09:34', 'docstatus': 0, - 'modified': '2011-05-17 11:42:57', - 'modified_by': 'umair@iwebnotes.com', + 'modified': '2011-09-13 17:28:37', + 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -31,7 +31,7 @@ # These values are common for all DocType Mapper { - 'doctype': 'DocType Mapper', + 'doctype': u'DocType Mapper', 'from_doctype': 'Delivery Note', 'module': 'Selling', 'name': '__common__', @@ -41,7 +41,7 @@ # DocType Mapper, Delivery Note-Installation Note { - 'doctype': 'DocType Mapper', + 'doctype': u'DocType Mapper', 'name': 'Delivery Note-Installation Note' }, @@ -111,6 +111,14 @@ 'to_field': 'prevdoc_date' }, + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'serial_no', + 'match_id': 1, + 'to_field': 'serial_no' + }, + # Table Mapper Detail { 'doctype': 'Table Mapper Detail', diff --git a/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt b/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt index 54e272a54f..f561c157d9 100644 --- a/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt +++ b/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt @@ -5,8 +5,8 @@ { 'creation': '2010-08-08 17:09:35', 'docstatus': 0, - 'modified': '2011-05-13 12:42:57', - 'modified_by': 'umair@iwebnotes.com', + 'modified': '2011-09-13 17:26:55', + 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -31,7 +31,7 @@ # These values are common for all DocType Mapper { - 'doctype': 'DocType Mapper', + 'doctype': u'DocType Mapper', 'from_doctype': 'Purchase Order', 'module': 'Stock', 'name': '__common__', @@ -41,7 +41,7 @@ # DocType Mapper, Purchase Order-Purchase Receipt { - 'doctype': 'DocType Mapper', + 'doctype': u'DocType Mapper', 'name': 'Purchase Order-Purchase Receipt' }, diff --git a/stock/DocType Mapper/Receivable Voucher-Delivery Note/Receivable Voucher-Delivery Note.txt b/stock/DocType Mapper/Receivable Voucher-Delivery Note/Receivable Voucher-Delivery Note.txt index 3fd88db1f4..74437311e0 100755 --- a/stock/DocType Mapper/Receivable Voucher-Delivery Note/Receivable Voucher-Delivery Note.txt +++ b/stock/DocType Mapper/Receivable Voucher-Delivery Note/Receivable Voucher-Delivery Note.txt @@ -5,7 +5,7 @@ { 'creation': '2010-12-15 08:39:22', 'docstatus': 0, - 'modified': '2011-09-07 12:08:19', + 'modified': '2011-09-13 17:26:01', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -107,6 +107,15 @@ 'to_field': 'naming_series' }, + # Field Mapper Detail + { + 'doctype': 'Field Mapper Detail', + 'from_field': 'serial_no', + 'map': 'Yes', + 'match_id': 1, + 'to_field': 'serial_no' + }, + # Table Mapper Detail { 'doctype': 'Table Mapper Detail',