1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Minor Fixes

This commit is contained in:
David Bomba 2021-11-06 16:05:56 +11:00
parent e2a6cd65cc
commit ecdd73fbcc
2 changed files with 6 additions and 1 deletions

View File

@ -65,6 +65,8 @@ class ContactRegisterController extends Controller
$client_contact->client_id = $client->id; $client_contact->client_id = $client->id;
$client_contact->is_primary = true; $client_contact->is_primary = true;
if(array_key_exists('password', $data))
$client_contact->password = Hash::make($data['password']); $client_contact->password = Hash::make($data['password']);
$client_contact->save(); $client_contact->save();

View File

@ -386,6 +386,9 @@ class BaseDriver extends AbstractPaymentDriver
} else } else
$error = $e->getMessage(); $error = $e->getMessage();
if(!$this->payment_hash)
throw new PaymentFailed($error, $e->getCode());
$amount = array_sum(array_column($this->payment_hash->invoices(), 'amount')) + $this->payment_hash->fee_total; $amount = array_sum(array_column($this->payment_hash->invoices(), 'amount')) + $this->payment_hash->fee_total;
$this->sendFailureMail($error); $this->sendFailureMail($error);