Merge branch 'develop' of https://github.com/frappe/erpnext into print-templates-fix

This commit is contained in:
Neil Trini Lasrado 2014-08-29 16:42:44 +05:30
commit bd03c8b28a
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ def get_incoming_rate(args):
from erpnext.stock.stock_ledger import get_previous_sle
in_rate = 0
if args.get("serial_no"):
if (args.get("serial_no") or "").strip():
in_rate = get_avg_purchase_rate(args.get("serial_no"))
else:
valuation_method = get_valuation_method(args.get("item_code"))

View File

@ -134,7 +134,7 @@ class MaintenanceSchedule(TransactionBase):
def validate_dates_with_periodicity(self):
for d in self.get("item_maintenance_detail"):
if d.start_date and d.end_date and d.periodicity:
if d.start_date and d.end_date and d.periodicity and d.periodicity!="Random":
date_diff = (getdate(d.end_date) - getdate(d.start_date)).days + 1
days_in_period = {
"Weekly": 7,