/** * @covers Acc_Balance::filter_cat * @todo Implement testFilter_cat(). */ public function testFilter_cat() { $this->object->jrn = 1; $this->object->filter_cat(array()); $this->assertEquals($this->object->jrn, null); $this->object->filter_cat(array('FIN')); $this->assertEquals($this->object->jrn[0], 2); }
} } echo HtmlInput::hidden("from_poste", $_GET['from_poste']) . HtmlInput::hidden("to_poste", $_GET['to_poste']); echo HtmlInput::get_to_hidden(array('unsold', 'previous_exc')); echo "</form></TD>"; echo '<td style="vertical-align:top">'; echo HtmlInput::print_window(); echo '</td>'; echo "</TR>"; echo "</table>"; } //----------------------------------------------------- // Display result //----------------------------------------------------- if (isset($_GET['view'])) { $bal = new Acc_Balance($cn); if ($_GET['p_filter'] == 1) { for ($e = 0; $e < count($selected); $e++) { if (isset($selected[$e]) && in_array($selected[$e], $array)) { $bal->jrn[] = $selected[$e]; } } } if ($_GET['p_filter'] == 0) { $bal->jrn = null; } if ($_GET['p_filter'] == 2 && isset($_GET['r_cat'])) { $bal->filter_cat($_GET['r_cat']); } $bal->from_poste = $_GET['from_poste']; $bal->to_poste = $_GET['to_poste'];
static function test_me() { require 'class_user.php'; global $g_user; $cn = new Database(dossier::id()); $g_user = new User($cn); $a = new Acc_Balance($cn); $a->get_row(163, 175, 1); var_dump($a); }
if (!defined('ALLOWED')) { die('Appel direct ne sont pas permis'); } include_once "ac_common.php"; require_once NOALYSS_INCLUDE . '/class_database.php'; include_once "class_acc_balance.php"; require_once NOALYSS_INCLUDE . '/header_print.php'; require_once NOALYSS_INCLUDE . '/class_dossier.php'; require_once NOALYSS_INCLUDE . '/class_pdf.php'; $gDossier = dossier::id(); bcscale(4); $cn = new Database($gDossier); $rep = new Database(); require_once NOALYSS_INCLUDE . '/class_user.php'; $g_user->Check(); $bal = new Acc_Balance($cn); extract($_GET); $bal->jrn = null; switch ($_GET['p_filter']) { case 0: $bal->jrn = null; break; case 1: if (isset($_GET['r_jrn'])) { $selected = $_GET['r_jrn']; $array_ledger = $g_user->get_ledger('ALL', 3); $array = get_array_column($array_ledger, 'jrn_def_id'); for ($e = 0; $e < count($selected); $e++) { if (isset($selected[$e]) && in_array($selected[$e], $array)) { $bal->jrn[] = $selected[$e]; }