This repository has been archived on 2021-11-24. You can view files and clone it, but cannot push or open issues or pull requests.
phone_app/app/views/admin/v_contacts/_show.html.haml
2021-08-23 10:26:02 +02:00

191 lines
4.4 KiB
Plaintext

.qi_header
.right
%h1
Cartes
%span
=@v_contact.codemanaginn
%span
=@v_contact.civilite
=@v_contact.nom
=@v_contact.prenom
.qi_kpi
.right
.kpi{:style => "background:#57a36d;"}
.number
=number_to_currency @v_contact.cagnotte
.label
.desc
Cumul
.kpi{:style => "background:#3B7DDD;"}
.number
=number_to_currency @v_contact.total
.label
.desc
Historique CA
.kpi{:style => "background:#3B7DDD;"}
.number
= @v_contact.nbr_mvt
.label
.desc
Mouvements
.qi_kpi
.kpi{:style => "background:#FAA114;padding:15px 20px;padding-top:10px;height:318px;"}
%center{:style => "font-size:50px;"}
= ic(:"coins")
-if @v_contact.max_ri_amount.to_f > 0.0
#ri_form
-@v_bda = @v_contact.v_bdas.new(:bda_type => "ri", :amount => @v_contact.max_ri_amount)
=render :partial => "admin/v_bdas/form"
-else
%center
Aucune remise immédiate possible
.kpi{:style => "background:#FAA114;padding:15px 20px;padding-top:10px;width:300px;"}
-@volume_periodique = VolumePeriodique.new(:datedebut => Date.today, :codemanaginn => @v_contact.codemanaginn, :codesociete => (current_admin and current_admin.societe ? current_admin.societe.socmanaginn : @v_contact.codeproprietaire))
#volume_periodique_form
%center{:style => "font-size:50px;"}
= ic(:"file-invoice")
=render :partial => "admin/volume_periodiques/form"
%br
-if current_admin.super_admin
=link_to "Générer les bons d'achats", generate_ba_admin_v_contact_path(@v_contact), :remote => false, :class => "btn btn-primary"
=#link_to "Saisir un CA", new_admin_volume_periodique_path(:codemanaginn => @v_contact.codemanaginn, :codesociete => @v_contact.codeproprietaire), :remote => true, :class => "btn btn-primary"
.clear
.qi_row{:style => "margin-top:-20px;"}
.qi_pannel
.row
.col-sm
Infos personnelles
= link_to i(:pencil), edit_admin_v_contact_path(@v_contact), :remote => true
%table.table.table-striped.table-hover.table-bordered
%tr
%td Actif ?
%td=@v_contact.enabled ? "Oui" : "Non"
%tr
%td Adresse
%td
=@v_contact.adresse1
-if @v_contact.adresse2?
%br
=@v_contact.adresse2
%tr
%td Ville
%td
=@v_contact.codepostal
=@v_contact.ville
%tr
%td Tel portable
%td=@v_contact.numportable
%tr
%td Tel
%td=@v_contact.numtel
%tr
%td Email
%td=@v_contact.mailto
.col-sm
Paramètres locaux
%table.table.table-striped.table-hover.table-bordered
-if @v_contact.societe
%tr
%td Centre
%td=link_to @v_contact.societe.nom, [:admin, @v_contact.societe]
-if @v_contact.societe.bon_type == "Bon d'achat"
%tr
%td Type
%td Bon d'achat
%tr
%td Seuil
%td=number_to_currency @v_contact.societe.seuil
%tr
%td Montant
%td=number_to_currency @v_contact.societe.bon_amount
%tr
%td Envoyer par
%td=@v_contact.societe.send_via
-else
%tr
%td Type
%td Remises immédiates
%tr
%td Remises
%td=number_to_currency @v_contact.societe.remise_percent, :unit => "%"
-if false
.qi_row
.qi_pannel.qi_plain.padding
:scss
#ri_form{
.form-group{
margin:0;
}
}
=#link_to "Voir tous les mouvements", admin_volume_periodiques_path(:v_contact_id => @v_contact.id, :v_contact => @v_contact.member_label)
=#link_to "Voir tous les remises / bons d'achats", admin_v_bdas_path(:v_contact_id => @v_contact.id, :v_contact => @v_contact.member_label)