Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
aa7a386db9
@ -242,4 +242,5 @@ patch_list = [
|
|||||||
"execute:webnotes.delete_doc('Search Criteria', 'time_log_summary')",
|
"execute:webnotes.delete_doc('Search Criteria', 'time_log_summary')",
|
||||||
"patches.april_2013.p04_update_role_in_pages",
|
"patches.april_2013.p04_update_role_in_pages",
|
||||||
"patches.april_2013.p05_fixes_in_reverse_modules",
|
"patches.april_2013.p05_fixes_in_reverse_modules",
|
||||||
|
"execute:webnotes.reload_doc('stock', 'DocType Mapper', 'Delivery Note-Packing Slip')"
|
||||||
]
|
]
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2012-02-02 11:50:33",
|
"creation": "2012-02-02 11:50:33",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-04-05 16:08:22",
|
"modified": "2013-04-16 12:26:28",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -60,6 +60,13 @@
|
|||||||
"match_id": 1,
|
"match_id": 1,
|
||||||
"to_field": "dn_detail"
|
"to_field": "dn_detail"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"doctype": "Field Mapper Detail",
|
||||||
|
"from_field": "eval: flt(obj.qty) - flt(obj.packed_qty)",
|
||||||
|
"map": "Yes",
|
||||||
|
"match_id": 1,
|
||||||
|
"to_field": "qty"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"doctype": "Table Mapper Detail",
|
"doctype": "Table Mapper Detail",
|
||||||
"from_table": "Delivery Note",
|
"from_table": "Delivery Note",
|
||||||
|
@ -185,17 +185,6 @@ class DocType:
|
|||||||
|
|
||||||
|
|
||||||
def set_item_details(self, row):
|
def set_item_details(self, row):
|
||||||
res = webnotes.conn.sql("""SELECT item_name, SUM(IFNULL(qty, 0)) as total_qty,
|
|
||||||
IFNULL(packed_qty, 0) as packed_qty, stock_uom
|
|
||||||
FROM `tabDelivery Note Item`
|
|
||||||
WHERE parent=%s AND item_code=%s GROUP BY item_code""",
|
|
||||||
(self.doc.delivery_note, row.item_code), as_dict=1)
|
|
||||||
|
|
||||||
if res and len(res)>0:
|
|
||||||
qty = res[0]['total_qty'] - res[0]['packed_qty']
|
|
||||||
if not row.qty:
|
|
||||||
row.qty = qty >= 0 and qty or 0
|
|
||||||
|
|
||||||
res = webnotes.conn.sql("""SELECT net_weight, weight_uom FROM `tabItem`
|
res = webnotes.conn.sql("""SELECT net_weight, weight_uom FROM `tabItem`
|
||||||
WHERE name=%s""", row.item_code, as_dict=1)
|
WHERE name=%s""", row.item_code, as_dict=1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user