From 17379431d3db3fdfbd7f62ba19f7655d43cfbeba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 20 Jun 2006 18:52:02 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Fix=20mineure=20sur=20cr=E9ation=20factu?= =?UTF-8?q?re=20fournisseur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/fourn/facture/fiche.php | 35 +++++++++++++++++++------------ htdocs/langs/en_US/suppliers.lang | 1 + htdocs/langs/fr_FR/suppliers.lang | 1 + 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 07eb8392536..3cd535ec997 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -297,19 +297,35 @@ if ($_GET['action'] == 'create' or $_GET['action'] == 'copy') $fac_ori->fetch($_GET['facid']); } + $societe=''; + if ($_GET['socid']) + { + $societe=new Societe($db); + $societe->fetch($_GET['socid']); + } + print '
'; print ''; print ''; print ''; print ''; print ''; print ''; - print ''; + print ''; if ($_GET['action'] == 'copy') { print ''; @@ -355,12 +371,6 @@ if ($_GET['action'] == 'create' or $_GET['action'] == 'copy') print ''; print ''; print ''; print ''; @@ -384,8 +394,7 @@ else $fac->fetch($_GET['facid']); $societe = new Fournisseur($db); - - if ( $societe->fetch($fac->socidp) ) + if ($societe->fetch($fac->socidp)) { $addons[0][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$fac->socidp; $addons[0][1] = $societe->nom; @@ -395,10 +404,10 @@ else if ($mesg) { print $mesg.'
'; } - print_titre($langs->trans('SupplierInvoice')); if ($_GET['action'] == 'edit' || $_GET['action'] == 'delete_product_line') { + print_titre($langs->trans('SupplierInvoice')); /* * Confirmation de la suppression d'une ligne produit @@ -423,7 +432,7 @@ else $rownb=9; print ''; @@ -610,7 +619,7 @@ else print "\n"; // Societe - print ''; + print ''; print ''; print ''; diff --git a/htdocs/langs/en_US/suppliers.lang b/htdocs/langs/en_US/suppliers.lang index f9df7d76b23..b36878f730a 100644 --- a/htdocs/langs/en_US/suppliers.lang +++ b/htdocs/langs/en_US/suppliers.lang @@ -14,4 +14,5 @@ BuyingPrice=Buying price AddSupplierPrice=Add supplier price ChangeSupplierPrice=Change supplier price ErrorQtyTooLowForThisSupplier=Quantity too low for this supplier +ErrorSupplierCountryIsNotDefined=Country for this supplier is not defined. Correct this first. ProductHasAlreadyReferenceInThisSupplier=This product has already a reference in this supplier \ No newline at end of file diff --git a/htdocs/langs/fr_FR/suppliers.lang b/htdocs/langs/fr_FR/suppliers.lang index 3234d96c402..d70b5720fe1 100644 --- a/htdocs/langs/fr_FR/suppliers.lang +++ b/htdocs/langs/fr_FR/suppliers.lang @@ -14,4 +14,5 @@ BuyingPrice=Prix d'achat AddSupplierPrice=Ajouter prix fournisseur ChangeSupplierPrice=Modifier prix fournisseur ErrorQtyTooLowForThisSupplier=Quantité insuffisante pour ce fournisseur +ErrorSupplierCountryIsNotDefined=Le pays de ce fournisseur n'est pas défini. Corriger sur sa fiche. ProductHasAlreadyReferenceInThisSupplier=Ce produit a déjà une référence chez ce fournisseur \ No newline at end of file
'.$langs->trans('Company').''; - $html->select_societes(empty($_GET['socid'])?'':$_GET['socid'],'socidp','s.fournisseur = 1'); + + if ($_GET['socid']) + { + print $societe->getNomUrl(1); + print ''; + } + else + { + $html->select_societes(empty($_GET['socid'])?'':$_GET['socid'],'socidp','s.fournisseur = 1'); + } print ''.$langs->trans('Note').'
'.$langs->trans('Ref').'
'.$langs->trans('Label').'
'; - $societe=''; - if ($_GET['socid']) - { - $societe=new Societe($db); - $societe->fetch($_GET['socid']); - } $html->select_tva('tauxtva'.$i,'',$societe,$mysoc); print '
'; - print '
'.$langs->trans('Company').''.dolibarr_trunc($fac->socnom,24).'
'.$langs->trans('Company').''.$societe->getNomUrl(1).''.$langs->trans('OtherBills').'