$desc = str_replace("</i>", "", $desc); $desc = str_replace('"', "'", $desc); $desc = str_replace(";", ",", $desc); printf("\"%s\";\"%s\";\"%s\";\"%s\";\"%s\";\"%s\";%s;%s\n", $op['j_id'], $op['jr_pj_number'], $op['internal'], $op['j_date'], $op['poste'], $desc, nb($op['deb_montant']), nb($op['cred_montant'])); } exit; } //----------------------------------------------------------------------------- // 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);
//----------------------------------------------------- // If print is asked // First time in html // after in pdf or cvs //----------------------------------------------------- if (isset($_REQUEST['bt_html'])) { require_once NOALYSS_INCLUDE . '/class_acc_ledger.php'; $d = var_export($_GET, true); $Jrn = new Acc_Ledger($cn, $_GET['jrn_id']); $Jrn->get_name(); switch ($_GET['p_simple']) { case "0": $Row = $Jrn->get_row($_GET['from_periode'], $_GET['to_periode']); break; case "1": $Row = $Jrn->get_rowSimple($_GET['from_periode'], $_GET['to_periode']); break; case "2": $Row = $Jrn->get_rowSimple($_GET['from_periode'], $_GET['to_periode']); break; default: var_dump($_GET['p_simple']); die(__FILE__ . ":" . __LINE__ . " error unknown style "); } $rep = ""; $hid = new IHidden(); echo '<div class="content">'; echo '<h2 class="info">' . h($Jrn->name) . '</h2>'; echo "<table>"; echo '<TR>'; echo '<TD><form method="GET" ACTION="?">' . dossier::hidden() . $hid->input("type", "jrn") . $hid->input('p_action', 'impress') . "</form></TD>";