[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 03/04: Task #1654 - PRINTJRN : Opération mal
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 03/04: Task #1654 - PRINTJRN : Opération mal classé #0001654 : PRINTJRN , opérations mal classées, date malformée, ... |
Date: |
Sat, 21 Jul 2018 05:19:36 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 9bb7edbdc884b63b5f964db106313f300e4cdb2e
Author: Dany De Bontridder <address@hidden>
Date: Thu Jul 19 23:11:12 2018 +0200
Task #1654 - PRINTJRN : Opération mal classé
#0001654 : PRINTJRN , opérations mal classées, date malformée, ...
---
include/class/acc_ledger_history.class.php | 5 +++++
include/class/acc_ledger_history_financial.class.php | 7 ++++---
include/class/acc_ledger_history_purchase.class.php | 11 ++++++-----
include/class/acc_ledger_history_sale.class.php | 11 ++++++-----
include/class/print_ledger.class.php | 10 ++++++++--
include/class/print_ledger_misc.class.php | 14 +++++++-------
include/export/export_ledger_csv.php | 2 +-
include/template/acc_ledger_history_financial_oneline.php | 8 ++++++++
include/template/acc_ledger_history_purchase_detail.php | 4 ++--
include/template/acc_ledger_history_purchase_extended.php | 4 ++--
include/template/acc_ledger_history_purchase_oneline.php | 4 ++--
include/template/acc_ledger_history_sale_detail.php | 4 ++--
include/template/acc_ledger_history_sale_extended.php | 4 ++--
include/template/acc_ledger_history_sale_oneline.php | 4 ++--
14 files changed, 57 insertions(+), 35 deletions(-)
diff --git a/include/class/acc_ledger_history.class.php
b/include/class/acc_ledger_history.class.php
index 7b2a4b6..45b0a0c 100644
--- a/include/class/acc_ledger_history.class.php
+++ b/include/class/acc_ledger_history.class.php
@@ -125,6 +125,11 @@ abstract class Acc_Ledger_History
/**
* Build the right object
+ * @param Database $cn database conx
+ * @param array $pa_ledger ledger of array
+ * @param integer $p_from periode id
+ * @param integer $p_to periode id
+ * @param char $p_mode L (list operation) E (extended detail) A (accouting
writing) D (Detailled VAT)
* @return Acc_Ledger_History_Generic Acc_Ledger_History_Sale
Acc_Ledger_History_Financial Acc_Ledger_History_Purchase
*/
static function factory(Database $cn, $pa_ledger, $p_from, $p_to, $p_mode)
diff --git a/include/class/acc_ledger_history_financial.class.php
b/include/class/acc_ledger_history_financial.class.php
index 0294bd7..9b5a1d9 100644
--- a/include/class/acc_ledger_history_financial.class.php
+++ b/include/class/acc_ledger_history_financial.class.php
@@ -119,8 +119,8 @@ class Acc_Ledger_History_Financial extends
Acc_Ledger_History
tiers.qcode as tiers_qcode,
jr_id,
jr_pj_number,
- jr_date,
- jr_date_paid,
+ to_char(jr_date,'DD.MM.YYYY') as str_date,
+ to_char(jr_date_paid,'DD.MM.YYYY') as str_date_paid,
jr_internal,
jrn.jr_comment,
jr_pj_name,
@@ -133,7 +133,8 @@ class Acc_Ledger_History_Financial extends
Acc_Ledger_History
where
jr_def_id in ({$ledger_list})
and {$periode}
- {$cond_limite}";
+ {$cond_limite}
+ order by jr_date, substring(jr_pj_number,'[0-9]+$')::numeric ";
$this->data=$this->db->get_array($sql);
}
/**
diff --git a/include/class/acc_ledger_history_purchase.class.php
b/include/class/acc_ledger_history_purchase.class.php
index 5f813c2..9db2140 100644
--- a/include/class/acc_ledger_history_purchase.class.php
+++ b/include/class/acc_ledger_history_purchase.class.php
@@ -139,8 +139,8 @@ class Acc_Ledger_History_Purchase extends Acc_Ledger_History
qcode,
jr_id,
jr_pj_number,
- jr_date,
- jr_date_paid,
+ to_char(jr_date,'DD.MM.YYYY') as str_date,
+ to_char(jr_date_paid,'DD.MM.YYYY') as str_date_paid,
jr_internal,
qp_supplier,
jrn.jr_comment,
@@ -161,7 +161,8 @@ class Acc_Ledger_History_Purchase extends Acc_Ledger_History
where
jr_def_id in ({$ledger_list})
and {$periode}
- {$cond_limite}";
+ {$cond_limite}
+ order by jrn.jr_date,
substring(jr_pj_number,'[0-9]+$')::numeric ";
$this->data=$this->db->get_array($sql);
}
@@ -272,8 +273,8 @@ class Acc_Ledger_History_Purchase extends Acc_Ledger_History
foreach ($this->data as $line)
{
- $export->add($line['jr_date']);
- $export->add($line['jr_date_paid']);
+ $export->add($line['str_date']);
+ $export->add($line['str_date_paid']);
$export->add($line['jr_id']);
$export->add($line['jr_pj_number']);
$export->add($line['name']." ".
diff --git a/include/class/acc_ledger_history_sale.class.php
b/include/class/acc_ledger_history_sale.class.php
index aed3495..400de99 100644
--- a/include/class/acc_ledger_history_sale.class.php
+++ b/include/class/acc_ledger_history_sale.class.php
@@ -133,8 +133,8 @@ class Acc_Ledger_History_Sale extends Acc_Ledger_History
qcode,
jr_id,
jr_pj_number,
- jr_date,
- jr_date_paid,
+ to_char(jr_date,'DD.MM.YYYY') as str_date,
+ to_char(jr_date_paid,'DD.MM.YYYY') as str_date_paid,
jr_internal,
qs_client,
jrn.jr_comment,
@@ -150,7 +150,8 @@ class Acc_Ledger_History_Sale extends Acc_Ledger_History
where
jr_def_id in ({$ledger_list})
and {$periode}
- {$cond_limite}";
+ {$cond_limite}
+ order by jr_date,
substring(jr_pj_number,'[0-9]+$')::numeric ";
$this->data=$this->db->get_array($sql);
}
@@ -264,8 +265,8 @@ class Acc_Ledger_History_Sale extends Acc_Ledger_History
foreach ($this->data as $line)
{
- $export->add($line['jr_date']);
- $export->add($line['jr_date_paid']);
+ $export->add($line['str_date']);
+ $export->add($line['str_date_paid']);
$export->add($line['jr_id']);
$export->add($line['jr_pj_number']);
$export->add($line['name']." ".
diff --git a/include/class/print_ledger.class.php
b/include/class/print_ledger.class.php
index ac3bf4a..ef43f9e 100644
--- a/include/class/print_ledger.class.php
+++ b/include/class/print_ledger.class.php
@@ -83,8 +83,14 @@ class Print_Ledger {
return $pdf;
}
}
- else
+ elseif ($jrn_type=='FIN')
+ {
+ $pdf=new Print_Ledger_Financial($cn, $p_ledger);
+ return $pdf;
+ } else
+ {
return new Print_Ledger_Detail($cn, $p_ledger);
+ }
break;
case 'L':
@@ -141,7 +147,7 @@ class Print_Ledger {
$jrn_type=$p_ledger->get_type();
if ($jrn_type=='FIN')
{
- $pdf=new Print_Ledger_Financial($cn, $p_ledger);
+ $pdf=new Print_Ledger_Detail($cn, $p_ledger);
return $pdf;
;
}
diff --git a/include/class/print_ledger_misc.class.php
b/include/class/print_ledger_misc.class.php
index 8534f8b..72910b4 100644
--- a/include/class/print_ledger_misc.class.php
+++ b/include/class/print_ledger_misc.class.php
@@ -40,12 +40,12 @@ class Print_Ledger_Misc extends PDF
//Line break
$this->Ln(20);
$this->SetFont('DejaVu', 'B', 7);
- $this->Cell(30,6,'Piece');
- $this->Cell(10,6,'Date');
- $this->Cell(20,6,'Interne');
- $this->Cell(25,6,'Tiers');
- $this->Cell(80,6,'Commentaire');
- $this->Cell(15,6,'Montant');
+ $this->Cell(10,6,_('Date'));
+ $this->Cell(30,6,_('Piece'));
+ $this->Cell(20,6,_('Interne'));
+ $this->Cell(25,6,_('Tiers'));
+ $this->Cell(80,6,_('Commentaire'));
+ $this->Cell(15,6,_('Montant'));
$this->Ln(6);
}
@@ -78,8 +78,8 @@ class Print_Ledger_Misc extends PDF
{
$row=$a_jrn[$i];
- $this->LongLine(30,5,$row['jr_pj_number']);
$this->write_cell(10,5, smaller_date($row['date']));
+ $this->LongLine(30,5,$row['jr_pj_number']);
$this->write_cell(20,5,$row['jr_internal']);
$type=$this->cn->get_value("select jrn_def_type from jrn_def where
jrn_def_id=$1",array($a_jrn[$i]['jr_def_id']));
$other=mb_substr($this->ledger->get_tiers($type,$a_jrn[$i]['jr_id']),0,25);
diff --git a/include/export/export_ledger_csv.php
b/include/export/export_ledger_csv.php
index 73e8008..82e7203 100644
--- a/include/export/export_ledger_csv.php
+++ b/include/export/export_ledger_csv.php
@@ -106,7 +106,7 @@ if ( $get_option=="E")
{
if ($jrn_type=='FIN')
{
- $get_option='L';
+ $get_option='A';
}
elseif ($jrn_type=='ODS'||$Jrn->id==0)
{
diff --git a/include/template/acc_ledger_history_financial_oneline.php
b/include/template/acc_ledger_history_financial_oneline.php
index 6792971..bdcff15 100644
--- a/include/template/acc_ledger_history_financial_oneline.php
+++ b/include/template/acc_ledger_history_financial_oneline.php
@@ -28,7 +28,9 @@ if (!defined('ALLOWED'))
?>
<table class="result">
<tr>
+ <th><?= _('Date') ?></th>
<th><?= _('Banque') ?></th>
+ <th><?=_('Pièce')?></th>
<th><?= _("Tiers") ?></th>
<th><?= _("Libellé") ?></th>
<th><?= _("Montant") ?></th>
@@ -42,9 +44,15 @@ if (!defined('ALLOWED'))
?>
<tr <?= $class ?> >
<td>
+ <?=$this->data[$i]['str_date']?>
+ </td>
+ <td>
<?= $this->data[$i]['bk_qcode']; ?>
</td>
<td>
+ <?= $this->data[$i]['jr_pj_number']; ?>
+ </td>
+ <td>
<?php
echo HtmlInput::history_card($this->data[$i]['tiers_f_id'],
h($this->data[$i]['tiers_first_name'].$this->data[$i]['tiers_name']."[{$this->data[$i]['tiers_qcode']}]"));
diff --git a/include/template/acc_ledger_history_purchase_detail.php
b/include/template/acc_ledger_history_purchase_detail.php
index ea39c3f..d563af2 100644
--- a/include/template/acc_ledger_history_purchase_detail.php
+++ b/include/template/acc_ledger_history_purchase_detail.php
@@ -79,8 +79,8 @@ foreach ($this->data as $line) {
echo "<TD>" . h($line['jr_pj_number']) . "</TD>";
// Date
- echo "<TD>" . smaller_date($line['jr_date']) . "</TD>";
- echo "<TD>" . smaller_date($line['jr_date_paid']) . "</TD>";
+ echo "<TD>" . smaller_date($line['str_date']) . "</TD>";
+ echo "<TD>" . smaller_date($line['str_date_paid']) . "</TD>";
// Internal with detail
echo "<TD>" . HtmlInput::detail_op($line['jr_id'], $line['jr_internal']) .
"</TD>";
diff --git a/include/template/acc_ledger_history_purchase_extended.php
b/include/template/acc_ledger_history_purchase_extended.php
index a30de33..8f7b4ee 100644
--- a/include/template/acc_ledger_history_purchase_extended.php
+++ b/include/template/acc_ledger_history_purchase_extended.php
@@ -69,10 +69,10 @@ for ($i=0;$i<$nb_data;$i++):
?>
<tr <?=$odd?> >
<td>
- <?=$this->data[$i]['jr_date']?>
+ <?=$this->data[$i]['str_date']?>
</td>
<td>
- <?=$this->data[$i]['jr_date_paid']?>
+ <?=$this->data[$i]['str_date_paid']?>
</td>
<td>
<?=$this->data[$i]['jr_pj_number']?>
diff --git a/include/template/acc_ledger_history_purchase_oneline.php
b/include/template/acc_ledger_history_purchase_oneline.php
index 3a6d783..f60544d 100644
--- a/include/template/acc_ledger_history_purchase_oneline.php
+++ b/include/template/acc_ledger_history_purchase_oneline.php
@@ -84,10 +84,10 @@ for ($i=0;$i<$nb_data;$i++):
?>
<tr <?=$odd?> >
<td>
- <?=$this->data[$i]['jr_date']?>
+ <?=$this->data[$i]['str_date']?>
</td>
<td>
- <?=$this->data[$i]['jr_date_paid']?>
+ <?=$this->data[$i]['str_date_paid']?>
</td>
<td>
<?=$this->data[$i]['jr_pj_number']?>
diff --git a/include/template/acc_ledger_history_sale_detail.php
b/include/template/acc_ledger_history_sale_detail.php
index a485163..e747884 100644
--- a/include/template/acc_ledger_history_sale_detail.php
+++ b/include/template/acc_ledger_history_sale_detail.php
@@ -77,8 +77,8 @@ foreach ($this->data as $line) {
echo "<TD>" . h($line['jr_pj_number']) . "</TD>";
// Date
- echo "<TD>" . smaller_date($line['jr_date']) . "</TD>";
- echo "<TD>" . smaller_date($line['jr_date_paid']) . "</TD>";
+ echo "<TD>" . smaller_date($line['str_date']) . "</TD>";
+ echo "<TD>" . smaller_date($line['str_date_paid']) . "</TD>";
// Internal with detail
echo "<TD>" . HtmlInput::detail_op($line['jr_id'], $line['jr_internal']) .
"</TD>";
diff --git a/include/template/acc_ledger_history_sale_extended.php
b/include/template/acc_ledger_history_sale_extended.php
index effaf43..4e7fa18 100644
--- a/include/template/acc_ledger_history_sale_extended.php
+++ b/include/template/acc_ledger_history_sale_extended.php
@@ -69,10 +69,10 @@ for ($i=0;$i<$nb_data;$i++):
?>
<tr <?=$odd?> >
<td>
- <?=$this->data[$i]['jr_date']?>
+ <?=$this->data[$i]['str_date']?>
</td>
<td>
- <?=$this->data[$i]['jr_date_paid']?>
+ <?=$this->data[$i]['str_date_paid']?>
</td>
<td>
<?=$this->data[$i]['jr_pj_number']?>
diff --git a/include/template/acc_ledger_history_sale_oneline.php
b/include/template/acc_ledger_history_sale_oneline.php
index 45e1294..a24b9ee 100644
--- a/include/template/acc_ledger_history_sale_oneline.php
+++ b/include/template/acc_ledger_history_sale_oneline.php
@@ -70,10 +70,10 @@ for ($i=0;$i<$nb_data;$i++):
?>
<tr <?=$odd?> >
<td>
- <?=$this->data[$i]['jr_date']?>
+ <?=$this->data[$i]['str_date']?>
</td>
<td>
- <?=$this->data[$i]['jr_date_paid']?>
+ <?=$this->data[$i]['str_date_paid']?>
</td>
<td>
<?=$this->data[$i]['jr_pj_number']?>
- [Noalyss-commit] [noalyss] branch master updated (9029b48 -> eecca86), Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 01/04: Task #1589 - Problème affichage du total en CA #0001589: Problème affichage du total en CA, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 02/04: Task #1652 - Différence entre l'affichage d'une recherche et son export en csv #0001652: Différence entre l'affichage d'une recherche et son export en csv, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 04/04: Task #1654 - PRINTJRN : Opération mal classé Correct export CSV DETAILLED Ods , Fin, GL, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 03/04: Task #1654 - PRINTJRN : Opération mal classé #0001654 : PRINTJRN , opérations mal classées, date malformée, ...,
Dany De Bontridder <=