Openbravo Issue Tracking System - POS2
View Issue Details
0057601POS2POSpublic2025-01-09 13:042025-01-09 13:07
frank_gonzalez 
Triage Omni OMS 
normalmajoralways
newopen 
5
 
 
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_gonzalezTriggers an Emergency Pack => No
2025-01-09 13:07frank_gonzalezNote Added: 0173945

Notes
(0173945)
frank_gonzalez   
2025-01-09 13:07   
Jira: https://openbravo.atlassian.net/browse/RM-20236 [^]