Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="batchId"></param>
        /// <param name="TypeOfBatchId"></param>
        /// <returns></returns>
        private string GetBatchAmount(int?batchId, TypeOfBatch TypeOfBatchId)
        {
            string batchAmount = string.Empty;

            if (TypeOfBatchId == TypeOfBatch.GeneralJournal || TypeOfBatchId == TypeOfBatch.CashJournal || TypeOfBatchId == TypeOfBatch.RecurringJournal || TypeOfBatchId == TypeOfBatch.ReversingJournal)
            {
                var sumOfControlTotal = (from journal in _journalEntryDocumentUnitRepository.GetAll()
                                         where journal.BatchId == batchId
                                         group journal.ControlTotal by journal.BatchId into g
                                         select new { ControlTotal = g.Sum() }).FirstOrDefault();

                batchAmount = sumOfControlTotal != null?sumOfControlTotal.ControlTotal.ToString() : "";
            }
            else if (TypeOfBatchId == TypeOfBatch.AccountsPayable)
            {
            }
            else if (TypeOfBatchId == TypeOfBatch.AccountsReceivable)
            {
            }
            else if (TypeOfBatchId == TypeOfBatch.Payroll)
            {
            }
            else if (TypeOfBatchId == TypeOfBatch.PettyCash)
            {
            }
            else if (TypeOfBatchId == TypeOfBatch.CreditCard)
            {
            }


            return(batchAmount);
        }
Ejemplo n.º 2
0
 public BatchUnit(string description, TypeOfBatch typeofbatchid, DateTime?defaulttransactiondate, DateTime?defaultcheckdate, DateTime?postingdate,
                  decimal?controltotal, int?recurmonthincrement, bool isretained, bool isdefault, bool isactive, TypeOfInactiveStatus?typeofinactivestatusid,
                  bool?isbatchfinalized, bool?isuniversal, long?organizationunitid)
 {
     Description            = description;
     TypeOfBatchId          = typeofbatchid;
     DefaultTransactionDate = defaulttransactiondate;
     PostingDate            = postingdate;
     ControlTotal           = controltotal;
     RecurMonthIncrement    = recurmonthincrement;
     IsRetained             = isretained;
     IsDefault = isdefault;
     IsActive  = isactive;
     TypeOfInactiveStatusId = typeofinactivestatusid;
     IsBatchFinalized       = isbatchfinalized;
     IsUniversal            = isuniversal;
     OrganizationUnitId     = organizationunitid;
 }