Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Anand Doshi
2012-12-27 15:36:30 +05:30
10 changed files with 14 additions and 253 deletions

View File

@@ -264,13 +264,6 @@ cur_frm.cscript.write_off_amount = function(doc) {
}
//---- get customer details ----------------------------
cur_frm.cscript.project_name = function(doc,cdt,cdn){
$c_obj(make_doclist(doc.doctype, doc.name),'pull_project_customer','', function(r,rt){
refresh_many(['customer', 'customer_name','customer_address', 'territory']);
});
}
//Set debit and credit to zero on adding new row
//----------------------------------------------
cur_frm.fields_dict['entries'].grid.onrowadd = function(doc, cdt, cdn){

View File

@@ -320,13 +320,6 @@ class DocType(TransactionBase):
def get_advances(self):
self.doclist = get_obj('GL Control').get_advances(self, self.doc.debit_to, 'Sales Invoice Advance', 'advance_adjustment_details', 'credit')
def pull_project_customer(self):
res = webnotes.conn.sql("select customer from `tabProject` where name = '%s'" %
self.doc.project_name)
if res and res[0][0]:
get_obj('DocType Mapper', 'Project-Sales Invoice').dt_map('Project', 'Sales Invoice', self.doc.project_name, self.doc, self.doclist, "[['Project', 'Sales Invoice']]")
def get_company_abbr(self):
return webnotes.conn.sql("select abbr from tabCompany where name=%s", self.doc.company)[0][0]