post_render in pv and AP report error solved
This commit is contained in:
parent
00be94860b
commit
270e4e201a
@ -20,12 +20,15 @@ cur_frm.cscript.onload = function(doc,dt,dn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(doc.__islocal){
|
if(doc.__islocal){
|
||||||
if(doc.supplier) {cur_frm.cscript.supplier(doc,dt,dn)}
|
hide_field(['supplier_address', 'contact_person', 'supplier_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email']);
|
||||||
hide_field(['supplier_address','contact_person','supplier_name','address_display','contact_display','contact_mobile','contact_email']);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(doc.supplier) unhide_field(['supplier_address','contact_person','supplier_name','address_display','contact_display','contact_mobile','contact_email']);
|
|
||||||
|
//Onload post render
|
||||||
|
//------------------------
|
||||||
|
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
|
||||||
|
if(doc.__islocal && doc.supplier) cur_frm.cscript.supplier(doc,dt,dn);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Refresh
|
// Refresh
|
||||||
|
|||||||
@ -90,9 +90,13 @@ for r in res:
|
|||||||
# supplier type
|
# supplier type
|
||||||
r.append(supp_type_dict.get(r[col_idx['Account']], ''))
|
r.append(supp_type_dict.get(r[col_idx['Account']], ''))
|
||||||
|
|
||||||
|
if r[col_idx['Voucher Type']] == 'Payable Voucher':
|
||||||
|
r += pv_dict.get(r[col_idx['Voucher No']], ['', '', ''])
|
||||||
|
else:
|
||||||
|
r += ['', '', '']
|
||||||
|
|
||||||
# if entry against Payable Voucher
|
# if entry against Payable Voucher
|
||||||
if r[col_idx['Against Voucher']] and r[col_idx['Voucher Type']] == 'Payable Voucher':
|
if r[col_idx['Against Voucher']] and r[col_idx['Voucher Type']] == 'Payable Voucher':
|
||||||
r += pv_dict.get(r[col_idx['Voucher No']], ['', '', ''])
|
|
||||||
cond = " and ifnull(against_voucher, '') = '%s'" % r[col_idx['Against Voucher']]
|
cond = " and ifnull(against_voucher, '') = '%s'" % r[col_idx['Against Voucher']]
|
||||||
|
|
||||||
# if entry against JV & and not adjusted within period
|
# if entry against JV & and not adjusted within period
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user