Merge remote-tracking branch 'upstream/develop' into develop

# Conflicts:
#	htdocs/compta/facture/class/facture.class.php
This commit is contained in:
Juanjo Menent 2016-11-27 21:03:29 +01:00
commit edadc13be6
107 changed files with 890 additions and 717 deletions

View File

@ -333,6 +333,7 @@ if (! empty($moreforfilter))
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// Fields title
@ -535,6 +536,7 @@ $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // N
print $hookmanager->resPrint;
print '</table>'."\n";
print '</div>'."\n";
print '</form>'."\n";

View File

@ -71,8 +71,8 @@ class FormVentilation extends Form
* @param string $htmlname Name of field in html form
* @param int $showempty Add an empty field
* @param array $event Event options
* @param int $select_in selectid value is a aa.rowid (0 default) or aa.account_number (1)
* @param int $select_out set value returned by select 0=rowid (default), 1=account_number
* @param int $select_in 0=selectid value is a aa.rowid (default) or 1=selectid is aa.account_number
* @param int $select_out Set value returned by select. 0=rowid (default), 1=account_number
* @param string $morecss More css non HTML object
* @param string $usecache Key to use to store result into a cache. Next call with same key will reuse the cache.
* @return string String with HTML select

View File

@ -123,6 +123,7 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
$account_parent = ''; // Protection to avoid to mass apply it a second time
}
/*
* View
*/
@ -252,6 +253,7 @@ if ($result) {
$moreforfilter = '';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
@ -338,18 +340,19 @@ if ($result) {
print "</tr>";
$i ++;
}
print "</table>";
print "</div>";
if ($nbtotalofrecords > $limit) {
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
}
print '</form>';
} else {
print $db->error();
print $db->lasterror();
}
print "</table>";
if ($nbtotalofrecords > $limit) {
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
}
print '</form>';
llxFooter();
$db->close();

View File

@ -264,6 +264,7 @@ if ($result) {
$moreforfilter = '';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
@ -400,8 +401,9 @@ if ($result) {
print '</tr>';
$i ++;
}
print '</table>';
print "</div>";
print '</form>';
} else {
print $db->error();

View File

@ -230,6 +230,7 @@ if ($result) {
$moreforfilter = '';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
@ -304,18 +305,19 @@ if ($result) {
print "</tr>";
$i ++;
}
print "</table>";
print "</div>";
if ($nbtotalofrecords > $limit) {
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
}
print '</form>';
} else {
print $db->error();
}
print "</table>";
if ($nbtotalofrecords > $limit) {
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
}
print '</form>';
llxFooter();
$db->close();

View File

@ -257,6 +257,7 @@ if ($result) {
$moreforfilter = '';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder);
@ -352,6 +353,8 @@ if ($result) {
}
print '</table>';
print "</div>";
print '</form>';
} else {
print $db->error();

View File

@ -236,6 +236,7 @@ if ($result) {
$moreforfilter = '';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
@ -324,17 +325,18 @@ if ($result) {
print "</tr>";
$i ++;
}
print "</table>";
print "</div>";
if ($nbtotalofrecords > $limit) {
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
}
print '</form>';
} else {
print $db->error();
}
print "</table>";
if ($nbtotalofrecords > $limit) {
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
}
print '</form>';
llxFooter();

View File

@ -266,7 +266,8 @@ if ($result) {
$moreforfilter = '';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
@ -414,6 +415,8 @@ if ($result) {
}
print '</table>';
print "</div>";
print '</form>';
} else {
print $db->error();

View File

@ -375,6 +375,7 @@ if (! empty($moreforfilter))
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
@ -842,6 +843,7 @@ $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // N
print $hookmanager->resPrint;
print "</table>\n";
print "</div>";
print '</form>';
if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit, 1);

View File

@ -61,7 +61,7 @@ $result=restrictedArea($user,'adherent','','','cotisation');
* Actions
*/
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
{
$search="";
$search_ref="";
@ -154,7 +154,10 @@ if ($result)
print $langs->trans("Filter")." (".$langs->trans("Ref").", ".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall;
}
print '<table class="noborder" width="100%">';
$moreforfilter = '';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid",$param,"","",$sortfield,$sortorder);
@ -301,6 +304,7 @@ if ($result)
print "</tr>\n";
print "</table>";
print '</div>';
print '</form>';
}
else

View File

@ -68,7 +68,7 @@ $extrafields = new ExtraFields($db);
// fetch optionals attributes and labels
$extralabels=$extrafields->fetch_name_optionals_label('adherent_type');
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
{
$search_lastname="";
$search_login="";
@ -181,8 +181,11 @@ if (! $rowid && $action != 'create' && $action != 'edit')
$num = $db->num_rows($result);
$i = 0;
print '<table class="noborder" width="100%">';
$moreforfilter = '';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Ref").'</td>';
print '<td>'.$langs->trans("Label").'</td>';
@ -209,6 +212,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
$i++;
}
print "</table>";
print '</div>';
}
else
{
@ -299,13 +303,13 @@ if ($rowid > 0)
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/type.php">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td width="15%">'.$langs->trans("Ref").'</td>';
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td>';
print '<td>';
print $form->showrefnav($object, 'rowid', $linkback);
print '</td></tr>';
// Label
print '<tr><td width="15%">'.$langs->trans("Label").'</td><td>'.dol_escape_htmltag($object->libelle).'</td></tr>';
print '<tr><td>'.$langs->trans("Label").'</td><td>'.dol_escape_htmltag($object->libelle).'</td></tr>';
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
print yn($object->subscription);
@ -462,9 +466,16 @@ if ($rowid > 0)
print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall;
}
print '<br>';
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input class="flat" type="hidden" name="rowid" value="'.$rowid.'" size="12"></td>';
print '<br>';
print_barre_liste('',$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
print '<table class="noborder" width="100%">';
$moreforfilter = '';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder);
@ -477,9 +488,6 @@ if ($rowid > 0)
print "</tr>\n";
// Lignes des champs de filtre
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
print '<input class="flat" type="hidden" name="rowid" value="'.$rowid.'" size="12"></td>';
print '<tr class="liste_titre">';
print '<td class="liste_titre" align="left">';
@ -502,7 +510,6 @@ if ($rowid > 0)
print '</td>';
print "</tr>\n";
print '</form>';
$var=True;
while ($i < $num && $i < $conf->liste_limit)
@ -596,7 +603,9 @@ if ($rowid > 0)
}
print "</table>\n";
print '</div>';
print '</form>';
if ($num > $conf->liste_limit)
{
print_barre_liste('',$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'');

View File

@ -286,23 +286,10 @@ if ($mode==='expdev') print $langs->trans("ModuleFamilyExperimental")."<br>
$h = 0;
$categidx='common'; // Main
//if (! empty($categ[$categidx]))
//{
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
$head[$h][1] = $langs->trans("AvailableModules");
$head[$h][2] = 'common';
$h++;
//}
/*$categidx='expdev';
if (! empty($categ[$categidx]))
{
$categidx='expdev';
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
$head[$h][1] = $form->textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3);
$head[$h][2] = 'expdev';
$h++;
}*/
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
$head[$h][1] = $langs->trans("AvailableModules");
$head[$h][2] = 'common';
$h++;
$categidx='marketplace';
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
@ -314,18 +301,19 @@ $h++;
print "<br>\n";
dol_fiche_head($head, $mode, '');
$var=true;
if ($mode != 'marketplace')
{
print '<form method="GET" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
dol_fiche_head($head, $mode, '');
$moreforfilter = '';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.= $langs->trans('Keyword') . ': <input type="text" name="search_keyword" value="'.dol_escape_htmltag($search_keyword).'">';
@ -362,12 +350,17 @@ if ($mode != 'marketplace')
print $hookmanager->resPrint;
//print '</div>';
}
//dol_fiche_end();
print '<div class="clearboth"></div><br>';
//print '<br><br><br><br>';
print '<br><br><br><br>';
$moreforfilter='';
// Show list of modules
print '<table summary="list_of_modules" id="list_of_modules" class="liste" width="100%">'."\n";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" summary="list_of_modules" id="list_of_modules" >'."\n";
$oldfamily='';
@ -766,9 +759,12 @@ if ($mode != 'marketplace')
}
print "</table>\n";
print '</div>';
}
else
{
dol_fiche_head($head, $mode, '');
// Marketplace
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
print "<tr class=\"liste_titre\">\n";
@ -780,7 +776,7 @@ else
$var=!$var;
print "<tr ".$bc[$var].">\n";
$url='https://www.dolistore.com';
print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" width="180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>';
print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>';
print '<td>'.$langs->trans("DoliStoreDesc").'</td>';
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
print '</tr>';
@ -788,18 +784,18 @@ else
$var=!$var;
print "<tr ".$bc[$var].">\n";
$url='https://partners.dolibarr.org';
print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" width="180" src="'.DOL_URL_ROOT.'/theme/dolibarr_preferred_partner_int.png"></a></td>';
print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolibarr_preferred_partner_int.png"></a></td>';
print '<td>'.$langs->trans("DoliPartnersDesc").'</td>';
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
print '</tr>';
print "</table>\n";
//dol_fiche_end();
}
dol_fiche_end();
// Show warning about external users
if ($mode != 'marketplace') print info_admin(showModulesExludedForExternal($modules))."\n";

View File

@ -289,7 +289,7 @@ function backup_tables($outputfile, $tables='*')
// Print headers and global mysql config vars
$sqlhead = '';
$sqlhead .= "-- ".$db::LABEL." dump via php
$sqlhead .= "-- ".$db::LABEL." dump via php with Dolibarr ".DOL_VERSION."
--
-- Host: ".$db->db->host_info." Database: ".$db->database_name."
-- ------------------------------------------------------

View File

@ -38,11 +38,14 @@ class Login
*
* @param string $login Username
* @param string $password User password
* @param int $entity User entity
* @param int $reset Reset token
* @param int $entity Entity (when multicompany module is used). Empty means 1=first company.
* @param int $reset Reset token (0=get current token, 1=ask a new token, meaning that all future access using current token will failed)
* @return array Response status and user token
*
* @throws RestException
*
* @url GET /
* @url POST /
*/
public function index($login, $password, $entity=0, $reset=0) {

View File

@ -144,7 +144,7 @@ foreach ($modulesdir as $dir)
require_once $dir_part.$file_searched;
if (class_exists($classname))
{
dol_syslog("Found deprecated API by index.php classname=".$classname." into ".$dir);
dol_syslog("Found deprecated API by index.php: classname=".$classname." into ".$dir." - ".$dir_part.$file_searched);
$api->r->addAPIClass($classname, '/');
}
}
@ -154,7 +154,7 @@ foreach ($modulesdir as $dir)
require_once $dir_part.$file_searched;
if (class_exists($classname))
{
dol_syslog("Found API by index.php classname=".$classname." into ".$dir);
dol_syslog("Found API by index.php: classname=".$classname." into ".$dir." - ".$dir_part.$file_searched);
$listofapis[] = $classname;
}
}
@ -181,7 +181,3 @@ foreach ($listofapis as $classname)
// Call API (we suppose we found it)
$api->r->handle();

View File

@ -92,8 +92,11 @@ if ($resql)
$param = "";
if ($optioncss != '') $param ='&optioncss='.$optioncss;
print "<table class=\"noborder\" width=\"100%\">";
$moreforfilter='';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print "<tr class=\"liste_titre\">";
//print "<td>&nbsp;</td>";
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"bid","", $param,'align="left"',$sortfield,$sortorder);
@ -200,6 +203,8 @@ if ($resql)
$i++;
}
print "</table>";
print '</div>';
$db->free($resql);
}
else

View File

@ -132,7 +132,7 @@ $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action);
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
// Purge search criteria
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
{
$actioncode='';
$search_title='';
@ -335,9 +335,13 @@ if ($resql)
print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $link, $num, -1 * $nbtotalofrecords, '', 0, $nav, '', $limit);
$moreforfilter='';
$i = 0;
print '<table class="liste" width="100%">';
print '<tr class="liste_titre">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"a.id",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Title"),$_SERVER["PHP_SELF"],"a.label",$param,"","",$sortfield,$sortorder);
//if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
@ -354,11 +358,7 @@ if ($resql)
print '<tr class="liste_titre">';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" name="search_title" value="'.$search_title.'"></td>';
//if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
//{
print '<td class="liste_titre"></td>';
//print '<td class="liste_titre"><input type="text" name="search_type" value="'.$search_type.'"></td>';
//}
print '<td class="liste_titre"></td>';
print '<td class="liste_titre" align="center">';
print $form->select_date($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1);
print '</td>';
@ -367,7 +367,6 @@ if ($resql)
print '</td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
//print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td></td>';
// Action column
@ -499,7 +498,7 @@ if ($resql)
$i++;
}
print "</table>";
print '</div>';
print '</form>';
$db->free($resql);

View File

@ -590,6 +590,7 @@ echo '</form>';
//print "begin_d=".$begin_d." end_d=".$end_d;
echo '<div class="div-table-responsive">';
echo '<table width="100%" class="noborder nocellnopadd cal_month">';
echo '<tr class="liste_titre">';
@ -766,7 +767,7 @@ foreach ($usernames as $username)
}
echo "</table>\n";
echo '</div>';
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
{

View File

@ -114,9 +114,13 @@ if ($resql)
print_barre_liste($langs->trans("Actions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_agenda', 0, '', '', $limit);
$moreforfilter='';
$i = 0;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Date").'</td>';
print '<td align="center">'.$langs->trans("EventsNb").'</td>';
print '<td align="center">'.$langs->trans("Action").'</td>';
@ -162,7 +166,7 @@ if ($resql)
$i++;
}
print "</table>";
print '</div>';
print '</form>';
$db->free($resql);

View File

@ -238,14 +238,22 @@ if ($object->fetch($id) >= 0)
{
print load_fiche_titre($langs->trans("ToAddRecipientsChooseHere"), ($user->admin?info_admin($langs->trans("YouCanAddYourOwnPredefindedListHere"),1):''), 'title_generic');
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td class="liste_titre">'.$langs->trans("RecipientSelectionModules").'</td>';
print '<td class="liste_titre" align="center">'.$langs->trans("NbOfUniqueEMails").'</td>';
print '<td class="liste_titre" align="left">'.$langs->trans("Filter").'</td>';
print '<td class="liste_titre" align="center">&nbsp;</td>';
print "</tr>\n";
//print '<table class="noborder" width="100%">';
print '<div class="tagtable centpercent liste_titre_bydiv" id="tablelines">';
//print '<tr class="liste_titre">';
print '<div class="tagtr liste_titre">';
//print '<td class="liste_titre">'.$langs->trans("RecipientSelectionModules").'</td>';
print '<div class="tagtd">'.$langs->trans("RecipientSelectionModules").'</div>';
//print '<td class="liste_titre" align="center">'.$langs->trans("NbOfUniqueEMails").'</td>';
print '<div class="tagtd" align="center">'.$langs->trans("NbOfUniqueEMails").'</div>';
//print '<td class="liste_titre" align="left">'.$langs->trans("Filter").'</td>';
print '<div class="tagtd" align="left">'.$langs->trans("Filter").'</div>';
//print '<td class="liste_titre" align="center">&nbsp;</td>';
print '<div class="tagtd">&nbsp;</div>';
//print "</tr>\n";
print '</div>';
clearstatcache();
$var=true;
@ -303,19 +311,28 @@ if ($object->fetch($id) >= 0)
if ($qualified)
{
$var = !$var;
print '<tr '.$bc[$var].'>';
//print '<tr '.$bc[$var].'>';
// print '<div '.$bctag[$var].'>';
if ($allowaddtarget)
{
print '<form name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">';
print '<form '.$bctag[$var].' name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
}
else
{
print '<div '.$bctag[$var].'>';
}
print '<td>';
//print '<td>';
print '<div class="tagtd">';
if (empty($obj->picto)) $obj->picto='generic';
print img_object($langs->trans("Module").': '.get_class($obj),$obj->picto).' '.$obj->getDesc();
print '</td>';
print img_object($langs->trans("Module").': '.get_class($obj),$obj->picto);
print ' ';
print $obj->getDesc();
//print '</td>';
print '</div>';
try {
$nbofrecipient=$obj->getNbOfRecipients('');
}
@ -324,7 +341,8 @@ if ($object->fetch($id) >= 0)
dol_syslog($e->getMessage(), LOG_ERR);
}
print '<td align="center">';
//print '<td align="center">';
print '<div class="tagtd center">';
if ($nbofrecipient >= 0)
{
print $nbofrecipient;
@ -333,41 +351,54 @@ if ($object->fetch($id) >= 0)
{
print $langs->trans("Error").' '.img_error($obj->error);
}
print '</td>';
print '<td align="left">';
try {
$filter=$obj->formFilter();
}
catch(Exception $e)
{
dol_syslog($e->getMessage(), LOG_ERR);
}
if ($filter) print $filter;
else print $langs->trans("None");
print '</td>';
print '<td align="right">';
//print '</td>';
print '</div>';
//print '<td align="left">';
print '<div class="tagtd" align="left">';
if ($allowaddtarget)
{
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
try {
$filter=$obj->formFilter();
}
catch(Exception $e)
{
dol_syslog($e->getMessage(), LOG_ERR);
}
if ($filter) print $filter;
else print $langs->trans("None");
}
//print '</td>';
print '</div>';
//print '<td align="right">';
print '<div class="tagtd" align="right">';
if ($allowaddtarget)
{
print '<input type="submit" class="button" name="button_'.$modulename.'" value="'.$langs->trans("Add").'">';
}
else
{
print '<input type="submit" class="button disabled" disabled="disabled" name="button_'.$modulename.'" value="'.$langs->trans("Add").'">';
//print $langs->trans("MailNoChangePossible");
print "&nbsp;";
}
print '</td>';
//print '</td>';
print '</div>';
if ($allowaddtarget) print '</form>';
print "</tr>\n";
else print '</div>';
//print "</tr>\n";
// print '</div>'."\n";
}
}
} // End foreach dir
print '</table>';
print '<br>';
//print '</table>';
print '</div>';
print '<br><br>';
}
// List of selected targets

View File

@ -111,8 +111,18 @@ if ($result)
if ($filteremail) $param.='&amp;filteremail='.urlencode($filteremail);
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
print '<table class="liste">';
print '<tr class="liste_titre">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
$moreforfilter = '';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"m.rowid",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Title"),$_SERVER["PHP_SELF"],"m.titre",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"m.date_creat",$param,"",'align="center"',$sortfield,$sortorder);
@ -193,7 +203,9 @@ if ($result)
print "</tr>\n";
$i++;
}
print '</table></form>';
print '</table>';
print '</div>';
print '</form>';
$db->free($result);
}
else

View File

@ -2209,6 +2209,7 @@ if ($action == 'create')
include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
}
print '<div class="div-table-responsive">';
print '<table id="tablelines" class="noborder noshadow" width="100%">';
if (! empty($object->lines))
@ -2230,7 +2231,8 @@ if ($action == 'create')
}
print '</table>';
print '</div>';
print "</form>\n";
dol_fiche_end();

View File

@ -43,6 +43,8 @@ $result = restrictedArea($user, 'propal', $id);
* View
*/
$form = new Form($db);
llxHeader('',$langs->trans('Proposal'),'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos');
$object = new Propal($db);

View File

@ -556,6 +556,7 @@ if ($resql)
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// Fields title
@ -1003,6 +1004,7 @@ if ($resql)
print $hookmanager->resPrint;
print '</table>'."\n";
print '</div>'."\n";
print '</form>'."\n";

View File

@ -2409,6 +2409,7 @@ if ($action == 'create' && $user->rights->commande->creer)
include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
}
print '<div class="div-table-responsive">';
print '<table id="tablelines" class="noborder noshadow" width="100%">';
// Show object lines
@ -2434,7 +2435,8 @@ if ($action == 'create' && $user->rights->commande->creer)
}
}
print '</table>';
print '</div>';
print "</form>\n";
dol_fiche_end();

View File

@ -875,54 +875,70 @@ class Commande extends CommonOrder
$this->ref = $initialref;
// Add object linked
if (is_array($this->linked_objects) && ! empty($this->linked_objects))
if (! $error && $this->id && is_array($this->linked_objects) && ! empty($this->linked_objects))
{
foreach($this->linked_objects as $origin => $origin_id)
foreach($this->linked_objects as $origin => $tmp_origin_id)
{
$ret = $this->add_object_linked($origin, $origin_id);
if (! $ret)
{
dol_print_error($this->db);
$error++;
}
if (! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN))
{
$originforcontact = $origin;
$originidforcontact = $origin_id;
if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order
{
require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php';
$exp = new Expedition($db);
$exp->fetch($origin_id);
$exp->fetchObjectLinked();
if (count($exp->linkedObjectsIds['commande']) > 0)
{
foreach ($exp->linkedObjectsIds['commande'] as $key => $value)
{
$originforcontact = 'commande';
$originidforcontact = $value->id;
break; // We take first one
}
}
}
$sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc";
$sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'";
$resqlcontact = $this->db->query($sqlcontact);
if ($resqlcontact)
{
while($objcontact = $this->db->fetch_object($resqlcontact))
{
//print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n";
$this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object
}
}
else dol_print_error($resqlcontact);
}
if (is_array($tmp_origin_id)) // New behaviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...))
{
foreach($tmp_origin_id as $origin_id)
{
$ret = $this->add_object_linked($origin, $origin_id);
if (! $ret)
{
dol_print_error($this->db);
$error++;
}
}
}
else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1))
{
$origin_id = $tmp_origin_id;
$ret = $this->add_object_linked($origin, $origin_id);
if (! $ret)
{
dol_print_error($this->db);
$error++;
}
}
}
}
if (! $error && $this->id && ! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN) && ! empty($this->origin) && ! empty($this->origin_id)) // Get contact from origin object
{
$originforcontact = $this->origin;
$originidforcontact = $this->origin_id;
if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order
{
require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php';
$exp = new Expedition($db);
$exp->fetch($this->origin_id);
$exp->fetchObjectLinked();
if (count($exp->linkedObjectsIds['commande']) > 0)
{
foreach ($exp->linkedObjectsIds['commande'] as $key => $value)
{
$originforcontact = 'commande';
$originidforcontact = $value->id;
break; // We take first one
}
}
}
$sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc";
$sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'";
$resqlcontact = $this->db->query($sqlcontact);
if ($resqlcontact)
{
while($objcontact = $this->db->fetch_object($resqlcontact))
{
//print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n";
$this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object
}
}
else dol_print_error($resqlcontact);
}
}
if (! $error)

View File

@ -845,7 +845,8 @@ if ($resql)
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// Fields title
print '<tr class="liste_titre">';
@ -1421,9 +1422,8 @@ if ($resql)
print $hookmanager->resPrint;
print '</table>'."\n";
print '<br />';
print '</div>';
print '</form>'."\n";
//print '<br>'.img_help(1,'').' '.$langs->trans("ToBillSeveralOrderSelectCustomer", $langs->transnoentitiesnoconv("CreateInvoiceForThisCustomer")).'<br>';

View File

@ -728,18 +728,18 @@ if ($resql)
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter .= $langs->trans('DateOperationShort').' : ';
$moreforfilter .= '<div class="nowrap inline-block">'.$langs->trans('From') . ' ';
$moreforfilter .= '<div class="nowrap'.($conf->browser->layout=='phone'?' centpercent':'').' inline-block">'.$langs->trans('From') . ' ';
$moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1).'</div>';
$moreforfilter .= ' - ';
$moreforfilter .= '<div class="nowrap inline-block">'.$langs->trans('to') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1).'</div>';
//$moreforfilter .= ' - ';
$moreforfilter .= '<div class="nowrap'.($conf->browser->layout=='phone'?' centpercent':'').' inline-block">'.$langs->trans('to') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1).'</div>';
$moreforfilter .= '</div>';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter .= $langs->trans('DateValueShort').' : ';
$moreforfilter .= '<div class="nowrap inline-block">'.$langs->trans('From') . ' ';
$moreforfilter .= '<div class="nowrap'.($conf->browser->layout=='phone'?' centpercent':'').' inline-block">'.$langs->trans('From') . ' ';
$moreforfilter .= $form->select_date($search_dv_start, 'search_start_dv', 0, 0, 1, "search_form", 1, 0, 1).'</div>';
$moreforfilter .= ' - ';
$moreforfilter .= '<div class="nowrap inline-block">'.$langs->trans('to') . ' ' . $form->select_date($search_dv_end, 'search_end_dv', 0, 0, 1, "search_form", 1, 0, 1).'</div>';
//$moreforfilter .= ' - ';
$moreforfilter .= '<div class="nowrap'.($conf->browser->layout=='phone'?' centpercent':'').' inline-block">'.$langs->trans('to') . ' ' . $form->select_date($search_dv_end, 'search_end_dv', 0, 0, 1, "search_form", 1, 0, 1).'</div>';
$moreforfilter .= '</div>';
$parameters=array();
@ -757,7 +757,8 @@ if ($resql)
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// Fields title
print '<tr class="liste_titre">';
@ -1089,7 +1090,7 @@ if ($resql)
print '<td align="center" class="nowrap">';
print '<span id="datevalue_'.$objp->rowid.'">'.dol_print_date($db->jdate($objp->dv),"day")."</span>";
print '&nbsp;';
print '<span>';
print '<span class="inline-block">';
print '<a class="ajax" href="'.$_SERVER['PHP_SELF'].'?action=dvprev&amp;account='.$objp->bankid.'&amp;rowid='.$objp->rowid.'">';
print img_edit_remove() . "</a> ";
print '<a class="ajax" href="'.$_SERVER['PHP_SELF'].'?action=dvnext&amp;account='.$objp->bankid.'&amp;rowid='.$objp->rowid.'">';
@ -1295,6 +1296,8 @@ if ($resql)
}
print "</table>";
print "</div>";
print '</form>';
$db->free($resql);
}

View File

@ -603,7 +603,7 @@ else
print '<td>'.$object->label.'</td></tr>';*/
// Type
print '<tr><td>'.$langs->trans("AccountType").'</td>';
print '<tr><td class="titlefield">'.$langs->trans("AccountType").'</td>';
print '<td>'.$object->type_lib[$object->type].'</td></tr>';
// Currency
@ -683,12 +683,12 @@ else
// Categories
if ($conf->categorie->enabled) {
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
print '<tr><td class="titlefield">'.$langs->trans("Categories").'</td><td>';
print $form->showCategories($object->id,'account',1);
print "</td></tr>";
}
print '<tr><td class="tdtop">'.$langs->trans("Comment").'</td>';
print '<tr><td class="tdtop titlefield">'.$langs->trans("Comment").'</td>';
print '<td>'.dol_htmlentitiesbr($object->comment).'</td></tr>';
print '</table>';

View File

@ -1224,8 +1224,9 @@ class Account extends CommonObject
$label .= '<br><b>' . $langs->trans('AccountNumber') . ':</b> ' . $this->number;
if (! empty($conf->accounting->enabled))
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
$langs->load("accountancy");
$label .= '<br><b>' . $langs->trans('AccountAccounting') . ':</b> ' . $this->account_number;
$label .= '<br><b>' . $langs->trans('AccountAccounting') . ':</b> ' . length_accountg($this->account_number);
$label .= '<br><b>' . $langs->trans('AccountancyJournal') . ':</b> ' . $this->accountancy_journal;
}
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';

View File

@ -276,6 +276,7 @@ if (! empty($moreforfilter))
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// Fields title
@ -583,6 +584,9 @@ if (isset($totalarray['totalbalancefield']))
}
print '</table>';
print "</div>";
print "</form>";
/*

View File

@ -104,10 +104,9 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$solde = $object->solde(0);
/*
* Affiche tableau des echeances a venir
*/
print '<table class="noborder centpercent">';
// Show next coming entries
print '<div class="div-table-responsive">';
print '<table class="noborder centpercent">';
// Ligne de titre tableau des ecritures
print '<tr class="liste_titre">';
@ -121,7 +120,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$var=true;
// Solde actuel
// Current balance
$var=!$var;
print '<tr class="liste_total">';
print '<td align="left" colspan="5">'.$langs->trans("CurrentBalance").'</td>';
@ -327,7 +326,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
print '</tr>';
print "</table>";
print "</div>";
}
else
{

View File

@ -3726,6 +3726,7 @@ else if ($id > 0 || ! empty($ref))
include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
}
print '<div class="div-table-responsive">';
print '<table id="tablelines" class="noborder noshadow" width="100%">';
// Show global modifiers
@ -3797,7 +3798,8 @@ else if ($id > 0 || ! empty($ref))
}
print "</table>\n";
print "</div>";
print "</form>\n";
dol_fiche_end();

View File

@ -409,7 +409,7 @@ class Facture extends CommonInvoice
{
foreach($this->linked_objects as $origin => $tmp_origin_id)
{
if (is_array($tmp_origin_id)) // New baheviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...))
if (is_array($tmp_origin_id)) // New behaviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...))
{
foreach($tmp_origin_id as $origin_id)
{
@ -424,51 +424,51 @@ class Facture extends CommonInvoice
else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1))
{
$origin_id = $tmp_origin_id;
$ret = $this->add_object_linked($this->origin, $origin_id);
$ret = $this->add_object_linked($origin, $origin_id);
if (! $ret)
{
dol_print_error($this->db);
$error++;
}
}
if (! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN))
{
$originforcontact = $this->origin;
$originidforcontact = $origin_id;
if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order
{
require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php';
$exp = new Expedition($this->db);
$exp->fetch($origin_id);
$exp->fetchObjectLinked();
if (count($exp->linkedObjectsIds['commande']) > 0)
{
foreach ($exp->linkedObjectsIds['commande'] as $key => $value)
{
$originforcontact = 'commande';
$originidforcontact = $value->id;
break; // We take first one
}
}
}
$sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc";
$sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'";
$resqlcontact = $this->db->query($sqlcontact);
if ($resqlcontact)
{
while($objcontact = $this->db->fetch_object($resqlcontact))
{
//print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n";
$this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object
}
}
else dol_print_error($resqlcontact);
}
}
}
if (! $error && $this->id && ! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN) && ! empty($this->origin) && ! empty($this->origin_id)) // Get contact from origin object
{
$originforcontact = $this->origin;
$originidforcontact = $this->origin_id;
if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order
{
require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php';
$exp = new Expedition($this->db);
$exp->fetch($this->origin_id);
$exp->fetchObjectLinked();
if (count($exp->linkedObjectsIds['commande']) > 0)
{
foreach ($exp->linkedObjectsIds['commande'] as $key => $value)
{
$originforcontact = 'commande';
$originidforcontact = $value->id;
break; // We take first one
}
}
}
$sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc";
$sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'";
$resqlcontact = $this->db->query($sqlcontact);
if ($resqlcontact)
{
while($objcontact = $this->db->fetch_object($resqlcontact))
{
//print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n";
$this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object
}
}
else dol_print_error($resqlcontact);
}
/*
* Insert lines of invoices into database

View File

@ -712,11 +712,11 @@ if (empty($reshook))
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline);
// Unset extrafield
if (is_array($extralabelsline))
{
{
// Get extra fields
foreach ($extralabelsline as $key => $value)
{
unset($_POST["options_" . $key]);
{
unset($_POST["options_" . $key]);
}
}
@ -1610,7 +1610,10 @@ else
print $langs->trans("ToCreateAPredefinedInvoice", $langs->transnoentitiesnoconv("ChangeIntoRepeatableInvoice")).'<br><br>';
$i = 0;
print '<table class="noborder" width="100%">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER['PHP_SELF'],"f.titre","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER['PHP_SELF'],"s.nom","",$param,"",$sortfield,$sortorder);
@ -1780,6 +1783,9 @@ else
else print '<tr '.$bc[false].'><td colspan="9" class="opacitymedium">'.$langs->trans("NoneF").'</td></tr>';
print "</table>";
print "</div>";
print "</form>";
$db->free($resql);
}
else

View File

@ -636,7 +636,8 @@ if ($resql)
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
if (! empty($arrayfields['f.facnumber']['checked'])) print_liste_field_titre($arrayfields['f.facnumber']['label'],$_SERVER['PHP_SELF'],'f.facnumber','',$param,'',$sortfield,$sortorder);
@ -1135,6 +1136,7 @@ if ($resql)
print $hookmanager->resPrint;
print "</table>\n";
print "</div>";
print "</form>\n";

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
@ -62,8 +62,13 @@ $formother = new FormOther($db);
$checkdepositstatic=new RemiseCheque($db);
$accountstatic=new Account($db);
/*
* Actions
*/
// If click on purge search criteria ?
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
{
$search_ref='';
$search_amount='';
@ -72,6 +77,8 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
$month='';
}
/*
* View
*/
@ -134,8 +141,12 @@ if ($resql)
print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_bank.png', '', '', $limit);
print '<table class="liste">';
print '<tr class="liste_titre">';
$moreforfilter='';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"bc.ref","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"dp","",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder);
@ -219,6 +230,7 @@ if ($resql)
print '</tr>';
}
print "</table>";
print "</div>";
print "</form>\n";
}
else

View File

@ -129,7 +129,7 @@ else
$sql = "SELECT DISTINCT p.rowid, p.ref, p.datep as dp, p.amount,"; // DISTINCT is to avoid duplicate when there is a link to sales representatives
$sql.= " p.statut, p.num_paiement,";
$sql.= " c.code as paiement_code,";
$sql.= " ba.rowid as bid, ba.label,";
$sql.= " ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.accountancy_journal as accountancy_journal,";
$sql.= " s.rowid as socid, s.nom as name";
// Add fields for extrafields
foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key;
@ -222,7 +222,9 @@ if ($resql)
print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $nbtotalofrecords,'title_accountancy.png', 0, '', '', $limit);
print '<table class="noborder" width="100%">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"p.rowid","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"dp","",$param,'align="center"',$sortfield,$sortorder);
@ -320,10 +322,14 @@ if ($resql)
if (! empty($conf->banque->enabled))
{
print '<td>';
if ($objp->bid)
if ($objp->bid > 0)
{
$accountstatic->id=$objp->bid;
$accountstatic->label=$objp->label;
$accountstatic->ref=$objp->bref;
$accountstatic->label=$objp->blabel;
$accountstatic->number=$objp->number;
$accountstatic->account_number=$objp->account_number;
$accountstatic->accountancy_journal=$objp->accountancy_journal;
print $accountstatic->getNomUrl(1);
}
else print '&nbsp;';
@ -347,6 +353,7 @@ if ($resql)
$i++;
}
print "</table>\n";
print "</div>";
print "</form>\n";
}
else

View File

@ -151,8 +151,10 @@ if ($result)
print_barre_liste($langs->trans("SalariesPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit);
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"s.rowid","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Employee"),$_SERVER["PHP_SELF"],"u.rowid","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"s.label","",$param,'align="left"',$sortfield,$sortorder);
@ -257,7 +259,7 @@ if ($result)
print "<td></td></tr>";
print "</table>";
print '</div>';
print '</form>';
$db->free($result);
@ -268,7 +270,5 @@ else
}
llxFooter();
$db->close();

View File

@ -174,8 +174,9 @@ if ($resql)
}
else
{
print '<table class="liste" width="100%">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"id","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"cs.libelle","",$param,'align="left"',$sortfield,$sortorder);
@ -286,6 +287,7 @@ if ($resql)
}
print '</table>';
print '</div>';
}
print '</form>';
}

View File

@ -483,7 +483,8 @@ if ($moreforfilter)
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// Ligne des titres
print '<tr class="liste_titre">';
@ -795,6 +796,7 @@ while ($i < min($num,$limit))
}
print "</table>";
print "</div>";
if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies.png', 0, '', '', $limit, 1);

View File

@ -1928,7 +1928,9 @@ else
';
print '<br>';
print '<table id="tablelines" class="noborder noshadow" width="100%">'; // Array with (n*2)+1 lines
print '<div class="div-table-responsive">';
print '<table id="tablelines" class="noborder noshadow" width="100%">'; // Array with (n*2)+1 lines
// Trick to not show product entries
$savproductenabled=$conf->product->enabled;
@ -1950,7 +1952,7 @@ else
$conf->product->enabled = $savproductenabled;
print '</table>';
print '</div>';
print '</form>';
}

View File

@ -934,56 +934,72 @@ class Contrat extends CommonObject
if (! $error)
{
// Add object linked
if (is_array($this->linked_objects) && ! empty($this->linked_objects))
if (! $error && $this->id && is_array($this->linked_objects) && ! empty($this->linked_objects))
{
foreach($this->linked_objects as $origin => $origin_id)
foreach($this->linked_objects as $origin => $tmp_origin_id)
{
$ret = $this->add_object_linked($origin, $origin_id);
if (! $ret)
if (is_array($tmp_origin_id)) // New behaviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...))
{
dol_print_error($this->db);
$error++;
foreach($tmp_origin_id as $origin_id)
{
$ret = $this->add_object_linked($origin, $origin_id);
if (! $ret)
{
dol_print_error($this->db);
$error++;
}
}
}
else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1))
{
$origin_id = $tmp_origin_id;
$ret = $this->add_object_linked($origin, $origin_id);
if (! $ret)
{
dol_print_error($this->db);
$error++;
}
}
if (! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN))
{
$originforcontact = $origin;
$originidforcontact = $origin_id;
if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order
{
require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php';
$exp = new Expedition($db);
$exp->fetch($origin_id);
$exp->fetchObjectLinked();
if (count($exp->linkedObjectsIds['commande']) > 0)
{
foreach ($exp->linkedObjectsIds['commande'] as $key => $value)
{
$originforcontact = 'commande';
$originidforcontact = $value->id;
break; // We take first one
}
}
}
$sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc";
$sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'";
$resqlcontact = $this->db->query($sqlcontact);
if ($resqlcontact)
{
while($objcontact = $this->db->fetch_object($resqlcontact))
{
if ($objcontact->source == 'internal' && in_array($objcontact->code, array('SALESREPSIGN', 'SALESREPFOLL'))) continue; // ignore this, already forced previously
//print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n";
$this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object
}
}
else dol_print_error($resqlcontact);
}
}
}
if (! $error && $this->id && ! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN) && ! empty($this->origin) && ! empty($this->origin_id)) // Get contact from origin object
{
$originforcontact = $this->origin;
$originidforcontact = $this->origin_id;
if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order
{
require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php';
$exp = new Expedition($db);
$exp->fetch($this->origin_id);
$exp->fetchObjectLinked();
if (count($exp->linkedObjectsIds['commande']) > 0)
{
foreach ($exp->linkedObjectsIds['commande'] as $key => $value)
{
$originforcontact = 'commande';
$originidforcontact = $value->id;
break; // We take first one
}
}
}
$sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc";
$sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'";
$resqlcontact = $this->db->query($sqlcontact);
if ($resqlcontact)
{
while($objcontact = $this->db->fetch_object($resqlcontact))
{
if ($objcontact->source == 'internal' && in_array($objcontact->code, array('SALESREPSIGN', 'SALESREPFOLL'))) continue; // ignore this, already forced previously
//print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n";
$this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object
}
}
else dol_print_error($resqlcontact);
}
}
if (! $error)

View File

@ -393,7 +393,8 @@ if ($resql)
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
if (! empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref","","$param",'',$sortfield,$sortorder);
if (! empty($arrayfields['c.ref_customer']['checked'])) print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer","","$param",'',$sortfield,$sortorder);
@ -723,6 +724,8 @@ if ($resql)
$db->free($resql);
print '</table>';
print '</div>';
print '</form>';
}
else

View File

@ -271,6 +271,7 @@ if ($resql)
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
@ -449,7 +450,10 @@ if ($resql)
}
$db->free($resql);
print '</table></form>';
print '</table>';
print '</div>';
print '</form>';
}
else

View File

@ -549,6 +549,7 @@ class FormFile
$buttonlabeltoshow=$buttonlabel;
if (empty($buttonlabel)) $buttonlabel=$langs->trans('Generate');
if ($conf->browser->layout == 'phone') $urlsource.='#'.$forname.'_form'; # So we switch to form after a generation
if (empty($noform)) $out.= '<form action="'.$urlsource.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc').'" name="'.$forname.'" id="'.$forname.'_form" method="post">';
$out.= '<input type="hidden" name="action" value="builddoc">';
$out.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';

View File

@ -33,7 +33,8 @@ class MailingTargets // This can't be abstract as it is used for some method
{
var $db;
var $error;
var $tooltip='';
/**
* Constructor
@ -52,11 +53,16 @@ class MailingTargets // This can't be abstract as it is used for some method
*/
function getDesc()
{
global $langs;
global $langs, $form;
$langs->load("mails");
$transstring="MailingModuleDesc".$this->name;
if ($langs->trans($transstring) != $transstring) return $langs->trans($transstring);
else return $this->desc;
$s='';
if ($langs->trans($transstring) != $transstring) $s=$langs->trans($transstring);
else $s=$this->desc;
if ($this->tooltip && is_object($form)) $s .= ' '.$form->textwithpicto('', $langs->trans($this->tooltip), 1, 1);
return $s;
}
/**

View File

@ -31,12 +31,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
class mailing_xinputfile extends MailingTargets
{
var $name='EmailsFromFile'; // Identifiant du module mailing
var $desc='EMails issus d\'un fichier'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv<75>e
var $desc='EMails from a file'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv<75>e
var $require_module=array(); // Module mailing actif si modules require_module actifs
var $require_admin=0; // Module mailing actif pour user admin ou non
var $picto='generic';
var $db;
var $tooltip='UseFormatFileEmailToTarget';
/**

View File

@ -35,9 +35,8 @@ class mailing_xinputuser extends MailingTargets
var $require_module=array(); // Module mailing actif si modules require_module actifs
var $require_admin=0; // Module mailing actif pour user admin ou non
var $picto='generic';
var $db;
var $tooltip='UseFormatInputEmailToTarget';
/**
* Constructor
@ -104,7 +103,7 @@ class mailing_xinputuser extends MailingTargets
global $langs;
$s='';
$s.='<input type="text" name="xinputuser" class="flat" size="40" value="'.GETPOST("xinputuser").'">';
$s.='<input type="text" name="xinputuser" class="flat minwidth300" value="'.GETPOST("xinputuser").'">';
return $s;
}

View File

@ -242,12 +242,12 @@ class modSociete extends DolibarrModules
$this->rights[$r][4] = 'contact';
$this->rights[$r][5] = 'export';
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
//--------
$r=0;
@ -282,7 +282,7 @@ class modSociete extends DolibarrModules
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as paymode ON s.mode_reglement = paymode.id';
$this->export_sql_end[$r] .=' WHERE s.entity IN ('.getEntity('societe', 1).')';
if(!$user->rights->societe->client->voir) $this->export_sql_end[$r] .=' AND sc.fk_user = '.$user->id;
// Export list of contacts and attributes
$r++;
$this->export_code[$r]=$this->rights_class.'_'.$r;
@ -300,9 +300,12 @@ class modSociete extends DolibarrModules
}
$keyforselect='socpeople'; $keyforelement='contact'; $keyforaliasextra='extra';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
$keyforselect='societe'; $keyforelement='company'; $keyforaliasextra='extrasoc';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
$this->export_sql_start[$r]='SELECT DISTINCT ';
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'socpeople as c';
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON c.fk_soc = s.rowid';
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_extrafields as extrasoc ON s.rowid = extrasoc.fk_object';
if(!$user->rights->societe->client->voir) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON c.fk_departement = d.rowid';
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON c.fk_pays = co.rowid';
@ -402,7 +405,7 @@ class modSociete extends DolibarrModules
'sr.code_banque'=>"0000", 'sr.code_guichet'=>"1111",'sr.number'=>"3333333333",
'sr.cle_rib'=>"22",'sr.bic'=>"USHINGMMXXX",'sr.iban_prefix'=>"US00 0000 1111 22 3333 3333"
);
// Import Company Salesman
$r++;
$this->import_code[$r]=$this->rights_class.'_'.$r;
@ -411,7 +414,7 @@ class modSociete extends DolibarrModules
$this->import_entities_array[$r]=array('sr.fk_user'=>'user'); // We define here only fields that use another icon that the one defined into import_icon
$this->import_tables_array[$r]=array('sr'=>MAIN_DB_PREFIX.'societe_commerciaux');
$this->import_fields_array[$r]=array('sr.fk_soc'=>"ThirdPartyName*",'sr.fk_user'=>"User*");
$this->import_convertvalue_array[$r]=array(
'sr.fk_soc'=>array('rule'=>'fetchidfromref','classfile'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty'),
'sr.fk_user'=>array('rule'=>'fetchidfromref','classfile'=>'/user/class/user.class.php','class'=>'User','method'=>'fetch','element'=>'User')

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2010-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@ -33,6 +33,7 @@ print '<br>';
// Load attribute_label
$extrafields->fetch_name_optionals_label($elementtype);
print '<div class="div-table-responsive">';
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
print '<tr class="liste_titre">';
@ -68,6 +69,6 @@ foreach($extrafields->attribute_type as $key => $value)
}
print "</table>";
print '</div>';
?>
<!-- END PHP TEMPLATE admin_extrafields_view.tpl.php -->

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010-2016 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -17,7 +17,7 @@
*
* Javascript code to activate drag and drop on lines
* You can use this if you want to be abale to drag and drop rows of a table.
* You must add id="tablelines" ont table level tag and have count($object->lines) or count($taskarray) > 0
* You must add id="tablelines" on table level tag and have count($object->lines) or count($taskarray) > 0
*/
?>

View File

@ -52,6 +52,7 @@ $userstatic=new User($db);
?>
<!-- BEGIN PHP TEMPLATE CONTACTS -->
<div class="div-table-responsive">
<div class="tagtable centpercent noborder allwidth">
<?php
@ -237,6 +238,7 @@ if ($permission) {
<?php $i++; ?>
<?php } } ?>
</div>
</div>
<!-- TEMPLATE CONTACTS HOOK BEGIN HERE -->
<?php

View File

@ -157,7 +157,9 @@ if ($resql)
print $langs->trans("FilterOnInto", $search_all) . join(', ',$fieldstosearchall);
}
print "<table class=\"noborder\" width=\"100%\">";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
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("Company"),$_SERVER["PHP_SELF"],"d.societe","", $param,"",$sortfield,$sortorder);
@ -237,6 +239,7 @@ if ($resql)
$i++;
}
print "</table>";
print '</div>';
print "</form>\n";
$db->free($resql);
}

View File

@ -127,7 +127,7 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
// Purge search criteria
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
{
$search_ref_exp='';
$search_ref_liv='';
@ -305,7 +305,8 @@ if ($resql)
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
@ -635,6 +636,8 @@ if ($resql)
}
print "</table>";
print "</div>";
print '</form>';
$db->free($resql);
}
else

View File

@ -352,6 +352,7 @@ if ($resql)
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print "<tr class=\"liste_titre\">";
if (! empty($arrayfields['d.ref']['checked'])) print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.ref","",$param,'',$sortfield,$sortorder);
@ -664,7 +665,8 @@ if ($resql)
print $hookmanager->resPrint;
print '</table>'."\n";
print '</div>';
print '</form>'."\n";
/*

View File

@ -1241,16 +1241,6 @@ else if ($id > 0 || ! empty($ref))
print '<table class="border" width="100%">';
// Ref
/*
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="3">';
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
print '</td></tr>';
// Third party
print "<tr><td>".$langs->trans("Company").'</td><td colspan="3">'.$object->thirdparty->getNomUrl(1)."</td></tr>";
*/
if (! empty($conf->global->FICHINTER_USE_PLANNED_AND_DONE_DATES))
{
// Date Start
@ -1283,37 +1273,6 @@ else if ($id > 0 || ! empty($ref))
print '</td>';
print '</tr>';
// Project
/*
if (! empty($conf->projet->enabled))
{
$langs->load('projects');
print '<tr>';
print '<td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Project');
print '</td>';
if ($action != 'classify')
{
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=classify&amp;id='.$object->id.'">';
print img_edit($langs->trans('SetProject'),1);
print '</a></td>';
}
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'classify')
{
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid', 0, 0, 1);
}
else
{
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none', 0, 0);
}
print '</td>';
print '</tr>';
}*/
// Contrat
if ($conf->contrat->enabled)
{
@ -1355,9 +1314,6 @@ else if ($id > 0 || ! empty($ref))
print '</tr>';
}
// Statut
//print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">'.$object->getLibStatut(4).'</td></tr>';
// Other attributes
$cols = 2;
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';

View File

@ -1961,6 +1961,7 @@ class CommandeFournisseur extends CommonOrder
if ($resql)
{
$result = 0;
$old_statut = $this->statut;
$this->statut = $statut;
// Call trigger
@ -1974,6 +1975,7 @@ class CommandeFournisseur extends CommonOrder
}
else
{
$this->statut = $old_statut;
$this->db->rollback();
$this->error=$this->db->lasterror();
$result = -1;

View File

@ -2076,6 +2076,7 @@ elseif (! empty($object->id))
include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
}
print '<div class="div-table-responsive">';
print '<table id="tablelines" class="noborder noshadow" width="100%">';
// Add free products/services form
@ -2104,7 +2105,7 @@ elseif (! empty($object->id))
}
}
print '</table>';
print '</div>';
print '</form>';
dol_fiche_end();

View File

@ -64,7 +64,7 @@ $search_state=trim(GETPOST("search_state"));
$search_country=GETPOST("search_country",'int');
$search_type_thirdparty=GETPOST("search_type_thirdparty",'int');
$search_user=GETPOST('search_user','int');
$search_request_author=GETPOST('search_request_author','int');
$search_request_author=GETPOST('search_request_author','alpha');
$search_ht=GETPOST('search_ht');
$search_ttc=GETPOST('search_ttc');
$search_status=(GETPOST('search_status','alpha')!=''?GETPOST('search_status','alpha'):GETPOST('statut','alpha')); // alpha and not intbecause it can be '6,7'
@ -192,7 +192,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
$search_type='';
$search_country='';
$search_type_thirdparty='';
$search_request_author=-1;
$search_request_author='';
$search_total_ht='';
$search_total_vat='';
$search_total_ttc='';
@ -205,7 +205,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
$deliveryyear='';
$billed='';
$search_array_options=array();
}
if (empty($reshook))
@ -248,7 +248,7 @@ if ($socid > 0)
$fourn->fetch($socid);
$title .= ' - '.$fourn->name;
}
if ($status)
if ($status)
{
if ($status == '1,2,3') $title.=' - '.$langs->trans("StatusOrderToProcessShort");
if ($status == '6,7') $title.=' - '.$langs->trans("StatusOrderCanceled");
@ -300,7 +300,7 @@ if ($search_ref) $sql .= natural_search('cf.ref', $search_ref);
if ($search_refsupp) $sql.= natural_search("cf.ref_supplier", $search_refsupp);
if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
if ($search_company) $sql .= natural_search('s.nom', $search_company);
if ($search_request_author > 0) $sql.= " AND u.login LIKE '%".$db->escape($search_request_author)."%'";
if ($search_request_author) $sql.= " AND u.login LIKE '%".$db->escape($search_request_author)."%'";
if ($billed != '' && $billed >= 0) $sql .= " AND cf.billed = ".$billed;
//Required triple check because statut=0 means draft filter
@ -382,7 +382,7 @@ $sql.= $db->plimit($limit+1, $offset);
$resql = $db->query($sql);
if ($resql)
{
{
if ($socid > 0)
{
$soc = new Societe($db);
@ -393,7 +393,7 @@ if ($resql)
{
$title = $langs->trans('ListOfSupplierOrders');
}
$num = $db->num_rows($resql);
$param='';
@ -410,13 +410,13 @@ if ($resql)
if ($search_ref) $param.='&search_ref='.$search_ref;
if ($search_company) $param.='&search_company='.$search_company;
if ($search_user > 0) $param.='&search_user='.$search_user;
if ($search_request_author > 0) $param.='&search_request_author='.$search_request_author;
if ($search_request_author) $param.='&search_request_author='.$search_request_author;
if ($search_sale > 0) $param.='&search_sale='.$search_sale;
if ($search_total_ht != '') $param.='&search_total_ht='.$search_total_ht;
if ($search_total_ttc != '') $param.="&search_total_ttc=".$search_total_ttc;
if ($search_refsupp) $param.="&search_refsupp=".$search_refsupp;
if ($search_status >= 0) $param.="&search_status=".$search_status;
if ($billed != '') $param.="&billed=".$billed;
if ($billed != '') $param.="&billed=".$billed;
if ($optioncss != '') $param.='&optioncss='.$optioncss;
// Add $param from extra fields
foreach ($search_array_options as $key => $val)
@ -425,9 +425,9 @@ if ($resql)
$tmpkey=preg_replace('/search_options_/','',$key);
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
}
//$massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge")));
// Lignes des champs de filtre
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
@ -437,9 +437,9 @@ if ($resql)
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_commercial.png', 0, '', '', $limit);
if ($sall)
{
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
@ -447,7 +447,7 @@ if ($resql)
}
$moreforfilter='';
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid)
{
@ -485,11 +485,12 @@ if ($resql)
print $moreforfilter;
print '</div>';
}
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
if (! empty($arrayfields['cf.ref']['checked'])) print_liste_field_titre($arrayfields['cf.ref']['label'],$_SERVER["PHP_SELF"],"cf.ref","",$param,'',$sortfield,$sortorder);
@ -511,9 +512,9 @@ if ($resql)
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
if (! empty($arrayfields["ef.".$key]['checked']))
{
$align=$extrafields->getAlignFlag($key);
print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
@ -538,7 +539,7 @@ if ($resql)
print '<td class="liste_titre"><input size="8" type="text" class="flat" name="search_ref" value="'.$search_ref.'"></td>';
}
// Ref customer
if (! empty($arrayfields['cf.ref_supplier']['checked']))
if (! empty($arrayfields['cf.ref_supplier']['checked']))
{
print '<td class="liste_titre"><input type="text" class="flat" size="8" name="search_refsupp" value="'.$search_refsupp.'"></td>';
}
@ -551,11 +552,11 @@ if ($resql)
if (! empty($arrayfields['u.login']['checked']))
{
print '<td class="liste_titre">';
//print '<input type="text" class="flat" size="6" name="search_request_author" value="'.$search_request_author.'">';
print '<input type="text" class="flat" size="6" name="search_request_author" value="'.$search_request_author.'">';
print '</td>';
}
// Thirpdarty
if (! empty($arrayfields['s.nom']['checked']))
if (! empty($arrayfields['s.nom']['checked']))
{
print '<td class="liste_titre"><input type="text" size="6" class="flat" name="search_company" value="'.$search_company.'"></td>';
}
@ -594,7 +595,7 @@ if ($resql)
print '</td>';
}
// Date delivery
if (! empty($arrayfields['cf.date_delivery']['checked']))
if (! empty($arrayfields['cf.date_delivery']['checked']))
{
print '<td class="liste_titre" align="center">';
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="deliveryday" value="'.$deliveryday.'">';
@ -622,7 +623,7 @@ if ($resql)
print '<td class="liste_titre" align="right">';
print '<input class="flat" type="text" size="5" name="search_total_ttc" value="'.$search_total_ttc.'">';
print '</td>';
}
}
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
@ -649,7 +650,7 @@ if ($resql)
// Fields from hook
$parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print $hookmanager->resPrint;
// Date creation
if (! empty($arrayfields['cf.datec']['checked']))
{
@ -681,13 +682,13 @@ if ($resql)
$searchpitco=$form->showFilterAndCheckAddButtons(0);
print $searchpitco;
print '</td>';
print "</tr>\n";
$total=0;
$subtotal=0;
$productstat_cache=array();
$userstatic = new User($db);
$objectstatic=new CommandeFournisseur($db);
$projectstatic=new Project($db);
@ -699,7 +700,7 @@ if ($resql)
{
$obj = $db->fetch_object($resql);
$var=!$var;
$objectstatic->id=$obj->rowid;
$objectstatic->ref=$obj->ref;
$objectstatic->ref_supplier = $obj->ref_supplier;
@ -708,7 +709,7 @@ if ($resql)
$objectstatic->total_ttc = $obj->total_ttc;
$objectstatic->date_delivery = $db->jdate($obj->date_delivery);
$objectstatic->statut = $obj->fk_statut;
print "<tr ".$bc[$var].">";
// Ref
@ -814,7 +815,7 @@ if ($resql)
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Order date
if (! empty($arrayfields['cf.date_commande']['checked']))
{
@ -859,7 +860,7 @@ if ($resql)
if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield'];
$totalarray['totalttc'] += $obj->total_ttc;
}
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
@ -910,7 +911,7 @@ if ($resql)
print '<td align="center">'.yn($obj->billed).'</td>';
if (! $i) $totalarray['nbfield']++;
}
// Action column
print '<td></td>';
if (! $i) $totalarray['nbfield']++;
@ -919,6 +920,7 @@ if ($resql)
$i++;
}
print "</table>\n";
print '</div>';
print "</form>\n";
if (! empty($conf->facture->enable)) print '<br>'.img_help(1,'').' '.$langs->trans("ToBillSeveralOrderSelectCustomer", $langs->transnoentitiesnoconv("CreateInvoiceForThisCustomer")).'<br>';

View File

@ -2560,6 +2560,7 @@ else
include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
}
print '<div class="div-table-responsive">';
print '<table id="tablelines" class="noborder noshadow" width="100%">';
global $forceall, $senderissupplier, $dateSelector, $inputalsopricewithtax;
@ -2587,8 +2588,7 @@ else
}
print '</table>';
print '</div>';
print '</form>';
dol_fiche_end();

View File

@ -486,7 +486,8 @@ if ($resql)
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
if (! empty($arrayfields['f.ref']['checked'])) print_liste_field_titre($arrayfields['f.ref']['label'],$_SERVER['PHP_SELF'],'f.ref,f.rowid','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['f.ref_supplier']['checked'])) print_liste_field_titre($arrayfields['f.ref_supplier']['label'],$_SERVER["PHP_SELF"],'f.ref_supplier','',$param,'',$sortfield,$sortorder);
@ -984,7 +985,7 @@ if ($resql)
print $hookmanager->resPrint;
print "</table>\n";
print '</div>';
print "</form>\n";
}
else

View File

@ -414,8 +414,11 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print ' });'."\n";
print ' </script>'."\n";
}
print '<table class="liste" width="100%">';
print '<tr class="liste_titre">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print '<td>'.$langs->trans('Invoice').'</td>';
print '<td>'.$langs->trans('RefSupplier').'</td>';
print '<td align="center">'.$langs->trans('Date').'</td>';
@ -539,6 +542,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print "</tr>\n";
}
print "</table>\n";
print "</div>";
}
$db->free($resql);
}
@ -642,7 +647,10 @@ if (empty($action))
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<table class="noborder" width="100%">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans('RefPayment'),$_SERVER["PHP_SELF"],'p.rowid','',$paramlist,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Date'),$_SERVER["PHP_SELF"],'dp','',$paramlist,'align="center"',$sortfield,$sortorder);
@ -726,6 +734,7 @@ if (empty($action))
$i++;
}
print "</table>";
print "</div>";
print "</form>\n";
}
else

View File

@ -170,7 +170,11 @@ else
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
print '<input type="hidden" name="action" value="update" />';
print '<table class="noborder" width="100%;">';
$moreforfilter='';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" id="tablelines3">'."\n";
print "<tr class=\"liste_titre\">";
print '<td width="55%">'.$langs->trans('Employee').'</td>';
if (count($typeleaves))
@ -244,7 +248,7 @@ else
}
print '</table>';
print '</div>';
print '</form>';
}

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
* Copyright (C) 2013-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012-2016 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@ -289,8 +289,10 @@ if ($sall)
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
}
print '<table class="noborder" width="100%;">';
print "<tr class=\"liste_titre\">";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"cp.rowid","",'','',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateCreateCP"),$_SERVER["PHP_SELF"],"cp.date_create","",'','align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Employee"),$_SERVER["PHP_SELF"],"cp.fk_user","",'','',$sortfield,$sortorder);
@ -453,6 +455,7 @@ if($holiday_payes == '2')
}
print '</table>';
print '</div>';
print '</form>';
/*if ($user_id == $user->id)

View File

@ -71,7 +71,11 @@ if ($lastUpdate)
else print $langs->trans('None');
print "</div><br>\n";
print '<table class="noborder" width="100%">';
$moreforfilter='';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" id="tablelines3">'."\n";
print '<tbody>';
print '<tr class="liste_titre">';
@ -122,7 +126,7 @@ if ($log_holiday == '2')
print '</tbody>'."\n";
print '</table>'."\n";
print '</div>';
llxFooter();

View File

@ -22,7 +22,7 @@
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_ENABLE_LOG_TO_HTML','0','chaine','If this option is set to 1, it is possible to see log output at end of HTML sources by adding paramater logtohtml=1 on URL',1,0);
insert into llx_const (name, value, type, note, visible, entity) values (__ENCRYPT('MAIN_ENABLE_LOG_TO_HTML')__,__ENCRYPT('0')__,'chaine','If this option is set to 1, it is possible to see log output at end of HTML sources by adding paramater logtohtml=1 on URL',1,0);
-- Was done into a 3.8 fix, so we must do it also in 3.9
@ -61,7 +61,7 @@ update llx_opensurvey_sondage set format = 'D' where format = 'D+';
update llx_opensurvey_sondage set format = 'A' where format = 'A+';
INSERT INTO llx_const (name, value, type, note, visible) values (__ENCRYPT('MAIN_DELAY_EXPENSEREPORTS_TO_PAY')__,__ENCRYPT('31')__,'chaine','Tolérance de retard avant alerte (en jours) sur les notes de frais impayées',0);
INSERT INTO llx_const (name, value, type, note, visible) values ('MAIN_SIZE_SHORTLIST_LIMIT','3','chaine','Max length for small lists (tabs)',0);
INSERT INTO llx_const (name, value, type, note, visible) values (__ENCRYPT('MAIN_SIZE_SHORTLISTE_LIMIT')__,__ENCRYPT('3')__,'chaine','Max length for small lists (tabs)',0);
ALTER TABLE llx_accounting_system MODIFY COLUMN pcg_version varchar(32);
ALTER TABLE llx_accountingaccount MODIFY COLUMN fk_pcg_version varchar(32);

View File

@ -487,5 +487,5 @@ ToCreateARecurringInvoiceGene=To generate future invoices regularly and manually
ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated automatically, ask you administrator to enable and setup module <strong>%s</strong>. Note that both method (manual and automatic) can be used together with no risk of duplication.
DeleteRepeatableInvoice=Delete template invoice
ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice?
CreateOneBillByThird=Create one invoice per third (otherwise, one invoice per order)
CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order)
BillCreated=%s bill(s) created

View File

@ -118,6 +118,8 @@ MailSendSetupIs2=You must first go, with an admin account, into menu %sHome - Se
MailSendSetupIs3=If you have any questions on how to setup your SMTP server, you can ask to %s.
YouCanAlsoUseSupervisorKeyword=You can also add the keyword <strong>__SUPERVISOREMAIL__</strong> to have email being sent to the supervisor of user (works only if an email is defined for this supervisor)
NbOfTargetedContacts=Current number of targeted contact emails
UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;firstname;other</strong>
UseFormatInputEmailToTarget=Enter a string with format <strong>email;name;firstname;other</strong>
MailAdvTargetRecipients=Recipients (advanced selection)
AdvTgtTitle=Fill input fields to preselect the thirdparties or contacts/addresses to target
AdvTgtSearchTextHelp=Use %% as magic caracters. For exemple to find all item like <b>jean, joe, jim</b>, you can input <b>j%%</b>, you can also use ; as separator for value, and use ! for except this value. For exemple <b>jean;joe;jim%%;!jimo;!jima%</b> will target all jean, joe, start with jim but not jimo and not everythnig taht start by jima

View File

@ -322,6 +322,9 @@ AmountTTCShort=Amount (inc. tax)
AmountHT=Amount (net of tax)
AmountTTC=Amount (inc. tax)
AmountVAT=Amount tax
MulticurrencyAlreadyPaid=Already payed, original currency
MulticurrencyRemainderToPay=Remain to pay, original currency
MulticurrencyPaymentAmount=Payment amount, original currency
MulticurrencyAmountHT=Amount (net of tax), original currency
MulticurrencyAmountTTC=Amount (inc. of tax), original currency
MulticurrencyAmountVAT=Amount tax, original currency

View File

@ -121,7 +121,9 @@ if ($resql)
print_barre_liste($langs->trans("Loans"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit);
print '<table class="noborder" width="100%">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"l.rowid","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"l.label","",$param,'align="left"',$sortfield,$sortorder);
@ -176,6 +178,7 @@ if ($resql)
}
print "</table>";
print '</div>';
print "</form>\n";
$db->free($resql);
}

View File

@ -849,6 +849,7 @@ if (! defined('NOREQUIRETRAN'))
$bc=array(0=>'class="impair"',1=>'class="pair"');
$bcdd=array(0=>'class="impair drag drop"',1=>'class="pair drag drop"');
$bcnd=array(0=>'class="impair nodrag nodrop nohover"',1=>'class="pair nodrag nodrop nohoverpair"'); // Used for tr to add new lines
$bctag=array(0=>'class="impair tagtr"',1=>'class="pair tagtr"');
// Define messages variables
$mesg=''; $warning=''; $error=0;

View File

@ -179,7 +179,10 @@ if ($result) {
print '<br>';
print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, $nbtotalofrecords, '');
print "<table class=\"noborder\" width=\"100%\">";
$moreforfilter='';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
@ -244,6 +247,8 @@ if ($result) {
}
}
print "</table>";
print "</div>";
} else {
dol_print_error($db);
}

View File

@ -203,8 +203,11 @@ if ($result)
print '<br>';
print_barre_liste($langs->trans("MarginDetails"),$page,$_SERVER["PHP_SELF"],"&amp;id=".$id,$sortfield,$sortorder,'',0,0,'');
$moreforfilter='';
$i = 0;
print "<table class=\"noborder\" width=\"100%\">";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
if ($id > 0) {
@ -324,6 +327,7 @@ if ($result)
print "</tr>\n";
print "</table>";
print '</div>';
}
else
{

View File

@ -167,6 +167,8 @@ if ($id > 0 || ! empty($ref))
print_barre_liste($langs->trans("MarginDetails"),$page,$_SERVER["PHP_SELF"],"&amp;id=$object->id",$sortfield,$sortorder,'',0,0,'');
$i = 0;
print '<div class="div-table-responsive">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
@ -252,7 +254,7 @@ if ($id > 0 || ! empty($ref))
print '<td align="right">&nbsp;</td>';
print "</tr>\n";
print "</table>";
print '<br>';
print '</div>';
} else {
dol_print_error($db);
}

View File

@ -78,8 +78,6 @@ llxHeader();
$param='';
$fieldtosortuser=empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?'firstname':'lastname';
print '<div class="corps">'."\n";
print load_fiche_titre($langs->trans("OpenSurveyArea"));
// List of surveys into database
@ -90,7 +88,11 @@ print '<input type="hidden" name="action" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<table class="liste">'."\n";
$moreforfilter = '';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.id_sondage",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Title"), $_SERVER["PHP_SELF"], "p.titre",$param,"","",$sortfield,$sortorder);
@ -104,7 +106,7 @@ print '</tr>'."\n";
print '<tr class="liste_titre">';
print '<td></td>';
print '<td><input type="text" name="surveytitle" value="'.dol_escape_htmltag($surveytitle).'"></td>';
print '<td><input type="text" class="maxwidth100onsmartphone" name="surveytitle" value="'.dol_escape_htmltag($surveytitle).'"></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
@ -197,11 +199,9 @@ while ($i < min($num,$limit))
}
print '</table>'."\n";
print '</div>';
print '</form>';
print '</div>'."\n";
llxFooter();
$db->close();

View File

@ -144,7 +144,6 @@ if (empty($reshook))
*/
else if ($action == 'builddoc' && $user->rights->produit->creer)
{
// Save last template used to generate document
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
@ -749,7 +748,7 @@ if (empty($reshook))
{
$buyprice = $result;
}
$result = $facture->addline(
$desc,
$pu_ht,
@ -790,7 +789,6 @@ if (empty($reshook))
else {
$action="";
setEventMessages($langs->trans("WarningSelectOneDocument"), null, 'warnings');
}
}
}
@ -891,11 +889,12 @@ else
dol_fiche_head('');
print '<table class="border" width="100%">';
print '<table class="border centpercent">';
print '<tr>';
$tmpcode='';
if (! empty($modCodeProduct->code_auto)) $tmpcode=$modCodeProduct->getNextValue($object,$type);
print '<td class="fieldrequired" width="20%">'.$langs->trans("Ref").'</td><td colspan="3"><input name="ref" size="32" maxlength="128" value="'.dol_escape_htmltag(GETPOST('ref')?GETPOST('ref'):$tmpcode).'">';
print '<td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag(GETPOST('ref')?GETPOST('ref'):$tmpcode).'">';
if ($refalreadyexists)
{
print $langs->trans("RefAlreadyExists");
@ -903,7 +902,7 @@ else
print '</td></tr>';
// Label
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="3"><input name="label" size="40" maxlength="255" value="'.dol_escape_htmltag(GETPOST('label')).'"></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="3"><input name="label" class="minwidth300 maxwidth400onsmartphone" maxlength="255" value="'.dol_escape_htmltag(GETPOST('label')).'"></td></tr>';
// On sell
print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">';
@ -946,14 +945,14 @@ else
print '</td><td>'.$langs->trans("BarcodeValue").'</td><td>';
$tmpcode=isset($_POST['barcode'])?GETPOST('barcode'):$object->barcode;
if (empty($tmpcode) && ! empty($modBarCodeProduct->code_auto)) $tmpcode=$modBarCodeProduct->getNextValue($object,$type);
print '<input size="40" class="maxwidthonsmartphone" type="text" name="barcode" value="'.dol_escape_htmltag($tmpcode).'">';
print '<input class="maxwidth100" type="text" name="barcode" value="'.dol_escape_htmltag($tmpcode).'">';
print '</td></tr>';
}
// Description (used in invoice, propal...)
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td colspan="3">';
$doleditor = new DolEditor('desc', GETPOST('desc'), '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '80%');
$doleditor = new DolEditor('desc', GETPOST('desc'), '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%');
$doleditor->Create();
print "</td></tr>";
@ -967,11 +966,11 @@ else
if ($type != 1 && ! empty($conf->stock->enabled))
{
print '<tr><td>'.$langs->trans("StockLimit").'</td><td>';
print '<input name="seuil_stock_alerte" size="4" value="'.GETPOST('seuil_stock_alerte').'">';
print '<input name="seuil_stock_alerte" class="maxwidth50" value="'.GETPOST('seuil_stock_alerte').'">';
print '</td>';
// Stock desired level
print '<td>'.$langs->trans("DesiredStock").'</td><td>';
print '<input name="desiredstock" size="4" value="'.GETPOST('desiredstock').'">';
print '<input name="desiredstock" class="maxwidth50" value="'.GETPOST('desiredstock').'">';
print '</td></tr>';
}
else
@ -1043,7 +1042,7 @@ else
// Custom code
if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO) && empty($type))
{
print '<tr><td>'.$langs->trans("CustomCode").'</td><td><input name="customcode" size="10" value="'.GETPOST('customcode').'"></td>';
print '<tr><td>'.$langs->trans("CustomCode").'</td><td><input name="customcode" class="maxwidth100onsmartphone" value="'.GETPOST('customcode').'"></td>';
// Origin country
print '<td>'.$langs->trans("CountryOrigin").'</td><td>';
print $form->select_country(GETPOST('country_id','int'),'country_id');
@ -1065,7 +1064,7 @@ else
print '<tr><td class="tdtop">'.$langs->trans("NoteNotVisibleOnBill").'</td><td colspan="3">';
// We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF.
$doleditor = new DolEditor('note_private', GETPOST('note_private'), '', 140, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_8, '80%');
$doleditor = new DolEditor('note_private', GETPOST('note_private'), '', 140, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_8, '90%');
$doleditor->Create();
print "</td></tr>";
@ -1093,18 +1092,18 @@ else
print '<table class="border" width="100%">';
// Price
print '<tr><td>'.$langs->trans("SellingPrice").'</td>';
print '<td><input name="price" size="10" value="'.$object->price.'">';
print '<tr><td class="titlefieldcreate">'.$langs->trans("SellingPrice").'</td>';
print '<td><input name="price" class="maxwidth50" value="'.$object->price.'">';
print $form->selectPriceBaseType($object->price_base_type, "price_base_type");
print '</td></tr>';
// Min price
print '<tr><td>'.$langs->trans("MinPrice").'</td>';
print '<td><input name="price_min" size="10" value="'.$object->price_min.'">';
print '<td><input name="price_min" class="maxwidth50" value="'.$object->price_min.'">';
print '</td></tr>';
// VAT
print '<tr><td width="20%">'.$langs->trans("VATRate").'</td><td>';
print '<tr><td>'.$langs->trans("VATRate").'</td><td>';
print $form->load_tva("tva_tx",-1,$mysoc,'');
print '</td></tr>';
@ -1113,32 +1112,33 @@ else
print '<br>';
}
// Accountancy codes
print '<table class="border" width="100%">';
if (! empty($conf->accounting->enabled))
{
// Accountancy_code_sell
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>';
print '<td class="maxwidthonsmartphone">';
print $formaccountancy->select_account($object->accountancy_code_sell, 'accountancy_code_sell', 1, '', 0, 1);
print '<td>';
print $formaccountancy->select_account(GETPOST('accountancy_code_sell'), 'accountancy_code_sell', 1, null, 1, 1, '');
print '</td></tr>';
// Accountancy_code_buy
print '<tr><td>'.$langs->trans("ProductAccountancyBuyCode").'</td>';
print '<td class="maxwidthonsmartphone">';
print $formaccountancy->select_account($object->accountancy_code_buy, 'accountancy_code_buy', 1, '', 0, 1);
print '<td>';
print $formaccountancy->select_account(GETPOST('accountancy_code_buy'), 'accountancy_code_buy', 1, null, 1, 1, '');
print '</td></tr>';
}
else // For external software
{
// Accountancy_code_sell
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>';
print '<td class="maxwidthonsmartphone"><input name="accountancy_code_sell" size="16" value="'.$object->accountancy_code_sell.'">';
print '<td class="maxwidthonsmartphone"><input class="minwidth100" name="accountancy_code_sell" value="'.$object->accountancy_code_sell.'">';
print '</td></tr>';
// Accountancy_code_buy
print '<tr><td>'.$langs->trans("ProductAccountancyBuyCode").'</td>';
print '<td class="maxwidthonsmartphone"><input name="accountancy_code_buy" size="16" value="'.$object->accountancy_code_buy.'">';
print '<td class="maxwidthonsmartphone"><input class="minwidth100" name="accountancy_code_buy" value="'.$object->accountancy_code_buy.'">';
print '</td></tr>';
}
print '</table>';
@ -1185,10 +1185,10 @@ else
print '<table class="border allwidth">';
// Ref
print '<tr><td width="20%" class="fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input name="ref" size="32" maxlength="128" value="'.dol_escape_htmltag($object->ref).'"></td></tr>';
print '<tr><td class="titlefield fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag($object->ref).'"></td></tr>';
// Label
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="3"><input name="label" size="40" maxlength="255" value="'.dol_escape_htmltag($object->label).'"></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="3"><input name="label" class="minwidth300 maxwidth400onsmartphone" maxlength="255" value="'.dol_escape_htmltag($object->label).'"></td></tr>';
// Status To sell
print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">';
@ -1356,7 +1356,7 @@ else
// Custom code
if (! $object->isService() && empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO))
{
print '<tr><td>'.$langs->trans("CustomCode").'</td><td><input name="customcode" size="10" value="'.$object->customcode.'"></td>';
print '<tr><td>'.$langs->trans("CustomCode").'</td><td><input name="customcode" class="maxwidth100onsmartphone" value="'.$object->customcode.'"></td>';
// Origin country
print '<td>'.$langs->trans("CountryOrigin").'</td><td>';
print $form->select_country($object->country_id, 'country_id', '', 0, 'minwidth100 maxwidthonsmartphone');
@ -1406,13 +1406,13 @@ else
if (! empty($conf->accounting->enabled))
{
// Accountancy_code_sell
print '<tr><td width="20%">'.$langs->trans("ProductAccountancySellCode").'</td>';
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellCode").'</td>';
print '<td>';
print $formaccountancy->select_account($object->accountancy_code_sell, 'accountancy_code_sell', 1, '', 1, 1);
print '</td></tr>';
// Accountancy_code_buy
print '<tr><td width="20%">'.$langs->trans("ProductAccountancyBuyCode").'</td>';
print '<tr><td>'.$langs->trans("ProductAccountancyBuyCode").'</td>';
print '<td>';
print $formaccountancy->select_account($object->accountancy_code_buy, 'accountancy_code_buy', 1, '', 1, 1);
print '</td></tr>';
@ -1420,13 +1420,13 @@ else
else // For external software
{
// Accountancy_code_sell
print '<tr><td width="20%">'.$langs->trans("ProductAccountancySellCode").'</td>';
print '<td><input name="accountancy_code_sell" size="16" value="'.$object->accountancy_code_sell.'">';
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellCode").'</td>';
print '<td><input name="accountancy_code_sell" class="maxwidth200" value="'.$object->accountancy_code_sell.'">';
print '</td></tr>';
// Accountancy_code_buy
print '<tr><td width="20%">'.$langs->trans("ProductAccountancyBuyCode").'</td>';
print '<td><input name="accountancy_code_buy" size="16" value="'.$object->accountancy_code_buy.'">';
print '<tr><td>'.$langs->trans("ProductAccountancyBuyCode").'</td>';
print '<td><input name="accountancy_code_buy" class="maxwidth200" value="'.$object->accountancy_code_buy.'">';
print '</td></tr>';
}
print '</table>';

View File

@ -587,7 +587,8 @@ if ($id > 0 || $ref)
if ($user->rights->fournisseur->lire)
{
// Suppliers list title
print '<table class="noborder" width="100%">';
print '<div class="div-table-responsive">';
print '<table class="noborder" width="100%">';
if ($object->isProduct()) $nblignefour=4;
else $nblignefour=4;
@ -713,6 +714,7 @@ if ($id > 0 || $ref)
}
print '</table>';
print '</div>';
}
}
}

View File

@ -439,7 +439,8 @@ else
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"],"p.ref","",$param,"",$sortfield,$sortorder);
if (! empty($arrayfields['pfp.ref_fourn']['checked'])) print_liste_field_titre($arrayfields['pfp.ref_fourn']['label'], $_SERVER["PHP_SELF"],"pfp.ref_fourn","",$param,"",$sortfield,$sortorder);
@ -839,6 +840,7 @@ else
$db->free($resql);
print "</table>";
print "</div>";
}
print '</form>';
}

View File

@ -959,7 +959,7 @@ else
}
}
if ($action != 'edit_price_by_qty') {
print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="POST">';
print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="POST">'; // FIXME a form into a table is not allowed
print '<input type="hidden" name="action" value="update_price_by_qty">';
print '<input type="hidden" name="priceid" value="' . $object->prices_by_qty_id [0] . '">';
print '<input type="hidden" value="0" name="rowid">';
@ -1345,6 +1345,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print_barre_liste($langs->trans("DefaultPrice"),'','','','','',$backbutton, 0, 0, 'title_accountancy.png');
else print_barre_liste($langs->trans("PriceByCustomerLog"),'','','','','','', 0, 0, 'title_accountancy.png');
print '<div class="div-table-responsive">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
@ -1450,6 +1451,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
$db->free($result);
print "</table>";
print '</div>';
print "<br>";
}
} else {

View File

@ -86,7 +86,7 @@ if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || ! empty($conf->global
* Actions
*/
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
{
$sref="";
$snom="";
@ -261,6 +261,7 @@ if ($resql)
$colspan_warehouse = 1;
if (! empty($conf->global->STOCK_DETAIL_ON_WAREHOUSE)) { $colspan_warehouse = $nb_warehouse > 1 ? $nb_warehouse+1 : 1; }
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
// Lignes des titres
@ -381,6 +382,7 @@ if ($resql)
}
print "</table>";
print '</div>';
print '</form>';
if ($num > $conf->liste_limit)

View File

@ -83,7 +83,7 @@ if (! empty($canvas))
* Actions
*/
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
{
$sref="";
$snom="";
@ -249,7 +249,8 @@ if ($resql)
/*if ($eatby) $param.="&eatby=".$eatby;
if ($sellby) $param.="&sellby=".$sellby;*/
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
// Lignes des titres
print "<tr class=\"liste_titre\">";
@ -381,6 +382,7 @@ if ($resql)
}
print "</table>";
print '</div>';
print '</form>';
if ($num > $conf->liste_limit)

View File

@ -193,7 +193,8 @@ if ($id > 0 || ! empty($ref))
print '</div>';
$i = 0;
print '<table class="tagtable liste listwithfilterbefore" width="100%">';
print '<div class="div-table-responsive">';
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);
@ -243,8 +244,8 @@ if ($id > 0 || ! empty($ref))
print '<td align="right">'.price($total_ht).'</td>';
print '<td></td>';
print "</table>";
print "</div>";
print '</form>';
print '<br>';
} else {
dol_print_error($db);
}

View File

@ -72,6 +72,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) {
$search_year = '';
}
/*
* View
*/
@ -203,6 +204,7 @@ if ($id > 0 || ! empty($ref)) {
print '</div>';
$i = 0;
print '<div class="div-table-responsive">';
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);
@ -251,8 +253,8 @@ if ($id > 0 || ! empty($ref)) {
print '<td align="right">' . price($total_ht) . '</td>';
print '<td></td>';
print "</table>";
print '</div>';
print '</form>';
print '<br>';
} else {
dol_print_error($db);
}

View File

@ -135,10 +135,27 @@ if ($id > 0 || ! empty($ref))
if ($result)
{
$num = $db->num_rows($result);
if (! empty($id))
$option .= '&amp;id=' . $product->id;
if (! empty($search_month))
$option .= '&amp;search_month=' . $search_month;
if (! empty($search_year))
$option .= '&amp;search_year=' . $search_year;
print '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?id=' . $product->id . '" name="search_form">' . "\n";
if (! empty($sortfield))
print '<input type="hidden" name="sortfield" value="' . $sortfield . '"/>';
if (! empty($sortorder))
print '<input type="hidden" name="sortorder" value="' . $sortorder . '"/>';
if (! empty($page)) {
print '<input type="hidden" name="page" value="' . $page . '"/>';
$option .= '&amp;page=' . $page;
}
print_barre_liste($langs->trans("Contrats"),$page,$_SERVER["PHP_SELF"],"&amp;id=$product->id",$sortfield,$sortorder,'',$num,0,'');
$i = 0;
print '<div class="div-table-responsive">';
print '<table class="tagtable liste listwithfilterbefore" width="100%">';
print '<tr class="liste_titre">';
@ -180,13 +197,15 @@ if ($id > 0 || ! empty($ref))
$i++;
}
}
print '</table>';
print '</div>';
print '</form>';
}
else
{
dol_print_error($db);
}
print "</table>";
print '<br>';
$db->free($result);
}
}

View File

@ -216,6 +216,7 @@ if ($id > 0 || ! empty($ref))
print '</div>';
$i = 0;
print '<div class="div-table-responsive">';
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);
@ -265,8 +266,8 @@ if ($id > 0 || ! empty($ref))
print '<td align="right">'.price($total_ht).'</td>';
print '<td></td>';
print "</table>";
print '</div>';
print '</form>';
print '<br>';
} else {
dol_print_error($db);
}

View File

@ -195,6 +195,7 @@ if ($id > 0 || ! empty($ref))
print '</div>';
$i = 0;
print '<div class="div-table-responsive">';
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);
@ -244,8 +245,8 @@ if ($id > 0 || ! empty($ref))
print '<td align="right">' . price($total_ht) . '</td>';
print '<td></td>';
print "</table>";
print '</div>';
print '</form>';
print '<br>';
} else {
dol_print_error($db);
}

View File

@ -197,6 +197,7 @@ if ($id > 0 || ! empty($ref))
print '</div>';
$i = 0;
print '<div class="div-table-responsive">';
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);
@ -238,19 +239,20 @@ if ($id > 0 || ! empty($ref))
}
}
}
print '<tr class="liste_total">';
print '<td>' . $langs->trans('Total') . '</td>';
print '<td colspan="2"></td>';
print '<td align="center">' . $total_qty . '</td>';
print '<td align="right">' . price($total_ht) . '</td>';
print '<td></td>';
print "</table>";
print '</form>';
print '<br>';
} else {
dol_print_error($db);
}
$db->free($result);
print '<tr class="liste_total">';
print '<td>' . $langs->trans('Total') . '</td>';
print '<td colspan="2"></td>';
print '<td align="center">' . $total_qty . '</td>';
print '<td align="right">' . price($total_ht) . '</td>';
print '<td></td>';
print "</table>";
print '</div>';
print '</form>';
} else {
dol_print_error($db);
}
$db->free($result);
}
}
} else {

View File

@ -146,7 +146,8 @@ if ($result)
$moreforfilter='';
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print "<tr class=\"liste_titre\">";
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"], "e.label","",$param,"",$sortfield,$sortorder);
@ -250,7 +251,8 @@ if ($result)
$db->free($result);
print "</table>";
print "</table>";
print '</form>';
}
else

View File

@ -162,8 +162,8 @@ if ($action == "correct_stock")
//$eatby=GETPOST('eatby');
//$sellby=GETPOST('sellby');
$eatby=dol_mktime(12, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear'));
$sellby=dol_mktime(12, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear'));
$eatby=dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear'));
$sellby=dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear'));
$result=$product->correct_stock_batch(
$user,
@ -699,7 +699,9 @@ if ($resql)
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print "<tr class=\"liste_titre\">";
if (! empty($arrayfields['m.rowid']['checked'])) print_liste_field_titre($arrayfields['m.rowid']['label'],$_SERVER["PHP_SELF"],'m.rowid','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['m.datem']['checked'])) print_liste_field_titre($arrayfields['m.datem']['label'],$_SERVER["PHP_SELF"],'m.datem','',$param,'',$sortfield,$sortorder);
@ -741,7 +743,7 @@ if ($resql)
{
// Ref
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" size="3" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
print '<input class="flat maxwidth25" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
print '</td>';
}
if (! empty($arrayfields['m.datem']['checked']))
@ -1001,12 +1003,16 @@ if ($resql)
}
$db->free($resql);
print "</table></form><br>";
print "</table>";
print '</div>';
print "</form>";
// Add number of product when there is a filter on period
if (count($arrayofuniqueproduct) == 1 && is_numeric($year))
{
$productidselected=0;
print "<br>";
$productidselected=0;
foreach ($arrayofuniqueproduct as $key => $val)
{
$productidselected=$key;
@ -1032,8 +1038,6 @@ if ($resql)
print "<br>\n";
//print '</td></tr>';
}
}
else
{

View File

@ -55,8 +55,8 @@ $stocklimit = GETPOST('seuil_stock_alerte');
$desiredstock = GETPOST('desiredstock');
$cancel = GETPOST('cancel');
$fieldid = isset($_GET["ref"])?'ref':'rowid';
$d_eatby=dol_mktime(12, 0, 0, $_POST['eatbymonth'], $_POST['eatbyday'], $_POST['eatbyyear']);
$d_sellby=dol_mktime(12, 0, 0, $_POST['sellbymonth'], $_POST['sellbyday'], $_POST['sellbyyear']);
$d_eatby=dol_mktime(0, 0, 0, $_POST['eatbymonth'], $_POST['eatbyday'], $_POST['eatbyyear']);
$d_sellby=dol_mktime(0, 0, 0, $_POST['sellbymonth'], $_POST['sellbyday'], $_POST['sellbyyear']);
$pdluoid=GETPOST('pdluoid','int');
// Security check
@ -453,8 +453,8 @@ if ($action == 'updateline' && GETPOST('save') == $langs->trans('Save'))
}
else
{
$d_eatby=dol_mktime(12, 0, 0, $_POST['eatbymonth'], $_POST['eatbyday'], $_POST['eatbyyear']);
$d_sellby=dol_mktime(12, 0, 0, $_POST['sellbymonth'], $_POST['sellbyday'], $_POST['sellbyyear']);
$d_eatby=dol_mktime(0, 0, 0, $_POST['eatbymonth'], $_POST['eatbyday'], $_POST['eatbyyear']);
$d_sellby=dol_mktime(0, 0, 0, $_POST['sellbymonth'], $_POST['sellbyday'], $_POST['sellbyyear']);
$pdluo->batch=GETPOST("batch_number",'san_alpha');
$pdluo->eatby=$d_eatby;
$pdluo->sellby=$d_sellby;
@ -785,8 +785,10 @@ if (empty($reshook))
* Stock detail (by warehouse). May go down into batch details.
*/
print '<div class="div-table-responsive">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="40%" colspan="4">'.$langs->trans("Warehouse").'</td>';
print '<tr class="liste_titre">';
print '<td colspan="4">'.$langs->trans("Warehouse").'</td>';
print '<td align="right">'.$langs->trans("NumberOfUnit").'</td>';
print '<td align="right">'.$langs->trans("AverageUnitPricePMPShort").'</td>';
print '<td align="right">'.$langs->trans("EstimatedStockValueShort").'</td>';
@ -918,10 +920,11 @@ else print $langs->trans("Variable");
print '</td>';
print "</tr>";
print "</table>";
print '</div>';
if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE)) {
print '<br /><br />';
print '<br><br>';
print_titre($langs->trans('AddNewProductStockWarehouse'));
//print '<br />';

View File

@ -142,7 +142,7 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
// Purge search criteria
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") ||GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") ||GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
{
$search_entity='';
$search_product='';
@ -339,7 +339,8 @@ if ($resql)
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// Fields title
print '<tr class="liste_titre">';
@ -587,7 +588,8 @@ if ($resql)
print $hookmanager->resPrint;
print '</table>'."\n";
print '</div>';
print '</form>'."\n";
/*

View File

@ -347,8 +347,9 @@ else
{
print $langs->trans("AllTaskVisibleButEditIfYouAreAssigned").'<br>';
}
print '<br>';
print "\n";
dol_fiche_end();
// Filter on user
/* dol_fiche_head('');
@ -393,7 +394,9 @@ print '</div>';
print '<div class="clearboth" style="padding-bottom: 8px;"></div>';
print '<table class="noborder" width="100%">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" id="tablelines3">'."\n";
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("RefTask").'</td>';
print '<td>'.$langs->trans("LabelTask").'</td>';
@ -444,8 +447,7 @@ else
print '<tr><td colspan="10">'.$langs->trans("NoTasks").'</td></tr>';
}
print "</table>";
dol_fiche_end();
print '</div>';
print '<div class="center">';
print '<input type="submit" class="button"'.($disabledtask?' disabled':'').' value="'.$langs->trans("Save").'">';

View File

@ -342,8 +342,8 @@ else
{
print $langs->trans("AllTaskVisibleButEditIfYouAreAssigned").'<br>';
}
print '<br>';
print "\n";
dol_fiche_end();
// Filter on user
/* dol_fiche_head('');
@ -388,7 +388,8 @@ print '</div>';
print '<div class="clearboth" style="padding-bottom: 8px;"></div>';
print '<table class="noborder" width="100%">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" id="tablelines3">'."\n";
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("RefTask").'</td>';
@ -465,12 +466,11 @@ else
print '<tr><td colspan="11">'.$langs->trans("NoTasks").'</td></tr>';
}
print "</table>";
print '</div>';
print '<input type="hidden" name="timestamp" value="1425423513"/>'."\n";
print '<input type="hidden" id="numberOfLines" name="numberOfLines" value="'.count($tasksarray).'"/>'."\n";
dol_fiche_end();
print '<div class="center">';
print '<input type="submit" class="button" name="save" value="'.dol_escape_htmltag($langs->trans("Save")).'">';
print '</div>';

View File

@ -450,7 +450,8 @@ if (! empty($moreforfilter))
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'],$_SERVER["PHP_SELF"],"p.ref","",$param,"",$sortfield,$sortorder);
@ -867,6 +868,7 @@ $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // N
print $hookmanager->resPrint;
print "</table>\n";
print '</div>';
print "</form>\n";

View File

@ -424,7 +424,8 @@ if (! empty($moreforfilter))
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'" id="tablelines3">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" id="tablelines3">'."\n";
print '<tr class="liste_titre">';
if (! empty($arrayfields['t.ref']['checked'])) print_liste_field_titre($arrayfields['t.ref']['label'],$_SERVER["PHP_SELF"],"t.ref","",$param,"",$sortfield,$sortorder);
@ -826,6 +827,7 @@ $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // N
print $hookmanager->resPrint;
print "</table>";
print '</div>';
print '</form>';

View File

@ -704,6 +704,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
@ -975,6 +976,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print '</tr>';
print "</table>";
print '</div>';
print "</form>";
}
}

View File

@ -51,6 +51,13 @@ $langs->load("companies");
$langs->load("paybox");
$langs->load("paypal");
$PAYPALTOKEN=GETPOST('TOKEN');
if (empty($PAYPALTOKEN)) $PAYPALTOKEN=GETPOST('token');
$PAYPALPAYERID=GETPOST('PAYERID');
if (empty($PAYPALPAYERID)) $PAYPALPAYERID=GETPOST('PayerID');
$PAYPALFULLTAG=GETPOST('FULLTAG');
if (empty($PAYPALFULLTAG)) $PAYPALFULLTAG=GETPOST('fulltag');
/*
* Actions
@ -73,6 +80,18 @@ dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paypal');
// Send an email
if (! empty($conf->global->PAYPAL_PAYONLINE_SENDEMAIL))
{
// Get on url call
$token = $PAYPALTOKEN;
$fulltag = $PAYPALFULLTAG;
$payerID = $PAYPALPAYERID;
// Set by newpayment.php
$paymentType = $_SESSION['PaymentType'];
$currencyCodeType = $_SESSION['currencyCodeType'];
$FinalPaymentAmt = $_SESSION["Payment_Amount"];
// From env
$ipaddress = $_SESSION['ipaddress'];
$sendto=$conf->global->PAYPAL_PAYONLINE_SENDEMAIL;
$from=$conf->global->MAILING_EMAIL_FROM;
@ -102,11 +121,6 @@ print '<span id="dolpaymentspan"></span>'."\n";
print '<div id="dolpaymentdiv" align="center">'."\n";
print $langs->trans("YourPaymentHasNotBeenRecorded")."<br><br>";
$PAYPALTOKEN=GETPOST('TOKEN');
if (empty($PAYPALTOKEN)) $PAYPALTOKEN=GETPOST('token');
$PAYPALFULLTAG=GETPOST('FULLTAG');
if (empty($PAYPALFULLTAG)) $PAYPALFULLTAG=GETPOST('fulltag');
if (! empty($conf->global->PAYPAL_MESSAGE_KO)) print $conf->global->PAYPAL_MESSAGE_KO;
print "\n</div>\n";

View File

@ -242,8 +242,8 @@ if (! empty($moreforfilter))
<br>
<br><hr><br>Example 2 : Table using tags: table/thead/tbody/tr/th-td + dataTable => Use this for short result tables<br>
<!--
<br><hr><br>Example 1b : Table using tags: table/thead/tbody/tr/th-td + dataTable => Use this for short result tables<br>
@ -278,9 +278,6 @@ $(document).ready(function(){
}
},
"aaSorting": [[0,'desc']],
/* To use in ajax mode
"bProcessing": true,
"stateSave": true,
@ -292,126 +289,12 @@ $(document).ready(function(){
*/
})
});
/*
// counts total number of td in a head so that we can use it for label extraction
var head_col_count = $('xxxthead td').size();
// loop which replaces td
for ( i=0; i <= head_col_count; i++ ) {
// head column label extraction
var head_col_label = $('xxxthead td:nth-child('+ i +')').text();
// replaces td with <div class="column" data-label="label">
$('xxxtr td:nth-child('+ i +')').replaceWith(
function(){
return $('<div class="column" data-label="'+ head_col_label +'">').append($(this).contents());
}
);
}
// replaces table with <div class="table">
$('xxxtable').replaceWith(
function(){
return $('<div class="table">').append($(this).contents());
}
);
// replaces thead with <div class="table-head">
$('xxxthead').replaceWith(
function(){
return $('<div class="table-head">').append($(this).contents());
}
);
// replaces tr with <div class="row">
$('xxxtr').replaceWith(
function(){
return $('<div class="row">').append($(this).contents());
}
);
// replaces th with <div class="column">
$('xxxth').replaceWith(
function(){
return $('<div class="column">').append($(this).contents());
}
);
*/
</script>
<table id="idtableexample2" class="centpercent">
<thead>
<tr class="liste_titre">
<th>Column A</th>
<th><label><input type="checkbox" name="hidedetails" value="2"> A checkbox inside a title of Column B</label></th>
<?php
print getTitleFieldOfList($langs->trans('Column C'),1,$_SERVER["PHP_SELF"],'','','','align="center" class="tagtd"',$sortfield,$sortorder);
?>
</tr>
</thead>
<tbody>
<tr>
<td>line1</td>
<td>dfsdf</td>
<td align="center"> xxx </td>
</tr>
<tr>
<td>line2</td>
<td>dfsdf</td>
<td align="center" class="nowrap"> xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx </td>
</tr>
<tr>
<td>line3</td>
<td>dfsdf</td>
<td align="center"> xxx </td>
</tr>
<tr>
<td>line4</td>
<td>dfsdf</td>
<td align="center"> xxx </td>
</tr>
<tr>
<td>line5</td>
<td>dfsdf</td>
<td align="center"> xxx </td>
</tr>
<tr>
<td>line6</td>
<td>dfsdf</td>
<td align="center"> xxx </td>
</tr>
<tr>
<td>line7</td>
<td>dfsdf</td>
<td align="center"> xxx </td>
</tr>
<tr>
<td>line8</td>
<td>dfsdf</td>
<td align="center"> xxx </td>
</tr>
<tr>
<td>line9</td>
<td>dfsdf</td>
<td align="center"> xxx </td>
</tr>
<tr>
<td>line10</td>
<td>dfsdf</td>
<td align="center"> xxx </td>
</tr>
<tr>
<td>line11</td>
<td>dfsdf</td>
<td align="center"> xxx </td>
</tr>
<tr>
<td>line12</td>
<td>dfsdf</td>
<td align="center"> xxx </td>
</tr>
</tbody>
</table>
<br>
-->
<br><hr><br>Example 3 : Table using tags: div.tagtable+div.tagtr+div or div.tagtable+div.tagtr+div.tagtd => Use this for tables that need to have a different form for each line, but AVOID IT if possible (drag and drop of lines does not work for this case, also height of title can't be forced to a minimum)<br><br>
<br><hr><br>Example 2 : Table using tags: div.tagtable+(div|form).tagtr+div[.tagtd] => Use this for tables that need to have a different form for each line, but AVOID IT if possible (drag and drop of lines does not work for this case, also height of title can't be forced to a minimum)<br><br>
<?php
@ -419,7 +302,7 @@ $('xxxth').replaceWith(
$tagidfortablednd='tablelines';
if (! empty($conf->use_javascript_ajax)) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
?>
<div class="tagtable centpercent" id="tablelines">
<div class="tagtable centpercent liste_titre_bydiv" id="tablelines">
<div class="tagtr liste_titre">
<div class="tagtd">Title A<input type="hidden" name="cartitem" value="3"></div>
<div class="tagtd">title B</div>

View File

@ -186,7 +186,11 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print '<table class="noborder" width="100%">'."\n";
$moreforfilter = '';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
if (! empty($arrayfields['t.ref']['checked'])) print_liste_field_titre($arrayfields['t.ref']['label'],$_SERVER["PHP_SELF"],"t.ref","",$param,"",$sortfield,$sortorder);
if (! empty($arrayfields['ty.label']['checked'])) print_liste_field_titre($arrayfields['ty.label']['label'],$_SERVER["PHP_SELF"],"t.code","",$param,"",$sortfield,$sortorder);
@ -250,62 +254,62 @@ print "</tr>\n";
if ($ret)
{
foreach ($object->lines as $resource)
{
$var=!$var;
foreach ($object->lines as $resource)
{
$var=!$var;
$style='';
if ($resource->id == GETPOST('lineid')) $style='style="background: orange;"';
$style='';
if ($resource->id == GETPOST('lineid')) $style='style="background: orange;"';
print '<tr '.$bc[$var].' '.$style.'>';
print '<tr '.$bc[$var].' '.$style.'>';
if (! empty($arrayfields['t.ref']['checked']))
{
print '<td>';
print $resource->getNomUrl(5);
print '</td>';
}
if (! empty($arrayfields['t.ref']['checked']))
{
print '<td>';
print $resource->getNomUrl(5);
print '</td>';
}
if (! empty($arrayfields['ty.label']['checked']))
{
print '<td>';
print $resource->type_label;
print '</td>';
}
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
{
print '<td';
$align=$extrafields->getAlignFlag($key);
if ($align) print ' align="'.$align.'"';
print '>';
$tmpkey='options_'.$key;
print $extrafields->showOutputField($key, $resource->array_options[$tmpkey], '', 1);
print '</td>';
}
}
if (! $i) $totalarray['nbfield']++;
}
if (! empty($arrayfields['ty.label']['checked']))
{
print '<td>';
print $resource->type_label;
print '</td>';
}
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
{
print '<td';
$align=$extrafields->getAlignFlag($key);
if ($align) print ' align="'.$align.'"';
print '>';
$tmpkey='options_'.$key;
print $extrafields->showOutputField($key, $resource->array_options[$tmpkey], '', 1);
print '</td>';
}
}
if (! $i) $totalarray['nbfield']++;
}
print '<td align="center">';
print '<a href="./card.php?action=edit&id='.$resource->id.'">';
print img_edit();
print '</a>';
print '&nbsp;';
print '<a href="./card.php?action=delete&id='.$resource->id.'">';
print img_delete();
print '</a>';
print '</td>';
print '<td align="center">';
print '<a href="./card.php?action=edit&id='.$resource->id.'">';
print img_edit();
print '</a>';
print '&nbsp;';
print '<a href="./card.php?action=delete&id='.$resource->id.'">';
print img_delete();
print '</a>';
print '</td>';
print '</tr>';
}
print '</tr>';
}
print '</table>';
print "</form>\n";
print '</table>';
print "</form>\n";
}
else
{

Some files were not shown because too many files have changed in this diff Show More