[fix] merge conflicts

This commit is contained in:
Saurabh 2017-12-01 16:23:46 +05:30
commit d505d83cb6
5 changed files with 16 additions and 6 deletions

View File

@ -4,7 +4,7 @@ import inspect
import frappe
from erpnext.hooks import regional_overrides
__version__ = '9.2.18'
__version__ = '9.2.19'
def get_default_company(user=None):
'''Get default company for user'''

View File

@ -62,7 +62,7 @@
"label": "Depreciation Method",
"length": 0,
"no_copy": 0,
"options": "\nStraight Line\nDouble Declining Balance",
"options": "\nStraight Line\nDouble Declining Balance\nManual",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@ -312,4 +312,4 @@
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}
}

View File

@ -1,5 +1,6 @@
import frappe
def execute():
if 'company' in frappe.db.get_table_columns("Patient"):
frappe.db.sql("alter table `tabPatient` drop column company")
if frappe.db.exists("DocType", "Patient"):
if 'company' in frappe.db.get_table_columns("Patient"):
frappe.db.sql("alter table `tabPatient` drop column company")

View File

@ -230,6 +230,13 @@ class update_entries_after(object):
# else it remains the same as that of previous entry
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):
actual_qty = flt(sle.actual_qty)
new_stock_qty = flt(self.qty_after_transaction) + actual_qty

View File

@ -126,7 +126,7 @@ def update_bin(args, allow_negative_stock=False, via_landed_cost_voucher=False):
def get_incoming_rate(args):
"""Get Incoming Rate based on valuation method"""
from erpnext.stock.stock_ledger import get_previous_sle
if isinstance(args, basestring):
args = json.loads(args)
@ -141,6 +141,8 @@ def get_incoming_rate(args):
return 0.0
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
if not in_rate and not previous_stock_queue:
in_rate = previous_sle.get('valuation_rate') or 0
elif valuation_method == 'Moving Average':
in_rate = previous_sle.get('valuation_rate') or 0