mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-04 22:18:27 +00:00
Fix: merge conflict
This commit is contained in:
@@ -605,13 +605,14 @@ class AccountsController(TransactionBase):
|
||||
advance.account_currency)
|
||||
|
||||
if advance.account_currency == self.currency:
|
||||
order_total = self.grand_total
|
||||
formatted_order_total = fmt_money(order_total, precision=self.precision("grand_total"),
|
||||
currency=advance.account_currency)
|
||||
order_total = self.get("rounded_total") or self.grand_total
|
||||
precision = "rounded_total" if self.get("rounded_total") else "grand_total"
|
||||
else:
|
||||
order_total = self.base_grand_total
|
||||
formatted_order_total = fmt_money(order_total, precision=self.precision("base_grand_total"),
|
||||
currency=advance.account_currency)
|
||||
order_total = self.get("base_rounded_total") or self.base_grand_total
|
||||
precision = "base_rounded_total" if self.get("base_rounded_total") else "base_grand_total"
|
||||
|
||||
formatted_order_total = fmt_money(order_total, precision=self.precision(precision),
|
||||
currency=advance.account_currency)
|
||||
|
||||
if self.currency == self.company_currency and advance_paid > order_total:
|
||||
frappe.throw(_("Total advance ({0}) against Order {1} cannot be greater than the Grand Total ({2})")
|
||||
|
||||
@@ -678,7 +678,9 @@ class BuyingController(StockController):
|
||||
frappe.db.sql("delete from `tabSerial No` where purchase_document_no=%s", self.name)
|
||||
|
||||
def validate_schedule_date(self):
|
||||
if not self.schedule_date and self.get("items"):
|
||||
if not self.get("items"):
|
||||
return
|
||||
if not self.schedule_date:
|
||||
self.schedule_date = min([d.schedule_date for d in self.get("items")])
|
||||
|
||||
if self.schedule_date:
|
||||
|
||||
Reference in New Issue
Block a user