patch: update % delievered and % billed in SO if pos made against that so
This commit is contained in:
parent
ef71940d58
commit
d9eb526b27
@ -0,0 +1,15 @@
|
|||||||
|
def execute():
|
||||||
|
import webnotes
|
||||||
|
from webnotes.model.code import get_obj
|
||||||
|
|
||||||
|
sc_obj = get_obj("Sales Common")
|
||||||
|
|
||||||
|
si = webnotes.conn.sql("""select si.name
|
||||||
|
from `tabSales Invoice` si, `tabSales Invoice Item` si_item
|
||||||
|
where si_item.parent = si.name
|
||||||
|
and si.docstatus = 1
|
||||||
|
and ifnull(si.is_pos, 0) = 1
|
||||||
|
and ifnull(si_item.sales_order, '') != ''
|
||||||
|
""")
|
||||||
|
for d in si:
|
||||||
|
sc_obj.update_prevdoc_detail(1, get_obj("Sales Invoice", d[0], with_children=1))
|
||||||
@ -691,4 +691,8 @@ patch_list = [
|
|||||||
'patch_module': 'patches.november_2012',
|
'patch_module': 'patches.november_2012',
|
||||||
'patch_file': 'communication_sender_and_recipient',
|
'patch_file': 'communication_sender_and_recipient',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'patch_module': 'patches.november_2012',
|
||||||
|
'patch_file': 'update_delivered_billed_percentage_for_pos',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
Loading…
x
Reference in New Issue
Block a user