コード例 #1
0
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
/* $Revision$ */
// Copyright Author Dany De Bontridder danydb@aevalys.eu
/**
 * @file
 * @brief show detail of a operation of fin
 *
 */
echo '<table class="result">';
echo '<tr>';
echo th(_('Compte en banque'));
echo th(_('Tiers'));
echo th(_('Libellé'));
echo th(_('Montant'));
echo '</tr>';
echo '<tr>';
$bk = new Fiche($cn, $obj->det->array[0]['qf_bank']);
$view_card_detail = HtmlInput::card_detail($bk->get_quick_code(), h($bk->getName()), ' class="line" ');
echo td($view_card_detail);
$other = new Fiche($cn, $obj->det->array[0]['qf_other']);
$view_card_detail = HtmlInput::card_detail($other->get_quick_code(), h($other->getName()), ' class="line" ');
echo td($view_card_detail);
$comment = strip_tags($obj->det->jr_comment);
echo td($comment);
echo td(nbm($obj->det->array[0]['qf_amount']), ' class="inum"');
echo '</tr>';
echo '</table>';
?>

コード例 #2
0
}
?>
</tr>
<?php 
$e = 0;
foreach ($array as $row) {
    $e++;
    if ($e % 2 == 0) {
        echo '<tr class="odd">';
    } else {
        echo '<tr class="even">';
    }
    $fiche = new Fiche($cn);
    $fiche->id = $row['f_id'];
    $fiche->getAttribut();
    $detail = HtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE));
    echo td($detail);
    foreach ($fiche->attribut as $attr) {
        $sort = "";
        if ($attr->ad_type != 'select') {
            if ($attr->ad_type == "date") {
                // format YYYYMMDD
                $sort = 'sorttable_customkey="' . format_date($attr->av_text, "DD.MM.YYYY", "YYYYMMDD") . '"';
            }
            echo td($attr->av_text, 'style="padding: 0 10 1 10;white-space:nowrap;" ' . $sort);
        } else {
            $value = $cn->make_array($attr->ad_extra);
            $row_content = "";
            for ($e = 0; $e < count($value); $e++) {
                if ($value[$e]['value'] == $attr->av_text) {
                    $row_content = h($value[$e]['label']);
コード例 #3
0
echo th(_('Personnel'), 'style="text-align:right"');
echo th(_('Non ded'), 'style="text-align:right"');
if ($g_parameter->MY_TVA_USE == 'Y') {
    echo th(_('HTVA'), 'style="text-align:right"');
    echo th(_('TVA NP'), 'style="text-align:right"');
    echo th(_('TVA'), 'style="text-align:right"');
    echo th(_('TVAC'), 'style="text-align:right"');
} else {
    echo th(_('Total'), 'style="text-align:right"');
}
echo '</tr>';
for ($e = 0; $e < count($obj->det->array); $e++) {
    $row = '';
    $q = $obj->det->array[$e];
    $fiche = new Fiche($cn, $q['qp_fiche']);
    $view_card_detail = HtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE), "", ' class="line" ');
    $row = td($view_card_detail);
    $sym_tva = '';
    if ($g_parameter->MY_TVA_USE == 'Y' && $q['qp_vat_code'] != '') {
        /* retrieve TVA symbol */
        $tva = new Acc_Tva($cn, $q['qp_vat_code']);
        $tva->load();
        $sym_tva = h($tva->get_parameter('label'));
    }
    $input = new ISpan("e_march" . $q['j_id'] . "_label");
    $hidden = HtmlInput::hidden("j_id[]", $q['j_id']);
    $input->value = $fiche->strAttribut(ATTR_DEF_NAME);
    $row .= td($input->input() . $hidden);
    $row .= td($sym_tva, 'style="text-align:center"');
    $pu = 0;
    if ($q['qp_quantite'] != 0) {
コード例 #4
0
	<h2 class="notice"> <?php 
    echo _("Aucun résultat");
    ?>
</h2>
<?php 
}
for ($i = 0; $i < $max; $i++) {
    ?>
	<tr class="<?php 
    echo $i % 2 == 0 ? 'even' : 'odd';
    ?>
">

		<td>
			<?php 
    echo HtmlInput::card_detail($array[$i]['quick_code']);
    ?>
		</td>
		<td>
			<?php 
    echo h($array[$i]['vw_name']);
    ?>
&nbsp;
			<?php 
    echo h($array[$i]['vw_first_name']);
    ?>
		</td>
		<td>
			<?php 
    echo h($array[$i]['fd_label']);
    ?>
コード例 #5
0
<td>
	<?php 
    if (strlen($array[$i]['acode']) > 0) {
        if (strpos($array[$i]['acode'], ",") > 0) {
            $det_qcode = explode(",", $array[$i]['acode']);
            $sep = "";
            $max = count($det_qcode) > $limite ? $limite : count($det_qcode);
            for ($e = 0; $e < $max; $e++) {
                echo $sep . HtmlInput::card_detail($det_qcode[$e]);
                $sep = " , ";
            }
            if ($max < count($det_qcode)) {
                echo "...";
            }
        } else {
            echo HtmlInput::card_detail($array[$i]['acode']);
        }
    }
    ?>
</td>
</tr>


<?php 
}
?>
</table>
<span style="font-style:italic">
<?php 
echo _("Nombre d'enregistrements") . " " . $i;
?>
コード例 #6
0
	<?php 
    $a_stock = $cn->get_array("\n\t\t\t\t\tselect coalesce(sum(s_qin),0) as qin,coalesce(sum(s_qout),0) as qout,sg_code\n\t\t\t\t\t\tfrom tmp_stockgood_detail  where r_id=\$1 and s_id=\$2\n\t\t\t\t\t\tgroup by sg_code\n\t\t\t\t\t\torder by sg_code\n\n\t\t\t\t\t", array($a_repo[$r]['r_id'], $tmp_id));
    for ($s = 0; $s < count($a_stock); $s++) {
        $a_card = $cn->get_array("\n\t\t\t\t\t\tselect f_id,vw_name,quick_code\n\t\t\t\t\t\tfrom vw_fiche_attr\n\t\t\t\t\t\twhere\n\t\t\t\t\t f_id in (\n\t\t\t\t\t\t\tselect distinct f_id\n\t\t\t\t\t\t\tfrom \t\t\t\ttmp_stockgood_detail\n\t\t\t\t\t\t\twhere\n\t\t\t\t\t\t\tr_id=\$1\n\t\t\t\t\t\t\tand s_id=\$2\n\t\t\t\t\t\t\tand sg_code=\$3)\n\t\t\t\t\t\torder by vw_name,quick_code\n\t\t\t\t\t", array($a_repo[$r]['r_id'], $tmp_id, $a_stock[$s]['sg_code']));
        ?>
	<tr>
		<td>
			<?php 
        echo HtmlInput::card_detail($a_stock[$s]['sg_code'], '', '', true);
        ?>
		</td>
		<td>
			<?php 
        $sep = "";
        for ($c = 0; $c < count($a_card); $c++) {
            echo $sep . HtmlInput::card_detail($a_card[$c]['quick_code'], $a_card[$c]['vw_name'], ' class="line" ');
            $sep = "  ,";
        }
        if (count($a_card) == 0) {
            echo '<span class="notice">' . _("Changement manuel") . '</span>';
        }
        ?>
		</td>
		<td class="num">
			<?php 
        echo nbm($a_stock[$s]['qin']);
        ?>
		</td>
		<td class="num">
			<?php 
        echo nbm($a_stock[$s]['qout']);
コード例 #7
0
ファイル: stock_inv.php プロジェクト: Kloadut/noalyss_ynh
    } else {
        ?>
			<?php 
        if (trim($sg_code[$i]->value) != "") {
            echo HtmlInput::card_detail($sg_code[$i]->value, h($sg_code[$i]->value), ' class="line"', true);
        }
    }
    ?>

		</td>
<?php 
    if ($p_readonly == true && isset($fiche[$i])) {
        ?>
		<td>
			<?php 
        echo HtmlInput::card_detail($fiche[$i]->get_quick_code(), h($fiche[$i]->getName()), ' class="line"');
        ?>
		</td>
<?php 
    }
    ?>
		<TD class="num"">
		<?php 
    if ($sg_quantity[$i]->value == 0 && $p_readonly == true) {
        ?>

		<?php 
    } else {
        ?>
			<?php 
        echo $sg_quantity[$i]->input();
コード例 #8
0
 * @brief show the result of balance ageing, included from Balance_Age::display_purchase
 * @see Balance_Age
 */
bcscale(2);
?>

<?php 
$nb_fiche = count($a_fiche);
for ($i = 0; $i < $nb_fiche; $i++) {
    $card = new Lettering_Card($this->cn, $a_fiche[$i]['quick_code']);
    $card->set_parameter('start', $p_date_start);
    $card->get_balance_ageing($p_let);
    if (empty($card->content)) {
        continue;
    }
    echo HtmlInput::card_detail($a_fiche[$i]['quick_code'], h($a_fiche[$i]['name']) . ' ' . h($a_fiche[$i]['first_name']));
    ?>
<table class="result">
    <tr>
        <th> 
            <?php 
    echo _('Date opération');
    ?>
        </th>
        <th>
            <?php 
    echo _('Pièce');
    ?>
        </th>
        <th>
            <?php 
コード例 #9
0
 /**
  * @brief verify that the operation can be saved
  * @param$p_array array of data same layout that the $_POST from show_form
  *
  *
  * \throw  the getcode  value is 1 incorrect balance,  2 date
  * invalid, 3 invalid amount,  4 the card is not in the range of
  * permitted card, 5 not in the user's period, 6 closed period
  *
  */
 function verify($p_array)
 {
     if (is_array($p_array) == false || empty($p_array)) {
         throw new Exception("Array empty");
     }
     /*
      * Check needed value
      */
     check_parameter($p_array, 'p_jrn,e_date');
     extract($p_array);
     global $g_user;
     $tot_cred = 0;
     $tot_deb = 0;
     $msg = array();
     /* check if we can write into this ledger */
     if ($g_user->check_jrn($p_jrn) != 'W') {
         throw new Exception(_('Accès interdit'), 20);
     }
     /* check for a double reload */
     if (isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1', array($mt)) != 0) {
         throw new Exception('Double Encodage', 5);
     }
     // Check the periode and the date
     if (isDate($e_date) == null) {
         throw new Exception('Date invalide', 2);
     }
     $periode = new Periode($this->db);
     /* find the periode  if we have enabled the check_periode */
     if ($this->check_periode() == false) {
         $periode->find_periode($e_date);
     } else {
         $periode->p_id = $period;
         list($min, $max) = $periode->get_date_limit();
         if (cmpDate($e_date, $min) < 0 || cmpDate($e_date, $max) > 0) {
             throw new Exception(_('Date et periode ne correspondent pas'), 6);
         }
     }
     // Periode ferme
     if ($this->is_closed($periode->p_id) == 1) {
         throw new Exception('Periode fermee', 6);
     }
     /* check if we are using the strict mode */
     if ($this->check_strict() == true) {
         /* if we use the strict mode, we get the date of the last
         	  operation */
         $last_date = $this->get_last_date();
         if ($last_date != null && cmpDate($e_date, $last_date) < 0) {
             throw new Exception(_('Vous utilisez le mode strict la dernière operation est la date du ') . $last_date . ' ' . _('vous ne pouvez pas encoder à une date antérieure'), 15);
         }
     }
     for ($i = 0; $i < $nb_item; $i++) {
         $err = 0;
         // Check the balance
         if (!isset(${'amount' . $i})) {
             continue;
         }
         $amount = round(${'amount' . $i}, 2);
         $tot_deb += isset(${'ck' . $i}) ? $amount : 0;
         $tot_cred += !isset(${'ck' . $i}) ? $amount : 0;
         // Check if the card is permitted
         if (isset(${'qc_' . $i}) && trim(${'qc_' . $i}) != "") {
             $f = new Fiche($this->db);
             $f->quick_code = ${'qc_' . $i};
             if ($f->belong_ledger($p_jrn) < 0) {
                 throw new Exception("La fiche quick_code = " . $f->quick_code . " n'est pas dans ce journal", 4);
             }
             if (strlen(trim(${'qc_' . $i})) != 0 && isNumber(${'amount' . $i}) == 0) {
                 throw new Exception('Montant invalide', 3);
             }
             $strPoste = $f->strAttribut(ATTR_DEF_ACCOUNT);
             if ($strPoste == '') {
                 throw new Exception(sprintf(_("La fiche %s n'a pas de poste comptable"), ${"qc_" . $i}));
             }
             $p = new Acc_Account_Ledger($this->db, $strPoste);
             if ($p->do_exist() == 0) {
                 throw new Exception(_('Poste Inexistant pour la fiche [' . ${'qc_' . $i} . ']'), 4);
             }
         }
         // Check if the account is permitted
         if (isset(${'poste' . $i}) && strlen(trim(${'poste' . $i})) != 0) {
             $p = new Acc_Account_Ledger($this->db, ${'poste' . $i});
             if ($p->belong_ledger($p_jrn) < 0) {
                 throw new Exception(_("Le poste") . " " . $p->id . " " . _("n'est pas dans ce journal"), 5);
             }
             if (strlen(trim(${'poste' . $i})) != 0 && isNumber(${'amount' . $i}) == 0) {
                 throw new Exception(_('Poste invalide [' . ${'poste' . $i} . ']'), 3);
             }
             if ($p->do_exist() == 0) {
                 throw new Exception(_('Poste Inexistant [' . ${'poste' . $i} . ']'), 4);
             }
             $card_id = $p->find_card();
             if (!empty($card_id)) {
                 $str_msg = " Le poste " . $p->id . " appartient à " . count($card_id) . " fiche(s) dont :";
                 $max = count($card_id) > MAX_COMPTE_CARD ? MAX_COMPTE_CARD : count($card_id);
                 for ($x = 0; $x < $max; $x++) {
                     $card = new Fiche($this->db, $card_id[$x]['f_id']);
                     $str_msg .= HtmlInput::card_detail($card->strAttribut(ATTR_DEF_QUICKCODE), $card->strAttribut(ATTR_DEF_NAME), 'style="color:red;display:inline;text-decoration:underline"');
                     $str_msg .= " ";
                 }
                 $msg[] = $str_msg;
             }
         }
     }
     $tot_deb = round($tot_deb, 4);
     $tot_cred = round($tot_cred, 4);
     if ($tot_deb != $tot_cred) {
         throw new Exception(_("Balance incorrecte ") . " debit = {$tot_deb} credit={$tot_cred} ", 1);
     }
     return $msg;
 }
コード例 #10
0
ファイル: stock_histo.php プロジェクト: Kloadut/noalyss_ynh
		<td>
			<?php 
    echo HtmlInput::card_detail($row['sg_code'], "", ' class="line" ', true);
    ?>
		</td>
		<td>
			<?php 
    echo $row['r_name'];
    ?>
		</td>
		<td>
			<?php 
    if (trim($row['qcode']) != '') {
        ?>
			<?php 
        echo HtmlInput::card_detail($row['qcode'], $row['fname'], ' class="line" ');
        ?>
			<?php 
    }
    ?>
		</td>
		<td>
			<?php 
    if (trim($row['jr_internal']) != '') {
        ?>
			<?php 
        echo HtmlInput::detail_op($row['jr_id'], $row['jr_internal']);
        ?>
			<?php 
    }
    ?>
コード例 #11
0
ファイル: class_contact.php プロジェクト: Kloadut/noalyss_ynh
    function Summary($p_search = "", $p_action = "", $p_sql = "", $p_nothing = false)
    {
        $p_search = sql_string($p_search);
        $extra_sql = "";
        if ($this->company != "") {
            $extra_sql = "and f_id in (select f_id from fiche_detail\n                       where ad_value=upper('" . $this->company . "') and ad_id=" . ATTR_DEF_COMPANY . ") ";
        }
        $url = urlencode($_SERVER['REQUEST_URI']);
        $script = $_SERVER['PHP_SELF'];
        // Creation of the nav bar
        // Get the max numberRow
        $all_contact = $this->count_by_modele($this->fiche_def_ref, $p_search, $extra_sql);
        // Get offset and page variable
        $offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0;
        $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : 1;
        $bar = navigation_bar($offset, $all_contact, $_SESSION['g_pagesize'], $page);
        // set a filter ?
        $search = "";
        if (trim($p_search) != "") {
            $search = " and f_id in\n                    (select f_id from fiche_Detail\n                    where\n                    ad_id=1 and ad_value ~* '{$p_search}') ";
        }
        // Get The result Array
        $step_contact = $this->get_by_category($offset, $search . $extra_sql . $p_sql);
        if ($all_contact == 0) {
            return "";
        }
        $r = $bar;
        $r .= '<table id="contact_tb" class="sortable">
            <TR>
            <th>Quick Code</th>
            <th>Nom</th>
            <th>Prénom</th>
			<th>Société</th>
            <th>Téléphone</th>
            <th>email</th>
            <th>Fax</th>
            </TR>';
        $base = $_SERVER['PHP_SELF'];
        // Compute the url
        $url = "";
        $and = "?";
        $get = $_GET;
        if (isset($get)) {
            foreach ($get as $name => $value) {
                // we clean the parameter offset, step, page and size
                if (!in_array($name, array('f_id', 'detail'))) {
                    $url .= $and . $name . "=" . $value;
                    $and = "&";
                }
                // if
            }
            //foreach
        }
        // if
        $back_url = urlencode($_SERVER['REQUEST_URI']);
        if (sizeof($step_contact) == 0) {
            return $r;
        }
        $idx = 0;
        foreach ($step_contact as $contact) {
            $l_company = new Fiche($this->cn);
            $l_company->get_by_qcode($contact->strAttribut(ATTR_DEF_COMPANY), false);
            $l_company_name = $l_company->strAttribut(ATTR_DEF_NAME);
            if ($l_company_name == NOTFOUND) {
                $l_company_name = "";
            }
            // add popup for detail
            if ($l_company_name != "") {
                $l_company_name = HtmlInput::card_detail($contact->strAttribut(ATTR_DEF_COMPANY), $l_company_name, 'style="text-decoration:underline;"');
            }
            $tr = $idx % 2 == 0 ? ' <tr class="odd">' : '<tr class="even">';
            $idx++;
            $r .= $tr;
            $qcode = $contact->strAttribut(ATTR_DEF_QUICKCODE);
            $r .= '<TD>' . HtmlInput::card_detail($qcode) . "</TD>";
            $r .= "<TD>" . $contact->strAttribut(ATTR_DEF_NAME) . "</TD>";
            $r .= "<TD>" . $contact->strAttribut(ATTR_DEF_FIRST_NAME) . "</TD>";
            $r .= "<TD>" . $l_company_name . "</TD>";
            $r .= "<TD>" . $contact->strAttribut(ATTR_DEF_TEL) . "</TD>";
            $r .= "<TD>" . $contact->strAttribut(ATTR_DEF_EMAIL) . "</TD>" . "<TD> " . $contact->strAttribut(ATTR_DEF_FAX) . "</TD>";
            $r .= "</TR>";
        }
        $r .= "</TABLE>";
        $r .= $bar;
        return $r;
    }
コード例 #12
0
ファイル: ajax_history.php プロジェクト: Kloadut/noalyss_ynh
                $old = _("Autre exercice") . " " . $is->input();
            } else {
                $old = '<form method="get" action="popup.php">';
                $is = $exercice->select('ex', $default, 'onchange = "submit(this)"');
                $old .= _("Autre exercice") . " " . $is->input();
                $old .= HtmlInput::hidden('div', 'popup');
                $old .= HtmlInput::hidden('act', $_GET['act']);
                $old .= HtmlInput::hidden('f_id', $_GET['f_id']);
                $old .= HtmlInput::hidden('ajax', $_GET['ajax']);
                $old .= dossier::hidden();
                $old .= '</form>';
            }
        }
        ob_start();
        require_once NOALYSS_INCLUDE . '/template/history_top.php';
        $detail_card = HtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE), $fiche->getName());
        echo h2($fiche->getName() . '[' . $fiche->strAttribut(ATTR_DEF_QUICKCODE) . ']', ' class="title" ');
        echo '<p style="text-align:center;">' . $detail_card . '</p>';
        if ($fiche->HtmlTable($array, 0, $from_div) == -1) {
            echo h2(_("Aucune opération pour l'exercice courant"), 'class="error"');
        }
        echo $old;
        $html = ob_get_contents();
        ob_end_clean();
    }
}
///////////////////////////////////////////////////////////////////////////
// for an account
///////////////////////////////////////////////////////////////////////////
if (isset($_REQUEST['pcm_val'])) {
    $poste = new Acc_Account_Ledger($cn, $_REQUEST['pcm_val']);
コード例 #13
0
echo _("Total");
?>
			</th>
	</tr>
	<?php 
for ($x = 0; $x < count($a_code); $x++) {
    $class = $x % 2 == 0 ? ' class="odd" ' : ' class="even" ';
    ?>

		<tr <?php 
    echo $class;
    ?>
 >
			<td>
				<?php 
    echo HtmlInput::card_detail($a_code[$x]['sg_code'], "", "", true);
    ?>
			</td>
			<?php 
    $n_in = 0;
    $n_out = 0;
    for ($e = 0; $e < count($a_repository); $e++) {
        $array = $cn->get_array("select coalesce(sum(s_qin)) as s_qin,coalesce(sum(s_qout)) as s_qout\n\t\t\t\t\t\t\t\t\t\t\tfrom tmp_stockgood_detail\n\t\t\t\t\t\t\t\t\t\t where r_id=\$1 and sg_code=\$2 and s_id=\$3", array($a_repository[$e]['r_id'], $a_code[$x]['sg_code'], $tmp_id));
        ?>
			<td>
				<?php 
        if (count($array) == 0) {
            echo 0;
        } else {
            $n_in += $array[0]['s_qin'];
            $n_out += $array[0]['s_qout'];
コード例 #14
0
ファイル: fiche.inc.php プロジェクト: Kloadut/noalyss_ynh
 // lettered
 if ($_GET['histo'] == 1) {
     $letter->get_letter();
 }
 // unlettered
 if ($_GET['histo'] == 2) {
     $letter->get_unletter();
 }
 if ($_GET['histo'] == 6) {
     $letter->get_letter_diff();
 }
 /* skip if nothing to display */
 if (count($letter->content) == 0) {
     continue;
 }
 $detail_card = HtmlInput::card_detail($row->strAttribut(ATTR_DEF_QUICKCODE), $row->strAttribut(ATTR_DEF_NAME));
 echo '<h2>' . $detail_card;
 echo "poste " . ":" . HtmlInput::history_account($row->strAttribut(ATTR_DEF_ACCOUNT), $row->strAttribut(ATTR_DEF_ACCOUNT), 'display:inline') . HtmlInput::infobulle(27) . '</h2>';
 echo '<table class="result">';
 echo '<tr>';
 echo th(_('Date'));
 echo th(_('ref'));
 echo th(_('Interne'));
 echo th(_('Comm'));
 echo th(_('Montant'), 'style="width:auto" colspan="2"');
 echo th(_('Prog.'));
 echo th(_('Let.'));
 echo '</tr>';
 $amount_deb = 0;
 $amount_cred = 0;
 $prog = 0;
コード例 #15
0
$a_qcode = $cn->get_array($sql_qcode);
$res = $cn->prepare('get_poste', $sql_poste);
echo _("Résultat");
if (count($a_qcode) == 0) {
    echo " OK {$g_succeed}";
} else {
    echo " " . _('Attention ') . $g_failed;
}
?>
    <ol>
    <?php 
for ($i = 0; $i < count($a_qcode); $i++) {
    $poste = $cn->execute('get_poste', array($a_qcode[$i]['j_qcode']));
    ?>
        <li><?php 
    echo HtmlInput::card_detail($a_qcode[$i]["j_qcode"], $a_qcode[$i]["j_qcode"], ' style="display:inline"');
    echo " ";
    echo HtmlInput::history_card($a_qcode[$i]["f_id"], _("Hist."), ' display:inline');
    ?>
        
        </li>
        <ul>
        <?php 
    $all_dep = Database::fetch_all($poste);
    for ($e = 0; $e < count($all_dep); $e++) {
        ?>
            <li>
                <?php 
        echo HtmlInput::history_account($all_dep[$e]['j_poste'], $all_dep[$e]['j_poste'], ' display:inline ');
        ?>
                <?php 
コード例 #16
0
}
if ($owner->MY_ANALYTIC != 'nu') {
    $anc = new Anc_Plan($cn);
    $a_anc = $anc->get_list(' order by pa_id ');
    $x = count($a_anc);
    /* set the width of the col */
    /* add hidden variables pa[] to hold the value of pa_id */
    $str_anc .= '<tr><th>Code</th><th>Montant</th><th colspan="' . $x . '">' . _('Compt. Analytique') . Anc_Plan::hidden($a_anc) . '</th></tr>';
}
echo '</tr>';
for ($e = 0; $e < count($obj->det->array); $e++) {
    $row = '';
    $q = $obj->det->array[$e];
    $fiche = new Fiche($cn, $q['qp_fiche']);
    $qcode = $fiche->strAttribut(ATTR_DEF_QUICKCODE);
    $view_card_detail = HtmlInput::card_detail($qcode, "", ' class="line" ');
    $row = td($view_card_detail);
    $sym_tva = '';
    if ($owner->MY_TVA_USE == 'Y' && $q['qp_vat_code'] != '') {
        /* retrieve TVA symbol */
        $tva = new Acc_Tva($cn, $q['qp_vat_code']);
        $tva->load();
        $sym_tva = h($tva->get_parameter('label'));
    }
    if ($owner->MY_UPDLAB == 'Y') {
        $l_lib = $q['j_text'] == '' ? $fiche->strAttribut(ATTR_DEF_NAME) : $q['j_text'];
        $hidden = HtmlInput::hidden("j_id[]", $q['j_id']);
        $input = new IText("e_march" . $q['j_id'] . "_label", $l_lib);
        $input->css_size = "100%";
    } else {
        $input = new ISpan("e_march" . $q['j_id'] . "_label");
コード例 #17
0
    ?>
">
    <?php 
    if (strlen($A['acode']) > 0) {
        if (strpos($A['acode'], ",") > 0) {
            $det_qcode = explode(",", $A['acode']);
            echo '<ul style="display:inline;paddding:0;margin:0px;padding-left:0px;list-style-type:none;padding-start-value:0px">';
            $max = count($det_qcode) > MAX_QCODE ? MAX_QCODE : count($det_qcode);
            for ($e = 0; $e < $max; $e++) {
                echo '<li style="padding-start-value:0;margin:2px;display:inline">' . HtmlInput::card_detail($det_qcode[$e], '', ' style="display:inline"') . '</li>';
            }
            echo '</ol>';
            if ($max < count($det_qcode)) {
                echo "...";
            } else {
                echo HtmlInput::card_detail($A['acode']);
            }
        }
    }
    ?>
	</td>
  </tr>
<?php 
}
?>
</TABLE>
    <?php 
/* it will override the classic onscroll (see scripts.js)
 * @see scripts.js
 */
?>