[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4136 - phpcompta/branches/rel560/include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4136 - phpcompta/branches/rel560/include |
Date: |
Fri, 27 May 2011 21:25:50 +0200 (CEST) |
Author: danydb
Date: 2011-05-27 21:25:50 +0200 (Fri, 27 May 2011)
New Revision: 4136
Modified:
phpcompta/branches/rel560/include/class_lettering.php
Log:
0000278: Lettrage
Modified: phpcompta/branches/rel560/include/class_lettering.php
===================================================================
--- phpcompta/branches/rel560/include/class_lettering.php 2011-05-27
18:29:44 UTC (rev 4135)
+++ phpcompta/branches/rel560/include/class_lettering.php 2011-05-27
19:25:50 UTC (rev 4136)
@@ -282,7 +282,7 @@
{
$j_debit=$this->db->get_value('select j_Debit from jrnx where
j_id=$1',array($p_jid));
$amount_init=$this->db->get_value('select j_montant from jrnx where
j_id=$1',array($p_jid));
- $this->get_filter();
+ $this->get_filter($p_jid);
// retrieve jnt_letter.id
$sql="select distinct(jl_id) from jnt_letter left outer join
letter_deb using (jl_id) left outer join letter_cred using (jl_id)
where letter_deb.j_id = $1 or letter_cred.j_id=$2";
@@ -341,7 +341,7 @@
* - $this->end max date
* - this->account: accounting
*/
- public function get_filter()
+ public function get_filter($p_jid=0)
{
$filter_deb='';
if (isset($this->fil_deb))
@@ -366,7 +366,7 @@
isNumber($this->fil_amount_max)==1 &&
isNumber($this->fil_amount_min)==1 &&
($this->fil_amount_max != 0 || $this->fil_amount_min != 0) )
- $filter_amount=" and j_montant >= $this->fil_amount_min and
j_montant<=$this->fil_amount_max ";
+ $filter_amount=" and (j_montant >= $this->fil_amount_min and
j_montant<=$this->fil_amount_max or
(coalesce(comptaproc.get_letter_jnt($p_jid),-1)=
coalesce(comptaproc.get_letter_jnt(j_id),-1) and
coalesce(comptaproc.get_letter_jnt($p_jid),-1) <> -1 )) ";
$sql="
select j_id,j_date,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,
j_montant,j_debit,jr_comment,jr_internal,jr_id,jr_def_id,
@@ -458,7 +458,7 @@
* - $this->end max date
* - this->quick_code: quick_code
*/
- public function get_filter()
+ public function get_filter($p_jid=0)
{
$filter_deb='';
if (isset($this->fil_deb))
@@ -483,7 +483,7 @@
isNumber($this->fil_amount_max)==1 &&
isNumber($this->fil_amount_min)==1 &&
($this->fil_amount_max != 0 || $this->fil_amount_min != 0) )
- $filter_amount=" and j_montant between $this->fil_amount_min and
$this->fil_amount_max ";
+ $filter_amount=" and (j_montant between $this->fil_amount_min and
$this->fil_amount_max or (coalesce(comptaproc.get_letter_jnt($p_jid),-1)=
coalesce(comptaproc.get_letter_jnt(j_id),-1) and
coalesce(comptaproc.get_letter_jnt($p_jid),-1) <> -1 )) ";
$sql="
select j_id,j_date,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,
j_montant,j_debit,jr_comment,jr_internal,jr_id,jr_def_id,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r4136 - phpcompta/branches/rel560/include,
phpcompta-dev <=