**********************************************************************************************************************************/ // all card if ($allcard == 1) { $afiche = $cn->get_array("select fd_id from vw_fiche_def where ad_id=" . ATTR_DEF_ACCOUNT . " order by fd_label asc"); } else { $afiche[0] = array('fd_id' => $_REQUEST['cat']); } if ($allcard == 0) { echo $str_add_card; } echo $export_csv; echo $export_pdf; echo $export_print; $fiche = new Fiche($cn); for ($e = 0; $e < count($afiche); $e++) { $array = Fiche::get_fiche_def($cn, $afiche[$e]['fd_id'], 'name_asc'); foreach ($array as $card) { $row = new Fiche($cn, $card['f_id']); $letter = new Lettering_Card($cn); $letter->set_parameter('quick_code', $row->strAttribut(ATTR_DEF_QUICKCODE)); $letter->set_parameter('start', $_GET['start']); $letter->set_parameter('end', $_GET['end']); // all if ($_GET['histo'] == 0) { $letter->get_all(); } // lettered if ($_GET['histo'] == 1) { $letter->get_letter(); } // unlettered
$fill = 1; } else { $pdf->SetFillColor(0, 0, 0); $fill = 0; } $idx++; $pdf->Cell(30, 7, $oCard->strAttribut(ATTR_DEF_QUICKCODE), 0, 0, 'L', $fill); $pdf->Cell(80, 7, $oCard->strAttribut(ATTR_DEF_NAME), 0, 0, 'L', $fill); $pdf->Cell(20, 7, sprintf('%.02f', $solde['debit']), 0, 0, 'R', $fill); $pdf->Cell(20, 7, sprintf('%.02f', $solde['credit']), 0, 0, 'R', $fill); $pdf->Cell(20, 7, sprintf('%.02f', abs($solde['solde'])), 0, 0, 'R', $fill); $pdf->Cell(20, 7, $solde['solde'] < 0 ? 'CRED' : 'DEB', 0, 0, 'C', $fill); $pdf->Ln(); } } else { $array = Fiche::get_fiche_def($cn, $_GET['cat'], 'name_asc'); /* * You show now the result */ if ($array == null) { exit; } $tab = array(13, 25, 55, 20, 20, 12, 20); $align = array('L', 'L', 'L', 'R', 'R', 'R', 'R'); foreach ($array as $row_fiche) { $row = new Fiche($cn, $row_fiche['f_id']); $letter = new Lettering_Card($cn); $letter->set_parameter('quick_code', $row->strAttribut(ATTR_DEF_QUICKCODE)); $letter->set_parameter('start', $_GET['start']); $letter->set_parameter('end', $_GET['end']); // all