Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
@ -18,20 +18,7 @@
|
||||
echo "<html>";
|
||||
echo "<head>";
|
||||
|
||||
echo "<STYLE type=\"text/css\">
|
||||
body {
|
||||
color: #444;
|
||||
font: 100%/30px 'Helvetica Neue', helvetica, arial, sans-serif;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
}
|
||||
echo "<STYLE type=\"text/css\">
|
||||
|
||||
table {
|
||||
background: #f5f5f5;
|
||||
@ -42,7 +29,7 @@ table {
|
||||
margin: 30px auto;
|
||||
text-align: left;
|
||||
width: 800px;
|
||||
}
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #777;
|
||||
@ -50,33 +37,11 @@ th {
|
||||
border-right: 1px solid #777;
|
||||
border-top: 1px solid #555;
|
||||
border-bottom: 1px solid #333;
|
||||
box-shadow: inset 0 1px 0 #999;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-weight: bold;
|
||||
padding: 10px 15px;
|
||||
position: relative;
|
||||
text-shadow: 0 1px 0 #000;
|
||||
}
|
||||
|
||||
th:after {
|
||||
background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.08));
|
||||
content: '';
|
||||
display: block;
|
||||
height: 25%;
|
||||
left: 0;
|
||||
margin: 1px 0 0 0;
|
||||
position: absolute;
|
||||
top: 25%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th:first-child {
|
||||
border-left: 1px solid #777;
|
||||
box-shadow: inset 1px 1px 0 #999;
|
||||
}
|
||||
|
||||
th:last-child {
|
||||
box-shadow: inset -1px 1px 0 #999;
|
||||
text-shadow: 0 1px 0 #000;
|
||||
}
|
||||
|
||||
td {
|
||||
@ -86,17 +51,8 @@ td {
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
padding: 10px 15px;
|
||||
position: relative;
|
||||
transition: all 300ms;
|
||||
}
|
||||
|
||||
td:first-child {
|
||||
box-shadow: inset 1px 0 0 #fff;
|
||||
}
|
||||
|
||||
td:last-child {
|
||||
border-right: 1px solid #e8e8e8;
|
||||
box-shadow: inset -1px 0 0 #fff;
|
||||
}
|
||||
|
||||
tr {
|
||||
background-color: #f1f1f1;
|
||||
@ -104,42 +60,35 @@ tr {
|
||||
}
|
||||
|
||||
tr:nth-child(odd) td {
|
||||
background-color: #f1f1f1;
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
tr:last-of-type td {
|
||||
box-shadow: inset 0 -1px 0 #fff;
|
||||
}
|
||||
|
||||
tr:last-of-type td:first-child {
|
||||
box-shadow: inset 1px -1px 0 #fff;
|
||||
}
|
||||
|
||||
tr:last-of-type td:last-child {
|
||||
box-shadow: inset -1px -1px 0 #fff;
|
||||
}
|
||||
|
||||
tbody:hover td {
|
||||
color: transparent;
|
||||
text-shadow: 0 0 3px #aaa;
|
||||
}
|
||||
|
||||
tbody:hover tr:hover td {
|
||||
color: #444;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
} </STYLE>";
|
||||
</STYLE>";
|
||||
|
||||
echo "<body>";
|
||||
echo "<h3>If you call this file with the argument \"?unused=true\" it searches for the translation strings that exist in en_US but are never used</h3>";
|
||||
echo "<h2>IMPORTANT: that can take quite a lot of time (up to 10 minutes), you need to tune the max_execution_time on your php.ini accordingly</h2>";
|
||||
echo "<h3>Happy translating :)</h3>";
|
||||
|
||||
// directory containing the php and lang files
|
||||
$htdocs = "../../htdocs/";
|
||||
echo "If you call this file with the argument \"?unused=true\" it searches for the translation strings that exist in en_US but are never used.<br>";
|
||||
echo "IMPORTANT: that can take quite a lot of time (up to 10 minutes), you need to tune the max_execution_time on your php.ini accordingly.<br>";
|
||||
echo "Happy translating :)<br>";
|
||||
|
||||
|
||||
// STEP 1 - Search duplicates keys
|
||||
|
||||
|
||||
// directory containing the php and lang files
|
||||
$htdocs = "../../htdocs/";
|
||||
|
||||
// directory containing the english lang files
|
||||
$workdir = $htdocs."langs/en_US/";
|
||||
|
||||
|
||||
$files = scandir($workdir);
|
||||
if (empty($files))
|
||||
{
|
||||
echo "Can't scan workdir = ".$workdir;
|
||||
exit;
|
||||
}
|
||||
|
||||
$exludefiles = array('.','..','README');
|
||||
$files = array_diff($files,$exludefiles);
|
||||
$langstrings_3d = array();
|
||||
@ -154,11 +103,12 @@ foreach ($files AS $file) {
|
||||
if (substr($row,0,1) !== '#') {
|
||||
// don't want lines without the separator (why should those even be here, anyway...)
|
||||
if (strpos($row,'=')!==false) {
|
||||
$row_array = explode('=',$row);
|
||||
$row_array = explode('=',$row); // $row_array[0] = key
|
||||
$langstrings_3d[$path_file['basename']][$line+1]=$row_array[0];
|
||||
$langstrings_3dtrans[$path_file['basename']][$line+1]=$row_array[1];
|
||||
$langstrings_full[]=$row_array[0];
|
||||
$langstrings_dist[$row_array[0]]=$row_array[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -167,16 +117,16 @@ foreach ($files AS $file) {
|
||||
foreach ($langstrings_3d AS $filename => $file) {
|
||||
foreach ($file AS $linenum => $value) {
|
||||
$keys = array_keys($langstrings_full, $value);
|
||||
if (count($keys)>1) {
|
||||
if (count($keys)>1)
|
||||
{
|
||||
foreach ($keys AS $key) {
|
||||
$dups[$value][$filename][$linenum] = '';
|
||||
$dups[$value][$filename][$linenum] = trim($langstrings_3dtrans[$filename][$linenum]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "<h2>Duplicate strings in lang files in $workdir - ".count($dups)." found</h2>";
|
||||
echo "<pre>";
|
||||
|
||||
echo "<table border_bottom=1> ";
|
||||
echo "<thead><tr><th align=\"center\">#</th><th>String</th><th>File and lines</th></thead>";
|
||||
@ -190,22 +140,27 @@ foreach ($dups as $string => $pages) {
|
||||
echo "<td>";
|
||||
foreach ($pages AS $page => $lines ) {
|
||||
echo "$page ";
|
||||
foreach ($lines as $line => $nothing) {
|
||||
echo "($line) ";
|
||||
foreach ($lines as $line => $translatedvalue) {
|
||||
//echo "($line - ".(substr($translatedvalue,0,20)).") ";
|
||||
echo "($line - ".htmlentities($translatedvalue).") ";
|
||||
}
|
||||
echo "<br>";
|
||||
}
|
||||
echo "</td></tr>";
|
||||
echo "</td></tr>\n";
|
||||
}
|
||||
echo "</tbody>";
|
||||
echo "</table>";
|
||||
|
||||
|
||||
if ($_REQUEST['unused'] == 'true') {
|
||||
// STEP 2 - Search key not used
|
||||
|
||||
foreach ($langstrings_dist AS $value){
|
||||
|
||||
if (! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true')
|
||||
{
|
||||
foreach ($langstrings_dist AS $value)
|
||||
{
|
||||
$search = '\'trans("'.$value.'")\'';
|
||||
$string = 'grep -R -m 1 -F --include=*.php '.$search.' '.$htdocs.'*';
|
||||
$string = 'grep -R -m 1 -F --exclude=includes/* --include=*.php '.$search.' '.$htdocs.'*';
|
||||
exec($string,$output);
|
||||
if (empty($output)) {
|
||||
$unused[$value] = true;
|
||||
@ -216,6 +171,9 @@ if ($_REQUEST['unused'] == 'true') {
|
||||
echo "<h2>Strings in en_US that are never used</h2>";
|
||||
echo "<pre>";
|
||||
print_r($unused);
|
||||
echo "</pre>";
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
echo "</body>";
|
||||
echo "</html>";
|
||||
echo "</html>";
|
||||
|
||||
@ -547,7 +547,7 @@ $now=dol_now();
|
||||
|
||||
llxHeader('',$langs->trans("Subscriptions"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
||||
|
||||
if ($rowid)
|
||||
if ($rowid > 0)
|
||||
{
|
||||
$res=$object->fetch($rowid);
|
||||
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
||||
@ -556,8 +556,6 @@ if ($rowid)
|
||||
|
||||
$head = member_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'subscription', $langs->trans("Member"), 0, 'user');
|
||||
|
||||
$rowspan=10;
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan++;
|
||||
if (! empty($conf->societe->enabled)) $rowspan++;
|
||||
@ -565,6 +563,9 @@ if ($rowid)
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="rowid" value="'.$object->id.'">';
|
||||
|
||||
dol_fiche_head($head, 'subscription', $langs->trans("Member"), 0, 'user');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
@ -696,10 +697,11 @@ if ($rowid)
|
||||
print '</td></tr>';
|
||||
|
||||
print "</table>\n";
|
||||
print '</form>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
dol_htmloutput_errors($errmsg,$errmsgs);
|
||||
|
||||
@ -1008,7 +1010,7 @@ if ($rowid)
|
||||
{
|
||||
$prodtmp=new Product($db);
|
||||
$prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
|
||||
print '. '.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS", $prodtmp->getNomUrl(0));
|
||||
print '. '.$langs->transnoentitiesnoconv("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS", $prodtmp->getNomUrl(1)); // must use noentitiesnoconv to avoid to encode html into getNomUrl of product
|
||||
}
|
||||
print '<br>';
|
||||
}
|
||||
@ -1033,7 +1035,7 @@ if ($rowid)
|
||||
{
|
||||
$prodtmp=new Product($db);
|
||||
$prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
|
||||
print '. '.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS", $prodtmp->getNomUrl(0));
|
||||
print '. '.$langs->transnoentitiesnoconv("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS", $prodtmp->getNomUrl(1)); // must use noentitiesnoconv to avoid to encode html into getNomUrl of product
|
||||
}
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
@ -32,7 +32,8 @@
|
||||
include '../master.inc.php';
|
||||
|
||||
$phone = GETPOST('phone');
|
||||
|
||||
$notfound = "Not found";
|
||||
$error = "Error"
|
||||
|
||||
// Security check
|
||||
if (empty($conf->clicktodial->enabled)) {
|
||||
@ -64,13 +65,15 @@ if ($resql)
|
||||
if ($obj)
|
||||
{
|
||||
$found = $obj->name;
|
||||
} else {
|
||||
$found = $notfound;
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db,'Error');
|
||||
$found = $error;
|
||||
}
|
||||
|
||||
echo $found;
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
@ -128,7 +128,7 @@ if ($object->id)
|
||||
// Description
|
||||
print '<tr><td width="20%" class="notopnoleft">';
|
||||
print $langs->trans("Description").'</td><td>';
|
||||
print nl2br($object->description);
|
||||
print dol_htmlentitiesbr($object->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
|
||||
@ -166,6 +166,7 @@ elseif ($type == 4) $title=$langs->trans("ContactCategoriesShort");
|
||||
else $title=$langs->trans("Category");
|
||||
|
||||
$head = categories_prepare_head($object,$type);
|
||||
|
||||
dol_fiche_head($head, 'card', $title, 0, 'category');
|
||||
|
||||
|
||||
@ -194,7 +195,7 @@ print '</td></tr>';
|
||||
// Description
|
||||
print '<tr><td width="20%" class="notopnoleft">';
|
||||
print $langs->trans("Description").'</td><td>';
|
||||
print nl2br($object->description);
|
||||
print dol_htmlentitiesbr($object->description);
|
||||
print '</td></tr>';
|
||||
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
@ -205,12 +206,13 @@ if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
/*
|
||||
* Boutons actions
|
||||
*/
|
||||
|
||||
print "<div class='tabsAction'>\n";
|
||||
|
||||
if ($user->rights->categorie->creer)
|
||||
|
||||
@ -313,13 +313,13 @@ if ($id > 0 || ! empty($ref))
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td>';
|
||||
print '<td colspan="3">'.$object->label.'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -144,7 +144,7 @@ print '<table class="border" width="100%">';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3">';
|
||||
if ($_GET["account"])
|
||||
{
|
||||
@ -172,7 +172,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td>';
|
||||
print '<td colspan="3">';
|
||||
if (! empty($id))
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
@ -266,24 +266,26 @@ if ($action == 'create')
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="clos" value="0">';
|
||||
|
||||
dol_fiche_head('');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td valign="top" class="fieldrequired" width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3"><input size="8" type="text" class="flat" name="ref" value="'.($_POST["ref"]?$_POST["ref"]:$account->ref).'" maxlength="12"></td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("LabelBankCashAccount").'</td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("LabelBankCashAccount").'</td>';
|
||||
print '<td colspan="3"><input size="30" type="text" class="flat" name="label" value="'.GETPOST("label").'"></td></tr>';
|
||||
|
||||
// Type
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountType").'</td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("AccountType").'</td>';
|
||||
print '<td colspan="3">';
|
||||
$formbank->select_type_comptes_financiers(isset($_POST["type"])?$_POST["type"]:1,"type");
|
||||
print '</td></tr>';
|
||||
|
||||
// Currency
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Currency").'</td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Currency").'</td>';
|
||||
print '<td colspan="3">';
|
||||
$selectedcode=$account->account_currency_code;
|
||||
if (! $selectedcode) $selectedcode=$conf->currency;
|
||||
@ -293,7 +295,7 @@ if ($action == 'create')
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Status").'</td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Status").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->selectarray("clos",array(0=>$account->status[0],1=>$account->status[1]),(isset($_POST["clos"])?$_POST["clos"]:$account->clos));
|
||||
print '</td></tr>';
|
||||
@ -307,7 +309,7 @@ if ($action == 'create')
|
||||
else if (empty($selectedcode)) $selectedcode=$mysoc->country_code;
|
||||
$account->country_code = getCountry($selectedcode, 2); // Force country code on account to have following field on bank fields matching country rules
|
||||
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("BankAccountCountry").'</td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("BankAccountCountry").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->select_country($selectedcode,'account_country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
@ -326,11 +328,11 @@ if ($action == 'create')
|
||||
print '</td></tr>';
|
||||
|
||||
// Web
|
||||
print '<tr><td valign="top">'.$langs->trans("Web").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Web").'</td>';
|
||||
print '<td colspan="3"><input size="50" type="text" class="flat" name="url" value="'.$_POST["url"].'"></td></tr>';
|
||||
|
||||
// Comment
|
||||
print '<tr><td valign="top">'.$langs->trans("Comment").'</td>';
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Comment").'</td>';
|
||||
print '<td colspan="3">';
|
||||
// Editor wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
@ -353,18 +355,18 @@ if ($action == 'create')
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Sold
|
||||
print '<tr><td valign="top" width="25%">'.$langs->trans("InitialBankBalance").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("InitialBankBalance").'</td>';
|
||||
print '<td colspan="3"><input size="12" type="text" class="flat" name="solde" value="'.(GETPOST("solde")?GETPOST("solde"):price2num($account->solde)).'"></td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("Date").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Date").'</td>';
|
||||
print '<td colspan="3">';
|
||||
$form->select_date('', 're', 0, 0, 0, 'formsoc');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
||||
print '<tr><td>'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
||||
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_allowed" value="'.($_POST["account_min_allowed"]?$_POST["account_min_allowed"]:$account->account_min_allowed).'"></td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalDesired").'</td>';
|
||||
print '<tr><td>'.$langs->trans("BalanceMinimalDesired").'</td>';
|
||||
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_desired" value="'.($_POST["account_min_desired"]?$_POST["account_min_desired"]:$account->account_min_desired).'"></td></tr>';
|
||||
|
||||
print '</table>';
|
||||
@ -375,7 +377,7 @@ if ($action == 'create')
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// If bank account
|
||||
print '<tr><td valign="top" width="25%">'.$langs->trans("BankName").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("BankName").'</td>';
|
||||
print '<td colspan="3"><input size="30" type="text" class="flat" name="bank" value="'.$account->bank.'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -452,16 +454,16 @@ if ($action == 'create')
|
||||
print '<tr><td>'.$langs->trans($bickey).'</td>';
|
||||
print '<td colspan="3"><input size="11" maxlength="11" type="text" class="flat" name="bic" value="'.$account->bic.'"></td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
|
||||
print "<textarea class=\"flat\" name=\"domiciliation\" rows=\"2\" cols=\"40\">";
|
||||
print $account->domiciliation;
|
||||
print "</textarea></td></tr>";
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BankAccountOwner").'</td>';
|
||||
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
|
||||
print '<td colspan="3"><input size="30" type="text" class="flat" name="proprio" value="'.$account->proprio.'">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
||||
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
||||
print "<textarea class=\"flat\" name=\"owner_address\" rows=\"2\" cols=\"40\">";
|
||||
print $account->owner_address;
|
||||
print "</textarea></td></tr>";
|
||||
@ -474,25 +476,27 @@ if ($action == 'create')
|
||||
// Accountancy code
|
||||
if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED))
|
||||
{
|
||||
print '<tr><td valign="top" class="fieldrequired" width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td colspan="3"><input type="text" name="account_number" value="'.(GETPOST("account_number")?GETPOST('account_number'):$account->account_number).'"></td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td valign="top" width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td colspan="3"><input type="text" name="account_number" value="'.(GETPOST("account_number")?GETPOST('account_number'):$account->account_number).'"></td></tr>';
|
||||
}
|
||||
|
||||
// Accountancy journal
|
||||
if (! empty($conf->accounting->enabled))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>';
|
||||
print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
|
||||
print '<td colspan="3"><input type="text" name="accountancy_journal" value="'.(GETPOST("accountancy_journal")?GETPOST('accountancy_journal'):$account->accountancy_journal).'"></td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><div class="center"><input value="'.$langs->trans("CreateAccount").'" type="submit" class="button"></div>';
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center"><input value="'.$langs->trans("CreateAccount").'" type="submit" class="button"></div>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
@ -538,21 +542,21 @@ else
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($account, 'ref', $linkback, 1, 'ref');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td>';
|
||||
print '<td colspan="3">'.$account->label.'</td></tr>';
|
||||
|
||||
// Type
|
||||
print '<tr><td valign="top">'.$langs->trans("AccountType").'</td>';
|
||||
print '<tr><td>'.$langs->trans("AccountType").'</td>';
|
||||
print '<td colspan="3">'.$account->type_lib[$account->type].'</td></tr>';
|
||||
|
||||
// Currency
|
||||
print '<tr><td valign="top">'.$langs->trans("Currency").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Currency").'</td>';
|
||||
print '<td colspan="3">';
|
||||
$selectedcode=$account->account_currency_code;
|
||||
if (! $selectedcode) $selectedcode=$conf->currency;
|
||||
@ -560,7 +564,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Status").'</td>';
|
||||
print '<td colspan="3">'.$account->getLibStatut(4).'</td></tr>';
|
||||
|
||||
// Country
|
||||
@ -579,7 +583,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Conciliate
|
||||
print '<tr><td valign="top">'.$langs->trans("Conciliable").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Conciliable").'</td>';
|
||||
print '<td colspan="3">';
|
||||
$conciliate=$account->canBeConciliated();
|
||||
if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')';
|
||||
@ -587,19 +591,19 @@ else
|
||||
else print ($account->rappro==1 ? $langs->trans("Yes") : ($langs->trans("No").' ('.$langs->trans("ConciliationDisabled").')'));
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
||||
print '<tr><td>'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
||||
print '<td colspan="3">'.$account->min_allowed.'</td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalDesired").'</td>';
|
||||
print '<tr><td>'.$langs->trans("BalanceMinimalDesired").'</td>';
|
||||
print '<td colspan="3">'.$account->min_desired.'</td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("Web").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Web").'</td><td colspan="3">';
|
||||
if ($account->url) print '<a href="'.$account->url.'" target="_gobank">';
|
||||
print $account->url;
|
||||
if ($account->url) print '</a>';
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("Comment").'</td>';
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Comment").'</td>';
|
||||
print '<td colspan="3">'.dol_htmlentitiesbr($account->comment).'</td></tr>';
|
||||
|
||||
// Other attributes
|
||||
@ -687,7 +691,7 @@ else
|
||||
if ($account->getCountryCode() == 'IN') $ibankey="IFSC";
|
||||
if ($account->getCountryCode() == 'IN') $bickey="SWIFT";
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans($ibankey).'</td>';
|
||||
print '<tr><td>'.$langs->trans($ibankey).'</td>';
|
||||
print '<td colspan="3">'.$account->iban.' ';
|
||||
if (! empty($account->iban)) {
|
||||
if (! checkIbanForAccount($account)) {
|
||||
@ -698,7 +702,7 @@ else
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans($bickey).'</td>';
|
||||
print '<tr><td>'.$langs->trans($bickey).'</td>';
|
||||
print '<td colspan="3">'.$account->bic.' ';
|
||||
if (! empty($account->bic)) {
|
||||
if (! checkSwiftForAccount($account)) {
|
||||
@ -709,15 +713,15 @@ else
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
|
||||
print nl2br($account->domiciliation);
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BankAccountOwner").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td><td colspan="3">';
|
||||
print $account->proprio;
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
||||
print nl2br($account->owner_address);
|
||||
print "</td></tr>\n";
|
||||
|
||||
@ -727,13 +731,13 @@ else
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
// Accountancy code
|
||||
print '<tr><td valign="top" width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td colspan="3">'.$account->account_number.'</td></tr>';
|
||||
|
||||
// Accountancy journal
|
||||
if (! empty($conf->accounting->enabled))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>';
|
||||
print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
|
||||
print '<td colspan="3">'.$account->accountancy_journal.'</td></tr>';
|
||||
}
|
||||
|
||||
@ -799,24 +803,26 @@ else
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="id" value="'.$_REQUEST["id"].'">'."\n\n";
|
||||
|
||||
dol_fiche_head('');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td valign="top" class="fieldrequired" width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3"><input size="8" type="text" class="flat" name="ref" value="'.(isset($_POST["ref"])?$_POST["ref"]:$account->ref).'"></td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Label").'</td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td>';
|
||||
print '<td colspan="3"><input size="30" type="text" class="flat" name="label" value="'.(isset($_POST["label"])?$_POST["label"]:$account->label).'"></td></tr>';
|
||||
|
||||
// Type
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountType").'</td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("AccountType").'</td>';
|
||||
print '<td colspan="3">';
|
||||
$formbank->select_type_comptes_financiers((isset($_POST["type"])?$_POST["type"]:$account->type),"type");
|
||||
print '</td></tr>';
|
||||
|
||||
// Currency
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Currency");
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Currency");
|
||||
print '<input type="hidden" value="'.$account->currency_code.'">';
|
||||
print '</td>';
|
||||
print '<td colspan="3">';
|
||||
@ -828,7 +834,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Status").'</td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Status").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->selectarray("clos",array(0=>$account->status[0],1=>$account->status[1]),(isset($_POST["clos"])?$_POST["clos"]:$account->clos));
|
||||
print '</td></tr>';
|
||||
@ -840,7 +846,7 @@ else
|
||||
else if (empty($selectedcode)) $selectedcode=$mysoc->country_code;
|
||||
$account->country_code = getCountry($selectedcode, 2); // Force country code on account to have following field on bank fields matching country rules
|
||||
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Country").'</td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Country").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->select_country($selectedcode,'account_country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
@ -859,7 +865,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Conciliable
|
||||
print '<tr><td valign="top">'.$langs->trans("Conciliable").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Conciliable").'</td>';
|
||||
print '<td colspan="3">';
|
||||
$conciliate=$account->canBeConciliated();
|
||||
if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')';
|
||||
@ -868,19 +874,19 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Balance
|
||||
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
||||
print '<tr><td>'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
||||
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_allowed" value="'.(isset($_POST["account_min_allowed"])?$_POST["account_min_allowed"]:$account->min_allowed).'"></td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalDesired").'</td>';
|
||||
print '<tr><td>'.$langs->trans("BalanceMinimalDesired").'</td>';
|
||||
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_desired" value="'.(isset($_POST["account_min_desired"])?$_POST["account_min_desired"]:$account->min_desired).'"></td></tr>';
|
||||
|
||||
// Web
|
||||
print '<tr><td valign="top">'.$langs->trans("Web").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Web").'</td>';
|
||||
print '<td colspan="3"><input size="50" type="text" class="flat" name="url" value="'.(isset($_POST["url"])?$_POST["url"]:$account->url).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Comment
|
||||
print '<tr><td valign="top">'.$langs->trans("Comment").'</td>';
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Comment").'</td>';
|
||||
print '<td colspan="3">';
|
||||
// Editor wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
@ -903,7 +909,7 @@ else
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// If bank account
|
||||
print '<tr><td valign="top" width="25%">'.$langs->trans("BankName").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("BankName").'</td>';
|
||||
print '<td colspan="3"><input size="30" type="text" class="flat" name="bank" value="'.$account->bank.'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -975,22 +981,22 @@ else
|
||||
if ($account->getCountryCode() == 'IN') $bickey="SWIFT";
|
||||
|
||||
// IBAN
|
||||
print '<tr><td valign="top">'.$langs->trans($ibankey).'</td>';
|
||||
print '<tr><td>'.$langs->trans($ibankey).'</td>';
|
||||
print '<td colspan="3"><input size="34" maxlength="34" type="text" class="flat" name="iban" value="'.$account->iban.'"></td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans($bickey).'</td>';
|
||||
print '<tr><td>'.$langs->trans($bickey).'</td>';
|
||||
print '<td colspan="3"><input size="11" maxlength="11" type="text" class="flat" name="bic" value="'.$account->bic.'"></td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
|
||||
print "<textarea class=\"flat\" name=\"domiciliation\" rows=\"2\" cols=\"40\">";
|
||||
print $account->domiciliation;
|
||||
print "</textarea></td></tr>";
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BankAccountOwner").'</td>';
|
||||
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
|
||||
print '<td colspan="3"><input size="30" type="text" class="flat" name="proprio" value="'.$account->proprio.'">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
||||
print "<textarea class=\"flat\" name=\"owner_address\" rows=\"2\" cols=\"40\">";
|
||||
print $account->owner_address;
|
||||
print "</textarea></td></tr>";
|
||||
@ -1004,25 +1010,27 @@ else
|
||||
// Accountancy code
|
||||
if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED))
|
||||
{
|
||||
print '<tr><td valign="top" class="fieldrequired" width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td colspan="3"><input type="text" name="account_number" value="'.(isset($_POST["account_number"])?$_POST["account_number"]:$account->account_number).'"></td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td valign="top" width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td colspan="3"><input type="text" name="account_number" value="'.(isset($_POST["account_number"])?$_POST["account_number"]:$account->account_number).'"></td></tr>';
|
||||
}
|
||||
|
||||
// Accountancy journal
|
||||
if (! empty($conf->accounting->enabled))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>';
|
||||
print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
|
||||
print '<td colspan="3"><input type="text" name="accountancy_journal" value="'.(isset($_POST["accountancy_journal"])?$_POST["accountancy_journal"]:$account->accountancy_journal).'"></td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><div class="center">';
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input value="'.$langs->trans("Modify").'" type="submit" class="button">';
|
||||
print ' ';
|
||||
print '<input name="cancel" value="'.$langs->trans("Cancel").'" type="submit" class="button">';
|
||||
|
||||
@ -441,7 +441,7 @@ else
|
||||
$datas = array();
|
||||
$datamin = array();
|
||||
$dataall = array();
|
||||
|
||||
|
||||
$subtotal = 0;
|
||||
|
||||
$day = $min;
|
||||
@ -483,7 +483,7 @@ else
|
||||
if ($acct->min_desired) array_push($graph_datas[$i],$datamin[$i]);
|
||||
if ($acct->min_allowed) array_push($graph_datas[$i],$dataall[$i]);
|
||||
}
|
||||
|
||||
|
||||
$px3 = new DolGraph();
|
||||
$px3->SetData($graph_datas);
|
||||
$arraylegends=array($langs->transnoentities("Balance"));
|
||||
@ -760,7 +760,7 @@ print '<table class="border" width="100%">';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3">';
|
||||
if ($account)
|
||||
{
|
||||
@ -799,7 +799,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td>';
|
||||
print '<td colspan="3">';
|
||||
if ($account && $_GET["option"]!='all')
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
@ -128,13 +128,13 @@ if (empty($num))
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td>';
|
||||
print '<td colspan="3">'.$acct->label.'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -98,13 +98,13 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td>';
|
||||
print '<td colspan="3">'.$acct->label.'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -798,19 +798,19 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Note Public
|
||||
print '<tr><td valign="top"><label for="note_public">'.$langs->trans("NotePublic").'</label></td><td colspan="3">';
|
||||
print '<tr><td class="tdtop"><label for="note_public">'.$langs->trans("NotePublic").'</label></td><td colspan="3">';
|
||||
$doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
|
||||
print $doleditor->Create(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Note Private
|
||||
print '<tr><td valign="top"><label for="note_private">'.$langs->trans("NotePrivate").'</label></td><td colspan="3">';
|
||||
print '<tr><td class="tdtop"><label for="note_private">'.$langs->trans("NotePrivate").'</label></td><td colspan="3">';
|
||||
$doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
|
||||
print $doleditor->Create(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Status").'</td>';
|
||||
print '<td>';
|
||||
print $object->getLibStatut(5);
|
||||
print '</td></tr>';
|
||||
@ -1025,16 +1025,16 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Note Public
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePublic").'</td><td colspan="3">';
|
||||
print '<tr><td class="tdtop">'.$langs->trans("NotePublic").'</td><td colspan="3">';
|
||||
print nl2br($object->note_public);
|
||||
print '</td></tr>';
|
||||
|
||||
// Note Private
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td><td colspan="3">';
|
||||
print '<tr><td class="tdtop">'.$langs->trans("NotePrivate").'</td><td colspan="3">';
|
||||
print nl2br($object->note_private);
|
||||
|
||||
// Statut
|
||||
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Status").'</td>';
|
||||
print '<td>';
|
||||
print $object->getLibStatut(5);
|
||||
print '</td>';
|
||||
|
||||
@ -437,7 +437,7 @@ if ($result)
|
||||
|
||||
print '</form>';
|
||||
|
||||
if ($num > $limit) print_barre_liste('', $page, $_SERVER["PHP_SELF"], '&begin='.$begin.'&view='.$view.'&userid='.$userid, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '');
|
||||
if ($num > $limit) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '');
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
|
||||
@ -25,15 +25,19 @@
|
||||
|
||||
// $action must be defined
|
||||
// $object must be defined (object is loaded in this file with fetch)
|
||||
// $cancel must be defined
|
||||
// $id or $ref must be defined (object is loaded in this file with fetch)
|
||||
|
||||
if ($id > 0 || ! empty($ref))
|
||||
if (($id > 0 || ! empty($ref)) && empty($cancel))
|
||||
{
|
||||
$ret = $object->fetch($id,$ref);
|
||||
if ($ret > 0) {
|
||||
if ($ret > 0)
|
||||
{
|
||||
$object->fetch_thirdparty();
|
||||
$id=$object->id;
|
||||
} else {
|
||||
$id = $object->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action='';
|
||||
}
|
||||
|
||||
@ -56,9 +56,6 @@ class Form
|
||||
var $cache_types_fees=array();
|
||||
var $cache_vatrates=array();
|
||||
|
||||
var $tva_taux_value;
|
||||
var $tva_taux_libelle;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -3842,10 +3839,10 @@ class Form
|
||||
/**
|
||||
* Output an HTML select vat rate
|
||||
*
|
||||
* @param string $htmlname Nom champ html
|
||||
* @param float $selectedrate Forcage du taux tva pre-selectionne. Mettre '' pour aucun forcage.
|
||||
* @param Societe $societe_vendeuse Objet societe vendeuse
|
||||
* @param Societe $societe_acheteuse Objet societe acheteuse
|
||||
* @param string $htmlname Name of html select field
|
||||
* @param float $selectedrate Force preselected vat rate. Use '' for no forcing.
|
||||
* @param Societe $societe_vendeuse Thirdparty seller
|
||||
* @param Societe $societe_acheteuse Thirdparty buyer
|
||||
* @param int $idprod Id product
|
||||
* @param int $info_bits Miscellaneous information on line (1 for NPR)
|
||||
* @param int $type ''=Unknown, 0=Product, 1=Service (Used if idprod not defined)
|
||||
@ -3863,9 +3860,6 @@ class Form
|
||||
global $langs,$conf,$mysoc;
|
||||
|
||||
$return='';
|
||||
$txtva=array();
|
||||
$libtva=array();
|
||||
$nprtva=array();
|
||||
|
||||
// Define defaultnpr and defaultttx
|
||||
$defaultnpr=($info_bits & 0x01);
|
||||
@ -3972,10 +3966,6 @@ class Form
|
||||
$return.= '>'.vatrate($rate['libtva']);
|
||||
$return.= $rate['nprtva'] ? ' *': '';
|
||||
$return.= '</option>';
|
||||
|
||||
$this->tva_taux_value[] = $rate['txtva'];
|
||||
$this->tva_taux_libelle[] = $rate['libtva'];
|
||||
$this->tva_taux_npr[] = $rate['nprtva'];
|
||||
}
|
||||
|
||||
if (! $options_only) $return.= '</select>';
|
||||
@ -4425,7 +4415,7 @@ class Form
|
||||
static function selectArrayAjax($url, $htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0)
|
||||
{
|
||||
$out = '';
|
||||
|
||||
|
||||
// Add code for jquery to use multiselect
|
||||
if ($addjscombo && empty($conf->dol_use_jmobile))
|
||||
{
|
||||
@ -4466,14 +4456,14 @@ class Form
|
||||
else
|
||||
{
|
||||
// TODO get values from ajax page to use a standard already completed array
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$out.=self::selectarray('.'.$htmlname, $array, $id, $show_empty, $key_in_label, $value_as_key, '', $translate, $maxlen, $disabled, $sort, '', 0);
|
||||
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show a multiselect form from an array.
|
||||
*
|
||||
@ -4568,7 +4558,7 @@ class Form
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Render list of categories linked to object with id $id and type $type
|
||||
*
|
||||
|
||||
@ -2804,7 +2804,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
||||
|
||||
print "\n";
|
||||
print "<!-- Begin title '".$titre."' -->\n";
|
||||
print '<table width="100%" border="0" class="notopnoleftnoright" style="margin-bottom: 2px;"><tr>';
|
||||
print '<table width="100%" border="0" class="notopnoleftnoright" style="margin-bottom: 6px;"><tr>';
|
||||
|
||||
// Left
|
||||
if ($picto && $titre) print '<td class="nobordernopadding hideonsmartphone" width="40" align="left" valign="middle">'.img_picto('', $picto, '', $pictoisfullpath).'</td>';
|
||||
@ -2824,43 +2824,44 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
||||
$pagelist = '';
|
||||
if ($page > 0 || $num > $conf->liste_limit)
|
||||
{
|
||||
if ($totalnboflines)
|
||||
if ($totalnboflines) // If we know total nb of lines
|
||||
{
|
||||
$maxnbofpage=10;
|
||||
|
||||
$nbpages=ceil($totalnboflines/$conf->liste_limit);
|
||||
$cpt=($page-$maxnbofpage);
|
||||
if ($cpt < 0) { $cpt=0; }
|
||||
$pagelist.=$langs->trans('Page');
|
||||
|
||||
if ($cpt>=1)
|
||||
{
|
||||
$pagelist.=' <a href="'.$file.'?page=0'.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">1</a>';
|
||||
if ($cpt >= 2) $pagelist.=' ...';
|
||||
$pagelist.= '<li><a href="'.$file.'?page=0'.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">1</a></li>'."\n";
|
||||
if ($cpt >= 2) $pagelist.='<li><span>...</span></li>';
|
||||
}
|
||||
do
|
||||
{
|
||||
if ($cpt==$page)
|
||||
{
|
||||
$pagelist.= ' <u>'.($page+1).'</u>';
|
||||
$pagelist.= '<li><span class="active">'.($page+1).'</span></li>'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$pagelist.= ' <a href="'.$file.'?page='.$cpt.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.($cpt+1).'</a>';
|
||||
$pagelist.= '<li><a href="'.$file.'?page='.$cpt.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.($cpt+1).'</a></li>'."\n";
|
||||
}
|
||||
$cpt++;
|
||||
}
|
||||
while ($cpt < $nbpages && $cpt<=$page+$maxnbofpage);
|
||||
if ($cpt<$nbpages)
|
||||
{
|
||||
if ($cpt<$nbpages-1) $pagelist.= ' ...';
|
||||
$pagelist.= ' <a href="'.$file.'?page='.($nbpages-1).$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.$nbpages.'</a>';
|
||||
if ($cpt<$nbpages-1) $pagelist.= '<li><span>...</span></li>';
|
||||
$pagelist.= '<li><a href="'.$file.'?page='.($nbpages-1).$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.$nbpages.'</a></li>'."\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$pagelist.= $langs->trans('Page').' '.($page+1);
|
||||
$pagelist.= '<li><span class="active">'.($page+1)."</li>\n";
|
||||
}
|
||||
}
|
||||
print "\n";
|
||||
print_fleche_navigation($page,$file,$options,$nextpage,$pagelist);
|
||||
if ($morehtml) print $morehtml;
|
||||
print '</td>';
|
||||
@ -2870,12 +2871,12 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
||||
}
|
||||
|
||||
/**
|
||||
* Fonction servant a afficher les fleches de navigation dans les pages de listes
|
||||
* Function to show navigation arrows into lists
|
||||
*
|
||||
* @param int $page Number of page
|
||||
* @param string $file Lien
|
||||
* @param string $options Autres parametres d'url a propager dans les liens ("" par defaut)
|
||||
* @param integer $nextpage Do we show a next page button
|
||||
* @param string $file Page
|
||||
* @param string $options Other url paramaters to propagate ("" by default)
|
||||
* @param integer $nextpage Do we show a next page button
|
||||
* @param string $betweenarrows HTML Content to show between arrows
|
||||
* @return void
|
||||
*/
|
||||
@ -2883,17 +2884,20 @@ function print_fleche_navigation($page,$file,$options='',$nextpage=0,$betweenarr
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
print '<div class="pagination"><ul>';
|
||||
if ($page > 0)
|
||||
{
|
||||
if (empty($conf->dol_use_jmobile)) print '<a href="'.$file.'?page='.($page-1).$options.'">'.img_previous($langs->trans("Previous")).'</a>';
|
||||
else print '<a data-role="button" data-icon="arrow-l" data-iconpos="left" href="'.$file.'?page='.($page-1).$options.'">'.$langs->trans("Previous").'</a>';
|
||||
if (empty($conf->dol_use_jmobile)) print '<li><a class="paginationprevious" href="'.$file.'?page='.($page-1).$options.'"><</a></li>'."\n";
|
||||
else print '<li><a data-role="button" data-icon="arrow-l" data-iconpos="left" href="'.$file.'?page='.($page-1).$options.'">'.$langs->trans("Previous").'</a></li>'."\n";
|
||||
}
|
||||
if ($betweenarrows) print ($page > 0?' ':'').$betweenarrows.($nextpage>0?' ':'');
|
||||
//if ($betweenarrows) print ($page > 0?' ':'').$betweenarrows.($nextpage>0?' ':'');
|
||||
print $betweenarrows;
|
||||
if ($nextpage > 0)
|
||||
{
|
||||
if (empty($conf->dol_use_jmobile)) print '<a href="'.$file.'?page='.($page+1).$options.'">'.img_next($langs->trans("Next")).'</a>';
|
||||
else print '<a data-role="button" data-icon="arrow-r" data-iconpos="right" href="'.$file.'?page='.($page+1).$options.'">'.$langs->trans("Next").'</a>';
|
||||
if (empty($conf->dol_use_jmobile)) print '<li><a class="paginationnext" href="'.$file.'?page='.($page+1).$options.'">></a></li>'."\n";
|
||||
else print '<li><a data-role="button" data-icon="arrow-r" data-iconpos="right" href="'.$file.'?page='.($page+1).$options.'">'.$langs->trans("Next").'</a></li>'."\n";
|
||||
}
|
||||
print '</ul></div>'."\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
61
htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
Executable file → Normal file
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -23,16 +24,16 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/expensereport/modules_expensereport.php';
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php');
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Classe permettant de generer les factures au modele Crabe
|
||||
* Class to generate expense report based on standard model
|
||||
*/
|
||||
class pdf_standard extends ModeleExpenseReport
|
||||
{
|
||||
@ -252,7 +253,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$tab_height = 110;
|
||||
$tab_height_newpage = 110;
|
||||
|
||||
// Affiche notes
|
||||
// Show notes
|
||||
$notetoshow=empty($object->note_public)?'':$object->note_public;
|
||||
if (! empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE))
|
||||
{
|
||||
@ -308,7 +309,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
|
||||
$showpricebeforepagebreak=1;
|
||||
|
||||
// Piece comptable
|
||||
// Accountancy piece
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->writeHTMLCell($this->posxcomment-$this->posxpiece-1, 3, $this->posxpiece-1, $curY, $piece_comptable, 0, 1);
|
||||
|
||||
@ -334,17 +335,18 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$pdf->SetXY($this->posxtype, $curY);
|
||||
$pdf->MultiCell($this->posxprojet-$this->posxtype-1, 3,$outputlangs->transnoentities($object->lines[$i]->type_fees_code), 0, 'C');
|
||||
|
||||
// Projet
|
||||
// Project
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetXY($this->posxprojet, $curY);
|
||||
$pdf->MultiCell($this->posxtva-$this->posxprojet-1, 3,$object->lines[$i]->projet_ref, 0, 'C');
|
||||
|
||||
// VAT Rate
|
||||
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails);
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetXY($this->posxtva, $curY);
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva-1, 3,vatrate($object->lines[$i]->tva_taux,true), 0, 'R');
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva-1, 3,$vat_rate, 0, 'R');
|
||||
|
||||
// UP
|
||||
// Unit price
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetXY($this->posxup, $curY);
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-1, 3,price($object->lines[$i]->value_unit), 0, 'R');
|
||||
@ -354,7 +356,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$pdf->SetXY($this->posxqty, $curY);
|
||||
$pdf->MultiCell($this->postotalttc-$this->posxqty, 3,$object->lines[$i]->qty, 0, 'C');
|
||||
|
||||
// TotalTTC
|
||||
// Total with all taxes
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetXY($this->postotalttc-2, $curY);
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalttc, 3, price($object->lines[$i]->total_ttc), 0, 'R');
|
||||
@ -439,6 +441,13 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - 160, 5, price($object->total_ht), 1, 'R');
|
||||
$pdf->SetFillColor(248,248,248);
|
||||
|
||||
$posy+=5;
|
||||
$pdf->SetXY(100, $posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell(60, 5, $outputlangs->transnoentities("TotalVAT"), 1,'L');
|
||||
$pdf->SetXY(160, $posy);
|
||||
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - 160, 5, price($object->total_tva),1, 'R');
|
||||
|
||||
$posy+=5;
|
||||
$pdf->SetXY(100, $posy);
|
||||
$pdf->SetFont('','B', 10);
|
||||
@ -507,7 +516,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);
|
||||
*/
|
||||
|
||||
// Filligrane brouillon
|
||||
// Draft watermark
|
||||
if ($object->fk_statut==1 && ! empty($conf->global->EXPENSEREPORT_FREE_TEXT))
|
||||
{
|
||||
pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->EXPENSEREPORT_FREE_TEXT);
|
||||
@ -551,25 +560,25 @@ class pdf_standard extends ModeleExpenseReport
|
||||
|
||||
$pdf->SetFont('','', $default_font_size -1);
|
||||
|
||||
// Réf complète
|
||||
// Ref complete
|
||||
$posy+=8;
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $outputlangs->transnoentities("Ref")." : " . $object->ref, '', 'L');
|
||||
|
||||
// Date début période
|
||||
// Date start period
|
||||
$posy+=5;
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $outputlangs->transnoentities("DateStart")." : " . ($object->date_debut>0?dol_print_date($object->date_debut,"day",false,$outpulangs):''), '', 'L');
|
||||
|
||||
// Date fin période
|
||||
// Date end period
|
||||
$posy+=5;
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $outputlangs->transnoentities("DateEnd")." : " . ($object->date_fin>0?dol_print_date($object->date_fin,"day",false,$outpulangs):''), '', 'L');
|
||||
|
||||
// Statut NDF
|
||||
// Status Expense Report
|
||||
$posy+=6;
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetFont('','B',18);
|
||||
@ -581,7 +590,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->zip).' '.$outputlangs->convToOutputCharset($this->emetteur->town);
|
||||
$carac_emetteur .= "\n";
|
||||
// Tel
|
||||
// Phone
|
||||
if ($this->emetteur->phone) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone")." : ".$outputlangs->convToOutputCharset($this->emetteur->phone);
|
||||
// Fax
|
||||
if ($this->emetteur->fax) $carac_emetteur .= ($carac_emetteur ? ($this->emetteur->tel ? " - " : "\n") : '' ).$outputlangs->transnoentities("Fax")." : ".$outputlangs->convToOutputCharset($this->emetteur->fax);
|
||||
@ -734,46 +743,46 @@ class pdf_standard extends ModeleExpenseReport
|
||||
|
||||
$pdf->SetFont('','',8);
|
||||
|
||||
//Piece comptable
|
||||
// Accountancy piece
|
||||
$pdf->SetXY($this->posxpiece-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxdesc-$this->posxpiece-1,1,'','','R');
|
||||
|
||||
//Comments
|
||||
// Comments
|
||||
$pdf->line($this->posxdesc-1, $tab_top, $this->posxdesc-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxdate-$this->posxdesc-1,1,$outputlangs->transnoentities("Description"),'','L');
|
||||
|
||||
//Date
|
||||
// Date
|
||||
$pdf->line($this->posxdate-1, $tab_top, $this->posxdate-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY($this->posxdate-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxtype-$this->posxdate-1,2, $outputlangs->transnoentities("Date"),'','C');
|
||||
|
||||
//Type
|
||||
// Type
|
||||
$pdf->line($this->posxtype-1, $tab_top, $this->posxtype-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY($this->posxtype-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxprojet-$this->posxtype-1,2, $outputlangs->transnoentities("Type"),'','C');
|
||||
|
||||
// Projet
|
||||
// Project
|
||||
$pdf->line($this->posxprojet-1, $tab_top, $this->posxprojet-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY($this->posxprojet-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxtva-$this->posxprojet-1,2, $outputlangs->transnoentities("Project"),'','C');
|
||||
|
||||
//TVA
|
||||
// VAT
|
||||
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY($this->posxtva-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C');
|
||||
|
||||
//PU
|
||||
// Unit price
|
||||
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY($this->posxup-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-1,2, $outputlangs->transnoentities("UP"),'','C');
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-1,2, $outputlangs->transnoentities("PriceU"),'','C');
|
||||
|
||||
//QTY
|
||||
// Quantity
|
||||
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY($this->posxqty-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->postotalttc-$this->posxqty,2, $outputlangs->transnoentities("Qty"),'','R');
|
||||
|
||||
//TOTALTTC
|
||||
// Total with all taxes
|
||||
$pdf->line($this->postotalttc, $tab_top, $this->postotalttc, $tab_top + $tab_height);
|
||||
$pdf->SetXY($this->postotalttc-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalttc, 2, $outputlangs->transnoentities("TotalTTC"),'','R');
|
||||
|
||||
0
htdocs/core/modules/expensereport/modules_expensereport.php
Executable file → Normal file
0
htdocs/core/modules/modExpenseReport.class.php
Executable file → Normal file
0
htdocs/expensereport/ajax/ajaxprojet.php
Executable file → Normal file
73
htdocs/expensereport/card.php
Executable file → Normal file
@ -828,9 +828,8 @@ if ($action == "addline")
|
||||
|
||||
$object_ligne->fk_c_type_fees = GETPOST('fk_c_type_fees');
|
||||
|
||||
$vatrate=GETPOST('vatrate');
|
||||
$object_ligne->fk_c_tva = $vatrate;
|
||||
$object_ligne->vatrate = $vatrate;
|
||||
$object_ligne->fk_c_tva = GETPOST('fk_c_tva');
|
||||
$object_ligne->vatrate = price2num(GETPOST('vatrate'));
|
||||
|
||||
$object_ligne->fk_projet = $fk_projet;
|
||||
|
||||
@ -878,8 +877,8 @@ if ($action == "addline")
|
||||
$type = 0; // TODO What if service
|
||||
$tmp = calcul_price_total($qty, $up, 0, $vatrate, 0, 0, 0, 'TTC', 0, $type);
|
||||
|
||||
$object_ligne->vatrate = price2num(GETPOST('vatrate'));
|
||||
$object_ligne->total_ttc = $tmp[2];
|
||||
$object_ligne->tva_taux = GETPOST('vatrate');
|
||||
$object_ligne->total_ht = $tmp[0];
|
||||
$object_ligne->total_tva = $tmp[1];
|
||||
|
||||
@ -906,11 +905,11 @@ if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes")
|
||||
$object->fetch($id);
|
||||
|
||||
$object_ligne = new ExpenseReportLine($db);
|
||||
$object_ligne->fetch($_GET["rowid"]);
|
||||
$object_ligne->fetch(GETPOST("rowid"));
|
||||
$total_ht = $object_ligne->total_ht;
|
||||
$total_tva = $object_ligne->total_tva;
|
||||
|
||||
$result=$object->deleteline($_GET["rowid"]);
|
||||
$result=$object->deleteline(GETPOST("rowid"));
|
||||
if ($result >= 0)
|
||||
{
|
||||
if ($result > 0)
|
||||
@ -950,12 +949,13 @@ if ($action == "updateligne" )
|
||||
|
||||
$rowid = $_POST['rowid'];
|
||||
$type_fees_id = GETPOST('fk_c_type_fees');
|
||||
$c_tva=GETPOST('vatrate');
|
||||
$object_ligne->fk_c_tva = $c_tva;
|
||||
$object_ligne->fk_c_tva = GETPOST('fk_c_tva');
|
||||
$object_ligne->vatrate = price2num(GETPOST('vatrate'));
|
||||
$projet_id = $fk_projet;
|
||||
$comments = GETPOST('comments');
|
||||
$qty = GETPOST('qty');
|
||||
$value_unit = GETPOST('value_unit');
|
||||
$vatrate = GETPOST('vatrate');
|
||||
|
||||
if (! GETPOST('fk_c_type_fees') > 0)
|
||||
{
|
||||
@ -972,7 +972,7 @@ if ($action == "updateligne" )
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$result = $object->updateline($rowid, $type_fees_id, $projet_id, $c_tva, $comments, $qty, $value_unit, $date, $object_id);
|
||||
$result = $object->updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty, $value_unit, $date, $id);
|
||||
if ($result >= 0)
|
||||
{
|
||||
if ($result > 0)
|
||||
@ -995,8 +995,9 @@ if ($action == "updateligne" )
|
||||
}
|
||||
}
|
||||
|
||||
$object->recalculer($object_id);
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object_id);
|
||||
$result = $object->recalculer($id);
|
||||
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -1008,9 +1009,9 @@ if ($action == "updateligne" )
|
||||
|
||||
|
||||
/*
|
||||
* Generer ou regenerer le document PDF
|
||||
* Generate or regenerate the PDF document
|
||||
*/
|
||||
if ($action == 'builddoc') // En get ou en post
|
||||
if ($action == 'builddoc') // GET or POST
|
||||
{
|
||||
$depl = new ExpenseReport($db, 0, $_GET['id']);
|
||||
$depl->fetch($id);
|
||||
@ -1370,7 +1371,7 @@ else
|
||||
|
||||
if ($action == 'delete_line')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id."&rowid=".$_GET['rowid'],$langs->trans("DeleteLine"),$langs->trans("ConfirmDeleteLine"),"confirm_delete_line",'','yes',1);
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id."&rowid=".GETPOST('rowid'),$langs->trans("DeleteLine"),$langs->trans("ConfirmDeleteLine"),"confirm_delete_line",'','yes',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
@ -1528,7 +1529,7 @@ else
|
||||
|
||||
// Fetch Lines of current expense report
|
||||
$sql = 'SELECT fde.rowid, fde.fk_expensereport, fde.fk_c_type_fees, fde.fk_projet, fde.date,';
|
||||
$sql.= ' fde.fk_c_tva as vatrate, fde.comments, fde.qty, fde.value_unit, fde.total_ht, fde.total_tva, fde.total_ttc,';
|
||||
$sql.= ' fde.fk_c_tva as fk_c_tva, fde.tva_tx as vatrate, fde.comments, fde.qty, fde.value_unit, fde.total_ht, fde.total_tva, fde.total_ttc,';
|
||||
$sql.= ' ctf.code as type_fees_code, ctf.label as type_fees_libelle,';
|
||||
$sql.= ' pjt.rowid as projet_id, pjt.title as projet_title, pjt.ref as projet_ref';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'expensereport_det as fde';
|
||||
@ -1636,10 +1637,10 @@ else
|
||||
|
||||
// Select project
|
||||
print '<td>';
|
||||
$formproject->select_projects(-1, $objp->fk_projet,'fk_projet', 0, 0, 0, 1);
|
||||
$formproject->select_projects(-1, $objp->fk_projet,'fk_projet', 0, 0, 1, 1);
|
||||
print '</td>';
|
||||
|
||||
// Sélect type
|
||||
// Select type
|
||||
print '<td style="text-align:center;">';
|
||||
select_type_fees_id($objp->type_fees_code,'fk_c_type_fees');
|
||||
print '</td>';
|
||||
@ -1649,17 +1650,17 @@ else
|
||||
print '<textarea class="flat_ndf" name="comments" class="centpercent">'.$objp->comments.'</textarea>';
|
||||
print '</td>';
|
||||
|
||||
// Sélection TVA
|
||||
// VAT
|
||||
print '<td style="text-align:right;">';
|
||||
print $form->load_tva('fk_c_tva', (isset($_POST["fk_c_tva"])?$_POST["fk_c_tva"]:$objp->tva_taux), $mysoc, '');
|
||||
print $form->load_tva('vatrate', (isset($_POST["vatrate"])?$_POST["vatrate"]:$objp->vatrate), $mysoc, '');
|
||||
print '</td>';
|
||||
|
||||
// Prix unitaire
|
||||
// Unit price
|
||||
print '<td style="text-align:right;">';
|
||||
print '<input type="text" size="6" name="value_unit" value="'.$objp->value_unit.'" />';
|
||||
print '</td>';
|
||||
|
||||
// Quantité
|
||||
// Quantity
|
||||
print '<td style="text-align:right;">';
|
||||
print '<input type="text" size="4" name="qty" value="'.$objp->qty.'" />';
|
||||
print '</td>';
|
||||
@ -1712,7 +1713,7 @@ else
|
||||
print '<td style="text-align:center;"></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr>';
|
||||
print '<tr '.$bc[true].'>';
|
||||
|
||||
// Select date
|
||||
print '<td style="text-align:center;">';
|
||||
@ -1744,7 +1745,7 @@ else
|
||||
print '</select>';
|
||||
print '</td>';
|
||||
|
||||
// Prix unitaire
|
||||
// Unit price
|
||||
print '<td style="text-align:right;">';
|
||||
print '<input type="text" size="6" name="value_unit" value="'.GETPOST('value_unit').'">';
|
||||
print '</td>';
|
||||
@ -1805,7 +1806,7 @@ if ($action != 'create' && $action != 'edit')
|
||||
{
|
||||
if ($object->fk_user_author == $user->id)
|
||||
{
|
||||
// Modifier
|
||||
// Modify
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$id.'">'.$langs->trans('Modify').'</a>';
|
||||
|
||||
// Validate
|
||||
@ -1816,7 +1817,7 @@ if ($action != 'create' && $action != 'edit')
|
||||
|
||||
if ($user->rights->expensereport->supprimer)
|
||||
{
|
||||
// Supprimer
|
||||
// Delete
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&id='.$id.'">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
}
|
||||
@ -1831,7 +1832,7 @@ if ($action != 'create' && $action != 'edit')
|
||||
{
|
||||
if ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid)
|
||||
{
|
||||
// Modifier
|
||||
// Modify
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$id.'">'.$langs->trans('Modify').'</a>';
|
||||
|
||||
// Brouillonner (le statut refusée est identique à brouillon)
|
||||
@ -1841,7 +1842,7 @@ if ($action != 'create' && $action != 'edit')
|
||||
|
||||
if ($user->rights->expensereport->supprimer)
|
||||
{
|
||||
// Supprimer
|
||||
// Delete
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&id='.$id.'">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
}
|
||||
@ -1874,9 +1875,9 @@ if ($action != 'create' && $action != 'edit')
|
||||
{
|
||||
//if($object->fk_user_validator==$user->id)
|
||||
//{
|
||||
// Valider
|
||||
// Validate
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=validate&id='.$id.'">'.$langs->trans('Approve').'</a>';
|
||||
// Refuser
|
||||
// Deny
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=refuse&id='.$id.'">'.$langs->trans('Deny').'</a>';
|
||||
//}
|
||||
|
||||
@ -1888,7 +1889,7 @@ if ($action != 'create' && $action != 'edit')
|
||||
|
||||
if($user->rights->expensereport->supprimer)
|
||||
{
|
||||
// Supprimer
|
||||
// Delete
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&id='.$id.'">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
}
|
||||
@ -1899,7 +1900,7 @@ if ($action != 'create' && $action != 'edit')
|
||||
*/
|
||||
if ($user->rights->expensereport->to_paid && $object->fk_statut == 5)
|
||||
{
|
||||
// Payer
|
||||
// Pay
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=paid&id='.$id.'">'.$langs->trans('TO_PAID').'</a>';
|
||||
|
||||
// Cancel
|
||||
@ -1910,7 +1911,7 @@ if ($action != 'create' && $action != 'edit')
|
||||
|
||||
if($user->rights->expensereport->supprimer)
|
||||
{
|
||||
// Supprimer
|
||||
// Delete
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&id='.$id.'">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
}
|
||||
@ -1922,11 +1923,11 @@ if ($action != 'create' && $action != 'edit')
|
||||
*/
|
||||
if ($user->rights->expensereport->approve && $user->rights->expensereport->to_paid && $object->fk_statut==6)
|
||||
{
|
||||
// Annuler
|
||||
// Cancel
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=cancel&id='.$id.'">'.$langs->trans('Cancel').'</a>';
|
||||
if($user->rights->expensereport->supprimer)
|
||||
{
|
||||
// Supprimer
|
||||
// Delete
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&id='.$id.'">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
}
|
||||
@ -1944,7 +1945,7 @@ if ($action != 'create' && $action != 'edit')
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=brouillonner&id='.$id.'">'.$langs->trans('ReOpen').'</a>';
|
||||
}
|
||||
|
||||
// Supprimer
|
||||
// Delete
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&id='.$id.'">'.$langs->trans('Delete').'</a>';
|
||||
|
||||
}
|
||||
@ -1959,7 +1960,7 @@ print '</div>';
|
||||
print '<div style="width:50%">';
|
||||
|
||||
/*
|
||||
* Documents generes
|
||||
* Generate documents
|
||||
*/
|
||||
if($user->rights->expensereport->export && $object->fk_statut>0 && $action != 'edit')
|
||||
{
|
||||
|
||||
138
htdocs/expensereport/class/expensereport.class.php
Executable file → Normal file
@ -282,7 +282,7 @@ class ExpenseReport extends CommonObject
|
||||
*/
|
||||
function fetch($id, $ref='')
|
||||
{
|
||||
global $conf,$db;
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT d.rowid, d.ref, d.note_public, d.note_private,"; // DEFAULT
|
||||
$sql.= " d.detail_refuse, d.detail_cancel, d.fk_user_refuse, d.fk_user_cancel,"; // ACTIONS
|
||||
@ -298,10 +298,10 @@ class ExpenseReport extends CommonObject
|
||||
$sql.= $restrict;
|
||||
|
||||
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
|
||||
$result = $db->query($sql) ;
|
||||
if ($result)
|
||||
$resql = $this->db->query($sql) ;
|
||||
if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
if ($obj)
|
||||
{
|
||||
$this->id = $obj->rowid;
|
||||
@ -367,7 +367,7 @@ class ExpenseReport extends CommonObject
|
||||
|
||||
$result=$this->fetch_lines();
|
||||
|
||||
return 1;
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -376,7 +376,7 @@ class ExpenseReport extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$db->lasterror();
|
||||
$this->error=$this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -539,8 +539,7 @@ class ExpenseReport extends CommonObject
|
||||
$line->total_tva=20;
|
||||
$line->total_ttc=120;
|
||||
$line->qty=1;
|
||||
$line->fk_c_tva=20;
|
||||
$line->tva_taux=20;
|
||||
$line->vatrate=20;
|
||||
$line->value_unit=120;
|
||||
$line->fk_expensereport=0;
|
||||
$line->type_fees_code='TRA';
|
||||
@ -664,6 +663,7 @@ class ExpenseReport extends CommonObject
|
||||
|
||||
/**
|
||||
* recalculer
|
||||
* TODO Replace this with call to update_price if not already done
|
||||
*
|
||||
* @param int $id Id of expense report
|
||||
* @return int <0 if KO, >0 if OK
|
||||
@ -724,7 +724,7 @@ class ExpenseReport extends CommonObject
|
||||
$this->lines=array();
|
||||
|
||||
$sql = ' SELECT de.rowid, de.comments, de.qty, de.value_unit, de.date,';
|
||||
$sql.= ' de.'.$this->fk_element.', de.fk_c_type_fees, de.fk_projet, de.fk_c_tva,';
|
||||
$sql.= ' de.'.$this->fk_element.', de.fk_c_type_fees, de.fk_projet, de.fk_c_tva, de.tva_tx as vatrate,';
|
||||
$sql.= ' de.total_ht, de.total_tva, de.total_ttc,';
|
||||
$sql.= ' ctf.code as code_type_fees, ctf.label as libelle_type_fees,';
|
||||
$sql.= ' p.ref as ref_projet, p.title as title_projet';
|
||||
@ -734,14 +734,15 @@ class ExpenseReport extends CommonObject
|
||||
$sql.= ' WHERE de.'.$this->fk_element.' = '.$this->id;
|
||||
|
||||
dol_syslog('ExpenseReport::fetch_lines sql='.$sql, LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $this->db->num_rows($result);
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $this->db->fetch_object($result);
|
||||
$objp = $this->db->fetch_object($resql);
|
||||
|
||||
$deplig = new ExpenseReportLine($this->db);
|
||||
|
||||
$deplig->rowid = $objp->rowid;
|
||||
@ -761,7 +762,7 @@ class ExpenseReport extends CommonObject
|
||||
|
||||
$deplig->type_fees_code = $objp->code_type_fees;
|
||||
$deplig->type_fees_libelle = $objp->libelle_type_fees;
|
||||
$deplig->tva_taux = $objp->taux_tva;
|
||||
$deplig->vatrate = $objp->vatrate;
|
||||
$deplig->projet_ref = $objp->ref_projet;
|
||||
$deplig->projet_title = $objp->title_projet;
|
||||
|
||||
@ -770,13 +771,13 @@ class ExpenseReport extends CommonObject
|
||||
|
||||
$i++;
|
||||
}
|
||||
$this->db->free($result);
|
||||
$this->db->free($resql);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog('ExpenseReport::fetch_lines: Error '.$this->error,LOG_ERR);
|
||||
dol_syslog('ExpenseReport::fetch_lines: Error '.$this->error, LOG_ERR);
|
||||
return -3;
|
||||
}
|
||||
}
|
||||
@ -1199,30 +1200,36 @@ class ExpenseReport extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
|
||||
function updateline($rowid, $type_fees_id, $projet_id, $c_tva, $comments, $qty, $value_unit, $date, $expensereport_id)
|
||||
/**
|
||||
* updateline
|
||||
*
|
||||
* @param int $rowid Line to edit
|
||||
* @param int $type_fees_id Type payment
|
||||
* @param int $projet_id Project id
|
||||
* @param double $vatrate Vat rate
|
||||
* @param string $comments Description
|
||||
* @param real $qty Qty
|
||||
* @param double $value_unit Value init
|
||||
* @param int $date Date
|
||||
* @param int $expensereport_id Expense report id
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty, $value_unit, $date, $expensereport_id)
|
||||
{
|
||||
global $user;
|
||||
|
||||
if ($this->fk_statut==0 || $this->fk_statut==99)
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
// Select du taux de tva par rapport au code
|
||||
$sql = "SELECT t.taux as taux_tva";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_tva as t";
|
||||
$sql.= " WHERE t.rowid = ".$c_tva;
|
||||
$result = $this->db->query($sql);
|
||||
$objp_tva = $this->db->fetch_object($result);
|
||||
|
||||
// calcul de tous les totaux de la ligne
|
||||
$total_ttc = $qty*$value_unit;
|
||||
$total_ttc = number_format($total_ttc,2,'.','');
|
||||
$total_ttc = price2num($qty*$value_unit, 'MT');
|
||||
|
||||
$tx_tva = $objp_tva->taux_tva/100;
|
||||
$tx_tva = $vatrate / 100;
|
||||
$tx_tva = $tx_tva + 1;
|
||||
$total_ht = $total_ttc/$tx_tva;
|
||||
$total_ht = number_format($total_ht,2,'.','');
|
||||
$total_ht = price2num($total_ttc/$tx_tva, 'MT');
|
||||
|
||||
$total_tva = $total_ttc - $total_ht;
|
||||
$total_tva = price2num($total_ttc - $total_ht, 'MT');
|
||||
// fin calculs
|
||||
|
||||
$ligne = new ExpenseReportLine($this->db);
|
||||
@ -1231,15 +1238,14 @@ class ExpenseReport extends CommonObject
|
||||
$ligne->value_unit = $value_unit;
|
||||
$ligne->date = $date;
|
||||
|
||||
$ligne->fk_expensereport = $expensereport_id;
|
||||
$ligne->fk_expensereport= $expensereport_id;
|
||||
$ligne->fk_c_type_fees = $type_fees_id;
|
||||
$ligne->fk_projet = $projet_id;
|
||||
$ligne->fk_c_tva = $c_tva;
|
||||
|
||||
$ligne->total_ht = $total_ht;
|
||||
$ligne->total_tva = $total_tva;
|
||||
$ligne->total_ttc = $total_ttc;
|
||||
$ligne->tva_taux = $objp_tva->taux_tva;
|
||||
$ligne->vatrate = price2num($vatrate);
|
||||
$ligne->rowid = $rowid;
|
||||
|
||||
// Select des infos sur le type fees
|
||||
@ -1260,16 +1266,19 @@ class ExpenseReport extends CommonObject
|
||||
$ligne->projet_ref = $objp_projet->ref_projet;
|
||||
$ligne->projet_title = $objp_projet->title_projet;
|
||||
|
||||
$result = $ligne->update();
|
||||
if ($result > 0):
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
else:
|
||||
$this->error=$ligne->error;
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
endif;
|
||||
|
||||
$result = $ligne->update($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$ligne->error;
|
||||
$this->errors=$ligne->errors;
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1487,8 +1496,7 @@ class ExpenseReportLine
|
||||
var $projet_ref;
|
||||
var $projet_title;
|
||||
|
||||
var $tva_taux;
|
||||
|
||||
var $vatrate;
|
||||
var $total_ht;
|
||||
var $total_tva;
|
||||
var $total_ttc;
|
||||
@ -1512,7 +1520,7 @@ class ExpenseReportLine
|
||||
function fetch($rowid)
|
||||
{
|
||||
$sql = 'SELECT fde.rowid, fde.fk_expensereport, fde.fk_c_type_fees, fde.fk_projet, fde.date,';
|
||||
$sql.= ' fde.fk_c_tva as tva_taux, fde.comments, fde.qty, fde.value_unit, fde.total_ht, fde.total_tva, fde.total_ttc,';
|
||||
$sql.= ' fde.fk_c_tva as fk_c_tva, fde.tva_tx as vatrate, fde.comments, fde.qty, fde.value_unit, fde.total_ht, fde.total_tva, fde.total_ttc,';
|
||||
$sql.= ' ctf.code as type_fees_code, ctf.label as type_fees_libelle,';
|
||||
$sql.= ' pjt.rowid as projet_id, pjt.title as projet_title, pjt.ref as projet_ref';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'expensereport_det as fde';
|
||||
@ -1539,7 +1547,7 @@ class ExpenseReportLine
|
||||
$this->type_fees_libelle = $objp->type_fees_libelle;
|
||||
$this->projet_ref = $objp->projet_ref;
|
||||
$this->projet_title = $objp->projet_title;
|
||||
$this->tva_taux = $objp->tva_taux;
|
||||
$this->vatrate = $objp->vatrate;
|
||||
$this->total_ht = $objp->total_ht;
|
||||
$this->total_tva = $objp->total_tva;
|
||||
$this->total_ttc = $objp->total_ttc;
|
||||
@ -1568,15 +1576,17 @@ class ExpenseReportLine
|
||||
$this->comments=trim($this->comments);
|
||||
if (!$this->value_unit_HT) $this->value_unit_HT=0;
|
||||
$this->qty = price2num($this->qty);
|
||||
$this->vatrate = price2num($this->vatrate);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'expensereport_det';
|
||||
$sql.= ' (fk_expensereport, fk_c_type_fees, fk_projet,';
|
||||
$sql.= ' fk_c_tva, comments, qty, value_unit, total_ht, total_tva, total_ttc, date)';
|
||||
$sql.= ' fk_c_tva, tva_tx, comments, qty, value_unit, total_ht, total_tva, total_ttc, date)';
|
||||
$sql.= " VALUES (".$this->fk_expensereport.",";
|
||||
$sql.= " ".$this->fk_c_type_fees.",";
|
||||
$sql.= " ".($this->fk_projet>0?$this->fk_projet:'null').",";
|
||||
$sql.= " ".($this->fk_c_tva?$this->fk_c_tva:"null").",";
|
||||
$sql.= " ".$this->vatrate.",";
|
||||
$sql.= " '".$this->db->escape($this->comments)."',";
|
||||
$sql.= " ".$this->qty.",";
|
||||
@ -1633,6 +1643,7 @@ class ExpenseReportLine
|
||||
|
||||
// Clean parameters
|
||||
$this->comments=trim($this->comments);
|
||||
$this->vatrate = price2num($this->vatrate);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@ -1641,14 +1652,11 @@ class ExpenseReportLine
|
||||
$sql.= " comments='".$this->db->escape($this->comments)."'";
|
||||
$sql.= ",value_unit=".$this->value_unit."";
|
||||
$sql.= ",qty=".$this->qty."";
|
||||
if ($this->date) {
|
||||
$sql.= ",date='".$this->date."'";
|
||||
}
|
||||
else { $sql.=',date=null';
|
||||
}
|
||||
$sql.= ",date='".$this->db->idate($this->date)."'";
|
||||
$sql.= ",total_ht=".$this->total_ht."";
|
||||
$sql.= ",total_tva=".$this->total_tva."";
|
||||
$sql.= ",total_ttc=".$this->total_ttc."";
|
||||
$sql.= ",tva_tx=".$this->vatrate;
|
||||
if ($this->fk_c_type_fees) $sql.= ",fk_c_type_fees=".$this->fk_c_type_fees;
|
||||
else $sql.= ",fk_c_type_fees=null";
|
||||
if ($this->fk_projet) $sql.= ",fk_projet=".$this->fk_projet;
|
||||
@ -1662,16 +1670,30 @@ class ExpenseReportLine
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$tmpparent=new ExpenseReport($db);
|
||||
$tmpparent->fetch($this->fk_expensereport);
|
||||
$result = $tmpparent->update_price();
|
||||
if ($result < 0)
|
||||
$tmpparent=new ExpenseReport($this->db);
|
||||
$result = $tmpparent->fetch($this->fk_expensereport);
|
||||
if ($result > 0)
|
||||
{
|
||||
$result = $tmpparent->update_price();
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
$this->error = $tmpparent->error;
|
||||
$this->errors = $tmpparent->errors;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
$this->error = $tmpparent->error;
|
||||
$this->errors = $tmpparent->errors;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
0
htdocs/expensereport/export_csv.php
Executable file → Normal file
8
htdocs/expensereport/list.php
Executable file → Normal file
@ -177,7 +177,7 @@ if ($resql)
|
||||
if ($search_amount_ht) $param.="&search_amount_ht=".$search_amount_ht;
|
||||
if ($search_amount_ttc) $param.="&search_amount_ttc=".$search_amount_ttc;
|
||||
if ($search_status >= 0) $param.="&search_status=".$search_status;
|
||||
|
||||
|
||||
print_barre_liste($langs->trans("ListTripsAndExpenses"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
|
||||
print '<table class="noborder" width="100%">';
|
||||
@ -221,9 +221,9 @@ if ($resql)
|
||||
|
||||
// Amount with no taxe
|
||||
print '<td class="liste_titre" align="right"><input class="flat" type="text" size="6" name="search_amount_ht" value="'.$search_amount_ht.'"></td>';
|
||||
|
||||
|
||||
print '<td class="liste_titre"> </td>';
|
||||
|
||||
|
||||
// Amount with all taxes
|
||||
print '<td class="liste_titre" align="right"><input class="flat" type="text" size="6" name="search_amount_ttc" value="'.$search_amount_ttc.'"></td>';
|
||||
|
||||
@ -288,7 +288,7 @@ if ($resql)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="9">'.$langs->trans("NoRecordFound").'</td>';
|
||||
print '<tr '.$bc[false].'>'.'<td colspan="9">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
|
||||
0
htdocs/expensereport/stats/index.php
Executable file → Normal file
0
htdocs/expensereport/synchro_compta.php
Executable file → Normal file
0
htdocs/fourn/class/fournisseur.product.class.php
Executable file → Normal file
@ -7,7 +7,8 @@
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* Copyright (C) 2015 Abbes Bahfir <bafbes@gmail.com>
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
|
||||
@ -88,8 +88,8 @@ foreach($cp->logs as $logs_CP)
|
||||
print '<td>'.$user_action->getNomUrl(1).'</td>';
|
||||
print '<td>'.$user_update->getNomUrl(1).'</td>';
|
||||
print '<td>'.$logs_CP['type_action'].'</td>';
|
||||
print '<td style="text-align: right;">'.$logs_CP['prev_solde'].' '.$langs->trans('days').'</td>';
|
||||
print '<td style="text-align: right;">'.$logs_CP['new_solde'].' '.$langs->trans('days').'</td>';
|
||||
print '<td style="text-align: right;">'.price2num($logs_CP['prev_solde'],8).' '.$langs->trans('days').'</td>';
|
||||
print '<td style="text-align: right;">'.price2num($logs_CP['new_solde'],8).' '.$langs->trans('days').'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
}
|
||||
|
||||
0
htdocs/includes/restler/iCache.php
Executable file → Normal file
@ -244,8 +244,8 @@ CREATE TABLE llx_expensereport_det
|
||||
rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
fk_expensereport integer NOT NULL,
|
||||
fk_c_type_fees integer NOT NULL,
|
||||
fk_projet integer NOT NULL,
|
||||
fk_c_tva integer NOT NULL,
|
||||
fk_projet integer,
|
||||
fk_c_tva integer,
|
||||
comments text NOT NULL,
|
||||
product_type integer DEFAULT -1,
|
||||
qty real NOT NULL,
|
||||
@ -268,6 +268,9 @@ CREATE TABLE llx_expensereport_det
|
||||
import_key varchar(14)
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_expensereport_det MODIFY COLUMN fk_projet integer NULL;
|
||||
ALTER TABLE llx_expensereport_det MODIFY COLUMN fk_c_tva integer NULL;
|
||||
|
||||
|
||||
ALTER TABLE llx_projet ADD COLUMN budget_amount double(24,8);
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ CREATE TABLE llx_expensereport_det
|
||||
qty real NOT NULL,
|
||||
value_unit real NOT NULL,
|
||||
remise_percent real,
|
||||
tva_tx double(6,3), -- Vat rat
|
||||
tva_tx double(6,3), -- Vat rate
|
||||
localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate
|
||||
localtax1_type varchar(10) NULL, -- localtax1 type
|
||||
localtax2_tx double(6,3) DEFAULT 0, -- localtax2 rate
|
||||
|
||||
@ -1292,7 +1292,7 @@ function migrate_price_facture($db,$langs,$conf)
|
||||
print '<b>'.$langs->trans('MigrationInvoice')."</b><br>\n";
|
||||
|
||||
// Liste des lignes facture non a jour
|
||||
$sql = "SELECT fd.rowid, fd.qty, fd.subprice, fd.remise_percent, fd.tva_tx as tva_taux, fd.total_ttc, fd.info_bits,";
|
||||
$sql = "SELECT fd.rowid, fd.qty, fd.subprice, fd.remise_percent, fd.tva_tx as vatrate, fd.total_ttc, fd.info_bits,";
|
||||
$sql.= " f.rowid as facid, f.remise_percent as remise_percent_global, f.total_ttc as total_ttc_f";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facturedet as fd, ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " WHERE fd.fk_facture = f.rowid";
|
||||
@ -1314,7 +1314,7 @@ function migrate_price_facture($db,$langs,$conf)
|
||||
$rowid = $obj->rowid;
|
||||
$qty = $obj->qty;
|
||||
$pu = $obj->subprice;
|
||||
$txtva = $obj->tva_taux;
|
||||
$vatrate = $obj->vatrate;
|
||||
$remise_percent = $obj->remise_percent;
|
||||
$remise_percent_global = $obj->remise_percent_global;
|
||||
$total_ttc_f = $obj->total_ttc_f;
|
||||
@ -1324,7 +1324,7 @@ function migrate_price_facture($db,$langs,$conf)
|
||||
$facligne= new FactureLigne($db);
|
||||
$facligne->fetch($rowid);
|
||||
|
||||
$result=calcul_price_total($qty,$pu,$remise_percent,$txtva, 0, 0,$remise_percent_global,'HT',$info_bits,0);
|
||||
$result=calcul_price_total($qty,$pu,$remise_percent,$vatrate, 0, 0,$remise_percent_global,'HT',$info_bits,0);
|
||||
$total_ht = $result[0];
|
||||
$total_tva = $result[1];
|
||||
$total_ttc = $result[2];
|
||||
@ -1333,7 +1333,7 @@ function migrate_price_facture($db,$langs,$conf)
|
||||
$facligne->total_tva = $total_tva;
|
||||
$facligne->total_ttc = $total_ttc;
|
||||
|
||||
dolibarr_install_syslog("upgrade2: Line $rowid: facid=$obj->facid pu=$pu qty=$qty tva_taux=$txtva remise_percent=$remise_percent remise_global=$remise_percent_global -> $total_ht, $total_tva, $total_ttc");
|
||||
dolibarr_install_syslog("upgrade2: Line $rowid: facid=$obj->facid pu=$pu qty=$qty vatrate=$vatrate remise_percent=$remise_percent remise_global=$remise_percent_global -> $total_ht, $total_tva, $total_ttc");
|
||||
print ". ";
|
||||
$facligne->update_total();
|
||||
|
||||
@ -1406,7 +1406,7 @@ function migrate_price_propal($db,$langs,$conf)
|
||||
print '<b>'.$langs->trans('MigrationProposal')."</b><br>\n";
|
||||
|
||||
// Liste des lignes propal non a jour
|
||||
$sql = "SELECT pd.rowid, pd.qty, pd.subprice, pd.remise_percent, pd.tva_tx as tva_taux, pd.info_bits,";
|
||||
$sql = "SELECT pd.rowid, pd.qty, pd.subprice, pd.remise_percent, pd.tva_tx as vatrate, pd.info_bits,";
|
||||
$sql.= " p.rowid as propalid, p.remise_percent as remise_percent_global";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."propaldet as pd, ".MAIN_DB_PREFIX."propal as p";
|
||||
$sql.= " WHERE pd.fk_propal = p.rowid";
|
||||
@ -1427,7 +1427,7 @@ function migrate_price_propal($db,$langs,$conf)
|
||||
$rowid = $obj->rowid;
|
||||
$qty = $obj->qty;
|
||||
$pu = $obj->subprice;
|
||||
$txtva = $obj->tva_taux;
|
||||
$vatrate = $obj->vatrate;
|
||||
$remise_percent = $obj->remise_percent;
|
||||
$remise_percent_global = $obj->remise_percent_global;
|
||||
$info_bits = $obj->info_bits;
|
||||
@ -1436,7 +1436,7 @@ function migrate_price_propal($db,$langs,$conf)
|
||||
$propalligne= new PropaleLigne($db);
|
||||
$propalligne->fetch($rowid);
|
||||
|
||||
$result=calcul_price_total($qty,$pu,$remise_percent,$txtva,0,0,$remise_percent_global,'HT',$info_bits,0);
|
||||
$result=calcul_price_total($qty,$pu,$remise_percent,$vatrate,0,0,$remise_percent_global,'HT',$info_bits,0);
|
||||
$total_ht = $result[0];
|
||||
$total_tva = $result[1];
|
||||
$total_ttc = $result[2];
|
||||
@ -1445,7 +1445,7 @@ function migrate_price_propal($db,$langs,$conf)
|
||||
$propalligne->total_tva = $total_tva;
|
||||
$propalligne->total_ttc = $total_ttc;
|
||||
|
||||
dolibarr_install_syslog("upgrade2: Line $rowid: propalid=$obj->rowid pu=$pu qty=$qty tva_taux=$txtva remise_percent=$remise_percent remise_global=$remise_percent_global -> $total_ht, $total_tva, $total_ttc");
|
||||
dolibarr_install_syslog("upgrade2: Line $rowid: propalid=$obj->rowid pu=$pu qty=$qty vatrate=$vatrate remise_percent=$remise_percent remise_global=$remise_percent_global -> $total_ht, $total_tva, $total_ttc");
|
||||
print ". ";
|
||||
$propalligne->update_total();
|
||||
|
||||
@ -1515,7 +1515,7 @@ function migrate_price_contrat($db,$langs,$conf)
|
||||
print '<b>'.$langs->trans('MigrationContract')."</b><br>\n";
|
||||
|
||||
// Liste des lignes contrat non a jour
|
||||
$sql = "SELECT cd.rowid, cd.qty, cd.subprice, cd.remise_percent, cd.tva_tx as tva_taux, cd.info_bits,";
|
||||
$sql = "SELECT cd.rowid, cd.qty, cd.subprice, cd.remise_percent, cd.tva_tx as vatrate, cd.info_bits,";
|
||||
$sql.= " c.rowid as contratid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."contratdet as cd, ".MAIN_DB_PREFIX."contrat as c";
|
||||
$sql.= " WHERE cd.fk_contrat = c.rowid";
|
||||
@ -1536,7 +1536,7 @@ function migrate_price_contrat($db,$langs,$conf)
|
||||
$rowid = $obj->rowid;
|
||||
$qty = $obj->qty;
|
||||
$pu = $obj->subprice;
|
||||
$txtva = $obj->tva_taux;
|
||||
$vatrate = $obj->vatrate;
|
||||
$remise_percent = $obj->remise_percent;
|
||||
$info_bits = $obj->info_bits;
|
||||
|
||||
@ -1545,7 +1545,7 @@ function migrate_price_contrat($db,$langs,$conf)
|
||||
//$contratligne->fetch($rowid); Non requis car le update_total ne met a jour que chp redefinis
|
||||
$contratligne->id=$rowid;
|
||||
|
||||
$result=calcul_price_total($qty,$pu,$remise_percent,$txtva,0,0,0,'HT',$info_bits,0,$tmpmysoc);
|
||||
$result=calcul_price_total($qty,$pu,$remise_percent,$vatrate,0,0,0,'HT',$info_bits,0,$tmpmysoc);
|
||||
$total_ht = $result[0];
|
||||
$total_tva = $result[1];
|
||||
$total_ttc = $result[2];
|
||||
@ -1554,7 +1554,7 @@ function migrate_price_contrat($db,$langs,$conf)
|
||||
$contratligne->total_tva = $total_tva;
|
||||
$contratligne->total_ttc = $total_ttc;
|
||||
|
||||
dolibarr_install_syslog("upgrade2: Line $rowid: contratdetid=$obj->rowid pu=$pu qty=$qty tva_taux=$txtva remise_percent=$remise_percent -> $total_ht, $total_tva, $total_ttc");
|
||||
dolibarr_install_syslog("upgrade2: Line $rowid: contratdetid=$obj->rowid pu=$pu qty=$qty vatrate=$vatrate remise_percent=$remise_percent -> $total_ht, $total_tva, $total_ttc");
|
||||
print ". ";
|
||||
$contratligne->update_total();
|
||||
|
||||
@ -1600,7 +1600,7 @@ function migrate_price_commande($db,$langs,$conf)
|
||||
print '<b>'.$langs->trans('MigrationOrder')."</b><br>\n";
|
||||
|
||||
// Liste des lignes commande non a jour
|
||||
$sql = "SELECT cd.rowid, cd.qty, cd.subprice, cd.remise_percent, cd.tva_tx as tva_taux, cd.info_bits,";
|
||||
$sql = "SELECT cd.rowid, cd.qty, cd.subprice, cd.remise_percent, cd.tva_tx as vatrate, cd.info_bits,";
|
||||
$sql.= " c.rowid as commandeid, c.remise_percent as remise_percent_global";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commandedet as cd, ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql.= " WHERE cd.fk_commande = c.rowid";
|
||||
@ -1621,7 +1621,7 @@ function migrate_price_commande($db,$langs,$conf)
|
||||
$rowid = $obj->rowid;
|
||||
$qty = $obj->qty;
|
||||
$pu = $obj->subprice;
|
||||
$txtva = $obj->tva_taux;
|
||||
$vatrate = $obj->vatrate;
|
||||
$remise_percent = $obj->remise_percent;
|
||||
$remise_percent_global = $obj->remise_percent_global;
|
||||
$info_bits = $obj->info_bits;
|
||||
@ -1630,7 +1630,7 @@ function migrate_price_commande($db,$langs,$conf)
|
||||
$commandeligne= new OrderLine($db);
|
||||
$commandeligne->fetch($rowid);
|
||||
|
||||
$result=calcul_price_total($qty,$pu,$remise_percent,$txtva,0,0,$remise_percent_global,'HT',$info_bits,0);
|
||||
$result=calcul_price_total($qty,$pu,$remise_percent,$vatrate,0,0,$remise_percent_global,'HT',$info_bits,0);
|
||||
$total_ht = $result[0];
|
||||
$total_tva = $result[1];
|
||||
$total_ttc = $result[2];
|
||||
@ -1639,7 +1639,7 @@ function migrate_price_commande($db,$langs,$conf)
|
||||
$commandeligne->total_tva = $total_tva;
|
||||
$commandeligne->total_ttc = $total_ttc;
|
||||
|
||||
dolibarr_install_syslog("upgrade2: Line $rowid: commandeid=$obj->rowid pu=$pu qty=$qty tva_taux=$txtva remise_percent=$remise_percent remise_global=$remise_percent_global -> $total_ht, $total_tva, $total_ttc");
|
||||
dolibarr_install_syslog("upgrade2: Line $rowid: commandeid=$obj->rowid pu=$pu qty=$qty vatrate=$vatrate remise_percent=$remise_percent remise_global=$remise_percent_global -> $total_ht, $total_tva, $total_ttc");
|
||||
print ". ";
|
||||
$commandeligne->update_total();
|
||||
|
||||
@ -1714,7 +1714,7 @@ function migrate_price_commande_fournisseur($db,$langs,$conf)
|
||||
print '<b>'.$langs->trans('MigrationSupplierOrder')."</b><br>\n";
|
||||
|
||||
// Liste des lignes commande non a jour
|
||||
$sql = "SELECT cd.rowid, cd.qty, cd.subprice, cd.remise_percent, cd.tva_tx as tva_taux, cd.info_bits,";
|
||||
$sql = "SELECT cd.rowid, cd.qty, cd.subprice, cd.remise_percent, cd.tva_tx as vatrate, cd.info_bits,";
|
||||
$sql.= " c.rowid as commandeid, c.remise_percent as remise_percent_global";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as cd, ".MAIN_DB_PREFIX."commande_fournisseur as c";
|
||||
$sql.= " WHERE cd.fk_commande = c.rowid";
|
||||
@ -1735,7 +1735,7 @@ function migrate_price_commande_fournisseur($db,$langs,$conf)
|
||||
$rowid = $obj->rowid;
|
||||
$qty = $obj->qty;
|
||||
$pu = $obj->subprice;
|
||||
$txtva = $obj->tva_taux;
|
||||
$vatrate = $obj->vatrate;
|
||||
$remise_percent = $obj->remise_percent;
|
||||
$remise_percent_global = $obj->remise_percent_global;
|
||||
$info_bits = $obj->info_bits;
|
||||
@ -1744,7 +1744,7 @@ function migrate_price_commande_fournisseur($db,$langs,$conf)
|
||||
$commandeligne= new CommandeFournisseurLigne($db);
|
||||
$commandeligne->fetch($rowid);
|
||||
|
||||
$result=calcul_price_total($qty,$pu,$remise_percent,$txtva,0,0,$remise_percent_global,'HT',$info_bits,0);
|
||||
$result=calcul_price_total($qty,$pu,$remise_percent,$vatrate,0,0,$remise_percent_global,'HT',$info_bits,0);
|
||||
$total_ht = $result[0];
|
||||
$total_tva = $result[1];
|
||||
$total_ttc = $result[2];
|
||||
@ -1753,7 +1753,7 @@ function migrate_price_commande_fournisseur($db,$langs,$conf)
|
||||
$commandeligne->total_tva = $total_tva;
|
||||
$commandeligne->total_ttc = $total_ttc;
|
||||
|
||||
dolibarr_install_syslog("upgrade2: Line $rowid: commandeid=$obj->rowid pu=$pu qty=$qty tva_taux=$txtva remise_percent=$remise_percent remise_global=$remise_percent_global -> $total_ht, $total_tva, $total_ttc");
|
||||
dolibarr_install_syslog("upgrade2: Line $rowid: commandeid=$obj->rowid pu=$pu qty=$qty vatrate=$vatrate remise_percent=$remise_percent remise_global=$remise_percent_global -> $total_ht, $total_tva, $total_ttc");
|
||||
print ". ";
|
||||
$commandeligne->update_total();
|
||||
|
||||
|
||||
@ -22,9 +22,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* \class FormProduct
|
||||
* \brief Class with static methods for building HTML components related to products
|
||||
* \remarks Only common components must be here.
|
||||
* Class with static methods for building HTML components related to products
|
||||
* Only components common to products and services must be here.
|
||||
*/
|
||||
class FormProduct
|
||||
{
|
||||
@ -34,9 +33,6 @@ class FormProduct
|
||||
// Cache arrays
|
||||
var $cache_warehouses=array();
|
||||
|
||||
var $tva_taux_value;
|
||||
var $tva_taux_libelle;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -109,7 +105,7 @@ class FormProduct
|
||||
* @param int $empty 1=Can be empty, 0 if not
|
||||
* @param int $disabled 1=Select is disabled
|
||||
* @param int $fk_product Add quantity of stock in label for product with id fk_product. Nothing if 0.
|
||||
* @param string $empty_label Empty label if needed (only if $empty=1)
|
||||
* @param string $empty_label Empty label if needed (only if $empty=1)
|
||||
* @return string HTML select
|
||||
*/
|
||||
function selectWarehouses($selected='',$htmlname='idwarehouse',$filtertype='',$empty=0,$disabled=0,$fk_product=0,$empty_label='')
|
||||
@ -120,7 +116,7 @@ class FormProduct
|
||||
|
||||
$this->loadWarehouses($fk_product);
|
||||
$nbofwarehouses=count($this->cache_warehouses);
|
||||
|
||||
|
||||
$out='<select class="flat"'.($disabled?' disabled':'').' id="'.$htmlname.'" name="'.($htmlname.($disabled?'_disabled':'')).'">';
|
||||
if ($empty) $out.='<option value="-1">'.($empty_label?$empty_label:' ').'</option>';
|
||||
foreach($this->cache_warehouses as $id => $arraytypes)
|
||||
|
||||
0
htdocs/product/class/product.class.php
Executable file → Normal file
@ -679,7 +679,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Description
|
||||
print '<td valign="top">'.$langs->trans("Description").'</td><td>';
|
||||
print '<td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
print nl2br($object->description);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -609,7 +609,7 @@ $langs->load("bills");
|
||||
$langs->load("orders");
|
||||
$langs->load("proposals");
|
||||
$langs->load("margins");
|
||||
print_fiche_titre($langs->trans("Profit"),'');
|
||||
print_fiche_titre($langs->trans("Profit"),'','title_accountancy');
|
||||
print '<table class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="left" width="200">'.$langs->trans("Element").'</td>';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -38,6 +38,7 @@ $action = GETPOST('action', 'alpha');
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$backtopage=GETPOST('backtopage','alpha');
|
||||
$cancel=GETPOST('cancel');
|
||||
|
||||
$mode = GETPOST('mode', 'alpha');
|
||||
$mine = ($mode == 'mine' ? 1 : 0);
|
||||
@ -48,7 +49,7 @@ $taskstatic = new Task($db);
|
||||
$extrafields_project = new ExtraFields($db);
|
||||
$extrafields_task = new ExtraFields($db);
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not includ_once
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
|
||||
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
@ -85,7 +86,7 @@ if ($action == 'createtask' && $user->rights->projet->creer)
|
||||
$date_start = dol_mktime($_POST['dateohour'],$_POST['dateomin'],0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear'],'user');
|
||||
$date_end = dol_mktime($_POST['dateehour'],$_POST['dateemin'],0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear'],'user');
|
||||
|
||||
if (empty($_POST["cancel"]))
|
||||
if (! $cancel)
|
||||
{
|
||||
if (empty($label))
|
||||
{
|
||||
@ -271,10 +272,11 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="createtask">';
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
|
||||
if (! empty($object->id)) print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
if (! empty($mode)) print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
|
||||
dol_fiche_head('');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$defaultref='';
|
||||
@ -342,7 +344,9 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<div align="center"><br>';
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div align="center">';
|
||||
print '<input type="submit" class="button" name="add" value="'.$langs->trans("Add").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
|
||||
|
Before Width: | Height: | Size: 608 B After Width: | Height: | Size: 168 B |
|
Before Width: | Height: | Size: 270 B After Width: | Height: | Size: 167 B |
|
Before Width: | Height: | Size: 432 B After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 436 B After Width: | Height: | Size: 356 B |
@ -119,7 +119,8 @@ if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED))
|
||||
$conf->global->THEME_ELDY_VERMENU_BACK1='255,255,255'; // vmenu
|
||||
$conf->global->THEME_ELDY_VERMENU_BACK1b='230,232,232'; // vmenu (not menu)
|
||||
$conf->global->THEME_ELDY_VERMENU_BACK2='240,240,240';
|
||||
$conf->global->THEME_ELDY_BACKTITLE1='140,160,185'; // title of arrays
|
||||
$conf->global->THEME_ELDY_BACKTITLE1='140,160,185'; // title of arrays TO MATCH ELDY
|
||||
//$conf->global->THEME_ELDY_BACKTITLE1='240,240,240'; // title of arrays TO MATCH BOOTSTRAP
|
||||
$conf->global->THEME_ELDY_BACKTITLE2='230,230,230';
|
||||
$conf->global->THEME_ELDY_BACKTABCARD1='255,255,255';
|
||||
$conf->global->THEME_ELDY_BACKTABCARD2='210,210,210'; // card
|
||||
@ -438,6 +439,9 @@ textarea.centpercent {
|
||||
{
|
||||
border-right: 1px solid #DDD;
|
||||
}
|
||||
#formuserfile {
|
||||
margin-top: 4px;
|
||||
}
|
||||
#formuserfile_link {
|
||||
margin-left: 1px;
|
||||
}
|
||||
@ -557,23 +561,27 @@ margin : 0px auto;
|
||||
<?php
|
||||
$minwidthtmenu=66;
|
||||
$heightmenu=46; /* height of top menu, part with image */
|
||||
$heightmenu2=46; /* height of top menu, ârt with login */
|
||||
$heightmenu2=48; /* height of top menu, part with login */
|
||||
?>
|
||||
|
||||
div#id-top {
|
||||
height: <?php print ($heightmenu2); ?>px;
|
||||
background: rgb(<?php echo $colorbackhmenu1 ?>);
|
||||
|
||||
background-image: linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
background-image: -o-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
background-image: -moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
background-image: -ms-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
background-image: -webkit-gradient( linear, left top, left bottom, color-stop(0, rgba(255,255,255,.3)), color-stop(1, rgba(0,0,0,.3)) );
|
||||
}
|
||||
|
||||
div#tmenu_tooltip {
|
||||
<?php if (GETPOST("optioncss") == 'print') { ?>
|
||||
display:none;
|
||||
<?php } else { ?>
|
||||
height: <?php print ($heightmenu2+1); ?>px;
|
||||
padding-<?php echo $right; ?>: 100px;
|
||||
background: <?php echo $colorbackvmenu; ?>;
|
||||
box-shadow: 0 0 6px rgba(0, 0, 0, .4) !important;
|
||||
background-image: linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
|
||||
background-image: -o-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
|
||||
background-image: -moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
|
||||
background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
|
||||
background-image: -ms-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
|
||||
background-image: -webkit-gradient( linear, left top, left bottom, color-stop(0, rgba(255,255,255,.3)), color-stop(1, rgba(128,128,128,.3)) );
|
||||
<?php } ?>
|
||||
}
|
||||
|
||||
@ -630,7 +638,7 @@ ul.tmenu { /* t r b l */
|
||||
padding: 0px 0px 0px 0px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
list-style: none;
|
||||
box-shadow: 0 0 6px rgba(0, 0, 0, .4) !important;
|
||||
/* box-shadow: 0 0 6px rgba(0, 0, 0, .4) !important; */
|
||||
}
|
||||
ul.tmenu li {
|
||||
background: rgb(<?php echo $colorbackhmenu1 ?>);
|
||||
@ -922,6 +930,9 @@ div.login_block {
|
||||
display: none;
|
||||
<?php } ?>
|
||||
}
|
||||
div.login_block a {
|
||||
color: #fff;
|
||||
}
|
||||
div.login_block table {
|
||||
display: inline;
|
||||
}
|
||||
@ -1548,7 +1559,7 @@ span.butAction, span.butActionDelete {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Preapre for bootstrap look
|
||||
/* Prepare for bootstrap look
|
||||
.butAction, .butActionDelete, .butActionRefused {
|
||||
border-color: #c5c5c5;
|
||||
border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
|
||||
@ -1680,8 +1691,15 @@ table.border, table.dataTable, .table-border, .table-border-col, .table-key-bord
|
||||
.border tbody tr, .border tbody tr td {
|
||||
height: 20px;
|
||||
}
|
||||
div.tabBar table.border tr {
|
||||
height: 20px;
|
||||
div.tabBar table.border tr, div.tabBar table.border tr td, div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar div.border .table-val-border-col {
|
||||
height: 24px;
|
||||
}
|
||||
div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar .table-val-border-col {
|
||||
vertical-align: middle;
|
||||
}
|
||||
div.tabBar .tdtop {
|
||||
vertical-align: top;
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
table.border td, div.border div div.tagtd {
|
||||
@ -1713,6 +1731,10 @@ table.noborder, table.formdoc, div.noborder {
|
||||
border-collapse: separate !important;
|
||||
border-spacing: 0px;
|
||||
|
||||
border-top-width: 1px;
|
||||
border-top-color: #CCC;
|
||||
border-top-style: solid;
|
||||
|
||||
border-right-width: 1px;
|
||||
border-right-color: #CCC;
|
||||
border-right-style: solid;
|
||||
@ -1781,6 +1803,10 @@ table.liste {
|
||||
border-collapse: collapse;
|
||||
border-top-color: #FEFEFE;
|
||||
|
||||
border-top-width: 1px;
|
||||
border-top-color: #CCC;
|
||||
border-top-style: solid;
|
||||
|
||||
border-right-width: 1px;
|
||||
border-right-color: #CCC;
|
||||
border-right-style: solid;
|
||||
@ -1810,6 +1836,85 @@ table.liste td {
|
||||
.tagtd, .table-border-col, .table-key-border-col, .table-val-border-col { display: table-cell; }
|
||||
|
||||
|
||||
/* Pagination */
|
||||
|
||||
div.pagination a {
|
||||
font-weight: normal;
|
||||
}
|
||||
div.pagination ul, div.pagination li
|
||||
{
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
div.pagination li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
div.pagination li a,
|
||||
div.pagination li span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.42857143;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
div.pagination li:first-child a,
|
||||
div.pagination li:first-child span {
|
||||
margin-left: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
div.pagination li:last-child a,
|
||||
div.pagination li:last-child span {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
div.pagination li a:hover,
|
||||
div.pagination li span:hover,
|
||||
div.pagination li a:focus,
|
||||
div.pagination li span:focus {
|
||||
color: #000;
|
||||
background-color: #eee;
|
||||
border-color: #ddd;
|
||||
}
|
||||
div.pagination li .active a,
|
||||
div.pagination li .active span,
|
||||
div.pagination li .active a:hover,
|
||||
div.pagination li .active span:hover,
|
||||
div.pagination li .active a:focus,
|
||||
div.pagination li .active span:focus {
|
||||
z-index: 2;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
background-color: <?php $colorbackhmenu1 ?>;
|
||||
border-color: #337ab7;
|
||||
}
|
||||
div.pagination .disabled span,
|
||||
div.pagination .disabled span:hover,
|
||||
div.pagination .disabled span:focus,
|
||||
div.pagination .disabled a,
|
||||
div.pagination .disabled a:hover,
|
||||
div.pagination .disabled a:focus {
|
||||
color: #777;
|
||||
cursor: not-allowed;
|
||||
background-color: #fff;
|
||||
border-color: #ddd;
|
||||
}
|
||||
div.pagination li .active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Prepare to remove class pair - impair
|
||||
.noborder > tbody > tr:nth-child(even) td {
|
||||
background: linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
@ -1856,7 +1961,9 @@ table.liste td {
|
||||
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
#GanttChartDIV {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.even, .pair, .nohover .even:hover, .nohover .pair:hover, tr.even td.nohover, tr.pair td.nohover {
|
||||
font-family: <?php print $fontlist ?>;
|
||||
@ -1887,6 +1994,22 @@ div.liste_titre .tagtd {
|
||||
}
|
||||
div.liste_titre {
|
||||
min-height: 26px !important; /* We cant use height because it's a div and it should be higher if content is more. but min-height doe not work either for div */
|
||||
|
||||
padding-left: 3px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
|
||||
border-right-width: 1px;
|
||||
border-right-color: #CCC;
|
||||
border-right-style: solid;
|
||||
|
||||
border-left-width: 1px;
|
||||
border-left-color: #CCC;
|
||||
border-left-style: solid;
|
||||
|
||||
border-top-width: 1px;
|
||||
border-top-color: #CCC;
|
||||
border-top-style: solid;
|
||||
}
|
||||
tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable.tr
|
||||
{
|
||||
@ -1894,15 +2017,19 @@ tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, tabl
|
||||
}
|
||||
div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable thead tr
|
||||
{
|
||||
background: rgb(<?php echo $colorbacktitle1; ?>);
|
||||
background-repeat: repeat-x;
|
||||
/* TO MATCH BOOTSTRAP */
|
||||
/*background: #ddd;
|
||||
color: #000 !important;*/
|
||||
|
||||
/* TO MATCH ELDY */
|
||||
background: rgb(<?php echo $colorbacktitle1; ?>);
|
||||
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
|
||||
background-image: linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
|
||||
font-weight: bold;
|
||||
|
||||
font-weight: bold;
|
||||
|
||||
color: #<?php echo $colortexttitle; ?>;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
@ -1917,7 +2044,7 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste
|
||||
{
|
||||
font-family: <?php print $fontlist ?>;
|
||||
font-weight: bold;
|
||||
text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>;
|
||||
/* text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>; */
|
||||
vertical-align: middle;
|
||||
}
|
||||
tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a {
|
||||
@ -1927,16 +2054,13 @@ tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, fo
|
||||
text-shadow: none !important;
|
||||
color: #<?php echo $colortexttitle; ?>;
|
||||
}
|
||||
div.liste_titre {
|
||||
padding-left: 3px;
|
||||
}
|
||||
tr.liste_titre_sel th, th.liste_titre_sel, tr.liste_titre_sel td, td.liste_titre_sel, form.liste_titre_sel div
|
||||
{
|
||||
font-family: <?php print $fontlist ?>;
|
||||
font-weight: normal;
|
||||
border-bottom: 1px solid #FDFFFF;
|
||||
text-decoration: underline;
|
||||
text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>;
|
||||
/* text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>; */
|
||||
}
|
||||
input.liste_titre {
|
||||
background: transparent;
|
||||
@ -2014,18 +2138,21 @@ div.tabBar .noborder {
|
||||
|
||||
tr.box_titre {
|
||||
height: 26px;
|
||||
background: rgb(<?php echo $colorbacktitle1; ?>);
|
||||
background-repeat: repeat-x;
|
||||
|
||||
background-image: linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
background-image: -o-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
background-image: -moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
background-image: -ms-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||
background-image: -webkit-gradient( linear, left top, left bottom, color-stop(0, rgba(255,255,255,.3)), color-stop(1, rgba(0,0,0,.3)) );
|
||||
/* TO MATCH BOOTSTRAP */
|
||||
/*background: #ddd;
|
||||
color: #000 !important;*/
|
||||
|
||||
color: #<?php echo $colortexttitle; ?>;
|
||||
text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>;
|
||||
/* TO MATCH ELDY */
|
||||
background: rgb(<?php echo $colorbacktitle1; ?>);
|
||||
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
|
||||
background-image: linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
|
||||
|
||||
color: #<?php echo $colortexttitle; ?>;
|
||||
// text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>;
|
||||
font-family: <?php print $fontlist ?>, sans-serif;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #FDFFFF;
|
||||
@ -2269,24 +2396,25 @@ table.valid {
|
||||
/* ============================================================================== */
|
||||
|
||||
#tooltip {
|
||||
position: absolute;
|
||||
width: <?php print dol_size(450,'width'); ?>px;
|
||||
border-top: solid 1px #BBBBBB;
|
||||
border-<?php print $left; ?>: solid 1px #BBBBBB;
|
||||
border-<?php print $right; ?>: solid 1px #444444;
|
||||
border-bottom: solid 1px #444444;
|
||||
padding: 2px;
|
||||
z-index: 3000;
|
||||
background-color: #EFCFAA;
|
||||
opacity: 1;
|
||||
-moz-border-radius:6px;
|
||||
-webkit-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
width: <?php print dol_size(450,'width'); ?>px;
|
||||
border-top: solid 1px #BBBBBB;
|
||||
border-<?php print $left; ?>: solid 1px #BBBBBB;
|
||||
border-<?php print $right; ?>: solid 1px #444444;
|
||||
border-bottom: solid 1px #444444;
|
||||
padding: 2px;
|
||||
z-index: 3000;
|
||||
background-color: #FFF;
|
||||
opacity: 1;
|
||||
-moz-border-radius:6px;
|
||||
-webkit-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
#tiptip_content {
|
||||
background-color: rgb(252,248,246);
|
||||
background-color: rgba(252,248,246,0.95);
|
||||
background-color: rgb(255,255,255);
|
||||
background-color: rgba(255,255,255,0.95);
|
||||
line-height: 1.4em;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -20,8 +21,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/theme/eldy/style.css.php
|
||||
* \brief File for CSS style sheet Eldy
|
||||
* \file htdocs/theme/md_exp/style.css.php
|
||||
* \brief File for CSS style sheet Md (Material Design)
|
||||
*/
|
||||
|
||||
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language
|
||||
@ -272,7 +273,7 @@ select.flat, form.flat select {
|
||||
font-weight: normal;
|
||||
}
|
||||
input:disabled {
|
||||
background:#ddd;
|
||||
background:#f4f4f4;
|
||||
}
|
||||
|
||||
input.liste_titre {
|
||||
@ -283,7 +284,7 @@ input.removedfile {
|
||||
border: 0px !important;
|
||||
}
|
||||
textarea:disabled {
|
||||
background:#ddd;
|
||||
background:#f4f4f4;
|
||||
}
|
||||
input[type=checkbox] { background-color: transparent; border: none; box-shadow: none; }
|
||||
input[type=radio] { background-color: transparent; border: none; box-shadow: none; }
|
||||
@ -302,7 +303,7 @@ input:-moz-placeholder { color:#ccc; }
|
||||
<?php if (! empty($dol_use_jmobile)) { ?>
|
||||
legend { margin-bottom: 8px; }
|
||||
<?php } ?>
|
||||
fieldset { border: 1px solid #AAAAAA !important; box-shadow: 2px 2px 3px #DDD; }
|
||||
fieldset { border: 1px solid #AAAAAA !important; box-shadow: 2px 2px 3px #f4f4f4; }
|
||||
|
||||
|
||||
.button, sbmtConnexion {
|
||||
@ -440,7 +441,7 @@ textarea.centpercent {
|
||||
|
||||
.borderrightlight
|
||||
{
|
||||
border-right: 1px solid #DDD;
|
||||
border-right: 1px solid #f4f4f4;
|
||||
}
|
||||
#formuserfile_link {
|
||||
margin-left: 1px;
|
||||
@ -958,7 +959,7 @@ table.login_table_securitycode tr td {
|
||||
min-width: 60px;
|
||||
}
|
||||
#img_securitycode {
|
||||
border: 1px solid #DDDDDD;
|
||||
border: 1px solid #f4f4f4;
|
||||
}
|
||||
#img_logo {
|
||||
max-width: 200px;
|
||||
@ -1084,7 +1085,7 @@ div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks
|
||||
margin: 1px 0px 8px 0px;
|
||||
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #DDD;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
}
|
||||
|
||||
div.blockvmenusearch
|
||||
@ -1100,7 +1101,7 @@ div.blockvmenusearch
|
||||
margin: 1px 0px 8px 0px;
|
||||
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #DDD;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
}
|
||||
|
||||
div.blockvmenuhelp
|
||||
@ -1180,9 +1181,9 @@ td.photo {
|
||||
-moz-border-radius: 2px 2px 2px 2px !important;
|
||||
-webkit-border-radius: 2px 2px 2px 2px !important;
|
||||
border-radius: 2px 2px 2px 2px !important;
|
||||
-moz-box-shadow: 2px 2px 4px #DDD;
|
||||
-webkit-box-shadow: 2px 2px 4px #DDD;
|
||||
box-shadow: 2px 2px 4px #DDD;
|
||||
-moz-box-shadow: 2px 2px 4px #f4f4f4;
|
||||
-webkit-box-shadow: 2px 2px 4px #f4f4f4;
|
||||
box-shadow: 2px 2px 4px #f4f4f4;
|
||||
|
||||
padding: 0 4px 0 4px !important;
|
||||
min-height: 32px;
|
||||
@ -1245,7 +1246,7 @@ img.toolbarbutton {
|
||||
otherwise color shifts while dragging when bar can't keep up with mouse */
|
||||
/*.ui-layout-resizer-open-hover ,*/ /* hover-color to 'resize' */
|
||||
.ui-layout-resizer-dragging { /* resizer beging 'dragging' */
|
||||
background: #DDD;
|
||||
background: #f4f4f4;
|
||||
width: <?php echo (empty($conf->dol_optimize_smallscreen)?'8':'24'); ?>px;
|
||||
}
|
||||
.ui-layout-resizer-dragging { /* CLONED resizer being dragged */
|
||||
@ -1257,7 +1258,7 @@ img.toolbarbutton {
|
||||
background: #E1A4A4; /* red */
|
||||
}
|
||||
.ui-layout-resizer-closed {
|
||||
background-color: #DDDDDD;
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
.ui-layout-resizer-closed:hover {
|
||||
background-color: #EEDDDD;
|
||||
@ -1286,7 +1287,7 @@ img.toolbarbutton {
|
||||
border-top: 1px solid #AAA; /* match pane-border */
|
||||
border-right: 1px solid #AAA; /* match pane-border */
|
||||
border-bottom: 1px solid #AAA; /* match pane-border */
|
||||
background-color: #DDD;
|
||||
background-color: #f4f4f4;
|
||||
top: 5px !important;
|
||||
<?php } else { ?>
|
||||
diplay: none;
|
||||
@ -1426,9 +1427,9 @@ div.tabBar {
|
||||
background: rgb(<?php echo $colorbacktabcard2; ?>);
|
||||
|
||||
<?php if (empty($dol_optimize_smallscreen)) { ?>
|
||||
-moz-box-shadow: 3px 3px 4px #DDD;
|
||||
-webkit-box-shadow: 3px 3px 4px #DDD;
|
||||
box-shadow: 3px 3px 4px #DDD;
|
||||
-moz-box-shadow: 3px 3px 4px #f4f4f4;
|
||||
-webkit-box-shadow: 3px 3px 4px #f4f4f4;
|
||||
box-shadow: 3px 3px 4px #f4f4f4;
|
||||
<?php } ?>
|
||||
}
|
||||
|
||||
@ -1471,7 +1472,7 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
||||
|
||||
border-bottom: none;
|
||||
border-right: 1px solid #CCCCCC;
|
||||
border-left: 1px solid #D0D0D0;
|
||||
border-left: 1px solid #f4f4f4;
|
||||
border-top: 1px solid #D8D8D8;
|
||||
*/
|
||||
|
||||
@ -1480,7 +1481,7 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
||||
|
||||
.tabactive, a.tab#active {
|
||||
border-right: 1px solid #CCCCCC;
|
||||
border-left: 1px solid #D0D0D0;
|
||||
border-left: 1px solid #f4f4f4;
|
||||
border-top: 1px solid #D8D8D8;
|
||||
|
||||
-moz-border-radius:3px 3px 0px 0px;
|
||||
@ -1555,9 +1556,9 @@ div.divButAction { margin-bottom: 1.4em; }
|
||||
-moz-border-radius:0px 2px 0px 2px;
|
||||
-webkit-border-radius:0px 2px 0px 2px;
|
||||
border-radius:0px 2px 0px 2px;
|
||||
-moz-box-shadow: 2px 2px 3px #DDD;
|
||||
-webkit-box-shadow: 2px 2px 3px #DDD;
|
||||
box-shadow: 2px 2px 3px #DDD;
|
||||
-moz-box-shadow: 2px 2px 3px #f4f4f4;
|
||||
-webkit-box-shadow: 2px 2px 3px #f4f4f4;
|
||||
box-shadow: 2px 2px 3px #f4f4f4;
|
||||
}
|
||||
|
||||
.butAction:hover {
|
||||
@ -1587,9 +1588,9 @@ div.divButAction { margin-bottom: 1.4em; }
|
||||
-moz-border-radius:0px 2px 0px 2px;
|
||||
-webkit-border-radius:0px 2px 0px 2px;
|
||||
border-radius:0px 2px 0px 2px;
|
||||
-moz-box-shadow: 3px 3px 4px #DDD;
|
||||
-webkit-box-shadow: 3px 3px 4px #DDD;
|
||||
box-shadow: 3px 3px 4px #DDD;
|
||||
-moz-box-shadow: 3px 3px 4px #f4f4f4;
|
||||
-webkit-box-shadow: 3px 3px 4px #f4f4f4;
|
||||
box-shadow: 3px 3px 4px #f4f4f4;
|
||||
}
|
||||
|
||||
<?php if (! empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { ?>
|
||||
@ -1602,7 +1603,7 @@ span.butAction, span.butActionDelete {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Preapre for bootstrap look
|
||||
/* Prepare for bootstrap look
|
||||
.butAction, .butActionDelete, .butActionRefused {
|
||||
border-color: #c5c5c5;
|
||||
border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
|
||||
@ -1726,7 +1727,7 @@ tr.nocellnopadd td.nobordernopadding, tr.nocellnopadd td.nocellnopadd
|
||||
|
||||
|
||||
table.border, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col, div.border {
|
||||
border: 1px solid #D0D0D0;
|
||||
border: 1px solid #f4f4f4;
|
||||
border-collapse: collapse;
|
||||
padding: 1px 2px 1px 3px; /* t r b l */
|
||||
}
|
||||
@ -1740,7 +1741,7 @@ div.tabBar table.border tr {
|
||||
|
||||
table.border td, div.border div div.tagtd {
|
||||
padding: 2px 2px 2px 2px;
|
||||
border: 1px solid #D0D0D0;
|
||||
border: 1px solid #f4f4f4;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
@ -1923,7 +1924,7 @@ table.dataTable td {
|
||||
}
|
||||
tr.even td, tr.pair td, tr.odd td, tr.impair td, form.odd div.tagtd, form.impair div.tagtd, form.pair div.tagtd, div.impair div.tagtd, div.pair div.tagtd, div.liste_titre div.tagtd {
|
||||
padding: 5px 2px 5px 3px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
}
|
||||
tr.even td .nobordernopadding tr td, tr.pair td .nobordernopadding tr td, tr.impair td .nobordernopadding tr td, tr.odd td .nobordernopadding tr td {
|
||||
border-bottom: 0px !important;
|
||||
@ -1946,12 +1947,14 @@ div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.list
|
||||
background: rgb(<?php echo $colorbacktitle1; ?>);
|
||||
background-repeat: repeat-x;
|
||||
|
||||
/*
|
||||
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
|
||||
background-image: linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
|
||||
font-weight: bold;
|
||||
*/
|
||||
font-weight: bold;
|
||||
|
||||
color: #<?php echo $colortexttitle; ?>;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
@ -1996,7 +1999,7 @@ input.liste_titre {
|
||||
background: #F0F0F0;
|
||||
}
|
||||
.noborder tr.liste_total td, tr.liste_total td, form.liste_total div {
|
||||
border-top: 1px solid #DDDDDD;
|
||||
border-top: 1px solid #f4f4f4;
|
||||
color: #332266;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
@ -2018,15 +2021,15 @@ input.liste_titre {
|
||||
|
||||
/* Disable shadows */
|
||||
.noshadow {
|
||||
-moz-box-shadow: 0px 0px 0px #DDD !important;
|
||||
-webkit-box-shadow: 0px 0px 0px #DDD !important;
|
||||
box-shadow: 0px 0px 0px #DDD !important;
|
||||
-moz-box-shadow: 0px 0px 0px #f4f4f4 !important;
|
||||
-webkit-box-shadow: 0px 0px 0px #f4f4f4 !important;
|
||||
box-shadow: 0px 0px 0px #f4f4f4 !important;
|
||||
}
|
||||
|
||||
div.tabBar .noborder {
|
||||
-moz-box-shadow: 0px 0px 0px #DDD !important;
|
||||
-webkit-box-shadow: 0px 0px 0px #DDD !important;
|
||||
box-shadow: 0px 0px 0px #DDD !important;
|
||||
-moz-box-shadow: 0px 0px 0px #f4f4f4 !important;
|
||||
-webkit-box-shadow: 0px 0px 0px #f4f4f4 !important;
|
||||
box-shadow: 0px 0px 0px #f4f4f4 !important;
|
||||
}
|
||||
|
||||
|
||||
@ -2038,9 +2041,9 @@ div.tabBar .noborder {
|
||||
<?php print "float: ".$left.";\n"; ?>
|
||||
margin: 3px;
|
||||
padding: 3px;
|
||||
/*-moz-box-shadow: 3px 3px 4px #DDD;
|
||||
-webkit-box-shadow: 3px 3px 4px #DDD;
|
||||
box-shadow: 3px 3px 4px #DDD;
|
||||
/*-moz-box-shadow: 3px 3px 4px #f4f4f4;
|
||||
-webkit-box-shadow: 3px 3px 4px #f4f4f4;
|
||||
box-shadow: 3px 3px 4px #f4f4f4;
|
||||
margin-bottom: 8px !important;*/
|
||||
border: 1px solid #AAA;
|
||||
text-align: center;
|
||||
@ -2048,9 +2051,9 @@ div.tabBar .noborder {
|
||||
}
|
||||
|
||||
.boxtable {
|
||||
-moz-box-shadow: 3px 3px 4px #DDD;
|
||||
-webkit-box-shadow: 3px 3px 4px #DDD;
|
||||
box-shadow: 3px 3px 4px #DDD;
|
||||
-moz-box-shadow: 3px 3px 4px #f4f4f4;
|
||||
-webkit-box-shadow: 3px 3px 4px #f4f4f4;
|
||||
box-shadow: 3px 3px 4px #f4f4f4;
|
||||
margin-bottom: 8px !important;
|
||||
}
|
||||
|
||||
@ -2100,7 +2103,7 @@ tr.box_pair {
|
||||
|
||||
tr.box_pair td, tr.box_impair td {
|
||||
padding: 4px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
}
|
||||
|
||||
.formboxfilter {
|
||||
@ -2356,8 +2359,8 @@ img.datecallink { padding-left: 2px !important; padding-right: 2px !important; }
|
||||
table.dp {
|
||||
width: 180px;
|
||||
background-color: #FFFFFF;
|
||||
border-top: solid 2px #DDDDDD;
|
||||
border-<?php print $left; ?>: solid 2px #DDDDDD;
|
||||
border-top: solid 2px #f4f4f4;
|
||||
border-<?php print $left; ?>: solid 2px #f4f4f4;
|
||||
border-<?php print $right; ?>: solid 1px #222222;
|
||||
border-bottom: solid 1px #222222;
|
||||
padding: 0px;
|
||||
@ -2389,14 +2392,14 @@ table.dp {
|
||||
.dpToday,.dpReg,.dpSelected{
|
||||
cursor:pointer;
|
||||
}
|
||||
.dpToday{font-weight:bold; color:black; background-color:#DDDDDD;}
|
||||
.dpToday{font-weight:bold; color:black; background-color:#f4f4f4;}
|
||||
.dpReg:Hover,.dpToday:Hover{background-color:black;color:white}
|
||||
|
||||
/* Jour courant */
|
||||
.dpSelected{background-color:#0B63A2;color:white;font-weight:bold; }
|
||||
|
||||
.tpHour{border-top:1px solid #DDDDDD; border-right:1px solid #DDDDDD;}
|
||||
.tpHour td {border-left:1px solid #DDDDDD; border-bottom:1px solid #DDDDDD; cursor:pointer;}
|
||||
.tpHour{border-top:1px solid #f4f4f4; border-right:1px solid #f4f4f4;}
|
||||
.tpHour td {border-left:1px solid #f4f4f4; border-bottom:1px solid #f4f4f4; cursor:pointer;}
|
||||
.tpHour td:Hover {background-color:black;color:white;}
|
||||
|
||||
.tpMinute {margin-top:5px;}
|
||||
@ -2729,9 +2732,9 @@ a.cke_dialog_ui_button
|
||||
-moz-border-radius:0px 2px 0px 2px !important;
|
||||
-webkit-border-radius:0px 2px 0px 2px !important;
|
||||
border-radius:0px 2px 0px 2px !important;
|
||||
-moz-box-shadow: 3px 3px 4px #DDD !important;
|
||||
-webkit-box-shadow: 3px 3px 4px #DDD !important;
|
||||
box-shadow: 3px 3px 4px #DDD !important;
|
||||
-moz-box-shadow: 3px 3px 4px #f4f4f4 !important;
|
||||
-webkit-box-shadow: 3px 3px 4px #f4f4f4 !important;
|
||||
box-shadow: 3px 3px 4px #f4f4f4 !important;
|
||||
}
|
||||
.cke_dialog_ui_hbox_last
|
||||
{
|
||||
@ -2837,7 +2840,7 @@ ul.filedirelem li {
|
||||
text-align: center;
|
||||
display: block;
|
||||
float: <?php print $left; ?>;
|
||||
border: solid 1px #DDDDDD;
|
||||
border: solid 1px #f4f4f4;
|
||||
}
|
||||
|
||||
ui-layout-north {
|
||||
@ -3190,12 +3193,12 @@ border-top-right-radius: 6px;
|
||||
text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>;
|
||||
}
|
||||
.lilevel1 {
|
||||
background-image: -webkit-gradient(linear,left top,left bottom,from( #ddd ),to( #d1d1d1 )) !important;
|
||||
background-image: -webkit-linear-gradient( #ddd,#d1d1d1 ) !important;
|
||||
background-image: -moz-linear-gradient( #ddd,#d1d1d1 ) !important;
|
||||
background-image: -ms-linear-gradient( #ddd,#d1d1d1 ) !important;
|
||||
background-image: -o-linear-gradient( #ddd,#d1d1d1 ) !important;
|
||||
background-image: linear-gradient( #ddd,#d1d1d1 ) !important;
|
||||
background-image: -webkit-gradient(linear,left top,left bottom,from( #f4f4f4 ),to( #d1d1d1 )) !important;
|
||||
background-image: -webkit-linear-gradient( #f4f4f4,#d1d1d1 ) !important;
|
||||
background-image: -moz-linear-gradient( #f4f4f4,#d1d1d1 ) !important;
|
||||
background-image: -ms-linear-gradient( #f4f4f4,#d1d1d1 ) !important;
|
||||
background-image: -o-linear-gradient( #f4f4f4,#d1d1d1 ) !important;
|
||||
background-image: linear-gradient( #f4f4f4,#d1d1d1 ) !important;
|
||||
}
|
||||
.lilevel2
|
||||
{
|
||||
|
||||
@ -723,7 +723,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
print '<tr>';
|
||||
|
||||
// Lastname
|
||||
print '<td valign="top" width="160"><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td>';
|
||||
print '<td width="160"><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td>';
|
||||
print '<td>';
|
||||
if (! empty($ldap_lastname))
|
||||
{
|
||||
@ -737,7 +737,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
print '</td></tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td valign="top">'.$langs->trans("Firstname").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td>';
|
||||
print '<td>';
|
||||
if (! empty($ldap_firstname))
|
||||
{
|
||||
@ -751,13 +751,13 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
print '</td></tr>';
|
||||
|
||||
// Position/Job
|
||||
print '<tr><td valign="top">'.$langs->trans("PostOrFunction").'</td>';
|
||||
print '<tr><td>'.$langs->trans("PostOrFunction").'</td>';
|
||||
print '<td>';
|
||||
print '<input size="30" type="text" name="job" value="'.GETPOST('job').'">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Login
|
||||
print '<tr><td valign="top"><span class="fieldrequired">'.$langs->trans("Login").'</span></td>';
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").'</span></td>';
|
||||
print '<td>';
|
||||
if (! empty($ldap_login))
|
||||
{
|
||||
@ -784,7 +784,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
$password=$generated_password;
|
||||
|
||||
// Password
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Password").'</td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td>';
|
||||
print '<td>';
|
||||
if (! empty($ldap_sid))
|
||||
{
|
||||
@ -808,7 +808,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
// Administrator
|
||||
if (! empty($user->admin))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Administrator").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Administrator").'</td>';
|
||||
print '<td>';
|
||||
print $form->selectyesno('admin',GETPOST('admin'),1);
|
||||
|
||||
@ -850,13 +850,13 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td valign="top">'.$langs->trans("Type").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Type").'</td>';
|
||||
print '<td>';
|
||||
print $form->textwithpicto($langs->trans("Internal"),$langs->trans("InternalExternalDesc"));
|
||||
print '</td></tr>';
|
||||
|
||||
// Tel
|
||||
print '<tr><td valign="top">'.$langs->trans("PhonePro").'</td>';
|
||||
print '<tr><td>'.$langs->trans("PhonePro").'</td>';
|
||||
print '<td>';
|
||||
if (! empty($ldap_phone))
|
||||
{
|
||||
@ -870,7 +870,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
print '</td></tr>';
|
||||
|
||||
// Tel portable
|
||||
print '<tr><td valign="top">'.$langs->trans("PhoneMobile").'</td>';
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td>';
|
||||
print '<td>';
|
||||
if (! empty($ldap_mobile))
|
||||
{
|
||||
@ -884,7 +884,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
print '</td></tr>';
|
||||
|
||||
// Fax
|
||||
print '<tr><td valign="top">'.$langs->trans("Fax").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Fax").'</td>';
|
||||
print '<td>';
|
||||
if (! empty($ldap_fax))
|
||||
{
|
||||
@ -900,7 +900,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Skype").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td>';
|
||||
print '<td>';
|
||||
if (! empty($ldap_skype))
|
||||
{
|
||||
@ -915,7 +915,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
}
|
||||
|
||||
// EMail
|
||||
print '<tr><td valign="top"'.(! empty($conf->global->USER_MAIL_REQUIRED)?' class="fieldrequired"':'').'>'.$langs->trans("EMail").'</td>';
|
||||
print '<tr><td'.(! empty($conf->global->USER_MAIL_REQUIRED)?' class="fieldrequired"':'').'>'.$langs->trans("EMail").'</td>';
|
||||
print '<td>';
|
||||
if (! empty($ldap_mail))
|
||||
{
|
||||
@ -929,7 +929,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
print '</td></tr>';
|
||||
|
||||
// Signature
|
||||
print '<tr><td valign="top">'.$langs->trans("Signature").'</td>';
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Signature").'</td>';
|
||||
print '<td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor('signature',GETPOST('signature'),'',138,'dolibarr_mailings','In',true,true,empty($conf->global->FCKEDITOR_ENABLE_USERSIGN)?0:1,ROWS_4,90);
|
||||
@ -941,7 +941,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
{
|
||||
if (empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity && is_object($mc))
|
||||
{
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("Entity").'</td>';
|
||||
print "<tr>".'<td>'.$langs->trans("Entity").'</td>';
|
||||
print "<td>".$mc->select_entities($conf->entity);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
@ -952,7 +952,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
}
|
||||
|
||||
// Hierarchy
|
||||
print '<tr><td valign="top">'.$langs->trans("HierarchicalResponsible").'</td>';
|
||||
print '<tr><td>'.$langs->trans("HierarchicalResponsible").'</td>';
|
||||
print '<td>';
|
||||
print $form->select_dolusers($object->fk_user,'fk_user',1,array($object->id),0,'',0,$conf->entity);
|
||||
print '</td>';
|
||||
@ -963,21 +963,21 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
$langs->load("salaries");
|
||||
|
||||
// THM
|
||||
print '<tr><td valign="top">'.$langs->trans("THM").'</td>';
|
||||
print '<tr><td>'.$langs->trans("THM").'</td>';
|
||||
print '<td>';
|
||||
print '<input size="8" type="text" name="thm" value="'.GETPOST('thm').'">';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// TJM
|
||||
print '<tr><td valign="top">'.$langs->trans("TJM").'</td>';
|
||||
print '<tr><td>'.$langs->trans("TJM").'</td>';
|
||||
print '<td>';
|
||||
print '<input size="8" type="text" name="tjm" value="'.GETPOST('tjm').'">';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Salary
|
||||
print '<tr><td valign="top">'.$langs->trans("Salary").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Salary").'</td>';
|
||||
print '<td>';
|
||||
print '<input size="8" type="text" name="salary" value="'.GETPOST('salary').'">';
|
||||
print '</td>';
|
||||
@ -985,7 +985,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
}
|
||||
|
||||
// Weeklyhours
|
||||
print '<tr><td valign="top">'.$langs->trans("WeeklyHours").'</td>';
|
||||
print '<tr><td>'.$langs->trans("WeeklyHours").'</td>';
|
||||
print '<td>';
|
||||
print '<input size="8" type="text" name="weeklyhours" value="'.GETPOST('weeklyhours').'">';
|
||||
print '</td>';
|
||||
@ -994,7 +994,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
// Accountancy code
|
||||
if ($conf->salaries->enabled)
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<tr><td>'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td>';
|
||||
print '<input size="30" type="text" name="accountancy_code" value="'.GETPOST('accountancy_code').'">';
|
||||
print '</td></tr>';
|
||||
@ -1003,14 +1003,14 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
// User color
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("ColorUser").'</td>';
|
||||
print '<tr><td>'.$langs->trans("ColorUser").'</td>';
|
||||
print '<td>';
|
||||
print $formother->selectColor(GETPOST('color')?GETPOST('color'):$object->color, 'color', 'usercolorconfig', 1, '', 'hideifnotset');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Note
|
||||
print '<tr><td valign="top">';
|
||||
print '<tr><td class="tdtop">';
|
||||
print $langs->trans("Note");
|
||||
print '</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
@ -1149,7 +1149,7 @@ else
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Ref").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin);
|
||||
print '</td>';
|
||||
@ -1163,7 +1163,7 @@ else
|
||||
if (! empty($conf->agenda->enabled)) $rowspan++;
|
||||
|
||||
// Lastname
|
||||
print '<tr><td valign="top">'.$langs->trans("Lastname").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td>';
|
||||
print '<td colspan="2">'.$object->lastname.'</td>';
|
||||
|
||||
// Photo
|
||||
@ -1174,17 +1174,17 @@ else
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Firstname
|
||||
print '<tr><td valign="top">'.$langs->trans("Firstname").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td>';
|
||||
print '<td colspan="2">'.$object->firstname.'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Position/Job
|
||||
print '<tr><td valign="top">'.$langs->trans("PostOrFunction").'</td>';
|
||||
print '<tr><td>'.$langs->trans("PostOrFunction").'</td>';
|
||||
print '<td colspan="2">'.$object->job.'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Login
|
||||
print '<tr><td valign="top">'.$langs->trans("Login").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Login").'</td>';
|
||||
if (! empty($object->ldap_sid) && $object->statut==0)
|
||||
{
|
||||
print '<td colspan="2" class="error">'.$langs->trans("LoginAccountDisableInDolibarr").'</td>';
|
||||
@ -1196,7 +1196,7 @@ else
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Password
|
||||
print '<tr><td valign="top">'.$langs->trans("Password").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Password").'</td>';
|
||||
if (! empty($object->ldap_sid))
|
||||
{
|
||||
if ($passDoNotExpire)
|
||||
@ -1230,7 +1230,7 @@ else
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Administrator
|
||||
print '<tr><td valign="top">'.$langs->trans("Administrator").'</td><td colspan="2">';
|
||||
print '<tr><td>'.$langs->trans("Administrator").'</td><td colspan="2">';
|
||||
if (! empty($conf->multicompany->enabled) && $object->admin && ! $object->entity)
|
||||
{
|
||||
print $form->textwithpicto(yn($object->admin),$langs->trans("SuperAdministratorDesc"),1,"superadmin");
|
||||
@ -1246,7 +1246,7 @@ else
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Type
|
||||
print '<tr><td valign="top">'.$langs->trans("Type").'</td><td colspan="2">';
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td colspan="2">';
|
||||
$type=$langs->trans("Internal");
|
||||
if ($object->societe_id) $type=$langs->trans("External");
|
||||
print $form->textwithpicto($type,$langs->trans("InternalExternalDesc"));
|
||||
@ -1256,46 +1256,46 @@ else
|
||||
// Ldap sid
|
||||
if ($object->ldap_sid)
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Type").'</td><td colspan="2">';
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td colspan="2">';
|
||||
print $langs->trans("DomainUser",$ldap->domainFQDN);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
|
||||
// Tel pro
|
||||
print '<tr><td valign="top">'.$langs->trans("PhonePro").'</td>';
|
||||
print '<tr><td>'.$langs->trans("PhonePro").'</td>';
|
||||
print '<td colspan="2">'.dol_print_phone($object->office_phone,'',0,0,1).'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Tel mobile
|
||||
print '<tr><td valign="top">'.$langs->trans("PhoneMobile").'</td>';
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td>';
|
||||
print '<td colspan="2">'.dol_print_phone($object->user_mobile,'',0,0,1).'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Fax
|
||||
print '<tr><td valign="top">'.$langs->trans("Fax").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Fax").'</td>';
|
||||
print '<td colspan="2">'.dol_print_phone($object->office_fax,'',0,0,1).'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Skype").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td>';
|
||||
print '<td colspan="2">'.dol_print_skype($object->skype,0,0,1).'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
// EMail
|
||||
print '<tr><td valign="top">'.$langs->trans("EMail").'</td>';
|
||||
print '<tr><td>'.$langs->trans("EMail").'</td>';
|
||||
print '<td colspan="2">'.dol_print_email($object->email,0,0,1).'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Signature
|
||||
print '<tr><td valign="top">'.$langs->trans('Signature').'</td><td colspan="2">';
|
||||
print '<tr><td class="tdtop">'.$langs->trans('Signature').'</td><td colspan="2">';
|
||||
print dol_htmlentitiesbr($object->signature);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Hierarchy
|
||||
print '<tr><td valign="top">'.$langs->trans("HierarchicalResponsible").'</td>';
|
||||
print '<tr><td>'.$langs->trans("HierarchicalResponsible").'</td>';
|
||||
print '<td colspan="2">';
|
||||
if (empty($object->fk_user)) print $langs->trans("None");
|
||||
else {
|
||||
@ -1311,21 +1311,21 @@ else
|
||||
$langs->load("salaries");
|
||||
|
||||
// THM
|
||||
print '<tr><td valign="top">'.$langs->trans("THM").'</td>';
|
||||
print '<tr><td>'.$langs->trans("THM").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print ($object->thm!=''?price($object->thm,'',$langs,1,-1,-1,$conf->currency):'');
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// TJM
|
||||
print '<tr><td valign="top">'.$langs->trans("TJM").'</td>';
|
||||
print '<tr><td>'.$langs->trans("TJM").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print ($object->tjm!=''?price($object->tjm,'',$langs,1,-1,-1,$conf->currency):'');
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Salary
|
||||
print '<tr><td valign="top">'.$langs->trans("Salary").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Salary").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print ($object->salary!=''?price($object->salary,'',$langs,1,-1,-1,$conf->currency):'');
|
||||
print '</td>';
|
||||
@ -1333,7 +1333,7 @@ else
|
||||
}
|
||||
|
||||
// Weeklyhours
|
||||
print '<tr><td valign="top">'.$langs->trans("WeeklyHours").'</td>';
|
||||
print '<tr><td>'.$langs->trans("WeeklyHours").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print price2num($object->weeklyhours);
|
||||
print '</td>';
|
||||
@ -1342,14 +1342,14 @@ else
|
||||
// Accountancy code
|
||||
if ($conf->salaries->enabled)
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<tr><td>'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td colspan="2">'.$object->accountancy_code.'</td>';
|
||||
}
|
||||
|
||||
// Color user
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("ColorUser").'</td>';
|
||||
print '<tr><td>'.$langs->trans("ColorUser").'</td>';
|
||||
print '<td colspan="2">';
|
||||
if ($object->color) print '<input type="text" disabled style="padding: 0; margin-top: 0; margin-bottom: 0; width: 36px; background-color: #'.$object->color.'" value="'.$object->color.'">';
|
||||
print '</td>';
|
||||
@ -1357,23 +1357,23 @@ else
|
||||
}
|
||||
|
||||
// Status
|
||||
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Status").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $object->getLibStatut(4);
|
||||
print '</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("LastConnexion").'</td>';
|
||||
print '<tr><td>'.$langs->trans("LastConnexion").'</td>';
|
||||
print '<td colspan="2">'.dol_print_date($object->datelastlogin,"dayhour").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("PreviousConnexion").'</td>';
|
||||
print '<tr><td>'.$langs->trans("PreviousConnexion").'</td>';
|
||||
print '<td colspan="2">'.dol_print_date($object->datepreviouslogin,"dayhour").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("OpenIDURL").'</td>';
|
||||
print '<tr><td>'.$langs->trans("OpenIDURL").'</td>';
|
||||
print '<td colspan="2">'.$object->openid.'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
@ -1381,7 +1381,7 @@ else
|
||||
// Company / Contact
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("LinkToCompanyContact").'</td>';
|
||||
print '<tr><td>'.$langs->trans("LinkToCompanyContact").'</td>';
|
||||
print '<td colspan="2">';
|
||||
if (isset($object->societe_id) && $object->societe_id > 0)
|
||||
{
|
||||
@ -1409,7 +1409,7 @@ else
|
||||
if (! empty($conf->adherent->enabled))
|
||||
{
|
||||
$langs->load("members");
|
||||
print '<tr><td valign="top">'.$langs->trans("LinkedToDolibarrMember").'</td>';
|
||||
print '<tr><td>'.$langs->trans("LinkedToDolibarrMember").'</td>';
|
||||
print '<td colspan="2">';
|
||||
if ($object->fk_member)
|
||||
{
|
||||
@ -1432,7 +1432,7 @@ else
|
||||
{
|
||||
if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Entity").'</td><td width="75%" class="valeur">';
|
||||
print '<tr><td>'.$langs->trans("Entity").'</td><td width="75%" class="valeur">';
|
||||
if (empty($object->entity))
|
||||
{
|
||||
print $langs->trans("AllEntities");
|
||||
@ -1578,7 +1578,7 @@ else
|
||||
{
|
||||
if ($conf->entity == 1 && $conf->multicompany->transverse_mode)
|
||||
{
|
||||
print '</td><td valign="top">'.$langs->trans("Entity").'</td>';
|
||||
print '</td><td>'.$langs->trans("Entity").'</td>';
|
||||
print "<td>".$mc->select_entities($conf->entity);
|
||||
}
|
||||
else
|
||||
@ -1691,7 +1691,7 @@ else
|
||||
|
||||
print '<table width="100%" class="border">';
|
||||
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Ref").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $object->id;
|
||||
print '</td>';
|
||||
@ -1699,7 +1699,7 @@ else
|
||||
|
||||
// Lastname
|
||||
print "<tr>";
|
||||
print '<td valign="top" class="fieldrequired">'.$langs->trans("Lastname").'</td>';
|
||||
print '<td class="fieldrequired">'.$langs->trans("Lastname").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield && !$object->ldap_sid)
|
||||
{
|
||||
@ -1728,7 +1728,7 @@ else
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("Firstname").'</td>';
|
||||
print "<tr>".'<td>'.$langs->trans("Firstname").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield && !$object->ldap_sid)
|
||||
{
|
||||
@ -1742,7 +1742,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Position/Job
|
||||
print '<tr><td valign="top">'.$langs->trans("PostOrFunction").'</td>';
|
||||
print '<tr><td>'.$langs->trans("PostOrFunction").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield)
|
||||
{
|
||||
@ -1756,7 +1756,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Login
|
||||
print "<tr>".'<td valign="top"><span class="fieldrequired">'.$langs->trans("Login").'</span></td>';
|
||||
print "<tr>".'<td><span class="fieldrequired">'.$langs->trans("Login").'</span></td>';
|
||||
print '<td>';
|
||||
if ($user->admin && !$object->ldap_sid)
|
||||
{
|
||||
@ -1771,7 +1771,7 @@ else
|
||||
print '</tr>';
|
||||
|
||||
// Pass
|
||||
print '<tr><td valign="top">'.$langs->trans("Password").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Password").'</td>';
|
||||
print '<td>';
|
||||
if ($object->ldap_sid)
|
||||
{
|
||||
@ -1793,7 +1793,7 @@ else
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Administrator
|
||||
print '<tr><td valign="top">'.$langs->trans("Administrator").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Administrator").'</td>';
|
||||
if ($object->societe_id > 0)
|
||||
{
|
||||
$langs->load("admin");
|
||||
@ -1870,7 +1870,7 @@ else
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Type").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("Type").'</td>';
|
||||
print '<td>';
|
||||
if ($user->id == $object->id || ! $user->admin)
|
||||
{
|
||||
@ -1889,7 +1889,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Tel pro
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("PhonePro").'</td>';
|
||||
print "<tr>".'<td>'.$langs->trans("PhonePro").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield && empty($object->ldap_sid))
|
||||
{
|
||||
@ -1903,7 +1903,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Tel mobile
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("PhoneMobile").'</td>';
|
||||
print "<tr>".'<td>'.$langs->trans("PhoneMobile").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield && empty($object->ldap_sid))
|
||||
{
|
||||
@ -1917,7 +1917,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Fax
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("Fax").'</td>';
|
||||
print "<tr>".'<td>'.$langs->trans("Fax").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield && empty($object->ldap_sid))
|
||||
{
|
||||
@ -1933,7 +1933,7 @@ else
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Skype").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield && empty($object->ldap_sid))
|
||||
{
|
||||
@ -1948,7 +1948,7 @@ else
|
||||
}
|
||||
|
||||
// EMail
|
||||
print "<tr>".'<td valign="top"'.(! empty($conf->global->USER_MAIL_REQUIRED)?' class="fieldrequired"':'').'>'.$langs->trans("EMail").'</td>';
|
||||
print "<tr>".'<td'.(! empty($conf->global->USER_MAIL_REQUIRED)?' class="fieldrequired"':'').'>'.$langs->trans("EMail").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield && empty($object->ldap_sid))
|
||||
{
|
||||
@ -1962,7 +1962,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Signature
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("Signature").'</td>';
|
||||
print "<tr>".'<td class="tdtop">'.$langs->trans("Signature").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield)
|
||||
{
|
||||
@ -1979,7 +1979,7 @@ else
|
||||
// OpenID url
|
||||
if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER))
|
||||
{
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("OpenIDURL").'</td>';
|
||||
print "<tr>".'<td>'.$langs->trans("OpenIDURL").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield)
|
||||
{
|
||||
@ -1994,7 +1994,7 @@ else
|
||||
}
|
||||
|
||||
// Hierarchy
|
||||
print '<tr><td valign="top">'.$langs->trans("HierarchicalResponsible").'</td>';
|
||||
print '<tr><td>'.$langs->trans("HierarchicalResponsible").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield)
|
||||
{
|
||||
@ -2015,21 +2015,21 @@ else
|
||||
$langs->load("salaries");
|
||||
|
||||
// THM
|
||||
print '<tr><td valign="top">'.$langs->trans("THM").'</td>';
|
||||
print '<tr><td>'.$langs->trans("THM").'</td>';
|
||||
print '<td>';
|
||||
print '<input size="8" type="text" name="thm" value="'.price2num(GETPOST('thm')?GETPOST('thm'):$object->thm).'">';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// TJM
|
||||
print '<tr><td valign="top">'.$langs->trans("TJM").'</td>';
|
||||
print '<tr><td>'.$langs->trans("TJM").'</td>';
|
||||
print '<td>';
|
||||
print '<input size="8" type="text" name="tjm" value="'.price2num(GETPOST('tjm')?GETPOST('tjm'):$object->tjm).'">';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Salary
|
||||
print '<tr><td valign="top">'.$langs->trans("Salary").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Salary").'</td>';
|
||||
print '<td>';
|
||||
print '<input size="8" type="text" name="salary" value="'.price2num(GETPOST('salary')?GETPOST('salary'):$object->salary).'">';
|
||||
print '</td>';
|
||||
@ -2037,7 +2037,7 @@ else
|
||||
}
|
||||
|
||||
// Weeklyhours
|
||||
print '<tr><td valign="top">'.$langs->trans("WeeklyHours").'</td>';
|
||||
print '<tr><td>'.$langs->trans("WeeklyHours").'</td>';
|
||||
print '<td>';
|
||||
print '<input size="8" type="text" name="weeklyhours" value="'.price2num(GETPOST('weeklyhours')?GETPOST('weeklyhours'):$object->weeklyhours).'">';
|
||||
print '</td>';
|
||||
@ -2047,7 +2047,7 @@ else
|
||||
if ($conf->salaries->enabled)
|
||||
{
|
||||
print "<tr>";
|
||||
print '<td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td>'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield)
|
||||
{
|
||||
@ -2065,14 +2065,14 @@ else
|
||||
// User color
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("ColorUser").'</td>';
|
||||
print '<tr><td>'.$langs->trans("ColorUser").'</td>';
|
||||
print '<td>';
|
||||
print $formother->selectColor(GETPOST('color')?GETPOST('color'):$object->color, 'color', 'usercolorconfig', 1, '', 'hideifnotset');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Status
|
||||
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Status").'</td>';
|
||||
print '<td>';
|
||||
print $object->getLibStatut(4);
|
||||
print '</td></tr>';
|
||||
@ -2080,7 +2080,7 @@ else
|
||||
// Company / Contact
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("LinkToCompanyContact").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("LinkToCompanyContact").'</td>';
|
||||
print '<td>';
|
||||
if ($object->societe_id > 0)
|
||||
{
|
||||
@ -2107,7 +2107,7 @@ else
|
||||
if (! empty($conf->adherent->enabled))
|
||||
{
|
||||
$langs->load("members");
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("LinkedToDolibarrMember").'</td>';
|
||||
print '<tr><td width="25%">'.$langs->trans("LinkedToDolibarrMember").'</td>';
|
||||
print '<td>';
|
||||
if ($object->fk_member)
|
||||
{
|
||||
@ -2129,7 +2129,7 @@ else
|
||||
{
|
||||
if (empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||
{
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("Entity").'</td>';
|
||||
print "<tr>".'<td>'.$langs->trans("Entity").'</td>';
|
||||
print "<td>".$mc->select_entities($object->entity, 'entity', '', 0, 1); // last parameter 1 means, show also a choice 0=>'all entities'
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||