Bug anc : order date + filter date
This commit is contained in:
parent
03d5b20cfd
commit
ac086129ce
2 changed files with 21 additions and 6 deletions
|
|
@ -28,6 +28,22 @@ require_once 'class_impress.php';
|
|||
|
||||
class Anc_GrandLivre extends Anc_Print
|
||||
{
|
||||
function set_sql_filter()
|
||||
{
|
||||
$sql="";
|
||||
$and=" and ";
|
||||
if ( $this->from != "" )
|
||||
{
|
||||
$sql.="$and oa_date >= to_date('".$this->from."','DD.MM.YYYY')";
|
||||
}
|
||||
if ( $this->to != "" )
|
||||
{
|
||||
$sql.=" $and oa_date <= to_date('".$this->to."','DD.MM.YYYY')";
|
||||
}
|
||||
|
||||
return $sql;
|
||||
|
||||
}
|
||||
/*!
|
||||
* \brief load the data from the database
|
||||
*
|
||||
|
|
@ -62,9 +78,8 @@ class Anc_GrandLivre extends Anc_Print
|
|||
from operation_analytique as B join poste_analytique using(po_id)
|
||||
left join jrnx using (j_id)
|
||||
left join jrn on (j_grpt=jr_grpt_id)
|
||||
where $pa_id_cond oa_amount <> 0.0 $cond_poste
|
||||
order by po_name,oa_date ,qcode,j_poste");
|
||||
|
||||
where $pa_id_cond oa_amount <> 0.0 $cond_poste $filter_date
|
||||
order by po_name,to_date(oa_date,'DD.MM.YYYY') ,qcode,j_poste");
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
|
@ -92,8 +107,8 @@ class Anc_GrandLivre extends Anc_Print
|
|||
from operation_analytique as B join poste_analytique using(po_id)
|
||||
left join jrnx using (j_id)
|
||||
left join jrn on (j_grpt=jr_grpt_id)
|
||||
where $pa_id_cond oa_amount <> 0.0 $cond_poste
|
||||
order by po_name,oa_date ,qcode,j_poste");
|
||||
where $pa_id_cond oa_amount <> 0.0 $cond_poste $filter_date
|
||||
order by po_name,to_date(oa_date,'DD.MM.YYYY') ,qcode,j_poste");
|
||||
|
||||
|
||||
return $array;
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ class Anc_Operation
|
|||
left join jrnx using (j_id)
|
||||
left join jrn on (j_grpt=jr_grpt_id)
|
||||
where $pa_id_cond oa_amount <> 0.0 $cond $cond_poste
|
||||
order by oa_date ,oa_group,oa_debit desc,oa_id";
|
||||
order by jr_date,oa_group,oa_debit desc,oa_id";
|
||||
|
||||
$RetSql=$this->db->exec_sql($sql);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue