mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-17 16:42:48 +01:00
Fix for gateway type in buy now buttons
This commit is contained in:
parent
531b707945
commit
f739976de2
@ -641,11 +641,18 @@ class AccountController extends BaseController
|
||||
);
|
||||
}
|
||||
|
||||
$types = [GATEWAY_TYPE_CREDIT_CARD, GATEWAY_TYPE_BANK_TRANSFER, GATEWAY_TYPE_PAYPAL, GATEWAY_TYPE_BITCOIN, GATEWAY_TYPE_DWOLLA];
|
||||
$types = [
|
||||
GATEWAY_TYPE_CREDIT_CARD,
|
||||
GATEWAY_TYPE_BANK_TRANSFER,
|
||||
GATEWAY_TYPE_PAYPAL,
|
||||
GATEWAY_TYPE_BITCOIN,
|
||||
GATEWAY_TYPE_DWOLLA
|
||||
];
|
||||
$options = [];
|
||||
foreach ($types as $type) {
|
||||
if ($account->getGatewayByType($type)) {
|
||||
$options[$type] = trans("texts.{$type}");
|
||||
$alias = GatewayType::getAliasFromId($type);
|
||||
$options[$alias] = trans("texts.{$alias}");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -725,7 +725,7 @@ class Utils
|
||||
} elseif ($model->first_name || $model->last_name) {
|
||||
return $model->first_name.' '.$model->last_name;
|
||||
} else {
|
||||
return $model->email;
|
||||
return $model->email ?: '';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ class AddSourceCurrencyToExpenses extends Migration
|
||||
$table->renameColumn('currency_id', 'invoice_currency_id');
|
||||
}
|
||||
|
||||
$table->unsignedInteger('expense_currency_id');
|
||||
$table->unsignedInteger('expense_currency_id')->nullable();
|
||||
});
|
||||
|
||||
Schema::table('expenses', function (Blueprint $table) {
|
||||
|
Loading…
Reference in New Issue
Block a user