Skip to content

Commit

Permalink
Validate own iva condition in assignement.
Browse files Browse the repository at this point in the history
  • Loading branch information
leanucci committed Dec 1, 2013
1 parent 6a9e075 commit 399844a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/bravo.rb
@@ -1,3 +1,4 @@
# encoding: utf-8
require 'bundler/setup'
require 'bravo/version'
require 'bravo/constants'
Expand Down Expand Up @@ -66,5 +67,13 @@ def logger
def logger_options
logger.logger_options
end

def own_iva_cond=(iva_cond_symbol)
if Bravo::BILL_TYPE.has_key?(iva_cond_symbol)
@own_iva_cond = iva_cond_symbol
else
raise(NullOrInvalidAttribute.new, "El valor de own_iva_cond: (#{ iva_cond_symbol }) es inválido.")
end
end
end
end

0 comments on commit 399844a

Please sign in to comment.