mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Update Error Message to know for which user the creation failed.
This commit is contained in:
parent
ab3e09dd0e
commit
fd8006ad2b
@ -172,11 +172,13 @@ class TransactionCreation extends TransactionBase {
|
||||
]);
|
||||
|
||||
$newSum2 = $this->getAmount();
|
||||
$receiverEmail = '';
|
||||
foreach($existingCreations2 as $creation) {
|
||||
$keyHex = bin2hex(stream_get_contents($creation->state_user->public_key));
|
||||
//echo "\ncompare \n$keyHex\nwith: \n". $this->receiver_pubkey_hex."\n";
|
||||
if($keyHex == $this->receiver_pubkey_hex) {
|
||||
$newSum2 += $creation->amount;
|
||||
$receiverEmail = $creation->state_user->email;
|
||||
}
|
||||
//$newSum2 += $creation->amount;
|
||||
}
|
||||
@ -188,7 +190,10 @@ class TransactionCreation extends TransactionBase {
|
||||
}
|
||||
} else {*/
|
||||
if($newSum2 > 10000000) {
|
||||
$this->addError('TransactionCreation::validate', 'Creation more than 1.000 GDD per Month in target_date not allowed');
|
||||
$this->addError(
|
||||
'TransactionCreation::validate',
|
||||
'Creation more than 1.000 GDD per Month for '. $receiverEmail .' in target_date not allowed'
|
||||
);
|
||||
return false;
|
||||
//}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user