Merge branch 'hotfix'

This commit is contained in:
Nabin Hait 2016-11-01 15:05:53 +05:30
commit 4dd76f21c9
7 changed files with 12 additions and 7 deletions

View File

@ -2,7 +2,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import frappe import frappe
__version__ = '7.1.3' __version__ = '7.1.4'
def get_default_company(user=None): def get_default_company(user=None):
'''Get default company for user''' '''Get default company for user'''

View File

@ -763,7 +763,8 @@ def get_party_account_and_balance(company, party_type, party):
return { return {
"account": account, "account": account,
"balance": account_balance, "balance": account_balance,
"party_balance": party_balance "party_balance": party_balance,
"account_currency": frappe.db.get_value("Account", account, "account_currency")
} }
@frappe.whitelist() @frappe.whitelist()

View File

@ -392,7 +392,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
if(index < 30){ if(index < 30){
$(frappe.render_template("pos_item", { $(frappe.render_template("pos_item", {
item_code: obj.name, item_code: obj.name,
item_price: format_currency(obj.price_list_rate, obj.currency), item_price: format_currency(obj.price_list_rate, me.frm.doc.currency),
item_name: obj.name===obj.item_name ? "" : obj.item_name, item_name: obj.name===obj.item_name ? "" : obj.item_name,
item_image: obj.image ? "url('" + obj.image + "')" : null, item_image: obj.image ? "url('" + obj.image + "')" : null,
color: frappe.get_palette(obj.item_name), color: frappe.get_palette(obj.item_name),

View File

@ -18,7 +18,7 @@
--- ---
<h3> <h3>
<a class="no-decoration" href="https://conf.erpnext.com/2014/videos">Conference Vidoes</a> <a class="no-decoration" href="https://conf.erpnext.com/2014/videos">Conference Videos</a>
</h3> </h3>
<div class="row"> <div class="row">

View File

@ -342,4 +342,4 @@ erpnext.patches.v7_0.repost_bin_qty_and_item_projected_qty
erpnext.patches.v7_1.set_prefered_contact_email erpnext.patches.v7_1.set_prefered_contact_email
execute:frappe.db.sql("update `tabSingles` set value = 1 where field = 'unlink_payment_on_cancellation_of_invoice' and doctype = 'Accounts Settings'") execute:frappe.db.sql("update `tabSingles` set value = 1 where field = 'unlink_payment_on_cancellation_of_invoice' and doctype = 'Accounts Settings'")
execute:frappe.db.sql("update `tabStock Entry` set total_amount = null where purpose in('Repack', 'Manufacture')") execute:frappe.db.sql("update `tabStock Entry` set total_amount = null where purpose in('Repack', 'Manufacture')")
erpnext.patches.v7_1.repost_gle_for_pi_with_update_stock erpnext.patches.v7_0.repost_gle_for_pi_with_update_stock #2016-11-01

View File

@ -11,6 +11,10 @@ def execute():
for pi in frappe.db.sql("""select name from `tabPurchase Invoice` for pi in frappe.db.sql("""select name from `tabPurchase Invoice`
where update_stock=1 and docstatus=1 order by posting_date asc""", as_dict=1): where update_stock=1 and docstatus=1 order by posting_date asc""", as_dict=1):
frappe.db.sql("""delete from `tabGL Entry`
where voucher_type = 'Purchase Invoice' and voucher_no = %s""", pi.name)
pi_doc = frappe.get_doc("Purchase Invoice", pi.name) pi_doc = frappe.get_doc("Purchase Invoice", pi.name)
pi_doc.make_gl_entries() pi_doc.make_gl_entries(repost_future_gle=False)
frappe.db.commit() frappe.db.commit()

View File

@ -567,7 +567,7 @@ class Item(WebsiteGenerator):
existing_allow_negative_stock = frappe.db.get_value("Stock Settings", None, "allow_negative_stock") existing_allow_negative_stock = frappe.db.get_value("Stock Settings", None, "allow_negative_stock")
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1) frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1)
for warehouse in frappe.db.sql("select name from `tabWarehouse` where is_group = 0"): for warehouse in frappe.db.sql("select warehouse from `tabBin` where item_code=%s", new_name):
repost_stock(new_name, warehouse[0]) repost_stock(new_name, warehouse[0])
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", existing_allow_negative_stock) frappe.db.set_value("Stock Settings", None, "allow_negative_stock", existing_allow_negative_stock)