Ejemplo n.º 1
0
        public static void Run()
        {
            var costs = new List <decimal> {
                5000, 2000, 30000, 50000, 15000
            };
            var invoice = new Invoice(costs);

            DisplayOverrideResultInfo("Original Balance Due", invoice.GetBalanceDue());

            const int twoKDiscount   = 2000;
            var       dollarDiscount = new DollarDiscount(invoice, twoKDiscount);

            DisplayOverrideResultInfo("   After 2K Discount", dollarDiscount.GetBalanceDue());

            const decimal fivePercent        = 0.05m;
            var           percentageDiscount = new PercentageDiscount(dollarDiscount, fivePercent);

            DisplayOverrideResultInfo(" After 5 Percent Off", percentageDiscount.GetBalanceDue());

            const int ninetyKCap = 90000;
            var       cap        = new Cap(percentageDiscount, ninetyKCap);

            DisplayOverrideResultInfo("       After 90K Cap", cap.GetBalanceDue());

            var overdueFee = new OverdueFee(cap);

            DisplayOverrideResultInfo("   After Overdue Fee", overdueFee.GetBalanceDue());
        }
Ejemplo n.º 2
0
 public RetentionDetails Build(RetentionInfo retentionInfo, RetentionDeductable retentionDeductable,
                               TransactionsAfterEndOfMonth transactionsAfterEndOfMonth,
                               RetentionSummary retentionSummary, ChargeCollection charges, OverdueFee overdueFee)
 {
     return(new RetentionDetails(reader.FromBigInteger("RetnID"),
                                 reader.ToNullableDate("Released"),
                                 reader.ToDate("eom"),
                                 reader.ToDecimal("nfinvs"),
                                 reader.ToDecimal("facinvs"),
                                 retentionInfo,
                                 retentionDeductable,
                                 reader.ToDecimal("nfrec"),
                                 transactionsAfterEndOfMonth,
                                 retentionSummary,
                                 charges,
                                 overdueFee,
                                 reader.ToString("status"),
                                 reader.ToSmallInteger("hold"),
                                 reader.ToSmallInteger("clientFacilityType")));
 }