Compare commits

..

2 Commits

Author SHA1 Message Date
Deepesh Garg
8119e67043 fix: Ignore user permission for Represents Company field in Sales and Purchase docs (#27684)
* fix: Ignore user permission for Represents Company field in Sales and Purchase docs

* fix: Ignore user permission for fiscal year company

(cherry picked from commit b39f8a6215)

# Conflicts:
#	erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.json
#	erpnext/buying/doctype/purchase_order/purchase_order.json
#	erpnext/selling/doctype/sales_order/sales_order.json
#	erpnext/stock/doctype/delivery_note/delivery_note.json
#	erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
2025-02-21 00:12:19 +00:00
mergify[bot]
f5160dc83d fix: use Stock Qty while getting POS Reserved Qty (backport #38962) (#38983)
fix: use `Stock Qty` while getting `POS Reserved Qty`

(cherry picked from commit 7223106417)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2023-12-28 12:00:04 +05:30
8 changed files with 39 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ import frappe
from erpnext.hooks import regional_overrides
__version__ = "13.55.2"
__version__ = "13.54.4"
def get_default_company(user=None):

View File

@@ -704,7 +704,7 @@ def get_pos_reserved_qty(item_code, warehouse):
reserved_qty = (
frappe.qb.from_(p_inv)
.from_(p_item)
.select(Sum(p_item.qty).as_("qty"))
.select(Sum(p_item.stock_qty).as_("stock_qty"))
.where(
(p_inv.name == p_item.parent)
& (IfNull(p_inv.consolidated_invoice, "") == "")
@@ -715,7 +715,7 @@ def get_pos_reserved_qty(item_code, warehouse):
)
).run(as_dict=True)
return reserved_qty[0].qty or 0 if reserved_qty else 0
return flt(reserved_qty[0].stock_qty) if reserved_qty else 0
@frappe.whitelist()

View File

@@ -1312,6 +1312,18 @@
"fieldtype": "Column Break"
},
{
<<<<<<< HEAD
=======
"default": "0",
"fetch_from": "supplier.is_internal_supplier",
"fieldname": "is_internal_supplier",
"fieldtype": "Check",
"ignore_user_permissions": 1,
"label": "Is Internal Supplier",
"read_only": 1
},
{
>>>>>>> b39f8a6215 (fix: Ignore user permission for Represents Company field in Sales and Purchase docs (#27684))
"fieldname": "tax_withholding_category",
"fieldtype": "Link",
"hidden": 1,
@@ -1437,7 +1449,11 @@
"idx": 204,
"is_submittable": 1,
"links": [],
<<<<<<< HEAD
"modified": "2022-10-07 14:19:14.214157",
=======
"modified": "2021-09-28 13:10:28.351810",
>>>>>>> b39f8a6215 (fix: Ignore user permission for Represents Company field in Sales and Purchase docs (#27684))
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",

View File

@@ -2047,7 +2047,11 @@
"link_fieldname": "consolidated_invoice"
}
],
<<<<<<< HEAD
"modified": "2023-01-28 19:45:47.538163",
=======
"modified": "2021-09-28 13:09:34.391799",
>>>>>>> b39f8a6215 (fix: Ignore user permission for Represents Company field in Sales and Purchase docs (#27684))
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",

View File

@@ -1170,7 +1170,11 @@
"idx": 105,
"is_submittable": 1,
"links": [],
<<<<<<< HEAD
"modified": "2022-12-25 18:08:59.074182",
=======
"modified": "2021-09-28 13:10:47.955401",
>>>>>>> b39f8a6215 (fix: Ignore user permission for Represents Company field in Sales and Purchase docs (#27684))
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order",

View File

@@ -1548,7 +1548,11 @@
"idx": 105,
"is_submittable": 1,
"links": [],
<<<<<<< HEAD
"modified": "2022-09-16 17:43:57.007441",
=======
"modified": "2021-09-28 13:09:51.515542",
>>>>>>> b39f8a6215 (fix: Ignore user permission for Represents Company field in Sales and Purchase docs (#27684))
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order",

View File

@@ -1336,7 +1336,11 @@
"idx": 146,
"is_submittable": 1,
"links": [],
<<<<<<< HEAD
"modified": "2023-09-04 14:15:28.363184",
=======
"modified": "2021-09-28 13:10:09.761714",
>>>>>>> b39f8a6215 (fix: Ignore user permission for Represents Company field in Sales and Purchase docs (#27684))
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note",

View File

@@ -1148,7 +1148,11 @@
"idx": 261,
"is_submittable": 1,
"links": [],
<<<<<<< HEAD
"modified": "2022-09-16 17:45:58.430132",
=======
"modified": "2021-09-28 13:11:10.181328",
>>>>>>> b39f8a6215 (fix: Ignore user permission for Represents Company field in Sales and Purchase docs (#27684))
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Receipt",