Check the date for the lettering
This commit is contained in:
parent
5f33edd1b8
commit
e07984620a
4 changed files with 35 additions and 0 deletions
|
|
@ -338,6 +338,27 @@ jr_comment,j_montant, j_debit,jr_internal from jrnx join jrn on (j_grpt=jr_grpt_
|
|||
if ( isset($_REQUEST['sc'])) $form.=HtmlInput::hidden('sc',$_REQUEST['sc']);
|
||||
if ( isset($_REQUEST['sb'])) $form.=HtmlInput::hidden('sb',$_REQUEST['sb']);
|
||||
if ( isset($_REQUEST['f_id'])) $form.=HtmlInput::hidden('f_id',$_REQUEST['f_id']);
|
||||
/* check if date are valid */
|
||||
if ( (isset($search_end) && isDate($search_end) == null) ||
|
||||
(isset($search_start) && isDate ($search_start) == null))
|
||||
{
|
||||
ob_start();
|
||||
alert(_('Date malformée, désolé'));
|
||||
$html=ob_get_contents();
|
||||
ob_clean();
|
||||
|
||||
$html=escape_xml($html);
|
||||
|
||||
header('Content-type: text/xml; charset=UTF-8');
|
||||
echo <<<EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<data>
|
||||
<code>detail</code>
|
||||
<value>$html</value>
|
||||
</data>
|
||||
EOF;
|
||||
exit();
|
||||
}
|
||||
|
||||
// display a list of operation from the other side + box button
|
||||
if ( $ot == 'account') {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,10 @@ if ( isset($_POST['record'])) {
|
|||
// Show the result
|
||||
//--------------------------------------------------------------------------------
|
||||
echo '<div id="list">';
|
||||
if ( isDate($_GET['start']) == null || isDate($_GET['end']) == null ) {
|
||||
echo alert(_('Date malformée, désolé'));
|
||||
exit();
|
||||
}
|
||||
$letter=new Lettering_Account($cn);
|
||||
$letter->set_parameter('account',$_GET['acc']);
|
||||
$letter->set_parameter('start',$_GET['start']);
|
||||
|
|
|
|||
|
|
@ -112,6 +112,11 @@ if ( isset($_POST['record'])) {
|
|||
// Show the result
|
||||
//--------------------------------------------------------------------------------
|
||||
echo '<div id="list">';
|
||||
if ( isDate($_GET['start']) == null || isDate($_GET['end']) == null ) {
|
||||
echo alert(_('Date malformée, désolé'));
|
||||
exit();
|
||||
}
|
||||
|
||||
$letter=new Lettering_Card($cn);
|
||||
$quick_code=strtoupper(trim($_GET['acc']));
|
||||
$letter->set_parameter('quick_code',$quick_code);
|
||||
|
|
|
|||
|
|
@ -59,6 +59,11 @@ if ( isset($_POST['record'])) {
|
|||
//--------------------------------------------------------------------------------
|
||||
// Show the result
|
||||
//--------------------------------------------------------------------------------
|
||||
if ( isDate($_GET['start']) == null || isDate($_GET['end']) == null ) {
|
||||
echo alert(_('Date malformée, désolé'));
|
||||
exit();
|
||||
}
|
||||
|
||||
echo '<div id="list">';
|
||||
$fiche=new Fiche($cn,$_REQUEST['f_id']);
|
||||
$quick_code=$fiche->get_quick_code();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue