purchase tax mapping while pulling
This commit is contained in:
parent
da50c0859c
commit
1971942db8
@ -169,10 +169,10 @@ cur_frm.cscript['Recalculate'] = function(doc, dt, dn) {
|
||||
// -----------------
|
||||
cur_frm.cscript['Get Items'] = function(doc, dt, dn) {
|
||||
var callback = function(r,rt) {
|
||||
unhide_field(['supplier_address','contact_person','supplier_name','address_display','contact_display','contact_mobile','contact_email']);
|
||||
refresh_many(['credit_to','supplier','supplier_address','contact_person','supplier_name','address_display','contact_display','contact_mobile','contact_email','entries','purchase_receipt_main','purchase_order_main']);
|
||||
unhide_field(['supplier_address', 'contact_person', 'supplier_name', 'address_display', 'contact_display', 'contact_mobile','contact_email']);
|
||||
refresh_many(['credit_to','supplier','supplier_address','contact_person','supplier_name', 'address_display', 'contact_display','contact_mobile', 'contact_email','entries', 'purchase_receipt_main', 'purchase_order_main', 'purchase_tax_details']);
|
||||
}
|
||||
get_server_fields('pull_details','','',doc, dt, dn,1,callback);
|
||||
$c_obj(make_doclist(dt,dn),'pull_details','',callback);
|
||||
}
|
||||
|
||||
|
||||
|
@ -78,19 +78,13 @@ class DocType(TransactionBase):
|
||||
def pull_details(self):
|
||||
if self.doc.purchase_receipt_main:
|
||||
self.validate_duplicate_docname('purchase_receipt')
|
||||
self.doclist = get_obj('DocType Mapper', 'Purchase Receipt-Payable Voucher').dt_map('Purchase Receipt', 'Payable Voucher', self.doc.purchase_receipt_main, self.doc, self.doclist, "[['Purchase Receipt', 'Payable Voucher'],['Purchase Receipt Detail', 'PV Detail']]")
|
||||
self.doclist = get_obj('DocType Mapper', 'Purchase Receipt-Payable Voucher').dt_map('Purchase Receipt', 'Payable Voucher', self.doc.purchase_receipt_main, self.doc, self.doclist, "[['Purchase Receipt', 'Payable Voucher'], ['Purchase Receipt Detail', 'PV Detail'], ['Purchase Tax Detail','Purchase Tax Detail']]")
|
||||
|
||||
elif self.doc.purchase_order_main:
|
||||
self.validate_duplicate_docname('purchase_order')
|
||||
self.doclist = get_obj('DocType Mapper', 'Purchase Order-Payable Voucher').dt_map('Purchase Order', 'Payable Voucher', self.doc.purchase_order_main, self.doc, self.doclist, "[['Purchase Order', 'Payable Voucher'],['PO Detail', 'PV Detail']]")
|
||||
self.doclist = get_obj('DocType Mapper', 'Purchase Order-Payable Voucher').dt_map('Purchase Order', 'Payable Voucher', self.doc.purchase_order_main, self.doc, self.doclist, "[['Purchase Order', 'Payable Voucher'],['PO Detail', 'PV Detail'], ['Purchase Tax Detail','Purchase Tax Detail']]")
|
||||
|
||||
ret = self.get_credit_to()
|
||||
#self.doc.supplier_name = ret['supplier_name']
|
||||
#self.doc.supplier_address = ret['supplier_address']
|
||||
|
||||
#self.doc.cst_no =ret['cst_no']
|
||||
#self.doc.bst_no = ret['bst_no']
|
||||
#self.doc.vat_tin_no = ret['vat_tin_no']
|
||||
|
||||
if ret.has_key('credit_to'):
|
||||
self.doc.credit_to = ret['credit_to']
|
||||
|
@ -82,10 +82,10 @@ cur_frm.fields_dict.contact_person.on_new = function(dn) {
|
||||
// -----------------
|
||||
cur_frm.cscript['Pull Purchase Order Details'] = function(doc, dt, dn) {
|
||||
var callback = function(r,rt) {
|
||||
unhide_field(['supplier_address','contact_person','supplier_name','address_display','contact_display','contact_mobile','contact_email']);
|
||||
refresh_many(['supplier','supplier_address','contact_person','supplier_name','address_display','contact_display','contact_mobile','contact_email','purchase_receipt_details']);
|
||||
unhide_field(['supplier_address','contact_person','supplier_name','address_display', 'contact_display', 'contact_mobile','contact_email']);
|
||||
refresh_many(['supplier','supplier_address','contact_person', 'supplier_name', 'address_display', 'contact_display','contact_mobile', 'contact_email', 'purchase_receipt_details', 'purchase_tax_details']);
|
||||
}
|
||||
get_server_fields('get_po_details','','',doc, dt, dn,1,callback);
|
||||
$c_obj(make_doclist(dt,dn),'get_po_details','',callback);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user