Exemplo n.º 1
0
    static public CRDocument CreateCheck(FinancialInstitution institution, string checksAccount, string checkNumber,
                                         Contact issuedBy, Contact issuedTo, DateTime issueDate, DateTime dueDate,
                                         decimal amount, string notes) {
      CRDocument document = new CRDocument(InstrumentType.Parse("check"));
      document.Institution = institution;
      document.AccountNumber = checksAccount;
      document.DocumentNumber = checkNumber;
      document.IssuedBy = issuedBy;
      document.IssuedTo = issuedTo;
      document.IssueDate = issueDate;
      document.DueDate = dueDate;
      document.Amount = amount;
      document.Notes = notes;

      return document;
    }
Exemplo n.º 2
0
    static public CRDocument CreateBankCardSlip(InstrumentType instrumentType, FinancialInstitution institution, string bankCardAccount,
                                                string voucherNumber, Contact issuedBy, DateTime issueDate, DateTime dueDate,
                                                decimal amount, string notes) {
      CRDocument document = new CRDocument(instrumentType);
      document.Institution = institution;
      document.AccountNumber = bankCardAccount;
      document.DocumentNumber = voucherNumber;
      document.IssuedBy = issuedBy;
      document.IssuedTo = CashRegister.MyCashRegister().Organization;
      document.IssueDate = issueDate;
      document.DueDate = dueDate;
      document.Amount = amount;
      document.Notes = notes;
      document.Status = TreasuryItemStatus.Pending;

      return document;
    }
Exemplo n.º 3
0
 protected override void OnLoadObjectData(DataRow row) {
   this.instrumentType = InstrumentType.Parse((int) row["InstrumentTypeId"]);
   this.institution = FinancialInstitution.Parse((int) row["InstitutionId"]);
   this.accountId = (int) row["FinancialAccountId"];
   this.accountNumber = (string) row["AccountNumber"];
   this.documentNumber = (string) row["DocumentNumber"];
   this.issuedBy = Contact.Parse((int) row["IssuedById"]);
   this.issuedTo = Contact.Parse((int) row["IssuedToId"]);
   this.issueDate = (DateTime) row["IssueTime"];
   this.dueDate = (DateTime) row["DueDate"];
   this.cancelationTime = (DateTime) row["CancelationTime"];
   this.notes = (string) row["Notes"];
   this.keywords = (string) row["Keywords"];
   this.currency = Currency.Parse((int) row["CurrencyId"]);
   this.amount = (decimal) row["Amount"];
   this.postedBy = Contact.Parse((int) row["PostedById"]);
   this.canceledBy = Contact.Parse((int) row["CanceledById"]);
   this.status = (TreasuryItemStatus) Convert.ToChar(row["DocumentStatus"]);
 }
Exemplo n.º 4
0
    //private CRTransaction DoCreditAccountPayment(AccountTransaction transaction, CRDocument document,
    //                                             string summary, string notes) {
    //  CRTransaction crt = new CRTransaction(CRTransactionType.Parse("Input.CreditPayment"),
    //                                        CashRegister.MyCashRegister(), transaction);

    //  crt.DueDate = document.DueDate;
    //  crt.BaseInstrumentType = document.InstrumentType;
    //  CRPosting posting = crt.CreatePosting();
    //  posting.InstrumentType = document.InstrumentType;
    //  posting.InstrumentAmount = crt.Amount;
    //  posting.InputAmount = crt.Amount;

    //  posting.Document = document;

    //  //crt.Status = TreasuryItemStatus.Closed;

    //  return crt;
    //}

    protected override void OnLoadObjectData(DataRow row) {
      this.financialProduct = FinancialProduct.Parse((int) row["FinancialProductId"]);
      this.institution = FinancialInstitution.Parse((int) row["InstitutionId"]);
      this.customer = Contact.Parse((int) row["CustomerId"]);
      this.SellerId = (int) row["SellerId"];
      this.SalesChannelId = (int) row["SalesChannelId"];
      this.AuthorizedById = (int) row["AuthorizedById"];
      this.ManagerId = (int) row["ManagerId"];
      this.ExecutiveId = (int) row["ExecutiveId"];
      this.CollectorId = (int) row["CollectorId"];
      this.ContractNumber = (string) row["ContractNumber"];
      this.ContractDate = (DateTime) row["ContractDate"];
      this.InstitutionCustomerNumber = (string) row["InstitutionCustomerNumber"];
      this.AccountNumber = (string) row["AccountNumber"];
      this.InterBankAccountNumber = (string) row["InterBankAccountNumber"];
      this.Notes = (string) row["AccountNotes"];
      this.Keywords = (string) row["Keywords"];
      this.baseCurrency = Currency.Parse((int) row["BaseCurrencyId"]);
      this.RequestedLimit = (decimal) row["RequestedLimit"];
      this.AuthorizedLimit = (decimal) row["AuthorizedLimit"];
      this.BillingCycle = (short) row["BillingCycle"];
      this.BillingMode = (string) row["BillingMode"];
      this.BillingWeekDays = (short) row["BillingWeekDays"];
      this.BillingNotes = (string) row["BillingNotes"];
      this.CollectCycle = (short) row["CollectCycle"];
      this.CollectMode = (string) row["CollectMode"];
      this.CollectWeekDays = (short) row["CollectWeekDays"];
      this.CollectNotes = (string) row["CollectNotes"];
      this.DocumentationVector = (string) row["DocumentationVector"];
      this.Score = (short) row["Score"];
      this.RequestedDate = (DateTime) row["RequestedDate"];
      this.OpeningDate = (DateTime) row["OpeningDate"];
      this.ClosingDate = (DateTime) row["ClosingDate"];
      this.PostedById = (int) row["PostedById"];
      this.ReplacedById = (int) row["ReplacedById"];
      this.Status = (string) row["FinancialAccountStatus"];
      this.StartDate = (DateTime) row["StartDate"];
      this.EndDate = (DateTime) row["EndDate"];
    }