From 901c7c9517720d6291252100146302f5c2af11eb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 May 2016 02:16:28 +0200 Subject: [PATCH] Link "Backtolist" was missing on products --- htdocs/comm/card.php | 5 ----- htdocs/core/class/html.form.class.php | 2 +- htdocs/core/lib/company.lib.php | 4 ++-- htdocs/core/tpl/objectline_edit.tpl.php | 2 +- htdocs/margin/tabs/productMargins.php | 4 +++- htdocs/margin/tabs/thirdpartyMargins.php | 5 ----- htdocs/product/card.php | 4 +++- htdocs/product/composition/card.php | 4 +++- htdocs/product/document.php | 4 +++- htdocs/product/fournisseurs.php | 6 ++++-- htdocs/product/info.php | 2 +- htdocs/product/price.php | 4 +++- htdocs/product/stats/card.php | 4 +++- htdocs/product/stats/commande.php | 4 +++- htdocs/product/stats/commande_fournisseur.php | 4 +++- htdocs/product/stats/contrat.php | 4 +++- htdocs/product/stats/facture.php | 4 +++- htdocs/product/stats/facture_fournisseur.php | 4 +++- htdocs/product/stats/propal.php | 4 +++- htdocs/product/stock/product.php | 7 +++++-- htdocs/product/stock/tpl/stocktransfer.tpl.php | 2 +- htdocs/product/traduction.php | 8 ++++++-- htdocs/societe/agenda.php | 11 +++-------- htdocs/societe/consumption.php | 10 +++------- htdocs/societe/document.php | 13 ++++--------- htdocs/societe/note.php | 11 +++-------- htdocs/societe/project.php | 5 ----- htdocs/societe/soc.php | 12 ++++++------ 28 files changed, 76 insertions(+), 77 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 38447c17c5e..ce611528a62 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -233,11 +233,6 @@ if ($id > 0) print '
'; print ''; - // Alias name (commercial, trademark or alias name) - print '"; - // Prospect/Customer print ''; diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php index b409d0c752f..e4a349382b0 100644 --- a/htdocs/margin/tabs/productMargins.php +++ b/htdocs/margin/tabs/productMargins.php @@ -82,7 +82,9 @@ if ($id > 0 || ! empty($ref)) $picto=($object->type== Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'margin', $titre, 0, $picto); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '
'; diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php index 32c39b63b4f..cd12539c2f7 100644 --- a/htdocs/margin/tabs/thirdpartyMargins.php +++ b/htdocs/margin/tabs/thirdpartyMargins.php @@ -95,11 +95,6 @@ if ($socid > 0) print '
'; print '
'.$langs->trans('AliasNames').''; - print $object->name_alias; - print "
'.$langs->trans('ProspectCustomer').''; print $object->getLibCustProspStatut(); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 74cd27bc460..dcf593e6ccd 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4297,7 +4297,7 @@ class Form } $return.= '>'.vatrate($rate['libtva']); //$return.=($rate['code']?' '.$rate['code']:''); - $return.= (empty($defaultcode) && $rate['nprtva']) ? ' *': ''; // We show the * (old behaviour only if new vat code is not used) + $return.= (empty($rate['code']) && $rate['nprtva']) ? ' *': ''; // We show the * (old behaviour only if new vat code is not used) $return.= ''; } diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 8631c576576..b2b6d8274a5 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -186,9 +186,9 @@ function societe_prepare_head(Societe $object) if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) )) { $head[$h][1] = $langs->trans("Events"); - $head[$h][1].= ' / '; + $head[$h][1].= '/'; } - $head[$h][1].= $langs->trans("Info"); + $head[$h][1].= $langs->trans("Agenda"); $head[$h][2] = 'agenda'; $h++; diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 1f0756a666c..4c5b654a76f 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -117,7 +117,7 @@ $coldisplay=-1; // We remove first td } $coldisplay++; - print 'situation_counter > 1) print ' readonly'; print '>
'; - // Alias names (commercial, trademark or alias names) - print '"; - if ($object->client) { print ''; } else { print "\n".''; - print ''; + print ''; print ''; print '
'.$langs->trans('AliasNames').''; - print $object->name_alias; - print "
'; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index d9863792546..5fdfa1f2337 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1409,7 +1409,9 @@ else $picto=($object->type== Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'card', $titre, 0, $picto); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '
'; diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index adfce7d6229..d0d26292251 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -190,7 +190,9 @@ if ($id > 0 || ! empty($ref)) */ if ($user->rights->produit->lire || $user->rights->service->lire) { - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print ''; diff --git a/htdocs/product/document.php b/htdocs/product/document.php index ca207f8429f..3030058fe9e 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -195,7 +195,9 @@ if ($object->id) } - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '
'; diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 6a76055d3fc..ebc3b4eb6e5 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -297,8 +297,10 @@ if ($id > 0 || $ref) $titre=$langs->trans("CardProduct".$object->type); $picto=($object->type== Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'suppliers', $titre, 0, $picto); - - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '
'; diff --git a/htdocs/product/info.php b/htdocs/product/info.php index 3ca96a2847d..51510b518a6 100644 --- a/htdocs/product/info.php +++ b/htdocs/product/info.php @@ -85,7 +85,7 @@ if ($id > 0 || $ref) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); $object->info($object->id); diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 5b024391b20..67bb3165fb6 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -625,7 +625,9 @@ $titre = $langs->trans("CardProduct" . $object->type); $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); dol_fiche_head($head, 'price', $titre, 0, $picto); -dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); +$linkback = ''.$langs->trans("BackToList").''; + +dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '
'; diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index 49b700b46ca..7003690e3c8 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -106,7 +106,9 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all') dol_fiche_head($head, 'stats', $titre, 0, $picto); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); dol_fiche_end(); } diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index 69334976141..f9b9d14d794 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -99,7 +99,9 @@ if ($id > 0 || ! empty($ref)) $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '
'; diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 83f0912b3ee..4bdfdcc5c81 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -106,7 +106,9 @@ if ($id > 0 || ! empty($ref)) { if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '
'; diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index c2e6b25f7ab..ff91fbf299e 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -89,7 +89,9 @@ if ($id > 0 || ! empty($ref)) $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '
'; diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 57c426dc3a1..6f3f8546454 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -102,7 +102,9 @@ if ($id > 0 || ! empty($ref)) $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '
'; diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 27e5495a771..77bd4b73887 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -101,7 +101,9 @@ if ($id > 0 || ! empty($ref)) $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '
'; diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index 2fa69740e8b..d23853c174f 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -99,7 +99,9 @@ if ($id > 0 || ! empty($ref)) $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '
'; diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 05b0aecf5b6..499efd29847 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -405,7 +405,9 @@ if ($id > 0 || $ref) dol_htmloutput_events(); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '
'; @@ -746,12 +748,13 @@ if ($resql) print '
'; print '
'; print '
'; + print '
'; print img_picto($langs->trans("Tranfer"),'uparrow','class="hideonsmartphone"').' '; - print 'id.'">'.$langs->trans("StockTransfer").''; + print 'id.'">'.$langs->trans("StockTransfer").''; // Disabled, because edition of stock content must use the "Correct stock menu". // Do not use this, or data will be wrong (bad tracking of movement label, inventory code, ... //print 'id.'#'.$pdluo->id.'">'; diff --git a/htdocs/product/stock/tpl/stocktransfer.tpl.php b/htdocs/product/stock/tpl/stocktransfer.tpl.php index 1c0448192f1..a50fafca278 100644 --- a/htdocs/product/stock/tpl/stocktransfer.tpl.php +++ b/htdocs/product/stock/tpl/stocktransfer.tpl.php @@ -108,7 +108,7 @@ print ''; print ''; print ''.$langs->trans("InventoryCode").''.$langs->trans("InventoryCode").'
'; diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 96c94e9efff..d83dfd238c7 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -185,7 +185,9 @@ if ($action == 'edit') dol_fiche_head($head, 'translation', $titre, 0, $picto); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); if (! empty($object->multilangs)) { @@ -227,7 +229,9 @@ else { dol_fiche_head($head, 'translation', $titre, 0, $picto); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); $cnt_trans = 0; if (! empty($object->multilangs)) diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index 7bbba527ed8..4547c7d75da 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -88,19 +88,14 @@ if ($socid) print '
'; print ''; - // Alias names (commercial, trademark or alias names) - print '"; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print ''; + print ''; } if ($object->client) { - print '
'.$langs->trans('AliasNames').''; - print $object->name_alias; - print "
'.$langs->trans('Prefix').''.$object->prefix_comm.'
'.$langs->trans('Prefix').''.$object->prefix_comm.'
'; + print '
'; print $langs->trans('CustomerCode').''; print $object->code_client; if ($object->check_codeclient() <> 0) print ' ('.$langs->trans("WrongCustomerCode").')'; @@ -109,7 +104,7 @@ if ($socid) if ($object->fournisseur) { - print '
'; + print '
'; print $langs->trans('SupplierCode').''; print $object->code_fournisseur; if ($object->check_codefournisseur() <> 0) print ' ('.$langs->trans("WrongSupplierCode").')'; diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 661483cf2a2..d5b68057ff1 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -121,20 +121,16 @@ print '
'; print '
'; print ''; -// Alias names (commercial, trademark or alias names) -print ''; -print ''; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print ''; + print ''; } //if ($conf->agenda->enabled && $user->rights->agenda->myactions->read) $elementTypeArray['action']=$langs->transnoentitiesnoconv('Events'); if ($object->client) { - print '
'.$object->name_alias.'
'.$langs->trans('Prefix').''.$object->prefix_comm.'
'.$langs->trans('Prefix').''.$object->prefix_comm.'
'; + print '
'; print $langs->trans('CustomerCode').''; print $object->code_client; if ($object->check_codeclient() <> 0) print ' ('.$langs->trans("WrongCustomerCode").')'; @@ -155,7 +151,7 @@ if ($object->client) if ($object->fournisseur) { - print '
'; + print '
'; print $langs->trans('SupplierCode').''; print $object->code_fournisseur; if ($object->check_codefournisseur() <> 0) print ' ('.$langs->trans("WrongSupplierCode").')'; diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index fff130629be..4ad8abc9a43 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -116,20 +116,15 @@ if ($object->id) print '
'; print ''; - // Alias names (commercial, trademark or alias names) - print '"; - // Prefix if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print ''; + print ''; } if ($object->client) { - print ''; + print ''; // Total size print ''; diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index acd7f32d375..156a4620634 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -82,19 +82,14 @@ if ($id > 0) print '
'; print '
'.$langs->trans('AliasNames').''; - print $object->name_alias; - print "
'.$langs->trans('Prefix').''.$object->prefix_comm.'
'.$langs->trans('Prefix').''.$object->prefix_comm.'
'; + print '
'; print $langs->trans('CustomerCode').''; print $object->code_client; if ($object->check_codeclient() <> 0) print ' ('.$langs->trans("WrongCustomerCode").')'; @@ -138,7 +133,7 @@ if ($object->id) if ($object->fournisseur) { - print '
'; + print '
'; print $langs->trans('SupplierCode').''; print $object->code_fournisseur; if ($object->check_codefournisseur() <> 0) print ' ('.$langs->trans("WrongSupplierCode").')'; @@ -146,7 +141,7 @@ if ($object->id) } // Number of files - print '
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'; - // Alias names (commercial, trademark or alias names) - print '"; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print ''; + print ''; } if ($object->client) { - print '
'.$langs->trans('AliasNames').''; - print $object->name_alias; - print "
'.$langs->trans('Prefix').''.$object->prefix_comm.'
'.$langs->trans('Prefix').''.$object->prefix_comm.'
'; + print '
'; print $langs->trans('CustomerCode').''; print $object->code_client; if ($object->check_codeclient() <> 0) print ' ('.$langs->trans("WrongCustomerCode").')'; @@ -103,7 +98,7 @@ if ($id > 0) if ($object->fournisseur) { - print '
'; + print '
'; print $langs->trans('SupplierCode').''; print $object->code_fournisseur; if ($object->check_codefournisseur() <> 0) print ' ('.$langs->trans("WrongSupplierCode").')'; diff --git a/htdocs/societe/project.php b/htdocs/societe/project.php index 6eb9765d034..eb3963d0f7a 100644 --- a/htdocs/societe/project.php +++ b/htdocs/societe/project.php @@ -87,11 +87,6 @@ if ($socid) print '
'; print ''; - // Alias names (commercial, trademark or alias names) - print '"; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { print ''; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 02543d46993..71df6128afb 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -986,8 +986,8 @@ else print ''; // Prospect/Customer - print ''; - print ''; + print ''; - print '
'.$langs->trans('AliasNames').''; - print $object->name_alias; - print "
'.$langs->trans('Prefix').''.$object->prefix_comm.'
'.fieldLabel('ProspectCustomer','customerprospect',1).''; + print '
'.fieldLabel('ProspectCustomer','customerprospect',1).''; $selected=isset($_POST['client'])?GETPOST('client'):$object->client; print ''.fieldLabel('CustomerCode','customer_code').''; + print ''.fieldLabel('CustomerCode','customer_code').''; print ''; + print ''; print ''; // Alias names (commercial, trademark or alias names) @@ -1519,8 +1519,8 @@ else } // Prospect/Customer - print ''; - print ''; + print '
'; $tmpcode=$object->code_client; if (empty($tmpcode) && ! empty($modCodeClient->code_auto)) $tmpcode=$modCodeClient->getNextValue($object,0); @@ -1494,7 +1494,7 @@ else } // Name - print '
'.fieldLabel('ThirdPartyName','name',1).'
'.fieldLabel('ThirdPartyName','name',1).'
'.fieldLabel('ProspectCustomer','customerprospect',1).'
'.fieldLabel('ProspectCustomer','customerprospect',1).'