%head :css html { -webkit-print-color-adjust: exact; } body{ font-family:arial, sans-serif; } .font-13px { font-size: 13px; } .bordered { border: 1px solid black; border-collapse: collapse; } .line-height-100 { text-align: center; height: 100px; } .line-height-20 { text-align: center; height: 20px; } .border-left { border-left: 1px solid; } .border-top { border-top: 1px solid; } .border-right { border-right: 1px solid; } .border-bottom { border-bottom: 1px solid; } .bg-grey { background-color: rgb(239, 239, 239) } table, tbody { font-size: 13px; } -price_line_block = @price_document.price_line_block %body %table %thead %tr %th{:style => "width: 25%"} %th{:style => "width: 75%"} %tbody %tr %td =image_tag "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAABIFBMVEUAlecBk+gAlOgAlOYBk+b///8AlOT///3///z///oCkugAjN8AkOb8//8AleQAkeUAitoAjOMAkeoAjdoAitYAiNkAleLc9fsAjujm+PdKq971//9qt+QAktwAh9UAkd+JxeP///Wt3erH6u4AjtLZ9vqQzOYwm9kvndRZrtttvuHH6/aj2+vk9/cvpNSk2ua25fAWm99+wtp7utxMsdgunM+99ftpvOKi5OyYyeKL0erQ+Ped3OwAj8xEps8Aic9FquCy3O+QxdUflMq63udyr9Gg1u0AheJtvNd9usyJwdtGpsdlr8nn9vjC3d3Q5+4ulsKV1+RpxuFJuudZwOcAh7g+p+Q9td941OdXtsyGz9hUpbuB0fOM2u9+1eF+0tK2JZYSAAASfklEQVR4nO2aC3/aRpfGdRndRncJxEUWso2EJLAxwhBSHMCJE4cmThuwX7+Ot+5+/2+xZwS+xnHSdvtmm50nv8QBpJn5z5k5zxkZhqGioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi+n8o7nsP4G+TJ65+8pjlMOb+yXocUHQ4j/wwOAOuYb/3IP+SHsEzkMpFASb/ZcOZrZroew/yL+kzPh5Hg/Hw2YglL6znv21sbqSh872H+Rf0EJAzh01FmMb7JIac1ftpR1D8cYljvvdA/7QebkAxi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GFAYiyf1AA1UFeBM0bmD4i7AHZQe0A3SGSAoCJ+BgKqGUEw1y6bcSrh0/dlfVBYwyOoqiIERFMXO/BfazOu1W934pfE/8I7q2bdLBI3XMo7r94EvfL/wKIVPUJMgJ4JhxkIv830p4zfkfJKxADElNw3D5B8g7QMj+/YT/mRjC/tHakGnKsPvhlecksaTEwarFLw/7D+hrhN96x9dn88uE+7JSKZPUJTKQPSY1peL9YISZr/gndtW2VVu17ERROtaPRchOYkXwX29vv9wGvaxs6fsmL/5IhLARfUVYf7dCEBTleEa+z/cjEbJu1ovJEylf92txs+0yxg9GyDGmW5rNIhD51/OKp0c/EiFjGAwp0chDMo48I7pu8cchZO59YeG2RUpICf/PED6u/w06SkgJKSElpISUkBJSQkpICSkhJaSElJASUkJKSAkpISWkhJSQElJCSkgJKSElpISUkBJSQkpICSkhJaSElJASUkJKSAkpISWkhJSQElJCSkgJKSElpISUkBJSQkpICSkhJaSElJASUkJKSAkpISWkhJTw+xP+D+whwke+UwSRAAAAAElFTkSuQmCC", :style => "width:200px;display:block;margin:auto;" %td{:style => "padding-left: 35px"} %strong{style: "font-size: 20px;"} S.A.S PRESTAPHONE %p{style: "line-height: 3px;"} PONT DE BEAUVOISIN %p{style: "line-height: 3px;"} Avenue Jean Jaures 73330 PONT DE BEAUVOISIN %p{style: "line-height: 3px;"} 74330 POISY %p{style: "line-height: 20px;"} TEL :0981251293 %table %thead %tr %th{:style => "width: 15%"} %th{:style => "width: 50%"} %th{:style => "width: 25%"} %tbody %tr %td %td %td %strong{style: "line-height: 70px;"} FACTURE =@price_document.d_number %tr %td{style: "line-height: 3px;"} Date : %td{style: "line-height: 3px;"} =l @price_document.date, :format => :date %td %p{style: "line-height: 3px;"} Josef Falser %p{style: "line-height: 3px;"} zona produttiva Bodner 2 %p{style: "line-height: 3px;"} 39053 Prato Isarco, IT -if @price_document.label == "Bon de livraison" -@bl = true -particular_doc = price_line_block.particular_send -else -particular_doc = price_line_block.particular_bill -if particular_doc.organisation? %strong=particular_doc.organisation -if particular_doc.com_name? %br =particular_doc.com_name %br -if particular_doc.firstname? or particular_doc.name? =particular_doc.civilite =particular_doc.firstname =particular_doc.name %br =particular_doc.address_2 -if particular_doc.address_3? %br =particular_doc.address_3 %br =particular_doc.cp =particular_doc.city %br =particular_doc.country %table{style: "margin-top: 40px"} %thead %tr %th.border-left.border-top{:style => "width: 5%"} %th.border-left.border-top{:style => "width: 20%"} DESIGNATION %th.border-left.border-top{:style => "width: 45%"} DESCRIPTION %th.border-left.border-top{:style => "width: 15%"} PRIX UNITAIRE %th.border-left.border-top.border-right{:style => "width: 15%"} TOTAL %tbody %tr.line-height-100 %td.border-left.border-top 1 %td.border-left.border-top SMARTPHONE RECONDITIONNE %td.border-left.border-top Samsung Galaxy Xcover 4 | SIM unique | schwarz %td.border-left.border-top 147,00 € %td.border-left.border-top.border-right 147,00 € %tr.line-height-100 %td.border-left.border-top %td.border-left.border-top %td.border-left.border-top IMEI : Non renseigne %td.border-left.border-top %td.border-left.border-top.border-right %tr.line-height-20 %td.border-top %td.border-top %td.border-top %td.border-left.border-top Total HT %td.border-top.border-left.border-right.bg-grey %strong 147,00 € %tr.line-height-20 %td %td %td %td.border-left Taux T.V.A. %td.border-left.border-right.bg-grey %strong TVA/MARGE %tr.line-height-20 %td %td %td %td.border-left.border-bottom %strong Total TTC %td.border-left.border-right.border-bottom.bg-grey %strong 147,00 € .clear %br %br %br %br %br %br %br %br %br %br %br %br %br %br %br %br %br %br %table.table{:style => "width:auto;"} %tr %td N° Client %td Date de commande %td Représentant -if @price_document.label != "Avoir" %td Semaine de livraison souhaitée %td Nombre de colis -elsif pd = PriceDocument.where(:id => @price_document.facture_id).first %td Réf. facture %tr %td=@price_document.p_customer.code if @price_document.p_customer %td =l price_line_block.creation_date if price_line_block.creation_date %td =@price_document.p_commercial.long_name if @price_document.p_commercial -if @price_document.label != "Avoir" %td =l price_line_block.wish_date, :format => "%V" (du =l price_line_block.wish_date.beginning_of_week au =l price_line_block.wish_date.end_of_week ) %td =price_line_block.nbr_ship -elsif pd %td =pd.d_number -if price_line_block.customer_ref? %p Référence commande personnalisée : =price_line_block.customer_ref -if particular_doc -range_part = price_line_block.particular_send -range_part = range_part.particular_ref if range_part.particular_ref -oras = [] -OpenRange.where(:id => (OpenRange.all.ids - range_part.open_ranges.ids)).each do |ora| -oras << ora.name -if oras.size > 0 %p Jour(s) de fermeture : =oras.join(", ") %br %table.table %thead %tr %th Référence %th Désignation %th Qté [U] -if true or @price_document.label != "Avoir" %th Qté [Kg] -if !@bl -if @price_document.label != "Avoir" %th P.U. HT [Kg] %th TVA -if @price_document.label != "Avoir" -if !price_line_block.remise_ecole_ok %th Remise %br Marché %br annuel -if price_line_block.ca_remise_qte_ok %th Remise %br Qté livrée %br ="/cde" -if price_line_block.remise_pre_order_ok %th Remise %br commande %br anticipée -if price_line_block.discount_comptant %th Remise %br comptant -if price_line_block.remise_enrobage_ok %th Remise %br enrobage -else %th Remise %br école -if @price_document.label != "Avoir" %th P.U. Net -else %th P.U. %th Montant HT %tbody -price_line_block.price_lines.each do |price_line| %tr %td =price_line.ref -if price_line.p_product_ref and price_line.p_product_ref.assembled and @bl %br Contient les références primaires suivantes : -price_line.p_product_ref.p_product_assembleds.all.each do |ppa| %br %strong =ppa.qte X =ppa.p_product_ref.p_product.code %td =price_line.title %td.numeraire =price_line.qte -if true or @price_document.label != "Avoir" %td.numeraire =price_line.weight_qte.to_f.round(3) -if !@bl -if @price_document.label != "Avoir" %td.numeraire =number_to_currency price_line.ca_price_u_kg_ht %td.numeraire =price_line.tva_account_value.to_s+"%" -if @price_document.label != "Avoir" -if !price_line_block.remise_ecole_ok %td.numeraire =price_line.discount_market_percent.to_s+"%" %br =number_to_currency price_line.ca_discount_market_ht -if price_line_block.ca_remise_qte_ok %td.numeraire =price_line.discount_qte_percent.to_s+"%" %br =number_to_currency price_line.ca_discount_qte_ht -if price_line_block.remise_pre_order_ok %td.numeraire =price_line.discount_delay_percent.to_s+"%" %br =number_to_currency price_line.ca_discount_delay_ht -if price_line_block.discount_comptant %td.numeraire =price_line.discount_comptant_percent.to_s+"%" %br =number_to_currency price_line.ca_discount_comptant_ht -if price_line_block.remise_enrobage_ok %td.numeraire =price_line.discount_enrobage_percent.to_s+"%" %br =number_to_currency price_line.ca_discount_enrobage_ht -else %td.numeraire =price_line.discount_ecole_percent.to_s+"%" %br =number_to_currency price_line.ca_discount_ecole_ht -if @price_document.label != "Avoir" %td.numeraire =number_to_currency price_line.ca_price_u_kg_net_ht -else %td.numeraire =number_to_currency price_line.ca_price_u_ht %td.numeraire =number_to_currency price_line.tot_amount_ht -if !@bl %table.table{:style => "width:auto;float:right;border-top:0;"} -if @price_document.label != "Avoir" %tr %th{:style => "border-top:0;"} Poids total :    %td.numeraire{:style => "border-top:0;"} ="#{price_line_block.weight_tot}Kg" %tr %th Total remises U. HT : %td.numeraire =number_to_currency price_line_block.cumul_discount_ht %tr %th Total HT %td.numeraire =number_to_currency price_line_block.tot_lines_ht -if @price_document.label != "Avoir" -if price_line_block.tot_discount_ht != 0.0 %tr %th Remise commerciale exceptionnelle (HT ="(#{price_line_block.ct_tot_discount_percent}%)" %td.numeraire =number_to_currency price_line_block.tot_discount_ht %tr %th Frais de port HT ="(TVA #{price_line_block.fdp_tva_rate}%)" %td.numeraire =number_to_currency price_line_block.tot_fdp_ht %tr %th Total HT Net %td.numeraire =number_to_currency price_line_block.tot_amount_ht %tr %th Total TVA %td.numeraire =number_to_currency price_line_block.tot_amount_tva %tr %th Total TTC %td.numeraire =number_to_currency price_line_block.tot_amount_ttc %tr %th   %th %tr %th Net à payer %td.numeraire =number_to_currency price_line_block.tot_amount_ttc -else %table.table{:style => "width:auto;float:right;border-top:0;"} %tr %th{:style => "border-top:0;"} Poids total :    %td.numeraire{:style => "border-top:0;"} ="#{price_line_block.weight_tot}Kg" -if !@bl %br %br %table.table{:style => "width:auto;"} %tr %th Taux %br TVA %th Montant HT Net %th Montant TVA -tva_rates = {} -price_line_block.price_lines.each do |pl| -tva_rates[pl.tva_account_value.to_s] = tva_rates[pl.tva_account_value.to_s] || {:montant => 0.0, :tva => 0.0} -tva_rates[pl.tva_account_value.to_s][:montant] += pl.tot_amount_ht.to_f - (pl.tot_amount_ht.to_f * ((price_line_block.ct_tot_discount_percent and price_line_block.ct_tot_discount_percent != 0.0) ? (price_line_block.ct_tot_discount_percent.to_f/100) : 0.0)) -tva_rates[pl.tva_account_value.to_s][:tva] += pl.tot_amount_tva.to_f - (pl.tot_amount_tva.to_f * ((price_line_block.ct_tot_discount_percent and price_line_block.ct_tot_discount_percent != 0.0) ? (price_line_block.ct_tot_discount_percent.to_f/100) : 0.0.to_f)) -tva_rates[price_line_block.fdp_tva_rate.to_s] = tva_rates[price_line_block.fdp_tva_rate.to_s] || {:montant => 0.0, :tva => 0.0} -tva_rates[price_line_block.fdp_tva_rate.to_s][:montant] += price_line_block.tot_fdp_ht -tva_rates[price_line_block.fdp_tva_rate.to_s][:tva] += price_line_block.tot_fdp_tva -tva_rates.each do |key, value| %tr %td ="#{key}%" %td =number_to_currency value[:montant] %td =number_to_currency value[:tva] -if @bl %div{:style => "width:60%;"} =simple_format price_line_block.bl_comment -if !@bl and @price_document.label != "Avoir" %br %br %table.table{:style => "width:auto;"} %tr %th Échéance %th Mode de paiement %th Montant net %tr %td -if @price_document.label == "Facture" =l @price_document.payment_end_at -else =price_line_block.payment_delais.to_i jours %td =price_line_block.p_payment_type.name if price_line_block.p_payment_type %td =number_to_currency price_line_block.tot_amount_ttc .clear -if @price_document.label == "Facture" %p.legals{:style => "text-align:center;font-size:10px;margin-top:10px;olwen_demo_app"} Pas d'escompte pour paiement anticipé, passée la date d'échéance, tout paiement différé entraine l'application d'une pénalité de 3 fois le taux d'intérêt légal. (loi 2008-776 du 04/08/2008) ainsi qu'une indemnité forfaitaire pour frais de recouvrement de 40 euros (Décret 2012-1115 du 02/10/2012). .clear