Merge remote-tracking branch 'Upstream/develop' into develop-hrm

This commit is contained in:
aspangaro 2015-10-10 05:42:06 +02:00
commit f6947afc2f
58 changed files with 1116 additions and 533 deletions

View File

@ -40,6 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
require_once DOL_DOCUMENT_ROOT.'/don/class/paymentdonation.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
@ -120,6 +121,7 @@ $paymentsupplierstatic = new PaiementFourn($db);
$societestatic = new Societe($db);
$userstatic = new User($db);
$chargestatic = new ChargeSociales($db);
$paymentdonstatic = new PaymentDonation($db);
$paymentvatstatic = new TVA($db);
$paymentsalstatic = new PaymentSalary($db);
@ -133,7 +135,8 @@ if ($result) {
$cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"));
$accountancy_account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef"));
$accountancy_account_pay_vat = (! empty($conf->global->ACCOUNTING_VAT_PAY_ACCOUNT) ? $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT : $langs->trans("CodeNotDef"));
$accountancy_account_pay_donation = (! empty($conf->global->DONATION_ACCOUNTINGACCOUNT) ? $conf->global->DONATION_ACCOUNTINGACCOUNT : $langs->trans("CodeNotDef"));
$tabpay = array ();
$tabbq = array ();
$tabtp = array ();
@ -174,95 +177,100 @@ if ($result) {
// get_url may return -1 which is not traversable
if (is_array($links))
{
foreach ( $links as $key => $val )
{
$tabtype[$obj->rowid] = $links[$key]['type'];
foreach ( $links as $key => $val )
{
$tabtype[$obj->rowid] = $links[$key]['type'];
if ($links[$key]['type'] == 'payment')
{
$paymentstatic->id = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
}
else if ($links[$key]['type'] == 'payment_supplier')
{
$paymentsupplierstatic->id = $links[$key]['url_id'];
$paymentsupplierstatic->ref = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
}
else if ($links[$key]['type'] == 'company')
{
$societestatic->id = $links[$key]['url_id'];
$societestatic->name = $links[$key]['label'];
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
}
else if ($links[$key]['type'] == 'user')
{
$userstatic->id = $links[$key]['url_id'];
$userstatic->name = $links[$key]['label'];
$tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30);
// $tabtp[$obj->rowid][$compta_user] += $obj->amount;
}
else if ($links[$key]['type'] == 'sc')
{
$chargestatic->id = $links[$key]['url_id'];
$chargestatic->ref = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2);
if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) {
if ($reg[1] == 'socialcontribution')
$reg[1] = 'SocialContribution';
$chargestatic->lib = $langs->trans($reg[1]);
}
else
if ($links[$key]['type'] == 'payment')
{
$chargestatic->lib = $links[$key]['label'];
$paymentstatic->id = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
}
$chargestatic->ref = $chargestatic->lib;
$tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30);
$sqlmid = 'SELECT cchgsoc.accountancy_code';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc ";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid";
$sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid;
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid)
else if ($links[$key]['type'] == 'payment_supplier')
{
$objmid = $db->fetch_object($resultmid);
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
$paymentsupplierstatic->id = $links[$key]['url_id'];
$paymentsupplierstatic->ref = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
}
else if ($links[$key]['type'] == 'company')
{
$societestatic->id = $links[$key]['url_id'];
$societestatic->name = $links[$key]['label'];
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
}
else if ($links[$key]['type'] == 'user')
{
$userstatic->id = $links[$key]['url_id'];
$userstatic->name = $links[$key]['label'];
$tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30);
// $tabtp[$obj->rowid][$compta_user] += $obj->amount;
}
else if ($links[$key]['type'] == 'sc')
{
$chargestatic->id = $links[$key]['url_id'];
$chargestatic->ref = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2);
if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) {
if ($reg[1] == 'socialcontribution')
$reg[1] = 'SocialContribution';
$chargestatic->lib = $langs->trans($reg[1]);
}
else
{
$chargestatic->lib = $links[$key]['label'];
}
$chargestatic->ref = $chargestatic->lib;
$tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30);
$sqlmid = 'SELECT cchgsoc.accountancy_code';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc ";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid";
$sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid;
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid)
{
$objmid = $db->fetch_object($resultmid);
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
}
}
else if ($links[$key]['type'] == 'payment_donation')
{
$paymentdonstatic->id = $links[$key]['url_id'];
$paymentdonstatic->fk_donation = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentDonation");
$tabtp[$obj->rowid][$accountancy_account_pay_donation] += $obj->amount;
}
else if ($links[$key]['type'] == 'payment_vat')
{
$paymentvatstatic->id = $links[$key]['url_id'];
$paymentvatstatic->ref = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentVat");
$tabtp[$obj->rowid][$accountancy_account_pay_vat] += $obj->amount;
}
else if ($links[$key]['type'] == 'payment_salary')
{
$paymentsalstatic->id = $links[$key]['url_id'];
$paymentsalstatic->ref = $links[$key]['url_id'];
$paymentsalstatic->label = $links[$key]['label'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
$tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount;
}
else if ($links[$key]['type'] == 'banktransfert')
{
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
}
/*else {
$tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount;
}*/
}
else if ($links[$key]['type'] == 'payment_vat')
{
$paymentvatstatic->id = $links[$key]['url_id'];
$paymentvatstatic->ref = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentVat");
$tabtp[$obj->rowid][$accountancy_account_pay_vat] += $obj->amount;
}
else if ($links[$key]['type'] == 'payment_salary')
{
$paymentsalstatic->id = $links[$key]['url_id'];
$paymentsalstatic->ref = $links[$key]['url_id'];
$paymentsalstatic->label = $links[$key]['label'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
$tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount;
}
else if ($links[$key]['type'] == 'banktransfert')
{
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
}
/*else {
$tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount;
}*/
}
}
$tabbq[$obj->rowid][$compta_bank] += $obj->amount;

View File

@ -195,9 +195,10 @@ if ($resql)
if (! empty($conf->categorie->enabled))
{
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.=$formother->select_categories(Categorie::TYPE_MEMBER,$search_categ,'search_categ',1);
$moreforfilter.=' &nbsp; &nbsp; &nbsp; ';
$moreforfilter.='</div>';
}
if (! empty($moreforfilter))
{
@ -209,7 +210,7 @@ if ($resql)
print '</div>';
}
print '<table class="liste">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder);

View File

@ -116,7 +116,7 @@ else
}
// Print array
print '<table class="border" width="100%">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td align="center">'.$langs->trans("Nature").'</td>';
print '<td align="center">'.$langs->trans("NbOfMembers").'</td>';

View File

@ -282,7 +282,7 @@ if (count($arrayjs) && $mode == 'memberbycountry')
if ($mode)
{
// Print array / Affiche le tableau
print '<table class="border" width="100%">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td align="center">'.$label.'</td>';
if ($label2) print '<td align="center">'.$label2.'</td>';

View File

@ -167,8 +167,8 @@ print '<br><br>';
$data = $stats->getAllByYear();
print '<table class="border" width="100%">';
print '<tr height="24">';
print '<table class="noborder">';
print '<tr class="liste_titre" height="24">';
print '<td align="center">'.$langs->trans("Year").'</td>';
print '<td align="center">'.$langs->trans("NbOfSubscriptions").'</td>';
print '<td align="center">'.$langs->trans("AmountTotal").'</td>';
@ -176,14 +176,15 @@ print '<td align="center">'.$langs->trans("AmountAverage").'</td>';
print '</tr>';
$oldyear=0;
$var=false;
foreach ($data as $val)
{
$year = $val['year'];
print $avg;
while ($oldyear > $year+1)
{ // If we have empty year
$oldyear--;
print '<tr height="24">';
$var=!$var;
print '<tr '.$bc[$var].' height="24">';
print '<td align="center">';
print '<a href="month.php?year='.$oldyear.'&amp;mode='.$mode.'">';
print $oldyear;
@ -194,7 +195,8 @@ foreach ($data as $val)
print '<td align="right">0</td>';
print '</tr>';
}
print '<tr height="24">';
$var=!$var;
print '<tr '.$bc[$var].' height="24">';
print '<td align="center">';
//print '<a href="month.php?year='.$year.'">';
print $year;

View File

@ -168,7 +168,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
print load_fiche_titre($langs->trans("MembersTypes"));
dol_fiche_head('');
//dol_fiche_head('');
$sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
@ -211,7 +211,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
dol_print_error($db);
}
dol_fiche_end();
//dol_fiche_end();
/*
* Hotbar

View File

@ -112,6 +112,34 @@ $strMaxRetry = "2";
llxHeader();
$sql = "SELECT s.nom as name FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON sp.fk_soc = s.rowid";
$sql.= " WHERE s.entity IN (".getEntity('societe', 1).")";
$sql.= " AND (s.phone='".$db->escape($called)."'";
$sql.= " OR sp.phone='".$db->escape($called)."'";
$sql.= " OR sp.phone_perso='".$db->escape($called)."'";
$sql.= " OR sp.phone_mobile='".$db->escape($called)."')";
$sql.= $db->plimit(1);
dol_syslog('click to dial search information with phone '.$called, LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{
$obj = $db->fetch_object($resql);
if ($obj)
{
$found = $obj->name;
} else {
$found = $notfound;
}
$db->free($resql);
}
else
{
dol_print_error($db,'Error');
$found = 'Error';
}
$number=strtolower($called);
$pos=strpos($number,"local");
if (! empty($number))
@ -120,7 +148,7 @@ if (! empty($number))
{
$errno=0;
$errstr=0;
$strCallerId = "Dolibarr <".strtolower($caller).">";
$strCallerId = "Dolibarr call $found <".strtolower($number).">";
$oSocket = @fsockopen($strHost, $port, $errno, $errstr, 10);
if (!$oSocket)
{

View File

@ -220,7 +220,7 @@ class ActionComm extends CommonObject
$this->userassigned[$tmpid]=array('id'=>$tmpid);
}
if (is_object($this->contact) && $this->contact->id > 0 && ! ($this->contactid > 0)) $this->contactid = $this->contact->id; // For backward compatibility. Using this->contact->xx is deprecated
if (is_object($this->contact) && isset($this->contact->id) && $this->contact->id > 0 && ! ($this->contactid > 0)) $this->contactid = $this->contact->id; // For backward compatibility. Using this->contact->xx is deprecated
$userownerid=$this->userownerid;

View File

@ -242,7 +242,6 @@ if ($result)
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
$i = 0;
print '<table class="liste" width="100%">';
$moreforfilter='';
@ -250,25 +249,32 @@ if ($result)
if ($user->rights->societe->client->voir || $socid)
{
$langs->load("commercial");
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
$moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user);
$moreforfilter.=' &nbsp; &nbsp; &nbsp; ';
$moreforfilter.='</div>';
}
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid)
{
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
$moreforfilter.=$form->select_dolusers($search_user,'search_user',1);
$moreforfilter.='</div>';
}
if (! empty($moreforfilter))
{
print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="10">';
print $moreforfilter;
print '</td></tr>';
}
if (! empty($moreforfilter))
{
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
print '<tr class="liste_titre">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Company'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('AskPriceSupplierDate'),$_SERVER["PHP_SELF"],'p.date_livraison','',$param, 'align="center"',$sortfield,$sortorder);

View File

@ -193,15 +193,18 @@ if ($result)
$moreforfilter='';
if (! empty($conf->categorie->enabled))
{
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.=$formother->select_categories(2,$search_categ,'search_categ',1);
$moreforfilter.=' &nbsp; &nbsp; &nbsp; ';
$moreforfilter.='</div>';
}
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid)
{
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('SalesRepresentatives'). ': ';
$moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user);
$moreforfilter.='</div>';
}
if ($moreforfilter)
{
@ -213,7 +216,7 @@ if ($result)
print '</div>';
}
print '<table class="liste">'."\n";
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder);

View File

@ -265,7 +265,6 @@ if ($result)
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
$i = 0;
print '<table class="liste" width="100%">';
$moreforfilter='';
@ -298,12 +297,13 @@ if ($result)
}
if (! empty($moreforfilter))
{
print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="10">';
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
print '</td></tr>';
print '</div>';
}
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'p.ref_client','',$param,'',$sortfield,$sortorder);

View File

@ -234,7 +234,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
// Show filter box
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<table class="border" width="100%">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
// Company
print '<tr><td align="left">'.$langs->trans("ThirdParty").'</td><td align="left">';
@ -262,8 +262,8 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
print '<br><br>';
//}
print '<table class="border" width="100%">';
print '<tr height="24">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre" height="24">';
print '<td align="center">'.$langs->trans("Year").'</td>';
print '<td align="center">'.$langs->trans("NbOfProposals").'</td>';
print '<td align="center">%</td>';
@ -274,13 +274,15 @@ print '<td align="center">%</td>';
print '</tr>';
$oldyear=0;
$var=true;
foreach ($data as $val)
{
$year = $val['year'];
while (! empty($year) && $oldyear > $year+1)
{ // If we have empty year
$oldyear--;
print '<tr height="24">';
$var=!$var;
print '<tr '.$bc[$var].' height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
print '<td align="right">0</td>';
print '<td align="right"></td>';
@ -290,7 +292,7 @@ foreach ($data as $val)
print '<td align="right"></td>';
print '</tr>';
}
print '<tr height="24">';
print '<tr '.$bc[$var].' height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
print '<td align="right">'.$val['nb'].'</td>';
print '<td align="right" style="'.(($val['nb_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['nb_diff']).'</td>';

View File

@ -359,15 +359,18 @@ if ($resql)
if (! empty($conf->categorie->enabled))
{
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CUSTOMER,$search_categ,'search_categ',1);
$moreforfilter.=' &nbsp; &nbsp; &nbsp; ';
$moreforfilter.='</div>';
}
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid)
{
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('SalesRepresentatives'). ': ';
$moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user);
$moreforfilter.='</div>';
}
if ($moreforfilter)
{
@ -379,7 +382,7 @@ if ($resql)
print '</div>';
}
print '<table class="liste">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder);

View File

@ -273,15 +273,15 @@ if ($resql)
$moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth300');
$moreforfilter.='</div>';
}
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid)
// If the user can view other users
if ($user->rights->user->user->lire)
{
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
$moreforfilter.='</div>';
}
// If the user can view prospects other than his'
// If the user can view categories or products
if ($conf->categorie->enabled && $user->rights->produit->lire)
{
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
@ -301,7 +301,7 @@ if ($resql)
print '</div>';
}
print '<table class="liste">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'c.ref','',$param,'width="25%"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('RefCustomerOrder'),$_SERVER["PHP_SELF"],'c.ref_client','',$param,'',$sortfield,$sortorder);

View File

@ -250,7 +250,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
// Show filter box
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<table class="border" width="100%">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
// Company
print '<tr><td align="left">'.$langs->trans("ThirdParty").'</td><td align="left">';
@ -275,8 +275,8 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
print '<br><br>';
//}
print '<table class="border" width="100%">';
print '<tr height="24">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre" height="24">';
print '<td align="center">'.$langs->trans("Year").'</td>';
print '<td align="center">'.$langs->trans("NbOfOrders").'</td>';
print '<td align="center">%</td>';
@ -287,13 +287,15 @@ print '<td align="center">%</td>';
print '</tr>';
$oldyear=0;
$var=true;
foreach ($data as $val)
{
$year = $val['year'];
while (! empty($year) && $oldyear > $year+1)
{ // If we have empty year
$oldyear--;
print '<tr height="24">';
$var=!$var;
print '<tr '.$bc[$var].' height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
print '<td align="right">0</td>';
@ -305,7 +307,8 @@ foreach ($data as $val)
print '</tr>';
}
print '<tr height="24">';
$var=!$var;
print '<tr '.$bc[$var].' height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&amp;mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
print '<td align="right">'.$val['nb'].'</td>';
print '<td align="right" style="'.(($val['nb_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['nb_diff']).'</td>';

View File

@ -2973,16 +2973,16 @@ else if ($id > 0 || ! empty($ref))
print '<td rowspan="' . $nbrows . '" colspan="2" valign="top">';
print '<table class="nobordernopadding" width="100%">';
print '<table class="nobordernopadding paymenttable" width="100%">';
// List of payments already done
print '<tr class="liste_titre">';
print '<td>' . ($object->type == Facture::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')) . '</td>';
print '<td>' . $langs->trans('Type') . '</td>';
print '<td class="liste_titre">' . ($object->type == Facture::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')) . '</td>';
print '<td class="liste_titre">' . $langs->trans('Type') . '</td>';
if (! empty($conf->banque->enabled))
print '<td align="right">' . $langs->trans('BankAccount') . '</td>';
print '<td align="right">' . $langs->trans('Amount') . '</td>';
print '<td width="18">&nbsp;</td>';
print '<td class="liste_titre" align="right">' . $langs->trans('BankAccount') . '</td>';
print '<td class="liste_titre" align="right">' . $langs->trans('Amount') . '</td>';
print '<td class="liste_titre" width="18">&nbsp;</td>';
print '</tr>';
$var = true;
@ -3033,7 +3033,7 @@ else if ($id > 0 || ! empty($ref))
$i ++;
}
} else {
print '<tr ' . $bc [$var] . '><td colspan="' . $nbcols . '">' . $langs->trans("None") . '</td><td></td><td></td></tr>';
print '<tr ' . $bc[false] . '><td colspan="' . $nbcols . '">' . $langs->trans("None") . '</td><td></td><td></td></tr>';
}
// }
$db->free($result);

View File

@ -275,7 +275,6 @@ if ($resql)
$i = 0;
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">'."\n";
print '<table class="liste" width="100%">';
// If the user can view prospects other than his'
$moreforfilter='';
@ -308,12 +307,16 @@ if ($resql)
if ($moreforfilter)
{
print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="11">';
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
print '</td></tr>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans('Ref'),$_SERVER['PHP_SELF'],'f.facnumber','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'f.ref_client','',$param,'',$sortfield,$sortorder);

View File

@ -616,32 +616,38 @@ if ($resql)
}
$i = 0;
print '<table class="liste" width="100%">';
// If the user can view prospects other than his'
$moreforfilter='';
if ($user->rights->societe->client->voir || $socid)
{
$langs->load("commercial");
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
$moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user);
$moreforfilter.=' &nbsp; &nbsp; &nbsp; ';
$moreforfilter.='</div>';
}
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid)
{
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
$moreforfilter.=$form->select_dolusers($search_user,'search_user',1);
$moreforfilter.='</div>';
}
if ($moreforfilter)
if (! empty($moreforfilter))
{
print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="13">';
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
print '</td></tr>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
print '<tr class="liste_titre">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.facnumber","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'f.ref_client','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","",$param,'align="center"',$sortfield,$sortorder);

View File

@ -234,7 +234,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
// Show filter box
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<table class="border" width="100%">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
// Company
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
@ -259,8 +259,8 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
print '<br><br>';
//}
print '<table class="border" width="100%">';
print '<tr height="24">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre" height="24">';
print '<td align="center">'.$langs->trans("Year").'</td>';
print '<td align="center">'.$langs->trans("NumberOfBills").'</td>';
print '<td align="center">%</td>';
@ -271,13 +271,15 @@ print '<td align="center">%</td>';
print '</tr>';
$oldyear=0;
$var=true;
foreach ($data as $val)
{
$year = $val['year'];
while ($year && $oldyear > $year+1)
{ // If we have empty year
$oldyear--;
print '<tr height="24">';
$var=!$var;
print '<tr '.$bc[$var].' height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
print '<td align="right">0</td>';
print '<td align="right"></td>';
@ -287,7 +289,8 @@ foreach ($data as $val)
print '<td align="right"></td>';
print '</tr>';
}
print '<tr height="24">';
$var=!$var;
print '<tr '.$bc[$var].' height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&amp;mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
print '<td align="right">'.$val['nb'].'</td>';
print '<td align="right" style="'.(($val['nb_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['nb_diff']).'</td>';

View File

@ -117,7 +117,7 @@ if ($resql)
print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num);
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
print '<table class="liste" width="100%">';
print '<table class="liste">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"bc.number","",$params,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"dp","",$params,'align="center"',$sortfield,$sortorder);
@ -148,42 +148,52 @@ if ($resql)
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
print "</td></tr>\n";
$var=true;
while ($i < min($num,$limit))
{
$objp = $db->fetch_object($resql);
$var=!$var;
print "<tr ".$bc[$var].">";
// Num ref cheque
print '<td width="80">';
$checkdepositstatic->id=$objp->rowid;
$checkdepositstatic->ref=($objp->ref?$objp->ref:$objp->rowid);
$checkdepositstatic->statut=$objp->statut;
print $checkdepositstatic->getNomUrl(1);
print '</td>';
// Date
print '<td align="center">'.dol_print_date($db->jdate($objp->dp),'day').'</td>'; // TODO Use date hour
// Bank
print '<td>';
if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.$objp->label.'</a>';
else print '&nbsp;';
print '</td>';
// Number of cheques
print '<td align="right">'.$objp->nbcheque.'</td>';
// Amount
print '<td align="right">'.price($objp->amount).'</td>';
// Statut
print '<td align="right">';
print $checkdepositstatic->LibStatut($objp->statut,5);
print "</td></tr>\n";
$i++;
}
if ($num > 0)
{
$var=true;
while ($i < min($num,$limit))
{
$objp = $db->fetch_object($resql);
$var=!$var;
print "<tr ".$bc[$var].">";
// Num ref cheque
print '<td width="80">';
$checkdepositstatic->id=$objp->rowid;
$checkdepositstatic->ref=($objp->ref?$objp->ref:$objp->rowid);
$checkdepositstatic->statut=$objp->statut;
print $checkdepositstatic->getNomUrl(1);
print '</td>';
// Date
print '<td align="center">'.dol_print_date($db->jdate($objp->dp),'day').'</td>'; // TODO Use date hour
// Bank
print '<td>';
if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.$objp->label.'</a>';
else print '&nbsp;';
print '</td>';
// Number of cheques
print '<td align="right">'.$objp->nbcheque.'</td>';
// Amount
print '<td align="right">'.price($objp->amount).'</td>';
// Statut
print '<td align="right">';
print $checkdepositstatic->LibStatut($objp->statut,5);
print "</td></tr>\n";
$i++;
}
}
else
{
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td colspan="6">'.$langs->trans("None")."</td>";
print '</tr>';
}
print "</table>";
print "</form>\n";
}
@ -192,6 +202,6 @@ else
dol_print_error($db);
}
$db->close();
llxFooter();
$db->close();

View File

@ -906,7 +906,7 @@ class Paiement extends CommonObject
if ($withpicto) $result.=($link.img_object($langs->trans("ShowPayment"), 'payment', 'class="classfortooltip"').$linkend);
if ($withpicto && $withpicto != 2) $result.=' ';
if ($withpicto != 2) $result.=$link.$this->ref.$linkend;
if ($withpicto != 2) $result.=$link.($this->ref?$this->ref:$this->id).$linkend;
return $result;
}

View File

@ -305,6 +305,5 @@ else
dol_print_error($db);
}
$db->close();
llxFooter();
$db->close();

View File

@ -280,7 +280,7 @@ if ($modecompta == 'CREANCES-DETTES') {
$sortorder
);
} else {
print '<td colspan="1"></td>';
print_liste_field_titre('');
}
print_liste_field_titre(
$langs->trans("AmountTTC"),

View File

@ -350,7 +350,7 @@ if ($modecompta == 'CREANCES-DETTES') {
$sortorder
);
} else {
print '<td colspan="1"></td>';
print_liste_field_titre('');
}
print_liste_field_titre(
$langs->trans("AmountTTC"),

View File

@ -288,9 +288,10 @@ if ($result)
if (! empty($conf->categorie->enabled))
{
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1);
$moreforfilter.=' &nbsp; &nbsp; &nbsp; ';
$moreforfilter.='</div>';
}
if ($moreforfilter)
{
@ -299,7 +300,7 @@ if ($result)
print '</div>';
}
print '<table class="liste">';
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
// Ligne des titres
print '<tr class="liste_titre">';

View File

@ -1407,26 +1407,19 @@ else
print '<td align="right" class="nowrap">';
if ($user->rights->contrat->creer && count($arrayothercontracts) && ($object->statut >= 0))
{
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=move&amp;rowid='.$objp->rowid.'">';
print '<a style="padding-left: 5px;" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=move&amp;rowid='.$objp->rowid.'">';
print img_picto($langs->trans("MoveToAnotherContract"),'uparrow');
print '</a>';
}
else {
print '&nbsp;';
}
if ($user->rights->contrat->creer && ($object->statut >= 0))
{
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=editline&amp;rowid='.$objp->rowid.'">';
print '<a style="padding-left: 5px;" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=editline&amp;rowid='.$objp->rowid.'">';
print img_edit();
print '</a>';
}
else {
print '&nbsp;';
}
if ( $user->rights->contrat->creer && ($object->statut >= 0))
{
print '&nbsp;';
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=deleteline&amp;rowid='.$objp->rowid.'">';
print '<a style="padding-left: 5px;" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=deleteline&amp;rowid='.$objp->rowid.'">';
print img_delete();
print '</a>';
}

View File

@ -49,8 +49,10 @@ $search_ref_supplier=GETPOST('search_ref_supplier','alpha');
$sall=GETPOST('sall');
$search_status=GETPOST('search_status');
$socid=GETPOST('socid');
$search_user=GETPOST('search_user','int');
$search_sale=GETPOST('search_sale','int');
$search_product_category=GETPOST('search_product_category','int');
$search_sale = GETPOST('search_sale','int');
$optioncss = GETPOST('optioncss','alpha');
if (! $sortfield) $sortfield="c.rowid";
@ -69,7 +71,9 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
$search_name="";
$search_contract="";
$search_ref_supplier="";
$search_sale="";
$search_user='';
$search_sale='';
$search_product_category='';
$sall="";
$search_status="";
}
@ -82,6 +86,7 @@ if ($search_status == '') $search_status=1;
*/
$now=dol_now();
$form=new Form($db);
$formother = new FormOther($db);
$socstatic = new Societe($db);
@ -99,8 +104,15 @@ $sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
if ($search_sale > 0 || (! $user->rights->societe->client->voir && ! $socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= ", ".MAIN_DB_PREFIX."contrat as c";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat";
if ($search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=cd.fk_product';
if ($search_user > 0)
{
$sql.=", ".MAIN_DB_PREFIX."element_contact as ec";
$sql.=", ".MAIN_DB_PREFIX."c_type_contact as tc";
}
$sql.= " WHERE c.fk_soc = s.rowid ";
$sql.= " AND c.entity = ".$conf->entity;
$sql.= ' AND c.entity IN ('.getEntity('contract', 1).')';
if ($search_product_category > 0) $sql.=" AND cp.fk_categorie = ".$search_product_category;
if ($socid) $sql.= " AND s.rowid = ".$db->escape($socid);
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
@ -122,6 +134,7 @@ if ($search_sale > 0)
if ($sall) {
$sql .= natural_search(array('s.nom', 'cd.label', 'cd.description'), $sall);
}
if ($search_user > 0) $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='contrat' AND tc.source='internal' AND ec.element_id = c.rowid AND ec.fk_socpeople = ".$search_user;
$sql.= " GROUP BY c.rowid, c.ref, c.datec, c.date_contrat, c.statut, c.ref_supplier, s.nom, s.rowid";
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($conf->liste_limit + 1, $offset);
@ -136,26 +149,47 @@ if ($resql)
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<table class="liste" width="100%">';
// If the user can view prospects other than his'
$moreforfilter='';
if ($user->rights->societe->client->voir || $socid)
{
$langs->load("commercial");
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
$moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user);
$moreforfilter.=' &nbsp; &nbsp; &nbsp; ';
$moreforfilter.='</div>';
}
if ($moreforfilter)
// If the user can view other users
if ($user->rights->user->user->lire)
{
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
$moreforfilter.='</div>';
}
// If the user can view categories of products
if ($conf->categorie->enabled && $user->rights->produit->lire)
{
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1);
$moreforfilter.='</div>';
}
if (! empty($moreforfilter))
{
print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="9">';
print $moreforfilter;
print '</td></tr>';
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
print '<tr class="liste_titre">';
$param='&search_contract='.$search_contract;
@ -171,10 +205,11 @@ if ($resql)
//print_liste_field_titre($langs->trans("DateCreation"), $_SERVER["PHP_SELF"], "c.datec","","$param",'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateContract"), $_SERVER["PHP_SELF"], "c.date_contrat","","$param",'align="center"',$sortfield,$sortorder);
//print_liste_field_titre($langs->trans("Status"), $_SERVER["PHP_SELF"], "c.statut","","$param",'align="center"',$sortfield,$sortorder);
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(0,3).'</td>';
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(4,3,0).'</td>';
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(4,3,1).'</td>';
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(5,3).'</td>';
print_liste_field_titre($staticcontratligne->LibStatut(0,3), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(4,3,0), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(4,3,1), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(5,3), '', '', '', '', 'width="16"');
print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch ');
print "</tr>\n";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@ -190,7 +225,8 @@ if ($resql)
print '</td>';
print '<td class="liste_titre">&nbsp;</td>';
//print '<td class="liste_titre">&nbsp;</td>';
print '<td colspan="5" class="liste_titre" align="right"><input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '<td class="liste_titre" colspan="5"></td>';
print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
print "</td></tr>\n";
@ -250,6 +286,7 @@ if ($resql)
print '<td align="center">'.($obj->nb_running>0?$obj->nb_running:'').'</td>';
print '<td align="center">'.($obj->nb_expired>0?$obj->nb_expired:'').'</td>';
print '<td align="center">'.($obj->nb_closed>0 ?$obj->nb_closed:'').'</td>';
print '<td></td>';
print "</tr>\n";
$i++;
}

View File

@ -434,6 +434,80 @@ abstract class CommonObject
}
/**
* Return full address of contact
*
* @param Societe $object Object Societe or null
* @return string Full address string
*/
function getBannerAddress($htmlkey, $object=null)
{
global $conf, $langs;
$countriesusingstate=array('AU','US','IN','GB','ES','UK','TR');
$out='';
$out.='<!-- BEGIN PHP TEMPLATE address_view.tpl.php -->';
$outdone=0;
$coords = $this->getFullAddress(1,', ');
if (! empty($conf->use_javascript_ajax))
{
$namecoords = $this->getFullName($langs,1).'<br>'.$coords;
// hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile
$out.='<a href="#" class="hideonsmartphone" onclick="return copyToClipboard(\''.dol_escape_js($namecoords).'\',\''.dol_escape_js($langs->trans("HelpCopyToClipboard")).'\');">';
$out.=img_picto($langs->trans("Address"), 'object_address.png');
$out.='</a> ';
}
if ($coords) {
$out.=dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1); $outdone++;
$outdone++;
}
if (! in_array($object->country_code,$countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS)
&& ! empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state)
{
$out.=($outdone?'<br>':'').$this->state;
$outdone++;
}
if ($this->phone_pro || $this->phone_mobile || $this->phone_perso || $this->fax) $out.=($outdone?'<br>':'');
if ($this->phone_pro) {
$out.=dol_print_phone($this->phone_pro,$country_code['code'],$this->rowid,$object->id,'AC_TEL','&nbsp;','phone'); $outdone++;
}
if ($this->phone_mobile) {
$out.=dol_print_phone($this->phone_mobile,$country_code['code'],$this->rowid,$object->id,'AC_TEL','&nbsp;','phone'); $outdone++;
}
if ($this->phone_perso) {
$out.=dol_print_phone($this->phone_perso,$country_code['code'],$this->rowid,$object->id,'AC_TEL','&nbsp;','phone'); $outdone++;
}
if ($this->fax) {
$out.=dol_print_phone($this->fax,$country_code['code'],$this->rowid,$object->id,'AC_FAX','&nbsp;','fax'); $outdone++;
}
$out.='<div style="clear: both;"></div>';
$outdone=0;
if ($this->email)
{
$out.=dol_print_email($this->email,$this->id,$object->id,'AC_EMAIL',0,0,1);
$outdone++;
}
if ($this->url)
{
$out.=dol_print_url($this->url,'',0,1);
$outdone++;
}
if (! empty($conf->skype->enabled))
{
if ($this->skype) $out.=($outdone?'<br>':'').dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE');
}
$out.='<!-- END PHP TEMPLATE address_view.tpl.php -->';
return $out;
}
/**
* Add a link between element $this->element and a contact
*

View File

@ -4591,34 +4591,36 @@ class Form
{
global $conf, $langs;
$out = '';
// Add code for jquery to use multiselect
if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT'))
{
$tmpplugin=empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)?constant('REQUIRE_JQUERY_MULTISELECT'):$conf->global->MAIN_USE_JQUERY_MULTISELECT;
print '<!-- JS CODE TO ENABLE '.$tmpplugin.' for id '.$htmlname.' -->
$out.='<!-- JS CODE TO ENABLE '.$tmpplugin.' for id '.$htmlname.' -->
<script type="text/javascript">
function formatResult(record) {'."\n";
if ($elemtype == 'category')
{
print ' //return \'<span><img src="'.DOL_URL_ROOT.'/theme/eldy/img/object_category.png'.'"> <a href="'.DOL_URL_ROOT.'/categories/viewcat.php?type=0&id=\'+record.id+\'">\'+record.text+\'</a></span>\';
$out.=' //return \'<span><img src="'.DOL_URL_ROOT.'/theme/eldy/img/object_category.png'.'"> <a href="'.DOL_URL_ROOT.'/categories/viewcat.php?type=0&id=\'+record.id+\'">\'+record.text+\'</a></span>\';
return \'<span><img src="'.DOL_URL_ROOT.'/theme/eldy/img/object_category.png'.'"> \'+record.text+\'</span>\';';
}
else
{
print 'return record.text;';
$out.='return record.text;';
}
print ' };
$out.= ' };
function formatSelection(record) {'."\n";
if ($elemtype == 'category')
{
print ' //return \'<span><img src="'.DOL_URL_ROOT.'/theme/eldy/img/object_category.png'.'"> <a href="'.DOL_URL_ROOT.'/categories/viewcat.php?type=0&id=\'+record.id+\'">\'+record.text+\'</a></span>\';
$out.=' //return \'<span><img src="'.DOL_URL_ROOT.'/theme/eldy/img/object_category.png'.'"> <a href="'.DOL_URL_ROOT.'/categories/viewcat.php?type=0&id=\'+record.id+\'">\'+record.text+\'</a></span>\';
return \'<span><img src="'.DOL_URL_ROOT.'/theme/eldy/img/object_category.png'.'"> \'+record.text+\'</span>\';';
}
else
{
print 'return record.text;';
$out.='return record.text;';
}
print ' };
$out.= ' };
$(document).ready(function () {
$(\'#'.$htmlname.'\').'.$tmpplugin.'({
dir: \'ltr\',
@ -4636,7 +4638,7 @@ class Form
// Try also magic suggest
// Add data-role="none" to disable jmobile decoration
$out = '<select data-role="none" id="'.$htmlname.'" class="multiselect'.($morecss?' '.$morecss:'').'" multiple name="'.$htmlname.'[]"'.($moreattrib?' '.$moreattrib:'').($width?' style="width: '.(preg_match('/%/',$width)?$width:$width.'px').'"':'').'>'."\n";
$out .= '<select data-role="none" id="'.$htmlname.'" class="multiselect'.($morecss?' '.$morecss:'').'" multiple name="'.$htmlname.'[]"'.($moreattrib?' '.$moreattrib:'').($width?' style="width: '.(preg_match('/%/',$width)?$width:$width.'px').'"':'').'>'."\n";
if (is_array($array) && ! empty($array))
{
if ($value_as_key) $array=array_combine($array, $array);
@ -4665,6 +4667,84 @@ class Form
}
/**
* Show a multiselect form from an array.
*
* @param string $htmlname Name of select
* @param array $array Array with array to show
* @return string HTML multiselect string
* @see selectarray
*/
static function multiSelectArrayWithCheckbox($htmlname, $array)
{
$lis='';
$liststring='';
foreach($array as $key => $val)
{
if (isset($val['cond']) && ! $val['cond']) continue;
if ($val['label'])
{
$lis.='<li><input type="checkbox" value="'.$key.'"'.($val['checked']?' checked="checked"':'').'/>'.dol_escape_htmltag($val['label']).'</li>';
$liststring.=$key.',';
}
}
$out ='<!-- Component multiSelectArrayWithCheckbox '.$htmlname.' -->
<dl class="dropdown">
<dt>
<a href="#">
'.img_picto('','list').'
<input type="hidden" class="'.$htmlname.'" name="'.$htmlname.'" value="'.$liststring.'">
</a>
</dt>
<dd>
<div class="multiselectcheckbox'.$htmlname.'">
<ul>
'.$lis.'
</ul>
</div>
</dd>
</dl>
<script type="text/javascript">
$(".dropdown dt a").on(\'click\', function () {
$(".dropdown dd ul").slideToggle(\'fast\');
});
$(".dropdown dd ul li a").on(\'click\', function () {
$(".dropdown dd ul").hide();
});
function getSelectedValue(id) {
return $("#" + id).find("dt a span.value").html();
}
$(document).bind(\'click\', function (e) {
var $clicked = $(e.target);
if (!$clicked.parents().hasClass("dropdown")) $(".dropdown dd ul").hide();
});
$(\'.multiselectcheckbox'.$htmlname.' input[type="checkbox"]\').on(\'click\', function () {
var title = $(this).val() + ",";
if ($(this).is(\':checked\')) {
$(\'.'.$htmlname.'\').val(title + $(\'.'.$htmlname.'\').val());
}
else {
$(\'.'.$htmlname.'\').val( $(\'.'.$htmlname.'\').val().replace(title, \'\') )
}
});
</script>
';
return $out;
}
/**
* Render list of categories linked to object with id $id and type $type
@ -5042,16 +5122,18 @@ class Form
* @param int $shownav Show Condition (navigation is shown if value is 1)
* @param string $fieldid Nom du champ en base a utiliser pour select next et previous (we make the select max and min on this field)
* @param string $fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous
* @param string $morehtmlref Code html supplementaire a afficher apres ref
* @param string $morehtmlref More html to show after ref
* @param string $moreparam More param to add in nav link url.
* @param int $nodbprefix Do not include DB prefix to forge table name
* @param string $morehtmlleft More html code to show before ref
* @param string $morehtmlright More html code to show before navigation arrows
* @return string Portion HTML avec ref + boutons nav
*/
function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0)
function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlright='')
{
global $langs,$conf;
$ret='';
$ret='';
if (empty($fieldid)) $fieldid='rowid';
if (empty($fieldref)) $fieldref='ref';
@ -5064,14 +5146,18 @@ class Form
$next_ref = $object->ref_next?'<a data-role="button" data-icon="arrow-r" data-iconpos="right" href="'.$_SERVER["PHP_SELF"].'?'.$paramid.'='.urlencode($object->ref_next).$moreparam.'">'.(empty($conf->dol_use_jmobile)?'>':'&nbsp;').'</a>':'';
//print "xx".$previous_ref."x".$next_ref;
$ret.='<div style="vertical-align: middle"><div class="inline-block floatleft refid'.(($shownav && ($previous_ref || $next_ref))?' refidpadding':'').'">';
$ret.='<div style="vertical-align: middle">';
$ret.='<div class="inline-block floatleft">'.$morehtmlleft.'</div>';
$ret.='<div class="inline-block floatleft valignmiddle refid'.(($shownav && ($previous_ref || $next_ref))?' refidpadding':'').'">';
$ret.=dol_htmlentities($object->$fieldref);
if ($morehtmlref)
{
$ret.=' '.$morehtmlref;
}
$ret.='</div>';
$ret.='</div>';
if ($previous_ref || $next_ref || $morehtml)
{
@ -5079,23 +5165,20 @@ class Form
}
if ($morehtml)
{
//$ret.='</td><td class="paddingrightonly" align="right">'.$morehtml;
$ret.='<li class="noborder litext">'.$morehtml.'</li>';
}
if ($shownav && ($previous_ref || $next_ref))
{
//$ret.='</td><td class="nobordernopadding" align="center" width="20">'.$previous_ref.'</td>';
//$ret.='<td class="nobordernopadding" align="center" width="20">'.$next_ref;
$ret.='<li class="pagination">'.$previous_ref.'</li>';
$ret.='<li class="pagination">'.$next_ref.'</li>';
}
if ($previous_ref || $next_ref || $morehtml)
{
//$ret.='</td></tr></table>';
$ret.='</ul></div>';
}
$ret.='</div>';
$ret.='<div class="statusref">'.$morehtmlright.'</div>';
$ret.='</div>';
return $ret;
}
@ -5132,15 +5215,16 @@ class Form
/**
* Return HTML code to output a photo
*
* @param string $modulepart Key to define module concerned ('societe', 'userphoto', 'memberphoto')
* @param object $object Object containing data to retrieve file name
* @param int $width Width of photo
* @param int $height Height of photo (auto if 0)
* @param int $caneditfield Add edit fields
* @param string $cssclass CSS name to use on img for photo
* @return string HTML code to output photo
* @param string $modulepart Key to define module concerned ('societe', 'userphoto', 'memberphoto')
* @param object $object Object containing data to retrieve file name
* @param int $width Width of photo
* @param int $height Height of photo (auto if 0)
* @param int $caneditfield Add edit fields
* @param string $cssclass CSS name to use on img for photo
* @param int $genericifundef Use a generic image if no image avaiable
* @return string HTML code to output photo
*/
static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin')
static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $genericifundef=0)
{
global $conf,$langs;

View File

@ -688,10 +688,9 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
{
$obj = $db->fetch_object($result);
$var = !$var;
print "<tr ".$bc[$var].">";
print '<td>';
$contactstatic->id = $obj->rowid;
$contactstatic->ref = $obj->ref;
$contactstatic->statut = $obj->statut;
$contactstatic->lastname = $obj->lastname;
$contactstatic->firstname = $obj->firstname;
@ -704,44 +703,23 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
$contactstatic->phone_mobile = $obj->phone_mobile;
$contactstatic->phone_perso = $obj->phone_perso;
$contactstatic->email = $obj->email;
$contactstatic->web = $obj->web;
$contactstatic->skype = $obj->skype;
$country_code = getCountry($obj->country_id, 'all');
$contactstatic->country_code = $country_code;
print "<tr ".$bc[$var].">";
print '<td>';
print $contactstatic->getNomUrl(1,'',0,'&backtopage='.urlencode($backtopage));
print '</td><td>';
if ($obj->poste) print $obj->poste;
print '</td>';
$country_code = getCountry($obj->country_id, 'all');
// Address and phone
print '<td>';
$outdone=0;
$contactstatic->address = $obj->address;
$contactstatic->zip = $obj->zip;
$contactstatic->town = $obj->town;
$contactstatic->country_id = $obj->country_id;
$coords = $contactstatic->getFullAddress(1,', ');
if (! empty($conf->use_javascript_ajax))
{
$namecoords = $contactstatic->getFullName($langs,1).'<br>'.$coords;
// hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile
print '<a href="#" class="hideonsmartphone" onclick="return copyToClipboard(\''.dol_escape_js($namecoords).'\',\''.dol_escape_js($langs->trans("HelpCopyToClipboard")).'\');">';
print img_picto($langs->trans("Address"), 'object_address.png');
print '</a> ';
}
if ($coords) { print dol_print_address($coords,'address_contact_'.$obj->rowid, 'contact', $obj->rowid); $outdone++; }
if ($obj->phone_pro || $obj->phone_mobile || $obj->phone_perso || $obj->fax) print ($outdone?'<br>':'');
if ($obj->phone_pro) { print dol_print_phone($obj->phone_pro,$country_code['code'],$obj->rowid,$object->id,'AC_TEL','&nbsp;','phone'); $outdone++; }
if ($obj->phone_mobile) { print dol_print_phone($obj->phone_mobile,$country_code['code'],$obj->rowid,$object->id,'AC_TEL','&nbsp;','phone'); $outdone++; }
if ($obj->phone_perso) { print dol_print_phone($obj->phone_perso,$country_code['code'],$obj->rowid,$object->id,'AC_TEL','&nbsp;','phone'); $outdone++; }
if ($obj->fax) { print dol_print_phone($obj->fax,$country_code['code'],$obj->rowid,$object->id,'AC_FAX','&nbsp;','fax'); $outdone++; }
print '<div style="clear: both;"></div>';
$outdone=0;
if ($obj->email) print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL',0,0,1);
if (! empty($conf->skype->enabled))
{
if ($obj->skype) print ($outdone?'<br>':'').dol_print_skype($obj->skype,$obj->rowid,$object->id,'AC_SKYPE');
}
print $contactstatic->getBannerAddress('contact', $object);
print '</td>';
// Status

View File

@ -915,7 +915,7 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
else if (in_array($object->country_code,array('ES','TR'))) // ES: title firstname name \n address lines \n zip town \n state \n country
{
$ret .= ($ret ? $sep : '' ).$object->zip;
$ret .= ($object->town?' '.$object->town:'');
$ret .= ($object->town?(($object->zip?' ':'').$object->town):'');
if ($object->state && in_array($object->country_code,$countriesusingstate))
{
$ret.="\n".$object->state;
@ -925,10 +925,10 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
else // Other: title firstname name \n address lines \n zip town \n country
{
$ret .= ($ret ? $sep : '' ).$object->zip;
$ret .= ($object->town?' '.$object->town:'');
$ret .= ($object->town?(($object->zip?' ':'').$object->town):'');
if ($object->state && in_array($object->country_code,$countriesusingstate))
{
$ret.=", ".$object->state;
$ret.=($ret?", ":'').$object->state;
}
}
if (! is_object($outputlangs)) $outputlangs=$langs;
@ -1315,20 +1315,25 @@ function dol_print_size($size,$shortvalue=0,$shortunit=0)
* @param string $url Url to show
* @param string $target Target for link
* @param int $max Max number of characters to show
* @param int $withpicto With picto
* @return string HTML Link
*/
function dol_print_url($url,$target='_blank',$max=32)
function dol_print_url($url,$target='_blank',$max=32,$withpicto=0)
{
global $langs;
if (empty($url)) return '';
$link='<a href="';
if (! preg_match('/^http/i',$url)) $link.='http://';
$link.=$url;
if ($target) $link.='" target="'.$target.'">';
$link.='"';
if ($target) $link.=' target="'.$target.'"';
$link.='>';
if (! preg_match('/^http/i',$url)) $link.='http://';
$link.=dol_trunc($url,$max);
$link.='</a>';
return $link;
return '<div class="nospan float" style="margin-right: 10px">'.($withpicto?img_picto($langs->trans("Url"), 'object_globe.png').' ':'').$link.'</div>';
}
/**
@ -1591,26 +1596,30 @@ function dol_user_country()
/**
* Format address string
*
* @param string $address Address
* @param int $htmlid Html ID (for example 'gmap')
* @param int $mode thirdparty|contact|member|other
* @param int $id Id of object
* @return void
* @param string $address Address
* @param int $htmlid Html ID (for example 'gmap')
* @param int $mode thirdparty|contact|member|other
* @param int $id Id of object
* @param int $noprint No output. Result is the function return
* @return string|void Nothing if noprint is 0, formatted address if noprint is 1
* @see dol_format_address
*/
function dol_print_address($address, $htmlid, $mode, $id)
function dol_print_address($address, $htmlid, $mode, $id, $noprint=0)
{
global $conf, $user, $langs, $hookmanager;
$out = '';
if ($address)
{
if ($hookmanager) {
$parameters = array('element' => $mode, 'id' => $id);
$reshook = $hookmanager->executeHooks('printAddress', $parameters, $address);
print $hookmanager->resPrint;
$out.=$hookmanager->resPrint;
}
if (empty($reshook)) {
print nl2br($address);
if (empty($reshook))
{
$out.=nl2br($address);
$showgmap=$showomap=0;
if ($mode=='thirdparty' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS)) $showgmap=1;
if ($mode=='contact' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS_CONTACTS)) $showgmap=1;
@ -1623,15 +1632,17 @@ function dol_print_address($address, $htmlid, $mode, $id)
if ($showgmap)
{
$url=dol_buildpath('/google/gmaps.php?mode='.$mode.'&id='.$id,1);
print ' <a href="'.$url.'" target="_gmaps"><img id="'.$htmlid.'" border="0" src="'.DOL_URL_ROOT.'/theme/common/gmap.png"></a>';
$out.=' <a href="'.$url.'" target="_gmaps"><img id="'.$htmlid.'" border="0" src="'.DOL_URL_ROOT.'/theme/common/gmap.png"></a>';
}
if ($showomap)
{
$url=dol_buildpath('/openstreetmap/maps.php?mode='.$mode.'&id='.$id,1);
print ' <a href="'.$url.'" target="_gmaps"><img id="'.$htmlid.'_openstreetmap" border="0" src="'.DOL_URL_ROOT.'/theme/common/gmap.png"></a>';
$out.=' <a href="'.$url.'" target="_gmaps"><img id="'.$htmlid.'_openstreetmap" border="0" src="'.DOL_URL_ROOT.'/theme/common/gmap.png"></a>';
}
}
}
if ($noprint) return $out;
else print $out;
}
@ -2669,7 +2680,8 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
$sortorder=strtoupper($sortorder);
$out='';
$sortimg='';
$tag='th';
if ($thead==2) $tag='div';
@ -2678,25 +2690,33 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= '<'.$tag.' class="'.$prefix.'liste_titre_sel" '. $moreattrib.'>';
else $out.= '<'.$tag.' class="'.$prefix.'liste_titre" '. $moreattrib.'>';
if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
if (empty($thead) && $field) // If this is a sort field
{
$options=preg_replace('/sortfield=([a-zA-Z0-9,\s\.]+)/i','',$moreparam);
$options=preg_replace('/sortorder=([a-zA-Z0-9,\s\.]+)/i','',$options);
$options=preg_replace('/&+/i','&',$options);
if (! preg_match('/^&/',$options)) $options='&'.$options;
if ($sortorder == 'DESC' ) $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">';
if ($sortorder == 'ASC' ) $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">';
if ($field != $sortfield)
{
if ($sortorder == 'DESC') $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">';
if ($sortorder == 'ASC' || ! $sortorder) $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">';
}
else
{
if ($sortorder == 'DESC' || ! $sortorder) $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">';
if ($sortorder == 'ASC') $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">';
}
}
$out.=$name;
if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
if (empty($thead) && $field) // If this is a sort field
{
$out.='</a>';
}
if (empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
if (empty($thead) && $field) // If this is a sort field
{
$options=preg_replace('/sortfield=([a-zA-Z0-9,\s\.]+)/i','',$moreparam);
$options=preg_replace('/sortorder=([a-zA-Z0-9,\s\.]+)/i','',$options);
@ -2704,27 +2724,33 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
if (! preg_match('/^&/',$options)) $options='&'.$options;
//print "&nbsp;";
$out.= '<img width="2" src="'.DOL_URL_ROOT.'/theme/common/transparent.png" alt=""><span class="nowrap">';
$sortimg.= '<img width="2" src="'.DOL_URL_ROOT.'/theme/common/transparent.png" alt="">';
$sortimg.= '<span class="nowrap">';
if (! $sortorder || $field != $sortfield)
{
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",0).'</a>';
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",0).'</a>';
//$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",0).'</a>';
//$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",0).'</a>';
}
else
{
if ($sortorder == 'DESC' ) {
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",0).'</a>';
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",1).'</a>';
//$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",0).'</a>';
//$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",1).'</a>';
$sortimg.= img_up("Z-A",0);
}
if ($sortorder == 'ASC' ) {
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",1).'</a>';
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",0).'</a>';
//$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",1).'</a>';
//$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",0).'</a>';
$sortimg.= img_down("A-Z",0);
}
}
$out.= '</span>';
$sortimg.= '</span>';
}
$out.=$sortimg;
$out.='</'.$tag.'>';
return $out;

View File

@ -270,7 +270,11 @@ class doc_generic_invoice_odt extends ModelePDFFactures
{
// On peut utiliser le nom de la societe du contact
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
else $socobject = $object->client;
else {
$socobject = $object->client;
// if we have a BILLING contact and we dont use it as recipient we store the contact object for later use
$contactobject = $object->contact;
}
}
else
{
@ -344,8 +348,12 @@ class doc_generic_invoice_odt extends ModelePDFFactures
$array_objet=$this->get_substitutionarray_object($object,$outputlangs);
$array_propal=is_object($propal_object)?$this->get_substitutionarray_object($propal_object,$outputlangs,'propal'):array();
$array_other=$this->get_substitutionarray_other($outputlangs);
// retrieve contact information for use in invoice as contact_xxx tags
$array_thirdparty_contact = array();
if ($usecontact)
$array_thirdparty_contact=$this->get_substitutionarray_contact($contactobject,$outputlangs,'contact');
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_propal,$array_other);
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_propal,$array_other,$array_thirdparty_contact);
complete_substitutions_array($tmparray, $outputlangs, $object);
// Call the ODTSubstitution hook
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray);

View File

@ -18,7 +18,7 @@
/**
* \defgroup webservices Module webservices
* \brief Module to enable client for supplier WebServices
* \file htdocs/core/modules/modSyncSupplierWebServices.class.php
* \file htdocs/core/modules/modWebServicesClient.class.php
* \ingroup webservices
* \brief File to describe client for supplier webservices module
*/

View File

@ -288,9 +288,9 @@ class doc_generic_proposal_odt extends ModelePDFPropales
dol_mkdir($conf->propal->dir_temp);
// If BILLING contact defined on invoice, we use it
// If CUSTOMER contact defined on proposal, we use it
$usecontact=false;
$arrayidcontact=$object->getIdContact('external','BILLING');
$arrayidcontact=$object->getIdContact('external','CUSTOMER');
if (count($arrayidcontact) > 0)
{
$usecontact=true;
@ -302,13 +302,16 @@ class doc_generic_proposal_odt extends ModelePDFPropales
{
// On peut utiliser le nom de la societe du contact
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
else $socobject = $object->client;
else {
$socobject = $object->client;
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
$contactobject = $object->contact;
}
}
else
{
$socobject=$object->client;
}
// Make substitution
$substitutionarray=array(
'__FROM_NAME__' => $this->emetteur->name,
@ -369,8 +372,12 @@ class doc_generic_proposal_odt extends ModelePDFPropales
$array_thirdparty=$this->get_substitutionarray_thirdparty($socobject,$outputlangs);
$array_objet=$this->get_substitutionarray_object($object,$outputlangs);
$array_other=$this->get_substitutionarray_other($outputlangs);
// retrieve contact information for use in proposal as contact_xxx tags
$array_thirdparty_contact = array();
if ($usecontact)
$array_thirdparty_contact=$this->get_substitutionarray_contact($contactobject,$outputlangs,'contact');
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_other);
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_other,$array_thirdparty_contact);
complete_substitutions_array($tmparray, $outputlangs, $object);
// Call the ODTSubstitution hook
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray);

View File

@ -195,9 +195,10 @@ if ($resql)
if (! empty($conf->categorie->enabled))
{
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_SUPPLIER,$search_categ,'search_categ',1);
$moreforfilter.=' &nbsp; &nbsp; &nbsp; ';
$moreforfilter.='</div>';
}
if ($moreforfilter)
{
@ -209,8 +210,8 @@ if ($resql)
print '</div>';
}
print '<table class="liste">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'valign="middle"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.zip","",$param,'valign="middle"',$sortfield,$sortorder);

View File

@ -6873,7 +6873,7 @@
<md5file name="modCashDesk.class.php">69982f8171837cd8669bfe9c2f08dc8f</md5file>
<md5file name="modLdap.class.php">ddf6dfeb77c98411b4d5434f20c24483</md5file>
<md5file name="modFacture.class.php">c23010fa68c5996cb5977f84a6bb7ceb</md5file>
<md5file name="modSyncSupplierWebServices.class.php">90a300e9bd857966226c68dca8660456</md5file>
<md5file name="modWebServicesClient.class.php">822961d86ae558588632b3b08c085b89</md5file>
<md5file name="index.html">d41d8cd98f00b204e9800998ecf8427e</md5file>
<md5file name="modIncoterm.class.php">b4e9f07aa5268af49d3bb9429719b201</md5file>
<md5file name="modFTP.class.php">8293bd60fe13ac64c22f8500b346821c</md5file>

View File

@ -281,8 +281,6 @@ else
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="type" value="'.$type.'">';
print '<table class="liste" width="100%">';
// Filter on categories
$moreforfilter='';
$colspan=6;
@ -294,19 +292,23 @@ else
if (! empty($conf->categorie->enabled))
{
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ',1);
$moreforfilter.=' &nbsp; &nbsp; &nbsp; ';
$moreforfilter.='</div>';
}
if ($moreforfilter)
{
print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="'.$colspan.'">';
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
print '</td></tr>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
// Lignes des titres
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label",$param,"","",$sortfield,$sortorder);

View File

@ -215,27 +215,35 @@ if ($resql)
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="type" value="'.$type.'">';
print '<table class="liste" width="100%">';
// Filter on categories
$moreforfilter='';
if (! empty($conf->categorie->enabled))
{
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ');
$moreforfilter.=' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ';
$moreforfilter.='</div>';
}
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans("StockTooLow").' <input type="checkbox" name="toolowstock" value="1"'.($toolowstock?' checked':'').'>';
if ($moreforfilter)
{
print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="9">';
print $moreforfilter;
print '</td></tr>';
}
$moreforfilter.='</div>';
if (! empty($moreforfilter))
{
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
$param="&tosell=$tosell&tobuy=$tobuy".(isset($type)?"&type=$type":"")."&fourn_id=$fourn_id&snom=$snom&sref=$sref";
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
// Lignes des titres
print "<tr class=\"liste_titre\">";
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder);

View File

@ -227,27 +227,32 @@ if ($resql)
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="type" value="'.$type.'">';
print '<table class="liste" width="100%">';
// Filter on categories
$moreforfilter='';
if (! empty($conf->categorie->enabled))
{
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ');
$moreforfilter.=' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ';
$moreforfilter.='</div>';
}
//$moreforfilter.=$langs->trans("StockTooLow").' <input type="checkbox" name="toolowstock" value="1"'.($toolowstock?' checked':'').'>';
if ($moreforfilter)
{
print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="11">';
print $moreforfilter;
print '</td></tr>';
}
if (! empty($moreforfilter))
{
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
$param="&tosell=$tosell&tobuy=$tobuy".(isset($type)?"&type=$type":"")."&fourn_id=$fourn_id&snom=$snom&sref=$sref&batch=$batch&eatby=$eatby&sellby=$sellby";
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
// Lignes des titres
print "<tr class=\"liste_titre\">";
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder);

View File

@ -188,7 +188,8 @@ if ($id > 0 || ! empty($ref))
}
print_barre_liste($langs->trans("CustomersOrders"),$page,$_SERVER["PHP_SELF"],"&amp;id=$product->id",$sortfield,$sortorder,'',$num,$totalrecords,'');
print '<div class="liste_titre">';
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print '<div class="divsearchfield">';
print $langs->trans('Period').' ('.$langs->trans("OrderDate") .') - ';
print $langs->trans('Month') . ':<input class="flat" type="text" size="4" name="search_month" value="' . $search_month . '"> ';
print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5);
@ -197,9 +198,10 @@ if ($id > 0 || ! empty($ref))
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
print '</div>';
print '</div>';
print '</div>';
$i = 0;
print '<table class="noborder" width="100%">';
print '<table class="tagtable liste listwithfilterbefore" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","",$option,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$option,'',$sortfield,$sortorder);

View File

@ -198,7 +198,8 @@ if ($id > 0 || ! empty($ref)) {
}
print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], "&amp;id=$product->id", $sortfield, $sortorder, '', $num, $totalrecords, '');
print '<div class="liste_titre">';
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print '<div class="divsearchfield">';
print $langs->trans('Period') . ' (' . $langs->trans("OrderDate") . ') - ';
print $langs->trans('Month') . ':<input class="flat" type="text" size="4" name="search_month" value="' . $search_month . '"> ';
print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5);
@ -207,9 +208,10 @@ if ($id > 0 || ! empty($ref)) {
print '<input type="image" class="liste_titre" name="button_removefilter" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">';
print '</div>';
print '</div>';
print '</div>';
$i = 0;
print '<table class="noborder" width="100%">';
print '<table class="tagtable liste listwithfilterbefore" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid", "", $option, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder);

View File

@ -147,7 +147,7 @@ if ($id > 0 || ! empty($ref))
print_barre_liste($langs->trans("Contrats"),$page,$_SERVER["PHP_SELF"],"&amp;id=$product->id",$sortfield,$sortorder,'',$num,0,'');
$i = 0;
print "<table class=\"noborder\" width=\"100%\">";
print '<table class="tagtable liste listwithfilterbefore" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","","&amp;id=".$product->id,'',$sortfield,$sortorder);
@ -155,9 +155,9 @@ if ($id > 0 || ! empty($ref))
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&amp;id=".$product->id,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"c.date_contrat","","&amp;id=".$product->id,'align="center"',$sortfield,$sortorder);
//print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.amount","","&amp;id=".$product->id,'align="right"',$sortfield,$sortorder);
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(0,3).'</td>';
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(4,3).'</td>';
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(5,3).'</td>';
print_liste_field_titre($staticcontratligne->LibStatut(0,3),$_SERVER["PHP_SELF"],"",'','','width="16"',$sortfield,$sortorder,'maxwidthsearch ');
print_liste_field_titre($staticcontratligne->LibStatut(4,3),$_SERVER["PHP_SELF"],"",'','','width="16"',$sortfield,$sortorder,'maxwidthsearch ');
print_liste_field_titre($staticcontratligne->LibStatut(5,3),$_SERVER["PHP_SELF"],"",'','','width="16"',$sortfield,$sortorder,'maxwidthsearch ');
print "</tr>\n";
$contratstatic=new Contrat($db);

View File

@ -22,7 +22,7 @@
/**
* \file htdocs/product/stats/facture.php
* \ingroup product service facture
* \brief Page des stats des factures clients pour un produit
* \brief Page of invoice statistics for a product
*/
require '../../main.inc.php';
@ -128,7 +128,8 @@ if ($id > 0 || ! empty($ref))
print '</div>';
if ($user->rights->facture->lire) {
if ($user->rights->facture->lire)
{
$sql = "SELECT distinct s.nom as name, s.rowid as socid, s.code_client,";
$sql.= " f.facnumber, d.total_ht as total_ht,";
$sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid, d.qty";
@ -189,7 +190,8 @@ if ($id > 0 || ! empty($ref))
}
print_barre_liste($langs->trans("CustomersInvoices"),$page,$_SERVER["PHP_SELF"],"&amp;id=".$product->id,$sortfield,$sortorder,'',$num,$totalrecords,'');
print '<div class="liste_titre">';
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print '<div class="divsearchfield">';
print $langs->trans('Period').' ('.$langs->trans("DateInvoice") .') - ';
print $langs->trans('Month') . ':<input class="flat" type="text" size="4" name="search_month" value="' . $search_month . '"> ';
print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5);
@ -198,9 +200,10 @@ if ($id > 0 || ! empty($ref))
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
print '</div>';
print '</div>';
print '</div>';
$i = 0;
print '<table class="noborder" width="100%">';
print '<table class="tagtable liste listwithfilterbefore" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"s.rowid","",$option,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$option,'',$sortfield,$sortorder);

View File

@ -190,7 +190,8 @@ if ($id > 0 || ! empty($ref))
}
print_barre_liste($langs->trans("SuppliersInvoices"), $page, $_SERVER["PHP_SELF"], "&amp;id=$product->id", $sortfield, $sortorder, '', $num, $totalrecords, '');
print '<div class="liste_titre">';
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print '<div class="divsearchfield">';
print $langs->trans('Period') . ' (' . $langs->trans("DateInvoice") . ') - ';
print $langs->trans('Month') . ':<input class="flat" type="text" size="4" name="search_month" value="' . $search_month . '"> ';
print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5);
@ -199,9 +200,10 @@ if ($id > 0 || ! empty($ref))
print '<input type="image" class="liste_titre" name="button_removefilter" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">';
print '</div>';
print '</div>';
print '</div>';
$i = 0;
print '<table class="noborder" width="100%">';
print '<table class="tagtable liste listwithfilterbefore" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "s.rowid", "", $option, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder);

View File

@ -191,7 +191,8 @@ if ($id > 0 || ! empty($ref))
}
print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], "&amp;id=$product->id", $sortfield, $sortorder, '', $num, $totalrecords, '');
print '<div class="liste_titre">';
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print '<div class="divsearchfield">';
print $langs->trans('Period') . ' (' . $langs->trans("DatePropal") . ') - ';
print $langs->trans('Month') . ':<input class="flat" type="text" size="4" name="search_month" value="' . $search_month . '"> ';
print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5);
@ -200,9 +201,10 @@ if ($id > 0 || ! empty($ref))
print '<input type="image" class="liste_titre" name="button_removefilter" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">';
print '</div>';
print '</div>';
print '</div>';
$i = 0;
print '<table class="noborder" width="100%">';
print '<table class="tagtable liste listwithfilterbefore" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.rowid", "", $option, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder);

View File

@ -274,15 +274,18 @@ if ($resql)
if (! empty($moreforfilter))
{
print '<div class="liste_titre liste_titre_bydiv centpercent">';
//print '<tr class="liste_titre">';
//print '<td class="liste_titre" colspan="'.$colspan.'">';
print $moreforfilter;
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
//print '</td></tr>';
}
print '<table class="liste">';
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"p.ref","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"p.title","",$param,"",$sortfield,$sortorder);

View File

@ -269,7 +269,8 @@ dol_fiche_head($head,'byyear',$langs->trans("Statistics"), 0, '');
print '<div class="fichecenter"><div class="fichethirdleft">';
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<table class="border" width="100%">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
// Company
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
@ -293,8 +294,8 @@ print '</table>';
print '</form>';
print '<br><br>';
print '<table class="border" width="100%">';
print '<tr height="24">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre" height="24">';
print '<td align="center">'.$langs->trans("Year").'</td>';
print '<td align="center">'.$langs->trans("NbOfProjects").'</td>';
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
@ -305,13 +306,15 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
print '</tr>';
$oldyear=0;
$var=true;
foreach ($data_all_year as $val)
{
$year = $val['year'];
while ($year && $oldyear > $year+1)
{ // If we have empty year
$oldyear--;
print '<tr height="24">';
$var=!$var;
print '<tr '.$bc[$var].' height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
{
@ -321,7 +324,8 @@ foreach ($data_all_year as $val)
print '<td align="right">0</td>';
print '</tr>';
}
print '<tr height="24">';
$var=!$var;
print '<tr '.$bc[$var].' height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&amp;mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
print '<td align="right">'.$val['nb'].'</td>';
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))

View File

@ -141,7 +141,7 @@ if (! empty($moreforfilter))
print '</div>';
}
print '<table class="liste">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" id="tablelines3">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Project").'</td>';
print '<td>'.$langs->trans("ProjectStatus").'</td>';

View File

@ -146,9 +146,7 @@ $nav.='</form>';
print_barre_liste('Title of my list', 3, $_SERVER["PHP_SELF"], '', '', '', 'Text in middle', 20, 5000, '', 0, $nav);
?>
<table class="liste noborder tagtable centpercent" id="tablelines3">
<?php
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('This is a select list for a filter A'). ': ';
$cate_arbo = array('field1'=>'value1a into the select list A','field2'=>'value2a');
@ -175,11 +173,15 @@ $moreforfilter.='</div>';
if (! empty($moreforfilter))
{
print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="10">';
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
print '</td></tr>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" id="tablelines3">';
?>
<tr class="liste_titre">
<?php print getTitleFieldOfList($langs->trans('title1'),0,$_SERVER["PHP_SELF"],'aaa','','','align="left"',$sortfield,$sortorder); ?>
@ -188,7 +190,9 @@ if (! empty($moreforfilter))
</tr>
<tr class="pair"><td><?php echo $productspecimen->getNomUrl(1); ?></td><td align="right">b1</td><td class="tdlineupdown" align="left">c1</td></tr>
<tr class="impair"><td>a2</td><td align="right">b2</td><td class="tdlineupdown" align="left">c2</td></tr>
</table>
<?php
print '</table>';
?>
<br>

View File

@ -208,9 +208,9 @@ $title=$langs->trans("ListOfThirdParties");
$sql = "SELECT s.rowid, s.nom as name, s.barcode, s.town, s.datec, s.code_client, s.code_fournisseur, ";
$sql.= " st.libelle as stcomm, s.prefix_comm, s.client, s.fournisseur, s.canvas, s.status as status,";
$sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4";
$sql.= ",s.fk_pays";
$sql.= ",typent.code as typent_code";
$sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4,";
$sql.= " s.fk_pays, s.tms as date_update, s.datec as date_creation,";
$sql.= " typent.code as typent_code";
// We'll need these fields in order to filter by sale (including the case where the user can only see his prospects)
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user";
// We'll need these fields in order to filter by categ
@ -321,22 +321,18 @@ if ($resql)
$moreforfilter='';
if (! empty($conf->categorie->enabled))
{
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.=$htmlother->select_categories(Categories::TYPE_CUSTOMER,$search_categ,'search_categ');
$moreforfilter.=' &nbsp; &nbsp; &nbsp; ';
$moreforfilter.='</div>';
}
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid)
{
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.=$langs->trans('SalesRepresentatives'). ': ';
$moreforfilter.=$htmlother->select_salesrepresentatives($search_sale,'search_sale',$user);
}
if ($moreforfilter)
{
print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="8">';
print $moreforfilter;
print '</td></tr>';
$moreforfilter.='</div>';
}
*/
if (! empty($moreforfilter))
@ -349,10 +345,29 @@ if ($resql)
print '</div>';
}
print '<table class="liste">';
// Define list of fields to show into list
$arrayfields=array(
's.nom'=>array('label'=>$langs->trans("Company"), 'checked'=>1),
's.barcode'=>array('label'=>$langs->trans("BarCode"), 'checked'=>1, 'cond'=>(! empty($conf->barcode->enabled))),
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1),
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>1),
'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>1),
's.siren'=>array('label'=>$langs->trans("ProfId1Short"), 'checked'=>1),
's.siret'=>array('label'=>$langs->trans("ProfId2Short"), 'checked'=>1),
's.ape'=>array('label'=>$langs->trans("ProfId3Short"), 'checked'=>1),
's.idprof4'=>array('label'=>$langs->trans("ProfId4Short"), 'checked'=>1),
's.status'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>200),
's.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
's.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
);
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
{
$selectotherfields=$form->multiSelectArrayWithCheckbox('selectotherfields', $arrayfields);
}
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
// Lines of titles
print '<tr class="liste_titre">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder);
if (! empty($conf->barcode->enabled)) print_liste_field_titre($langs->trans("BarCode"), $_SERVER["PHP_SELF"], "s.barcode",$param,'','',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,'',$sortfield,$sortorder);
@ -367,7 +382,7 @@ if ($resql)
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch ');
print_liste_field_titre($selectotherfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
print "</tr>\n";
// Fields title search
@ -376,18 +391,19 @@ if ($resql)
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
if (! empty($search_nom_only) && empty($search_nom)) $search_nom=$search_nom_only;
print '<input class="flat" type="text" name="search_nom" size="8" value="'.htmlspecialchars($search_nom).'">';
print '<input class="flat" type="text" name="search_nom" size="8" value="'.dol_escape_htmltag($search_nom).'">';
print '</td>';
// Barcode
if (! empty($conf->barcode->enabled))
{
print '<td class="liste_titre">';
print '<input class="flat" type="text" name="sbarcode" size="6" value="'.htmlspecialchars($sbarcode).'">';
print '<input class="flat" type="text" name="sbarcode" size="6" value="'.dol_escape_htmltag($sbarcode).'">';
print '</td>';
}
// Town
print '<td class="liste_titre">';
print '<input class="flat" size="8" type="text" name="search_town" value="'.htmlspecialchars($search_town).'">';
print '<input class="flat" size="8" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'">';
print '</td>';
//Country
print '<td class="liste_titre" align="center">';
@ -399,19 +415,19 @@ if ($resql)
print '</td>';
// IdProf1
print '<td class="liste_titre">';
print '<input class="flat" size="4" type="text" name="search_idprof1" value="'.htmlspecialchars($search_idprof1).'">';
print '<input class="flat" size="4" type="text" name="search_idprof1" value="'.dol_escape_htmltag($search_idprof1).'">';
print '</td>';
// IdProf2
print '<td class="liste_titre">';
print '<input class="flat" size="4" type="text" name="search_idprof2" value="'.htmlspecialchars($search_idprof2).'">';
print '<input class="flat" size="4" type="text" name="search_idprof2" value="'.dol_escape_htmltag($search_idprof2).'">';
print '</td>';
// IdProf3
print '<td class="liste_titre">';
print '<input class="flat" size="4" type="text" name="search_idprof3" value="'.htmlspecialchars($search_idprof3).'">';
print '<input class="flat" size="4" type="text" name="search_idprof3" value="'.dol_escape_htmltag($search_idprof3).'">';
print '</td>';
// IdProf4
print '<td class="liste_titre">';
print '<input class="flat" size="4" type="text" name="search_idprof4" value="'.htmlspecialchars($search_idprof4).'">';
print '<input class="flat" size="4" type="text" name="search_idprof4" value="'.dol_escape_htmltag($search_idprof4).'">';
print '</td>';
// Type (customer/prospect/supplier)
print '<td class="liste_titre" align="middle">';

View File

@ -1727,7 +1727,7 @@ else
// Capital
print '<tr><td>'.fieldLabel('Capital','capital').'</td>';
print '<td colspan="3"><input type="text" name="capital" id="capital" size="10" value="'.$object->capital.'"><font class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</font></td></tr>';
print '<td colspan="3"><input type="text" name="capital" id="capital" size="10" value="'.$object->capital.'"> <font class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</font></td></tr>';
// Default language
if (! empty($conf->global->MAIN_MULTILANGS))
@ -1863,10 +1863,30 @@ else
dol_htmloutput_errors($error,$errors);
$showlogo=$object->logo;
//$showlogo=$object->logo;
$showlogo=1;
$showbarcode=empty($conf->barcode->enabled)?0:1;
if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode=0;
print '<div class="arearef heightref valignmiddle" width="100%">';
//$morehtmlleft='<div class="floatleft inline-block valignmiddle divphotoref">'.img_picto('', 'title_companies', '', '').'</div>';
if ($showlogo) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showphoto('societe',$object,0,0,0,'photoref').'</div>';
//if ($showlogo) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showphoto('societe',$object,0,0,0,'photoref').'</div>';
if ($showbarcode) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object).'</div>';
if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
$morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased');
} else {
$morehtmlright.=$object->getLibStatut(2);
}
$morehtml='';
if (! empty($object->ame_nalias)) $morehtml.='<div class="refidno">'.$object->name_alias.'</div>';
$morehtml.='<div class="refidno">';
$morehtml.=$object->getBannerAddress('refaddress',$object);
$morehtml.='</div>';
print $form->showrefnav($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom', $morehtml, '', 0, $morehtmlleft, $morehtmlright);
print '</div>';
print '<div class="underrefbanner clearboth"></div>';
print '<table class="border" width="100%">';
// Ref
@ -1879,18 +1899,21 @@ else
*/
// Name
/*
print '<tr><td width="25%">'.$langs->trans('ThirdPartyName').'</td>';
print '<td colspan="3">';
print $form->showrefnav($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
print '</td>';
print '</tr>';
*/
// Alias names (commercial, trademark or alias names)
print '<tr><td>'.$langs->trans('AliasNames').'</td><td colspan="3">';
print '<tr><td>'.$langs->trans('AliasNames').'</td><td>';
print $object->name_alias;
print "</td></tr>";
// Logo+barcode
/*
$rowspan=6;
if (! empty($conf->global->SOCIETE_USEPREFIX)) $rowspan++;
if (! empty($object->client)) $rowspan++;
@ -1905,12 +1928,12 @@ else
if ($showlogo && $showbarcode) $htmllogobar.='<br><br>';
if ($showbarcode) $htmllogobar.=$form->showbarcode($object);
$htmllogobar.='</td>';
}
}*/
// Prefix
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
{
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">'.$object->prefix_comm.'</td>';
print '<tr><td>'.$langs->trans('Prefix').'</td><td>'.$object->prefix_comm.'</td>';
print $htmllogobar; $htmllogobar='';
print '</tr>';
}
@ -1919,7 +1942,7 @@ else
if ($object->client)
{
print '<tr><td>';
print $langs->trans('CustomerCode').'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">';
print $langs->trans('CustomerCode').'</td><td>';
print $object->code_client;
if ($object->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>';
print '</td>';
@ -1931,7 +1954,7 @@ else
if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire))
{
print '<tr><td>';
print $langs->trans('SupplierCode').'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">';
print $langs->trans('SupplierCode').'</td><td>';
print $object->code_fournisseur;
if ($object->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>';
print '</td>';
@ -1943,13 +1966,16 @@ else
if (! empty($conf->barcode->enabled))
{
print '<tr><td>';
print $langs->trans('Gencod').'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">'.$object->barcode;
print $langs->trans('Gencod').'</td><td>'.$object->barcode;
print '</td>';
print $htmllogobar; $htmllogobar='';
if ($htmllogobar) $htmllogobar.=$form->showbarcode($object);
print $htmllogobar;
$htmllogobar='';
print '</tr>';
}
// Status
/*
print '<tr><td>'.$langs->trans("Status").'</td>';
print '<td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">';
if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
@ -1960,8 +1986,10 @@ else
print '</td>';
print $htmllogobar; $htmllogobar='';
print '</tr>';
*/
// Address
/*
print '<tr><td class="tdtop">'.$langs->trans('Address').'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">';
dol_print_address($object->address,'gmap','thirdparty',$object->id);
print '</td></tr>';
@ -2007,7 +2035,8 @@ else
// Phone / Fax
print '<tr><td>'.$langs->trans('Phone').'</td><td style="min-width: 25%;">'.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').'</td>';
print '<td>'.$langs->trans('Fax').'</td><td style="min-width: 25%;">'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
*/
// Prof ids
$i=1; $j=0;
while ($i <= 6)
@ -2015,8 +2044,9 @@ else
$idprof=$langs->transcountry('ProfId'.$i,$object->country_code);
if ($idprof!='-')
{
if (($j % 2) == 0) print '<tr>';
print '<td>'.$idprof.'</td><td>';
//if (($j % 2) == 0) print '<tr>';
print '<tr>';
print '<td>'.$idprof.'</td><td>';
$key='idprof'.$i;
print $object->$key;
if ($object->$key)
@ -2025,12 +2055,13 @@ else
else print ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>';
}
print '</td>';
if (($j % 2) == 1) print '</tr>';
//if (($j % 2) == 1) print '</tr>';
print '</tr>';
$j++;
}
$i++;
}
if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
//if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
// VAT payers
print '<tr><td>';
@ -2038,9 +2069,11 @@ else
print '</td><td>';
print yn($object->tva_assuj);
print '</td>';
print '</tr>';
// VAT Code
print '<td class="nowrap">'.$langs->trans('VATIntra').'</td><td>';
print '<tr>';
print '<td class="nowrap">'.$langs->trans('VATIntra').'</td><td>';
if ($object->tva_intra)
{
$s='';
@ -2083,7 +2116,7 @@ else
{
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>';
print yn($object->localtax1_assuj);
print '</td><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td>';
print '</td></tr><tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td>';
print yn($object->localtax2_assuj);
print '</td></tr>';
@ -2177,13 +2210,14 @@ else
// Type + Staff
$arr = $formcompany->typent_array(1);
$object->typent= $arr[$object->typent_code];
print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>'.$object->typent.'</td><td>'.$langs->trans("Staff").'</td><td>'.$object->effectif.'</td></tr>';
print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>'.$object->typent.'</td>';
print '<tr><td>'.$langs->trans("Staff").'</td><td>'.$object->effectif.'</td></tr>';
// Legal
print '<tr><td>'.$langs->trans('JuridicalStatus').'</td><td colspan="3">'.$object->forme_juridique.'</td></tr>';
print '<tr><td>'.$langs->trans('JuridicalStatus').'</td><td>'.$object->forme_juridique.'</td></tr>';
// Capital
print '<tr><td>'.$langs->trans('Capital').'</td><td colspan="3">';
print '<tr><td>'.$langs->trans('Capital').'</td><td>';
if ($object->capital) print price($object->capital,'',$langs,0,-1,-1, $conf->currency);
else print '&nbsp;';
print '</td></tr>';
@ -2192,7 +2226,7 @@ else
if (! empty($conf->global->MAIN_MULTILANGS))
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
print '<tr><td>'.$langs->trans("DefaultLang").'</td><td colspan="3">';
print '<tr><td>'.$langs->trans("DefaultLang").'</td><td>';
//$s=picto_from_langcode($object->default_lang);
//print ($s?$s.' ':'');
$langs->load("languages");
@ -2207,7 +2241,7 @@ else
// Customer
if ($object->prospect || $object->client) {
print '<tr><td>' . $langs->trans("CustomersCategoriesShort") . '</td>';
print '<td colspan="3">';
print '<td>';
print $form->showCategories($object->id, 'customer', 1);
print "</td></tr>";
}
@ -2215,7 +2249,7 @@ else
// Supplier
if ($object->fournisseur) {
print '<tr><td>' . $langs->trans("SuppliersCategoriesShort") . '</td>';
print '<td colspan="3">';
print '<td>';
print $form->showCategories($object->id, 'supplier', 1);
print "</td></tr>";
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 260 B

View File

@ -452,8 +452,10 @@ textarea.centpercent {
div.divsearchfield {
float: <?php print $left; ?>;
margin-<?php print $right; ?>: 12px;
margin-top: 1px;
margin-bottom: 2px;
margin-<?php print $left; ?>: 2px;
margin-top: 3px;
margin-bottom: 3px;
padding-left: 2px;
}
div.confirmmessage {
padding-top: 6px;
@ -535,7 +537,7 @@ td.showDragHandle {
float: none;
vertical-align: top;
}
#id-right { /* This must stay id-right ant not be replaced with echo $right */
#id-right { /* This must stay id-right and not be replaced with echo $right */
width: 100%;
}
#id-left {
@ -604,6 +606,40 @@ div.attacharea {
padding-bottom: 10px;
}
div.arearef {
/*border-bottom: 1px solid #bbb;*/
padding-top: 2px;
padding-bottom: 5px;
/*padding-right: 3px;
padding-left: 2px;*/
margin-bottom: 10px;
}
div.heightref {
min-height: 80px;
}
div.divphotoref {
padding-right: 10px;
}
div.statusref {
float: right;
padding-right: 12px;
margin-top: 9px;
margin-bottom: 10px;
}
img.photoref {
border: 1px solid #CCC;
-moz-box-shadow: 3px 3px 4px #DDD;
-webkit-box-shadow: 3px 3px 4px #DDD;
box-shadow: 3px 3px 4px #DDD;
padding: 4px;
height: 80px;
width: 80px;
object-fit: contain
}
.underrefbanner {
border-bottom: 2px solid #888;
}
/* ============================================================================== */
/* Menu top et 1ere ligne tableau */
/* ============================================================================== */
@ -1560,9 +1596,11 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
-webkit-box-shadow: 0 -1px 4px rgba(0,0,0,.1);
box-shadow: 0 -1px 4px rgba(0,0,0,.1);
margin-bottom: 0 0.2em 0 0.2em !important;
border-right: 1px solid #AAA !important;
border-left: 1px solid #AAA !important;
border-top: 1px solid #BBB !important;
-moz-border-radius:4px 4px 0 0;
-webkit-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
@ -1892,10 +1930,12 @@ 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 #E0E0E0;
border-collapse: collapse;
border-collapse: collapse !important;
padding: 1px 2px 1px 3px; /* t r b l */
}
table.borderplus {
border: 1px solid #BBB;
}
.border tbody tr, .border tbody tr td {
height: 20px;
}
@ -1934,7 +1974,7 @@ td.border, div.tagtable div div.border {
/* Main boxes */
table.noborder, table.formdoc, div.noborder {
table.liste, table.noborder, table.formdoc, div.noborder {
width: 100%;
border-collapse: separate !important;
@ -1962,25 +2002,28 @@ table.noborder, table.formdoc, div.noborder {
-webkit-box-shadow: 2px 2px 4px #CCC;
box-shadow: 2px 2px 4px #CCC;
-moz-border-radius: 0.2em;
/* -moz-border-radius: 0.2em;
-webkit-border-radius: 0.2em;
border-radius: 0.2em;
border-radius: 0.2em;*/
}
table.noborder tr, div.noborder form {
table.liste tr, table.noborder tr, div.noborder form {
border-top-color: #FEFEFE;
border-right-width: 1px;
border-right-color: #BBBBBB;
border-right-color: #BBB;
border-right-style: solid;
border-left-width: 1px;
border-left-color: #BBBBBB;
border-left-color: #BBB;
border-left-style: solid;
min-height: 20px;
}
table.noborder th, table.noborder td, div.noborder form, div.noborder form div {
table.liste th, table.noborder th {
padding: 10px 2px 10px 3px; /* t r b l */
}
table.liste td, table.noborder td, div.noborder form, div.noborder form div {
padding: 5px 2px 5px 3px; /* t r b l */
}
@ -2008,42 +2051,12 @@ td.borderright {
}
/* For lists */
table.liste {
width: 100%;
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;
/*
border-bottom-width: 1px;
border-bottom-color: #BBBBBB;
border-bottom-style: solid;
*/
border-left-width: 1px;
border-left-color: #CCC;
border-left-style: solid;
margin-bottom: 2px;
margin-top: 0px;
-moz-box-shadow: 0px 3px 4px #CCC;
-webkit-box-shadow: 0px 3px 4px #CC;
box-shadow: 0px 3px 4px #CCC;
}
table.liste td {
padding-right: 2px;
/* For table with no filter before */
table.listwithfilterbefore {
border-top: none !important;
}
.tagtable, .table-border { display: table; }
.tagtr, .table-border-row { display: table-row; }
.tagtd, .table-border-col, .table-key-border-col, .table-val-border-col { display: table-cell; }
@ -2051,13 +2064,19 @@ table.liste td {
/* Pagination */
div.refidpadding {
padding-top: <?php print empty($conf->dol_use_jmobile)?'8':'12'; ?>px;
/* padding-top: <?php print empty($conf->dol_use_jmobile)?'8':'12'; ?>px; */
}
div.refid {
padding-top: <?php print empty($conf->dol_use_jmobile)?'5':'12'; ?>px;
/* padding-top: <?php print empty($conf->dol_use_jmobile)?'5':'12'; ?>px; */
font-weight: bold;
color: #766;
font-size: 120%;
font-size: 160%;
}
div.refidno {
padding-top: 2px;
font-weight: normal;
color: #444;
font-size: <?php print $fontsize ?>px;
}
div.pagination {
@ -2285,27 +2304,28 @@ div.liste_titre {
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 does not work either for div */
padding-left: 3px;
padding-top: 2px;
padding-bottom: 2px;
border-right-width: 1px;
border-right-color: #CCC;
border-right-color: #BBB;
border-right-style: solid;
border-left-width: 1px;
border-left-color: #CCC;
border-left-color: #BBB;
border-left-style: solid;
border-top-width: 1px;
border-top-color: #CCC;
border-top-color: #BBB;
border-top-style: solid;
}
div.liste_titre_bydiv {
box-shadow: none;
border-collapse: collapse;
display: table;
padding: 2px 2px 2px 0;
padding: 2px 0px 2px 0;
box-shadow: 2px 2px 4px #CCC;
width: calc(100% - 1px); /* 1px more, i don't know why */
}
tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable.tr
{
@ -2398,6 +2418,10 @@ div.tabBar .noborder {
box-shadow: 0px 0px 0px #DDD !important;
}
#tablelines tr.liste_titre td, .paymenttable tr.liste_titre td, .margintable tr.liste_titre td, .tableforservicepart1 tr.liste_titre td {
border-bottom: 1px solid #AAA !important;
}
/*
* Boxes
@ -3386,7 +3410,7 @@ table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 {
background-color: #FFF !important;
border-radius: inherit !important;
}
.paging_full_numbers a.paginate_button_disabled:hover {
.paging_full_numbers a.paginate_button_disabled:hover, .paging_full_numbers a.disabled:hover {
background-color: #FFF !important;
}
.paginate_button, .paginate_active {
@ -3414,7 +3438,9 @@ div.dataTables_length {
div.dataTables_length select {
background: #fff;
}
.dataTables_wrapper .dataTables_paginate {
padding-top: 0px !important;
}
/* ============================================================================== */
/* Select2 */
@ -3511,6 +3537,62 @@ a span.select2-chosen
}
/* ============================================================================== */
/* Multiselect with checkbox */
/* ============================================================================== */
dl.dropdown {
margin:0px;
padding:0px;
}
.dropdown dd, .dropdown dt {
margin:0px;
padding:0px;
}
.dropdown ul {
margin: -1px 0 0 0;
text-align: left;
}
.dropdown dd {
position:relative;
}
.dropdown dt a {
display:block;
overflow: hidden;
border:0;
}
.dropdown dt a span, .multiSel span {
cursor:pointer;
display:inline-block;
padding: 0 3px 2px 0;
}
.dropdown dd ul {
background-color: #FFF;
border: 1px solid #888;
display:none;
right:0px; /* pop is align on right */
padding: 2px 15px 2px 5px;
position:absolute;
top:2px;
list-style:none;
max-height: 200px;
overflow: auto;
}
.dropdown span.value {
display:none;
}
.dropdown dd ul li {
white-space: nowrap;
font-weight: normal;
}
.dropdown dd ul li a {
padding:5px;
display:block;
}
.dropdown dd ul li a:hover {
background-color:#fff;
}
/* ============================================================================== */
/* JMobile */

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

View File

@ -251,6 +251,7 @@ input, textarea, select {
border:solid 1px rgba(0,0,0,.3);
border-top:solid 1px rgba(0,0,0,.3);
border-bottom:solid 1px rgba(0,0,0,.2);
background-color: #FFF;
/* box-shadow: 1px 1px 1px rgba(0,0,0,.2) inset;*/
padding:4px;
margin-left:1px;
@ -456,6 +457,10 @@ textarea.centpercent {
div.divsearchfield {
float: <?php print $left; ?>;
margin-<?php print $right; ?>: 12px;
margin-<?php print $left; ?>: 2px;
margin-top: 3px;
margin-bottom: 3px;
padding-left: 2px;
}
div.confirmmessage {
padding-top: 6px;
@ -651,6 +656,38 @@ div.attacharea {
padding-top: 10px;
padding-bottom: 10px;
}
div.arearef {
/*border-bottom: 1px solid #bbb;*/
padding-top: 2px;
padding-bottom: 5px;
/*padding-right: 3px;
padding-left: 2px;*/
margin-bottom: 10px;
}
div.heightref {
min-height: 74px;
}
div.divphotoref {
padding-right: 10px;
}
div.statusref {
float: right;
padding-right: 12px;
margin-top: 9px;
margin-bottom: 10px;
}
img.photoref {
height: 68px;
width: 68px;
border: 1px solid #CCC;
-moz-box-shadow: 3px 3px 4px #DDD;
-webkit-box-shadow: 3px 3px 4px #DDD;
box-shadow: 3px 3px 4px #DDD;
}
.underrefbanner {
border-bottom: 2px solid #888;
}
/* ============================================================================== */
@ -1551,9 +1588,9 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
-webkit-box-shadow: 0 -1px 4px rgba(0,0,0,.1);
box-shadow: 0 -1px 4px rgba(0,0,0,.1);
border-right: 1px solid #CCCCCC;
border-left: 1px solid #f4f4f4;
border-top: 1px solid #D8D8D8;
border-right: 1px solid #AAA !important;
border-left: 1px solid #AAA !important;
border-top: 1px solid #BBB !important;
-moz-border-radius:3px 3px 0px 0px;
-webkit-border-radius:3px 3px 0px 0px;
@ -1788,7 +1825,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 #f4f4f4;
border-collapse: collapse;
border-collapse: collapse !important;
padding: 1px 2px 1px 3px; /* t r b l */
}
@ -1822,7 +1859,7 @@ td.border, div.tagtable div div.border {
/* Main boxes */
table.noborder, table.formdoc, div.noborder {
table.liste, table.noborder, table.formdoc, div.noborder {
width: 100%;
border-collapse: separate !important;
@ -1856,6 +1893,9 @@ table.noborder tr, div.noborder form {
height: 26px;
}
table.liste th, table.noborder th {
padding: 5px 2px 5px 3px; /* t r b l */
}
table.noborder th, table.noborder td, div.noborder form, div.noborder form div {
padding: 1px 2px 1px 3px; /* t r b l */
}
@ -1883,35 +1923,9 @@ td.borderright {
border-right-style: solid !important;
}
/* For lists */
table.liste {
width: 100%;
border-collapse: collapse;
border-top-color: #FEFEFE;
border-right-width: 1px;
border-right-color: #CCC;
border-right-style: solid;
/*
border-bottom-width: 1px;
border-bottom-color: #BBBBBB;
border-bottom-style: solid;
*/
border-left-width: 1px;
border-left-color: #CCC;
border-left-style: solid;
margin-bottom: 2px;
margin-top: 0px;
-moz-box-shadow: 0px 3px 4px #CCC;
-webkit-box-shadow: 0px 3px 4px #CC;
box-shadow: 0px 3px 4px #CCC;
}
table.liste td {
padding-right: 2px;
/* For table with no filter before */
table.listwithfilterbefore {
border-top: none !important;
}
.tagtable, .table-border { display: table; }
@ -1920,13 +1934,19 @@ table.liste td {
/* Pagination */
div.refidpadding {
padding-top: <?php print empty($conf->dol_use_jmobile)?'8':'12'; ?>px;
/* padding-top: <?php print empty($conf->dol_use_jmobile)?'8':'12'; ?>px; */
}
div.refid {
padding-top: <?php print empty($conf->dol_use_jmobile)?'5':'12'; ?>px;
/* padding-top: <?php print empty($conf->dol_use_jmobile)?'5':'12'; ?>px; */
font-weight: bold;
color: #766;
font-size: 120%;
font-size: 160%;
}
div.refidno {
padding-top: 2px;
font-weight: normal;
color: #444;
font-size: <?php print $fontsize ?>px;
}
div.pagination {
@ -2050,6 +2070,9 @@ div.pagination li.pagination .active {
div.pagination li.paginationafterarrows {
margin-left: 10px;
}
.paginationatbottom {
margin-top: 9px;
}
/* Prepare to remove class pair - impair
.noborder > tbody > tr:nth-child(even) td {
@ -2139,6 +2162,29 @@ 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-top: 2px;
padding-bottom: 2px;
border-right-width: 1px;
border-right-color: #BBB;
border-right-style: solid;
border-left-width: 1px;
border-left-color: #BBB;
border-left-style: solid;
border-top-width: 1px;
border-top-color: #BBB;
border-top-style: solid;
}
div.liste_titre_bydiv {
box-shadow: none;
border-collapse: collapse;
display: table;
padding: 2px 0px 2px 0;
box-shadow: 2px 2px 4px #CCC;
width: calc(100% - 1px); /* 1px more, i don't know why */
}
tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable.tr
{
@ -2236,6 +2282,10 @@ div.tabBar .noborder {
box-shadow: 0px 0px 0px #f4f4f4 !important;
}
#tablelines tr.liste_titre td, .paymenttable tr.liste_titre td, .margintable tr.liste_titre td, .tableforservicepart1 tr.liste_titre td {
border-bottom: 1px solid #AAA !important;
}
/*
* Boxes
@ -2425,7 +2475,12 @@ td.legendLabel { padding: 2px 2px 2px 0 !important; }
margin-bottom: 2px;
margin-top: 2px;
}
.photointooltip {
.photowithmargin {
/* -webkit-box-shadow: 0px 0px 3px #777;
-moz-box-shadow: 0px 0px 3px #777;
box-shadow: 0px 0px 3px #777;*/
}
.photointoolitp {
margin-top: 8px;
float: left;
/*text-align: center; */
@ -3221,7 +3276,7 @@ table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 {
background-color: #FFF !important;
border-radius: inherit !important;
}
.paging_full_numbers a.paginate_button_disabled:hover {
.paging_full_numbers a.paginate_button_disabled:hover, .paging_full_numbers a.disabled:hover {
background-color: #FFF !important;
}
.paginate_button, .paginate_active {
@ -3242,10 +3297,26 @@ table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 {
background-image: none;
}
div.dataTables_length {
float: right !important;
padding-left: 8px;
}
div.dataTables_length select {
background: #fff;
}
.dataTables_wrapper .dataTables_paginate {
padding-top: 0px !important;
}
/* ============================================================================== */
/* Select2 */
/* ============================================================================== */
.selectoptiondisabledwhite {
background: #FFFFFF !important;
}
.select2-choice,
.select2-drop.select2-drop-above.select2-drop-active,
.select2-container-active .select2-choice,
@ -3333,6 +3404,63 @@ a span.select2-chosen
}
/* ============================================================================== */
/* Multiselect with checkbox */
/* ============================================================================== */
dl.dropdown {
margin:0px;
padding:0px;
}
.dropdown dd, .dropdown dt {
margin:0px;
padding:0px;
}
.dropdown ul {
margin: -1px 0 0 0;
text-align: left;
}
.dropdown dd {
position:relative;
}
.dropdown dt a {
display:block;
overflow: hidden;
border:0;
}
.dropdown dt a span, .multiSel span {
cursor:pointer;
display:inline-block;
padding: 0 3px 2px 0;
}
.dropdown dd ul {
background-color: #FFF;
border: 1px solid #888;
display:none;
right:0px; /* pop is align on right */
padding: 2px 15px 2px 5px;
position:absolute;
top:2px;
list-style:none;
max-height: 200px;
overflow: auto;
}
.dropdown span.value {
display:none;
}
.dropdown dd ul li {
white-space: nowrap;
font-weight: normal;
}
.dropdown dd ul li a {
padding:5px;
display:block;
}
.dropdown dd ul li a:hover {
background-color:#fff;
}
/* ============================================================================== */
/* JMobile */
/* ============================================================================== */
@ -3559,7 +3687,7 @@ border-top-right-radius: 6px;
#tooltip {
position: absolute;
width: <?php print dol_size(350,'width'); ?>px;
}
}
}
@media only screen and (max-width: 570px)
{
@ -3573,7 +3701,7 @@ border-top-right-radius: 6px;
#tooltip {
position: absolute;
width: <?php print dol_size(300,'width'); ?>px;
}
}
}

View File

@ -133,7 +133,7 @@ class ModulesTest extends PHPUnit_Framework_TestCase
'Facture','Fckeditor','Ficheinter','Fournisseur','FTP','GeoIPMaxmind','Gravatar','Holiday','Import','Label','Ldap',
'Mailing','MailmanSpip','Margin',
'Notification','OpenSurvey','Paybox','Paypal','Prelevement','Product','ProductBatch','Projet','Propale',
'Salaries','Service','Skype','Societe','Stock','SyncSupplierWebServices','Syslog','Tax','User','WebServices','Workflow');
'Salaries','Service','Skype','Societe','Stock','WebServicesClient','Syslog','Tax','User','WebServices','Workflow');
foreach($modulelist as $modlabel)
{
require_once(DOL_DOCUMENT_ROOT.'/core/modules/mod'.$modlabel.'.class.php');