mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-30 18:34:48 +00:00
[minor] removed get_rate
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
wn.provide("erpnext.buying");
|
||||
wn.require("app/js/transaction.js");
|
||||
wn.require("app/js/controllers/accounts.js");
|
||||
|
||||
erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
onload: function() {
|
||||
|
||||
@@ -36,13 +36,6 @@ class DocType(BuyingController):
|
||||
msgprint("Supplier : %s does not exists" % (name))
|
||||
raise Exception
|
||||
|
||||
# Get Available Qty at Warehouse
|
||||
def get_bin_details( self, arg = ''):
|
||||
arg = eval(arg)
|
||||
bin = webnotes.conn.sql("select projected_qty from `tabBin` where item_code = %s and warehouse = %s", (arg['item_code'], arg['warehouse']), as_dict=1)
|
||||
ret = { 'projected_qty' : bin and flt(bin[0]['projected_qty']) or 0 }
|
||||
return ret
|
||||
|
||||
def update_last_purchase_rate(self, obj, is_submit):
|
||||
"""updates last_purchase_rate in item table for each item"""
|
||||
|
||||
@@ -197,14 +190,6 @@ class DocType(BuyingController):
|
||||
msgprint(cstr(doctype) + ": " + cstr(submitted[0][0])
|
||||
+ _(" not submitted"), raise_exception=1)
|
||||
|
||||
def get_rate(self, arg, obj):
|
||||
arg = eval(arg)
|
||||
rate = webnotes.conn.sql("select account_type, tax_rate from `tabAccount` where name = %s"
|
||||
, (arg['account_head']), as_dict=1)
|
||||
|
||||
return {'rate': rate and (rate[0]['account_type'] == 'Tax' \
|
||||
and not arg['charge_type'] == 'Actual') and flt(rate[0]['tax_rate']) or 0 }
|
||||
|
||||
def get_prevdoc_date(self, obj):
|
||||
for d in getlist(obj.doclist, obj.fname):
|
||||
if d.prevdoc_doctype and d.prevdoc_docname:
|
||||
|
||||
@@ -65,10 +65,6 @@ class DocType(BuyingController):
|
||||
}
|
||||
})
|
||||
|
||||
# get available qty at warehouse
|
||||
def get_bin_details(self, arg = ''):
|
||||
return get_obj(dt='Purchase Common').get_bin_details(arg)
|
||||
|
||||
def get_schedule_dates(self):
|
||||
for d in getlist(self.doclist, 'po_details'):
|
||||
if d.prevdoc_detail_docname and not d.schedule_date:
|
||||
@@ -185,9 +181,6 @@ class DocType(BuyingController):
|
||||
def on_update(self):
|
||||
pass
|
||||
|
||||
def get_rate(self,arg):
|
||||
return get_obj('Purchase Common').get_rate(arg,self)
|
||||
|
||||
@webnotes.whitelist()
|
||||
def make_purchase_receipt(source_name, target_doclist=None):
|
||||
from webnotes.model.mapper import get_mapped_doclist
|
||||
|
||||
Reference in New Issue
Block a user