mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 21:59:13 +00:00
Merge pull request #49565 from frappe/version-14-hotfix
chore: release v14
This commit is contained in:
@@ -60,6 +60,6 @@ def create_party_link(primary_role, primary_party, secondary_party):
|
|||||||
party_link.secondary_role = "Customer" if primary_role == "Supplier" else "Supplier"
|
party_link.secondary_role = "Customer" if primary_role == "Supplier" else "Supplier"
|
||||||
party_link.secondary_party = secondary_party
|
party_link.secondary_party = secondary_party
|
||||||
|
|
||||||
party_link.save(ignore_permissions=True)
|
party_link.save()
|
||||||
|
|
||||||
return party_link
|
return party_link
|
||||||
|
|||||||
@@ -113,7 +113,10 @@ frappe.ui.form.on("Supplier", {
|
|||||||
__("Actions")
|
__("Actions")
|
||||||
);
|
);
|
||||||
|
|
||||||
if (cint(frappe.defaults.get_default("enable_common_party_accounting"))) {
|
if (
|
||||||
|
cint(frappe.defaults.get_default("enable_common_party_accounting")) &&
|
||||||
|
frappe.model.can_create("Party Link")
|
||||||
|
) {
|
||||||
frm.add_custom_button(
|
frm.add_custom_button(
|
||||||
__("Link with Customer"),
|
__("Link with Customer"),
|
||||||
function () {
|
function () {
|
||||||
|
|||||||
@@ -156,7 +156,10 @@ frappe.ui.form.on("Customer", {
|
|||||||
__("Actions")
|
__("Actions")
|
||||||
);
|
);
|
||||||
|
|
||||||
if (cint(frappe.defaults.get_default("enable_common_party_accounting"))) {
|
if (
|
||||||
|
cint(frappe.defaults.get_default("enable_common_party_accounting")) &&
|
||||||
|
frappe.model.can_create("Party Link")
|
||||||
|
) {
|
||||||
frm.add_custom_button(
|
frm.add_custom_button(
|
||||||
__("Link with Supplier"),
|
__("Link with Supplier"),
|
||||||
function () {
|
function () {
|
||||||
|
|||||||
@@ -748,12 +748,12 @@ def get_items(warehouse, posting_date, posting_time, company, item_code=None, ig
|
|||||||
itemwise_batch_data = get_itemwise_batch(warehouse, posting_date, company, item_code)
|
itemwise_batch_data = get_itemwise_batch(warehouse, posting_date, company, item_code)
|
||||||
|
|
||||||
for d in items:
|
for d in items:
|
||||||
if d.item_code in itemwise_batch_data:
|
if (d.item_code, d.warehouse) in itemwise_batch_data:
|
||||||
valuation_rate = get_stock_balance(
|
valuation_rate = get_stock_balance(
|
||||||
d.item_code, d.warehouse, posting_date, posting_time, with_valuation_rate=True
|
d.item_code, d.warehouse, posting_date, posting_time, with_valuation_rate=True
|
||||||
)[1]
|
)[1]
|
||||||
|
|
||||||
for row in itemwise_batch_data.get(d.item_code):
|
for row in itemwise_batch_data.get((d.item_code, d.warehouse)):
|
||||||
if ignore_empty_stock and not row.qty:
|
if ignore_empty_stock and not row.qty:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@@ -885,7 +885,7 @@ def get_itemwise_batch(warehouse, posting_date, company, item_code=None):
|
|||||||
columns, data = execute(filters)
|
columns, data = execute(filters)
|
||||||
|
|
||||||
for row in data:
|
for row in data:
|
||||||
itemwise_batch_data.setdefault(row[0], []).append(
|
itemwise_batch_data.setdefault((row[0], row[3]), []).append(
|
||||||
frappe._dict(
|
frappe._dict(
|
||||||
{
|
{
|
||||||
"item_code": row[0],
|
"item_code": row[0],
|
||||||
|
|||||||
Reference in New Issue
Block a user