This commit is contained in:
Nicolas Bally 2020-06-11 07:59:21 +02:00
parent ff95aa77ae
commit f1b114f7e4
322 changed files with 570 additions and 141 deletions

View File

@ -1605,3 +1605,7 @@ form{
}
.red{
color:red;
}

View File

@ -1530,7 +1530,7 @@ body {
font-size: 22px;
padding: 10px 15px;
display: inline-block;
margin-top: 20px;
margin-top: 10px;
}
}
.tab-content {
@ -9604,7 +9604,7 @@ a.sp-video {
a {
display: inline-block;
float: none !important;
margin-bottom: 20px;
margin-bottom: 0px;
}
}
.edition_user {
@ -10008,7 +10008,10 @@ a.sp-video {
position:relative;
margin:20px 0;
border:1px solid black;
background:#ffdd00;
background:white;
border:5px solid white;
border-top:10px solid #cc4b14;
border-left:10px solid #cc4b14;
h3{
text-transform:uppercase;
@ -10370,7 +10373,7 @@ a.sp-video {
.organisateur_img{
float:left;
width:20%;
width:30%;
margin-right:10px;
}

View File

@ -54,11 +54,9 @@ class Admin::MOdrFilesController < ApplicationController
def send_mail
@m_odr_file = MOdrFile.find(params[:id])
@m_odr_rep = @m_odr_file.m_odr_rep
@m_odr_file.send_mail_type(params[:slug].to_s)
@m_odr_rep.send_mail_type(params[:slug].to_s, @m_odr_file)
redirect_to [:admin, @m_odr_rep]
redirect_to [:admin, @m_odr_file]
end
@ -87,7 +85,7 @@ class Admin::MOdrFilesController < ApplicationController
#@m_odr_file.m_odr_rep.change_state("En cours de traitement")
@m_odr_file.p_customer.generate_prime if @m_odr_file.p_customer
redirect_to admin_m_odr_files_path()
redirect_to [:admin, @m_odr_file]
else
render action: "edit"

View File

@ -77,10 +77,28 @@ class Admin::MOdrPrimesController < ApplicationController
def generate_virement
@m_odr_prime = MOdrPrime.find(params[:id])
@m_odr_prime.m_odr_virements.create
@m_odr_prime.change_state("Virement demandé")
if @m_odr_prime.p_customer.valid_m_odr_rep_rib
@m_odr_prime.m_odr_virements.create
@m_odr_prime.change_state("Virement demandé")
if @m_odr_prime.p_customer.mail_hists.where(:mail_type_id => 14).count == 0
@m_odr_prime.send_mail_type("primes-valide-1")
else
@m_odr_prime.send_mail_type("primes-valide-2")
end
else
@m_odr_prime.change_state("Manque RIB")
@m_odr_prime.send_mail_type("primes-manque-rib") if @m_odr_prime.p_customer.m_odr_rep_ribs.count == 0
end
redirect_back(fallback_location:"/")
end
end

View File

@ -49,10 +49,10 @@ class Admin::MOdrRemisesController < ApplicationController
@m_odr_remise.m_odr_virements.where(:refused => false).each do |m_odr_virement|
m_odr_virement.sended = true
m_odr_virement.m_odr_prime.change_state("Virement envoyé")
m_odr_virement.m_odr_prime.change_state("Virement envoyé") if m_odr_virement.m_odr_prime
m_odr_virement.save
m_odr_virement.m_odr_prime.send_mail_type("succes", m_odr_virement)
#m_odr_virement.m_odr_prime.send_mail_type("succes", m_odr_virement)
end
@m_odr_remise.confirmed = true

View File

@ -4,6 +4,8 @@ class MOdrFile < ApplicationRecord
belongs_to :p_customer
belongs_to :m_odr_place
belongs_to :m_event
has_many :mail_hists
has_many :m_odr_file_products
accepts_nested_attributes_for :m_odr_file_products, :allow_destroy => true
@ -98,6 +100,14 @@ class MOdrFile < ApplicationRecord
def send_mail_type(slug, element = nil)
if self.m_odr_file_type_id
mail_hist = MailHist.auto_generate_mail(:fr, slug, self.p_customer.email, {:arguments => {:nbr => self.nbr_pneus }, :m_odr_file => self, :p_customer => self.p_customer, :element => self})
else
mail_hist = MailHist.auto_generate_mail(:fr, slug, self.p_customer.email, {:arguments => {:nbr => self.nbr_pneus }, :m_odr_file => self, :p_customer => self.p_customer, :element => self})
end
end
end

View File

@ -18,12 +18,8 @@ class MOdrFileRoulage < ApplicationRecord
if achats = MOdrFile.where(:admin_ok => true, :p_customer_id => self.m_odr_file.p_customer_id,:m_odr_file_type_id => 2).where("buy_at <= ? and nbr_pneus_not_useds > 0", self.date) and (achats.sum(:nbr_pneus_not_useds) > 0)
#sdffs = sdfsfd
if self.m_odr_file.p_customer.valid_m_odr_rep_rib
state = "A traiter"
else
state = "Manque RIB"
end
state = "A traiter"
prime = MOdrPrime.new(:state => state, :m_odr_file_roulage => self, :p_customer_id => self.m_odr_file.p_customer_id)
n_tot = 0
achats.each do |a|

View File

@ -84,14 +84,14 @@ class MOdrPrime < ApplicationRecord
slug = "primes-manque-rib"
end
MailHist.auto_generate_mail(:fr, slug, self.p_customer.email, options = {:arguments => {:remise => number_to_currency(self.amount.to_f)}, :p_customer => self.p_customer, :element => self})
#MailHist.auto_generate_mail(:fr, slug, self.p_customer.email, options = {:arguments => {:remise => number_to_currency(self.amount.to_f)}, :p_customer => self.p_customer, :element => self})
end
def send_mail_type(slug, element = nil)
mail_hist = MailHist.auto_generate_mail(:fr, slug, self.p_customer.email, {:arguments => {:remise => number_to_currency(self.amount.to_f), :civilite => self.p_customer.particular.civilite, :nom => self.p_customer.particular.name, :prenom => self.p_customer.particular.firstname }, :m_odr_prim => self,:element => element})
mail_hist = MailHist.auto_generate_mail(:fr, slug, self.p_customer.email, {:arguments => {:remise => number_to_currency(self.amount.to_f), :nbr => self.nbr_pneus }, :m_odr_prime => self, :p_customer => self.p_customer, :element => self})
end

View File

@ -3,6 +3,8 @@ class MOdrProduct < ApplicationRecord
belongs_to :m_odr
has_many :m_odr_product_sizes
has_many :m_odr_product_remises, :dependent => :destroy
accepts_nested_attributes_for :m_odr_product_remises, :allow_destroy => true

View File

@ -7,7 +7,7 @@ class MOdrRepRib < ApplicationRecord
has_one :m_odr, :through => :m_odr_rep
validates :bic, :presence => true, length: { in: 8..11 }
#validates :bic, :presence => true, length: { in: 8..11 }
validates :iban, :presence => true
@ -31,7 +31,7 @@ class MOdrRepRib < ApplicationRecord
def update_prime_status
if self.admin_ok and self.p_customer
self.p_customer.m_odr_primes.where(:state => "Manque RIB").all.each do |m_odr_prime|
m_odr_prime.state = "A traiter"
m_odr_prime.state = "Validé"
m_odr_prime.save
end
end

View File

@ -92,7 +92,7 @@ class MOdrVirement < ApplicationRecord
before_validation do
#self.m_odr = self.m_odr_rep.m_odr if self.m_odr_rep
self.m_odr_rep_rib = self.m_odr_prime.p_customer.m_odr_rep_ribs.where(:admin_ok => true).order("id DESC").first
self.m_odr_rep_rib = self.m_odr_prime.p_customer.m_odr_rep_ribs.where(:admin_ok => true).order("id DESC").first if self.m_odr_prime
self.amount = self.remise

View File

@ -3,19 +3,23 @@ class MailHist < ApplicationRecord
belongs_to :mail_type
belongs_to :m_odr_rep
belongs_to :m_odr
belongs_to :m_odr_prime
belongs_to :lang_site
belongs_to :m_odr_file
belongs_to :p_customer
belongs_to :element, :polymorphic => true
acts_as_sorting :fields => { :created_at => {:name => "Date", :reorder => true},
:from_email => {:name => "Email exp.", :reorder => true},
:p_customer => {:name => "Client"},
:to_email => {:name => "Email dest.", :reorder => true},
:subject => {:name => "Sujet.", :reorder => true},
:mail_type => {:name => "Mail type"},
:element => {:name => "Elément"},
:mail_type => {:name => "Elément"},
:p_customer => {:name => "Client"},
:from_email => {:name => "Email exp.", :reorder => true},
:actions => "Actions"
}
@ -47,7 +51,8 @@ class MailHist < ApplicationRecord
@p_customer = options[:p_customer]
@m_odr = options[:m_odr]
@m_odr_rep = options[:m_odr_rep]
@m_odr_file = options[:m_odr_file]
@m_odr_prime = options[:m_odr_prime]
@file_tunel = options[:file_tunel]
@arguments = @options[:arguments]
@ -92,7 +97,7 @@ class MailHist < ApplicationRecord
@to_email = email
mail_history = MailHist.create(:lang_site => @lang_site, :to_email => @to_email, :from_email => @from, :element => options[:element], :subject => @subject, :body => @body, :m_odr => @m_odr, :m_odr_rep => @m_odr_rep, :p_customer => @p_customer, :mail_content => @mail_content, :mail_type => @mail_type)
mail_history = MailHist.create(:lang_site => @lang_site, :to_email => @to_email, :from_email => @from, :element => options[:element], :subject => @subject, :body => @body, :m_odr => @m_odr, :m_odr_rep => @m_odr_rep, :m_odr_prime => @m_odr_prime,:m_odr_file => @m_odr_file, :p_customer => @p_customer, :mail_content => @mail_content, :mail_type => @mail_type)
mail = GeneralMails.general2(@to_email, @subject, @body, mail_options = {:m_odr => @m_odr, :file_tunel => @file_tunel})
@ -100,7 +105,7 @@ class MailHist < ApplicationRecord
mail_history.subject_send = @subject
mail_history.body_send = mail.body.encoded
mail.deliver
#mail.deliver
mail_history.save

View File

@ -1,7 +1,8 @@
class MailType < ApplicationRecord
has_many :mail_contents
has_many :mail_contents, :dependent => :destroy
belongs_to :mail_type_reference, :class_name => "MailType"
has_many :mail_hists, :dependent => :destroy
accepts_nested_attributes_for :mail_contents
@ -40,11 +41,11 @@ class MailType < ApplicationRecord
end
def default_title
self.lang(:fr).subject
self.lang(:fr).subject if self.lang(:fr)
end
def default_message
self.lang(:fr).message.to_s.truncate(100)
self.lang(:fr).message.to_s.truncate(100) if self.lang(:fr)
end
end

View File

@ -47,7 +47,7 @@ class PCustomer < ApplicationRecord
has_many :mail_hists
has_many :m_odr_rep_ribs
has_many :m_odr_rep_ribs, :dependent => :destroy
has_many :m_odr_files
@ -71,6 +71,61 @@ class PCustomer < ApplicationRecord
validates :cgv, :presence => true, :if => :require_cgv
validates :rgpd, :presence => true, :if => :require_cgv
validates :past_id, :uniqueness => true
def do_import
if self.imp_iban? and self.imp_bic?
self.m_odr_rep_ribs.create(:bic => self.imp_bic, :iban => self.imp_iban, :admin_ok => true)
end
part = Particular.new
part.name = self.imp_name
part.firstname = self.imp_firstname
part.address_2 = self.imp_address
part.cp = self.imp_cp2
part.city = self.imp_city
part.country = "FR"
part.tel = self.imp_tel
self.particular = part
if self.imp_valid == "oui"
self.enabled = true
end
if self.imp_npai == "oui"
self.npai = true
end
if self.imp_stickers == "oui"
self.sticker = true
end
if circuit = Circuit.where(:past_id => self.imp_circuit_1).first
self.circuit_1_id = circuit.id
end
if circuit = Circuit.where(:past_id => self.imp_circuit_2).first
self.circuit_2_id = circuit.id
end
if circuit = Circuit.where(:past_id => self.imp_circuit_3).first
self.circuit_3_id = circuit.id
end
part.save
self.particular = part
self.save
end
after_create :do_import
acts_as_csv_import :fields =>[:imported, :email, :password, :past_id,:imp_cp,:imp_country,:imp_ref,:imp_email,:imp_firstname,:imp_name,:imp_fonction,:imp_organisme,:imp_address,:imp_cp2,:imp_city,:imp_tel,:imp_portable,:imp_lien,:imp_comment,:imp_iban,:imp_bic,:imp_circuit_1,:imp_circuit_2,:imp_circuit_3,:imp_partenaire,:imp_ecran,:imp_blocage,:imp_valid,:imp_user_valid,:imp_offre,:imp_info,:imp_cgu,:imp_test,:imp_stickers,:imp_npai,:npai,:imp_relance_adresse,:imp_demande_info,:imp_creation,:imp_modification]
attr_accessor :actual_password, :valid_last_password, :valid_public, :generate_mdp, :valid_pswd_confirmation, :require_cgv

View File

@ -1,5 +1,6 @@
-if current_admin.has_permission?("customers")
%li= link_to "Utilisateurs", admin_p_customers_path
%li= link_to "Mails envoyés", admin_mail_hists_path
-if false
-if current_admin.has_permission?("customer-cats")

View File

@ -6,7 +6,7 @@
= f.input :name, :label => "Nom de l'import :"
= f.input :file, :label => "file :"
= f.input :table_name, :label => "Table :" , :as => :select, :collection => ["circuits", "organisateurs", "m_odr_product_sizes", "m_odr_places", "circuit_regions", "m_events"]
= f.input :table_name, :label => "Table :" , :as => :select, :collection => ["p_customers", "circuits", "organisateurs", "m_odr_product_sizes", "m_odr_places", "circuit_regions", "m_events"]
-if f.object.id
%table.import_csv_champs_form

View File

@ -1,4 +1,6 @@
.qi_header
.right
=link_to ic(:pencil), edit_admin_m_odr_file_path(@m_odr_file)
%h1
Primes
%span
@ -9,22 +11,105 @@
.qi_row
.qi_pannel.qi_plain.padding
=link_to ic(:download)+" Télécharger le document", download_admin_m_odr_file_path(@m_odr_file, :disposition => "attachment")
-if File.extname(@m_odr_file.file.path) == ".pdf" || File.extname(@m_odr_file.file.path) == ".PDF"
.left{:style => "float:left;width:30%;"}
.qi_row
.qi_pannel.qi_plain.padding
%table.table
%tr
%td Utilisateur
%td=@m_odr_file.p_customer.show_name
%tr
%td Date de la facture
%td=@m_odr_file.buy_at
%tr
%td Validé ?
%td
-if @m_odr_file.admin_ok
Oui
-else
Non
-if @m_odr_file.m_odr_file_type_id == 2
%tr
%td
Revendeur
%td=@m_odr_file.m_odr_place.name if @m_odr_file.m_odr_place
-if @m_odr_file.m_odr_file_type_id == 2
Produits :
%table.table
-@m_odr_file.m_odr_file_products.each do |m_odr_file_product|
%tr
%td
=m_odr_file_product.m_odr_product_size.name
%td
=m_odr_file_product.qte
%td
=number_to_currency m_odr_file_product.price
-else
Roulages :
%table.table
-@m_odr_file.m_odr_file_roulages.each do |m_odr_file_roulage|
%tr
%td
=m_odr_file_roulage.date
%td
=m_odr_file_roulage.m_event.title if m_odr_file_roulage.m_event
-if @m_odr_file.m_odr_file_type_id == 2
=link_to ic(:envelope)+"Envoyer un mail demandant la facture de roulage", send_mail_admin_m_odr_file_path(@m_odr_file, :slug => "achat-manque-roulage"), :remote => false, :class => "btn btn-primary", :style => "margin-bottom:4px;"
%iframe{:src => @m_odr_file.file.url, :style => "width:100%;height:800px;border:1px solid gray;"}
-if @m_odr_file.admin_ok == false
.red Facture refusée
Envoyer un mail de notification :
-if @m_odr_file.m_odr_file_type_id == 2
-slugs = MailType.where(:mail_type_cat_id => 2).map{|m| m.slug}
-else
-slugs = MailType.where(:mail_type_cat_id => 3).map{|m| m.slug}
-slugs.each do |slug|
%br
=link_to ic(:envelope)+" #{slug}", send_mail_admin_m_odr_file_path(@m_odr_file, :slug => slug), :remote => false, :class => "btn btn-primary", :style => "margin-bottom:4px;"
#show{:style => "margin-left:31%;"}
=link_to ic(:download)+" Télécharger le document", download_admin_m_odr_file_path(@m_odr_file, :disposition => "attachment")
-if File.extname(@m_odr_file.file.path) == ".pdf" || File.extname(@m_odr_file.file.path) == ".PDF"
-else
&nbsp;&nbsp;
=link_to ic(:"rotate-left"), rotate_admin_m_odr_file_path(:id => @m_odr_file.id, :direction => "right"), :remote => true
&nbsp;&nbsp;
=link_to ic(:"rotate-right"), rotate_admin_m_odr_file_path(@m_odr_file), :remote => true
#image_previ{:style => "width:100%;height:800px;border:1px solid gray;overflow:auto;"}
=render :partial => "admin/m_odr_files/image", :locals => {:file => @m_odr_file}
%iframe{:src => @m_odr_file.file.url, :style => "width:100%;height:800px;border:1px solid gray;"}
-else
&nbsp;&nbsp;
=link_to ic(:"rotate-left"), rotate_admin_m_odr_file_path(:id => @m_odr_file.id, :direction => "right"), :remote => true
&nbsp;&nbsp;
=link_to ic(:"rotate-right"), rotate_admin_m_odr_file_path(@m_odr_file), :remote => true
#image_previ{:style => "width:100%;height:800px;border:1px solid gray;overflow:auto;"}
=render :partial => "admin/m_odr_files/image", :locals => {:file => @m_odr_file}
.clear
%hr
Historique des mails envoyés
-params[:search][:per_page] = params[:search][:per_page] || 50
-per_page = params[:search][:per_page]
-page = (params[:page] and params[:page] != "") ? params[:page] : 1
-@mail_hists = @m_odr_file.mail_hists
-@mail_hists = sort_by_sorting(@mail_hists, "created_at DESC")
-@mail_hists = @mail_hists.page(page).per(per_page)
=render :partial => "qi/qi_ordered_table", :locals => {:qi_ordered_table_collection => @mail_hists}

View File

@ -30,7 +30,7 @@
%td
=l @m_odr_prime.m_odr_file_roulage.date
%td
=@m_odr_prime.m_odr_file_roulage.m_event.title
=@m_odr_prime.m_odr_file_roulage.m_event.title if @m_odr_prime.m_odr_file_roulage.m_event
-m_odr_file = @m_odr_prime.m_odr_file_roulage.m_odr_file

View File

@ -4,6 +4,10 @@
-tr[:mail_type] = capture do
%td
=mail_hist.mail_type.slug if mail_hist.mail_type
-tr[:p_customer] = capture do
%td
=link_to mail_hist.p_customer.show_name, [:admin, mail_hist.p_customer] if mail_hist.p_customer
-tr[:actions] = capture do
%td.actions

View File

@ -1,9 +1,13 @@
.m_event
-img = ""
-img = m_event.organisateur.logo.file.large.medium.url if m_event.organisateur and m_event.organisateur.logo
-if @organisateur
-img = m_event.circuit.logo.file.large.medium.url if m_event.circuit and m_event.circuit.logo
-else
-img = m_event.organisateur.logo.file.large.medium.url if m_event.organisateur and m_event.organisateur.logo
=image_tag img
=image_tag img, :class => "vertical_center"
.desc
.head
%h3

View File

@ -1,8 +1,12 @@
%tr.m_odr_file_product_form.field
%td= form.input :m_odr_product_size, :label => "Produit :", :collection => MOdrProductSize.all, :as => :select, :include_blank => false, :member_label => :member_label
%td= form.input :qte, :label => "Qté :", :input_html => {:style => "width:60px;"}
%td=# form.input :price, :label => "Prix :"
%td.actions=link_to_remove_fields ic(:"trash-o"), form
%td
= form.input :m_odr_product_size, :label => "Produit :", :collection => option_groups_from_collection_for_select(MOdrProduct.all, :m_odr_product_sizes, :name, :id, :name), :as => :select, :include_blank => false, :member_label => :member_label
&nbsp;
%td{:style => "width:60px;"}
= form.input :qte, :label => "Qté :"
&nbsp;
%td.actions{:style => "width:40px;"}
&nbsp;
%span{:style => "position:relative;top:-5px;"}=link_to_remove_fields ic(:"trash-o"), form

View File

@ -1,6 +1,5 @@
=semantic_form_for [:public, @m_odr_file], :remote => false do |f|
-if current_admin.id == 1
=debug f.object.errors.messages
.qi_row
.qi_pannel.qi_plain.padding
=f.inputs do
@ -12,20 +11,26 @@
-if f.object.m_odr_file_type_id == 2
%table.m_odr_file_products_form.form-table
%table.m_odr_file_products_form.form-table{:style => "width:100%;"}
= f.input :buy_at, :label => "Date de l'achat",:as => :string, :input_html => {:autocomplete => "off", :class => "year_date_picker"}
-if true
%p= public_link_to_add_fields ic(:plus)+" Ajouter un ou plusieurs pneus", f, :m_odr_file_products
=f.semantic_fields_for :m_odr_file_products do |form|
=render :partial => "public/m_odr_file_products/form", :locals => {:form => form}
-if true
%p= public_link_to_add_fields ic(:plus)+" Ajouter un ou plusieurs pneus", f, :m_odr_file_products
%br
%br
-else
%table.m_odr_file_roulages_form.form-table
%table.m_odr_file_roulages_form.form-table{:style => "width:100%;"}
=f.semantic_fields_for :m_odr_file_roulages do |form|
=render :partial => "public/m_odr_file_roulages/form", :locals => {:form => form}
@ -35,8 +40,7 @@
.large_actions
.actions=f.submit "sauvegarder", :class => "btn btn-primary"
%center=f.submit "sauvegarder", :class => "btn btn-primary"
%br
%br

View File

@ -1,5 +1,5 @@
.center_content
.center_content{:style => "max-width:700px;"}
-if @m_odr_file.m_odr_file_type_id == 1
%h1 Ajouter une facture de roulage

View File

@ -9,94 +9,104 @@
=link_to ic(:lock)+" Modifier mon mot de passe", edit_password_public_p_customer_auths_path()
.clear
.row
.col-md-6
%h3 Mes informations personnelles
.particular_div
%p
-if current_p_customer.particular_ok?
%span.green
=ic :flag
.doc_pannel
.row
.col-md-6
%h3 Mes informations personnelles
.particular_div
%p
-if current_p_customer.particular_ok?
%span.green
=ic :flag
Adresse remplie
-else
%span.orange
=ic :flag
-else
%span.orange
=ic :flag
Remplissez votre adresse pour recevoir vos stickers
-particular = current_p_customer.particular
-if particular
=particular.firstname
=particular.name
%br
-if particular.address_2?
=particular.address_2
-particular = current_p_customer.particular
-if particular
=particular.firstname
=particular.name
%br
-if particular.address_3?
-if particular.address_2?
=particular.address_3
%br
-if particular.cp? or particular.city? or particular.country?
=particular.address_2
%br
-if particular.address_3?
=particular.cp
=particular.address_3
%br
-if particular.cp? or particular.city? or particular.country?
=particular.cp
=particular.city
=particular.city
=particular.country
%br
%p
=link_to "Modifier mes coordonnées", edit_public_particular_path(current_p_customer.particular)
=particular.country
%br
%p
=link_to "Modifier mes coordonnées", edit_public_particular_path(current_p_customer.particular)
.col-md-6
%h3 Mon rib
.rib
-if current_p_customer.valid_m_odr_rep_rib
%p
%span.green
=ic :flag
.col-md-6
%h3
&nbsp;
.rib
-if current_p_customer.valid_m_odr_rep_rib
%p
%span.green
=ic :flag
RIB validé
-rib = current_p_customer.valid_m_odr_rep_rib
-rib = current_p_customer.valid_m_odr_rep_rib
.rib
IBAN :
=rib.iban
%br
BIC :
=rib.bic
%br
= link_to "Modifier mon rib", edit_public_m_odr_rep_rib_path(current_p_customer.m_odr_rep_ribs.first)
.rib
IBAN :
=rib.iban
%br
BIC :
=rib.bic
%br
= link_to "Modifier mon rib", edit_public_m_odr_rep_rib_path(current_p_customer.m_odr_rep_ribs.first)
-elsif current_p_customer.m_odr_rep_ribs.count > 0
%p
%span.orange
=ic :flag
-elsif current_p_customer.m_odr_rep_ribs.count > 0
%p
%span.orange
=ic :flag
RIB en cours de validation
-rib = current_p_customer.m_odr_rep_ribs.first
-rib = current_p_customer.m_odr_rep_ribs.first
.rib
IBAN :
=rib.iban
%br
BIC :
=rib.bic
.rib
IBAN :
=rib.iban
%br
BIC :
=rib.bic
-else
%p
%span.red
=ic :flag
-else
%p
%span.red
=ic :flag
RIB non renseigné
.rib= link_to "Ajouter mon rib", new_public_m_odr_rep_rib_path()
.rib= link_to "Ajouter mon rib", new_public_m_odr_rep_rib_path()
.doc_pannel
.right
=c = current_p_customer.m_odr_primes.where(:state => "Virement envoyé").count
-if c > 1
primes obtenues sur 5 pour 2020
-else
prime obtenue sur 5 pour 2020
%h3 Mes primes
-if current_p_customer.m_odr_primes.count > 0
%table.table
@ -109,7 +119,7 @@
.doc_pannel
%h3 Mes factures d'achat
%h3 Mes factures de pneus
-if m_odr_files = current_p_customer.m_odr_files.where(:m_odr_file_type_id => 2) and m_odr_files.count > 0
%table.table
=render m_odr_files

View File

@ -1,11 +1,23 @@
.center_content
.organisateur_show
%h1
-img = ""
-img = @organisateur.logo.file.large.medium.url if @organisateur.logo
=image_tag img, :class => "organisateur_logo"
:scss
.organisateur_logo{
float:right;
width:150px;
margin-right:10px;
}
%h1{:style => "text-align:left !important;"}
%br
=@organisateur.name
%p.localisation
<img src="https://www.mamotosurorganisateur.com/images/interface/picto_pointer.png">
%p.localisation{:style => "text-align:center !important;"}
=#@organisateur.address2
=#@organisateur.address3 if @organisateur.address3?
=@organisateur.cp
@ -13,9 +25,12 @@
=@organisateur.country
.clear
%br
-img = ""
-img = @organisateur.logo.file.large.medium.url if @organisateur.logo
-img = @organisateur.image_file.file.large.medium.url if @organisateur.image_file
=image_tag img, :class => "organisateur_img"
.description

View File

@ -1,4 +1,4 @@
.center_content
.center_content{:style => "max-width:600px;"}
%h1 Modifier mon mot de passe
@ -10,7 +10,7 @@
=f.input :password_confirmation, :label => "Confirmation :", :as => :password
= submit_tag qit("mettre à jour", "Mettre à jour >"), :class => "btn btn-primary order_button"
%center= submit_tag qit("mettre à jour", "Mettre à jour >"), :class => "btn btn-primary order_button"

View File

@ -0,0 +1,5 @@
class AddMOdrFileToMailHists < ActiveRecord::Migration[6.0]
def change
add_column :mail_hists, :m_odr_file_id, :integer
end
end

View File

@ -0,0 +1,41 @@
class AddImportInfosToPCustomers < ActiveRecord::Migration[6.0]
def change
add_column :p_customers, :past_id, :integer
add_column :p_customers, :imp_cp, :string
add_column :p_customers, :imp_country, :string
add_column :p_customers, :imp_ref, :string
add_column :p_customers, :imp_email, :string
add_column :p_customers, :imp_firstname, :string
add_column :p_customers, :imp_name, :string
add_column :p_customers, :imp_fonction, :string
add_column :p_customers, :imp_organisme, :string
add_column :p_customers, :imp_address, :string
add_column :p_customers, :imp_cp2, :string
add_column :p_customers, :imp_city, :string
add_column :p_customers, :imp_tel, :string
add_column :p_customers, :imp_portable, :string
add_column :p_customers, :imp_lien, :string
add_column :p_customers, :imp_comment, :string
add_column :p_customers, :imp_iban, :string
add_column :p_customers, :imp_bic, :string
add_column :p_customers, :imp_circuit_1, :integer
add_column :p_customers, :imp_circuit_2, :integer
add_column :p_customers, :imp_circuit_3, :integer
add_column :p_customers, :imp_ecran, :string
add_column :p_customers, :imp_partenaire, :string
add_column :p_customers, :imp_blocage, :string
add_column :p_customers, :imp_valid, :string
add_column :p_customers, :imp_user_valid, :string
add_column :p_customers, :imp_offre, :string
add_column :p_customers, :imp_info, :string
add_column :p_customers, :imp_cgu, :string
add_column :p_customers, :imp_test, :string
add_column :p_customers, :imp_stickers, :string
add_column :p_customers, :imp_npai, :string
add_column :p_customers, :npai, :boolean, :default => false
add_column :p_customers, :imp_relance_adresse, :string
add_column :p_customers, :imp_demande_info, :string
add_column :p_customers, :imp_creation, :date
add_column :p_customers, :imp_modification, :date
end
end

View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2020_06_02_230712) do
ActiveRecord::Schema.define(version: 2020_06_11_051849) do
create_table "accounting_zones", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
t.string "name"
@ -1119,6 +1119,7 @@ ActiveRecord::Schema.define(version: 2020_06_02_230712) do
t.datetime "updated_at", precision: 6, null: false
t.integer "p_customer_id"
t.integer "m_odr_prime_id"
t.integer "m_odr_file_id"
t.index ["lang_site_id"], name: "index_mail_hists_on_lang_site_id"
t.index ["m_odr_id"], name: "index_mail_hists_on_m_odr_id"
t.index ["m_odr_rep_id"], name: "index_mail_hists_on_m_odr_rep_id"
@ -1674,6 +1675,43 @@ ActiveRecord::Schema.define(version: 2020_06_02_230712) do
t.integer "nbr_fact_pneus_unused", default: 0
t.boolean "cgv"
t.boolean "rgpd"
t.integer "past_id"
t.string "imp_cp"
t.string "imp_country"
t.string "imp_ref"
t.string "imp_email"
t.string "imp_firstname"
t.string "imp_name"
t.string "imp_fonction"
t.string "imp_organisme"
t.string "imp_address"
t.string "imp_cp2"
t.string "imp_city"
t.string "imp_tel"
t.string "imp_portable"
t.string "imp_lien"
t.string "imp_comment"
t.string "imp_iban"
t.string "imp_bic"
t.integer "imp_circuit_1"
t.integer "imp_circuit_2"
t.integer "imp_circuit_3"
t.string "imp_ecran"
t.string "imp_partenaire"
t.string "imp_blocage"
t.string "imp_valid"
t.string "imp_user_valid"
t.string "imp_offre"
t.string "imp_info"
t.string "imp_cgu"
t.string "imp_test"
t.string "imp_stickers"
t.string "imp_npai"
t.boolean "npai", default: false
t.string "imp_relance_adresse"
t.string "imp_demande_info"
t.date "imp_creation"
t.date "imp_modification"
t.index ["market_discount_id"], name: "index_p_customers_on_market_discount_id"
t.index ["p_customer_cat_id"], name: "index_p_customers_on_p_customer_cat_id"
t.index ["particular_id"], name: "index_p_customers_on_particular_id"

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Some files were not shown because too many files have changed in this diff Show More