suite
This commit is contained in:
parent
8232f07e28
commit
4493797357
@ -74,7 +74,7 @@ class MOdrRep < ApplicationRecord
|
||||
def send_mail_type(slug, element = nil)
|
||||
|
||||
if self.m_odr and mail_type = self.m_odr.mail_types.where(:slug => slug).first and self.particulars.first and self.particulars.first.email?
|
||||
mail_hist = MailHist.generate_mail(:fr, mail_type, self.particulars.first.email, {:arguments => {:nom_odr => self.m_odr.name, :remise => number_to_currency(self.remise.to_f), :civilite => self.particular_civilite, :nom => self.particular_name, :prenom => self.particular_firstname }, :m_odr => self.m_odr, :m_odr_rep => self, :element => element})
|
||||
mail_hist = MailHist.generate_mail(:fr, mail_type, self.particulars.first.email, {:arguments => {:bon_achat => ("<center><img src='#{self.ba_url}' style='display:block;margin;auto;' /></center>" if self.m_odr.ba_generation),:nom_odr => self.m_odr.name, :remise => number_to_currency(self.remise.to_f), :civilite => self.particular_civilite, :nom => self.particular_name, :prenom => self.particular_firstname }, :m_odr => self.m_odr, :m_odr_rep => self, :element => element})
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -157,7 +157,17 @@ RIB :
|
||||
|
||||
-if @m_odr_rep.m_odr.ba_generation
|
||||
|
||||
=debug @m_odr_rep.generate_ba
|
||||
- @m_odr_rep.generate_ba
|
||||
=link_to "Voir le bon d'achat", @m_odr_rep.ba_url, :class => "btn btn-primary"
|
||||
|
||||
-if false
|
||||
|
||||
%p Test mail
|
||||
|
||||
-if m_odr_virement = @m_odr_rep.m_odr_virements.first
|
||||
-m_odr_virement.m_odr_rep.send_mail_type("succes", m_odr_virement)
|
||||
%p test
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ba
|
||||
=image_tag "https://offres.market-inn.fr/"+@m_odr_rep.m_odr.ba_image_file.file.url if @m_odr_rep.m_odr.ba_image_file
|
||||
=image_tag (Rails.env.development? ? "http://localhost:4000" : "https://offres.market-inn.fr/")+@m_odr_rep.m_odr.ba_image_file.file.url if @m_odr_rep.m_odr.ba_image_file
|
||||
|
||||
|
||||
.name{:style => "top:#{@m_odr_rep.m_odr.ba_name_y}px;"}
|
||||
|
@ -35,8 +35,6 @@
|
||||
#head=render :partial => "admin/m_odr_reps/head"
|
||||
|
||||
|
||||
|
||||
|
||||
%hr
|
||||
Achat
|
||||
.row
|
||||
|
@ -47,6 +47,8 @@
|
||||
= f.input :thank_text, :label => "Texte remerciement"
|
||||
|
||||
= f.input :buy_infos, :label => "Texte info supplémentaire achats"
|
||||
|
||||
= f.input :email_from, :label => "Adresse email d'envoi :"
|
||||
|
||||
|
||||
.qi_row
|
||||
|
@ -58,7 +58,7 @@
|
||||
|
||||
.qi_tab_header
|
||||
.right{:style => "text-align:right;"}
|
||||
= link_to 'Ajouter', new_admin_m_odr_file_type_path(:m_odr => @m_odr.id), :class => "btn btn-primary", :remote => true
|
||||
= link_to 'Ajouter', new_admin_m_odr_file_type_path(:m_odr_id => @m_odr.id), :class => "btn btn-primary", :remote => true
|
||||
|
||||
-params[:search][:per_page] = params[:search][:per_page] || 50
|
||||
-per_page = params[:search][:per_page]
|
||||
|
Loading…
x
Reference in New Issue
Block a user