The new banner tab is available on all tabs of thirdparty.

This commit is contained in:
Laurent Destailleur 2015-10-13 13:06:32 +02:00
parent 918d9b7c18
commit a84ec64ece
18 changed files with 249 additions and 459 deletions

View File

@ -218,17 +218,15 @@ if ($id > 0)
dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"),0,'company'); dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"),0,'company');
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
print '<div class="fichecenter"><div class="fichehalfleft">'; print '<div class="fichecenter"><div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr><td width="30%">'.$langs->trans("ThirdPartyName").'</td><td width="70%" colspan="3">';
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','','');
print '</td></tr>';
// Alias name (commercial, trademark or alias name) // Alias name (commercial, trademark or alias name)
print '<tr><td>'.$langs->trans('AliasNameShort').'</td><td colspan="3">'; print '<tr><td class="titelfield">'.$langs->trans('AliasNameShort').'</td><td colspan="3">';
print $object->name_alias; print $object->name_alias;
print "</td></tr>"; print "</td></tr>";
@ -264,39 +262,6 @@ if ($id > 0)
print '</tr>'; print '</tr>';
} }
// Address
print '<tr><td>'.$langs->trans('Address').'</td><td colspan="3">';
dol_print_address($object->address,'gmap','thirdparty',$object->id);
print "</td></tr>";
// Zip / Town
print '<tr><td class="nowrap">'.$langs->trans('Zip').' / '.$langs->trans('Town').'</td>';
print '<td colspan="3">'.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town."</td>";
print '</tr>';
// Country
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
if (! empty($object->country_code))
{
//$img=picto_from_langcode($object->country_code);
$img='';
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
else print ($img?$img.' ':'').$object->country;
}
print '</td></tr>';
// EMail
print '<td>'.$langs->trans('EMail').'</td><td colspan="3">'.dol_print_email($object->email,0,$object->id,'AC_EMAIL').'</td></tr>';
// Web
print '<tr><td>'.$langs->trans("Web").'</td><td colspan="3">'.dol_print_url($object->url,'_blank').'</td></tr>';
// Phone
print '<tr><td>'.$langs->trans('Phone').'</td><td style="min-width: 25%;">'.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').'</td>';
// Fax
print '<td>'.$langs->trans('Fax').'</td><td style="min-width: 25%;">'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
// Skype // Skype
if (! empty($conf->skype->enabled)) if (! empty($conf->skype->enabled))
{ {

View File

@ -52,9 +52,9 @@ if (GETPOST('cancel') && ! empty($backtopage))
if (GETPOST("action") == 'setremise') if (GETPOST("action") == 'setremise')
{ {
$soc = New Societe($db); $object = new Societe($db);
$soc->fetch($_GET["id"]); $object->fetch($_GET["id"]);
$result=$soc->set_remise_client($_POST["remise"],$_POST["note"],$user); $result=$object->set_remise_client($_POST["remise"],$_POST["note"],$user);
if ($result > 0) if ($result > 0)
{ {
@ -71,7 +71,7 @@ if (GETPOST("action") == 'setremise')
} }
else else
{ {
setEventMessage($soc->error, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
} }
} }
@ -93,51 +93,50 @@ llxHeader();
if ($socid > 0) if ($socid > 0)
{ {
// On recupere les donnees societes par l'objet // On recupere les donnees societes par l'objet
$objsoc = new Societe($db); $object = new Societe($db);
$objsoc->id=$socid; $object->fetch($socid);
$objsoc->fetch($socid);
$head = societe_prepare_head($objsoc); $head = societe_prepare_head($object);
print '<form method="POST" action="remise.php?id='.$objsoc->id.'">'; print '<form method="POST" action="remise.php?id='.$object->id.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setremise">'; print '<input type="hidden" name="action" value="setremise">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
dol_fiche_head($head, 'relativediscount', $langs->trans("ThirdParty"),0,'company'); dol_fiche_head($head, 'relativediscount', $langs->trans("ThirdParty"),0,'company');
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
print '<table class="border" width="100%">'; print '<div class="fichecenter">';
// Name print '<div class="underbanner clearboth"></div>';
print '<tr><td colspan="2" width="25%">'.$langs->trans('Name').'</td>'; print '<table class="border centpercent">';
print '<td colspan="2">';
print $form->showrefnav($objsoc,'id','',1,'rowid','nom');
print '</td></tr>';
// Remise // Remise
print '<tr><td colspan="2" width="25%">'; print '<tr><td class="titlefield">';
print $langs->trans("CustomerRelativeDiscount").'</td><td colspan="2">'.price2num($objsoc->remise_percent)."%</td></tr>"; print $langs->trans("CustomerRelativeDiscount").'</td><td>'.price2num($object->remise_percent)."%</td></tr>";
print '</table>'; print '</table>';
print '<br>'; print '<br>';
print load_fiche_titre($langs->trans("NewRelativeDiscount"),'',''); print load_fiche_titre($langs->trans("NewRelativeDiscount"),'','');
print '<table class="border" width="100%">'; print '<table class="border centpercent">';
// Nouvelle valeur // Nouvelle valeur
print '<tr><td colspan="2">'; print '<tr><td class="titlefield">';
print $langs->trans("NewValue").'</td><td colspan="2"><input type="text" size="5" name="remise" value="'.($_POST["remise"]?$_POST["remise"]:'').'">%</td></tr>'; print $langs->trans("NewValue").'</td><td><input type="text" size="5" name="remise" value="'.($_POST["remise"]?$_POST["remise"]:'').'">%</td></tr>';
// Motif/Note // Motif/Note
print '<tr><td colspan="2" width="25%">'; print '<tr><td>';
print $langs->trans("NoteReason").'</td><td colspan="2"><input type="text" size="60" name="note" value="'.$_POST["note"].'"></td></tr>'; print $langs->trans("NoteReason").'</td><td><input type="text" size="60" name="note" value="'.$_POST["note"].'"></td></tr>';
print "</table>"; print "</table>";
print '</div>';
dol_fiche_end(); dol_fiche_end();
print '<div class="center">'; print '<div class="center">';
@ -160,7 +159,7 @@ if ($socid > 0)
$sql = "SELECT rc.rowid, rc.remise_client as remise_percent, rc.note, rc.datec as dc,"; $sql = "SELECT rc.rowid, rc.remise_client as remise_percent, rc.note, rc.datec as dc,";
$sql.= " u.login, u.rowid as user_id"; $sql.= " u.login, u.rowid as user_id";
$sql.= " FROM ".MAIN_DB_PREFIX."societe_remise as rc, ".MAIN_DB_PREFIX."user as u"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_remise as rc, ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE rc.fk_soc =". $objsoc->id; $sql.= " WHERE rc.fk_soc =". $object->id;
$sql.= " AND u.rowid = rc.fk_user_author"; $sql.= " AND u.rowid = rc.fk_user_author";
$sql.= " ORDER BY rc.datec DESC"; $sql.= " ORDER BY rc.datec DESC";

View File

@ -36,7 +36,7 @@ $action=GETPOST('action','alpha');
$backtopage=GETPOST('backtopage','alpha'); $backtopage=GETPOST('backtopage','alpha');
// Security check // Security check
$socid = GETPOST('id','int'); $socid = GETPOST('id','int')?GETPOST('id','int'):GETPOST('socid','int');
if ($user->societe_id > 0) if ($user->societe_id > 0)
{ {
$socid = $user->societe_id; $socid = $user->societe_id;
@ -212,36 +212,34 @@ llxHeader('',$langs->trans("GlobalDiscount"));
if ($socid > 0) if ($socid > 0)
{ {
// On recupere les donnees societes par l'objet // On recupere les donnees societes par l'objet
$objsoc = new Societe($db); $object = new Societe($db);
$objsoc->id=$socid; $object->fetch($socid);
$objsoc->fetch($socid);
/* /*
* Affichage onglets * Affichage onglets
*/ */
$head = societe_prepare_head($objsoc); $head = societe_prepare_head($object);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$objsoc->id.'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setremise">'; print '<input type="hidden" name="action" value="setremise">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"),0,'company'); dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"),0,'company');
print '<table class="border" width="100%">'; dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
// Name print '<div class="fichecenter">';
print '<tr><td width="38%">'.$langs->trans('Name').'</td>';
print '<td>'; print '<div class="underbanner clearboth"></div>';
print $form->showrefnav($objsoc,'id','',1,'rowid','nom'); print '<table class="border centpercent">';
print '</td></tr>';
// Calcul avoirs en cours // Calcul avoirs en cours
$remise_all=$remise_user=0; $remise_all=$remise_user=0;
$sql = "SELECT SUM(rc.amount_ht) as amount, rc.fk_user"; $sql = "SELECT SUM(rc.amount_ht) as amount, rc.fk_user";
$sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_except as rc"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_except as rc";
$sql.= " WHERE rc.fk_soc =". $objsoc->id; $sql.= " WHERE rc.fk_soc =". $object->id;
$sql.= " AND (fk_facture_line IS NULL AND fk_facture IS NULL)"; $sql.= " AND (fk_facture_line IS NULL AND fk_facture IS NULL)";
$sql.= " GROUP BY rc.fk_user"; $sql.= " GROUP BY rc.fk_user";
$resql=$db->query($sql); $resql=$db->query($sql);
@ -256,7 +254,7 @@ if ($socid > 0)
dol_print_error($db); dol_print_error($db);
} }
print '<tr><td width="38%">'.$langs->trans("CustomerAbsoluteDiscountAllUsers").'</td>'; print '<tr><td class="titlefield">'.$langs->trans("CustomerAbsoluteDiscountAllUsers").'</td>';
print '<td>'.$remise_all.'&nbsp;'.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'</td></tr>'; print '<td>'.$remise_all.'&nbsp;'.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'</td></tr>';
print '<tr><td>'.$langs->trans("CustomerAbsoluteDiscountMy").'</td>'; print '<tr><td>'.$langs->trans("CustomerAbsoluteDiscountMy").'</td>';
@ -271,13 +269,15 @@ if ($socid > 0)
print '<span class="hideonsmartphone">&nbsp;'.$langs->trans("Currency".$conf->currency).'</span></td></tr>'; print '<span class="hideonsmartphone">&nbsp;'.$langs->trans("Currency".$conf->currency).'</span></td></tr>';
print '<tr><td width="38%">'.$langs->trans("VAT").'</td>'; print '<tr><td width="38%">'.$langs->trans("VAT").'</td>';
print '<td>'; print '<td>';
print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$objsoc); print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$object);
print '</td></tr>'; print '</td></tr>';
print '<tr><td>'.$langs->trans("NoteReason").'</td>'; print '<tr><td>'.$langs->trans("NoteReason").'</td>';
print '<td><input type="text" size="60" name="desc" value="'.$_POST["desc"].'"></td></tr>'; print '<td><input type="text" size="60" name="desc" value="'.$_POST["desc"].'"></td></tr>';
print "</table>"; print "</table>";
print '</div>';
dol_fiche_end(); dol_fiche_end();
print '<div class="center">'; print '<div class="center">';
@ -296,7 +296,7 @@ if ($socid > 0)
if ($_GET['action'] == 'remove') if ($_GET['action'] == 'remove')
{ {
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1);
} }
/* /*
@ -309,7 +309,7 @@ if ($socid > 0)
$sql.= " fa.facnumber as ref, fa.type as type"; $sql.= " fa.facnumber as ref, fa.type as type";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."societe_remise_except as rc"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."societe_remise_except as rc";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid";
$sql.= " WHERE rc.fk_soc =". $objsoc->id; $sql.= " WHERE rc.fk_soc =". $object->id;
$sql.= " AND u.rowid = rc.fk_user"; $sql.= " AND u.rowid = rc.fk_user";
$sql.= " AND (rc.fk_facture_line IS NULL AND rc.fk_facture IS NULL)"; $sql.= " AND (rc.fk_facture_line IS NULL AND rc.fk_facture IS NULL)";
$sql.= " ORDER BY rc.datec DESC"; $sql.= " ORDER BY rc.datec DESC";
@ -375,9 +375,9 @@ if ($socid > 0)
if ($user->rights->societe->creer || $user->rights->facture->creer) if ($user->rights->societe->creer || $user->rights->facture->creer)
{ {
print '<td class="nowrap">'; print '<td class="nowrap">';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&amp;action=split&amp;remid='.$obj->rowid.'">'.img_picto($langs->trans("SplitDiscount"),'split').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=split&amp;remid='.$obj->rowid.'">'.img_picto($langs->trans("SplitDiscount"),'split').'</a>';
print ' &nbsp; '; print ' &nbsp; ';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&amp;action=remove&amp;remid='.$obj->rowid.'">'.img_delete($langs->trans("RemoveDiscount")).'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=remove&amp;remid='.$obj->rowid.'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
print '</td>'; print '</td>';
} }
else print '<td>&nbsp;</td>'; else print '<td>&nbsp;</td>';
@ -403,7 +403,7 @@ if ($socid > 0)
array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5')
); );
$langs->load("dict"); $langs->load("dict");
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0);
} }
} }
else else
@ -429,7 +429,7 @@ if ($socid > 0)
$sql.= " , ".MAIN_DB_PREFIX."facturedet as fc"; $sql.= " , ".MAIN_DB_PREFIX."facturedet as fc";
$sql.= " , ".MAIN_DB_PREFIX."societe_remise_except as rc"; $sql.= " , ".MAIN_DB_PREFIX."societe_remise_except as rc";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid";
$sql.= " WHERE rc.fk_soc =". $objsoc->id; $sql.= " WHERE rc.fk_soc =". $object->id;
$sql.= " AND rc.fk_facture_line = fc.rowid"; $sql.= " AND rc.fk_facture_line = fc.rowid";
$sql.= " AND fc.fk_facture = f.rowid"; $sql.= " AND fc.fk_facture = f.rowid";
$sql.= " AND rc.fk_user = u.rowid"; $sql.= " AND rc.fk_user = u.rowid";
@ -446,7 +446,7 @@ if ($socid > 0)
$sql2.= " , ".MAIN_DB_PREFIX."user as u"; $sql2.= " , ".MAIN_DB_PREFIX."user as u";
$sql2.= " , ".MAIN_DB_PREFIX."societe_remise_except as rc"; $sql2.= " , ".MAIN_DB_PREFIX."societe_remise_except as rc";
$sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid"; $sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid";
$sql2.= " WHERE rc.fk_soc =". $objsoc->id; $sql2.= " WHERE rc.fk_soc =". $object->id;
$sql2.= " AND rc.fk_facture = f.rowid"; $sql2.= " AND rc.fk_facture = f.rowid";
$sql2.= " AND rc.fk_user = u.rowid"; $sql2.= " AND rc.fk_user = u.rowid";

View File

@ -58,6 +58,16 @@ function societe_prepare_head(Societe $object)
$head[$h][2] = 'customer'; $head[$h][2] = 'customer';
$h++; $h++;
} }
if (($object->client==1 || $object->client==2 || $object->client==3) && (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)))
{
$langs->load("products");
// price
$head[$h][0] = DOL_URL_ROOT.'/societe/price.php?socid='.$object->id;
$head[$h][1] = $langs->trans("CustomerPrices");
$head[$h][2] = 'price';
$h++;
}
if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire)) if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire))
{ {
$head[$h][0] = DOL_URL_ROOT.'/fourn/card.php?socid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fourn/card.php?socid='.$object->id;
@ -169,16 +179,6 @@ function societe_prepare_head(Societe $object)
$h++; $h++;
} }
if (($object->client==1 || $object->client==2 || $object->client==3) && (! empty ( $conf->global->PRODUIT_CUSTOMER_PRICES )))
{
$langs->load("products");
// price
$head[$h][0] = DOL_URL_ROOT.'/societe/price.php?socid='.$object->id;
$head[$h][1] = $langs->trans("CustomerPrices");
$head[$h][2] = 'price';
$h++;
}
// Log // Log
$head[$h][0] = DOL_URL_ROOT.'/societe/info.php?socid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/societe/info.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Info"); $head[$h][1] = $langs->trans("Info");

View File

@ -21,7 +21,7 @@ $module = $object->element;
$note_public = 'note_public'; $note_public = 'note_public';
$note_private = 'note_private'; $note_private = 'note_private';
$colwidth=(isset($colwidth)?$colwidth:25); $colwidth=(isset($colwidth)?$colwidth:(empty($cssclass)?'25':''));
$permission=(isset($permission)?$permission:(isset($user->rights->$module->creer)?$user->rights->$module->creer:0)); // If already defined by caller page $permission=(isset($permission)?$permission:(isset($user->rights->$module->creer)?$user->rights->$module->creer:0)); // If already defined by caller page
$moreparam=(isset($moreparam)?$moreparam:''); $moreparam=(isset($moreparam)?$moreparam:'');
@ -69,12 +69,12 @@ else $typeofdata='textarea:12:100';
<!-- BEGIN PHP TEMPLATE NOTES --> <!-- BEGIN PHP TEMPLATE NOTES -->
<div class="border table-border centpercent"> <div class="border table-border centpercent">
<div class="table-border-row"> <div class="table-border-row">
<div class="table-key-border-col"<?php echo ' style="width: '.$colwidth.'%"'; ?>><?php echo $form->editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam); ?></div> <div class="table-key-border-col<?php echo (empty($cssclass)?'':' '.$cssclass); ?>"<?php echo ($colwidth ? ' style="width: '.$colwidth.'%"' : ''); ?>><?php echo $form->editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam); ?></div>
<div class="table-val-border-col"><?php echo $form->editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam); ?></div> <div class="table-val-border-col"><?php echo $form->editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam); ?></div>
</div> </div>
<?php if (empty($user->societe_id)) { ?> <?php if (empty($user->societe_id)) { ?>
<div class="table-border-row"> <div class="table-border-row">
<div class="table-key-border-col"<?php echo ' style="width: '.$colwidth.'%"'; ?>><?php echo $form->editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam); ?></div> <div class="table-key-border-col<?php echo (empty($cssclass)?'':' '.$cssclass); ?>"<?php echo ($colwidth ? ' style="width: '.$colwidth.'%"' : ''); ?>><?php echo $form->editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam); ?></div>
<div class="table-val-border-col"><?php echo $form->editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam); ?></div> <div class="table-val-border-col"><?php echo $form->editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam); ?></div>
</div> </div>
<?php } ?> <?php } ?>

View File

@ -131,16 +131,15 @@ if ($object->id > 0)
dol_fiche_head($head, 'supplier', $langs->trans("ThirdParty"),0,'company'); dol_fiche_head($head, 'supplier', $langs->trans("ThirdParty"),0,'company');
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
print '<div class="fichecenter"><div class="fichehalfleft">'; print '<div class="fichecenter"><div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<table width="100%" class="border">'; print '<table width="100%" class="border">';
print '<tr><td width="30%">'.$langs->trans("ThirdPartyName").'</td><td width="70%" colspan="3">';
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','','');
print '</td></tr>';
// Alias names (commercial, trademark or alias names) // Alias names (commercial, trademark or alias names)
print '<tr><td>'.$langs->trans('AliasNameShort').'</td><td colspan="3">'; print '<tr><td class="titlefield">'.$langs->trans('AliasNameShort').'</td><td colspan="3">';
print $object->name_alias; print $object->name_alias;
print "</td></tr>"; print "</td></tr>";
@ -168,35 +167,6 @@ if ($object->id > 0)
print '</tr>'; print '</tr>';
} }
// Address
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td colspan="3">';
dol_print_address($object->address,'gmap','thirdparty',$object->id);
print '</td></tr>';
// Zip / Town
print '<tr><td class="nowrap">'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="3">'.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town.'</td>';
print '</tr>';
// Country
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
//$img=picto_from_langcode($object->country_code);
$img='';
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
else print ($img?$img.' ':'').$object->country;
print '</td></tr>';
// EMail
print '<td>'.$langs->trans('EMail').'</td><td colspan="3">'.dol_print_email($object->email,0,$object->id,'AC_EMAIL').'</td></tr>';
// Web
print '<tr><td>'.$langs->trans("Web").'</td><td colspan="3">'.dol_print_url($object->url).'</td></tr>';
// Phone
print '<tr><td>'.$langs->trans("Phone").'</td><td style="min-width: 25%;">'.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').'</td>';
// Fax
print '<td>'.$langs->trans("Fax").'</td><td style="min-width: 25%;">'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
// Assujetti a TVA ou pas // Assujetti a TVA ou pas
print '<tr>'; print '<tr>';
print '<td class="nowrap">'.$langs->trans('VATIsUsed').'</td><td colspan="3">'; print '<td class="nowrap">'.$langs->trans('VATIsUsed').'</td><td colspan="3">';

View File

@ -101,6 +101,7 @@ CorrectStock=Correct stock
AddPhoto=Add photo AddPhoto=Add photo
ListOfStockMovements=List of stock movements ListOfStockMovements=List of stock movements
BuyingPrice=Buying price BuyingPrice=Buying price
PriceForEachProduct=Products with specific prices
SupplierCard=Supplier card SupplierCard=Supplier card
CommercialCard=Commercial card CommercialCard=Commercial card
AllWays=Path to find your product in stock AllWays=Path to find your product in stock

View File

@ -80,14 +80,15 @@ if ($socid)
dol_fiche_head($head, 'agenda', $langs->trans("ThirdParty"),0,'company'); dol_fiche_head($head, 'agenda', $langs->trans("ThirdParty"),0,'company');
print '<table class="border" width="100%">'; dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
print '<tr><td width="25%">'.$langs->trans("ThirdPartyName").'</td><td colspan="3">'; print '<div class="fichecenter">';
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
print '</td></tr>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">';
// Alias names (commercial, trademark or alias names) // Alias names (commercial, trademark or alias names)
print '<tr><td>'.$langs->trans('AliasNames').'</td><td colspan="3">'; print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">';
print $object->name_alias; print $object->name_alias;
print "</td></tr>"; print "</td></tr>";
@ -114,47 +115,11 @@ if ($socid)
print '</td></tr>'; print '</td></tr>';
} }
if (! empty($conf->barcode->enabled))
{
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3">'.$object->barcode.'</td></tr>';
}
print "<tr><td>".$langs->trans('Address')."</td><td colspan=\"3\">";
dol_print_address($object->address, 'gmap', 'thirdparty', $object->id);
print "</td></tr>";
// Zip / Town
print '<tr><td width="25%">'.$langs->trans('Zip').'</td><td width="25%">'.$object->zip."</td>";
print '<td width="25%">'.$langs->trans('Town').'</td><td width="25%">'.$object->town."</td></tr>";
// Country
if ($object->country) {
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
//$img=picto_from_langcode($object->country_code);
$img='';
print ($img?$img.' ':'');
print $object->country;
print '</td></tr>';
}
// EMail
print '<tr><td>'.$langs->trans('EMail').'</td><td colspan="3">';
print dol_print_email($object->email,0,$object->id,'AC_EMAIL');
print '</td></tr>';
// Web
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
print dol_print_url($object->url);
print '</td></tr>';
// Phone / Fax
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').'</td>';
print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
print '</table>'; print '</table>';
print '</div>'; print '</div>';
dol_fiche_end();
/* /*
* Barre d'action * Barre d'action

View File

@ -33,7 +33,7 @@ $langs->load("suppliers");
$langs->load("banks"); $langs->load("banks");
// Security check // Security check
$socid = isset($_GET["socid"])?$_GET["socid"]:''; $socid = GETPOST("socid");
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'societe','',''); $result = restrictedArea($user, 'societe','','');
@ -50,18 +50,18 @@ if($_GET["socid"] && $_GET["commid"])
if ($user->rights->societe->creer) if ($user->rights->societe->creer)
{ {
$soc = new Societe($db); $object = new Societe($db);
$soc->id = $_GET["socid"]; $object->id = $_GET["socid"];
$soc->fetch($_GET["socid"]); $object->fetch($_GET["socid"]);
$parameters=array('id'=>$_GET["commid"]); $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 ($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; exit;
} }
else else
@ -71,23 +71,23 @@ if($_GET["socid"] && $_GET["commid"])
} }
} }
if($_GET["socid"] && $_GET["delcommid"]) if ($socid && $_GET["delcommid"])
{ {
$action = 'delete'; $action = 'delete';
if ($user->rights->societe->creer) if ($user->rights->societe->creer)
{ {
$soc = new Societe($db); $object = new Societe($db);
$soc->id = $_GET["socid"]; $object->id = $_GET["socid"];
$soc->fetch($_GET["socid"]); $object->fetch($_GET["socid"]);
$parameters=array('id'=>$_GET["delcommid"]); $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 ($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; exit;
} }
else else
@ -107,63 +107,44 @@ llxHeader('',$langs->trans("ThirdParty"),$help_url);
$form = new Form($db); $form = new Form($db);
if ($_GET["socid"]) if ($socid)
{ {
$soc = new Societe($db); $object = new Societe($db);
$soc->id = $_GET["socid"]; $result=$object->fetch($socid);
$result=$soc->fetch($_GET["socid"]);
$action='view'; $action='view';
$head=societe_prepare_head2($soc); $head=societe_prepare_head2($object);
dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty"),0,'company'); dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty"),0,'company');
/* dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
* Fiche societe en mode visu
*/
print '<table class="border" width="100%">'; print '<div class="fichecenter">';
print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>'; print '<div class="underbanner clearboth"></div>';
print '<td colspan="3">'; print '<table class="border centpercent">';
print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
print '</td></tr>';
print '<tr>'; print '<tr>';
print '<td>'.$langs->trans('CustomerCode').'</td><td'.(empty($conf->global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; print '<td class="titlefield">'.$langs->trans('CustomerCode').'</td><td'.(empty($conf->global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>';
print $soc->code_client; print $object->code_client;
if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); if ($object->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
print '</td>'; print '</td>';
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
{ {
print '<td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td>'; print '<td>'.$langs->trans('Prefix').'</td><td>'.$object->prefix_comm.'</td>';
} }
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->address)."</td></tr>";
print '<tr><td>'.$langs->trans('Zip').'</td><td width="20%">'.$soc->zip."</td>";
print '<td>'.$langs->trans('Town').'</td><td>'.$soc->town."</td></tr>";
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$soc->country.'</td>';
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->phone,$soc->country_code,0,$soc->id,'AC_TEL').'</td>';
print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->country_code,0,$soc->id,'AC_FAX').'</td></tr>';
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; }
print '</td></tr>';
// Liste les commerciaux // Liste les commerciaux
print '<tr><td valign="top">'.$langs->trans("SalesRepresentatives").'</td>'; print '<tr><td>'.$langs->trans("SalesRepresentatives").'</td>';
print '<td colspan="3">'; print '<td colspan="3">';
$sql = "SELECT u.rowid, u.lastname, u.firstname"; $sql = "SELECT u.rowid, u.lastname, u.firstname";
$sql .= " FROM ".MAIN_DB_PREFIX."user as u"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u";
$sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $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 .= " AND sc.fk_user = u.rowid";
$sql .= " ORDER BY u.lastname ASC "; $sql .= " ORDER BY u.lastname ASC ";
dol_syslog('societe/commerciaux.php::list salesman sql = '.$sql,LOG_DEBUG); dol_syslog('societe/commerciaux.php::list salesman sql = '.$sql,LOG_DEBUG);
@ -177,7 +158,7 @@ if ($_GET["socid"])
{ {
$obj = $db->fetch_object($resql); $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 $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$obj,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) { if (empty($reshook)) {
@ -211,6 +192,8 @@ if ($_GET["socid"])
print '</table>'; print '</table>';
print "</div>\n"; print "</div>\n";
dol_fiche_end();
if ($user->rights->societe->creer && $user->rights->societe->client->voir) if ($user->rights->societe->creer && $user->rights->societe->client->voir)
{ {

View File

@ -116,14 +116,15 @@ if (empty($socid))
$head = societe_prepare_head($object); $head = societe_prepare_head($object);
dol_fiche_head($head, 'consumption', $langs->trans("ThirdParty"),0,'company'); dol_fiche_head($head, 'consumption', $langs->trans("ThirdParty"),0,'company');
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr><td width="25%">'.$langs->trans('ThirdPartyName').'</td>';
print '<td colspan="3">';
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
print '</td></tr>';
// Alias names (commercial, trademark or alias names) // Alias names (commercial, trademark or alias names)
print '<tr id="name_alias"><td><label for="name_alias_input">'.$langs->trans('AliasNames').'</label></td>'; print '<tr id="name_alias"><td class="titlefield"><label for="name_alias_input">'.$langs->trans('AliasNames').'</label></td>';
print '<td colspan="3">'.$object->name_alias.'</td></tr>'; print '<td colspan="3">'.$object->name_alias.'</td></tr>';
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
@ -173,6 +174,8 @@ if ($object->fournisseur)
} }
print '</table>'; print '</table>';
print '</div>';
dol_fiche_end(); dol_fiche_end();
print '<br>'; print '<br>';

View File

@ -109,17 +109,15 @@ if ($object->id)
$totalsize+=$file['size']; $totalsize+=$file['size'];
} }
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
print '<table class="border"width="100%">'; print '<div class="fichecenter">';
// Ref print '<div class="underbanner clearboth"></div>';
print '<tr><td width="25%">'.$langs->trans("ThirdPartyName").'</td>'; print '<table class="border centpercent">';
print '<td colspan="3">';
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
print '</td></tr>';
// Alias names (commercial, trademark or alias names) // Alias names (commercial, trademark or alias names)
print '<tr><td>'.$langs->trans('AliasNames').'</td><td colspan="3">'; print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">';
print $object->name_alias; print $object->name_alias;
print "</td></tr>"; print "</td></tr>";
@ -155,6 +153,8 @@ if ($object->id)
print '</table>'; print '</table>';
print '</div>';
dol_fiche_end(); dol_fiche_end();
$modulepart = 'societe'; $modulepart = 'societe';

View File

@ -75,15 +75,15 @@ if ($id > 0)
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">'; print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="border" width="100%">'; dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
print '<tr><td width="25%">'.$langs->trans('ThirdPartyName').'</td>'; print '<div class="fichecenter">';
print '<td colspan="3">';
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom'); print '<div class="underbanner clearboth"></div>';
print '</td></tr>'; print '<table class="border centpercent">';
// Alias names (commercial, trademark or alias names) // Alias names (commercial, trademark or alias names)
print '<tr><td>'.$langs->trans('AliasNames').'</td><td colspan="3">'; print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">';
print $object->name_alias; print $object->name_alias;
print "</td></tr>"; print "</td></tr>";
@ -112,9 +112,12 @@ if ($id > 0)
print "</table>"; print "</table>";
print '</div>';
print '<br>'; print '<br>';
$colwidth='25'; //$colwidth='25';
$cssclass='titlefield';
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';

View File

@ -142,15 +142,15 @@ if ($result > 0)
dol_fiche_head($head, 'notify', $langs->trans("ThirdParty"),0,'company'); dol_fiche_head($head, 'notify', $langs->trans("ThirdParty"),0,'company');
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
print '<table class="border"width="100%">'; print '<div class="fichecenter">';
print '<tr><td width="25%">'.$langs->trans("ThirdPartyName").'</td><td colspan="3">'; print '<div class="underbanner clearboth"></div>';
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom'); print '<table class="border centpercent">';
print '</td></tr>';
// Alias names (commercial, trademark or alias names) // Alias names (commercial, trademark or alias names)
print '<tr><td valign="top">'.$langs->trans('AliasNames').'</td><td colspan="3">'; print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">';
print $object->name_alias; print $object->name_alias;
print "</td></tr>"; print "</td></tr>";
@ -186,6 +186,8 @@ if ($result > 0)
print '</td></tr>'; print '</td></tr>';
print '</table>'; print '</table>';
print '</div>';
dol_fiche_end(); dol_fiche_end();
// Help // Help
@ -248,6 +250,7 @@ if ($result > 0)
print '</table>'; print '</table>';
print '</form>'; print '</form>';
print '<br>'; print '<br>';

View File

@ -120,90 +120,58 @@ if ($action == 'update_customer_price_confirm' && ! $_POST ["cancel"] && ($user-
$form = new Form($db); $form = new Form($db);
$soc = new Societe($db); $object = new Societe($db);
$result = $soc->fetch($socid); $result = $object->fetch($socid);
llxHeader("", $langs->trans("ThirdParty") . '-' . $langs->trans('PriceByCustomer')); llxHeader("", $langs->trans("ThirdParty") . '-' . $langs->trans('PriceByCustomer'));
if (! empty($conf->notification->enabled)) if (! empty($conf->notification->enabled))
$langs->load("mails"); $langs->load("mails");
$head = societe_prepare_head($soc); $head = societe_prepare_head($object);
dol_fiche_head($head, 'price', $langs->trans("ThirdParty"), 0, 'company'); dol_fiche_head($head, 'price', $langs->trans("ThirdParty"), 0, 'company');
print '<table class="border" width="100%">'; dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
print '<tr><td width="25%">' . $langs->trans("ThirdPartyName") . '</td><td colspan="3">'; print '<div class="fichecenter">';
print $form->showrefnav($soc, 'socid', '', ($user->societe_id ? 0 : 1), 'rowid', 'nom');
print '</td></tr>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">';
// Alias names (commercial, trademark or alias names) // Alias names (commercial, trademark or alias names)
print '<tr><td>'.$langs->trans('AliasNames').'</td><td colspan="3">'; print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">';
print $soc->name_alias; print $object->name_alias;
print "</td></tr>"; print "</td></tr>";
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
{ {
print '<tr><td>' . $langs->trans('Prefix') . '</td><td colspan="3">' . $soc->prefix_comm . '</td></tr>'; print '<tr><td>' . $langs->trans('Prefix') . '</td><td colspan="3">' . $object->prefix_comm . '</td></tr>';
} }
if ($soc->client) { if ($object->client) {
print '<tr><td>'; print '<tr><td>';
print $langs->trans('CustomerCode') . '</td><td colspan="3">'; print $langs->trans('CustomerCode') . '</td><td colspan="3">';
print $soc->code_client; print $object->code_client;
if ($soc->check_codeclient() != 0) if ($object->check_codeclient() != 0)
print ' <font class="error">(' . $langs->trans("WrongCustomerCode") . ')</font>'; print ' <font class="error">(' . $langs->trans("WrongCustomerCode") . ')</font>';
print '</td></tr>'; print '</td></tr>';
} }
if ($soc->fournisseur) { if ($object->fournisseur) {
print '<tr><td>'; print '<tr><td>';
print $langs->trans('SupplierCode') . '</td><td colspan="3">'; print $langs->trans('SupplierCode') . '</td><td colspan="3">';
print $soc->code_fournisseur; print $object->code_fournisseur;
if ($soc->check_codefournisseur() != 0) if ($object->check_codefournisseur() != 0)
print ' <font class="error">(' . $langs->trans("WrongSupplierCode") . ')</font>'; print ' <font class="error">(' . $langs->trans("WrongSupplierCode") . ')</font>';
print '</td></tr>'; print '</td></tr>';
} }
if (! empty($conf->barcode->enabled)) {
print '<tr><td>' . $langs->trans('Gencod') . '</td><td colspan="3">' . $soc->barcode . '</td></tr>';
}
print "<tr><td>" . $langs->trans('Address') . "</td><td colspan=\"3\">";
dol_print_address($soc->address, 'gmap', 'thirdparty', $soc->id);
print "</td></tr>";
// Zip / Town
print '<tr><td width="25%">' . $langs->trans('Zip') . '</td><td width="25%">' . $soc->zip . "</td>";
print '<td width="25%">' . $langs->trans('Town') . '</td><td width="25%">' . $soc->town . "</td></tr>";
// Country
if ($soc->country) {
print '<tr><td>' . $langs->trans('Country') . '</td><td colspan="3">';
$img = picto_from_langcode($soc->country_code);
print($img ? $img . ' ' : '');
print $soc->country;
print '</td></tr>';
}
// EMail
print '<tr><td>' . $langs->trans('EMail') . '</td><td colspan="3">';
print dol_print_email($soc->email, 0, $soc->id, 'AC_EMAIL');
print '</td></tr>';
// Web
print '<tr><td>' . $langs->trans('Web') . '</td><td colspan="3">';
print dol_print_url($soc->url);
print '</td></tr>';
// Phone / Fax
print '<tr><td>' . $langs->trans('Phone') . '</td><td>' . dol_print_phone($soc->tel, $soc->country_code, 0, $soc->id, 'AC_TEL') . '</td>';
print '<td>' . $langs->trans('Fax') . '</td><td>' . dol_print_phone($soc->fax, $soc->country_code, 0, $soc->id, 'AC_FAX') . '</td></tr>';
print '</table>'; print '</table>';
print '</div>'; print '</div>';
dol_fiche_end();
if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
$prodcustprice = new Productcustomerprice($db); $prodcustprice = new Productcustomerprice($db);
@ -224,7 +192,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
// Build filter to diplay only concerned lines // Build filter to diplay only concerned lines
$filter = array ( $filter = array (
't.fk_soc' => $soc->id 't.fk_soc' => $object->id
); );
$search_soc = GETPOST('search_soc'); $search_soc = GETPOST('search_soc');
@ -238,10 +206,10 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print load_fiche_titre($langs->trans('PriceByCustomer')); print load_fiche_titre($langs->trans('PriceByCustomer'));
print '<form action="' . $_SERVER["PHP_SELF"] . '?socid=' . $soc->id . '" method="POST">'; print '<form action="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="add_customer_price_confirm">'; print '<input type="hidden" name="action" value="add_customer_price_confirm">';
print '<input type="hidden" name="socid" value="' . $soc->id . '">'; print '<input type="hidden" name="socid" value="' . $object->id . '">';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr>'; print '<tr>';
print '<td>' . $langs->trans('Product') . '</td>'; print '<td>' . $langs->trans('Product') . '</td>';
@ -316,7 +284,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
setEventMessage($prodcustprice->error, 'errors'); setEventMessage($prodcustprice->error, 'errors');
} }
print '<form action="' . $_SERVER["PHP_SELF"] . '?socid=' . $soc->id . '" method="POST">'; print '<form action="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="update_customer_price_confirm">'; print '<input type="hidden" name="action" value="update_customer_price_confirm">';
print '<input type="hidden" name="lineid" value="' . $prodcustprice->id . '">'; print '<input type="hidden" name="lineid" value="' . $prodcustprice->id . '">';
@ -456,9 +424,11 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
} }
print "\n" . '<div class="tabsAction">' . "\n"; print "\n" . '<div class="tabsAction">' . "\n";
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?socid=' . $soc->id . '">' . $langs->trans("Ok") . '</a></div>'; print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '">' . $langs->trans("Ok") . '</a></div>';
print "\n</div><br>\n"; print "\n</div><br>\n";
} else { }
else
{
// View mode // View mode
@ -475,7 +445,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
$option = '&search_soc=' . $search_soc . '&id=' . $object->id; $option = '&search_soc=' . $search_soc . '&id=' . $object->id;
print_barre_liste($langs->trans('PriceByCustomer'), $page, $_SERVEUR ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords); print_barre_liste($langs->trans('PriceForEachProduct'), $page, $_SERVEUR ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords);
if (count($prodcustprice->lines) > 0) { if (count($prodcustprice->lines) > 0) {
@ -536,15 +506,15 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
// Action // Action
if ($user->rights->produit->creer || $user->rights->service->creer) { if ($user->rights->produit->creer || $user->rights->service->creer) {
print '<td align="right">'; print '<td align="right">';
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=showlog_customer_price&amp;socid=' . $soc->id . '&amp;prodid=' . $line->fk_product . '">'; print '<a href="' . $_SERVER["PHP_SELF"] . '?action=showlog_customer_price&amp;socid=' . $object->id . '&amp;prodid=' . $line->fk_product . '">';
print img_info(); print img_info();
print '</a>'; print '</a>';
print ' '; print ' ';
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=edit_customer_price&amp;socid=' . $soc->id . '&amp;lineid=' . $line->id . '">'; print '<a href="' . $_SERVER["PHP_SELF"] . '?action=edit_customer_price&amp;socid=' . $object->id . '&amp;lineid=' . $line->id . '">';
print img_edit('default', 0, 'style="vertical-align: middle;"'); print img_edit('default', 0, 'style="vertical-align: middle;"');
print '</a>'; print '</a>';
print ' '; print ' ';
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=delete_customer_price&amp;socid=' . $soc->id . '&amp;lineid=' . $line->id . '">'; print '<a href="' . $_SERVER["PHP_SELF"] . '?action=delete_customer_price&amp;socid=' . $object->id . '&amp;lineid=' . $line->id . '">';
print img_delete('default', 'style="vertical-align: middle;"'); print img_delete('default', 'style="vertical-align: middle;"');
print '</a>'; print '</a>';
print '</td>'; print '</td>';
@ -568,7 +538,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print "\n" . '<div class="tabsAction">' . "\n"; print "\n" . '<div class="tabsAction">' . "\n";
if ($user->rights->produit->creer || $user->rights->service->creer) { if ($user->rights->produit->creer || $user->rights->service->creer) {
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=add_customer_price&amp;socid=' . $soc->id . '">' . $langs->trans("AddCustomerPrice") . '</a></div>'; print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=add_customer_price&amp;socid=' . $object->id . '">' . $langs->trans("AddCustomerPrice") . '</a></div>';
} }
print "\n</div><br>\n"; print "\n</div><br>\n";
} }

View File

@ -42,9 +42,8 @@ $socid = GETPOST("socid");
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'societe','',''); $result = restrictedArea($user, 'societe','','');
$soc = new Societe($db); $object = new Societe($db);
$soc->id = $_GET["socid"]; $object->fetch($socid);
$soc->fetch($_GET["socid"]);
$id=GETPOST("id","int"); $id=GETPOST("id","int");
$ribid=GETPOST("ribid","int"); $ribid=GETPOST("ribid","int");
@ -62,7 +61,7 @@ if ($action == 'update' && ! $_POST["cancel"])
$account->fetch($id); $account->fetch($id);
$account->socid = $soc->id; $account->socid = $object->id;
$account->bank = $_POST["bank"]; $account->bank = $_POST["bank"];
$account->label = $_POST["label"]; $account->label = $_POST["label"];
@ -93,7 +92,7 @@ if ($action == 'update' && ! $_POST["cancel"])
$account->setAsDefault($id); // This will make sure there is only one default rib $account->setAsDefault($id); // This will make sure there is only one default rib
} }
$url=DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id; $url=DOL_URL_ROOT.'/societe/rib.php?socid='.$object->id;
header('Location: '.$url); header('Location: '.$url);
exit; exit;
} }
@ -121,7 +120,7 @@ if ($action == 'add' && ! $_POST["cancel"])
// Ajout // Ajout
$account = new CompanyBankAccount($db); $account = new CompanyBankAccount($db);
$account->socid = $soc->id; $account->socid = $object->id;
$account->bank = $_POST["bank"]; $account->bank = $_POST["bank"];
$account->label = $_POST["label"]; $account->label = $_POST["label"];
@ -146,7 +145,7 @@ if ($action == 'add' && ! $_POST["cancel"])
} }
else else
{ {
$url=DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id; $url=DOL_URL_ROOT.'/societe/rib.php?socid='.$object->id;
header('Location: '.$url); header('Location: '.$url);
exit; exit;
} }
@ -159,7 +158,7 @@ if ($action == 'setasdefault')
$res = $account->setAsDefault(GETPOST('ribid','int')); $res = $account->setAsDefault(GETPOST('ribid','int'));
if ($res) if ($res)
{ {
$url=DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id; $url=DOL_URL_ROOT.'/societe/rib.php?socid='.$object->id;
header('Location: '.$url); header('Location: '.$url);
exit; exit;
} else { } else {
@ -175,7 +174,7 @@ if ($action == 'confirm_delete' && $_GET['confirm'] == 'yes')
$result = $account->delete($user); $result = $account->delete($user);
if ($result > 0) if ($result > 0)
{ {
$url = $_SERVER['PHP_SELF']."?socid=".$soc->id; $url = $_SERVER['PHP_SELF']."?socid=".$object->id;
header('Location: '.$url); header('Location: '.$url);
exit; exit;
} }
@ -200,27 +199,27 @@ $prelevement = new BonPrelevement($db);
llxHeader(); llxHeader();
$head=societe_prepare_head2($soc); $head=societe_prepare_head2($object);
$account = new CompanyBankAccount($db); $account = new CompanyBankAccount($db);
if (! $id) if (! $id)
$account->fetch(0,$soc->id); $account->fetch(0,$object->id);
else else
$account->fetch($id); $account->fetch($id);
if (empty($account->socid)) $account->socid=$soc->id; if (empty($account->socid)) $account->socid=$object->id;
if ($socid && $action == 'edit' && $user->rights->societe->creer) if ($socid && $action == 'edit' && $user->rights->societe->creer)
{ {
print '<form action="rib.php?socid='.$soc->id.'" method="post">'; print '<form action="rib.php?socid='.$object->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="id" value="'.$_GET["id"].'">'; print '<input type="hidden" name="id" value="'.$_GET["id"].'">';
} }
if ($socid && $action == 'create' && $user->rights->societe->creer) if ($socid && $action == 'create' && $user->rights->societe->creer)
{ {
print '<form action="rib.php?socid='.$soc->id.'" method="post">'; print '<form action="rib.php?socid='.$object->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add">'; print '<input type="hidden" name="action" value="add">';
} }
@ -234,17 +233,22 @@ if ($socid && $action != 'edit' && $action != "create")
// Confirm delete third party // Confirm delete third party
if ($action == 'delete') if ($action == 'delete')
{ {
print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$soc->id."&ribid=".($ribid?$ribid:$id), $langs->trans("DeleteARib"), $langs->trans("ConfirmDeleteRib", $account->getRibLabel()), "confirm_delete", '', 0, 1); print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id."&ribid=".($ribid?$ribid:$id), $langs->trans("DeleteARib"), $langs->trans("ConfirmDeleteRib", $account->getRibLabel()), "confirm_delete", '', 0, 1);
} }
print load_fiche_titre($langs->trans("DefaultRIB")); dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
print '<table class="border" width="100%">'; print '<div class="fichecenter">';
print '<tr><td width="35%">'.$langs->trans("LabelRIB").'</td>'; print load_fiche_titre($langs->trans("DefaultRIB"), '', '');
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">';
print '<tr><td class="titlefield">'.$langs->trans("LabelRIB").'</td>';
print '<td colspan="4">'.$account->label.'</td></tr>'; print '<td colspan="4">'.$account->label.'</td></tr>';
print '<tr><td valign="top">'.$langs->trans("BankName").'</td>'; print '<tr><td>'.$langs->trans("BankName").'</td>';
print '<td colspan="4">'.$account->bank.'</td></tr>'; print '<td colspan="4">'.$account->bank.'</td></tr>';
// Show fields of bank account // Show fields of bank account
@ -350,7 +354,9 @@ if ($socid && $action != 'edit' && $action != "create")
print '<div class="warning">'.$langs->trans("RIBControlError").'</div>'; print '<div class="warning">'.$langs->trans("RIBControlError").'</div>';
} }
print "<br>"; print "</div>";
dol_fiche_end();
/* /*
@ -359,7 +365,7 @@ if ($socid && $action != 'edit' && $action != "create")
print load_fiche_titre($langs->trans("AllRIB")); print load_fiche_titre($langs->trans("AllRIB"));
$rib_list = $soc->get_all_rib(); $rib_list = $object->get_all_rib();
$var = false; $var = false;
if (is_array($rib_list)) if (is_array($rib_list))
{ {
@ -397,7 +403,7 @@ if ($socid && $action != 'edit' && $action != "create")
if (! empty($conf->prelevement->enabled)) if (! empty($conf->prelevement->enabled))
{ {
// RUM // RUM
print '<td>'.$prelevement->buildRumNumber($soc->code_client, $rib->datec, $rib->id).'</td>'; print '<td>'.$prelevement->buildRumNumber($object->code_client, $rib->datec, $rib->id).'</td>';
// FRSTRECUR // FRSTRECUR
print '<td>'.$rib->frstrecur.'</td>'; print '<td>'.$rib->frstrecur.'</td>';
@ -406,7 +412,7 @@ if ($socid && $action != 'edit' && $action != "create")
// Default // Default
print '<td align="center" width="70">'; print '<td align="center" width="70">';
if (!$rib->default_rib) { if (!$rib->default_rib) {
print '<a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id.'&ribid='.$rib->id.'&action=setasdefault">'; print '<a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$object->id.'&ribid='.$rib->id.'&action=setasdefault">';
print img_picto($langs->trans("Disabled"),'off'); print img_picto($langs->trans("Disabled"),'off');
print '</a>'; print '</a>';
} else { } else {
@ -418,13 +424,13 @@ if ($socid && $action != 'edit' && $action != "create")
print '<td align="right">'; print '<td align="right">';
if ($user->rights->societe->creer) if ($user->rights->societe->creer)
{ {
print '<a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id.'&id='.$rib->id.'&action=edit">'; print '<a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$object->id.'&id='.$rib->id.'&action=edit">';
print img_picto($langs->trans("Modify"),'edit'); print img_picto($langs->trans("Modify"),'edit');
print '</a>'; print '</a>';
print '&nbsp;'; print '&nbsp;';
print '<a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id.'&id='.$rib->id.'&action=delete">'; print '<a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$object->id.'&id='.$rib->id.'&action=delete">';
print img_picto($langs->trans("Delete"),'delete'); print img_picto($langs->trans("Delete"),'delete');
print '</a>'; print '</a>';
} }
@ -444,7 +450,6 @@ if ($socid && $action != 'edit' && $action != "create")
dol_print_error($db); dol_print_error($db);
} }
dol_fiche_end();
} }
// Edit // Edit
@ -452,7 +457,12 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer)
{ {
dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"),0,'company'); dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"),0,'company');
print '<table class="border" width="100%">'; dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">';
print '<tr><td valign="top" width="35%" class="fieldrequired">'.$langs->trans("LabelRIB").'</td>'; print '<tr><td valign="top" width="35%" class="fieldrequired">'.$langs->trans("LabelRIB").'</td>';
print '<td colspan="4"><input size="30" type="text" name="label" value="'.$account->label.'"></td></tr>'; print '<td colspan="4"><input size="30" type="text" name="label" value="'.$account->label.'"></td></tr>';
@ -551,7 +561,7 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer)
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
if (empty($account->rum)) $account->rum = $prelevement->buildRumNumber($soc->code_client, $account->datec, $account->id); if (empty($account->rum)) $account->rum = $prelevement->buildRumNumber($object->code_client, $account->datec, $account->id);
// RUM // RUM
print '<tr><td width="35%">'.$langs->trans("RUM").'</td>'; print '<tr><td width="35%">'.$langs->trans("RUM").'</td>';
@ -564,7 +574,9 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer)
print '</table>'; print '</table>';
} }
dol_fiche_end(); print '</div>';
dol_fiche_end();
print '<div align="center">'; print '<div align="center">';
print '<input class="button" value="'.$langs->trans("Modify").'" type="submit">'; print '<input class="button" value="'.$langs->trans("Modify").'" type="submit">';
@ -579,8 +591,12 @@ if ($socid && $action == 'create' && $user->rights->societe->creer)
{ {
dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"),0,'company'); dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"),0,'company');
print '<table class="border" width="100%">'; dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">';
print '<tr><td valign="top" width="35%" class="fieldrequired">'.$langs->trans("LabelRIB").'</td>'; print '<tr><td valign="top" width="35%" class="fieldrequired">'.$langs->trans("LabelRIB").'</td>';
print '<td colspan="4"><input size="30" type="text" name="label" value="'.GETPOST('label').'"></td></tr>'; print '<td colspan="4"><input size="30" type="text" name="label" value="'.GETPOST('label').'"></td></tr>';
@ -657,6 +673,8 @@ if ($socid && $action == 'create' && $user->rights->societe->creer)
print '</table>'; print '</table>';
} }
print '</div>';
dol_fiche_end(); dol_fiche_end();
print '<div align="center">'; print '<div align="center">';
@ -686,7 +704,7 @@ if ($socid && $action != 'edit' && $action != 'create')
if ($user->rights->societe->creer) if ($user->rights->societe->creer)
{ {
print '<a class="butAction" href="rib.php?socid='.$soc->id.'&amp;action=create">'.$langs->trans("Add").'</a>'; print '<a class="butAction" href="rib.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("Add").'</a>';
} }
print '</div>'; print '</div>';

View File

@ -1881,47 +1881,11 @@ else
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">'; print '<table class="border tableforfield" width="100%">';
// Ref
/*
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="2">';
print $fuser->id;
print '</td>';
print '</tr>';
*/
// Name
/*
print '<tr><td width="25%">'.$langs->trans('ThirdPartyName').'</td>';
print '<td colspan="3">';
print $form->showrefnav($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
print '</td>';
print '</tr>';
*/
// Alias names (commercial, trademark or alias names) // Alias names (commercial, trademark or alias names)
print '<tr><td>'.$langs->trans('AliasNames').'</td><td>'; print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td>';
print $object->name_alias; print $object->name_alias;
print "</td></tr>"; print "</td></tr>";
// Logo+barcode
/*
$rowspan=6;
if (! empty($conf->global->SOCIETE_USEPREFIX)) $rowspan++;
if (! empty($object->client)) $rowspan++;
if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire)) $rowspan++;
if (! empty($conf->barcode->enabled)) $rowspan++;
if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++;
$htmllogobar='';
if ($showlogo || $showbarcode)
{
$htmllogobar.='<td rowspan="'.$rowspan.'" style="text-align: center;" width="25%">';
if ($showlogo) $htmllogobar.=$form->showphoto('societe',$object);
if ($showlogo && $showbarcode) $htmllogobar.='<br><br>';
if ($showbarcode) $htmllogobar.=$form->showbarcode($object);
$htmllogobar.='</td>';
}*/
// Prefix // Prefix
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
{ {
@ -1966,69 +1930,6 @@ else
print '</tr>'; print '</tr>';
} }
// Status
/*
print '<tr><td>'.$langs->trans("Status").'</td>';
print '<td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">';
if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
print ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased');
} else {
print $object->getLibStatut(2);
}
print '</td>';
print $htmllogobar; $htmllogobar='';
print '</tr>';
*/
// Address
/*
print '<tr><td class="tdtop">'.$langs->trans('Address').'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">';
dol_print_address($object->address,'gmap','thirdparty',$object->id);
print '</td></tr>';
// Zip / Town
print '<tr><td width="25%">'.$langs->trans('Zip').' / '.$langs->trans("Town").'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">';
print $object->zip.($object->zip && $object->town?" / ":"").$object->town;
print '</td>';
print '</tr>';
// Country
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'" class="nowrap">';
if (! empty($object->country_code))
{
//$img=picto_from_langcode($object->country_code);
$img='';
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
else print ($img?$img.' ':'').$object->country;
}
print '</td></tr>';
// State
if (empty($conf->global->SOCIETE_DISABLE_STATE)) print '<tr><td>'.$langs->trans('State').'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">'.$object->state.'</td>';
// EMail
print '<tr><td>'.$langs->trans('EMail').'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">';
print dol_print_email($object->email,0,$object->id,'AC_EMAIL');
print '</td></tr>';
// Web
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">';
print dol_print_url($object->url);
print '</td></tr>';
// Skype
if (! empty($conf->skype->enabled))
{
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3">';
print dol_print_skype($object->skype,0,$object->id,'AC_SKYPE');
print '</td></tr>';
}
// Phone / Fax
print '<tr><td>'.$langs->trans('Phone').'</td><td style="min-width: 25%;">'.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').'</td>';
print '<td>'.$langs->trans('Fax').'</td><td style="min-width: 25%;">'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
*/
// Prof ids // Prof ids
$i=1; $j=0; $i=1; $j=0;
while ($i <= 6) while ($i <= 6)

View File

@ -148,14 +148,16 @@ if ($id > 0 || ! empty($ref))
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">'; print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>'; dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
print '<td colspan="3">';
print $form->showrefnav($object,'id','',($user->societe_id?0:1),'rowid','nom'); print '<div class="fichecenter">';
print '</td></tr>';
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">';
// Alias names (commercial, trademark or alias names) // Alias names (commercial, trademark or alias names)
print '<tr><td valign="top">'.$langs->trans('AliasNames').'</td><td colspan="3">'; print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">';
print $object->name_alias; print $object->name_alias;
print "</td></tr>"; print "</td></tr>";
@ -181,7 +183,11 @@ if ($id > 0 || ! empty($ref))
if ($object->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; if ($object->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>';
print '</td></tr>'; print '</td></tr>';
} }
print '</table></form>'; print '</table>';
print '</div>';
print '</form>';
print '<br>'; print '<br>';
// Contacts lines (modules that overwrite templates must declare this into descriptor) // Contacts lines (modules that overwrite templates must declare this into descriptor)

View File

@ -489,7 +489,7 @@ div.confirmmessage {
.maxwidth100 { max-width: 100px; } .maxwidth100 { max-width: 100px; }
.maxwidth200 { max-width: 200px; } .maxwidth200 { max-width: 200px; }
.maxwidth300 { max-width: 300px; } .maxwidth300 { max-width: 300px; }
.titlefield { width: 25%; } .titlefield { width: 30%; }
<?php if (! empty($dol_optimize_smallscreen)) { ?> <?php if (! empty($dol_optimize_smallscreen)) { ?>
.hideonsmartphone { display: none; } .hideonsmartphone { display: none; }
.noenlargeonsmartphone { width : 50px !important; display: inline !important; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; }
@ -625,7 +625,7 @@ div.divphotoref {
div.statusref { div.statusref {
float: right; float: right;
padding-right: 12px; padding-right: 12px;
margin-top: 7px; margin-top: 6px;
margin-bottom: 10px; margin-bottom: 10px;
} }
img.photoref { img.photoref {
@ -1970,7 +1970,7 @@ td.border, div.tagtable div div.border {
} }
.table-key-border-col { .table-key-border-col {
width: 25%; /* width: 25%; */
vertical-align:top; vertical-align:top;
} }
.table-val-border-col { .table-val-border-col {
@ -2133,6 +2133,9 @@ div.pagination li.pagination span {
div.pagination li.pagination span.inactive { div.pagination li.pagination span.inactive {
cursor: default; cursor: default;
} }
/*div.pagination li.litext {
padding-top: 8px;
}*/
div.pagination li.litext a { div.pagination li.litext a {
border: none; border: none;
padding-right: 10px; padding-right: 10px;