Class: BrDanfe::DanfeLib::NfeLib::Xprod
- Inherits:
-
Object
- Object
- BrDanfe::DanfeLib::NfeLib::Xprod
- Defined in:
- lib/br_danfe/danfe_lib/nfe_lib/xprod.rb
Instance Method Summary collapse
-
#initialize(det) ⇒ Xprod
constructor
A new instance of Xprod.
- #render ⇒ Object
Constructor Details
#initialize(det) ⇒ Xprod
Returns a new instance of Xprod.
5 6 7 |
# File 'lib/br_danfe/danfe_lib/nfe_lib/xprod.rb', line 5 def initialize(det) @det = det end |
Instance Method Details
#render ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/br_danfe/danfe_lib/nfe_lib/xprod.rb', line 9 def render xprod = @det.css('prod/xProd').text.to_s xprod += infAdProd if infAdProd? xprod += fci if fci? xprod += icms_st if icms_st? xprod += fcp if fcp? xprod += fcp_st if fcp_st? xprod += add_icms_st_ret_to_product xprod end |