Openbravo Issue Tracking System - POS2
View Issue Details
0057601POS2POSpublic2025-01-09 13:042025-03-17 10:22
frank_gonzalez 
adiaz 
normalmajoralways
closedfixed 
5
 
25Q2 
approved
No
No
0057601: Add dynamic input loader to filter user inputs for Tax Check
If more than one User Input is related to the Tax Check user action via the User Action Input window and the configuration includes Active = Y and Mandatory = Y but only one Input Value is later assigned to a tax rate, the user will be unable to assign an input value in POS (OK button will be disabled).

Normally, this configuration shouldn't exist but in case it does, we need to deal with it by filtering the inputs that aren't associated to any of the line(s) currently selected/being added via the tax rate.
1. Log into the BO, navigate to the User Input window and create a record as follows -
  Organization: *
  Search Key: TI1
  Name: Test Input 1
  Input Type: List
  Active: Yes
2. In the Input Value tab, create a value as follows -
  Organization: *
  Sequence Number: 10
  Search Key: TIV
  Text: Test Input Value
  Include Additional Comments: No
  Active: Yes
3. Create another User Input, but do not add an Input Value -
  Organization: *
  Search Key: TI2
  Name: Test Input 2
  Input Type: List
  Active: Yes
4. Go to the User Action Input window and create the following two records -
  Record 1:
    Organization: *
    User Action: Tax Check
    User Input: Test Input 1
    Sequence Number: 10
    Mandatory: Yes
    Active: Yes
  Record 2:
    Organization: *
    User Action: Tax Check
    User Input: Test Input 2
    Sequence Number: 10
    Mandatory: Yes
    Active: Yes
5. Navigate to the Tax Rate window, find IVA 21 and add a Tax User Input Value:
  User Action: Tax Check
  User Input Value: Test Input Value
  Active: Yes
6. Log into the POS application and add Avalanche transceiver to the ticket
7. Select the only value in the dropdown list (Test Input Value) - at this point the OK button should appear disabled, therefore the input value cannot be assigned
In the Tax Check user action, overwrite the getInputs() function to return 'null' and create a dynamic input loader via the registerDynamicInputLoader() function that takes the ticket state and the payload into account in order to return the single input that should be used.

Use the following as an example: https://gitlab.com/openbravo/devel/pmods/org.openbravo.pos2/-/blob/master/web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/ReturnLine.js#L27 [^]
No tags attached.
Issue History
2025-01-09 13:04frank_gonzalezNew Issue
2025-01-09 13:04frank_gonzalezAssigned To => Triage Omni OMS
2025-01-09 13:04frank_gonzalezOBNetwork customer => No
2025-01-09 13:04frank_gonzalezTriggers an Emergency Pack => No
2025-01-09 13:07frank_gonzalezNote Added: 0173945
2025-03-11 10:42frank_gonzalezNote Added: 0176651
2025-03-12 11:05hgbotMerge Request Status => open
2025-03-12 11:05hgbotNote Added: 0176713
2025-03-12 11:44frank_gonzalezNote Deleted: 0176651
2025-03-13 12:17hgbotMerge Request Statusopen => approved
2025-03-13 12:18hgbotResolutionopen => fixed
2025-03-13 12:18hgbotStatusnew => closed
2025-03-13 12:18hgbotFixed in Version => 25Q2
2025-03-13 12:18hgbotNote Added: 0176785
2025-03-13 12:18hgbotNote Added: 0176786
2025-03-13 12:19frank_gonzalezAssigned ToTriage Omni OMS => adiaz
2025-03-17 09:59hgbotNote Added: 0176883
2025-03-17 10:22hgbotNote Added: 0176884
2025-03-17 10:22hgbotNote Added: 0176885

Notes
(0173945)
frank_gonzalez   
2025-01-09 13:07   
Jira: https://openbravo.atlassian.net/browse/RM-20236 [^]
(0176713)
hgbot   
2025-03-12 11:05   
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/3602 [^]
(0176785)
hgbot   
2025-03-13 12:18   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: dcba763cdf6725ce22493fc37d0ff6071d8b30ee
Author: alba diaz <a.diaz@orisha.com>
Date: 13-03-2025 11:16:45
URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2/-/commit/dcba763cdf6725ce22493fc37d0ff6071d8b30ee [^]

Fixes ISSUE-57601: Only allow one active record for Tax Check user action

---
A src/org/openbravo/pos2/event/TaxCheckUserActionInputEventHandler.java
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0176786)
hgbot   
2025-03-13 12:18   
Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/3602 [^]
(0176883)
hgbot   
2025-03-17 09:59   
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/3617 [^]
(0176884)
hgbot   
2025-03-17 10:22   
Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/3617 [^]
(0176885)
hgbot   
2025-03-17 10:22   
Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 6866011ff192c475f0c33737765507da34032c0e
Author: frank.gonzalez1 <frank.gonzalez@openbravo.com>
Date: 17-03-2025 09:59:46
URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2/-/commit/6866011ff192c475f0c33737765507da34032c0e [^]

Related to ISSUE-57601: Fixes DB consistency error

---
M src-db/database/sourcedata/AD_MESSAGE.xml
---