1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

fix using 0 in add_vat_rate task

This commit is contained in:
Sylvain 2019-03-27 12:58:08 +01:00
parent 528f5b9a00
commit af9ab6d5b5

View File

@ -35,7 +35,7 @@ namespace :fablab do
task :add_vat_rate, %i[rate date] => :environment do |_task, args|
raise 'Missing argument. Usage exemple: rake fablab:setup:add_vat_rate[20,2014-01-01]. Use 0 to disable' unless args.rate && args.date
if args.rate.zero?
if args.rate == '0'
setting = Setting.find_by(name: 'invoice_VAT-active')
HistoryValue.create!(
setting_id: setting.id,