Ejemplo n.º 1
0
 //-------------------------------------------------------------------------------------------
 public bool GetBalances(Accounting_Accounts account, out decimal AvailableBalance, out decimal LedgerBalance)
 {
     AvailableBalance = 0.0m;
        LedgerBalance = 0.0m;
        DateTime startDate = DateTime.Now.Subtract(TimeSpan.FromDays(5));
        DateTime endDate = DateTime.Now;
        if (account.LedgerType == LedgerType.CreditCard.ToString())
        {
             Ccstatement statement = GetCreditCardStatement(account, startDate, endDate);
             Decimal.TryParse(statement.AvailableBalance, out AvailableBalance);
             Decimal.TryParse(statement.LedgerBalance, out LedgerBalance);
        }
        else
        {
             Bankstatement statement = GetBankStatement(account, startDate, endDate);
             Decimal.TryParse(statement.AvailableBalance, out AvailableBalance);
             Decimal.TryParse(statement.LedgerBalance, out LedgerBalance);
        }
        return true;
 }
Ejemplo n.º 2
0
 //-------------------------------------------------------------------------------------------
 public Ccstatement GetCreditCardStatement(Accounting_Accounts acct, DateTime startDate, DateTime endDate)
 {
     nsoftware.InEBank.Ccstatement item = new nsoftware.InEBank.Ccstatement();
        item.OFXAppId = "QWIN";
        item.OFXAppVersion = "1800";
        item.FIUrl = Url;
        item.FIId = FinancialInstitutionId.ToString();
        item.FIOrganization = FinancialInstitutionName;
        item.CardNumber = acct.AccountNumber;
        item.OFXUser = Username;
        item.OFXPassword = Password;
        item.StartDate = startDate.ToString("MM/dd/yyyy hh:mm:ss");
        item.EndDate = endDate.ToString("MM/dd/yyyy hh:mm:ss");
        item.GetStatement();
        return item;
 }
Ejemplo n.º 3
0
 //-------------------------------------------------------------------------------------------
 public Bankstatement GetBankStatement(Accounting_Accounts acct, DateTime startDate, DateTime endDate)
 {
     Bankstatement item = new Bankstatement();
        // item.Config(@"OFXLOG=C:\Weavver\github\weavver\www\Uploads\ofx.log");
        item.Firewall.AutoDetect = false;
        item.Firewall.FirewallType = FirewallTypes.fwNone;
        item.OFXAppId = "QWIN";
        item.OFXAppVersion = "1700";
        item.FIUrl = Url;
        item.FIId = FinancialInstitutionId.ToString();
        item.FIOrganization = FinancialInstitutionName;
        item.BankId = BankId;
        item.AccountId = acct.AccountNumber;
        item.AccountType = ConvertWeavverLedgerTypeToEbankingBankStatementAccountType((LedgerType) Enum.Parse(typeof(LedgerType), acct.LedgerType));
        item.OFXUser = Username;
        item.OFXPassword = Password;
        //item.IncludeImages = true; // Not working
        //item.OFXVersion = "211";
        item.StartDate = startDate.ToString("MM/dd/yyyy hh:mm:ss");
        item.EndDate = endDate.ToString("MM/dd/yyyy hh:mm:ss");
        item.GetStatement();
        return item;
 }