';
}
- if (! ($_POST['fac_replacement'] > 0))
+ // Le test est different selon qu'on est en mode autocompletion ou non
+ if ( !$conf->global->USE_AUTOCOMPLETION_FACTURE && ! ($_POST['fac_replacement'] > 0 ) ||
+ ( $conf->global->USE_AUTOCOMPLETION_FACTURE && ! ($_POST['fac_replacement'] > 0 ) && empty($_POST['autocomplete_fac_replacement']) ))
{
$error=1;
$mesg='
';
- $text=$langs->transnoentities("InvoiceAvoirAsk").' ';
+ $text=$langs->transnoentities("InvoiceAvoirAsk");
// $text.='';
- $text.='';
- if ($optionsav)
- {
- $text.='';
- $text.=$optionsav;
- }
- else
- {
- $text.='';
+
+ if (!$conf->global->USE_AUTOCOMPLETION_FACTURE) {
+
+ $text.='';
+ if ($optionsav)
+ {
+ $text.='';
+ $text.=$optionsav;
+ }
+ else
+ {
+ $text.='';
+ }
+ $text.='';
+
+ } else {
+
+ // Associer le champ autocompletion avec le source pour recupérer les données en ajax
+ // Le paramètre minLength: 4 permet de déclencher l'autocomplétion à partir de 4 caractères
+ print '
+
+ ';
+
+ // Champ caché qui contiendra le rowId de la facture
+ $text.='';
+ // Champ autocompletion sur le numero de facture de l'avoir
+ $text.='';
+ }
+
+ if (!$conf->global->USE_AUTOCOMPLETION_FACTURE) {
+ $desc=$html->textwithpicto($text,$langs->transnoentities("InvoiceAvoirDesc"),1);
+ } else {
+ $desc=$html->textwithpicto($text,$langs->transnoentities("InvoiceAvoirDesc").$langs->transnoentities("InvoiceAutocomplete"),1);
}
- $text.='';
- $desc=$html->textwithpicto($text,$langs->transnoentities("InvoiceAvoirDesc"),1);
+
+
//.' ('.$langs->trans("FeatureNotYetAvailable").')',$langs->transnoentities("InvoiceAvoirDesc"),1);
print $desc;
print '
'."\n";
@@ -1802,7 +1890,7 @@
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pt.fk_product = p.rowid';
$sql.= ' WHERE pt.fk_contrat = '.$object->id;
$sql.= ' ORDER BY pt.rowid ASC';
- }
+ }
if ($_GET['origin'] && $_GET['originid'])
{
print ' ';
@@ -2214,6 +2302,7 @@
$facthatreplace->fetch($facidnext);
print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')';
}
+
print '';
// Discounts
diff -BNaur --exclude=CVS --exclude='*.patch' --exclude='.#*' --exclude=.project --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents dolibarr-2.9.0/htdocs/conf/conf.php.old dolibarr-2.9.0-patchF1/htdocs/conf/conf.php.old
--- dolibarr-2.9.0/htdocs/conf/conf.php.old 2011-01-18 11:28:38.000000000 +0100
+++ dolibarr-2.9.0-patchF1/htdocs/conf/conf.php.old 1970-01-01 01:00:00.000000000 +0100
@@ -1,21 +0,0 @@
-
diff -BNaur --exclude=CVS --exclude='*.patch' --exclude='.#*' --exclude=.project --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents dolibarr-2.9.0/htdocs/langs/fr_FR/bills.lang dolibarr-2.9.0-patchF1/htdocs/langs/fr_FR/bills.lang
--- dolibarr-2.9.0/htdocs/langs/fr_FR/bills.lang 2010-08-04 00:09:27.000000000 +0200
+++ dolibarr-2.9.0-patchF1/htdocs/langs/fr_FR/bills.lang 2011-01-20 13:42:28.000000000 +0100
@@ -24,6 +24,7 @@
InvoiceAvoir=Facture avoir
InvoiceAvoirAsk=Facture avoir pour correction de la facture
InvoiceAvoirDesc=La facture d'avoir est une facture négative destinée à compenser un montant de facture qui diffère du montant réellement versé (suite à un trop versé par le client par erreur ou un manque non versé par le client suite à un retour produit par exemple).
+InvoiceAutocomplete=
L'autocomplétion est active. Vous pouvez saisir les premiers caractères d'une facture non payée et choisir dans la liste déroulante.
ReplaceInvoice=Remplace la facture %s
ReplacementInvoice=Remplacement facture
ReplacedByInvoice=Remplacée par la facture %s
diff -BNaur --exclude=CVS --exclude='*.patch' --exclude='.#*' --exclude=.project --exclude='*~' --exclude='*.rej' --exclude='*.orig' --exclude='*.bak' --exclude=conf.php --exclude=documents dolibarr-2.9.0/.settings/org.eclipse.php.core.prefs dolibarr-2.9.0-patchF1/.settings/org.eclipse.php.core.prefs
--- dolibarr-2.9.0/.settings/org.eclipse.php.core.prefs 1970-01-01 01:00:00.000000000 +0100
+++ dolibarr-2.9.0-patchF1/.settings/org.eclipse.php.core.prefs 2011-01-20 12:01:01.000000000 +0100
@@ -0,0 +1,3 @@
+#Thu Jan 20 12:01:01 CET 2011
+eclipse.preferences.version=1
+include_path=0;/dolibarr-2.9.0-patchF1