[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 28/46: Task #0002015: Export CSV depuis ANCGL
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 28/46: Task #0002015: Export CSV depuis ANCGL : ajout de colonnes |
Date: |
Tue, 13 Jul 2021 05:01:57 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 4014afb238d9b3d6d2fe69870bdf95d707dcdc07
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Jun 18 14:31:15 2021 +0200
Task #0002015: Export CSV depuis ANCGL : ajout de colonnes
---
include/class/anc_grandlivre.class.php | 35 +++++++++++++++++++++++++++++-----
1 file changed, 30 insertions(+), 5 deletions(-)
diff --git a/include/class/anc_grandlivre.class.php
b/include/class/anc_grandlivre.class.php
index 6f3c64f..8843272 100644
--- a/include/class/anc_grandlivre.class.php
+++ b/include/class/anc_grandlivre.class.php
@@ -114,12 +114,12 @@ class Anc_GrandLivre extends Anc_Print
$pa_id_cond="";
if ( isset ( $this->pa_id) && $this->pa_id !='')
$pa_id_cond= "pa_id=".$this->pa_id." and";
- $array=$this->db->get_array(" select
+ $array=$this->db->get_array(" select
po_name,
to_char(oa_date,'DD.MM.YYYY') as oa_date,
to_char(jr_date_paid,'DD.MM.YY') as strdate_paid,
case when j_poste is null and b.f_id is not null then
- (select ad_value from fiche_detail where fiche_detail.f_id=b.f_id and
ad_id=".ATTR_DEF_ACCOUNT.")
+ (select ad_value from fiche_detail where fiche_detail.f_id=b.f_id and
ad_id=5)
when j_poste is not null then
j_poste
end as j_poste
@@ -138,7 +138,22 @@ class Anc_GrandLivre extends Anc_Print
case when oa_debit='t' then oa_amount else 0 end as amount_deb,
case when oa_debit='f' then oa_amount else 0 end as amount_cred,
case when oa_debit='f' then 'C' else 'D' end as deb_cred,
- ac.str_action
+ ac.str_action ,
+ ag.str_action_ref ,
+ (
+ select string_agg( j10.jr_pj_number::text,'-')
+ from jrn j10
+ left join (select jr10.jr_id , jr10.jra_concerned from
jrn_rapt jr10 ) as opr_cnc1 on (j10.jr_id=opr_cnc1.jr_id or
j10.jr_id=opr_cnc1.jra_concerned)
+ where
+ opr_cnc1.jr_id=jrn.jr_id
+ or opr_cnc1.jra_concerned=jrn.jr_id) as
agg_jr_pj_number,
+ (
+ select string_agg( j11.jr_internal::text,'-')
+ from jrn j11
+ left join (select jr11.jr_id , jr11.jra_concerned from
jrn_rapt jr11 ) as opr_cnc2 on (j11.jr_id=opr_cnc2.jr_id or
j11.jr_id=opr_cnc2.jra_concerned)
+ where
+ opr_cnc2.jr_id=jrn.jr_id
+ or opr_cnc2.jra_concerned=jrn.jr_id) as agg_jr_internal
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)
@@ -150,10 +165,17 @@ class Anc_GrandLivre extends Anc_Print
left join (select j.jr_id,string_agg( ag_id::text,'-') as str_action
from jrn j left
join action_gestion_operation ago on (j.jr_id=ago.jr_id )
- group by j.jr_id) as ac on (ac.jr_id=jrn.jr_id)
+ group by j.jr_id) as ac on (ac.jr_id=jrn.jr_id)
+ left join (select j9.jr_id,string_agg( ag9.ag_ref::text,'-') as
str_action_ref
+ from jrn j9 left
+ join action_gestion_operation ago9 on (j9.jr_id=ago9.jr_id )
+ join action_gestion ag9 on (ag9.ag_id =ago9.ag_id )
+ group by j9.jr_id) as ag on (ag.jr_id=jrn.jr_id)
where
$pa_id_cond oa_amount <> 0.0 $cond_poste $filter_date
- order by po_name,oa_date::date,qcode,j_poste");
+ order by po_name,oa_date::date,qcode,j_poste
+
+");
return $array;
@@ -358,6 +380,9 @@ class Anc_GrandLivre extends Anc_Print
$aheader[]=array("title"=>'Credit','type'=>'num');
$aheader[]=array("title"=>'D/C','type'=>'string');
$aheader[]=array("title"=>'Action','type'=>'string');
+ $aheader[]=array("title"=>'Suivi','type'=>'string');
+ $aheader[]=array("title"=>'Rapprochement pièce','type'=>'string');
+ $aheader[]=array("title"=>'Rapprochement n° interne','type'=>'string');
Impress::array_to_csv($array, $aheader,"export-anc-grandlivre");
}
}
- [Noalyss-commit] [noalyss] 20/46: New #0001983: CA - permettre désactivation poste, (continued)
- [Noalyss-commit] [noalyss] 20/46: New #0001983: CA - permettre désactivation poste, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 18/46: Bug: possible to set an empy name for an Analytic plan, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 21/46: Bug #0002011: Encodage opération – Verrouillage nombre de lignes si non vides, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 23/46: Task #0002014: Comptabilité analytique = export des pièces des opérations rapprochées, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 27/46: Task #0002014: Comptabilité analytique ordre par date Database_Core setter/getter for sql, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 24/46: Task #0001974: Duplication d'opération – Inclure l'intitulé, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 33/46: If database connx failed then reload the form, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 12/46: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 22/46: Cosmetic, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 26/46: Typo menu, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 28/46: Task #0002015: Export CSV depuis ANCGL : ajout de colonnes,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 29/46: Use autoload, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 31/46: Module decrease font-size, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 32/46: Code Cleaning #0002022: Utilisation d'un autoloader, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 35/46: Update Translation, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 36/46: get the output with transform2pdf in case it fails, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 41/46: Cosmetic #0002033: Alignement totaux + Trésorerie -> Financier/banque, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 42/46: Typo , debug information, jQuery available, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 43/46: check that g_user exists and not the g_theme, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 46/46: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 45/46: Cosmetic : unwanted char in operation detail, Dany De Bontridder, 2021/07/13