public CollectorPerfSubRow(IntendedColxnDTO colxn, SectionDTO sectionDTO)
 {
     _colxn  = colxn;
     Section = sectionDTO;
     Rent    = CreateRentCell(colxn);
     Rights  = CreateRightsCell(colxn);
 }
 private BillPayment ToPayment(IntendedColxnDTO colxn, ICollectionsDB db) => new BillPayment
 {
     Amount    = colxn.Actuals.For(this.BillCode).Value,
     PRNumber  = colxn.PRNumber,
     Remarks   = colxn.Remarks,
     Collector = db.GetCollector(colxn.Lease),
 };
        private CollectorPerfCell CreateRentCell(IntendedColxnDTO colxn)
        {
            var billCode = BillCode.Rent;
            var actual   = colxn.Actuals.For(billCode) ?? 0;
            var target   = colxn.Targets.For(billCode) ?? 0;

            return(new CollectorPerfCell(actual, target, billCode));
        }
        private CollectorPerfCell CreateRightsCell(IntendedColxnDTO colxn)
        {
            var billCode  = BillCode.Rights;
            var actual    = colxn.Actuals.For(billCode) ?? 0;
            var rightsBal = colxn.Targets.For(billCode);
            var target    = GetRightsTarget(rightsBal, colxn.Timestamp, colxn.Lease);

            return(new CollectorPerfCell(actual, target, billCode));
        }
        private bool IsValidValue(IntendedColxnDTO colxn)
        {
            var val = colxn.Actuals.For(this.BillCode);

            if (!val.HasValue)
            {
                return(false);
            }
            return(val.Value != 0M);
        }
Exemple #6
0
 public LeaseColxnRow(IntendedColxnDTO dto)
 {
     IntendedDTO = dto;
     Lease       = dto.Lease;
     DocumentRef = dto.PRNumber.ToString();
     Rent        = dto.Actuals.Rent;
     Rights      = dto.Actuals.Rights;
     Electric    = dto.Actuals.Electric;
     Water       = dto.Actuals.Water;
     Remarks     = dto.Remarks;
 }
Exemple #7
0
        internal void EditIntendedColxn(IntendedColxnDTO dto)
        {
            if (!Main.CanEncode)
            {
                return;
            }
            var repo = Main.ColxnsDB.IntendedColxns[Section.Id];
            var vm   = new IntendedColxnCrudVM(0, dto, repo, Main.AppArgs);

            vm.EditCurrentRecord(dto);
        }