mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 08:35:00 +00:00
Merge pull request #45040 from ruthra-kumar/use_idx_for_identifying
refactor: use `idx` for identifying row
This commit is contained in:
@@ -56,7 +56,7 @@ class TestReactivity(AccountsTestMixin, IntegrationTestCase):
|
||||
)
|
||||
itm = si.append("items")
|
||||
itm.item_code = self.item
|
||||
si.process_item_selection(si.items[0].name)
|
||||
si.process_item_selection(itm.idx)
|
||||
self.assertEqual(itm.rate, 90)
|
||||
|
||||
df = qb.DocType("DocField")
|
||||
|
||||
@@ -505,7 +505,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
||||
doc: doc,
|
||||
method: "process_item_selection",
|
||||
args: {
|
||||
item: item.name
|
||||
item_idx: item.idx
|
||||
},
|
||||
callback: function(r) {
|
||||
if(!r.exc) {
|
||||
|
||||
@@ -288,9 +288,9 @@ class TransactionBase(StatusUpdater):
|
||||
)
|
||||
|
||||
@frappe.whitelist()
|
||||
def process_item_selection(self, item):
|
||||
def process_item_selection(self, item_idx):
|
||||
# Server side 'item' doc. Update this to reflect in UI
|
||||
item_obj = self.get("items", {"name": item})[0]
|
||||
item_obj = self.get("items", {"idx": item_idx})[0]
|
||||
|
||||
# 'item_details' has latest item related values
|
||||
item_details = self.fetch_item_details(item_obj)
|
||||
|
||||
Reference in New Issue
Block a user