This will make triggers check existing fields first.

This commit is contained in:
James Cole
2016-03-12 07:02:39 +01:00
parent 59cdfa6fe6
commit d054e085d6
13 changed files with 21 additions and 22 deletions

View File

@@ -54,7 +54,7 @@ final class AmountExactly extends AbstractTrigger implements TriggerInterface
*/
public function triggered(TransactionJournal $journal)
{
$amount = TransactionJournal::amountPositive($journal);
$amount = $journal->destination_amount ?? TransactionJournal::amountPositive($journal);
$compare = $this->triggerValue;
$result = bccomp($amount, $compare, 4);
if ($result === 0) {