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:
parent
528f5b9a00
commit
af9ab6d5b5
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user