app/controllers/extface/devices_controller.rb in extface-0.1.7 vs app/controllers/extface/devices_controller.rb in extface-0.1.8

- old
+ new

@@ -52,9 +52,23 @@ def test_page set_device @job = @device.driver.print_test_page if params[:test_page] render action: :show end + + def fiscal + set_device + if @device.fiscal? + @job = case + when params[:non_fiscal_test].present? then @device.driver.non_fiscal_test + when params[:fiscal_test].present? then @device.driver.fiscal_test + when params[:x_report].present? then @device.driver.x_report_session + when params[:z_report].present? then @device.driver.z_report_session + when params[:cancel_fiscal_doc].present? then @device.driver.cancel_doc_session + end + end + render action: :show + end private # Use callbacks to share common setup or constraints between actions. def set_device @device = extfaceable.extface_devices.find(params[:id])