Merge branch 'develop'
This commit is contained in:
commit
a9cafcb8ae
@ -1 +1 @@
|
||||
__version__ = '4.15.4'
|
||||
__version__ = '4.16.0'
|
||||
|
@ -28,7 +28,7 @@ def get_fiscal_years(date=None, fiscal_year=None, label="Date", verbose=1):
|
||||
from `tabFiscal Year` where %s order by year_start_date desc""" % cond)
|
||||
|
||||
if not fy:
|
||||
error_msg = _("""{0} {1} not in any Fiscal Year""").format(label, formatdate(date))
|
||||
error_msg = _("""{0} {1} not in any Fiscal Year. For more details check {2}.""").format(label, formatdate(date), "https://erpnext.com/kb/accounts/fiscal-year-error")
|
||||
if verbose: frappe.msgprint(error_msg)
|
||||
raise FiscalYearError, error_msg
|
||||
|
||||
|
@ -211,7 +211,8 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
var tax_count = this.frm.tax_doclist.length;
|
||||
this.frm.doc.grand_total = flt(tax_count ?
|
||||
this.frm.tax_doclist[tax_count - 1].total : this.frm.doc.net_total);
|
||||
this.frm.doc.grand_total_import = flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate);
|
||||
this.frm.doc.grand_total_import = flt(tax_count ?
|
||||
flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate) : this.frm.doc.net_total_import);
|
||||
|
||||
this.frm.doc.total_tax = flt(this.frm.doc.grand_total - this.frm.doc.net_total,
|
||||
precision("total_tax"));
|
||||
|
@ -471,7 +471,7 @@ class AccountsController(TransactionBase):
|
||||
max_allowed_amt = flt(ref_amt * (100 + tolerance) / 100)
|
||||
|
||||
if total_billed_amt - max_allowed_amt > 0.01:
|
||||
frappe.throw(_("Cannot overbill for Item {0} in row {0} more than {1}. To allow overbilling, please set in Stock Settings").format(item.item_code, item.idx, max_allowed_amt))
|
||||
frappe.throw(_("Cannot overbill for Item {0} in row {1} more than {2}. To allow overbilling, please set in Stock Settings").format(item.item_code, item.idx, max_allowed_amt))
|
||||
|
||||
def get_company_default(self, fieldname):
|
||||
from erpnext.accounts.utils import get_company_default
|
||||
|
@ -111,7 +111,8 @@ class BuyingController(StockController):
|
||||
|
||||
def calculate_totals(self):
|
||||
self.grand_total = flt(self.tax_doclist[-1].total if self.tax_doclist else self.net_total)
|
||||
self.grand_total_import = flt(self.grand_total / self.conversion_rate)
|
||||
self.grand_total_import = flt(self.grand_total / self.conversion_rate) \
|
||||
if self.tax_doclist else self.net_total_import
|
||||
|
||||
self.total_tax = flt(self.grand_total - self.net_total, self.precision("total_tax"))
|
||||
|
||||
|
@ -218,7 +218,8 @@ class SellingController(StockController):
|
||||
def calculate_totals(self):
|
||||
self.grand_total = flt(self.tax_doclist[-1].total if self.tax_doclist else self.net_total)
|
||||
|
||||
self.grand_total_export = flt(self.grand_total / self.conversion_rate)
|
||||
self.grand_total_export = flt(self.grand_total / self.conversion_rate) \
|
||||
if self.tax_doclist else self.net_total_export
|
||||
|
||||
self.other_charges_total = flt(self.grand_total - self.net_total, self.precision("other_charges_total"))
|
||||
|
||||
|
@ -167,7 +167,7 @@ class StockController(AccountsController):
|
||||
else:
|
||||
is_expense_account = frappe.db.get_value("Account",
|
||||
item.get("expense_account"), "report_type")=="Profit and Loss"
|
||||
if self.doctype not in ("Purchase Receipt", "Stock Reconciliation") and not is_expense_account:
|
||||
if self.doctype not in ("Purchase Receipt", "Stock Reconciliation", "Stock Entry") and not is_expense_account:
|
||||
frappe.throw(_("Expense / Difference account ({0}) must be a 'Profit or Loss' account")
|
||||
.format(item.get("expense_account")))
|
||||
if is_expense_account and not item.get("cost_center"):
|
||||
|
@ -4,7 +4,7 @@ app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors"
|
||||
app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations"
|
||||
app_icon = "icon-th"
|
||||
app_color = "#e74c3c"
|
||||
app_version = "4.15.4"
|
||||
app_version = "4.16.0"
|
||||
|
||||
error_report_email = "support@erpnext.com"
|
||||
|
||||
|
@ -342,7 +342,8 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
var tax_count = this.frm.tax_doclist.length;
|
||||
|
||||
this.frm.doc.grand_total = flt(tax_count ? this.frm.tax_doclist[tax_count - 1].total : this.frm.doc.net_total);
|
||||
this.frm.doc.grand_total_export = flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate);
|
||||
this.frm.doc.grand_total_export = flt(tax_count ?
|
||||
flt(this.frm.doc.grand_total / this.frm.doc.conversion_rate) : this.frm.doc.net_total_export);
|
||||
|
||||
this.frm.doc.other_charges_total = flt(this.frm.doc.grand_total - this.frm.doc.net_total,
|
||||
precision("other_charges_total"));
|
||||
|
@ -229,7 +229,7 @@ class Item(WebsiteGenerator):
|
||||
if not frappe.db.exists("Item", newdn):
|
||||
frappe.throw(_("Item {0} does not exist").format(newdn))
|
||||
|
||||
field_list = ["stock_uom", "is_stock_item", "has_serial_no", "has_batch_no"]
|
||||
field_list = ["stock_uom", "is_stock_item", "has_serial_no", "has_batch_no", "is_manufactured_item"]
|
||||
new_properties = [cstr(d) for d in frappe.db.get_value("Item", newdn, field_list)]
|
||||
if new_properties != [cstr(self.get(fld)) for fld in field_list]:
|
||||
frappe.throw(_("To merge, following properties must be same for both items")
|
||||
|
Loading…
x
Reference in New Issue
Block a user