:scss
  body{
    font-family:arial, sans-serif;
    font-size:9.4pt;
    padding:0;
    margin:0;
  }

  .page{
    page-break-after: always;
    position:relative;
    width:28.1cm;
    box-sizing:border-box;
   
    
  }
  
  .table{
    width:100%;
    font-size:9.4pt;
    border-collapse:collapse;
    td, th{
      border:1px solid black;
      padding:4px;
      page-break-inside: avoid !important;
      
    }
    td{
      vertical-align:top;
    }
    th{
      text-align:center;
      vertical-align:top;
    }
  }
  

  table tbody tr td:before,
  table tbody tr td:after {
      content : "" ;
      height : 4px ;
      display : block ;
  }

  



  


!!!
%html{:lang => "fr", "xml:lang" => "fr", :xmlns => "http://www.w3.org/1999/xhtml"}
  %head
    %meta{:name=>"viewport", :content=>"width=device-width,initial-scale=1"}
    %meta{ :"http-equiv" => "Content-Type", :content => "text/html; charset=utf-8" }
    =#<link href="https://fonts.googleapis.com/css?family=Cousine:400,700" rel="stylesheet">
    
  %body
    .page
  
      %p{:style => "text-align:center;text-transform:uppercase"}
        Détail d'une remise

      %p{:style => "float:left;"}
        Date :
        =@p_remise.date

      %p{:style => "float:right;"}
        Type de paiement :
        =@p_remise.p_payment_type.name if @p_remise.p_payment_type
        -ppts = []
        -@p_remise.p_payment_types.uniq.each do |ppt|
          -ppts << ppt.name
        =ppts.join(",")
      
      -if @p_remise.p_bank_account
        %p{:style => "text-align:center;"}
          Compte :
          %strong=@p_remise.p_bank_account.p_bank.name
          ="-"
          =@p_remise.p_bank_account.iban
          ="-"
          =@p_remise.p_bank_account.compta_cpt
          ="-"
          =@p_remise.p_bank_account.compta_journ

      %table.table
        %thead
          %tr
            %th
              N° Client
  
            %th{:rowspan => 2}
              Client
  
            %th{:rowspan => 2}
              Date de réglement
    
            %th{:rowspan => 2}
              Echéance
  
            %th{:rowspan => 2}
              Montant
    
        %tbody
          -@p_remise.p_payments.each do |p_payment|
            %tr#p_payment_row{:id => p_payment.id}
              %td=p_payment.p_customer.code if p_payment.p_customer
              
              %td=p_payment.p_customer.show_name if p_payment.p_customer
              %td= l(p_payment.paid_at, :format => :date) if p_payment.paid_at
              %td= l(p_payment.theo_date, :format => :date) if p_payment.theo_date
              %td= number_to_currency p_payment.amount
  
           
  
          
          
        %tr
          %td{:colspan => 5, :style => "text-align:right;"}
            Total 
            pour
            %strong=@p_remise.p_payments.count
            réglement(s)
            
            
            %strong=@p_remise.amount
      
    
        
        
        
        
