adherent 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/adherent/payments_controller.rb +11 -1
  3. data/app/helpers/adherent/payments_helper.rb +6 -0
  4. data/app/models/adherent/member.rb +1 -1
  5. data/app/models/adherent/payment.rb +17 -0
  6. data/app/models/organism.rb +23 -0
  7. data/app/views/adherent/adhesions/index.html.haml +1 -1
  8. data/app/views/adherent/members/index.html.erb +1 -1
  9. data/app/views/adherent/payments/_form.html.haml +6 -1
  10. data/config/initializers/date_picker_input.rb +2 -0
  11. data/config/locales/fr.yml +8 -1
  12. data/lib/adherent/version.rb +1 -1
  13. data/test/dummy/log/development.log +14214 -0
  14. data/test/dummy/log/test.log +24814 -0
  15. data/test/dummy/tmp/cache/assets/BF0/070/sprockets%2F42b486109907c85c344e3428f5615140 +0 -0
  16. data/test/dummy/tmp/cache/assets/C2B/490/sprockets%2F46e7924df895c131922f22402697f351 +0 -0
  17. data/test/dummy/tmp/cache/assets/C2F/180/sprockets%2F24383c007af706866f9a978498308d01 +0 -0
  18. data/test/dummy/tmp/cache/assets/C44/670/sprockets%2Fe128312dd259094d00196a3f02f41819 +0 -0
  19. data/test/dummy/tmp/cache/assets/C4D/C10/sprockets%2Fe52bf847776498593423b635698c989c +0 -0
  20. data/test/dummy/tmp/cache/assets/C53/BA0/sprockets%2F0701319e027b68d87b4d5727aa571973 +0 -0
  21. data/test/dummy/tmp/cache/assets/C57/620/sprockets%2F2877a45752c743fb6a14265636526b6e +0 -0
  22. data/test/dummy/tmp/cache/assets/C79/880/sprockets%2Ff38b23204619e9338a1a5904b4f36d41 +0 -0
  23. data/test/dummy/tmp/cache/assets/C8B/B50/sprockets%2F1bf0946089435ce76a87bd41668373c2 +0 -0
  24. data/test/dummy/tmp/cache/assets/C8C/C00/sprockets%2F25d88d6c610820a36668853eea17e359 +0 -0
  25. data/test/dummy/tmp/cache/assets/C91/5E0/sprockets%2F28a1436ca683918e98c79266d19d430e +0 -0
  26. data/test/dummy/tmp/cache/assets/CA4/6A0/sprockets%2F49b5803aaa253c1ffa5214311973e684 +0 -0
  27. data/test/dummy/tmp/cache/assets/CA6/0A0/sprockets%2F63a72244bdf73521f399e501b341d16d +0 -0
  28. data/test/dummy/tmp/cache/assets/CAA/DA0/sprockets%2Fc1d5b8783261726af51242f75d0034ef +0 -0
  29. data/test/dummy/tmp/cache/assets/CAD/BF0/sprockets%2Fd27d4e6bd84d0108fc54a21959181335 +0 -0
  30. data/test/dummy/tmp/cache/assets/CB3/3E0/sprockets%2Ff03d611409c3b2c45d75f97158197ee0 +0 -0
  31. data/test/dummy/tmp/cache/assets/CB7/310/sprockets%2F9d00a7c05c5990e797170e06dd5641d9 +0 -0
  32. data/test/dummy/tmp/cache/assets/CC5/430/sprockets%2F887b61f7cb339b94a85b7e721295493c +0 -0
  33. data/test/dummy/tmp/cache/assets/CC6/700/sprockets%2Fda996593aa3789391cab3d7762f13687 +0 -0
  34. data/test/dummy/tmp/cache/assets/CC7/410/sprockets%2Fc39062f6a04c41168a923ea22d701a5a +0 -0
  35. data/test/dummy/tmp/cache/assets/CCB/400/sprockets%2Fb211324ce679335840009b6a2aa45cfc +0 -0
  36. data/test/dummy/tmp/cache/assets/CD6/8A0/sprockets%2Fcb476833cd1a806e251da407a58d9520 +0 -0
  37. data/test/dummy/tmp/cache/assets/CDC/0B0/sprockets%2Ffef07c3c165353f861564ede180350a4 +0 -0
  38. data/test/dummy/tmp/cache/assets/CDD/EB0/sprockets%2F0e17703d917f6560e5c3b46ae85c09a2 +0 -0
  39. data/test/dummy/tmp/cache/assets/CE0/B90/sprockets%2F7baa8d092b9d409d47643521a8b55e62 +0 -0
  40. data/test/dummy/tmp/cache/assets/CE0/D80/sprockets%2F63343329bfed9d9c9f88586298fe9790 +0 -0
  41. data/test/dummy/tmp/cache/assets/CE1/EB0/sprockets%2Fe2d34e55c19309ae4d1b8628d38514c6 +0 -0
  42. data/test/dummy/tmp/cache/assets/CE4/B80/sprockets%2Fdc146f8d1ff283ff045000f8349e3942 +0 -0
  43. data/test/dummy/tmp/cache/assets/CEA/B70/sprockets%2F2cdb1061009b0d4430f4d073562b2cbc +0 -0
  44. data/test/dummy/tmp/cache/assets/CF6/590/sprockets%2F4904f8e3b4e2397b86f64f3549e3d63c +0 -0
  45. data/test/dummy/tmp/cache/assets/CFA/700/sprockets%2Ff51725f304c66b6ed8ab01120cb1a593 +0 -0
  46. data/test/dummy/tmp/cache/assets/CFD/F60/sprockets%2Faac72c81c4f00133234e7d1bb46d7925 +0 -0
  47. data/test/dummy/tmp/cache/assets/D04/640/sprockets%2F93cc6f780004fd5b09d1774c3bb0b802 +0 -0
  48. data/test/dummy/tmp/cache/assets/D0A/BC0/sprockets%2Fe718f92b0b9da273737fac04516f2a33 +0 -0
  49. data/test/dummy/tmp/cache/assets/D0A/FC0/sprockets%2F5f3470c68bfbbab4ee084243d8223663 +0 -0
  50. data/test/dummy/tmp/cache/assets/D0B/520/sprockets%2Fa659c61ab2078241e32ebaf671f87e41 +0 -0
  51. data/test/dummy/tmp/cache/assets/D0D/CC0/sprockets%2F90fc5652fe6161075680fcd4cd0c45d2 +0 -0
  52. data/test/dummy/tmp/cache/assets/D14/210/sprockets%2Fb5db5427cdef8d152ae598d461178026 +0 -0
  53. data/test/dummy/tmp/cache/assets/D15/960/sprockets%2F557c56f5b8b86ba772e07281f1f3a0c7 +0 -0
  54. data/test/dummy/tmp/cache/assets/D16/870/sprockets%2F3f2a439772fcd9cd0f434f723837ae51 +0 -0
  55. data/test/dummy/tmp/cache/assets/D16/D00/sprockets%2F52e940c5c1d8089bcdf984d4d27c5520 +0 -0
  56. data/test/dummy/tmp/cache/assets/D19/F70/sprockets%2F7957e7ad09472c1a813ef3883ac59b1c +0 -0
  57. data/test/dummy/tmp/cache/assets/D1A/390/sprockets%2F1d08a6978a059fa2494e078ec1ac7e93 +0 -0
  58. data/test/dummy/tmp/cache/assets/D1A/820/sprockets%2F20a218b05c2726d14bd025c36ba31ddd +0 -0
  59. data/test/dummy/tmp/cache/assets/D1A/D90/sprockets%2F6c459fd8844374d4aa166c64f544fae0 +0 -0
  60. data/test/dummy/tmp/cache/assets/D20/590/sprockets%2F22948c5cb4a59a4c252888f75cdf387a +0 -0
  61. data/test/dummy/tmp/cache/assets/D25/100/sprockets%2F4b9f1fdc6f9b86cc0624a7951766d926 +0 -0
  62. data/test/dummy/tmp/cache/assets/D27/980/sprockets%2F65718e7a65fd89199b02b7cd38b90be9 +0 -0
  63. data/test/dummy/tmp/cache/assets/D2A/220/sprockets%2Fb0d6ff4608e402650ca685bc013d5d0a +0 -0
  64. data/test/dummy/tmp/cache/assets/D2B/FA0/sprockets%2F32aa9ce8b2315cc01f8a2c27374215ce +0 -0
  65. data/test/dummy/tmp/cache/assets/D32/5D0/sprockets%2F3acc8697202c55974ff0122bcf20fa2b +0 -0
  66. data/test/dummy/tmp/cache/assets/D34/630/sprockets%2Fa259c79ff690848e93962f587da8f2ac +0 -0
  67. data/test/dummy/tmp/cache/assets/D3E/7A0/sprockets%2Ff9a1dbe464c536a11de32284fbc89192 +0 -0
  68. data/test/dummy/tmp/cache/assets/D3F/640/sprockets%2F9b448668c4c3a12d6aaa017b94e69ed2 +0 -0
  69. data/test/dummy/tmp/cache/assets/D40/7A0/sprockets%2Fb4d307097fe68a0f9aedb434687c133a +0 -0
  70. data/test/dummy/tmp/cache/assets/D42/040/sprockets%2F3def97f4406db752008fa340f74a6e3f +0 -0
  71. data/test/dummy/tmp/cache/assets/D42/C40/sprockets%2F224cf987cad00c39ae3d39b971f8109b +0 -0
  72. data/test/dummy/tmp/cache/assets/D44/860/sprockets%2F9157a652853bd3cea861bd767fed0b08 +0 -0
  73. data/test/dummy/tmp/cache/assets/D44/BF0/sprockets%2Fcf34626c45538b36718fd50fa9bcb2e6 +0 -0
  74. data/test/dummy/tmp/cache/assets/D45/2A0/sprockets%2F9c55f3eca763e68ded31023b7f66543a +0 -0
  75. data/test/dummy/tmp/cache/assets/D48/B20/sprockets%2F5768e2da329c68c958acde5d26124de0 +0 -0
  76. data/test/dummy/tmp/cache/assets/D48/FD0/sprockets%2F4403ce85c7fe84fe60d426553aa99b1f +0 -0
  77. data/test/dummy/tmp/cache/assets/D49/2D0/sprockets%2F59e843295151ccde25afb2f9f6e7a605 +0 -0
  78. data/test/dummy/tmp/cache/assets/D4B/710/sprockets%2F41e4ac5488184198d7e33e18b7aece4f +0 -0
  79. data/test/dummy/tmp/cache/assets/D4B/C40/sprockets%2F2428f6c76bb4a5efb583e158681fb73d +0 -0
  80. data/test/dummy/tmp/cache/assets/D4D/E40/sprockets%2F0b3924705dbff536992e144fe4cef75f +0 -0
  81. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  82. data/test/dummy/tmp/cache/assets/D51/560/sprockets%2Ff6c8347aff37a4784ea82069ba176f5f +0 -0
  83. data/test/dummy/tmp/cache/assets/D52/250/sprockets%2F967f6481dd795af37e3a49be042f8e1b +0 -0
  84. data/test/dummy/tmp/cache/assets/D56/090/sprockets%2F4af17d268e2ffe72af8a78b78811f666 +0 -0
  85. data/test/dummy/tmp/cache/assets/D57/2C0/sprockets%2F57e8e5954196bd14468ff5db3ae99cd0 +0 -0
  86. data/test/dummy/tmp/cache/assets/D5F/600/sprockets%2F9c4623e57da4d15adb71bd1b04188b1d +0 -0
  87. data/test/dummy/tmp/cache/assets/D63/7A0/sprockets%2Fa0d549181d4ba25b5ed57b841efc2d14 +0 -0
  88. data/test/dummy/tmp/cache/assets/D63/AF0/sprockets%2F8570107fec74ad4c113f643ab38ea7ba +0 -0
  89. data/test/dummy/tmp/cache/assets/D65/0C0/sprockets%2F409bdde508f6197117fe0ab1344ca3de +0 -0
  90. data/test/dummy/tmp/cache/assets/D65/900/sprockets%2F4dd3fce32a54a0f8fb029c30f41d3487 +0 -0
  91. data/test/dummy/tmp/cache/assets/D68/100/sprockets%2F7d7522df5cd3ba1f22c81c653dd5d651 +0 -0
  92. data/test/dummy/tmp/cache/assets/D6A/5C0/sprockets%2F9b410af44867a4979d1aea0ab84ed24b +0 -0
  93. data/test/dummy/tmp/cache/assets/D6B/970/sprockets%2F214e29a7345faee9672bca1756e4aaf1 +0 -0
  94. data/test/dummy/tmp/cache/assets/D6B/D20/sprockets%2Fee6531726dfe6592fa84b42a420b6acd +0 -0
  95. data/test/dummy/tmp/cache/assets/D71/AF0/sprockets%2Fb289e7b3562dcfd42bd0957f27a2f52a +0 -0
  96. data/test/dummy/tmp/cache/assets/D73/0F0/sprockets%2F5ba6d2f108d33e64b84fc4dd91960d6e +0 -0
  97. data/test/dummy/tmp/cache/assets/D73/8B0/sprockets%2Fac0e6a1f5b87c2966f07864c89c0acc3 +0 -0
  98. data/test/dummy/tmp/cache/assets/D7A/3E0/sprockets%2F3dfc09dcfefff43d4680267d832149c3 +0 -0
  99. data/test/dummy/tmp/cache/assets/D7B/800/sprockets%2F850d92cf676cc2c2c662ee8dc328f82c +0 -0
  100. data/test/dummy/tmp/cache/assets/D7D/950/sprockets%2F8259f3fc885403b4eea8dd12964c2ffc +0 -0
  101. data/test/dummy/tmp/cache/assets/D7E/D40/sprockets%2F0cde76f966e2c5660b9f6aaf0875b3b9 +0 -0
  102. data/test/dummy/tmp/cache/assets/D92/430/sprockets%2Fc55e2bbc3d3c5566893be021ec1c4ab7 +0 -0
  103. data/test/dummy/tmp/cache/assets/D9A/810/sprockets%2F53a9bd5325fcfa4148c273e3deb2d19d +0 -0
  104. data/test/dummy/tmp/cache/assets/D9D/BA0/sprockets%2Fa3a3f78f8e854339e32a5ab0638abbbf +0 -0
  105. data/test/dummy/tmp/cache/assets/DA0/A30/sprockets%2Fa63dd5305e8c934fa25e3e1fbd0aa999 +0 -0
  106. data/test/dummy/tmp/cache/assets/DA1/CD0/sprockets%2F3f82ee591308f44cd589bbdfd6b0c1c2 +0 -0
  107. data/test/dummy/tmp/cache/assets/DA7/930/sprockets%2F06db55d1b7d0c96a4ff1657e169e6ece +0 -0
  108. data/test/dummy/tmp/cache/assets/DA8/0D0/sprockets%2F74dcf71bbdf4ad56a3b4338b93d9866c +0 -0
  109. data/test/dummy/tmp/cache/assets/DAD/8E0/sprockets%2F498547cbaefbf040cfff05e9c6e53386 +0 -0
  110. data/test/dummy/tmp/cache/assets/DB0/2C0/sprockets%2F9b5629b0fefb5d78ef3b4ce65ff06364 +0 -0
  111. data/test/dummy/tmp/cache/assets/DB0/A80/sprockets%2F9fdb8e951f975dae3836c2ccf0f65a34 +0 -0
  112. data/test/dummy/tmp/cache/assets/DC1/9E0/sprockets%2F4fdc113ba37308cc3d7d2dbbe1e9d625 +0 -0
  113. data/test/dummy/tmp/cache/assets/DC6/F00/sprockets%2F6121ed5aabb2caaee876c27e87b265c4 +0 -0
  114. data/test/dummy/tmp/cache/assets/DCC/170/sprockets%2Fa2b9a6a717a82fc483c94abbe71aa95f +0 -0
  115. data/test/dummy/tmp/cache/assets/DCD/870/sprockets%2F26f53f256948ecabba69abf1e1dea282 +0 -0
  116. data/test/dummy/tmp/cache/assets/DD3/F60/sprockets%2Fde4fdc4d1f700596d5f2ce7077fbc32e +0 -0
  117. data/test/dummy/tmp/cache/assets/DD4/980/sprockets%2Fed1289bfd5270a38bd9adfcb8d0627c8 +0 -0
  118. data/test/dummy/tmp/cache/assets/DD7/110/sprockets%2Fa7626606dec6ffd4a8a4b76abb7f6a94 +0 -0
  119. data/test/dummy/tmp/cache/assets/DD7/2D0/sprockets%2F9f68c831ccc33f95a6b0a5d7aaf76d8a +0 -0
  120. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  121. data/test/dummy/tmp/cache/assets/DED/9A0/sprockets%2F1e96fab65eff8789cd8c76ffadf40814 +0 -0
  122. data/test/dummy/tmp/cache/assets/DF0/CA0/sprockets%2Fe31eef0d7610bbe710a882fdc3c1eee2 +0 -0
  123. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  124. data/test/dummy/tmp/cache/assets/E12/820/sprockets%2Ff8ced48d293d9ae81be776bac3d3de86 +0 -0
  125. data/test/dummy/tmp/cache/assets/E3B/7A0/sprockets%2F3c7ac679f8c2cf31dec4ed6ee8064ece +0 -0
  126. data/test/dummy/tmp/cache/assets/E5A/2A0/sprockets%2Fed33dc2e47cddca2a7f3b9d850f01fef +0 -0
  127. data/test/dummy/tmp/cache/assets/E8E/C80/sprockets%2Fbcfe97b68b37db0b902decd4ea5ae8ea +0 -0
  128. data/test/dummy/tmp/capybara/capybara-201405311224376317493710.html +136 -0
  129. data/test/dummy/tmp/capybara/capybara-201405311227193531651367.html +136 -0
  130. data/test/dummy/tmp/pids/server.pid +1 -1
  131. metadata +327 -276
  132. data/test/dummy/app/models/adherent/organism.rb +0 -7
  133. data/test/dummy/app/models/organism.rb +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 03c6c2fdbb1e4d09b7d5afa396738ad058a0935d
4
- data.tar.gz: f083ad2281b16506951ce2147b0fe9866773d7ef
3
+ metadata.gz: 36d435492885bb2cb778292b52c2f69b6b810d1e
4
+ data.tar.gz: e3372a353ef3a9ac27d0a15a7af591ebb43b623d
5
5
  SHA512:
6
- metadata.gz: 038749cc47226ea279f6189e061b601a471f734b784a5b36a2143e9d3623142e438641e73cd32c40844c109384564cd2c064440a49fae1b5d9d67e630709c574
7
- data.tar.gz: 344e69be71768f148a39037198d1c242819e403df5e573abcf28d564e9c9ecee8c39d9b9fcf26b0355d89c7928af54b142d79260a93867fa8c60bb149f6585f2
6
+ metadata.gz: 14401fdae901d04efcee1ddfb71bfeaae8c6ef82724d92e5acf2d23983a3cbad3c31cfaf9bec9c69f4f0e463e3738ddc1fc76faf9fe8b2f1e8402df72018fbe9
7
+ data.tar.gz: 184000096effa6136148d53ae80c6cebabedcb11d5704b93a70230edd8461e761ceedab5de89dc4e8a6dfa8b54e5e1816cbc4816ea2e4dea33c34cf493947366
@@ -14,7 +14,7 @@ module Adherent
14
14
  end
15
15
 
16
16
  def new
17
- @payment = @member.payments.new(date:Date.today, amount:@member.unpaid_amount)
17
+ @payment = @member.payments.new(date:guess_date, amount:@member.unpaid_amount)
18
18
  end
19
19
 
20
20
  def create
@@ -84,5 +84,15 @@ module Adherent
84
84
  nil
85
85
  end
86
86
  end
87
+
88
+ # choisit la date, de préférence la date du jour, mais s'assure que la d
89
+ # date est dans les limites autorisées par range_date (définie dans Organisme)
90
+ def guess_date
91
+ date = Date.today
92
+ rd = @member.organism.range_date
93
+ date = rd.last if date > rd.last
94
+ date = rd.first if date < rd.first
95
+ date
96
+ end
87
97
  end
88
98
  end
@@ -1,5 +1,11 @@
1
1
  module Adherent
2
2
  module PaymentsHelper
3
+ def min_date
4
+ @member.organism.range_date.first
5
+ end
3
6
 
7
+ def max_date
8
+ @member.organism.range_date.last
9
+ end
4
10
  end
5
11
  end
@@ -4,7 +4,7 @@ module Adherent
4
4
 
5
5
  pick_date_for :birthdate
6
6
 
7
- belongs_to :organism, class_name: 'Organism'
7
+ belongs_to :organism, class_name: '::Organism'
8
8
  has_one :coord, dependent: :destroy
9
9
  has_many :adhesions
10
10
  has_many :payments
@@ -20,10 +20,12 @@ module Adherent
20
20
  has_many :reglements, :dependent=>:destroy
21
21
  belongs_to :member
22
22
 
23
+
23
24
  attr_accessible :amount, :date, :mode
24
25
 
25
26
  validates :amount, :date, :mode, :member_id, presence:true
26
27
  validates :amount, :over_imputations=>true
28
+ before_save :correct_range_date
27
29
 
28
30
  pick_date_for :date
29
31
 
@@ -79,6 +81,21 @@ module Adherent
79
81
  end
80
82
 
81
83
 
84
+ # vérifie que la date, si elle a changé est dans un range correct.
85
+ # Il appartient à l'application principale de définir ce range_correct
86
+ # ici en surchargeant la méthode range_date de organism.
87
+ # TODO mettre plutôt ceci dans un fichier de configuration.
88
+ def correct_range_date
89
+ return true unless date_changed?
90
+ if read_attribute(:date).in? member.organism.range_date
91
+ return true
92
+ else
93
+ self.errors.add(:date, :out_of_range)
94
+ return false
95
+ end
96
+ end
97
+
98
+
82
99
 
83
100
  end
84
101
  end
@@ -0,0 +1,23 @@
1
+ class Organism < ActiveRecord::Base
2
+ attr_accessible :title
3
+
4
+ has_many :members, class_name:'Adherent::Member'
5
+ has_many :payments, through: :members, class_name:'Adherent::Payment'
6
+
7
+ # méthode devant être surchargée dans l'application principale
8
+ # pour avoir une capacité à gerer les limites de dates lors de la saisie des
9
+ # paiements
10
+ #
11
+ # Ici par défaut, on suppose que les dates correctes sont de 3 mois
12
+ # avant la date du jour et de 3 mois après
13
+ #
14
+ # Dans l'appli compta, on redéfinit range_date pour avoir les dates
15
+ # correspondants aux exercices ouverts.
16
+ #
17
+ # TODO revoir ce sujet pour introduire un fichier de configuration
18
+ # permettant d'indiquer les limites de dates
19
+ #
20
+ def range_date
21
+ Date.today.<<(3)..Date.today.>>(3)
22
+ end
23
+ end
@@ -16,7 +16,7 @@
16
16
  %th Actions
17
17
  %tbody
18
18
  - @adhesions.each do |adhesion|
19
- %tr
19
+ %tr{id:"adhesion_#{adhesion.id}"}
20
20
  %td= adhesion.from_date
21
21
  %td= adhesion.to_date
22
22
  %td= number_to_currency(adhesion.amount, locale: :fr)
@@ -30,7 +30,7 @@
30
30
  </thead>
31
31
  <tbody>
32
32
  <% @members.each do |member| %>
33
- <tr class="<%= member.unpaid_adhesions? ? 'impaye' : 'ok' %>">
33
+ <tr class="<%= member.unpaid_adhesions? ? 'impaye' : 'ok' %>" id="<%="member_#{member.id}"%>">
34
34
  <td><%= member.number %></td>
35
35
  <td><%= member.name %></td>
36
36
  <td><%= member.forname %></td>
@@ -3,7 +3,12 @@
3
3
  =f.error_notification
4
4
  .row-fluid
5
5
  .span12
6
- = f.input :date, wrapper_html:{class:'span2'}, label_html:{class: 'span4'}, input_html:{class:'span8', value:@payment.date}, :as=>:date_picker
6
+ = f.input :date, wrapper_html:{class:'span2'},
7
+ label_html:{class: 'span4'},
8
+ input_html:{class:'span8', value:@payment.date,
9
+ date_min:min_date,
10
+ date_max:max_date},
11
+ :as=>:date_picker
7
12
  = f.input :amount, wrapper_html:{class:'span2'}, label_html:{class: 'span6'}, input_html:{class:'span6', value:two_decimals(@payment.amount)}, :as=>:french_decimal
8
13
  = f.input :mode, wrapper_html:{class:'span3'}, :collection=>Adherent::MODES, prompt:'Choisissez', label_html:{class: 'span6'}, input_html:{class:'span6'}
9
14
  .row-fluid
@@ -1,3 +1,5 @@
1
+ # TODO mettre cet input dans l'espace de nom Adherent.
2
+
1
3
  require 'simple_form'
2
4
  # la classe DatePickerInput permet d'avoir un champ de saisie de date avec
3
5
  # un widget qui permet de sélectionner la date.
@@ -186,6 +186,13 @@ fr:
186
186
  adhesion:
187
187
  amount: Montant
188
188
 
189
+ errors:
190
+ models:
191
+ adherent/payment:
192
+ attributes:
193
+ date:
194
+ out_of_range: hors limite
195
+
189
196
  helpers:
190
197
  submit:
191
198
  adherent:
@@ -211,7 +218,7 @@ fr:
211
218
  greater_than_or_equal_to: Valeur trop basse
212
219
  greater_than: Valeur trop faible
213
220
  under_imputations: Montant inférieur aux montants déjà imputés
214
-
221
+
215
222
 
216
223
  coord: coordonnée
217
224
  coords: coordonnées
@@ -1,3 +1,3 @@
1
1
  module Adherent
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6" # ajout de limite de dates à la saisie des paiements
3
3
  end