Fixed spelling
All checks were successful
continuous-integration/drone/pr Build is passing

ref #193
This commit is contained in:
2021-04-14 18:54:02 +02:00
parent 8ae4b85827
commit da266a8dd6
13 changed files with 38 additions and 37 deletions

View File

@@ -42,10 +42,10 @@ export class ResponseDonation implements IResponse {
amount: number;
/**
* The donation's payed amount in the smalles unit of your currency (default: euro cent).
* The donation's paid amount in the smalles unit of your currency (default: euro cent).
*/
@IsInt()
payedAmount: number;
paidAmount: number;
/**
* Creates a ResponseDonation object from a scan.
@@ -55,12 +55,12 @@ export class ResponseDonation implements IResponse {
this.id = donation.id;
this.donor = donation.donor.toResponse();
this.amount = donation.amount;
this.payedAmount = donation.payedAmount || 0;
if (this.payedAmount < this.amount) {
this.paidAmount = donation.paidAmount || 0;
if (this.paidAmount < this.amount) {
this.status = DonationStatus.OPEN;
}
else {
this.status = DonationStatus.PAYED;
this.status = DonationStatus.PAID;
}
}
}