diff --git a/include/class/acc_ledger_fin.class.php b/include/class/acc_ledger_fin.class.php index c27c16c75..887078c23 100644 --- a/include/class/acc_ledger_fin.class.php +++ b/include/class/acc_ledger_fin.class.php @@ -214,7 +214,7 @@ class Acc_Ledger_Fin extends Acc_Ledger } $nb++; } - if ($nb == 0) + if ($nb == 0) throw new Exception('Il n\'y a aucune opération', 12); /* Check if the last_saldo and first_saldo are correct */ @@ -1015,119 +1015,6 @@ class Acc_Ledger_Fin extends Acc_Ledger return $ret; } - /**\brief display operation of a FIN ledger - * \return html code into a string - */ - - function show_ledger() - { - global $g_user; - echo dossier::hidden(); - $hid = new IHidden(); - - $hid->name = "p_action"; - $hid->value = "bank"; - echo $hid->input(); - - - $hid->name = "sa"; - $hid->value = "l"; - echo $hid->input(); - - - $w = new ISelect(); - // filter on the current year - $filter_year = " where p_exercice='" . $g_user->get_exercice() . "'"; - - $periode_start = $this->db->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end", 1); - // User is already set User=new User($this->db); - $current = (isset($_GET['p_periode'])) ? $_GET['p_periode'] : -1; - $w->selected = $current; - - echo '
'; - - // Show list of sell - // Date - date of payment - Customer - amount - if ($current != -1) - { - $filter_per = " and jr_tech_per=" . $current; - } - else - { - $filter_per = " and jr_tech_per in (select p_id from parm_periode where p_exercice::integer=" . - $g_user->get_exercice() . ")"; - } - /* security */ - if ($this->id != -1) - $available_ledger = " and jr_def_id= " . $this->id . " and " . $g_user->get_ledger_sql(); - else - $available_ledger = " and " . $g_user->get_ledger_sql(); - // Show list of sell - // Date - date of payment - Customer - amount - $sql = SQL_LIST_ALL_INVOICE . $filter_per . " and jr_def_type='FIN'" . - " $available_ledger"; - $step = $_SESSION['g_pagesize']; - $page = (isset($_GET['offset'])) ? $_GET['page'] : 1; - $offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0; - - $l = ""; - - // check if qcode contains something - if ($qcode != "") - { - // add a condition to filter on the quick code - $l = " and jr_grpt_id in (select j_grpt from jrnx where j_qcode=upper('$qcode')) "; - } - - list($max_line, $list) = ListJrn($this->db, "where jrn_def_type='FIN' $filter_per $l $available_ledger " - , null, $offset, 0); - $bar = navigation_bar($offset, $max_line, $step, $page); - - echo "