[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 06/29: Compta analytique : ajout du tiers dan
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 06/29: Compta analytique : ajout du tiers dans Grand'Livre |
Date: |
Wed, 4 Nov 2020 11:08:39 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 92ff23dd635613cb1a16ccdaf682553c6f839702
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Wed Oct 28 18:49:38 2020 +0100
Compta analytique : ajout du tiers dans Grand'Livre
---
include/class/anc_grandlivre.class.php | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/include/class/anc_grandlivre.class.php
b/include/class/anc_grandlivre.class.php
index fdefa13..2965087 100644
--- a/include/class/anc_grandlivre.class.php
+++ b/include/class/anc_grandlivre.class.php
@@ -60,7 +60,7 @@ 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 oa_id,
+ $array=$this->db->get_array(" select oa_id,
po_name,
oa_description,
po_description,
@@ -73,11 +73,10 @@ class Anc_GrandLivre extends Anc_Print
jr_id,
coalesce(jr_comment,b.oa_description) as jr_comment,
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=23)
when j_poste is not null then
j_poste
- end as j_poste
- ,
+ end as j_poste,
coalesce(jrnx.f_id,b.f_id) as f_id,
case when jrnx.f_id is not null then
(select ad_value from fiche_Detail where f_id=jrnx.f_id and
ad_id=23)
@@ -86,10 +85,17 @@ class Anc_GrandLivre extends Anc_Print
end
as qcode,
jr_pj_number,
- jr_tech_per
+ jr_tech_per,
+ ftiers.cardid,
+ (select ad_value from fiche_detail where f_id=ftiers.cardid and
ad_id=23) as qcode_tiers
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)
+ left join ( select distinct qp_supplier as cardid,j_id from
quant_purchase qp
+ union
+ select distinct qs_client,j_id from quant_sold
qs
+ union
+ select distinct qf_bank,j_id from
quant_fin qf ) as ftiers using (j_id)
where $pa_id_cond oa_amount <> 0.0 $cond_poste $filter_date
order by po_name,oa_date::date,qcode,j_poste");
$this->has_data=count($array);
@@ -123,6 +129,7 @@ class Anc_GrandLivre extends Anc_Print
end
as qcode,
coalesce(jr_comment,b.oa_description) as jr_comment,
+ (select ad_value from fiche_detail where f_id=ftiers.cardid and
ad_id=23) as qcode_tiers,
coalesce (jr_pj_number,'') as jr_pj_number,
coalesce(jr_internal,'') as jr_internal,
coalesce(oa_group,0) as oa_group,
@@ -132,6 +139,11 @@ 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)
+ left join ( select distinct qp_supplier as cardid,j_id from
quant_purchase qp
+ union
+ select distinct qs_client,j_id from quant_sold
qs
+ union
+ select distinct qf_bank,j_id from
quant_fin qf ) as ftiers using (j_id)
where $pa_id_cond oa_amount <> 0.0 $cond_poste $filter_date
order by po_name,oa_date::date,qcode,j_poste");
@@ -214,6 +226,7 @@ class Anc_GrandLivre extends Anc_Print
'<th>' . _('Poste') . '</th>' .
'<th>' . _('Quick_code') . '</th>' .
'<th>' . _('Libellé') . '</th>' .
+ th(_("Tiers")).
'<th>' . '</th>' .
'<th>' . _('Pièce') . '</th>' .
'<th>' . _('Interne') . '</th>' .
@@ -269,6 +282,7 @@ class Anc_GrandLivre extends Anc_Print
td($post_detail) .
td($card_detail) .
td($row['jr_comment']) .
+ td($row["qcode_tiers"]).
'<td>' . $str_document . '</td>' .
td($row['jr_pj_number']) .
'<td>' . $detail . '</td>' .
@@ -330,6 +344,7 @@ class Anc_GrandLivre extends Anc_Print
$aheader[]=array("title"=>'Poste','type'=>'string');
$aheader[]=array("title"=>'Quick_Code','type'=>'string');
$aheader[]=array("title"=>'libelle','type'=>'string');
+ $aheader[]=array("title"=>'tiers','type'=>'string');
$aheader[]=array("title"=>'Pièce','type'=>'string');
$aheader[]=array("title"=>'Num.interne','type'=>'string');
$aheader[]=array("title"=>'row','type'=>'string');
- [Noalyss-commit] [noalyss] branch master updated (bc168d2 -> fdf9df4), Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 01/29: Nouvelle balises, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 03/29: FollowUp : nouvelle balises HOUR , GROUPMGMT , PRIORITY, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 13/29: Balise Document_Type, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 06/29: Compta analytique : ajout du tiers dans Grand'Livre,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 10/29: Correct SQL script, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 16/29: Security Can_Request log the security for Ajax, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 05/29: Balise : nouveau STATUS , etat du document, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 11/29: Style : improve h2, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 22/29: Cosmetic, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 25/29: cosmetic : waiting box, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 19/29: Predefined Operation filter by ledger, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 21/29: cosmetic , remove myfiedset class, unclosed tag , the title comment is not show if there is no comment, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 20/29: Cosmetic Admin List Folders : add close button, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 02/29: Sort by earliest one, Dany De Bontridder, 2020/11/04