From 1e9f4fd8408a147743acf573ddcc90c2c9c367c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D0=B5=D0=BC?= Date: Tue, 22 Nov 2022 12:13:48 +0400 Subject: [PATCH] TD-435 -Fix: add allow to merge provider and terminal terms (#25) --- apps/party_management/src/pm_provider.erl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/party_management/src/pm_provider.erl b/apps/party_management/src/pm_provider.erl index 785f7f7..bd03ccf 100644 --- a/apps/party_management/src/pm_provider.erl +++ b/apps/party_management/src/pm_provider.erl @@ -187,6 +187,7 @@ merge_provision_term_sets(ProviderTerms, TerminalTerms) -> merge_payment_terms( #domain_PaymentsProvisionTerms{ + allow = PAllow, currencies = PCurrencies, categories = PCategories, payment_methods = PPaymentMethods, @@ -199,6 +200,7 @@ merge_payment_terms( turnover_limits = PTurnoverLimits }, #domain_PaymentsProvisionTerms{ + allow = TAllow, currencies = TCurrencies, categories = TCategories, payment_methods = TPaymentMethods, @@ -212,6 +214,7 @@ merge_payment_terms( } ) -> #domain_PaymentsProvisionTerms{ + allow = pm_utils:select_defined(TAllow, PAllow), currencies = pm_utils:select_defined(TCurrencies, PCurrencies), categories = pm_utils:select_defined(TCategories, PCategories), payment_methods = pm_utils:select_defined(TPaymentMethods, PPaymentMethods), @@ -245,6 +248,7 @@ merge_wallet_terms(ProviderTerms, TerminalTerms) -> merge_withdrawal_terms( #domain_WithdrawalProvisionTerms{ + allow = PAllow, currencies = PCurrencies, payout_methods = PMethods, cash_limit = PLimit, @@ -252,6 +256,7 @@ merge_withdrawal_terms( turnover_limit = PTurnoverLimit }, #domain_WithdrawalProvisionTerms{ + allow = TAllow, currencies = TCurrencies, payout_methods = TMethods, cash_limit = TLimit, @@ -260,6 +265,7 @@ merge_withdrawal_terms( } ) -> #domain_WithdrawalProvisionTerms{ + allow = pm_utils:select_defined(TAllow, PAllow), currencies = pm_utils:select_defined(TCurrencies, PCurrencies), payout_methods = pm_utils:select_defined(TMethods, PMethods), cash_limit = pm_utils:select_defined(TLimit, PLimit),