Look and feel v6

This commit is contained in:
Laurent Destailleur 2017-07-01 14:18:09 +02:00
parent b186fa8759
commit 8dda0afc07
18 changed files with 204 additions and 183 deletions

View File

@ -1739,7 +1739,7 @@ if ($action == 'create')
// Proposal card // Proposal card
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; $linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';

View File

@ -3277,13 +3277,14 @@ class Propal extends CommonObject
/** /**
* Return clicable link of object (with eventually picto) * Return clicable link of object (with eventually picto)
* *
* @param int $withpicto Add picto into link * @param int $withpicto Add picto into link
* @param string $option Where point the link ('expedition', 'document', ...) * @param string $option Where point the link ('expedition', 'document', ...)
* @param string $get_params Parametres added to url * @param string $get_params Parametres added to url
* @param int $notooltip 1=Disable tooltip * @param int $notooltip 1=Disable tooltip
* @return string String with URL * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @return string String with URL
*/ */
function getNomUrl($withpicto=0,$option='', $get_params='', $notooltip=0) function getNomUrl($withpicto=0, $option='', $get_params='', $notooltip=0, $save_lastsearch_value=-1)
{ {
global $langs, $conf, $user; global $langs, $conf, $user;
@ -3318,6 +3319,14 @@ class Propal extends CommonObject
if ($option == 'document') { if ($option == 'document') {
$url = DOL_URL_ROOT.'/comm/propal/document.php?id='.$this->id. $get_params; $url = DOL_URL_ROOT.'/comm/propal/document.php?id='.$this->id. $get_params;
} }
if ($option != 'nolink')
{
// Add param to save lastsearch_values or not
$add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
}
} }
$linkclose=''; $linkclose='';

View File

@ -156,7 +156,7 @@ if ($object->id > 0)
// Proposal card // Proposal card
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; $linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';

View File

@ -103,7 +103,7 @@ if ($object->id > 0)
// Proposal card // Proposal card
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; $linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';

View File

@ -66,7 +66,7 @@ $object->info($object->id);
// Proposal card // Proposal card
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; $linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';

View File

@ -80,9 +80,9 @@ $object_statut=GETPOST('propal_statut');
$sall=GETPOST('sall', 'alphanohtml'); $sall=GETPOST('sall', 'alphanohtml');
$mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg")); $mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg"));
$day=GETPOST("day","int"); $search_day=GETPOST("search_day","int");
$month=GETPOST("month","int"); $search_month=GETPOST("search_month","int");
$year=GETPOST("year","int"); $search_year=GETPOST("search_year","int");
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha'); $sortfield = GETPOST("sortfield",'alpha');
@ -197,9 +197,9 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
$search_type=''; $search_type='';
$search_country=''; $search_country='';
$search_type_thirdparty=''; $search_type_thirdparty='';
$year=''; $search_year='';
$month=''; $search_month='';
$day=''; $search_day='';
$viewstatut=''; $viewstatut='';
$object_statut=''; $object_statut='';
$toselect=''; $toselect='';
@ -295,18 +295,18 @@ if ($viewstatut != '' && $viewstatut != '-1')
{ {
$sql.= ' AND p.fk_statut IN ('.$db->escape($viewstatut).')'; $sql.= ' AND p.fk_statut IN ('.$db->escape($viewstatut).')';
} }
if ($month > 0) if ($search_month > 0)
{ {
if ($year > 0 && empty($day)) if ($search_year > 0 && empty($search_day))
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year,$month,false))."' AND '".$db->idate(dol_get_last_day($year,$month,false))."'"; $sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
else if ($year > 0 && ! empty($day)) else if ($search_year > 0 && ! empty($search_day))
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'"; $sql.= " AND p.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
else else
$sql.= " AND date_format(p.datep, '%m') = '".$db->escape($month)."'"; $sql.= " AND date_format(p.datep, '%m') = '".$db->escape($search_month)."'";
} }
else if ($year > 0) else if ($search_year > 0)
{ {
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; $sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
} }
if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$db->escape($search_sale); if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$db->escape($search_sale);
if ($search_user > 0) if ($search_user > 0)
@ -369,8 +369,8 @@ if ($resql)
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
if ($sall) $param.='&sall='.urlencode($sall); if ($sall) $param.='&sall='.urlencode($sall);
if ($month) $param.='&month='.urlencode($month); if ($search_month) $param.='&search_month='.urlencode($search_month);
if ($year) $param.='&year='.urlencode($year); if ($search_year) $param.='&search_year='.urlencode($search_year);
if ($search_ref) $param.='&search_ref='.urlencode($search_ref); if ($search_ref) $param.='&search_ref='.urlencode($search_ref);
if ($search_refcustomer) $param.='&search_refcustomer='.urlencode($search_refcustomer); if ($search_refcustomer) $param.='&search_refcustomer='.urlencode($search_refcustomer);
if ($search_societe) $param.='&search_societe='.urlencode($search_societe); if ($search_societe) $param.='&search_societe='.urlencode($search_societe);
@ -613,11 +613,10 @@ if ($resql)
{ {
print '<td class="liste_titre" colspan="1" align="center">'; print '<td class="liste_titre" colspan="1" align="center">';
//print $langs->trans('Month').': '; //print $langs->trans('Month').': ';
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">'; if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">'; print '<input class="flat" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
//print '&nbsp;'.$langs->trans('Year').': '; //print '&nbsp;'.$langs->trans('Year').': ';
$syear = $year; $formother->select_year($search_year,'search_year',1, 20, 5);
$formother->select_year($syear,'year',1, 20, 5);
print '</td>'; print '</td>';
} }
// Date end // Date end
@ -755,7 +754,6 @@ if ($resql)
{ {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
$objectstatic->id=$obj->rowid; $objectstatic->id=$obj->rowid;
$objectstatic->ref=$obj->ref; $objectstatic->ref=$obj->ref;
@ -768,7 +766,7 @@ if ($resql)
print '<table class="nobordernopadding"><tr class="nocellnopadd">'; print '<table class="nobordernopadding"><tr class="nocellnopadd">';
// Picto + Ref // Picto + Ref
print '<td class="nobordernopadding nowrap">'; print '<td class="nobordernopadding nowrap">';
print $objectstatic->getNomUrl(1); print $objectstatic->getNomUrl(1, '', '', 0, 1);
print '</td>'; print '</td>';
// Warning // Warning
$warnornote=''; $warnornote='';

View File

@ -83,7 +83,7 @@ if ($id > 0 || ! empty($ref))
// Proposal card // Proposal card
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; $linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';

View File

@ -1915,7 +1915,7 @@ if ($action == 'create' && $user->rights->commande->creer)
// Order card // Order card
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; $linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';

View File

@ -3369,14 +3369,15 @@ class Commande extends CommonOrder
/** /**
* Return clicable link of object (with eventually picto) * Return clicable link of object (with eventually picto)
* *
* @param int $withpicto Add picto into link * @param int $withpicto Add picto into link
* @param int $option Where point the link (0=> main card, 1,2 => shipment) * @param int $option Where point the link (0=> main card, 1,2 => shipment)
* @param int $max Max length to show * @param int $max Max length to show
* @param int $short ??? * @param int $short ???
* @param int $notooltip 1=Disable tooltip * @param int $notooltip 1=Disable tooltip
* @return string String with URL * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @return string String with URL
*/ */
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0,$notooltip=0) function getNomUrl($withpicto=0, $option=0, $max=0, $short=0, $notooltip=0, $save_lastsearch_value=-1)
{ {
global $conf, $langs, $user; global $conf, $langs, $user;
@ -3387,6 +3388,14 @@ class Commande extends CommonOrder
if (! empty($conf->expedition->enabled) && ($option == 1 || $option == 2)) $url = DOL_URL_ROOT.'/expedition/shipment.php?id='.$this->id; if (! empty($conf->expedition->enabled) && ($option == 1 || $option == 2)) $url = DOL_URL_ROOT.'/expedition/shipment.php?id='.$this->id;
else $url = DOL_URL_ROOT.'/commande/card.php?id='.$this->id; else $url = DOL_URL_ROOT.'/commande/card.php?id='.$this->id;
if ($option !== 'nolink')
{
// Add param to save lastsearch_values or not
$add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
}
if ($short) return $url; if ($short) return $url;
$picto = 'order'; $picto = 'order';

View File

@ -149,7 +149,7 @@ if ($id > 0 || ! empty($ref))
// Order card // Order card
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; $linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';

View File

@ -104,7 +104,7 @@ if ($id > 0 || ! empty($ref))
// Order card // Order card
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; $linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';

View File

@ -65,7 +65,7 @@ dol_fiche_head($head, 'info', $langs->trans("CustomerOrder"), -1, 'order');
// Order card // Order card
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; $linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';
// Ref customer // Ref customer

View File

@ -51,12 +51,12 @@ $show_files=GETPOST('show_files','int');
$confirm=GETPOST('confirm','alpha'); $confirm=GETPOST('confirm','alpha');
$toselect = GETPOST('toselect', 'array'); $toselect = GETPOST('toselect', 'array');
$orderyear=GETPOST("orderyear","int"); $search_orderyear=GETPOST("search_orderyear","int");
$ordermonth=GETPOST("ordermonth","int"); $search_ordermonth=GETPOST("search_ordermonth","int");
$orderday=GETPOST("orderday","int"); $search_orderday=GETPOST("search_orderday","int");
$deliveryyear=GETPOST("deliveryyear","int"); $search_deliveryyear=GETPOST("search_deliveryyear","int");
$deliverymonth=GETPOST("deliverymonth","int"); $search_deliverymonth=GETPOST("search_deliverymonth","int");
$deliveryday=GETPOST("deliveryday","int"); $search_deliveryday=GETPOST("search_deliveryday","int");
$search_product_category=GETPOST('search_product_category','int'); $search_product_category=GETPOST('search_product_category','int');
$search_ref=GETPOST('search_ref','alpha')!=''?GETPOST('search_ref','alpha'):GETPOST('sref','alpha'); $search_ref=GETPOST('search_ref','alpha')!=''?GETPOST('search_ref','alpha'):GETPOST('sref','alpha');
$search_ref_customer=GETPOST('search_ref_customer','alpha'); $search_ref_customer=GETPOST('search_ref_customer','alpha');
@ -180,12 +180,12 @@ if (empty($reshook))
$search_total_ht=''; $search_total_ht='';
$search_total_vat=''; $search_total_vat='';
$search_total_ttc=''; $search_total_ttc='';
$orderyear=''; $search_orderyear='';
$ordermonth=''; $search_ordermonth='';
$orderday=''; $search_orderday='';
$deliveryday=''; $search_deliveryday='';
$deliverymonth=''; $search_deliverymonth='';
$deliveryyear=''; $search_deliveryyear='';
$viewstatut=''; $viewstatut='';
$billed=''; $billed='';
$toselect=''; $toselect='';
@ -499,31 +499,31 @@ if ($viewstatut <> '')
$sql .= ' AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))'; // validated, in process or closed but not billed $sql .= ' AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))'; // validated, in process or closed but not billed
} }
} }
if ($ordermonth > 0) if ($search_ordermonth > 0)
{ {
if ($orderyear > 0 && empty($orderday)) if ($search_orderyear > 0 && empty($search_orderday))
$sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_get_first_day($orderyear,$ordermonth,false))."' AND '".$db->idate(dol_get_last_day($orderyear,$ordermonth,false))."'"; $sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_get_first_day($search_orderyear,$search_ordermonth,false))."' AND '".$db->idate(dol_get_last_day($search_orderyear,$search_ordermonth,false))."'";
else if ($orderyear > 0 && ! empty($orderday)) else if ($search_orderyear > 0 && ! empty($search_orderday))
$sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $ordermonth, $orderday, $orderyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $ordermonth, $orderday, $orderyear))."'"; $sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_ordermonth, $search_orderday, $search_orderyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_ordermonth, $search_orderday, $search_orderyear))."'";
else else
$sql.= " AND date_format(c.date_commande, '%m') = '".$ordermonth."'"; $sql.= " AND date_format(c.date_commande, '%m') = '".$search_ordermonth."'";
} }
else if ($orderyear > 0) else if ($search_orderyear > 0)
{ {
$sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_get_first_day($orderyear,1,false))."' AND '".$db->idate(dol_get_last_day($orderyear,12,false))."'"; $sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_get_first_day($search_orderyear,1,false))."' AND '".$db->idate(dol_get_last_day($search_orderyear,12,false))."'";
} }
if ($deliverymonth > 0) if ($search_deliverymonth > 0)
{ {
if ($deliveryyear > 0 && empty($deliveryday)) if ($search_deliveryyear > 0 && empty($search_deliveryday))
$sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_get_first_day($deliveryyear,$deliverymonth,false))."' AND '".$db->idate(dol_get_last_day($deliveryyear,$deliverymonth,false))."'"; $sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_get_first_day($search_deliveryyear,$search_deliverymonth,false))."' AND '".$db->idate(dol_get_last_day($search_deliveryyear,$search_deliverymonth,false))."'";
else if ($deliveryyear > 0 && ! empty($deliveryday)) else if ($search_deliveryyear > 0 && ! empty($search_deliveryday))
$sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $deliverymonth, $deliveryday, $deliveryyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $deliverymonth, $deliveryday, $deliveryyear))."'"; $sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_deliverymonth, $search_deliveryday, $search_deliveryyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_deliverymonth, $search_deliveryday, $search_deliveryyear))."'";
else else
$sql.= " AND date_format(c.date_livraison, '%m') = '".$deliverymonth."'"; $sql.= " AND date_format(c.date_livraison, '%m') = '".$search_deliverymonth."'";
} }
else if ($deliveryyear > 0) else if ($search_deliveryyear > 0)
{ {
$sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_get_first_day($deliveryyear,1,false))."' AND '".$db->idate(dol_get_last_day($deliveryyear,12,false))."'"; $sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_get_first_day($search_deliveryyear,1,false))."' AND '".$db->idate(dol_get_last_day($search_deliveryyear,12,false))."'";
} }
if ($search_town) $sql.= natural_search('s.town', $search_town); if ($search_town) $sql.= natural_search('s.town', $search_town);
if ($search_zip) $sql.= natural_search("s.zip",$search_zip); if ($search_zip) $sql.= natural_search("s.zip",$search_zip);
@ -605,12 +605,12 @@ if ($resql)
if ($sall) $param.='&sall='.$sall; if ($sall) $param.='&sall='.$sall;
if ($socid > 0) $param.='&socid='.$socid; if ($socid > 0) $param.='&socid='.$socid;
if ($viewstatut != '') $param.='&viewstatut='.$viewstatut; if ($viewstatut != '') $param.='&viewstatut='.$viewstatut;
if ($orderday) $param.='&orderday='.$orderday; if ($search_orderday) $param.='&search_orderday='.$search_orderday;
if ($ordermonth) $param.='&ordermonth='.$ordermonth; if ($search_ordermonth) $param.='&search_ordermonth='.$search_ordermonth;
if ($orderyear) $param.='&orderyear='.$orderyear; if ($search_orderyear) $param.='&search_orderyear='.$search_orderyear;
if ($deliveryday) $param.='&deliveryday='.$deliveryday; if ($search_deliveryday) $param.='&search_deliveryday='.$search_deliveryday;
if ($deliverymonth) $param.='&deliverymonth='.$deliverymonth; if ($search_deliverymonth) $param.='&search_deliverymonth='.$search_deliverymonth;
if ($deliveryyear) $param.='&deliveryyear='.$deliveryyear; if ($search_deliveryyear) $param.='&search_deliveryyear='.$search_deliveryyear;
if ($search_ref) $param.='&search_ref='.$search_ref; if ($search_ref) $param.='&search_ref='.$search_ref;
if ($search_company) $param.='&search_company='.$search_company; if ($search_company) $param.='&search_company='.$search_company;
if ($search_ref_customer) $param.='&search_ref_customer='.$search_ref_customer; if ($search_ref_customer) $param.='&search_ref_customer='.$search_ref_customer;
@ -894,17 +894,17 @@ if ($resql)
if (! empty($arrayfields['c.date_commande']['checked'])) if (! empty($arrayfields['c.date_commande']['checked']))
{ {
print '<td class="liste_titre" align="center">'; 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="orderday" value="'.$orderday.'">'; if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_orderday" value="'.$search_orderday.'">';
print '<input class="flat" type="text" size="1" maxlength="2" name="ordermonth" value="'.$ordermonth.'">'; print '<input class="flat" type="text" size="1" maxlength="2" name="search_ordermonth" value="'.$search_ordermonth.'">';
$formother->select_year($orderyear?$orderyear:-1,'orderyear',1, 20, 5); $formother->select_year($search_orderyear?$search_orderyear:-1,'search_orderyear',1, 20, 5);
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['c.date_delivery']['checked'])) if (! empty($arrayfields['c.date_delivery']['checked']))
{ {
print '<td class="liste_titre" align="center">'; 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.'">'; if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_deliveryday" value="'.$search_deliveryday.'">';
print '<input class="flat" type="text" size="1" maxlength="2" name="deliverymonth" value="'.$deliverymonth.'">'; print '<input class="flat" type="text" size="1" maxlength="2" name="search_deliverymonth" value="'.$search_deliverymonth.'">';
$formother->select_year($deliveryyear?$deliveryyear:-1,'deliveryyear',1, 20, 5); $formother->select_year($search_deliveryyear?$search_deliveryyear:-1,'search_deliveryyear',1, 20, 5);
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['c.total_ht']['checked'])) if (! empty($arrayfields['c.total_ht']['checked']))
@ -1075,7 +1075,7 @@ if ($resql)
print '<table class="nobordernopadding"><tr class="nocellnopadd">'; print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td class="nobordernopadding nowrap">'; print '<td class="nobordernopadding nowrap">';
print $generic_commande->getNomUrl(1,($viewstatut != 2?0:$obj->fk_statut)); print $generic_commande->getNomUrl(1, ($viewstatut != 2?0:$obj->fk_statut), 0, 0, 0, 1);
print '</td>'; print '</td>';
// Show shippable Icon (create subloop, so may be slow) // Show shippable Icon (create subloop, so may be slow)

View File

@ -79,7 +79,7 @@ if ($id > 0 || ! empty($ref))
// Order card // Order card
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; $linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';

View File

@ -360,7 +360,28 @@ print '<td colspan="7" align="right">';
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'; print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
// Array titles
print '<tr class="liste_titre">';
print '<td class="liste_titre" align="left">';
print '<input class="flat" size="6" type="text" name="search_societe" value="'.$search_societe.'">';
print '</td>';
print '<td class="liste_titre" align="left">';
print '<input class="flat" size="6" type="text" name="search_zip" value="'.$search_zip.'">';
print '</td>';
print '<td class="liste_titre" align="left">';
print '<input class="flat" size="6" type="text" name="search_town" value="'.$search_town.'">';
print '</td>';
print '<td class="liste_titre" align="left">';
print $form->select_country($search_country, 'search_country');
//print '<input class="flat" size="6" type="text" name="search_country" value="'.$search_country.'">';
print '</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '</tr>';
// Array titles
print "<tr class='liste_titre'>"; print "<tr class='liste_titre'>";
print_liste_field_titre( print_liste_field_titre(
$langs->trans("Company"), $langs->trans("Company"),
@ -442,27 +463,6 @@ print_liste_field_titre(
); );
print "</tr>\n"; print "</tr>\n";
print '<tr class="liste_titre">';
print '<td class="liste_titre" align="left">';
print '<input class="flat" size="6" type="text" name="search_societe" value="'.$search_societe.'">';
print '</td>';
print '<td class="liste_titre" align="left">';
print '<input class="flat" size="6" type="text" name="search_zip" value="'.$search_zip.'">';
print '</td>';
print '<td class="liste_titre" align="left">';
print '<input class="flat" size="6" type="text" name="search_town" value="'.$search_town.'">';
print '</td>';
print '<td class="liste_titre" align="left">';
print $form->select_country($search_country, 'search_country');
//print '<input class="flat" size="6" type="text" name="search_country" value="'.$search_country.'">';
print '</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '</tr>';
$var=true;
if (count($amount)) { if (count($amount)) {
$arrayforsort=$name; $arrayforsort=$name;

View File

@ -1,6 +1,7 @@
<?php <?php
/* Copyright (C) 2014-2017 Alexandre Spangaro <aspangaro@zendsi.com> /* Copyright (C) 2014-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -335,7 +336,7 @@ if ($action == 'create')
if (! empty($conf->accounting->enabled)) if (! empty($conf->accounting->enabled))
{ {
// Accountancy_account_capital // Accountancy_account_capital
print '<tr><td class="titlefieldcreate">'.$langs->trans("LoanAccountancyCapitalCode").'</td>'; print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("LoanAccountancyCapitalCode").'</td>';
print '<td>'; print '<td>';
print $formaccounting->select_account($object->accountancy_account_capital, 'accountancy_account_capital', 1, '', 0, 1); print $formaccounting->select_account($object->accountancy_account_capital, 'accountancy_account_capital', 1, '', 0, 1);
print '</td></tr>'; print '</td></tr>';
@ -415,7 +416,7 @@ if ($id > 0)
print '<input type="hidden" name="id" value="'.$id.'">'; print '<input type="hidden" name="id" value="'.$id.'">';
} }
dol_fiche_head($head, 'card', $langs->trans("Loan"), 0, 'bill'); dol_fiche_head($head, 'card', $langs->trans("Loan"), -1, 'bill');
print '<script type="text/javascript">' . "\n"; print '<script type="text/javascript">' . "\n";
print ' function popEcheancier() {' . "\n"; print ' function popEcheancier() {' . "\n";
@ -712,9 +713,9 @@ if ($id > 0)
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</div>'; print '</div>';
}
if ($action == 'edit') print "</form>\n"; print '</form>';
}
/* /*
* Buttons actions * Buttons actions

View File

@ -267,7 +267,9 @@ input.select2-input {
border-bottom: solid 1px rgba(0,0,0,.2) !important; /* required to avoid to lose bottom line when focus is lost on select2. */ border-bottom: solid 1px rgba(0,0,0,.2) !important; /* required to avoid to lose bottom line when focus is lost on select2. */
} }
.liste_titre input[name=monthvalid], .liste_titre input[name=search_smonth], .liste_titre input[name=search_emonth], .liste_titre input[name=smonth], .liste_titre input[name=month], .liste_titre select[name=month], .liste_titre input[name=month_lim] { .liste_titre input[name=monthvalid], .liste_titre input[name=search_ordermonth], .liste_titre input[name=search_deliverymonth],
.liste_titre input[name=search_smonth], .liste_titre input[name=search_month], .liste_titre input[name=search_emonth], .liste_titre input[name=smonth], .liste_titre input[name=month], .liste_titre select[name=month],
.liste_titre input[name=month_lim] {
margin-right: 4px; margin-right: 4px;
} }
input[type=submit] { input[type=submit] {

View File

@ -282,7 +282,9 @@ textarea.cke_source:focus
box-shadow: none; box-shadow: none;
} }
.liste_titre input[name=monthvalid], .liste_titre input[name=search_smonth], .liste_titre input[name=search_emonth], .liste_titre input[name=smonth], .liste_titre input[name=month], .liste_titre input[name=month_lim] { .liste_titre input[name=monthvalid], .liste_titre input[name=search_ordermonth], .liste_titre input[name=search_deliverymonth],
.liste_titre input[name=search_smonth], .liste_titre input[name=search_month], .liste_titre input[name=search_emonth], .liste_titre input[name=smonth], .liste_titre input[name=month],
.liste_titre input[name=month_lim] {
margin-right: 4px; margin-right: 4px;
} }
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select { input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {