88 lines
3.1 KiB
Plaintext

-if @order
.clear
%h2 Vos coordonnées
-if !current_annonce_account.pro
=current_annonce_account.firstname
=current_annonce_account.name
-else
=current_annonce_account.organisation
%p
=current_annonce_account.address
-if current_annonce_account.address2?
%br
current_annonce_account.address2
%br
=current_annonce_account.cp
=current_annonce_account.city
%br
=current_annonce_account.country
=link_to "modifier mes infos de facturation", billing_public_orders_path(:credit_product_id => params[:credit_product_id]), :remote => true
%h3 Récapitulatif
%p
Commande de
= @order.credit_product.nbr_credits_final(current_annonce_account)
crédits
pour un montant de
%strong
=number_to_currency @order.credit_product.price_ttc_final(current_annonce_account), :unit => @order.devise.icon
TTC
(
=number_to_currency @order.credit_product.price_ht_final(current_annonce_account), :unit => @order.devise.icon
HT
)
-if current_annonce_account.commissions.sum(:amount) > 0.0 and !@order.with_com
%p=link_to "Utiliser mon solde de commission (#{number_to_currency(current_annonce_account.solde_commissions(@order.devise_id), :unit => @order.devise.icon)}) et re-calculer le total", new_public_order_path(:credit_product_id => @order.credit_product.id, :with_com => true), :class => "btn btn-primary", :remote => true
-if @order.with_com
%p
Utilisation de mes commissions :
%strong=number_to_currency @order.evaluate_use_coms, :unit => @order.devise.icon
(
votre solde de commission passera à
=number_to_currency @order.evaluate_solde_coms, :unit => @order.devise.icon
)
%p
Il vous restera à payer :
%strong
=number_to_currency @order.evaluate_price_with_coms_ttc, :unit => @order.devise.icon
TTC
(
=number_to_currency @order.evaluate_price_with_coms_ht, :unit => @order.devise.icon
HT
)
%p
-if @order.with_com
%p=link_to "Ne pas utiliser mon solde de commissions", new_public_order_path(:credit_product_id => @order.credit_product.id), :class => "btn btn-primary", :remote => true
%p
Il vous restera à payer :
%strong
=number_to_currency @order.evaluate_price_with_coms_ttc, :unit => @order.devise.icon
TTC
(
=number_to_currency @order.evaluate_price_with_coms_ht, :unit => @order.devise.icon
HT
)
%h3 Valider ma commande
=semantic_form_for [:public, @order], :remote => true do |f|
=hidden_field_tag :credit_product_id, params[:credit_product_id]
=hidden_field_tag :with_com, params[:with_com]
=f.input :cgv, :as => :boolean, :label => "J'ai lu et j'accepte les conditions générales de vente."
=f.input :retractation, :as => :boolean, :label => "Comme indiqué dans les conditions générales de vente, j'accepte de renoncer à mon droit de rétractation, mon compte étant crédité dès la validation de mon paiement."
=f.submit "Valider ma commande et choisir le mode de paiement", :commit => "cb", :class => "btn btn-primary btn-large"