[fix] [minor] get query

This commit is contained in:
Nabin Hait
2013-07-15 17:52:10 +05:30
parent 40cb8fb193
commit da46a3782f
4 changed files with 14 additions and 4 deletions

View File

@@ -25,6 +25,7 @@ wn.require("app/js/transaction.js");
erpnext.buying.BuyingController = erpnext.TransactionController.extend({
onload: function() {
this.setup_queries();
this._super();
},
setup_queries: function() {
@@ -39,6 +40,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
this.frm.set_query("price_list_currency", function() {
return{
query: "controllers.queries.get_price_list_currency",
filters: {
'price_list_name': me.frm.doc.price_list_name,
'buying_or_selling': "Buying"

View File

@@ -221,4 +221,4 @@ class DocType(BuyingController):
if d.prevdoc_doctype and d.prevdoc_docname:
dt = sql("select transaction_date from `tab%s` where name = %s"
% (d.prevdoc_doctype, '%s'), (d.prevdoc_docname))
d.prevdoc_date = dt and dt[0][0].strftime('%Y-%m-%d') or ''
d.prevdoc_date = dt and dt[0][0].strftime('%Y-%m-%d') or ''