Merge branch 'hotfix'
This commit is contained in:
commit
b36dc5e906
@ -4,7 +4,7 @@ import inspect
|
|||||||
import frappe
|
import frappe
|
||||||
from erpnext.hooks import regional_overrides
|
from erpnext.hooks import regional_overrides
|
||||||
|
|
||||||
__version__ = '9.2.18'
|
__version__ = '9.2.19'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
"label": "Depreciation Method",
|
"label": "Depreciation Method",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "\nStraight Line\nDouble Declining Balance",
|
"options": "\nStraight Line\nDouble Declining Balance\nManual",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@ -228,7 +228,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-02-17 16:09:52.955332",
|
"modified": "2017-11-30 16:09:52.955332",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Asset Category",
|
"name": "Asset Category",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
|
if frappe.db.exists("DocType", "Patient"):
|
||||||
if 'company' in frappe.db.get_table_columns("Patient"):
|
if 'company' in frappe.db.get_table_columns("Patient"):
|
||||||
frappe.db.sql("alter table `tabPatient` drop column company")
|
frappe.db.sql("alter table `tabPatient` drop column company")
|
||||||
|
@ -230,6 +230,13 @@ class update_entries_after(object):
|
|||||||
# else it remains the same as that of previous entry
|
# else it remains the same as that of previous entry
|
||||||
self.valuation_rate = new_stock_value / new_stock_qty
|
self.valuation_rate = new_stock_value / new_stock_qty
|
||||||
|
|
||||||
|
if not self.valuation_rate and sle.voucher_detail_no:
|
||||||
|
allow_zero_rate = self.check_if_allow_zero_valuation_rate(sle.voucher_type, sle.voucher_detail_no)
|
||||||
|
if not allow_zero_rate:
|
||||||
|
self.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse,
|
||||||
|
sle.voucher_type, sle.voucher_no, self.allow_zero_rate,
|
||||||
|
currency=erpnext.get_company_currency(sle.company))
|
||||||
|
|
||||||
def get_moving_average_values(self, sle):
|
def get_moving_average_values(self, sle):
|
||||||
actual_qty = flt(sle.actual_qty)
|
actual_qty = flt(sle.actual_qty)
|
||||||
new_stock_qty = flt(self.qty_after_transaction) + actual_qty
|
new_stock_qty = flt(self.qty_after_transaction) + actual_qty
|
||||||
|
@ -141,6 +141,8 @@ def get_incoming_rate(args):
|
|||||||
return 0.0
|
return 0.0
|
||||||
previous_stock_queue = json.loads(previous_sle.get('stock_queue', '[]') or '[]')
|
previous_stock_queue = json.loads(previous_sle.get('stock_queue', '[]') or '[]')
|
||||||
in_rate = get_fifo_rate(previous_stock_queue, args.get("qty") or 0) if previous_stock_queue else 0
|
in_rate = get_fifo_rate(previous_stock_queue, args.get("qty") or 0) if previous_stock_queue else 0
|
||||||
|
if not in_rate and not previous_stock_queue:
|
||||||
|
in_rate = previous_sle.get('valuation_rate') or 0
|
||||||
elif valuation_method == 'Moving Average':
|
elif valuation_method == 'Moving Average':
|
||||||
in_rate = previous_sle.get('valuation_rate') or 0
|
in_rate = previous_sle.get('valuation_rate') or 0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user