}
$st = new Stock_Goods($cn);
$array = $cn->get_array("select * from stock_goods where c_id=\$1", array($_GET['c_id']));
echo HtmlInput::title_box(_("Détail changement"), $_GET['ctl']);
$p_array = array();
$p_array['p_date'] = $cn->get_value("select to_char(c_date,'DD.MM.YYYY') from stock_change where c_id=\$1", array($_GET['c_id']));
$p_array['p_motif'] = $cn->get_value("select c_comment from stock_change where c_id=\$1", array($_GET['c_id']));
$p_array['p_depot'] = $cn->get_value("select r_id from stock_change where c_id=\$1", array($_GET['c_id']));
for ($i = 0; $i < count($array); $i++) {
    $p_array['f_id' . $i] = $array[$i]['f_id'];
    $p_array['sg_code' . $i] = $array[$i]['sg_code'];
    $p_array['sg_quantity' . $i] = $array[$i]['sg_quantity'];
    $p_array['sg_type' . $i] = $array[$i]['sg_type'];
    $p_array['row'] = $i + 1;
}
echo $st->input($p_array, true);
?>
<form method="POST">
	<?php 
echo HtmlInput::hidden('c_id', $_GET['c_id']);
?>
	<p>
	<?php 
$ck = new ICheckBox("ok", " 1");
$ck->label = _("Cochez pour confirmer effacement");
echo $ck->input();
?>
	</p>
	<?php 
echo HtmlInput::submit("del", _("Effacer"));
?>
Example #2
0
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
// Copyright Author Dany De Bontridder dany@alchimerys.be
/**
 * @file
 * @brief Inventory : add manuel change
 *
 */
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
require_once NOALYSS_INCLUDE . '/class_stock_goods.php';
require_once NOALYSS_INCLUDE . '/class_stock.php';
global $cn;
$inv = new Stock_Goods($cn);
$array = array();
if (isset($_POST['save'])) {
    try {
        $inv->record_save($_POST);
        echo h2info(_("Opération sauvée"));
        $inv->input($_POST, true);
    } catch (Exception $e) {
        alert($e->getMessage());
        $array = input($_POST);
    }
} else {
    if (isset($_GET['reprise_frm'])) {
        $array = $inv->take_last_inventory($_GET);
    }
}
echo $inv->input($array);