From fd13ad097e5f0f24e21050cd7bc699dbff1e2054 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@users.sourceforge.net>
Date: Sat, 5 Feb 2011 23:38:33 +0000
Subject: [PATCH] New: If there is only one back account and value is
 mandatory, then value is preselected.

---
 htdocs/fourn/facture/paiement.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php
index b72742d5a27..27fb98684ed 100644
--- a/htdocs/fourn/facture/paiement.php
+++ b/htdocs/fourn/facture/paiement.php
@@ -223,7 +223,7 @@ if ($action == 'create' || $action == 'add_paiement')
             if ($conf->banque->enabled)
             {
                 print '<tr><td class="fieldrequired">'.$langs->trans('Account').'</td><td>';
-                $html->select_comptes(empty($_POST['accountid'])?'':$_POST['accountid'],'accountid',0,'',1);
+                $html->select_comptes(empty($_POST['accountid'])?'':$_POST['accountid'],'accountid',0,'',2);
                 print '</td></tr>';
             }
             else
@@ -423,7 +423,7 @@ if (! $_GET['action'] && ! $_POST['action'])
         $html->select_types_paiements($_REQUEST["search_paymenttype"],'search_paymenttype','',2,1,1);
         print '</td>';
         print '<td>';
-        $html->select_comptes($_REQUEST["search_account"],'search_account',0,'',2);
+        $html->select_comptes($_REQUEST["search_account"],'search_account',0,'',1);
         print '</td>';
         print '<td align="right">';
         print '<input class="fat" type="text" size="4" name="search_amount" value="'.$_REQUEST["search_amount"].'">';
-- 
GitLab