Example #1
0
     /* Show Type */
     /* Before inserting a new card, the type must be selected */
     /* ------------------------------------------------------------ */
 /* ------------------------------------------------------------ */
 /* Show Type */
 /* Before inserting a new card, the type must be selected */
 /* ------------------------------------------------------------ */
 case 'st':
     $sql = "select fd_id,fd_label,fd_description from fiche_def";
     /*  if we filter  thanks the ledger*/
     if ($ledger != -1) {
         /* we want the card for deb or cred or both of this ledger */
         switch ($fil) {
             case -1:
                 $l = new Acc_Ledger($cn, $ledger);
                 $where = '  where fd_id in (' . $l->get_all_fiche_def() . ')';
                 break;
             case 'cred':
                 $l = new Acc_Ledger($cn, $ledger);
                 $prop = $l->get_propertie();
                 if ($prop['jrn_def_fiche_cred'] == '') {
                     $prop = -1;
                 }
                 $where = '  where fd_id in (' . $prop['jrn_def_fiche_cred'] . ')';
                 break;
             case 'deb':
                 $l = new Acc_Ledger($cn, $ledger);
                 $prop = $l->get_propertie();
                 if ($prop == '') {
                     $prop = -1;
                 }