Skip to content

Commit

Permalink
Merge pull request #41774 from frappe/version-14-hotfix
Browse files Browse the repository at this point in the history
chore: release v14
  • Loading branch information
ruthra-kumar authored Jun 5, 2024
2 parents 13dfbe3 + 5ab5bd1 commit faa3c7c
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 12 deletions.
11 changes: 8 additions & 3 deletions erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def set_expense_account(self, for_validate=False):
stock_not_billed_account = self.get_company_default("stock_received_but_not_billed")
stock_items = self.get_stock_items()

asset_received_but_not_billed = self.get_company_default("asset_received_but_not_billed")
self.asset_received_but_not_billed = None

if self.update_stock:
self.validate_item_code()
Expand Down Expand Up @@ -370,18 +370,23 @@ def set_expense_account(self, for_validate=False):
elif item.is_fixed_asset:
account = None
if item.pr_detail:
if not self.asset_received_but_not_billed:
self.asset_received_but_not_billed = self.get_company_default(
"asset_received_but_not_billed"
)

# check if 'Asset Received But Not Billed' account is credited in Purchase receipt or not
arbnb_booked_in_pr = frappe.db.get_value(
"GL Entry",
{
"voucher_type": "Purchase Receipt",
"voucher_no": item.purchase_receipt,
"account": asset_received_but_not_billed,
"account": self.asset_received_but_not_billed,
},
"name",
)
if arbnb_booked_in_pr:
account = asset_received_but_not_billed
account = self.asset_received_but_not_billed

if not account:
account_type = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2024-05-23 17:00:42.984798",
"modified": "2024-06-03 17:30:37.012593",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Repost Accounting Ledger",
"owner": "Administrator",
"permissions": [
{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
Expand All @@ -68,7 +70,9 @@
"read": 1,
"report": 1,
"role": "System Manager",
"select": 1,
"share": 1,
"submit": 1,
"write": 1
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,15 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2024-05-23 17:00:31.540640",
"modified": "2024-06-03 17:31:04.472279",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Repost Payment Ledger",
"owner": "Administrator",
"permissions": [
{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
Expand All @@ -113,7 +115,9 @@
"read": 1,
"report": 1,
"role": "System Manager",
"select": 1,
"share": 1,
"submit": 1,
"write": 1
},
{
Expand Down
1 change: 0 additions & 1 deletion erpnext/accounts/report/account_balance/account_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def get_conditions(filters):

if filters.account_type:
conditions["account_type"] = filters.account_type
return conditions

if filters.company:
conditions["company"] = filters.company
Expand Down
14 changes: 12 additions & 2 deletions erpnext/selling/doctype/sales_order/sales_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,11 +932,19 @@ def set_missing_values(source, target):
target.discount_amount = 0.0
target.inter_company_order_reference = ""
target.shipping_rule = ""
target.tc_name = ""
target.terms = ""
target.payment_terms_template = ""
target.payment_schedule = []

default_price_list = frappe.get_value("Supplier", supplier, "default_price_list")
if default_price_list:
target.buying_price_list = default_price_list

default_payment_terms = frappe.get_value("Supplier", supplier, "payment_terms")
if default_payment_terms:
target.payment_terms_template = default_payment_terms

if any(item.delivered_by_supplier == 1 for item in source.items):
if source.shipping_address_name:
target.shipping_address = source.shipping_address_name
Expand Down Expand Up @@ -988,7 +996,6 @@ def update_item(source, target, source_parent):
"contact_person",
"taxes_and_charges",
"shipping_address",
"terms",
],
"validation": {"docstatus": ["=", 1]},
},
Expand Down Expand Up @@ -1056,6 +1063,10 @@ def set_missing_values(source, target):
target.discount_amount = 0.0
target.inter_company_order_reference = ""
target.shipping_rule = ""
target.tc_name = ""
target.terms = ""
target.payment_terms_template = ""
target.payment_schedule = []

if is_drop_ship_order(target):
target.customer = source.customer
Expand Down Expand Up @@ -1091,7 +1102,6 @@ def update_item_for_packed_item(source, target, source_parent):
"contact_person",
"taxes_and_charges",
"shipping_address",
"terms",
],
"validation": {"docstatus": ["=", 1]},
},
Expand Down
9 changes: 5 additions & 4 deletions erpnext/setup/doctype/company/company.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ frappe.ui.form.on("Company", {
}
});
}

frm.call("check_if_transactions_exist").then((r) => {
frm.toggle_enable("default_currency", !r.message);
});
if (!frm.doc.__islocal) {
frm.call("check_if_transactions_exist").then((r) => {
frm.toggle_enable("default_currency", !r.message);
});
}
},
setup: function (frm) {
frm.__rename_queue = "long";
Expand Down

0 comments on commit faa3c7c

Please sign in to comment.