diff --git a/ChangeLog b/ChangeLog index aa627126b38..91ed5220c44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -51,6 +51,7 @@ For users: and credit note if mask is same. - New: Add status into export. Add default language into export. - New: Can remove a project if project has tasks. +- New: Can filter on date when building cheque receipts. - Fix: Better Postgresql compatibility. For developers: diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/fiche.php index c10348ca888..90c5c867610 100644 --- a/htdocs/compta/paiement/cheque/fiche.php +++ b/htdocs/compta/paiement/cheque/fiche.php @@ -58,7 +58,8 @@ $limit = $conf->liste_limit; $offset = $limit * $page ; $dir=$conf->banque->dir_output.'/bordereau/'; - +$filterdate=dol_mktime(0,0,0,$_POST['fdmonth'],$_POST['fdday'],$_POST['fdyear']); +//var_dump($_POST); /* * Actions @@ -287,11 +288,25 @@ if ($action == 'new') $accounts = array(); $lines = array(); - $now=time(); + $now=dol_now(); + print $langs->trans("SelectChequeTransactionAndGenerate").'
'; + print '
'; + print ''; + //print '
aaa'; print ''; - print ''; - print '
'.$langs->trans('Date').''.dol_print_date($now,'day').'

'; + //print ''.$langs->trans('Date').''.dol_print_date($now,'day').''; + // Filter + print ''.$langs->trans("Date").''; + print $html->select_date($filterdate,'fd',0,0,1); + print ''; + print ''; + print ''; + print ''; + print ''; + //print '
'; + print '
'; + print '
'; $sql = "SELECT ba.rowid as bid, b.dateo as date, b.rowid as chqid, "; $sql.= " b.amount, ba.label, b.emetteur, b.num_chq, b.banque"; @@ -302,6 +317,7 @@ if ($action == 'new') $sql.= " AND ba.entity = ".$conf->entity; $sql.= " AND b.fk_bordereau = 0"; $sql.= " AND b.amount > 0"; + if ($filterdate) $sql.=" AND b.dateo = '".$db->idate($filterdate)."'"; $sql.= $db->order("b.dateo,b.rowid","ASC"); $resql = $db->query($sql); @@ -353,7 +369,8 @@ if ($action == 'new') print ''; print ''; - print '\n"; + print '\n"; print '\n"; print '\n"; print '\n"; diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang index 8c3b1d3813f..bac84594523 100644 --- a/htdocs/langs/en_US/banks.lang +++ b/htdocs/langs/en_US/banks.lang @@ -140,3 +140,5 @@ AllAccounts=All bank/cash accounts BackToAccount=Back to account ShowAllAccounts=Show for all accounts FutureTransaction=Transaction in futur. No way to conciliate. +SelectChequeTransactionAndGenerate=Select/filter cheques to include into the cheque receipt and click on "Create". + diff --git a/htdocs/langs/fr_FR/banks.lang b/htdocs/langs/fr_FR/banks.lang index 9216245e5e0..8bf846d669b 100644 --- a/htdocs/langs/fr_FR/banks.lang +++ b/htdocs/langs/fr_FR/banks.lang @@ -140,4 +140,5 @@ BankTransactionLine=Écriture bancaire AllAccounts=Tous les comptes bancaires/caisses BackToAccount=Retour au compte ShowAllAccounts=Afficher pour tous les comptes -FutureTransaction=Transaction future. Pas moyen de concilier. \ No newline at end of file +FutureTransaction=Transaction future. Pas moyen de concilier. +SelectChequeTransactionAndGenerate=Sélectionner/filtrer les chèques à inclure dans le bordereau de remise et cliquer sur "Créer". \ No newline at end of file
'.$langs->trans("DateChequeReceived")."  '.$langs->trans("DateChequeReceived").' '; + print "'.$langs->trans("ChequeNumber")."'.$langs->trans("CheckTransmitter")."'.$langs->trans("Bank")."