mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 20:29:09 +00:00
Merge pull request #41774 from frappe/version-14-hotfix
chore: release v14
This commit is contained in:
@@ -284,7 +284,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
stock_not_billed_account = self.get_company_default("stock_received_but_not_billed")
|
stock_not_billed_account = self.get_company_default("stock_received_but_not_billed")
|
||||||
stock_items = self.get_stock_items()
|
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:
|
if self.update_stock:
|
||||||
self.validate_item_code()
|
self.validate_item_code()
|
||||||
@@ -370,18 +370,23 @@ class PurchaseInvoice(BuyingController):
|
|||||||
elif item.is_fixed_asset:
|
elif item.is_fixed_asset:
|
||||||
account = None
|
account = None
|
||||||
if item.pr_detail:
|
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
|
# check if 'Asset Received But Not Billed' account is credited in Purchase receipt or not
|
||||||
arbnb_booked_in_pr = frappe.db.get_value(
|
arbnb_booked_in_pr = frappe.db.get_value(
|
||||||
"GL Entry",
|
"GL Entry",
|
||||||
{
|
{
|
||||||
"voucher_type": "Purchase Receipt",
|
"voucher_type": "Purchase Receipt",
|
||||||
"voucher_no": item.purchase_receipt,
|
"voucher_no": item.purchase_receipt,
|
||||||
"account": asset_received_but_not_billed,
|
"account": self.asset_received_but_not_billed,
|
||||||
},
|
},
|
||||||
"name",
|
"name",
|
||||||
)
|
)
|
||||||
if arbnb_booked_in_pr:
|
if arbnb_booked_in_pr:
|
||||||
account = asset_received_but_not_billed
|
account = self.asset_received_but_not_billed
|
||||||
|
|
||||||
if not account:
|
if not account:
|
||||||
account_type = (
|
account_type = (
|
||||||
|
|||||||
@@ -53,13 +53,15 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-05-23 17:00:42.984798",
|
"modified": "2024-06-03 17:30:37.012593",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Repost Accounting Ledger",
|
"name": "Repost Accounting Ledger",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
|
"amend": 1,
|
||||||
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
@@ -68,7 +70,9 @@
|
|||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "System Manager",
|
"role": "System Manager",
|
||||||
|
"select": 1,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
|
"submit": 1,
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -98,13 +98,15 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-05-23 17:00:31.540640",
|
"modified": "2024-06-03 17:31:04.472279",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Repost Payment Ledger",
|
"name": "Repost Payment Ledger",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
|
"amend": 1,
|
||||||
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
@@ -113,7 +115,9 @@
|
|||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "System Manager",
|
"role": "System Manager",
|
||||||
|
"select": 1,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
|
"submit": 1,
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ def get_conditions(filters):
|
|||||||
|
|
||||||
if filters.account_type:
|
if filters.account_type:
|
||||||
conditions["account_type"] = filters.account_type
|
conditions["account_type"] = filters.account_type
|
||||||
return conditions
|
|
||||||
|
|
||||||
if filters.company:
|
if filters.company:
|
||||||
conditions["company"] = filters.company
|
conditions["company"] = filters.company
|
||||||
|
|||||||
@@ -932,11 +932,19 @@ def make_purchase_order_for_default_supplier(source_name, selected_items=None, t
|
|||||||
target.discount_amount = 0.0
|
target.discount_amount = 0.0
|
||||||
target.inter_company_order_reference = ""
|
target.inter_company_order_reference = ""
|
||||||
target.shipping_rule = ""
|
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")
|
default_price_list = frappe.get_value("Supplier", supplier, "default_price_list")
|
||||||
if default_price_list:
|
if default_price_list:
|
||||||
target.buying_price_list = 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 any(item.delivered_by_supplier == 1 for item in source.items):
|
||||||
if source.shipping_address_name:
|
if source.shipping_address_name:
|
||||||
target.shipping_address = source.shipping_address_name
|
target.shipping_address = source.shipping_address_name
|
||||||
@@ -988,7 +996,6 @@ def make_purchase_order_for_default_supplier(source_name, selected_items=None, t
|
|||||||
"contact_person",
|
"contact_person",
|
||||||
"taxes_and_charges",
|
"taxes_and_charges",
|
||||||
"shipping_address",
|
"shipping_address",
|
||||||
"terms",
|
|
||||||
],
|
],
|
||||||
"validation": {"docstatus": ["=", 1]},
|
"validation": {"docstatus": ["=", 1]},
|
||||||
},
|
},
|
||||||
@@ -1056,6 +1063,10 @@ def make_purchase_order(source_name, selected_items=None, target_doc=None):
|
|||||||
target.discount_amount = 0.0
|
target.discount_amount = 0.0
|
||||||
target.inter_company_order_reference = ""
|
target.inter_company_order_reference = ""
|
||||||
target.shipping_rule = ""
|
target.shipping_rule = ""
|
||||||
|
target.tc_name = ""
|
||||||
|
target.terms = ""
|
||||||
|
target.payment_terms_template = ""
|
||||||
|
target.payment_schedule = []
|
||||||
|
|
||||||
if is_drop_ship_order(target):
|
if is_drop_ship_order(target):
|
||||||
target.customer = source.customer
|
target.customer = source.customer
|
||||||
@@ -1091,7 +1102,6 @@ def make_purchase_order(source_name, selected_items=None, target_doc=None):
|
|||||||
"contact_person",
|
"contact_person",
|
||||||
"taxes_and_charges",
|
"taxes_and_charges",
|
||||||
"shipping_address",
|
"shipping_address",
|
||||||
"terms",
|
|
||||||
],
|
],
|
||||||
"validation": {"docstatus": ["=", 1]},
|
"validation": {"docstatus": ["=", 1]},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,10 +12,11 @@ frappe.ui.form.on("Company", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (!frm.doc.__islocal) {
|
||||||
frm.call("check_if_transactions_exist").then((r) => {
|
frm.call("check_if_transactions_exist").then((r) => {
|
||||||
frm.toggle_enable("default_currency", !r.message);
|
frm.toggle_enable("default_currency", !r.message);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
setup: function (frm) {
|
setup: function (frm) {
|
||||||
frm.__rename_queue = "long";
|
frm.__rename_queue = "long";
|
||||||
|
|||||||
Reference in New Issue
Block a user