]> nos-oignons.net Git - gestion-adh.git/blob - bin/create-membership-fee-receipt
2fa9340fb8bcddbff7605054ce62cb1a98c5d5cb
[gestion-adh.git] / bin / create-membership-fee-receipt
1 #!/usr/bin/ruby1.9.1
2 #-*- coding: utf-8 -*-
3
4 require 'rubygems'
5 require 'bundler'
6 Bundler.setup
7
8 require 'nos_oignons'
9
10 begin
11   member_id = ARGV[0]
12   amount = ARGV[1]
13   unless member_id && amount
14     $stderr.puts "Usage: #{$PROGRAM_NAME} 000042 10,00"
15     exit 1
16   end
17   NosOignons.create_membership_fee_receipt!(member_id, amount)
18 rescue ArgumentError => ex
19   $stderr.puts "E: #{ex}"
20   exit 1
21 end