}
//-----------------------------------------------------------------------------
// Detail printing for ACH or VEN : 1 row resume the situation with VAT, DNA
// for Misc the amount
// For Financial only the tiers and the sign of the amount
//-----------------------------------------------------------------------------
if ($get_option == 1) {
    //-----------------------------------------------------
    if ($jrn_type == 'ODS' || $jrn_type == 'FIN' || $jrn_type == 'GL') {
        $Row = $Jrn->get_rowSimple($get_from_periode, $get_to_periode, 0);
        printf('" operation";' . '"Date";' . '"N° Pièce";' . '"Tiers";' . '"commentaire";' . '"internal";' . '"montant";' . "\r\n");
        foreach ($Row as $line) {
            echo $line['num'] . ";";
            echo $line['date'] . ";";
            echo $line['jr_pj_number'] . ";";
            echo $Jrn->get_tiers($line['jrn_def_type'], $line['jr_id']) . ";";
            echo $line['comment'] . ";";
            echo $line['jr_internal'] . ";";
            //	  echo "<TD>".$line['pj'].";";
            // If the ledger is financial :
            // the credit must be negative and written in red
            // Get the jrn type
            if ($line['jrn_def_type'] == 'FIN') {
                $positive = $cn->get_value("select qf_amount from quant_fin  " . " where jr_id=" . $line['jr_id']);
                echo nb($positive);
                echo ";";
            } else {
                echo nb($line['montant']) . ";";
            }
            printf("\r\n");
        }
 /**
  * @covers Acc_Ledger::get_tiers
  * @todo   Implement testGet_tiers().
  */
 public function testGet_tiers()
 {
     $this->object->get_tiers($p_jrn_type, $jr_id);
 }
 //---
 echo '<TABLE class="result">';
 echo "<TR>" . "<th> operation </td>" . "<th>Date</th>" . "<th> n° de pièce </th>" . "<th>internal</th>" . th('Tiers') . "<th>Commentaire</th>" . "<th>Total opération</th>" . "</TR>";
 // set a filter for the FIN
 $i = 0;
 $tot_amount = 0;
 bcscale(2);
 foreach ($Row as $line) {
     $i++;
     $class = $i % 2 == 0 ? ' class="even" ' : ' class="odd" ';
     echo "<tr {$class}>";
     echo "<TD>" . $line['num'] . "</TD>";
     echo "<TD>" . $line['date'] . "</TD>";
     echo "<TD>" . h($line['jr_pj_number']) . "</TD>";
     echo "<TD>" . HtmlInput::detail_op($line['jr_id'], $line['jr_internal']) . "</TD>";
     $tiers = $Jrn->get_tiers($line['jrn_def_type'], $line['jr_id']);
     echo td($tiers);
     echo "<TD>" . h($line['comment']) . "</TD>";
     //	  echo "<TD>".$line['pj']."</TD>";
     // If the ledger is financial :
     // the credit must be negative and written in red
     // Get the jrn type
     if ($line['jrn_def_type'] == 'FIN') {
         $positive = $cn->get_value("select qf_amount from quant_fin where jr_id=\$1", array($line['jr_id']));
         if ($cn->count() == 0) {
             $positive = 1;
         } else {
             $positive = $positive > 0 ? 1 : 0;
         }
         echo "<TD align=\"right\">";
         echo $positive == 0 ? "<font color=\"red\">  - " . nbm($line['montant']) . "</font>" : nbm($line['montant']);