mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-17 18:54:38 -04:00
Set default payment notifications for new companies
This commit is contained in:
parent
9bbeddb913
commit
dba0bab91e
@ -878,7 +878,7 @@ class CompanySettings extends BaseSettings
|
|||||||
{
|
{
|
||||||
$notification = new stdClass();
|
$notification = new stdClass();
|
||||||
$notification->email = [];
|
$notification->email = [];
|
||||||
$notification->email = ['invoice_sent_all'];
|
$notification->email = ['invoice_sent_all','payment_success_all','payment_manual_all'];
|
||||||
|
|
||||||
return $notification;
|
return $notification;
|
||||||
}
|
}
|
||||||
|
@ -112,8 +112,8 @@ class TransactionTransformer implements BankRevenueInterface
|
|||||||
// enrich description with currencyExchange informations
|
// enrich description with currencyExchange informations
|
||||||
if (array_key_exists('currencyExchange', $transaction)) {
|
if (array_key_exists('currencyExchange', $transaction)) {
|
||||||
foreach ($transaction["currencyExchange"] as $exchangeRate) {
|
foreach ($transaction["currencyExchange"] as $exchangeRate) {
|
||||||
$targetAmount = round($amount * (float) $exchangeRate["exchangeRate"], 2);
|
$targetAmount = round($amount * (float) ($exchangeRate["exchangeRate"] ?? 1) , 2);
|
||||||
$description .= '\nexchangeRate: ' . $amount . " " . $exchangeRate["sourceCurrency"] . " = " . $targetAmount . " " . $exchangeRate["targetCurrency"] . " (" . $exchangeRate["quotationDate"] . ")";
|
$description .= '\nexchangeRate: ' . $amount . " " . ($exchangeRate["sourceCurrency"] ?? '?') . " = " . $targetAmount . " " . ($exchangeRate["targetCurrency"] ?? '?') . " (" . ($exchangeRate["quotationDate"] ?? '?') . ")";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user