At least one payment should enable #6370

This commit is contained in:
sanjeev 2022-08-10 10:50:28 +05:30
parent 829549e3c9
commit 0f8c39a079
19 changed files with 34 additions and 0 deletions

View File

@ -116,6 +116,21 @@ class ConfigurationController extends Controller
if (! $atLeastOneCarrierEnabled) {
session()->flash('error', trans('admin::app.configuration.enable-atleast-one-shipping'));
return redirect()->back();
}
} elseif (isset($data['sales']['paymentmethods'])) {
$atLeastOnePaymentMethodEnabled = false;
foreach ($data['sales']['paymentmethods'] as $paymentMethod) {
if ($paymentMethod['active']) {
$atLeastOnePaymentMethodEnabled = true;
break;
}
}
if (! $atLeastOnePaymentMethodEnabled) {
session()->flash('error', trans('admin::app.configuration.enable-atleast-one-payment'));
return redirect()->back();
}
}

View File

@ -741,6 +741,7 @@ return [
'no' => 'لا.',
'delete' => 'احذف',
'enable-atleast-one-shipping' => 'تفعيل طريقة شحن واحدة على الأقل.',
'enable-atleast-one-payment' => 'تفعيل طريقة دفع واحدة على الأقل.',
'tax-categories' => [
'title' => 'فئات الضرائب',

View File

@ -747,6 +747,7 @@ return [
'no' => 'No',
'delete' => 'Delete',
'enable-atleast-one-shipping' => 'Enable atleast one shipping method.',
'enable-atleast-one-payment' => 'Enable atleast one payment method.',
'tax-categories' => [
'title' => 'Tax Categories',

View File

@ -733,6 +733,8 @@ return [
'no' => 'Nein',
'delete' => 'Löschen',
'enable-atleast-one-shipping' => 'Aktivieren Sie mindestens eine Versandart.',
'enable-atleast-one-payment' => 'Aktivieren Sie mindestens eine Zahlungsmethode.',
'tax-categories' =>
[
'title' => 'Steuerkategorien',

View File

@ -747,6 +747,7 @@ return [
'no' => 'No',
'delete' => 'Delete',
'enable-atleast-one-shipping' => 'Enable atleast one shipping method.',
'enable-atleast-one-payment' => 'Enable atleast one payment method.',
'tax-categories' => [
'title' => 'Tax Categories',

View File

@ -743,6 +743,7 @@ return [
'no' => 'No',
'delete' => 'Borrar',
'enable-atleast-one-shipping' => 'Habilite al menos un método de envío.',
'enable-atleast-one-payment' => 'Habilite al menos un método de pago.',
'tax-categories' => [
'title' => 'Categorías de impuestos',

View File

@ -726,6 +726,7 @@ return [
'no' => 'خیر',
'delete' => 'حذف',
'enable-atleast-one-shipping' => 'حداقل یک روش حمل و نقل را فعال کنید.',
'enable-atleast-one-payment' => 'حداقل یک روش پرداخت را فعال کنید.',
'tax-categories' => [
'title' => 'دسته بندی های مالیات',

View File

@ -746,6 +746,7 @@ return [
'no' => 'Non',
'delete' => 'Effacer',
'enable-atleast-one-shipping' => 'Activez au moins une méthode d\'expédition.',
'enable-atleast-one-payment' => 'Activez au moins un mode de paiement.',
'tax-categories' => [
'title' => 'Catégories de taxes',

View File

@ -747,6 +747,7 @@ return [
'no' => 'No',
'delete' => 'Delete',
'enable-atleast-one-shipping' => 'Enable atleast one shipping method.',
'enable-atleast-one-payment' => 'Enable atleast one payment method.',
'tax-categories' => [
'title' => 'Tax Categories',

View File

@ -744,6 +744,7 @@ return [
'no' => 'नहीं',
'delete' => 'हटाएं',
'enable-atleast-one-shipping' => 'कम से कम एक शिपिंग विधि सक्षम करें।',
'enable-atleast-one-payment' => 'कम से कम एक भुगतान विधि सक्षम करें।',
'tax-categories' => [
'title' => 'कर श्रेणियाँ',

View File

@ -731,6 +731,7 @@ return [
'no' => 'No',
'delete' => 'Elimina',
'enable-atleast-one-shipping' => 'Abilita almeno un metodo di spedizione.',
'enable-atleast-one-payment' => 'Abilita almeno un metodo di pagamento.',
'tax-categories' => [
'title' => 'Categorie IVA',

View File

@ -747,6 +747,7 @@ return [
'no' => 'No',
'delete' => 'Delete',
'enable-atleast-one-shipping' => 'Enable atleast one shipping method.',
'enable-atleast-one-payment' => 'Enable atleast one payment method.',
'tax-categories' => [
'title' => 'Tax Categories',

View File

@ -725,6 +725,7 @@ return [
'no' => 'Nee',
'delete' => 'Verwijder',
'enable-atleast-one-shipping' => 'Schakel ten minste één verzendmethode in.',
'enable-atleast-one-payment' => 'Schakel ten minste één betaalmethode in.',
'tax-categories' => [
'title' => 'BTW categorieën',

View File

@ -726,6 +726,7 @@ return [
'no' => 'Nie',
'delete' => 'Usuń',
'enable-atleast-one-shipping' => 'Włącz co najmniej jedną metodę wysyłki.',
'enable-atleast-one-payment' => 'Włącz co najmniej jedną formę płatności.',
'tax-categories' => [
'title' => 'Kategorie podatkowe',

View File

@ -724,6 +724,7 @@ return [
'no' => 'Não',
'delete' => 'Deletar',
'enable-atleast-one-shipping' => 'Enable atleast one shipping method.',
'enable-atleast-one-payment' => 'Enable atleast one payment method.',
'tax-categories' => [
'title' => 'Categorias de Imposto',

View File

@ -747,6 +747,7 @@ return [
'no' => 'No',
'delete' => 'Delete',
'enable-atleast-one-shipping' => 'Включите хотя бы один способ доставки.',
'enable-atleast-one-payment' => 'Включите хотя бы один способ оплаты.',
'tax-categories' => [
'title' => 'Tax Categories',

View File

@ -747,6 +747,7 @@ return [
'no' => 'No',
'delete' => 'Delete',
'enable-atleast-one-shipping' => 'Enable atleast one shipping method.',
'enable-atleast-one-payment' => 'Enable atleast one payment method.',
'tax-categories' => [
'title' => 'Tax Categories',

View File

@ -731,6 +731,7 @@ return [
'no' => 'Hayır',
'delete' => 'Sil',
'enable-atleast-one-shipping' => 'En az bir gönderim yöntemini etkinleştirin.',
'enable-atleast-one-payment' => 'En az bir ödeme yöntemini etkinleştirin.',
'tax-categories' => [
'title' => 'Vergi Kategorileri',

View File

@ -726,6 +726,7 @@ return [
'no' => 'No',
'delete' => '删除',
'enable-atleast-one-shipping' => '啟用至少一種運輸方式',
'enable-atleast-one-payment' => '啟用至少一種付款方式。',
'tax-categories' => [
'title' => '税分类',