Exemple #1
0
        private void QuantityStepper_OnValueChanged(object sender, ValueEventArgs e)
        {
            decimal taxAmount;
            var     amount = Math.Round(vm.SelectedSaleLine.NetPrice * vm.SelectedSaleLine.Quantity, 2);

            if (vm.SelectedTax.Code == "INCLUSIVE")
            {
                taxAmount = Math.Round(amount / (1 + vm.SelectedSaleLine.TaxRate / 100) * (vm.SelectedSaleLine.TaxRate / 100), 2);
            }
            else
            {
                taxAmount = Math.Round(amount * (vm.SelectedSaleLine.TaxRate / 100), 2);
                amount    = Math.Round(amount + taxAmount, 2);
            }

            vm.SelectedSaleLine.Amount    = amount;
            vm.SelectedSaleLine.TaxAmount = taxAmount;
            vm.ExecuteRefreshSelectedSaleLine();
        }
Exemple #2
0
 private void QuantityStepper_OnValueChanged(object sender, ValueChangedEventArgs e)
 {
     vm.SelectedSaleLine.Amount = vm.SelectedSaleLine.NetPrice * vm.SelectedSaleLine.Quantity;
     vm.ExecuteRefreshSelectedSaleLine(new object());
 }