reçus
This commit is contained in:
parent
8b19471d02
commit
449ec28909
@ -19,10 +19,10 @@ class Admin::SheetsController < ApplicationController
|
|||||||
|
|
||||||
def recus
|
def recus
|
||||||
date = Date.today
|
date = Date.today
|
||||||
date = DateTime.new(2014, 1, 1).beginning_of_year
|
date = DateTime.new(2015, 1, 1).beginning_of_year
|
||||||
|
|
||||||
@sheet_years = SheetYear.find(:all, :conditions => ["paid_at >= ? and paid_at <= ?",date ,date.end_of_year])
|
@sheet_years = SheetYear.joins(:person).order("people.surname").find(:all, :conditions => ["paid_at >= ? and paid_at <= ?",date ,date.end_of_year])
|
||||||
@donates = Donate.find(:all, :conditions => ["paid_at >= ? and paid_at <= ?",date ,date.end_of_year])
|
@donates = Donate.joins(:person).order("people.surname").find(:all, :conditions => ["paid_at >= ? and paid_at <= ?",date ,date.end_of_year])
|
||||||
render :layout => false
|
render :layout => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- encoding : utf-8 -*-
|
# -*- encoding : utf-8 -*-
|
||||||
class Donate < ActiveRecord::Base
|
class Donate < ActiveRecord::Base
|
||||||
belongs_to :sheet
|
belongs_to :sheet
|
||||||
|
has_one :person, :through => :sheet
|
||||||
#attr_accessible :paid_at, :amount, :payment_type, :bank, :check_number
|
#attr_accessible :paid_at, :amount, :payment_type, :bank, :check_number
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- encoding : utf-8 -*-
|
# -*- encoding : utf-8 -*-
|
||||||
class SheetYear < ActiveRecord::Base
|
class SheetYear < ActiveRecord::Base
|
||||||
belongs_to :sheet
|
belongs_to :sheet
|
||||||
|
has_one :person, :through => :sheet
|
||||||
validates_presence_of :year
|
validates_presence_of :year
|
||||||
|
|
||||||
#attr_accessible :year, :join_type, :benefactor, :gift_year, :paid_at, :amount, :payment_type, :bank, :check_number, :sheet_id, :plume
|
#attr_accessible :year, :join_type, :benefactor, :gift_year, :paid_at, :amount, :payment_type, :bank, :check_number, :sheet_id, :plume
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
%td{:style => "text-align:right;"}
|
%td{:style => "text-align:right;"}
|
||||||
Numéro d'ordre du reçu
|
Numéro d'ordre du reçu
|
||||||
%br
|
%br
|
||||||
="2014/"+("%04d" % i).to_s
|
="2015/"+("%04d" % i).to_s
|
||||||
|
|
||||||
%h2{:style => "text-align:center;"}
|
%h2{:style => "text-align:center;"}
|
||||||
Reçu dons aux œuvres
|
Reçu dons aux œuvres
|
||||||
@ -172,7 +172,7 @@
|
|||||||
%td{:style => "text-align:right;"}
|
%td{:style => "text-align:right;"}
|
||||||
Numéro d'ordre du reçu
|
Numéro d'ordre du reçu
|
||||||
%br
|
%br
|
||||||
="2014/"+("%04d" % i).to_s
|
="2015/"+("%04d" % i).to_s
|
||||||
|
|
||||||
%h2{:style => "text-align:center;"}
|
%h2{:style => "text-align:center;"}
|
||||||
Reçu dons aux œuvres
|
Reçu dons aux œuvres
|
||||||
|
Loading…
x
Reference in New Issue
Block a user