1
0
mirror of synced 2024-11-29 16:56:07 +03:00
bitrix-module/intaro.retailcrm/lib/service/currencyservice.php

23 lines
495 B
PHP
Raw Normal View History

<?php
namespace Intaro\RetailCrm\Service;
class CurrencyService
{
public static function validateCurrency($cmsCurrency, $crmCurrency): string
{
$errorCode = '';
if ($cmsCurrency === null) {
$errorCode = 'ERR_CMS_CURRENCY';
} elseif ($crmCurrency === null) {
$errorCode = 'ERR_CRM_CURRENCY';
} elseif ($cmsCurrency !== $crmCurrency) {
$errorCode = 'ERR_CURRENCY_SITES';
}
return $errorCode;
}
}