- Old Fashion Baptist Church Contribution Report {{taxYear}}
+ Old Fashion Baptist Church Contribution Report {{taxYear}} {{index}}
{{contributorName}}
@@ -85,4 +87,5 @@
{{t.amount | currency}} |
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/Client/src/app/components/contributor-yearly-report/contributor-yearly-report.component.ts b/Client/src/app/components/contributor-yearly-report/contributor-yearly-report.component.ts
index 60f84f5..1b5229f 100644
--- a/Client/src/app/components/contributor-yearly-report/contributor-yearly-report.component.ts
+++ b/Client/src/app/components/contributor-yearly-report/contributor-yearly-report.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, Input } from '@angular/core';
import { PrintService } from '../../services/print-service';
import { Transaction } from '../add-transaction-page/transaction';
@@ -9,6 +9,7 @@ import { Transaction } from '../add-transaction-page/transaction';
})
export class ContributorYearlyReportComponent implements OnInit {
+ @Input() index: number;
public transactions: Transaction[] = [];
public contributorName: string = 'Bob and Jill Handerson';
public contributorStreet: string = '7878 Washington St';
@@ -18,6 +19,14 @@ export class ContributorYearlyReportComponent implements OnInit {
public taxYear: number = 2019;
public registrationCode: string = 'HDIJDHDFD*#*@';
+ public rowsPerPage: number = 32;
+ public get pages(): number {
+ return Math.ceil(this.transactions.length / this.rowsPerPage) + 2;
+ }
+ public get pagesOdd(): boolean {
+ return !(this.pages % 2 == 0)
+ }
+
constructor(public printService: PrintService) { }
ngOnInit() {
@@ -31,7 +40,7 @@ export class ContributorYearlyReportComponent implements OnInit {
t.goodsOrServices = false;
t.taxYear = 2019;
t.typeId = 1;
- for(let i = 0; i < 100; i++) {
+ for(let i = 0; i < 90; i++) {
const t2 = new Transaction();
t2.amount = 300;
t2.checkNumber = 'ghff';
@@ -45,8 +54,6 @@ export class ContributorYearlyReportComponent implements OnInit {
this.transactions.push(t2);
}
this.transactions.push(t);
- this.printService.setPrinting(true);
- window.print();
}
public totalGeneral() {