diff --git a/src/Validate/Common/BaseCurrency.php b/src/Validate/Common/BaseCurrency.php index f9f1ccc..a5e4c46 100644 --- a/src/Validate/Common/BaseCurrency.php +++ b/src/Validate/Common/BaseCurrency.php @@ -45,7 +45,8 @@ private function validateNode(NodeInterface $node, Asserts $asserts, string $loc { $currencyExists = $node->attributes()->exists('Moneda'); $currency = $node['Moneda']; - $currencyExplanation = $currencyExists ? $currency ?: '(vacía)' : '(ninguna)'; + $currencyExplanation = $currencyExists ? ($currency ?: '(vacía)') : '(ninguna)'; + $asserts->put( $this->getAssertCode(sprintf('-%03d', $count)), 'La moneda solo se especifica en caso de que sea diferente a moneda nacional', diff --git a/src/Validate/Common/BaseExchangeRate.php b/src/Validate/Common/BaseExchangeRate.php index 7a07531..bd64a63 100644 --- a/src/Validate/Common/BaseExchangeRate.php +++ b/src/Validate/Common/BaseExchangeRate.php @@ -45,7 +45,7 @@ private function validateNode(NodeInterface $node, Asserts $asserts, string $loc { $currencyExists = $node->attributes()->exists('Moneda'); $currency = $node['Moneda']; - $currencyExplanation = $currencyExists ? $currency ?: '(vacía)' : '(ninguna)'; + $currencyExplanation = $currencyExists ? ($currency ?: '(vacía)') : '(ninguna)'; $exchangeRate = $node['TipCamb']; $asserts->put(