private AdvanceIncomeCashDistributionDocument CreateAdvanceIncomeCashDistributionDocument(AdvanceReport advanceReport,
                                                                                           Income income, OrganisationCashMovementOperation operation)
 {
     return(new AdvanceIncomeCashDistributionDocument
     {
         AdvanceReport = advanceReport,
         Income = income,
         Author = advanceReport.Casher,
         CreationDate = DateTime.Now,
         Organisation = advanceReport.Organisation,
         LastEditor = advanceReport.Casher,
         LastEditedTime = DateTime.Now,
         OrganisationCashMovementOperation = operation,
         Amount = operation.Amount
     });
 }
예제 #2
0
        private void DistributeIncomeCashRemainingAmount(IUnitOfWork uow, RouteList routeList, Income income, decimal amount)
        {
            var operation = new OrganisationCashMovementOperation
            {
                OperationTime = DateTime.Now,
                Organisation  = cashDistributionCommonOrganisationProvider.GetCommonOrganisation(uow),
                Amount        = amount
            };

            var address  = routeList.Addresses.First(x => x.TotalCash > 0);
            var document = CreateRouteListItemCashDistributionDocument(operation, address, income);

            Save(uow, operation, document);
        }
예제 #3
0
 private void UpdateOrganisationCashMovementOperation(OrganisationCashMovementOperation operation, Income income)
 {
     operation.Amount        = income.Money;
     operation.OperationTime = DateTime.Now;
 }
예제 #4
0
 private void UpdateIncomeCashDistributionDocument(IncomeCashDistributionDocument doc, Income income, Employee editor)
 {
     doc.LastEditor     = editor;
     doc.LastEditedTime = DateTime.Now;
     doc.Amount         = income.Money;
 }
예제 #5
0
 private OrganisationCashMovementOperation CreateOrganisationCashMovementOperation(Income income, Organization org)
 {
     return(new OrganisationCashMovementOperation
     {
         Organisation = org,
         OperationTime = DateTime.Now,
         Amount = income.Money
     });
 }
예제 #6
0
 public void UpdateRecords(IUnitOfWork uow, IncomeCashDistributionDocument document, Income income, Employee editor)
 {
     UpdateIncomeCashDistributionDocument(document, income, editor);
     UpdateOrganisationCashMovementOperation(document.OrganisationCashMovementOperation, income);
     Save(document.OrganisationCashMovementOperation, document, uow);
 }
예제 #7
0
 public AdvanceClosing(Expense advanceExpense, Income income, decimal sum)
 {
     this.advanceExpense = advanceExpense;
     this.income         = income;
     this.money          = sum;
 }