suite
This commit is contained in:
parent
abad718cec
commit
5fc91dcdda
@ -174,6 +174,7 @@ class Customer < ActiveRecord::Base
|
||||
|
||||
before_validation do
|
||||
|
||||
if !self.particular_bill and !self.particular_send
|
||||
customer = self
|
||||
|
||||
customer.particular_bill = customer.particular_bill || Particular.new
|
||||
@ -196,6 +197,8 @@ class Customer < ActiveRecord::Base
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -130,6 +130,9 @@
|
||||
=@product_order.particular_bill.city
|
||||
%br
|
||||
=@product_order.particular_bill.country
|
||||
%br
|
||||
%br
|
||||
=@product_order.particular_bill.tel
|
||||
|
||||
|
||||
%td{:style => "width:5.5cm;border:0"}
|
||||
@ -152,6 +155,9 @@
|
||||
=@product_order.particular_send.city
|
||||
%br
|
||||
=@product_order.particular_send.country
|
||||
%br
|
||||
%br
|
||||
=@product_order.particular_bill.tel
|
||||
|
||||
%table.table{:style => "width:100%;margin:1cm 0;"}
|
||||
%tr
|
||||
@ -191,30 +197,40 @@
|
||||
|
||||
|
||||
%tr
|
||||
%td{:colspan => 3, :style => "border:0;text-align:right;"}
|
||||
%td{:colspan => 3, :rowspan => 3, :style => "border:0;text-align:left;"}
|
||||
%p
|
||||
%br
|
||||
Mode de paiment :
|
||||
-if @product_order.product_order_payment_type_ok_id == 3
|
||||
CB
|
||||
-elsif @product_order.product_order_payment_type_ok_id == 1
|
||||
Chèque
|
||||
-elsif @product_order.product_order_payment_type_ok_id == 2
|
||||
Virement
|
||||
-elsif @product_order.product_order_payment_type_ok_id == 4
|
||||
Mandat administratif
|
||||
%br
|
||||
%br
|
||||
Franco de port pour le Pays Voironnais
|
||||
%td Total HT :
|
||||
%td{:style => "text-align:right;"}= number_to_currency(@product_order.archived_total_ht, locale: :fr)
|
||||
|
||||
%tr
|
||||
%td{:colspan => 3, :style => "border:0;text-align:right;"}
|
||||
|
||||
%td TVA :
|
||||
%td{:style => "text-align:right;"}= number_to_currency(@product_order.archived_total_tva, locale: :fr)
|
||||
|
||||
%tr
|
||||
%td{:colspan => 3, :style => "border:0;text-align:right;"}
|
||||
|
||||
%td Total TTC :
|
||||
%td{:style => "text-align:right;"}= number_to_currency(@product_order.archived_total_ttc, locale: :fr)
|
||||
|
||||
|
||||
|
||||
|
||||
-if false
|
||||
%p
|
||||
Mode de paiment :
|
||||
-if @product_order.product_order_payment_type_ok_id == 3
|
||||
CB
|
||||
-elsif @product_order.product_order_payment_type_ok_id == 1
|
||||
Chèque
|
||||
|
||||
|
||||
|
||||
%br
|
||||
|
||||
<!---
|
||||
|
@ -37,6 +37,10 @@
|
||||
CB
|
||||
-elsif @product_order.product_order_payment_type_ok_id == 1
|
||||
Chèque
|
||||
-elsif @product_order.product_order_payment_type_ok_id == 2
|
||||
Virement
|
||||
-elsif @product_order.product_order_payment_type_ok_id == 4
|
||||
Mandat administratif
|
||||
|
||||
|
||||
%table.table
|
||||
|
@ -49,5 +49,5 @@
|
||||
.content= yield
|
||||
|
||||
.bottom{:style => "padding:10px;font-size:0.9em;"}
|
||||
=link_to image_tag("http://negos.pro/logo_mail.png", :style => "margin:20px auto;display:block;height:200px;"), "http://negos.pro"
|
||||
=link_to image_tag("http://negos.pro/logo_mail.png", :style => "margin:20px auto;display:block;width:180px;max-width:100%;"), "http://negos.pro"
|
||||
|
@ -4,9 +4,17 @@
|
||||
|
||||
%p Bonjour,
|
||||
|
||||
%p Nous vous remercions pour votre pré-commande, celle-ci sera expédiée dès que nous aurons reçu votre règlement.
|
||||
%p Nous vous remercions pour votre pré-commande.
|
||||
|
||||
%p Vous trouverez ci-dessous le récapitulatif de cette commande :
|
||||
%p Nous vous confirmerons prochainement la date de livraison.
|
||||
|
||||
%p Par ailleurs, celle-ci vous sera expédiée dès que nous aurons reçu votre règlement.
|
||||
|
||||
%p
|
||||
Pour cela, vous pouvez contacter LA VOUISIENNE au 04 76 55 30 94 ou par mail:
|
||||
=link_to "contact@lavouisienne.fr.", "mailto:contact@lavouisienne.fr"
|
||||
|
||||
%p Vous trouverez ci-dessous le récapitulatif de votre commande :
|
||||
|
||||
=render :partial => "public/product_orders/mail_recap"
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
=debug params[:product_order][:particular_idem]
|
||||
=debug params[:product_order]
|
||||
%br
|
||||
%br
|
||||
|
||||
suite
|
||||
|
||||
=debug @product_order.update_attributes(params.require(:product_order).permit!)
|
||||
=debug @product_order.errors
|
Loading…
x
Reference in New Issue
Block a user