private void UpdateSupplierUnpaidPurchases() { SupplierUnpaidPurchases.Clear(); using (var context = new ERPContext()) { var unpaidPurchases = context.PurchaseTransactions .Where(e => e.Supplier.ID == _selectedSupplier.ID && e.Paid < e.Total) .Include("Supplier").Include("PurchaseTransactionLines.Item"); foreach (var purchase in unpaidPurchases) { SupplierUnpaidPurchases.Add(purchase); } } }
private void ResetTransaction() { SelectedSupplier = null; PurchaseReturnCredits = 0; SelectedPaymentMode = null; SelectedPurchaseTransaction = null; PurchaseTransactionGrossTotal = 0; PurchaseTransactionDiscount = 0; PurchaseTransactionTax = 0; PurchaseTransactionTotal = 0; UseCredits = 0; Remaining = 0; Pay = 0; UpdateSuppliers(); UpdatePaymentMethods(); SelectedPurchaseLines.Clear(); SupplierUnpaidPurchases.Clear(); }