Participant mangement
This commit is contained in:
15
app/Providers/MissingPaymentProvider.php
Normal file
15
app/Providers/MissingPaymentProvider.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\ValueObjects\Amount;
|
||||
|
||||
class MissingPaymentProvider {
|
||||
public static function calculateMissingPayment(Amount $amountPaid, Amount $amountToPay) : Amount {
|
||||
$workingAmount = clone($amountToPay);
|
||||
|
||||
|
||||
$workingAmount->subtractAmount($amountPaid);
|
||||
return $workingAmount;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user