/// <summary> /// This method calculates the possible cash of the company, cash that the company has in bank /// and make the subtraction them /// </summary> private void CalculateBalance() { var accountManager = new AccountManager(this); // // Calculates the possible cash of the company // totalPossible = accountManager.GetParcelsValueFromInvoices(Company.CompanyId) - accountManager.GetParcelsValueFromBills(Company.CompanyId); // // Calculates the cash that the company has in bank // totalDone = (decimal)accountManager.GetSumConciliatedParcelsValueFromInvoices(Company.CompanyId) - (decimal)accountManager.GetSumConciliatedParcelsValueFromBills(Company.CompanyId); txtDone.Text = String.Format("{0:c}", totalDone); txtPossible.Text = String.Format("{0:c}", totalPossible); }