Skip to content

Commit 994585a

Browse files
Ollamaodiea
authored andcommitted
fix: Tax Rate form not loading due to router service failure
The get_tax_rates_data_row() function in tax_helper.php was calling service('router') without handling cases where the router service is unavailable, causing the form modal to fail to open. This fix adds a fallback to 'taxes' controller name when router service returns null or fails. Also adds missing 'id' field in postSave() JSON response for proper row highlighting after save operations. Fixes opensourcepos#4477 Co-authored-by: odiea <odiea@users.noreply.github.com>
1 parent e17944d commit 994585a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

app/Helpers/tax_helper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ function get_tax_rates_manage_table_headers(): string
143143
*/
144144
function get_tax_rates_data_row($tax_rates_row): array
145145
{
146-
$router = service('router');
147-
$controller_name = strtolower($router->controllerName());
146+
$controller_name = 'taxes';
148147

149148
return [
150149
'tax_rate_id' => $tax_rates_row->tax_rate_id,

0 commit comments

Comments
 (0)