From 50f1f17d0a2b1ff8129c375ae3a264243a0201e9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 11 Nov 2007 19:11:22 +0000 Subject: [PATCH] New: Ajout info nb de cheques --- htdocs/compta/paiement/cheque/fiche.php | 7 ++++++- htdocs/compta/paiement/cheque/index.php | 14 +++++++++----- htdocs/compta/paiement/cheque/liste.php | 25 ++++++++++++++++--------- htdocs/langs/en_US/compta.lang | 1 + htdocs/langs/fr_FR/compta.lang | 1 + 5 files changed, 33 insertions(+), 15 deletions(-) diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/fiche.php index bfc4451bbd2..365ce7f47a6 100644 --- a/htdocs/compta/paiement/cheque/fiche.php +++ b/htdocs/compta/paiement/cheque/fiche.php @@ -294,12 +294,17 @@ else print ""; print "\n"; - print ''.$langs->trans('Date').''.dolibarr_print_date($remisecheque->date_bordereau).''; + print ''.$langs->trans('DateCreation').''.dolibarr_print_date($remisecheque->date_bordereau,'day').''; print ''.$langs->trans('Account').''; print $accountstatic->getNomUrl(1); print ''; + // Nb of cheques + print ''.$langs->trans('NbOfCheques').''; + print $remisecheque->nbcheque; + print ''; + print ''.$langs->trans('Total').''; print price($remisecheque->amount); print ''; diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index 54d8f67fd9e..9dd753a9ab7 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -96,12 +96,14 @@ else print ''; -$sql = "SELECT bc.rowid,".$db->pdate("bc.date_bordereau")." as db, bc.amount,bc.number,"; -$sql.= " bc.statut, ba.label, ba.rowid as bid"; -$sql.= " FROM ".MAIN_DB_PREFIX."bordereau_cheque as bc"; -$sql.= ",".MAIN_DB_PREFIX."bank_account as ba"; +$sql = "SELECT bc.rowid,".$db->pdate("bc.date_bordereau")." as db, bc.amount, bc.number,"; +$sql.= " bc.statut, bc.nbcheque,"; +$sql.= " ba.label, ba.rowid as bid"; +$sql.= " FROM ".MAIN_DB_PREFIX."bordereau_cheque as bc,"; +$sql.= " ".MAIN_DB_PREFIX."bank_account as ba"; $sql.= " WHERE ba.rowid=bc.fk_bank_account"; -$sql.= " ORDER BY bc.rowid DESC LIMIT 10;"; +$sql.= " ORDER BY bc.rowid"; +$sql.= " DESC LIMIT 10"; $resql = $db->query($sql); @@ -112,6 +114,7 @@ if ($resql) print ''.$langs->trans("CheckReceiptShort").''; print ''.$langs->trans("Date").""; print ''.$langs->trans("Account").''; + print ''.$langs->trans("NbOfCheques").''; print ''.$langs->trans("Amount").''; print ''.$langs->trans("Status").''; print "\n"; @@ -132,6 +135,7 @@ if ($resql) print ''.$checkdepositstatic->getNomUrl(1).''; print ''.dolibarr_print_date($objp->db,'day').''; print ''.$accountstatic->getNomUrl(1).''; + print ''.$objp->nbcheque.''; print ''.price($objp->amount).''; print ''.$checkdepositstatic->LibStatut($objp->statut,3).''; diff --git a/htdocs/compta/paiement/cheque/liste.php b/htdocs/compta/paiement/cheque/liste.php index ac0d2d94c99..c45f028d154 100644 --- a/htdocs/compta/paiement/cheque/liste.php +++ b/htdocs/compta/paiement/cheque/liste.php @@ -17,7 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -53,7 +52,7 @@ $sortfield=$_GET["sortfield"]; $limit = $conf->liste_limit; $offset = $limit * $page ; if (! $sortorder) $sortorder="DESC"; -if (! $sortfield) $sortfield="bc.rowid"; +if (! $sortfield) $sortfield="bc.number"; $checkdepositstatic=new RemiseCheque($db); $accountstatic=new Account($db); @@ -65,7 +64,8 @@ $accountstatic=new Account($db); llxHeader('',$langs->trans("ChequesReceipts")); -$sql = "SELECT bc.rowid, bc.number, ".$db->pdate("bc.date_bordereau") ." as dp, bc.amount, bc.statut,"; +$sql = "SELECT bc.rowid, bc.number as ref, ".$db->pdate("bc.date_bordereau") ." as dp,"; +$sql.= " bc.nbcheque, bc.amount, bc.statut,"; $sql.= " ba.rowid as bid, ba.label"; $sql.= " FROM ".MAIN_DB_PREFIX."bordereau_cheque as bc"; $sql.= ",".MAIN_DB_PREFIX."bank_account as ba"; @@ -90,16 +90,20 @@ if ($resql) print '
'; print ''; print ''; - print_liste_field_titre($langs->trans("Ref"),"liste.php","p.rowid","",$paramlist,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Date"),"liste.php","dp","",$paramlist,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Ref"),"liste.php","bc.number","",$paramlist,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DateCreation"),"liste.php","dp","",$paramlist,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Account"),"liste.php","ba.label","",$paramlist,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Amount"),"liste.php","p.amount","",$paramlist,'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"),"liste.php","p.statut","",$paramlist,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("NbOfCheques"),"liste.php","bc.nbcheque","",$paramlist,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Amount"),"liste.php","bc.amount","",$paramlist,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status"),"liste.php","bc.statut","",$paramlist,'align="right"',$sortfield,$sortorder); print "\n"; // Lignes des champs de filtre print ''; - print ''; + print ''; + print ''; + print ''; + print ''; print ''; @@ -131,6 +135,9 @@ if ($resql) else print ' '; print ''; + // Nb of cheques + print ''; + // Montant print ''; diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 10f38170414..73aa6c17d34 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -68,6 +68,7 @@ NewCheckDeposit=New check deposit NewCheckDepositOn=New check deposit on account: %s NoWaitingChecks=No checks waiting for deposit. DateChequeReceived=Cheque reception input date +NbOfCheques=Nb of cheques PaySocialContribution=Pay a social contribution ConfirmPaySocialContribution=Are you sure you want to classify this social contribution as payed? DeleteSocialContribution=Delete a social contribution diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang index 72a7c895030..0b6e76dd485 100644 --- a/htdocs/langs/fr_FR/compta.lang +++ b/htdocs/langs/fr_FR/compta.lang @@ -68,6 +68,7 @@ NewCheckDeposit=Nouveau d NewCheckDepositOn=Nouveau dépôt sur compte: %s NoWaitingChecks=Pas de chèque en attente de dépots. DateChequeReceived=Date saisie réception chèque +NbOfCheques=Nb de cheques PaySocialContribution=Payer une charge sociale ConfirmPaySocialContribution=Etes-vous sûr de vouloir classer cette charge sociale à payé ? DeleteSocialContribution=Effacer charge sociale
     '; print ''; print ''; @@ -118,7 +122,7 @@ if ($resql) print ''; $checkdepositstatic->rowid=$objp->rowid; $checkdepositstatic->statut=$objp->statut; - $checkdepositstatic->number=$objp->number; + $checkdepositstatic->number=$objp->ref; print $checkdepositstatic->getNomUrl(1); print ''.$objp->nbcheque.''.price($objp->amount).'