Merge branch 'master' into perpetual

This commit is contained in:
Nabin Hait
2013-08-02 11:53:00 +05:30
24 changed files with 149 additions and 55 deletions

View File

@@ -121,10 +121,14 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
}
},
refresh: function(doc) {
refresh: function() {
this._super();
this.frm.toggle_display("customer_name",
(this.customer_name && this.frm.doc.customer_name!==this.frm.doc.customer));
this._super();
if(this.frm.fields_dict.packing_details) {
var packing_list_exists = this.frm.get_doclist({parentfield: "packing_details"}).length;
this.frm.toggle_display("packing_list", packing_list_exists ? true : false);
}
},
customer: function() {

View File

@@ -153,7 +153,7 @@ def _get_price_list_rate(args, item_bean, meta):
from utilities.transaction_base import validate_currency
validate_currency(args, item_bean.doc, meta)
return {"ref_rate": flt(base_ref_rate[0].ref_rate * args.plc_conversion_rate / args.conversion_rate)}
return {"ref_rate": flt(base_ref_rate[0].ref_rate) * flt(args.plc_conversion_rate) / flt(args.conversion_rate)}
def _get_item_discount(item_group, customer):
parent_item_groups = [x[0] for x in webnotes.conn.sql("""SELECT parent.name