Bug 39779

Summary: Table.row.add error in point of sale table
Product: Koha Reporter: Laura Escamilla <Laura.escamilla>
Component: Point of SaleAssignee: Laura Escamilla <Laura.escamilla>
Status: Pushed to main --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: major    
Priority: P5 - low CC: martin.renvoize
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Bug Depends on: 38255    
Bug Blocks:    
Attachments: Bug 39779: Updated table type
Bug 39779: Updated table type
Bug 39779: Updated table type
Bug 39779: (QA follow-up) Undo revert and instead call .api()

Description Laura Escamilla 2025-04-29 17:35:54 UTC
To recreate:
1. In K-T-D set up POS module with a cash register and configure an item for sale. 
2. Attempt to add the configured item for purchase. The console log will show: "Uncaught TypeError: table.row is undefined"
Comment 1 Laura Escamilla 2025-04-29 17:37:40 UTC
Created attachment 181682 [details] [review]
Bug 39779: Updated table type

To test:
1. In K-T-D set up POS module with a cash register and configure an item for sale.
2. Attempt to add the configured item for purchase. The console log will show: "Uncaught TypeError: table.row is undefined"
3. Apply the patch
4. Refresh the page.
5. Repeat step 2. You are now able to add the configured item for purchase. You can also remove it or go through with the full transaction.
6. Sign off and have an incredible day! :D
Comment 2 Roman Dolny 2025-04-29 20:05:09 UTC
Created attachment 181686 [details] [review]
Bug 39779: Updated table type

To test:
1. In K-T-D set up POS module with a cash register and configure an item for sale.
2. Attempt to add the configured item for purchase. The console log will show: "Uncaught TypeError: table.row is undefined"
3. Apply the patch
4. Refresh the page.
5. Repeat step 2. You are now able to add the configured item for purchase. You can also remove it or go through with the full transaction.
6. Sign off and have an incredible day! :D

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 3 Martin Renvoize (ashimema) 2025-05-02 15:17:19 UTC
Created attachment 181870 [details] [review]
Bug 39779: Updated table type

To test:
1. In K-T-D set up POS module with a cash register and configure an item for sale.
2. Attempt to add the configured item for purchase. The console log will show: "Uncaught TypeError: table.row is undefined"
3. Apply the patch
4. Refresh the page.
5. Repeat step 2. You are now able to add the configured item for purchase. You can also remove it or go through with the full transaction.
6. Sign off and have an incredible day! :D

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 4 Martin Renvoize (ashimema) 2025-05-02 15:17:22 UTC
Created attachment 181871 [details] [review]
Bug 39779: (QA follow-up) Undo revert and instead call .api()

This patch leaves Laura's patch intact for the record, but effectively
reverts it's reversion of bug 38255 in which all ajax DataTables were
converted to a standard kohaTable instantiation structure.

We need a DataTable() api in subsequent uses of the table and not the
jQuery object that kohaTable returns so I update all calls to
saleDataTable to sale_kohaTable.api() which returns us the DataTable()
api instance from the dataTable jQuery object.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 5 Katrin Fischer 2025-05-06 16:54:20 UTC
Pushed for 25.05!

Well done everyone, thank you!