Author Topic: Increment(+)/Decrement(-) button : amount not updated on display poll  (Read 19063 times)

DQ

  • Jr. Member
  • **
  • Posts: 82
Hello,
  When my employees increment (+) or decreament(-)  quantity  by selecting +/- button for an item (before going to settle screen), it shows update amount on the screen but pole display doesn't show that.

I have added two rules to update display.

1.  When line item added
2.  When total amount changed

It works fine when item is added twice separately.   

I think below code is associated with +/- buttons.  How do I fix it

 private void OnDecSelectedQuantity(string obj)
        {
            if (LastSelectedTicketItem.IsLocked)
                LastSelectedTicketItem.DecSelectedQuantity();
            else LastSelectedTicketItem.Quantity--;
        }

private void OnIncSelectedQuantity(string obj)
        {
            if (LastSelectedTicketItem.IsLocked)
                LastSelectedTicketItem.IncSelectedQuantity();
            else LastSelectedTicketItem.Quantity++;
        }

DQ

  • Jr. Member
  • **
  • Posts: 82
Re: Increment(+)/Decrement(-) button : amount not updated on display poll
« Reply #1 on: November 20, 2013, 08:07:52 pm »
I fixed by adding    _selectedTicket.RecalculateTicket(); in  TicketListViewMode.cs class. It works fine but please let me know if it is not right place.

private void OnDecQuantityCommand(string obj)
        {
            LastSelectedTicketItem.Quantity--;
            _selectedTicket.RecalculateTicket();
            _selectedTicket.RefreshVisuals();
        }

        private void OnIncQuantityCommand(string obj)
        {
            LastSelectedTicketItem.Quantity++;
            _selectedTicket.RecalculateTicket();
            _selectedTicket.RefreshVisuals();
        }