Merge branch 'develop' into fix-ignore-pricing-rule
This commit is contained in:
commit
4f4395545e
@ -178,8 +178,8 @@ class PurchaseInvoice(BuyingController):
|
|||||||
|
|
||||||
if self.supplier and account.account_type != "Payable":
|
if self.supplier and account.account_type != "Payable":
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Please ensure {} account is a Payable account. Change the account type to Payable or select a different account.")
|
_("Please ensure {} account {} is a Payable account. Change the account type to Payable or select a different account.")
|
||||||
.format(frappe.bold("Credit To")), title=_("Invalid Account")
|
.format(frappe.bold("Credit To"), frappe.bold(self.credit_to)), title=_("Invalid Account")
|
||||||
)
|
)
|
||||||
|
|
||||||
self.party_account_currency = account.account_currency
|
self.party_account_currency = account.account_currency
|
||||||
|
|||||||
@ -572,7 +572,10 @@ class SalesInvoice(SellingController):
|
|||||||
frappe.throw(msg, title=_("Invalid Account"))
|
frappe.throw(msg, title=_("Invalid Account"))
|
||||||
|
|
||||||
if self.customer and account.account_type != "Receivable":
|
if self.customer and account.account_type != "Receivable":
|
||||||
msg = _("Please ensure {} account is a Receivable account.").format(frappe.bold("Debit To")) + " "
|
msg = _("Please ensure {} account {} is a Receivable account.").format(
|
||||||
|
frappe.bold("Debit To"),
|
||||||
|
frappe.bold(self.debit_to)
|
||||||
|
) + " "
|
||||||
msg += _("Change the account type to Receivable or select a different account.")
|
msg += _("Change the account type to Receivable or select a different account.")
|
||||||
frappe.throw(msg, title=_("Invalid Account"))
|
frappe.throw(msg, title=_("Invalid Account"))
|
||||||
|
|
||||||
|
|||||||
@ -1326,6 +1326,9 @@ class AccountsController(TransactionBase):
|
|||||||
payment_schedule['discount_type'] = schedule.discount_type
|
payment_schedule['discount_type'] = schedule.discount_type
|
||||||
payment_schedule['discount'] = schedule.discount
|
payment_schedule['discount'] = schedule.discount
|
||||||
|
|
||||||
|
if not schedule.invoice_portion:
|
||||||
|
payment_schedule['payment_amount'] = schedule.payment_amount
|
||||||
|
|
||||||
self.append("payment_schedule", payment_schedule)
|
self.append("payment_schedule", payment_schedule)
|
||||||
|
|
||||||
def set_due_date(self):
|
def set_due_date(self):
|
||||||
|
|||||||
@ -703,7 +703,8 @@ class TestWorkOrder(ERPNextTestCase):
|
|||||||
wo = make_wo_order_test_record(item=item_name, qty=1, source_warehouse=source_warehouse,
|
wo = make_wo_order_test_record(item=item_name, qty=1, source_warehouse=source_warehouse,
|
||||||
company=company)
|
company=company)
|
||||||
|
|
||||||
self.assertRaises(frappe.ValidationError, make_stock_entry, wo.name, 'Material Transfer for Manufacture')
|
stock_entry = frappe.get_doc(make_stock_entry(wo.name, 'Material Transfer for Manufacture'))
|
||||||
|
self.assertRaises(frappe.ValidationError, stock_entry.save)
|
||||||
|
|
||||||
def test_wo_completion_with_pl_bom(self):
|
def test_wo_completion_with_pl_bom(self):
|
||||||
from erpnext.manufacturing.doctype.bom.test_bom import (
|
from erpnext.manufacturing.doctype.bom.test_bom import (
|
||||||
|
|||||||
@ -2289,7 +2289,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
() => this.frm.doc.ignore_pricing_rule=1,
|
() => this.frm.doc.ignore_pricing_rule=1,
|
||||||
() => me.ignore_pricing_rule(),
|
() => me.ignore_pricing_rule(),
|
||||||
() => this.frm.doc.ignore_pricing_rule=0,
|
() => this.frm.doc.ignore_pricing_rule=0,
|
||||||
() => me.apply_pricing_rule()
|
() => me.apply_pricing_rule(),
|
||||||
|
() => this.frm.save()
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
frappe.run_serially([
|
frappe.run_serially([
|
||||||
|
|||||||
@ -1115,7 +1115,7 @@ class StockEntry(StockController):
|
|||||||
self.set_actual_qty()
|
self.set_actual_qty()
|
||||||
self.update_items_for_process_loss()
|
self.update_items_for_process_loss()
|
||||||
self.validate_customer_provided_item()
|
self.validate_customer_provided_item()
|
||||||
self.calculate_rate_and_amount()
|
self.calculate_rate_and_amount(raise_error_if_no_rate=False)
|
||||||
|
|
||||||
def set_scrap_items(self):
|
def set_scrap_items(self):
|
||||||
if self.purpose != "Send to Subcontractor" and self.purpose in ["Manufacture", "Repack"]:
|
if self.purpose != "Send to Subcontractor" and self.purpose in ["Manufacture", "Repack"]:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user