/// <summary> /// This method is used to get new PQ /// </summary> public void GetNewPQ() { VisibilityForImage = Visibility.Collapsed; IsNew = true; ID = 0; SelectedSupplierID = 0; BillToAddress = string.Empty; ShipToAddress = string.Empty; // ValidForDays = 0; InvoiceNo = GenerateNewInvoiceNo(); TermsAndConditions = TandC; TotalBeforeTax = 0; TotalTax = 0; TotalAfterTax = 0; TotalBeforeTaxStr = Convert.ToString(0); TotalTaxStr = Convert.ToString(0); TotalAfterTaxStr = Convert.ToString(0); PQErrors = string.Empty; AllFieldsEnabled = true; AllFieldsReadonly = false; SupplierEnabled = true;// added on 23 may 2017 this.PaymentDueDate = null; this.OurPONo = string.Empty; PurchaseInvoiceEntity = new PurchaseInvoiceEntity(); PQDetailsEntity.Clear(); LstSuppliers = supplierRepository.GetAllSupplier().Where(s => s.IsInActive != "Y").ToList(); ProductAndServices = ProductAndServices.OrderBy(x => x.PSName).Where(x => x.IsInActive == "N").ToObservable(); // PQDetailsEntity = new ObservableCollection<DataGridViewModel>(); var row = new DataGridViewModel(ProductList.Where(x => x.IsInActive == "N").ToList()); //row.PQQty = 1; //row.PQDiscount = 0; //row.GSTRate = TaxRate; //row.GSTRateStr = Convert.ToString(TaxRate) + "%"; PQDetailsEntity.Add(row); OnPropertyChanged("PQDetailsEntity"); var lstOptions = pandsRepository.GetOptionDetails(); bool?tax = lstOptions.ShowAmountIncGST; if (tax == true) { ExcludingTax = false; IncludingTax = true; } else { IncludingTax = false; ExcludingTax = true; } }
void GetNewPS(object param) { IsNew = true; // SelectedCustomerID = 0; IsCustomerEnabled = true; IsCreditNoEnabled = true; PSErrors = string.Empty; GetNewPS(); if (PQDetailsEntity != null) { if (PQDetailsEntity.Count > 0) { PQDetailsEntity.Clear(); var row = new CollectSalesAmountDataGridViewModel(); PQDetailsEntity.Add(row); OnPropertyChanged("PQDetailsEntity"); } } }
void GetNewPS(object param) { IsNew = true; // SelectedCustomerID = 0; IsCustomerEnabled = true; IsCashChequeEnabled = true; GetNewPS(); SelectedCustomerID = 0; if (PQDetailsEntity != null) { if (PQDetailsEntity.Count > 0) { PQDetailsEntity.Clear(); //var row = new CollectSalesAmountDataGridViewModel(); //PQDetailsEntity.Add(row); OnPropertyChanged("PQDetailsEntity"); } } }
void GetNewPS(object param) { IsNew = true; // SelectedSupplierID = 0; IsCashChequeEnabled = true; IsSupplierEnabled = true; IsTextBoxReadOnly = false; PSErrors = string.Empty; GetNewPS(); SelectedSupplierID = 0; if (PQDetailsEntity != null) { if (PQDetailsEntity.Count > 0) { PQDetailsEntity.Clear(); // var row = new CollectAmountDataGridViewModel(); // PQDetailsEntity.Add(row); OnPropertyChanged("PQDetailsEntity"); } } }