';
print '| '.$langs->trans('VATIsUsed').' | ';
diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang
index ee1b32084ff..ac04c689df4 100644
--- a/htdocs/langs/en_US/products.lang
+++ b/htdocs/langs/en_US/products.lang
@@ -101,6 +101,7 @@ CorrectStock=Correct stock
AddPhoto=Add photo
ListOfStockMovements=List of stock movements
BuyingPrice=Buying price
+PriceForEachProduct=Products with specific prices
SupplierCard=Supplier card
CommercialCard=Commercial card
AllWays=Path to find your product in stock
diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php
index 847c23c6719..b35715ce1ab 100644
--- a/htdocs/societe/agenda.php
+++ b/htdocs/societe/agenda.php
@@ -80,14 +80,15 @@ if ($socid)
dol_fiche_head($head, 'agenda', $langs->trans("ThirdParty"),0,'company');
- print '';
-
- print '| '.$langs->trans("ThirdPartyName").' | ';
- print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
- print ' | ';
+ dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
+
+ print '';
+
+ print ' ';
+ print ' ';
// Alias names (commercial, trademark or alias names)
- print '| '.$langs->trans('AliasNames').' | ';
+ print ' | | '.$langs->trans('AliasNames').' | ';
print $object->name_alias;
print " | ";
@@ -114,47 +115,11 @@ if ($socid)
print '';
}
- if (! empty($conf->barcode->enabled))
- {
- print '| '.$langs->trans('Gencod').' | '.$object->barcode.' | ';
- }
-
- print "| ".$langs->trans('Address')." | ";
- dol_print_address($object->address, 'gmap', 'thirdparty', $object->id);
- print " | ";
-
- // Zip / Town
- print '| '.$langs->trans('Zip').' | '.$object->zip." | ";
- print ''.$langs->trans('Town').' | '.$object->town." | ";
-
- // Country
- if ($object->country) {
- print '| '.$langs->trans('Country').' | ';
- //$img=picto_from_langcode($object->country_code);
- $img='';
- print ($img?$img.' ':'');
- print $object->country;
- print ' | ';
- }
-
- // EMail
- print '| '.$langs->trans('EMail').' | ';
- print dol_print_email($object->email,0,$object->id,'AC_EMAIL');
- print ' | ';
-
- // Web
- print '| '.$langs->trans('Web').' | ';
- print dol_print_url($object->url);
- print ' | ';
-
- // Phone / Fax
- print '| '.$langs->trans('Phone').' | '.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').' | ';
- print ''.$langs->trans('Fax').' | '.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').' | ';
-
print ' ';
print ' ';
+ dol_fiche_end();
/*
* Barre d'action
diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php
index 05679cef5bb..12a1612ab1d 100644
--- a/htdocs/societe/commerciaux.php
+++ b/htdocs/societe/commerciaux.php
@@ -33,7 +33,7 @@ $langs->load("suppliers");
$langs->load("banks");
// Security check
-$socid = isset($_GET["socid"])?$_GET["socid"]:'';
+$socid = GETPOST("socid");
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'societe','','');
@@ -50,18 +50,18 @@ if($_GET["socid"] && $_GET["commid"])
if ($user->rights->societe->creer)
{
- $soc = new Societe($db);
- $soc->id = $_GET["socid"];
- $soc->fetch($_GET["socid"]);
+ $object = new Societe($db);
+ $object->id = $_GET["socid"];
+ $object->fetch($_GET["socid"]);
$parameters=array('id'=>$_GET["commid"]);
- $reshook=$hookmanager->executeHooks('doActions',$parameters,$soc,$action); // Note that $action and $object may have been modified by some hooks
+ $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
- if (empty($reshook)) $soc->add_commercial($user, $_GET["commid"]);
+ if (empty($reshook)) $object->add_commercial($user, $_GET["commid"]);
- header("Location: commerciaux.php?socid=".$soc->id);
+ header("Location: commerciaux.php?socid=".$object->id);
exit;
}
else
@@ -71,23 +71,23 @@ if($_GET["socid"] && $_GET["commid"])
}
}
-if($_GET["socid"] && $_GET["delcommid"])
+if ($socid && $_GET["delcommid"])
{
$action = 'delete';
if ($user->rights->societe->creer)
{
- $soc = new Societe($db);
- $soc->id = $_GET["socid"];
- $soc->fetch($_GET["socid"]);
+ $object = new Societe($db);
+ $object->id = $_GET["socid"];
+ $object->fetch($_GET["socid"]);
$parameters=array('id'=>$_GET["delcommid"]);
- $reshook=$hookmanager->executeHooks('doActions',$parameters,$soc,$action); // Note that $action and $object may have been modified by some hooks
+ $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
- if (empty($reshook)) $soc->del_commercial($user, $_GET["delcommid"]);
+ if (empty($reshook)) $object->del_commercial($user, $_GET["delcommid"]);
- header("Location: commerciaux.php?socid=".$soc->id);
+ header("Location: commerciaux.php?socid=".$object->id);
exit;
}
else
@@ -107,63 +107,44 @@ llxHeader('',$langs->trans("ThirdParty"),$help_url);
$form = new Form($db);
-if ($_GET["socid"])
+if ($socid)
{
- $soc = new Societe($db);
- $soc->id = $_GET["socid"];
- $result=$soc->fetch($_GET["socid"]);
+ $object = new Societe($db);
+ $result=$object->fetch($socid);
$action='view';
- $head=societe_prepare_head2($soc);
+ $head=societe_prepare_head2($object);
dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty"),0,'company');
- /*
- * Fiche societe en mode visu
- */
+ dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
+
+ print '';
- print ' ';
-
- print '| '.$langs->trans('ThirdPartyName').' | ';
- print '';
- print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
- print ' | ';
+ print '';
+ print '';
print '';
- print '| '.$langs->trans('CustomerCode').' | global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>';
- print $soc->code_client;
- if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
+ print ' | '.$langs->trans('CustomerCode').' | global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>';
+ print $object->code_client;
+ if ($object->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
print ' | ';
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
{
- print ''.$langs->trans('Prefix').' | '.$soc->prefix_comm.' | ';
+ print ''.$langs->trans('Prefix').' | '.$object->prefix_comm.' | ';
}
print '';
print ' ';
- print "| ".$langs->trans('Address')." | ".nl2br($soc->address)." | ";
-
- print '| '.$langs->trans('Zip').' | '.$soc->zip." | ";
- print ''.$langs->trans('Town').' | '.$soc->town." | ";
-
- print '| '.$langs->trans('Country').' | '.$soc->country.' | ';
-
- print ' | '.$langs->trans('Phone').' | '.dol_print_phone($soc->phone,$soc->country_code,0,$soc->id,'AC_TEL').' | ';
- print ''.$langs->trans('Fax').' | '.dol_print_phone($soc->fax,$soc->country_code,0,$soc->id,'AC_FAX').' | ';
-
- print '| '.$langs->trans('Web').' | ';
- if ($soc->url) { print 'http://'.$soc->url.''; }
- print ' | ';
-
// Liste les commerciaux
- print '| '.$langs->trans("SalesRepresentatives").' | ';
+ print ' | '.$langs->trans("SalesRepresentatives").' | ';
print '';
$sql = "SELECT u.rowid, u.lastname, u.firstname";
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
$sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc";
- $sql .= " WHERE sc.fk_soc =".$soc->id;
+ $sql .= " WHERE sc.fk_soc =".$object->id;
$sql .= " AND sc.fk_user = u.rowid";
$sql .= " ORDER BY u.lastname ASC ";
dol_syslog('societe/commerciaux.php::list salesman sql = '.$sql,LOG_DEBUG);
@@ -177,7 +158,7 @@ if ($_GET["socid"])
{
$obj = $db->fetch_object($resql);
- $parameters=array('socid'=>$soc->id);
+ $parameters=array('socid'=>$object->id);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$obj,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) {
@@ -210,6 +191,8 @@ if ($_GET["socid"])
print ' | ';
print "\n";
+
+ dol_fiche_end();
if ($user->rights->societe->creer && $user->rights->societe->client->voir)
diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php
index e075f67cdaf..e6207782e9c 100644
--- a/htdocs/societe/consumption.php
+++ b/htdocs/societe/consumption.php
@@ -116,14 +116,15 @@ if (empty($socid))
$head = societe_prepare_head($object);
dol_fiche_head($head, 'consumption', $langs->trans("ThirdParty"),0,'company');
+dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
+
+print '';
+
+print ' ';
print ' ';
-print '| '.$langs->trans('ThirdPartyName').' | ';
-print '';
-print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
-print ' | ';
// Alias names (commercial, trademark or alias names)
-print ' | ';
+print ' | ';
print ''.$object->name_alias.' | ';
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
@@ -173,6 +174,8 @@ if ($object->fournisseur)
}
print ' ';
+print ' ';
+
dol_fiche_end();
print ' ';
diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php
index f1961e02b2d..2c951ed8670 100644
--- a/htdocs/societe/document.php
+++ b/htdocs/societe/document.php
@@ -109,17 +109,15 @@ if ($object->id)
$totalsize+=$file['size'];
}
-
- print '';
-
- // Ref
- print '| '.$langs->trans("ThirdPartyName").' | ';
- print '';
- print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
- print ' | ';
+ dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
+
+ print '';
+
+ print ' ';
+ print ' ';
// Alias names (commercial, trademark or alias names)
- print '| '.$langs->trans('AliasNames').' | ';
+ print ' | | '.$langs->trans('AliasNames').' | ';
print $object->name_alias;
print " | ";
@@ -155,6 +153,8 @@ if ($object->id)
print ' ';
+ print ' ';
+
dol_fiche_end();
$modulepart = 'societe';
diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php
index c7db3b66645..ceb5fa6eac5 100644
--- a/htdocs/societe/note.php
+++ b/htdocs/societe/note.php
@@ -75,15 +75,15 @@ if ($id > 0)
print ' |