Very fed-up situation

Discussion in 'Free Source Codes' started by Rishi kumar, Apr 23, 2024.

    
  1. Rishi kumar

    Rishi kumar Member


    Dear expert
    I have created a negative stock control ,that works fine .
    In sales voucher ,when user comes on item he used down arrow instead of using enter key. In that case he jump line one after one and by pass the negative stock . And save the entry with negative stock whereas there is a negative stock control .
    Actually user created a sales order and raised invoice against order .
    Pls advice
    How I stop this .

    Thanks
    Rishi
     



  2. note... solution for the same
    A) Create a New field next to the qty field and in that store the values if tis more than then qty entered then it will block even if the fellow does the down arrow it has to validate the filed and then only go ahead
     


  3. Rishi kumar

    Rishi kumar Member


    Not working sir.
    Actually user is jumping vertically
    Suppose inv have 3 items . Then cursor on first item press down arrow jumped to second item and further.
     


  4. Johar

    Johar Member



  5. Himanshu-2002

    Himanshu-2002 Active Member


    Its simple just block the down arrow key.


    Add a new key in the stock item field and key would be "down" and action would be empty.

    This will solve your problem.
     


  6. Rishi kumar

    Rishi kumar Member


    How bro ?
    No such type of key associated with stock item fieldą„¤
     


  7. Himanshu-2002

    Himanshu-2002 Active Member


    I know there is no down key associated at field level....It is there at platform level..but don't think too much. Just add a new key at field level like this

    Code:
    [#Field:VCH Stockitem]
        Add:Key:DownKey1
     
    [Key:DownKey1]
        Key:Down
        Action:Call:EmptyFunction
     
    [Function:EmptyFunction]
        00:Return
     
    Last edited: Apr 25, 2024


  8. Rishi kumar

    Rishi kumar Member


    Thanks bro
    It's working
     


  9. Rishi kumar

    Rishi kumar Member


    Bro your method is working but there is a drawback .
    If we have to add a new stock item then cursor moving upwards in stock selection list but not downwards.
     


  10. Himanshu-2002

    Himanshu-2002 Active Member


    If you want to block upward movement also then you can add another key for that... simple
     


  11. Rishi kumar

    Rishi kumar Member


    No I don't want to block
    Problem is user is not to jump but now he want to add one new stock then in stock item list cursor is moving upwards not comming downwards.
     


  12. Himanshu-2002

    Himanshu-2002 Active Member


    Then add the keys based on certain conditions.

    1. List down the conditions where Keys should be added and conditions where Keys should not be added
    2. Simplify the rules
    3. Divide it into pieces
    4. Apply logic into code.
     


Share This Page