Qual: Uniformize code and filename
This commit is contained in:
parent
0f87181c2a
commit
4295699e0c
@ -92,7 +92,7 @@ function societe_prepare_head($object)
|
||||
if ($user->societe_id == 0)
|
||||
{
|
||||
// Notes
|
||||
$head[$h][0] = DOL_URL_ROOT.'/societe/socnote.php?socid='.$object->id;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/societe/note.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Note");
|
||||
$head[$h][2] = 'note';
|
||||
$h++;
|
||||
@ -507,7 +507,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
}
|
||||
|
||||
print "\n";
|
||||
|
||||
|
||||
$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ContactsForCompany") : $langs->trans("ContactsAddressesForCompany"));
|
||||
print_fiche_titre($title,$buttoncreate,'');
|
||||
|
||||
@ -609,7 +609,7 @@ function show_addresses($conf,$langs,$db,$object,$backtopage='')
|
||||
{
|
||||
global $user;
|
||||
global $bc;
|
||||
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/societe/class/address.class.php");
|
||||
|
||||
$addressstatic = new Address($db);
|
||||
@ -652,9 +652,9 @@ function show_addresses($conf,$langs,$db,$object,$backtopage='')
|
||||
print '</td>';
|
||||
|
||||
print '<td>'.$address->name.'</td>';
|
||||
|
||||
|
||||
print '<td>'.$address->town.'</td>';
|
||||
|
||||
|
||||
$img=picto_from_langcode($address->country_code);
|
||||
print '<td>'.($img?$img.' ':'').$address->country.'</td>';
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/societe/socnote.php
|
||||
* \file htdocs/societe/note.php
|
||||
* \brief Tab for notes on third party
|
||||
* \ingroup societe
|
||||
*/
|
||||
@ -27,7 +27,7 @@
|
||||
require("../main.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/company.lib.php");
|
||||
|
||||
$action = isset($_GET["action"])?$_GET["action"]:$_POST["action"];
|
||||
$action = GETPOST('action');
|
||||
|
||||
$langs->load("companies");
|
||||
|
||||
@ -37,6 +37,7 @@ if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'societe', $socid, '&societe');
|
||||
|
||||
$object = new Societe($db);
|
||||
if ($socid > 0) $object->fetch($socid);
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -44,9 +45,11 @@ $object = new Societe($db);
|
||||
|
||||
if ($action == 'add' && ! GETPOST('cancel'))
|
||||
{
|
||||
// TODO move to DAO class
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET note='".$db->escape($_POST["note"])."' WHERE rowid=".$socid;
|
||||
$result = $db->query($sql);
|
||||
$result=$object->update_note($_POST["note"]);
|
||||
if ($result < 0)
|
||||
{
|
||||
$errors[]=$object->errors;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -63,8 +66,6 @@ llxHeader('',$langs->trans("ThirdParty").' - '.$langs->trans("Notes"),$help_url)
|
||||
|
||||
if ($socid > 0)
|
||||
{
|
||||
$object->fetch($socid);
|
||||
|
||||
/*
|
||||
* Affichage onglets
|
||||
*/
|
||||
@ -72,6 +73,7 @@ if ($socid > 0)
|
||||
|
||||
$head = societe_prepare_head($object);
|
||||
|
||||
|
||||
dol_fiche_head($head, 'note', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
|
||||
@ -138,9 +140,11 @@ if ($socid > 0)
|
||||
}
|
||||
|
||||
print '</form>';
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
dol_htmloutput_errors('',$errors);
|
||||
|
||||
|
||||
/*
|
||||
Loading…
Reference in New Issue
Block a user