From 5ac7d4dbac280a778ee1095744e0ff1af264831e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 10:02:13 +0200 Subject: [PATCH 1/3] Show last 12 bank receipts instead of 15 --- htdocs/compta/bank/bankentries_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 5035e6a1366..0cc0490f540 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -633,7 +633,7 @@ if ($resql) print ''; // Show last bank statements - $nbmax = 15; // We accept to show last 15 receipts (so we can have more than one year) + $nbmax = 12; // We show last 12 receipts (so we can have more than one year) $liste = ""; $sql = "SELECT DISTINCT num_releve FROM ".MAIN_DB_PREFIX."bank"; $sql .= " WHERE fk_account=".$object->id." AND num_releve IS NOT NULL"; From ec28a4fcdc19e4e057dc9a836000f006e391007b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 10:21:07 +0200 Subject: [PATCH 2/3] More info on tooltip --- htdocs/fourn/paiement/card.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 25256c7e20b..cb416a32c8f 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -251,9 +251,10 @@ if ($result > 0) print '
'; /** - * Liste des factures + * List of vendor invoices */ - $sql = 'SELECT f.rowid, f.ref, f.ref_supplier, f.total_ttc, pf.amount, f.rowid as facid, f.paye, f.fk_statut, s.nom as name, s.rowid as socid'; + $sql = 'SELECT f.rowid, f.rowid as facid, f.ref, f.ref_supplier, f.type, f.total_ttc, f.date, f.fk_statut as status,'; + $sql .= ' pf.amount, s.nom as name, s.rowid as socid'; $sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf,'.MAIN_DB_PREFIX.'facture_fourn as f,'.MAIN_DB_PREFIX.'societe as s'; $sql .= ' WHERE pf.fk_facturefourn = f.rowid AND f.fk_soc = s.rowid'; $sql .= ' AND pf.fk_paiementfourn = '.$object->id; @@ -285,6 +286,9 @@ if ($result > 0) $facturestatic->id = $objp->facid; $facturestatic->ref = ($objp->ref ? $objp->ref : $objp->rowid); + $facturestatic->date = $db->jdate($obj->date); + $facturestatic->type = $obj->type; + $facturestatic->statut = $obj->status; print ''; // Ref From fe2e41527ad8484b08b2b51fdba10457faae2c56 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 10:28:26 +0200 Subject: [PATCH 3/3] Fix sql error --- htdocs/fourn/paiement/card.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index cb416a32c8f..82c6e1d18d3 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -253,7 +253,7 @@ if ($result > 0) /** * List of vendor invoices */ - $sql = 'SELECT f.rowid, f.rowid as facid, f.ref, f.ref_supplier, f.type, f.total_ttc, f.date, f.fk_statut as status,'; + $sql = 'SELECT f.rowid, f.rowid as facid, f.ref, f.ref_supplier, f.type, f.paye, f.total_ht, f.total_tva, f.total_ttc, f.datef as date, f.fk_statut as status,'; $sql .= ' pf.amount, s.nom as name, s.rowid as socid'; $sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf,'.MAIN_DB_PREFIX.'facture_fourn as f,'.MAIN_DB_PREFIX.'societe as s'; $sql .= ' WHERE pf.fk_facturefourn = f.rowid AND f.fk_soc = s.rowid'; @@ -286,9 +286,13 @@ if ($result > 0) $facturestatic->id = $objp->facid; $facturestatic->ref = ($objp->ref ? $objp->ref : $objp->rowid); - $facturestatic->date = $db->jdate($obj->date); - $facturestatic->type = $obj->type; - $facturestatic->statut = $obj->status; + $facturestatic->date = $db->jdate($objp->date); + $facturestatic->type = $objp->type; + $facturestatic->total_ht = $objp->total_ht; + $facturestatic->total_tva = $objp->total_tva; + $facturestatic->total_ttc = $objp->total_ttc; + $facturestatic->statut = $objp->status; + $facturestatic->alreadypaid = -1; // unknown print ''; // Ref @@ -304,7 +308,7 @@ if ($result > 0) // Payed print ''.price($objp->amount).''; // Status - print ''.$facturestatic->LibStatut($objp->paye, $objp->fk_statut, 6, 1).''; + print ''.$facturestatic->LibStatut($objp->paye, $objp->status, 6, 1).''; print "\n"; if ($objp->paye == 1)