Esempio n. 1
0
        private void OnSelectionChanged()
        {
            if (ProductAndServices != null && this.SelectedPSID != null)
            {
                var sqDetails = ProductAndServices.Where(p => p.ID == Convert.ToInt32(this.SelectedPSID)).SingleOrDefault();
                if (sqDetails != null)
                {
                    PandSCode   = sqDetails.PSCode;
                    PandSName   = sqDetails.PSName;
                    GSTRate     = sqDetails.TaxRate;
                    PriceIncTax = sqDetails.CostPriceIncludingTaxBackup;
                    PriceExcTax = sqDetails.CostPriceExcludingTaxBackup;

                    if (SharedValues.IsIncludeTax == false)
                    {
                        PQPrice = Convert.ToString(Convert.ToDecimal(sqDetails.CostPriceExcludingTax));
                    }
                    else
                    {
                        PQPrice = Convert.ToString(Convert.ToDecimal(sqDetails.CostPriceIncludingTax));
                    }
                    PQQty = 1;
                    // SQDiscount = 0;
                    //if (SharedValues.CustomerDiscount != null)
                    //{
                    //    PQDiscount = SharedValues.CustomerDiscount;
                    //}

                    GSTRateStr = Convert.ToString(GSTRate) + "%";

                    // OnQtyChangeTotalAmt(ExcludingTax);
                }
            }
        }
Esempio n. 2
0
        public void GetPandSDetails()
        {
            #region getting Options details

            var lstOptions = pandRepository.GetOptionDetails();
            if (lstOptions != null)
            {
                bool?tax = lstOptions.ShowAmountIncGST;
                if (tax == true)
                {
                    IsExcludingTax = false;
                }
                else
                {
                    IsExcludingTax = true;
                }
            }

            #endregion


            var pqDetails = ProductAndServices.Where(p => p.ID == SelectedPandSID).SingleOrDefault();
            if (pqDetails != null)
            {
                //  PQDEntity = lst.Where(l => l.ID == SelectedPSID).SingleOrDefault();
                if (IsExcludingTax == true)
                {
                    Price = Math.Round(Convert.ToDecimal(pqDetails.StandardCostpriceBeforeGST), 2);
                }
                else
                {
                    Price = Math.Round(Convert.ToDecimal(pqDetails.StandardCostpriceAfterGST), 2);
                }
            }
        }
Esempio n. 3
0
        private void OnSelectionChanged()
        {
            if (ProductAndServices != null && this.SelectedPSID != null)
            {
                var sqDetails = ProductAndServices.Where(p => p.ID == Convert.ToInt32(this.SelectedPSID)).SingleOrDefault();
                var cus       = customerRepository.GetAllCustomers().Where(s => s.ID == SharedValues.SelectedCusId).SingleOrDefault();
                this.TaxandRateList = customerRepository.GetTaxCodeAndRatesList();
                if (cus != null && this.TaxandRateList != null)
                {
                    var Tax = this.TaxandRateList.Where(x => x.TaxID == cus.TaxId).FirstOrDefault();
                    if (Tax != null)
                    {
                        SelectedTaxId = Tax.TaxRate;
                    }
                }
                if (sqDetails != null)
                {
                    PandSCode = sqDetails.PSCode;
                    PandSName = sqDetails.PSName;
                    if (cus.Cus_Charge_GST == false)
                    {
                        GSTRate = SelectedTaxId;
                    }
                    else
                    {
                        GSTRate = sqDetails.TaxRate;
                    }

                    PriceIncTax = sqDetails.SellPriceIncludingTaxBackup;
                    PriceExcTax = sqDetails.SellPriceExcludingTaxBackup;

                    if (SharedValues.IsIncludeTax == false)
                    {
                        SQPrice = Convert.ToString(Convert.ToDecimal(sqDetails.SellPriceExcludingTax));
                    }
                    else
                    {
                        SQPrice = Convert.ToString(Convert.ToDecimal(sqDetails.SellPriceIncludingTax));
                    }
                    SQQty = 1;
                    // SQDiscount = 0;
                    if (SharedValues.CustomerDiscount != null)
                    {
                        SQDiscount = SharedValues.CustomerDiscount;
                    }

                    GSTRateStr = Convert.ToString(GSTRate) + "%";

                    // OnQtyChangeTotalAmt(ExcludingTax);
                }
            }
        }