Merge branch 'master' of github.com:webnotes/erpnext into handlerupdate
diff --git a/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt b/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt
index 185af99..7a4544f 100644
--- a/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt
+++ b/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt
@@ -161,17 +161,6 @@
'match_id': 1,
'to_field': 'entries',
'to_table': 'RV Detail',
- 'validation_logic': 'amount > ifnull(billed_amt, 0) and 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': '(ifnull(amount, 0) = 0 or amount > ifnull(billed_amt, 0)) and docstatus = 1'
},
diff --git a/erpnext/patches/jan_mar_2012/mapper_fix.py b/erpnext/patches/jan_mar_2012/mapper_fix.py
new file mode 100644
index 0000000..c651c5e
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/mapper_fix.py
@@ -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'")
diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py
index 247f5d8..5e6a504 100644
--- a/erpnext/patches/patch_list.py
+++ b/erpnext/patches/patch_list.py
@@ -212,5 +212,10 @@
'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'
+ },
]