';
echo '
';
echo '
';
echo $a->html_table($current);
echo '
';
return;
}
if ( isset($_POST['save']))
{
// record the operation and exit
// and exit
//-----------------------------
echo '
'.
_('Opération sauvée');
$a=new Anc_Group_Operation($cn);
$a->get_from_array($_POST);
$a->save();
echo $a->show();
echo '
';
return;
}
if ( isset($_GET['new']))
{
//show the form for entering a new Anc_Operation
//------------------------------------------
$a=new Anc_Group_Operation($cn);
$wSubmit=new IHidden("p_action","ca_od");
$wSubmit->table=0;
echo '
';
echo '
';
echo '
';
echo _('Débit').' = ';
echo _('Crédit').' = ';
echo _('Difference').' =
';
echo '
';
$msg_comment=_("Commentaire vide");
$msg_date=_("Date invalide");
echo <<
function validate_anc(p_frm_id) {
try {
if ($('pdesc').value.length==0) {
smoke.alert('$msg_comment');
return false;
}
if ( ! check_date($(p_frm_id)['pdate'].value) ) {
smoke.alert('$msg_date');
return false;
}
} catch (e) {
smoke.alert(e.message);
}
return ;
}
;
EOF;
return;
}
?>