Donation payment management feature/193-donation_payments #194

Merged
niggl merged 14 commits from feature/193-donation_payments into dev 2021-04-14 16:56:24 +00:00
3 changed files with 8 additions and 0 deletions
Showing only changes of commit 71542bc388 - Show all commits

View File

@ -33,6 +33,7 @@ export class CreateDistanceDonation extends CreateDonation {
let newDonation = new DistanceDonation;
newDonation.amountPerDistance = this.amountPerDistance;
newDonation.payedAmount = this.payedAmount;
newDonation.donor = await this.getDonor();
newDonation.runner = await this.getRunner();

View File

@ -16,6 +16,12 @@ export abstract class CreateDonation {
@IsPositive()
donor: number;
/**
* The donation's payed amount in the smalles unit of your currency (default: euro cent).
*/
@IsInt()
payedAmount: number;
/**
* Creates a new Donation entity from this.
*/

View File

@ -21,6 +21,7 @@ export class CreateFixedDonation extends CreateDonation {
let newDonation = new FixedDonation;
newDonation.amount = this.amount;
newDonation.payedAmount = this.payedAmount;
newDonation.donor = await this.getDonor();
return newDonation;