From d586967a689546827fd8011c3c655c09463381e1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 May 2007 19:57:51 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Tableau=20mal=20=E9quilibr=E9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/categorie.php | 223 ++++++++------------------------------ 1 file changed, 48 insertions(+), 175 deletions(-) diff --git a/htdocs/comm/categorie.php b/htdocs/comm/categorie.php index 3d110db8e93..bd363901e9d 100644 --- a/htdocs/comm/categorie.php +++ b/htdocs/comm/categorie.php @@ -90,6 +90,7 @@ if ($_GET["socid"] || $_GET["ref"]) } + $html = new Form($db); @@ -98,49 +99,43 @@ $html = new Form($db); */ if ($_GET["socid"] || $_GET["ref"]) { + /* + * Affichage onglets + */ + $head = societe_prepare_head($soc); - + dolibarr_fiche_head($head, 'category', $soc->nom); - - /* - * Affichage onglets - */ - $head = societe_prepare_head($soc); - - dolibarr_fiche_head($head, 'category', $soc->nom); - - print ''; - print '
'; - print ''; + print '
'; - print ''; + print ''; - print ''; + print ''; - if ($soc->client) - { - print ''; - } + if ($soc->client) + { + print ''; + } - print ""; + print ""; - print '"; - print '"; - if ($soc->pays) { - print ''; - } + print '"; + print '"; + if ($soc->pays) { + print ''; + } - print ''; - print ''; + print ''; + print ''; - print '"; + print '"; // Assujeti à TVA ou pas print ''; @@ -149,130 +144,7 @@ if ($_GET["socid"] || $_GET["ref"]) print ''; print ''; - // Conditions de réglement par défaut - $langs->load('bills'); - $html = new Form($db); - print '"; - print ''; - - // Mode de règlement - print '"; - print ''; - - // Réductions relative (Remises-Ristournes-Rabbais) - print ''; - print ''; - - // Réductions absolues (Remises-Ristournes-Rabbais) - print ''; - print ''; - print ''; - - // multiprix - if($conf->global->PRODUIT_MULTIPRICES == 1) - { - print '"; - print ''; - } - - // Adresse de livraison - if ($conf->expedition->enabled) - { - print ''; - print ''; - } - - print "
'.$langs->trans("Name").''; - print $soc->nom; - print '
'.$langs->trans("Name").''; + print $soc->nom; + print '
'.$langs->trans('Prefix').''.$soc->prefix_comm.'
'.$langs->trans('Prefix').''.$soc->prefix_comm.'
'; - print $langs->trans('CustomerCode').''; - print $soc->code_client; - if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); - print '
'; + print $langs->trans('CustomerCode').''; + print $soc->code_client; + if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); + print '
".$langs->trans('Address')."".nl2br($soc->adresse)."
".$langs->trans('Address')."".nl2br($soc->adresse)."
'.$langs->trans('Zip').''.$soc->cp."'.$langs->trans('Town').''.$soc->ville."
'.$langs->trans('Country').''.$soc->pays.'
'.$langs->trans('Zip').''.$soc->cp."'.$langs->trans('Town').''.$soc->ville."
'.$langs->trans('Country').''.$soc->pays.'
'.$langs->trans('Phone').''.dolibarr_print_phone($soc->tel,$soc->pays_code).''.$langs->trans('Fax').''.dolibarr_print_phone($soc->fax,$soc->pays_code).'
'.$langs->trans('Phone').''.dolibarr_print_phone($soc->tel,$soc->pays_code).''.$langs->trans('Fax').''.dolibarr_print_phone($soc->fax,$soc->pays_code).'
'.$langs->trans("Web")."url\" target=\"_blank\">".$soc->url." 
'.$langs->trans("Web")."url\" target=\"_blank\">".$soc->url." 
'; - print ''; - print '
'; - print $langs->trans('PaymentConditions'); - print ''; - if (($_GET['action'] != 'editconditions') && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('SetConditions'),1).'
'; - print '
'; - if ($_GET['action'] == 'editconditions') - { - $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$soc->id,$soc->cond_reglement,'cond_reglement_id',-1,1); - } - else - { - $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$soc->id,$soc->cond_reglement,'none'); - } - print "
'; - print ''; - print '
'; - print $langs->trans('PaymentMode'); - print ''; - if (($_GET['action'] != 'editmode') && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('SetMode'),1).'
'; - print '
'; - if ($_GET['action'] == 'editmode') - { - $html->form_modes_reglement($_SERVER['PHP_SELF'].'?socid='.$soc->id,$soc->mode_reglement,'mode_reglement_id'); - } - else - { - $html->form_modes_reglement($_SERVER['PHP_SELF'].'?socid='.$soc->id,$soc->mode_reglement,'none'); - } - print "
'; - print '
'; - print $langs->trans("CustomerRelativeDiscountShort"); - print ''; - if ($user->rights->societe->creer) - { - print ''.img_edit($langs->trans("Modify")).''; - } - print '
'; - print '
'.($soc->remise_client?$soc->remise_client.'%':$langs->trans("DiscountNone")).'
'; - print ''; - print '
'; - print $langs->trans("CustomerAbsoluteDiscountShort"); - print ''; - if ($user->rights->societe->creer) - { - print ''.img_edit($langs->trans("Modify")).''; - } - print '
'; - print '
'; - $amount_discount=$soc->getcurrentDiscount(); - if ($amount_discount < 0) dolibarr_print_error($db,$societe->error); - if ($amount_discount > 0) print $amount_discount.' '.$langs->trans("Currency".$conf->monnaie); - else print $langs->trans("DiscountNone"); - print '
'; - print '
'; - print $langs->trans("PriceLevel"); - print ''; - if ($user->rights->societe->creer) - { - print ''.img_edit($langs->trans("Modify")).''; - } - print '
'; - print '
'.$soc->price_level."
'; - print '
'; - print $langs->trans("DeliveriesAddress"); - print ''; - if ($user->rights->societe->creer) - { - print ''.img_edit($langs->trans("Modify")).''; - } - print '
'; - print '
'; - - $sql = "SELECT count(rowid) as nb"; - $sql.= " FROM ".MAIN_DB_PREFIX."societe_adresse_livraison"; - $sql.= " WHERE fk_societe =".$soc->id; - - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $objal = $db->fetch_object($resql); - print $objal->nb?($objal->nb):$langs->trans("NoOtherDeliveryAddress"); - } - else - { - dolibarr_print_error($db); - } - - print '
"; + print '
'; print ''; @@ -280,15 +152,15 @@ if ($_GET["socid"] || $_GET["ref"]) if ($mesg) print($mesg); - /* - * Barre d'actions - * - */ - print '
'; - if ($user->rights->categorie->creer) - { - print ''.$langs->trans("NewCat").''; - } + /* + * Barre d'actions + * + */ + print '
'; + if ($user->rights->categorie->creer) + { + print ''.$langs->trans("NewCat").''; + } print '
'; @@ -296,15 +168,15 @@ if ($_GET["socid"] || $_GET["ref"]) if ($user->rights->societe->creer) { print '
'; - print '
'; - print ''; - print ''; - print ''; - print '
'; - print $langs->trans("ClassifyInCategory").' '; - print $html->select_all_categories(2,$categorie->id_mere).'
'; - print '
'; - print '
'; + print '
'; + print ''; + print ''; + print ''; + print '
'; + print $langs->trans("ClassifyInCategory").' '; + print $html->select_all_categories(2,$categorie->id_mere).'
'; + print '
'; + print '
'; } @@ -365,6 +237,7 @@ if ($_GET["socid"] || $_GET["ref"]) } } + $db->close();