app/models/extface/device.rb in extface-0.3.0 vs app/models/extface/device.rb in extface-0.4.0

- old
+ new

@@ -52,7 +52,20 @@ ActiveRecord::Base.connection.close end end job end + + #initial billing module fiscalization support + def fiscalize(billing_account, detailed = false) + if billing_account.instance_of?(Billing::Account) && billing_account.valid? + driver.sale_and_pay_items_session( + [].tap() do |payments| + billing_account.payments.each do |payment| + payments << Extface::Driver::Base::Fiscal::SaleItem.new(price: payment.value.to_f, text1: payment.description) + end + end + ) + end + end end end