diff --git a/ChangeLog b/ChangeLog
index 85928619cc5..4b97d3a6b89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,7 +9,9 @@ WARNING:
Following changes may create regression for some external modules, but were necessary to make Dolibarr better:
* The hook getNodeList has been replaced by a normalized 'addreplace' hook getDirList.
* The trigger USER_SETINGROUP and USER_REMOVEFROMGROUP has been replaced with trigger USER_MODIFY.
-
+* The page societe/soc.php was renamed into societe/card.php to match page naming conventions.
+* The page compta/facture.php was renamed into compta/facture/card.php to match page naming conventions.
+
***** ChangeLog for 5.0.0 compared to 4.0.* *****
For users:
diff --git a/htdocs/cashdesk/tpl/validation2.tpl.php b/htdocs/cashdesk/tpl/validation2.tpl.php
index 8f24e2069aa..a6e2fe2a3f3 100644
--- a/htdocs/cashdesk/tpl/validation2.tpl.php
+++ b/htdocs/cashdesk/tpl/validation2.tpl.php
@@ -41,7 +41,7 @@ $langs->load("bills");
-
trans("ShowInvoice"); ?>
+trans("ShowInvoice"); ?>
trans("PrintTicket"); ?>
diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index b7cd28c446a..aa6c2729745 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -1094,7 +1094,7 @@ if ($id > 0)
else print '';
}
- if ($object->client != 0) print '';
+ if ($object->client != 0) print '';
else print '';
}
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 99e4a6c0871..d5a492bf7d6 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -2383,7 +2383,7 @@ if ($action == 'create')
{
if (! empty($conf->facture->enabled) && $user->rights->facture->creer)
{
- print '';
+ print '';
}
$arrayofinvoiceforpropal = $object->getInvoiceArrayList();
diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php
index 9e781139723..8c35c6c9e1f 100644
--- a/htdocs/comm/remx.php
+++ b/htdocs/comm/remx.php
@@ -564,7 +564,7 @@ if ($socid > 0)
print $obj->description;
print '';
}
- print ''.img_object($langs->trans("ShowBill"),'bill').' '.$obj->facnumber.' | ';
+ print ''.img_object($langs->trans("ShowBill"),'bill').' '.$obj->facnumber.' | ';
print ''.price($obj->amount_ht).' | ';
print ''.price2num($obj->tva_tx,'MU').'% | ';
print ''.price($obj->amount_ttc).' | ';
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 5d68619d2f9..7db6c28e89d 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -2009,7 +2009,7 @@ if ($action == 'create' && $user->rights->commande->creer)
$addrelativediscount = 'id . '">' . $langs->trans("EditRelativeDiscounts") . '';
$addabsolutediscount = 'id . '">' . $langs->trans("EditGlobalDiscounts") . '';
- $addcreditnote = 'id . '">' . $langs->trans("AddCreditNote") . '';
+ $addcreditnote = 'id . '">' . $langs->trans("AddCreditNote") . '';
print '| ' . $langs->trans('Discounts') . ' | ';
if ($soc->remise_percent)
@@ -2541,7 +2541,7 @@ if ($action == 'create' && $user->rights->commande->creer)
// Note: Even if module invoice is not enabled, we should be able to use button "Classified billed"
if ($object->statut > Commande::STATUS_DRAFT && ! $object->billed) {
if (! empty($conf->facture->enabled) && $user->rights->facture->creer && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) {
- print '';
+ print '';
}
if ($user->rights->commande->creer && $object->statut >= Commande::STATUS_VALIDATED && empty($conf->global->WORKFLOW_DISABLE_CLASSIFY_BILLED_FROM_ORDER) && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) {
print '';
diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php
index 009326f1f41..17c73c82698 100644
--- a/htdocs/commande/orderstoinvoice.php
+++ b/htdocs/commande/orderstoinvoice.php
@@ -350,7 +350,7 @@ if (($action == 'create' || $action == 'add') && !$error)
if ($id > 0 && ! $error)
{
$db->commit();
- header('Location: '.DOL_URL_ROOT.'/compta/facture.php?facid='.$id);
+ header('Location: '.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$id);
exit;
}
else
diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php
index 609a3f47bd1..8c1f2af7b1f 100644
--- a/htdocs/compta/bank/ligne.php
+++ b/htdocs/compta/bank/ligne.php
@@ -311,13 +311,9 @@ if ($result)
print '';
}
else if ($links[$key]['type']=='company') {
- print '';
- //print img_object($langs->trans('ShowCompany'),'company').' ';
$societe=new Societe($db);
$societe->fetch($links[$key]['url_id']);
- //print $links[$key]['label'];
print $societe->getNomUrl(1);
- print '';
}
else if ($links[$key]['type']=='sc') {
print '';
diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php
index 258b2434f60..b22571ad93f 100644
--- a/htdocs/compta/facture/apercu.php
+++ b/htdocs/compta/facture/apercu.php
@@ -151,7 +151,7 @@ if ($id > 0 || ! empty($ref))
// Relative and absolute discounts
$addabsolutediscount=' id.'">'.$langs->trans("AddGlobalDiscount").'';
- $addcreditnote=' id.'">'.$langs->trans("AddCreditNote").'';
+ $addcreditnote=' id.'">'.$langs->trans("AddCreditNote").'';
print ' |
| '.$langs->trans('Discounts').' | ';
print '';
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture/card.php
similarity index 99%
rename from htdocs/compta/facture.php
rename to htdocs/compta/facture/card.php
index fad36115a26..4cbad38902f 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture/card.php
@@ -30,12 +30,12 @@
*/
/**
- * \file htdocs/compta/facture.php
+ * \file htdocs/compta/facture/card.php
* \ingroup facture
* \brief Page to create/see an invoice
*/
-require '../main.inc.php';
+require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture-rec.class.php';
require_once DOL_DOCUMENT_ROOT . '/compta/paiement/class/paiement.class.php';
@@ -2828,7 +2828,7 @@ else if ($id > 0 || ! empty($ref))
$head = facture_prepare_head($object);
- dol_fiche_head($head, 'compta', $langs->trans('InvoiceCustomer'), 0, 'bill');
+ dol_fiche_head($head, 'compta', $langs->trans('InvoiceCustomer'), -1, 'bill');
$formconfirm = '';
@@ -3159,7 +3159,7 @@ else if ($id > 0 || ! empty($ref))
// Relative and absolute discounts
$addrelativediscount = 'id . '">' . $langs->trans("EditRelativeDiscounts") . '';
$addabsolutediscount = 'id . '">' . $langs->trans("EditGlobalDiscounts") . '';
- $addcreditnote = 'id . '">' . $langs->trans("AddCreditNote") . '';
+ $addcreditnote = 'id . '">' . $langs->trans("AddCreditNote") . '';
print ' |
| ' . $langs->trans('Discounts');
print ' | ';
@@ -3466,7 +3466,7 @@ else if ($id > 0 || ! empty($ref))
print '| ';
print $langs->trans('IncotermLabel');
print ' | | ';
- if ($user->rights->facture->creer) print ''.img_edit().'';
+ if ($user->rights->facture->creer) print ''.img_edit().'';
else print ' ';
print ' | ';
print ' | ';
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 305b8a7e1c0..721713fc279 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -1048,7 +1048,7 @@ class Facture extends CommonInvoice
$result='';
if ($option == 'withdraw') $url = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$this->id;
- else $url = DOL_URL_ROOT.'/compta/facture.php?facid='.$this->id;
+ else $url = DOL_URL_ROOT.'/compta/facture/card.php?facid='.$this->id;
if ($short) return $url;
diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php
index d6424309f87..45c6102ce1c 100644
--- a/htdocs/compta/facture/document.php
+++ b/htdocs/compta/facture/document.php
@@ -97,7 +97,7 @@ if ($id > 0 || ! empty($ref))
$upload_dir = $conf->facture->dir_output.'/'.dol_sanitizeFileName($object->ref);
$head = facture_prepare_head($object);
- dol_fiche_head($head, 'documents', $langs->trans('InvoiceCustomer'), 0, 'bill');
+ dol_fiche_head($head, 'documents', $langs->trans('InvoiceCustomer'), -1, 'bill');
$totalpaye = $object->getSommePaiement();
diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php
index c858a2cda1f..9d4329a671b 100644
--- a/htdocs/compta/facture/fiche-rec.php
+++ b/htdocs/compta/facture/fiche-rec.php
@@ -1495,7 +1495,7 @@ else
{
if (empty($object->frequency) || $object->date_when <= $today)
{
- print '';
+ print '';
}
else
{
@@ -1786,7 +1786,7 @@ else
{
if (empty($objp->frequency) || $db->jdate($objp->date_when) <= $today)
{
- print '';
+ print '';
print $langs->trans("CreateBill").'';
}
else
diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php
index d52e7648418..56f89a83154 100644
--- a/htdocs/compta/facture/info.php
+++ b/htdocs/compta/facture/info.php
@@ -50,7 +50,7 @@ $object->fetch_thirdparty();
$object->info($object->id);
$head = facture_prepare_head($object);
-dol_fiche_head($head, 'info', $langs->trans("InvoiceCustomer"), 0, 'bill');
+dol_fiche_head($head, 'info', $langs->trans("InvoiceCustomer"), -1, 'bill');
$totalpaye = $object->getSommePaiement();
diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php
index 9b939cf7c32..223480e4ba8 100644
--- a/htdocs/compta/facture/note.php
+++ b/htdocs/compta/facture/note.php
@@ -77,7 +77,7 @@ if ($id > 0 || ! empty($ref))
$totalpaye = $object->getSommePaiement();
- dol_fiche_head($head, 'note', $langs->trans("InvoiceCustomer"), 0, 'bill');
+ dol_fiche_head($head, 'note', $langs->trans("InvoiceCustomer"), -1, 'bill');
// Invoice content
diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php
index e81d0e38345..6a3e0e1a433 100644
--- a/htdocs/compta/paiement.php
+++ b/htdocs/compta/paiement.php
@@ -292,7 +292,7 @@ if (empty($reshook))
else $invoiceid=$facid;
}
}
- if ($invoiceid > 0) $loc = DOL_URL_ROOT.'/compta/facture.php?facid='.$invoiceid;
+ if ($invoiceid > 0) $loc = DOL_URL_ROOT.'/compta/facture/card.php?facid='.$invoiceid;
else $loc = DOL_URL_ROOT.'/compta/paiement/card.php?id='.$paiement_id;
header('Location: '.$loc);
exit;
@@ -861,7 +861,7 @@ if (! GETPOST('action'))
$objp = $db->fetch_object($resql);
$var=!$var;
print '
';
- print '| '.$objp->facnumber." | \n";
+ print ''.$objp->facnumber." | \n";
print ''.dol_print_date($db->jdate($objp->dp))." | \n";
print ''.$objp->paiement_type.' '.$objp->num_paiement." | \n";
print ''.price($objp->amount).' | | ';
diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php
index d43ba27ef26..64ddb12a7bc 100644
--- a/htdocs/compta/prelevement/ligne.php
+++ b/htdocs/compta/prelevement/ligne.php
@@ -309,11 +309,11 @@ if ($id)
print "
| ";
- print '';
+ print '';
print img_object($langs->trans("ShowBill"),"bill");
print ' ';
- print ''.$obj->ref." | \n";
+ print ''.$obj->ref."\n";
print '';
print img_object($langs->trans("ShowCompany"),"company"). ' '.$obj->name." | \n";
diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php
index 7a7eeb7610a..d5ae2514034 100644
--- a/htdocs/compta/prelevement/list.php
+++ b/htdocs/compta/prelevement/list.php
@@ -183,9 +183,9 @@ if ($result)
print ''.$obj->ref."\n";
- print '';
+ print ' | ';
print img_object($langs->trans("ShowBill"),"bill");
- print ' '.$obj->facnumber." | \n";
+ print ' '.$obj->facnumber."\n";
print '';
print ''.$obj->name." | \n";
diff --git a/htdocs/compta/tva/quadri.php b/htdocs/compta/tva/quadri.php
index 73cc0bc96ba..57ce32b72fe 100644
--- a/htdocs/compta/tva/quadri.php
+++ b/htdocs/compta/tva/quadri.php
@@ -237,7 +237,7 @@ if ($conf->global->ACCOUNTING_MODE == "CREANCES-DETTES")
$x_both[$my_coll_rate]['paye']['vat'] = 0;
$x_both[$my_coll_rate]['coll']['links'] = '';
foreach($x_coll[$my_coll_rate]['facid'] as $id=>$dummy){
- $x_both[$my_coll_rate]['coll']['links'] .= '..'.substr($x_coll[$my_coll_rate]['facnum'][$id],-2).' ';
+ $x_both[$my_coll_rate]['coll']['links'] .= '..'.substr($x_coll[$my_coll_rate]['facnum'][$id],-2).' ';
}
}
foreach(array_keys($x_paye) as $my_paye_rate){
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index f95a60ab130..400548b7076 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -2037,7 +2037,7 @@ else
if (! empty($conf->facture->enabled) && $object->statut > 0 && $object->nbofservicesclosed < $nbofservices)
{
$langs->load("bills");
- if ($user->rights->facture->creer) print '';
+ if ($user->rights->facture->creer) print '';
else print '';
}
diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php
index 387c662baad..41c5d67688c 100644
--- a/htdocs/core/class/discount.class.php
+++ b/htdocs/core/class/discount.class.php
@@ -483,7 +483,7 @@ class DiscountAbsolute
if ($option == 'invoice') {
$label=$langs->trans("ShowDiscount").': '.$this->ref_facture_source;
- $link = '';
+ $link = '';
$linkend='';
$ref=$this->ref_facture_source;
$picto='bill';
diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php
index 17e3b00b602..fd3b1e7187d 100644
--- a/htdocs/core/class/notify.class.php
+++ b/htdocs/core/class/notify.class.php
@@ -368,13 +368,13 @@ class Notify
switch ($notifcode) {
case 'BILL_VALIDATE':
- $link='/compta/facture.php?facid='.$object->id;
+ $link='/compta/facture/card.php?facid='.$object->id;
$dir_output = $conf->facture->dir_output;
$object_type = 'facture';
$mesg = $langs->transnoentitiesnoconv("EMailTextInvoiceValidated",$newref);
break;
case 'BILL_PAYED':
- $link='/compta/facture.php?facid='.$object->id;
+ $link='/compta/facture/card.php?facid='.$object->id;
$dir_output = $conf->facture->dir_output;
$object_type = 'facture';
$mesg = $langs->transnoentitiesnoconv("EMailTextInvoicePayed",$newref);
@@ -544,13 +544,13 @@ class Notify
switch ($notifcode) {
case 'BILL_VALIDATE':
- $link='/compta/facture.php?facid='.$object->id;
+ $link='/compta/facture/card.php?facid='.$object->id;
$dir_output = $conf->facture->dir_output;
$object_type = 'facture';
$mesg = $langs->transnoentitiesnoconv("EMailTextInvoiceValidated",$newref);
break;
case 'BILL_PAYED':
- $link='/compta/facture.php?facid='.$object->id;
+ $link='/compta/facture/card.php?facid='.$object->id;
$dir_output = $conf->facture->dir_output;
$object_type = 'facture';
$mesg = $langs->transnoentitiesnoconv("EMailTextInvoicePayed",$newref);
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index caa469daa65..bfb893d92ee 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -43,7 +43,7 @@ function societe_prepare_head(Societe $object)
$h = 0;
$head = array();
- $head[$h][0] = DOL_URL_ROOT.'/societe/soc.php?socid='.$object->id;
+ $head[$h][0] = DOL_URL_ROOT.'/societe/card.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Card");
$head[$h][2] = 'card';
$h++;
@@ -259,7 +259,7 @@ function societe_prepare_head2($object)
$h = 0;
$head = array();
- $head[$h][0] = DOL_URL_ROOT.'/societe/soc.php?socid='.$object->id;
+ $head[$h][0] = DOL_URL_ROOT.'/societe/card.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Card");
$head[$h][2] = 'company';
$h++;
@@ -1470,7 +1470,7 @@ function show_subsidiaries($conf,$langs,$db,$object)
print ''.$obj->code_client.' | ';
print '';
- print '';
+ print '';
print img_edit();
print ' | ';
diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php
index f48a248ab14..fa8151563b1 100644
--- a/htdocs/core/lib/invoice.lib.php
+++ b/htdocs/core/lib/invoice.lib.php
@@ -38,7 +38,7 @@ function facture_prepare_head($object)
$h = 0;
$head = array();
- $head[$h][0] = DOL_URL_ROOT.'/compta/facture.php?facid='.$object->id;
+ $head[$h][0] = DOL_URL_ROOT.'/compta/facture/card.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Card');
$head[$h][2] = 'compta';
$h++;
diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql
index 8ac601b4e27..54cddfcaa96 100644
--- a/htdocs/core/menus/init_menu_auguria.sql
+++ b/htdocs/core/menus/init_menu_auguria.sql
@@ -68,14 +68,14 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 404__+MAX_llx_menu__, 'home', '', 403__+MAX_llx_menu__, '/user/group/card.php?leftmenu=users&action=create', 'NewGroup', 2, 'users', '($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin', '', 2, 0, __ENTITY__);
-- Third parties
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 500__+MAX_llx_menu__, 'companies', 'thirdparties', 2__+MAX_llx_menu__, '/societe/index.php?leftmenu=thirdparties', 'ThirdParty', 0, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 501__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/soc.php?action=create', 'MenuNewThirdParty', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 501__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/card.php?action=create', 'MenuNewThirdParty', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 502__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?action=create', 'List', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 503__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?type=f&leftmenu=suppliers', 'ListSuppliersShort', 1, 'suppliers', '$user->rights->societe->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 504__+MAX_llx_menu__, 'companies', '', 503__+MAX_llx_menu__, '/societe/soc.php?leftmenu=supplier&action=create&type=f', 'NewSupplier', 2, 'suppliers', '$user->rights->societe->creer', '', 2, 0, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 504__+MAX_llx_menu__, 'companies', '', 503__+MAX_llx_menu__, '/societe/card.php?leftmenu=supplier&action=create&type=f', 'NewSupplier', 2, 'suppliers', '$user->rights->societe->creer', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 506__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?type=p&leftmenu=prospects', 'ListProspectsShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 3, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 507__+MAX_llx_menu__, 'companies', '', 506__+MAX_llx_menu__, '/societe/soc.php?leftmenu=prospects&action=create&type=p', 'MenuNewProspect', 2, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 507__+MAX_llx_menu__, 'companies', '', 506__+MAX_llx_menu__, '/societe/card.php?leftmenu=prospects&action=create&type=p', 'MenuNewProspect', 2, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 509__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?type=c&leftmenu=customers', 'ListCustomersShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 4, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 510__+MAX_llx_menu__, 'companies', '', 509__+MAX_llx_menu__, '/societe/soc.php?leftmenu=customers&action=create&type=c', 'MenuNewCustomer', 2, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 510__+MAX_llx_menu__, 'companies', '', 509__+MAX_llx_menu__, '/societe/card.php?leftmenu=customers&action=create&type=c', 'MenuNewCustomer', 2, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__);
-- Third parties - Contacts
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 600__+MAX_llx_menu__, 'companies', 'contacts', 2__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts', 'ContactsAddresses', 0, 'companies', '$user->rights->societe->lire', '', 2, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 601__+MAX_llx_menu__, 'companies', '', 600__+MAX_llx_menu__, '/contact/card.php?leftmenu=contacts&action=create', 'NewContactAddress', 1, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__);
@@ -171,7 +171,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1604__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier', 'Statistics', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 8, __ENTITY__);
-- Accountancy - Customer invoice
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1700__+MAX_llx_menu__, 'accountancy', 'customer_bills', 6__+MAX_llx_menu__, '/compta/facture/list.php?leftmenu=customers_bills', 'BillsCustomers', 0, 'bills', '$user->rights->facture->lire', '', 2, 3, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1701__+MAX_llx_menu__, 'accountancy', '', 1700__+MAX_llx_menu__, '/compta/facture.php?action=create&leftmenu=customers_bills', 'NewBill', 1, 'bills', '$user->rights->facture->creer', '', 2, 3, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1701__+MAX_llx_menu__, 'accountancy', '', 1700__+MAX_llx_menu__, '/compta/facture/card.php?action=create&leftmenu=customers_bills', 'NewBill', 1, 'bills', '$user->rights->facture->creer', '', 2, 3, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1705__+MAX_llx_menu__, 'accountancy', '', 1700__+MAX_llx_menu__, '/compta/facture/list.php?leftmenu=customers_bills', 'List', 1, 'bills', '$user->rights->facture->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1702__+MAX_llx_menu__, 'accountancy', '', 1700__+MAX_llx_menu__, '/compta/facture/fiche-rec.php?leftmenu=customers_bills', 'ListOfTemplates', 1, 'bills', '$user->rights->facture->lire', '', 2, 5, __ENTITY__);
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index c7ac721a3d4..178f1ca9db7 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -611,8 +611,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
if ($user->rights->societe->creer)
{
- $newmenu->add("/societe/soc.php?action=create", $langs->trans("MenuNewThirdParty"),1);
- if (! $conf->use_javascript_ajax) $newmenu->add("/societe/soc.php?action=create&private=1",$langs->trans("MenuNewPrivateIndividual"),1);
+ $newmenu->add("/societe/card.php?action=create", $langs->trans("MenuNewThirdParty"),1);
+ if (! $conf->use_javascript_ajax) $newmenu->add("/societe/card.php?action=create&private=1",$langs->trans("MenuNewPrivateIndividual"),1);
}
}
@@ -630,7 +630,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=2", $langs->trans("LastProspectContactInProcess"), 2, $user->rights->societe->lire);
if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=3", $langs->trans("LastProspectContactDone"), 2, $user->rights->societe->lire);
*/
- $newmenu->add("/societe/soc.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 2, $user->rights->societe->creer);
+ $newmenu->add("/societe/card.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 2, $user->rights->societe->creer);
//$newmenu->add("/contact/list.php?leftmenu=customers&type=p", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire);
}
@@ -640,7 +640,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$langs->load("commercial");
$newmenu->add("/societe/list.php?type=c&leftmenu=customers", $langs->trans("ListCustomersShort"), 1, $user->rights->societe->lire, '', $mainmenu, 'customers');
- $newmenu->add("/societe/soc.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 2, $user->rights->societe->creer);
+ $newmenu->add("/societe/card.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 2, $user->rights->societe->creer);
//$newmenu->add("/contact/list.php?leftmenu=customers&type=c", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire);
}
@@ -649,7 +649,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
{
$langs->load("suppliers");
$newmenu->add("/societe/list.php?type=f&leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 1, $user->rights->fournisseur->lire, '', $mainmenu, 'suppliers');
- $newmenu->add("/societe/soc.php?leftmenu=suppliers&action=create&type=f",$langs->trans("MenuNewSupplier"), 2, $user->rights->societe->creer && $user->rights->fournisseur->lire);
+ $newmenu->add("/societe/card.php?leftmenu=suppliers&action=create&type=f",$langs->trans("MenuNewSupplier"), 2, $user->rights->societe->creer && $user->rights->fournisseur->lire);
}
// Contacts
@@ -790,7 +790,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
{
$langs->load("bills");
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire);
- $newmenu->add("/compta/facture.php?action=create",$langs->trans("NewBill"),1,$user->rights->facture->creer);
+ $newmenu->add("/compta/facture/card.php?action=create",$langs->trans("NewBill"),1,$user->rights->facture->creer);
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("List"),1,$user->rights->facture->lire);
if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills/', $leftmenu))
diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php
index 55cce13fbcf..148c21aa31d 100644
--- a/htdocs/core/modules/mailings/thirdparties.modules.php
+++ b/htdocs/core/modules/mailings/thirdparties.modules.php
@@ -241,7 +241,7 @@ class mailing_thirdparties extends MailingTargets
*/
function url($id)
{
- return ''.img_object('',"company").'';
+ return ''.img_object('',"company").'';
}
}
diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php
index de92354a964..21a37301e38 100644
--- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php
+++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php
@@ -234,7 +234,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
*/
function url($id)
{
- return ''.img_object('',"company").'';
+ return ''.img_object('',"company").'';
}
}
diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index fd7c3e2633c..e179142b19a 100644
--- a/htdocs/expedition/card.php
+++ b/htdocs/expedition/card.php
@@ -2019,7 +2019,7 @@ else if ($id || $ref)
{
if ($user->rights->facture->creer)
{
- print ''.$langs->trans("CreateBill").'';
+ print ''.$langs->trans("CreateBill").'';
}
}
diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php
index 5e1b536cf40..31f72e18075 100644
--- a/htdocs/fichinter/card.php
+++ b/htdocs/fichinter/card.php
@@ -1635,7 +1635,7 @@ else if ($id > 0 || ! empty($ref))
$langs->load("bills");
if ($object->statut < 2)
{
- if ($user->rights->facture->creer) print '';
+ if ($user->rights->facture->creer) print '';
else print '';
}
diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php
index 1048e41c18c..d93750ad4ee 100644
--- a/htdocs/fourn/facture/paiement.php
+++ b/htdocs/fourn/facture/paiement.php
@@ -756,7 +756,7 @@ if (empty($action))
// Thirdparty
print '';
- if ($objp->socid) print ''.img_object($langs->trans('ShowCompany'),'company').' '.dol_trunc($objp->name,32).'';
+ if ($objp->socid) print ''.img_object($langs->trans('ShowCompany'),'company').' '.dol_trunc($objp->name,32).'';
else print ' ';
print ' | ';
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 4df8b45041f..ac260fc99fb 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -804,7 +804,7 @@ if (empty($reshook))
);
if ($result > 0) {
- header("Location: " . DOL_URL_ROOT . "/compta/facture.php?facid=" . $facture->id);
+ header("Location: " . DOL_URL_ROOT . "/compta/facture/card.php?facid=" . $facture->id);
exit;
}
}
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index 69a9344832b..ab74bc29485 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -394,7 +394,7 @@ if ($id > 0 || $ref)
{
if (empty($form->result))
{
- print ' - id.'&action='.$action).'">'.$langs->trans("CreateDolibarrThirdPartySupplier").'';
+ print ' - id.'&action='.$action).'">'.$langs->trans("CreateDolibarrThirdPartySupplier").'';
}
}
}
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 1b0ccb36ed0..9407fc716c1 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -528,7 +528,7 @@ if ($action == 'create' && $user->rights->projet->creer)
print $form->textwithtooltip($text.' '.img_help(),$texthelp,1);
}
else print $text;
- print ' '.$langs->trans("AddThirdParty").'';
+ print ' '.$langs->trans("AddThirdParty").'';
print '
';
}
@@ -1088,7 +1088,7 @@ elseif ($object->id > 0)
if (! empty($conf->facture->enabled) && $user->rights->facture->creer)
{
$langs->load("bills");
- print '';
+ print '';
}
if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->creer)
{
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index 89bab45896f..e10196b8784 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -263,7 +263,7 @@ $listofreferent=array(
'margin'=>'add',
'table'=>'facture',
'datefieldname'=>'datef',
- 'urlnew'=>DOL_URL_ROOT.'/compta/facture.php?action=create&projectid='.$id.'&socid='.$socid,
+ 'urlnew'=>DOL_URL_ROOT.'/compta/facture/card.php?action=create&projectid='.$id.'&socid='.$socid,
'lang'=>'bills',
'buttonnew'=>'CreateBill',
'testnew'=>$user->rights->facture->creer,
@@ -274,7 +274,7 @@ $listofreferent=array(
'class'=>'FactureRec',
'table'=>'facture_rec',
'datefieldname'=>'datec',
- 'urlnew'=>DOL_URL_ROOT.'/compta/facture.php?action=create&projectid='.$id.'&socid='.$socid,
+ 'urlnew'=>DOL_URL_ROOT.'/compta/facture/card.php?action=create&projectid='.$id.'&socid='.$socid,
'lang'=>'bills',
'buttonnew'=>'CreateBill',
'testnew'=>$user->rights->facture->creer,
diff --git a/htdocs/societe/soc.php b/htdocs/societe/card.php
similarity index 99%
rename from htdocs/societe/soc.php
rename to htdocs/societe/card.php
index 80aeb14a684..c9fb0de6edf 100644
--- a/htdocs/societe/soc.php
+++ b/htdocs/societe/card.php
@@ -26,7 +26,7 @@
*/
/**
- * \file htdocs/societe/soc.php
+ * \file htdocs/societe/card.php
* \ingroup societe
* \brief Third party card page
*/
@@ -2281,7 +2281,7 @@ else
print '| ';
print $langs->trans('IncotermLabel');
print ' | | ';
- if ($user->rights->societe->creer) print ''.img_edit('',1).'';
+ if ($user->rights->societe->creer) print ''.img_edit('',1).'';
else print ' ';
print ' |
';
print '';
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 5aac6fdec85..ed3fdad13c4 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -1891,7 +1891,7 @@ class Societe extends CommonObject
if (empty($linkstart))
{
$label.= '' . $langs->trans("ShowCompany") . '';
- $linkstart = 'id;
}
if (! empty($this->name))
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index cc5ab706fb0..649965f972c 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -461,7 +461,7 @@ if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) &&
{
$obj = $db->fetch_object($resql);
$id = $obj->rowid;
- header("Location: ".DOL_URL_ROOT.'/societe/soc.php?socid='.$id);
+ header("Location: ".DOL_URL_ROOT.'/societe/card.php?socid='.$id);
exit;
}