diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 904f40937bd..2b94e226658 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -883,9 +883,9 @@ if ($_GET["id"] || $_GET["ref"]) $soc = new Societe($db); $soc->id = $socid; $soc->fetch($socid); - + print ''.$langs->trans("SellingPrice").''; - + if ($product->multiprices_base_type["$soc->price_level"] == 'TTC') { print ''.price($product->multiprices_ttc["$soc->price_level"]); @@ -894,7 +894,7 @@ if ($_GET["id"] || $_GET["ref"]) { print ''.price($product->multiprices["$soc->price_level"]); } - + if ($product->multiprices_base_type["$soc->price_level"]) { print ' '.$langs->trans($product->multiprices_base_type["$soc->price_level"]); @@ -904,7 +904,7 @@ if ($_GET["id"] || $_GET["ref"]) print ' '.$langs->trans($product->price_base_type); } print ''; - + // Prix mini print ''.$langs->trans("MinPrice").''; if ($product->multiprices_base_type["$soc->price_level"] == 'TTC') @@ -922,7 +922,7 @@ if ($_GET["id"] || $_GET["ref"]) for ($i=1; $i<=$conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { print ''.$langs->trans("SellingPrice").' '.$i.''; - + if ($product->multiprices_base_type["$i"] == 'TTC') { print ''.price($product->multiprices_ttc["$i"]); @@ -931,7 +931,7 @@ if ($_GET["id"] || $_GET["ref"]) { print ''.price($product->multiprices["$i"]); } - + if ($product->multiprices_base_type["$i"]) { print ' '.$langs->trans($product->multiprices_base_type["$i"]); @@ -941,7 +941,7 @@ if ($_GET["id"] || $_GET["ref"]) print ' '.$langs->trans($product->price_base_type); } print ''; - + // Prix mini print ''.$langs->trans("MinPrice").' '.$i.''; if ($product->multiprices_base_type["$i"] == 'TTC') @@ -1273,6 +1273,10 @@ if ($_GET["action"] == '') print "\n
\n"; +/* + * All the "Add to" areas + */ + if ($_GET["id"] && $_GET["action"] == '' && $product->status) { $propal = New Propal($db); @@ -1315,7 +1319,9 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) { $var=true; $num = $db->num_rows($result); - print ''; + print ''; + print ''; + print '
'; if ($num) { $i = 0; @@ -1323,8 +1329,6 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) { $objp = $db->fetch_object($result); $var=!$var; - print ''; - print ''; print ""; print "'; print ''; - print ''; $i++; } } @@ -1349,6 +1352,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) print ""; } print "
"; print ''; @@ -1339,7 +1343,6 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) print ''; print '
"; + print ''; $db->free($result); } @@ -1361,13 +1365,12 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) $var=true; $otherprop = $propal->liste_array(1, ' <> '.$user->id); - print ''; - + print ''; + print ''; + print '
'; if (is_array($otherprop) && sizeof($otherprop)) { $var=!$var; - print ''; - print ''; print ''; - print ''; } else { @@ -1388,6 +1390,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) print ''; } print '
'; print ''; print $langs->trans("OtherPropals").''; @@ -1379,7 +1382,6 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) print ''; print ''; print '
'; + print ''; print ''; } @@ -1434,7 +1437,9 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) { $num = $db->num_rows($result); $var=true; - print ''; + print ''; + print ''; + print '
'; if ($num) { $i = 0; @@ -1442,8 +1447,6 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) { $objc = $db->fetch_object($result); $var=!$var; - print ''; - print ''; print ""; print "'; print ''; - print ''; $i++; } } @@ -1469,6 +1471,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) print ''; } print "
"; print ''; @@ -1458,7 +1461,6 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) print ''; print '
"; + print ''; $db->free($result); } @@ -1481,12 +1484,12 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) $var=true; $othercom = $commande->liste_array(1, ' <> '.$user->id); - print ''; + print ''; + print ''; + print '
'; if (is_array($othercom) && sizeof($othercom)) { $var=!$var; - print ''; - print ''; print ''; - print ''; } else { @@ -1507,6 +1509,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) print ''; } print '
'; print ''; print $langs->trans("OtherOrders").''; @@ -1498,7 +1501,6 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) print ''; print ''; print '
'; + print ''; } print ''; @@ -1516,8 +1519,6 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) // Factures if($conf->facture->enabled && $user->rights->facture->creer) { - - print ''; print $langs->trans("AddToMyBills").''; @@ -1547,109 +1548,109 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) $result=$db->query($sql); if ($result) { - $num = $db->num_rows($result); - $var=true; - print ''; - if ($num) - { - $i = 0; - while ($i < $num) - { - $objp = $db->fetch_object($result); - $var=!$var; - print ''; - print ''; - print ""; - print "\n"; - print "\n"; - print "\n"; - print ''; - print ''; - print ''; - $i++; - } - } - else { - print "'; - } - print "
"; - print ''; - print "factureid."\">".img_object($langs->trans("ShowBills"),"bill")." ".$objp->facnumber."socid."\">".dol_trunc($objp->nom,18)."".dol_print_date($objp->df,"%d %b")."'; - print ''.$langs->trans("ReductionShort"); - print '%'; - print ''; - print ''; - print '
"; - print $langs->trans("NoDraftBills"); - print '
"; - $db->free($result); + $num = $db->num_rows($result); + $var=true; + print '
'; + print ''; + print ''; + if ($num) + { + $i = 0; + while ($i < $num) + { + $objp = $db->fetch_object($result); + $var=!$var; + print ""; + print "\n"; + print "\n"; + print "\n"; + print ''; + print ''; + $i++; + } + } + else { + print "'; + } + print "
"; + print ''; + print "factureid."\">".img_object($langs->trans("ShowBills"),"bill")." ".$objp->facnumber."socid."\">".dol_trunc($objp->nom,18)."".dol_print_date($objp->df,"%d %b")."'; + print ''.$langs->trans("ReductionShort"); + print '%'; + print ''; + print ''; + print '
"; + print $langs->trans("NoDraftBills"); + print '
"; + print '
'; + $db->free($result); } else { - dol_print_error($db); + dol_print_error($db); } print ''; if ($user->rights->societe->client->voir) { - print ''; + print ''; - // Liste de Autres factures - $var=true; + // Liste de Autres factures + $var=true; - $sql = "SELECT s.nom, s.rowid as socid, f.rowid as factureid, f.facnumber,".$db->pdate("f.datef")." as df"; - $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as f"; - $sql.= " WHERE f.fk_soc = s.rowid"; - $sql.= " AND f.entity = ".$conf->entity; - $sql.= " AND f.fk_statut = 0"; - $sql.= " AND f.fk_user_author <> ".$user->id; - $sql.= " ORDER BY f.datec DESC, f.rowid DESC"; + $sql = "SELECT s.nom, s.rowid as socid, f.rowid as factureid, f.facnumber,".$db->pdate("f.datef")." as df"; + $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as f"; + $sql.= " WHERE f.fk_soc = s.rowid"; + $sql.= " AND f.entity = ".$conf->entity; + $sql.= " AND f.fk_statut = 0"; + $sql.= " AND f.fk_user_author <> ".$user->id; + $sql.= " ORDER BY f.datec DESC, f.rowid DESC"; - $result=$db->query($sql); - if ($result) - { - $num = $db->num_rows($result); - $var=true; - print ''; - if ($num) { - $i = 0; - while ($i < $num) - { - $objp = $db->fetch_object($result); + $result=$db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + $var=true; + print ''; + print ''; + print '
'; + if ($num) { + $i = 0; + while ($i < $num) + { + $objp = $db->fetch_object($result); - $var=!$var; - print ''; - print ''; - print ""; - print "\n"; - print "\n"; - print ""; - print ''; - print ''; - print ''; - $i++; - } - } - else { - print "'; - } - print "
factureid."\">$objp->facnumbersocid."\">".dol_trunc($objp->nom,24)."".$langs->trans("Qty"); - print ''; - print "'; - print ''.$langs->trans("ReductionShort"); - print '%'; - print ''; - print ''; - print '
"; - print $langs->trans("NoOtherDraftBills"); - print '
"; - $db->free($result); - } - else - { - dol_print_error($db); - } + $var=!$var; + print ""; + print "factureid."\">$objp->facnumber\n"; + print "socid."\">".dol_trunc($objp->nom,24)."\n"; + print "".$langs->trans("Qty"); + print ''; + print ""; + print ''; + print ''.$langs->trans("ReductionShort"); + print '%'; + print ''; + print ''; + print ''; + print ''; + $i++; + } + } + else { + print ""; + print $langs->trans("NoOtherDraftBills"); + print ''; + } + print ""; + print ''; + $db->free($result); + } + else + { + dol_print_error($db); + } } print ''; @@ -1661,6 +1662,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) } + $db->close(); llxFooter('$Date$ - $Revision$'); diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 10e4d912a64..7ac362180e9 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -28,6 +28,7 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php"); require_once(DOL_DOCUMENT_ROOT."/product.class.php"); +require_once(DOL_DOCUMENT_ROOT."/html.formadmin.class.php"); $langs->load("products"); $langs->load("bills"); @@ -136,6 +137,7 @@ if ($_GET["id"]) $result = $product->fetch($_GET["id"]); llxHeader("","",$langs->trans("Translation")); $html = new Form($db); +$formadmin=new FormAdmin($db); $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); @@ -243,7 +245,8 @@ if ($_GET["action"] == 'add' || ($user->rights->produit->creer || $user->rights- $langs_available = $langs->get_available_languages(); $current_lang = $langs->getDefaultLang(); - // on construit la liste des traduction qui n'existe pas deja + + // on construit la liste des traduction qui n'existe pas deja $select = ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 16356550da2..fa307f5b1d4 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -169,7 +169,6 @@ if ($_GET["action"] == 'edit') print ! empty($dolibarr_main_demo)?' disabled="true"':''; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").''; print '';
'.$langs->trans('Translation').''.$select.'
'.$langs->trans('Translation').''; + $formadmin->select_lang($fuser->conf->MAIN_LANG_DEFAULT,'lang',0); + print '
'.$langs->trans('Label').'
'.$langs->trans('Description').'
'.$langs->trans('Note').'
'; - $html=new Form($db); $formadmin->select_lang($fuser->conf->MAIN_LANG_DEFAULT,'main_lang_default',1); print '