[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 09/29: Fix Bug Balance Accountancy
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 09/29: Fix Bug Balance Accountancy |
Date: |
Sat, 6 Jan 2024 05:59:14 -0500 (EST) |
sparkyx pushed a commit to branch devel
in repository noalyss.
commit e23270877924dd0ecf46744b6d0cd3475584bfb5
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Dec 15 19:04:24 2023 +0100
Fix Bug Balance Accountancy
---
include/class/acc_balance.class.php | 2 +-
include/class/print_ledger_detail_item.class.php | 20 ++++++++++----------
include/export/export_balance_csv.php | 17 +++++++++++++----
3 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/include/class/acc_balance.class.php
b/include/class/acc_balance.class.php
index 074710ba9..f079bcf7d 100644
--- a/include/class/acc_balance.class.php
+++ b/include/class/acc_balance.class.php
@@ -275,7 +275,7 @@ class Acc_Balance
$side_delta=findSide($delta);
$a['poste']="";
- $a['label']=sprintf(_("Totaux %s %s"),nbm(abs($delta)),$side_delta);
+ $a['label']=sprintf(_("Totaux delta %s
%s"),nbm(abs($delta)),$side_delta);
$a['sum_deb']=$tot_deb;
$a['sum_cred']=$tot_cred;
$a['solde_deb']=$tot_deb_saldo;
diff --git a/include/class/print_ledger_detail_item.class.php
b/include/class/print_ledger_detail_item.class.php
index 84399c08c..243ef9217 100644
--- a/include/class/print_ledger_detail_item.class.php
+++ b/include/class/print_ledger_detail_item.class.php
@@ -50,16 +50,16 @@ class Print_Ledger_Detail_Item extends Print_Ledger
$this->Ln(20);
$high=6;
$this->SetFont('DejaVu', '', 6);
- $this->Cell(20, $high, _('Date'),0, 'L', false);
- $this->Cell(20, $high, _('Numéro interne'), 0, 0, 'L', false);
- $this->Cell(50, $high, _('Code'),0,'L',false);
- $this->Cell(80, $high, _('Libellé'),0,'L',false);
- $this->Cell(20, $high, _('Tot HTVA'), 0, 0, 'R', false);
- $this->Cell(20, $high, _('Tot TVA NP'), 0, 0, 'R', false);
- $this->Cell(20, $high, _("Autre Tx"), 0, 0, 'R', false);
- $this->Cell(20, $high, _('Tot TVA'), 0, 0, 'R', false);
- $this->Cell(20, $high, _('TVAC'), 0, 0, 'R', false);
- $this->Ln(6);
+ $this->write_cell(20, $high, _('Date'),0,0, 'L', false);
+ $this->write_cell(20, $high, _('Numéro interne'), 0,0, 'L', false);
+ $this->write_cell(50, $high, _('Code'),0,0,'L',false);
+ $this->write_cell(80, $high, _('Libellé'),0,0,'L',false);
+ $this->write_cell(20, $high, _('Tot HTVA'), 0, 0,'R', false,'R',
false);
+ $this->write_cell(20, $high, _('Tot TVA NP'), 0, 0,'R', false, false);
+ $this->write_cell(20, $high, _("Autre Tx"), 0, 0, 'R', false);
+ $this->write_cell(20, $high, _('Tot TVA'), 0, 0, 'R', false);
+ $this->write_cell(20, $high, _('TVAC'), 0, 0, 'R', false);
+ $this->line_new(6);
$this->show_col=true;
}
diff --git a/include/export/export_balance_csv.php
b/include/export/export_balance_csv.php
index 9278b852c..359ed1bad 100644
--- a/include/export/export_balance_csv.php
+++ b/include/export/export_balance_csv.php
@@ -101,12 +101,21 @@ foreach ($row as $r)
$export->add($r['sum_deb'],"number");
$export->add($r['sum_cred'],"number");
- if ( $delta < 0 ){
+ if ( $delta < 0){
+ $export->add("0","number");
+ $export->add($r['solde_cred'],"number");
+ }elseif ( $delta > 0 ) {
+ $export->add($r['solde_deb'],"number");
+ $export->add("0","number");
+ }elseif ($delta==0 && $r['poste']!="")
+ {
$export->add("0","number");
- $export->add(abs($delta),"number");
- }else {
- $export->add(abs($delta),"number");
$export->add("0","number");
+ }elseif ( $delta == 0 && $r['poste'] =="" ) {
+ $export->add($r['solde_deb'],"number");
+ $export->add($r['solde_cred'],"number");
+ } else {
+ throw new \Exception(__FILE__.":".__LINE__);
}
$export->write();
}
- [Noalyss-commit] [noalyss] branch devel updated (98390d4d4 -> ead8d5f23), dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 03/29: PHP 8.0 Minimum, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 06/29: PHP 8.2 compatibility, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 01/29: Code : change filename, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 02/29: PHP Compatibility, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 05/29: Bug cosmetic : when update in a window, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 07/29: Improve Debug, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 08/29: typo, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 09/29: Fix Bug Balance Accountancy,
dwm <=
- [Noalyss-commit] [noalyss] 10/29: cosmetic : color info password, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 11/29: PHP8.1 Compatibility, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 13/29: Code improve : Acc_Balance utilise PDF_CORE::is_fill, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 14/29: Improve Code : permet d'avoir plusieurs couleurs sur une ligne, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 17/29: Improve : PRINTJRN search in detail VAT mode, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 18/29: PHP8.1 Compatibility, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 21/29: PhpUnit : test, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 20/29: Bug fix : sent emails not counted properly, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 23/29: Task #1749: Cases «Débit» dans les OD's fait remarquer si débit ou crédit, dwm, 2024/01/06
- [Noalyss-commit] [noalyss] 04/29: cosmetic info password, dwm, 2024/01/06