public void May4to7() { var arg = SampleDir.Lease197(); var sut = new ColxnSummaryReport(4.May(2018), 6.May(2018), arg); sut.Count.Should().Be(3); sut.DateRangeText.Should().Be("May 4, 2018 to May 6, 2018"); sut.SectionTotals.Should().HaveCount(4); sut.SectionTotals.ContainsKey(DRY).Should().BeTrue(); sut.SectionTotals.ContainsKey(FRZ).Should().BeTrue(); sut.SectionTotals.ContainsKey(WET).Should().BeTrue(); sut.SectionTotals.ContainsKey(OFC).Should().BeTrue(); sut.SectionTotals[DRY].Rent.Should().Be(12721 + 9992); sut.SectionTotals[FRZ].Rent.Should().Be(0 + 0); sut.SectionTotals[WET].Rent.Should().Be(18199 + 5889); sut.SectionTotals[OFC].Rent.Should().Be(0 + 0); sut.SectionTotals[DRY].Rights.Should().Be(750 + 0); sut.SectionTotals[FRZ].Rights.Should().Be(0 + 0); sut.SectionTotals[WET].Rights.Should().Be(2508 + 5929); sut.SectionTotals[OFC].Rights.Should().Be(3000 + 0); sut.GLAccounts[CR].Should().Be("CR"); sut.GLAccounts[PRK].Should().Be("Parking"); sut.OtherTotals.Count.Should().Be(2); sut.OtherTotals[CR].Should().Be(465 + 666); sut.OtherTotals[PRK].Should().Be(549); sut.TotalCollections.Should().Be(68666); sut.TotalDeposits.Should().Be(68666); }
public void ColxnSummaryToExcel() { var arg = SampleDir.Lease197(); var bgn = 3.May(2018); var end = 12.May(2018); //if (!PopUpInput.TryGetDateRange("Dates covered by Collection Summary Report", out (DateTime Start, DateTime End) rng, bgn, end)) return; //var rep = new ColxnSummaryReport(rng.Start, rng.End, arg); var rep = new ColxnSummaryReport(bgn, end, arg); rep.ToExcel(); }
public void TestMethod00001() { var dir = SampleDir.Jul21_NoUncol(); var sut = new ColxnSummaryReport(29.June(2018), 30.June(2018), dir); var row = sut[0]; row.Date.Should().Be(29.June(2018)); var sec = row[0]; sec.Section.Name.Should().Be("DRY"); sec.Rent.Should().Be(10328); //sut.ToExcel(); }
public ColxnSummaryExcelWriter(ColxnSummaryReport colxnSummaryReport) { _xl = new CellWriter1ByRow("Collections_Summary"); _src = colxnSummaryReport; _src.RemoveZeroSections(); WriteTitles(); writeDatesColumn(); WriteBill("Rent", _ => _.Rent); WriteBill("Rights", _ => _.Rights); WriteBill("Electric", _ => _.Electric); WriteBill("Water", _ => _.Water); WriteBill("Ambulants", _ => _.Ambulant); WriteColumnsForOthers(); WriteTotalColumn("Total Collections", _ => _.CollectionsSum, _ => _.TotalCollections); WriteTotalColumn("Total Deposits", _ => _.DepositsSum, _ => _.TotalDeposits); SetRowHeights(); }
public static void ToExcel(this ColxnSummaryReport colxnSummaryReport) { var writr = new ColxnSummaryExcelWriter(colxnSummaryReport); writr.LaunchExcel(); }