Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
90c12ae340
@ -7,7 +7,8 @@
|
||||
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2016-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2019 Nicolas Zabouri <info@inovea-conseil.com>
|
||||
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
*
|
||||
* 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
|
||||
@ -66,9 +67,14 @@ $search_product_category = GETPOST('search_product_category', 'int');
|
||||
$search_dfmonth = GETPOST('search_dfmonth', 'int');
|
||||
$search_dfyear = GETPOST('search_dfyear', 'int');
|
||||
$search_op2df = GETPOST('search_op2df', 'alpha');
|
||||
$day = GETPOST("day", "int");
|
||||
$year = GETPOST("year", "int");
|
||||
$month = GETPOST("month", "int");
|
||||
$search_date_startday = GETPOST('search_date_startday', 'int');
|
||||
$search_date_startmonth = GETPOST('search_date_startmonth', 'int');
|
||||
$search_date_startyear = GETPOST('search_date_startyear', 'int');
|
||||
$search_date_endday = GETPOST('search_date_endday', 'int');
|
||||
$search_date_endmonth = GETPOST('search_date_endmonth', 'int');
|
||||
$search_date_endyear = GETPOST('search_date_endyear', 'int');
|
||||
$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
|
||||
$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
|
||||
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
|
||||
@ -171,9 +177,6 @@ include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||
|
||||
// Purge search criteria
|
||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All test are required to be compatible with all browsers
|
||||
$day = '';
|
||||
$month = '';
|
||||
$year = '';
|
||||
$search_dfmonth = '';
|
||||
$search_dfyear = '';
|
||||
$search_op2df = '';
|
||||
@ -190,6 +193,14 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
||||
$search_user = '';
|
||||
$search_sale = '';
|
||||
$search_product_category = '';
|
||||
$search_date_startday = '';
|
||||
$search_date_startmonth = '';
|
||||
$search_date_startyear = '';
|
||||
$search_date_endday = '';
|
||||
$search_date_endmonth = '';
|
||||
$search_date_endyear = '';
|
||||
$search_date_start = '';
|
||||
$search_date_end = '';
|
||||
$sall = "";
|
||||
$search_status = "";
|
||||
$toselect = '';
|
||||
@ -273,7 +284,12 @@ if ($socid) {
|
||||
if (!$user->rights->societe->client->voir && !$socid) {
|
||||
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
|
||||
}
|
||||
$sql .= dolSqlDateFilter('c.date_contrat', $day, $month, $year);
|
||||
if ($search_date_start) {
|
||||
$sql .= " AND c.date_contrat >= '".$db->idate($search_date_start)."'";
|
||||
}
|
||||
if ($search_date_end) {
|
||||
$sql .= " AND c.date_contrat <= '".$db->idate($search_date_end)."'";
|
||||
}
|
||||
if ($search_name) {
|
||||
$sql .= natural_search('s.nom', $search_name);
|
||||
}
|
||||
@ -415,6 +431,24 @@ if ($search_ref_supplier != '') {
|
||||
if ($search_op2df != '') {
|
||||
$param .= '&search_op2df='.urlencode($search_op2df);
|
||||
}
|
||||
if ($search_date_startday) {
|
||||
$param .= '&search_date_startday='.urlencode($search_date_startday);
|
||||
}
|
||||
if ($search_date_startmonth) {
|
||||
$param .= '&search_date_startmonth='.urlencode($search_date_startmonth);
|
||||
}
|
||||
if ($search_date_startyear) {
|
||||
$param .= '&search_date_startyear='.urlencode($search_date_startyear);
|
||||
}
|
||||
if ($search_date_endday) {
|
||||
$param .= '&search_date_endday='.urlencode($search_date_endday);
|
||||
}
|
||||
if ($search_date_endmonth) {
|
||||
$param .= '&search_date_endmonth='.urlencode($search_date_endmonth);
|
||||
}
|
||||
if ($search_date_endyear) {
|
||||
$param .= '&search_date_endyear='.urlencode($search_date_endyear);
|
||||
}
|
||||
if ($search_dfyear != '') {
|
||||
$param .= '&search_dfyear='.urlencode($search_dfyear);
|
||||
}
|
||||
@ -594,16 +628,13 @@ if (!empty($arrayfields['sale_representative']['checked'])) {
|
||||
print '<td class="liste_titre"></td>';
|
||||
}
|
||||
if (!empty($arrayfields['c.date_contrat']['checked'])) {
|
||||
// Date contract
|
||||
print '<td class="liste_titre center nowraponall">';
|
||||
//print $langs->trans('Month').': ';
|
||||
if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) {
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="day" value="'.$day.'">';
|
||||
}
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="month" value="'.$month.'">';
|
||||
//print ' '.$langs->trans('Year').': ';
|
||||
$syear = $year;
|
||||
print $formother->selectyear($syear, 'year', 1, 20, 5);
|
||||
print '<td class="liste_titre center">';
|
||||
print '<div class="nowrap">';
|
||||
print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
}
|
||||
// Extra fields
|
||||
|
||||
@ -58,6 +58,7 @@ $search_ref_exp = GETPOST("search_ref_exp", 'alpha');
|
||||
$search_ref_liv = GETPOST('search_ref_liv', 'alpha');
|
||||
$search_ref_customer = GETPOST('search_ref_customer', 'alpha');
|
||||
$search_company = GETPOST("search_company", 'alpha');
|
||||
$search_shipping_method_id = GETPOST('search_shipping_method_id');
|
||||
$search_tracking = GETPOST("search_tracking", 'alpha');
|
||||
$search_town = GETPOST('search_town', 'alpha');
|
||||
$search_zip = GETPOST('search_zip', 'alpha');
|
||||
@ -115,6 +116,7 @@ $fieldstosearchall = array(
|
||||
'e.ref'=>"Ref",
|
||||
's.nom'=>"ThirdParty",
|
||||
'e.note_public'=>'NotePublic',
|
||||
'e.shipping_method_id'=>'SendingMethod',
|
||||
'e.tracking_number'=>"TrackingNumber",
|
||||
);
|
||||
if (empty($user->socid)) {
|
||||
@ -123,17 +125,18 @@ if (empty($user->socid)) {
|
||||
|
||||
$checkedtypetiers = 0;
|
||||
$arrayfields = array(
|
||||
'e.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
||||
'e.ref_customer'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1),
|
||||
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1),
|
||||
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1),
|
||||
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1),
|
||||
'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0),
|
||||
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0),
|
||||
'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers),
|
||||
'e.date_delivery'=>array('label'=>$langs->trans("DateDeliveryPlanned"), 'checked'=>1),
|
||||
'e.tracking_number'=>array('label'=>$langs->trans("TrackingNumber"), 'checked'=>1),
|
||||
'e.weight'=>array('label'=>$langs->trans("Weight"), 'checked'=>0),
|
||||
'e.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1, 'position'=>1),
|
||||
'e.ref_customer'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1, 'position'=>2),
|
||||
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>3),
|
||||
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1, 'position'=>4),
|
||||
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1, 'position'=>5),
|
||||
'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0, 'position'=>6),
|
||||
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0, 'position'=>7),
|
||||
'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers, 'position'=>8),
|
||||
'e.date_delivery'=>array('label'=>$langs->trans("DateDeliveryPlanned"), 'checked'=>1, 'position'=>9),
|
||||
'e.shipping_method_id'=>array('label'=>$langs->trans('SendingMethod'), 'checked'=>1, 'position'=>10),
|
||||
'e.tracking_number'=>array('label'=>$langs->trans("TrackingNumber"), 'checked'=>1, 'position'=>11),
|
||||
'e.weight'=>array('label'=>$langs->trans("Weight"), 'checked'=>0, 'position'=>12),
|
||||
'e.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||
'e.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||
'e.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
|
||||
@ -185,6 +188,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
||||
$search_type = '';
|
||||
$search_country = '';
|
||||
$search_tracking = '';
|
||||
$search_shipping_method_id = '';
|
||||
$search_type_thirdparty = '';
|
||||
$search_billed = '';
|
||||
$search_datedelivery_start = '';
|
||||
@ -228,7 +232,7 @@ $sql = 'SELECT';
|
||||
if ($sall || $search_product_category > 0 || $search_user > 0) {
|
||||
$sql = 'SELECT DISTINCT';
|
||||
}
|
||||
$sql .= " e.rowid, e.ref, e.ref_customer, e.date_expedition as date_expedition, e.weight, e.weight_units, e.date_delivery as delivery_date, e.fk_statut, e.billed, e.tracking_number,";
|
||||
$sql .= " e.rowid, e.ref, e.ref_customer, e.date_expedition as date_expedition, e.weight, e.weight_units, e.date_delivery as delivery_date, e.fk_statut, e.billed, e.tracking_number, e.fk_shipping_method,";
|
||||
$sql .= " l.date_delivery as date_reception,";
|
||||
$sql .= " s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, ";
|
||||
$sql .= " typent.code as typent_code,";
|
||||
@ -315,6 +319,9 @@ if ($search_state) {
|
||||
if ($search_country) {
|
||||
$sql .= " AND s.fk_pays IN (".$db->sanitize($search_country).')';
|
||||
}
|
||||
if ($search_shipping_method_id > 0) {
|
||||
$sql .= " AND e.fk_shipping_method = ".$search_shipping_method_id;
|
||||
}
|
||||
if ($search_tracking) {
|
||||
$sql .= natural_search("e.tracking_number", $search_tracking);
|
||||
}
|
||||
@ -422,6 +429,9 @@ if ($search_sale > 0) {
|
||||
if ($search_company) {
|
||||
$param .= "&search_company=".urlencode($search_company);
|
||||
}
|
||||
if ($search_shipping_method_id) {
|
||||
$param .= "&search_shipping_method_id=".urlencode($search_shipping_method_id);
|
||||
}
|
||||
if ($search_tracking) {
|
||||
$param .= "&search_tracking=".urlencode($search_tracking);
|
||||
}
|
||||
@ -628,6 +638,13 @@ if (!empty($arrayfields['e.date_delivery']['checked'])) {
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['e.shipping_method_id']['checked'])) {
|
||||
// Delivery method
|
||||
print '<td class="liste_titre center">';
|
||||
$shipment->fetch_delivery_methods();
|
||||
print $form->selectarray("search_shipping_method_id", $shipment->meths, $search_shipping_method_id, 1, 0, 0, "", 1);
|
||||
print "</td>\n";
|
||||
}
|
||||
// Tracking number
|
||||
if (!empty($arrayfields['e.tracking_number']['checked'])) {
|
||||
print '<td class="liste_titre center">';
|
||||
@ -718,6 +735,9 @@ if (!empty($arrayfields['e.weight']['checked'])) {
|
||||
if (!empty($arrayfields['e.date_delivery']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['e.date_delivery']['label'], $_SERVER["PHP_SELF"], "e.date_delivery", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
}
|
||||
if (!empty($arrayfields['e.shipping_method_id']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['e.shipping_method_id']['label'], $_SERVER["PHP_SELF"], "e.fk_shipping_method", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
}
|
||||
if (!empty($arrayfields['e.tracking_number']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['e.tracking_number']['label'], $_SERVER["PHP_SELF"], "e.tracking_number", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
}
|
||||
@ -756,6 +776,7 @@ while ($i < min($num, $limit)) {
|
||||
|
||||
$shipment->id = $obj->rowid;
|
||||
$shipment->ref = $obj->ref;
|
||||
$shipment->shipping_method_id=$obj->fk_shipping_method;
|
||||
|
||||
$companystatic->id = $obj->socid;
|
||||
$companystatic->ref = $obj->name;
|
||||
@ -863,9 +884,18 @@ while ($i < min($num, $limit)) {
|
||||
print dol_print_date($db->jdate($obj->delivery_date), "dayhour");
|
||||
print "</td>\n";
|
||||
}
|
||||
if (!empty($arrayfields['e.shipping_method_id']['checked'])) {
|
||||
// Get code using getLabelFromKey
|
||||
$code=$langs->getLabelFromKey($db, $shipment->shipping_method_id, 'c_shipment_mode', 'rowid', 'code');
|
||||
print '<td class="center">';
|
||||
if ($shipment->shipping_method_id > 0) print $langs->trans("SendingMethod".strtoupper($code));
|
||||
print '</td>';
|
||||
}
|
||||
// Tracking number
|
||||
if (!empty($arrayfields['e.tracking_number']['checked'])) {
|
||||
print '<td class="center">'.$obj->tracking_number."</td>\n";
|
||||
$shipment->getUrlTrackingStatus($obj->tracking_number);
|
||||
print '<td class="center">'.$shipment->tracking_url."</td>\n";
|
||||
//print $form->editfieldval("TrackingNumber", 'tracking_number', $obj->tracking_url, $obj, $user->rights->expedition->creer, 'string', $obj->tracking_number);
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
@ -1,14 +1,15 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2020 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2020 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2019 Nicolas Zabouri <info@inovea-conseil.com>
|
||||
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
*
|
||||
* 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
|
||||
@ -52,12 +53,22 @@ $confirm = GETPOST('confirm', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'supplierorderlist';
|
||||
|
||||
$search_orderyear = GETPOST("search_orderyear", "int");
|
||||
$search_ordermonth = GETPOST("search_ordermonth", "int");
|
||||
$search_orderday = GETPOST("search_orderday", "int");
|
||||
$search_deliveryyear = GETPOST("search_deliveryyear", "int");
|
||||
$search_deliverymonth = GETPOST("search_deliverymonth", "int");
|
||||
$search_deliveryday = GETPOST("search_deliveryday", "int");
|
||||
$search_date_order_startday = GETPOST('search_date_order_startday', 'int');
|
||||
$search_date_order_startmonth = GETPOST('search_date_order_startmonth', 'int');
|
||||
$search_date_order_startyear = GETPOST('search_date_order_startyear', 'int');
|
||||
$search_date_order_endday = GETPOST('search_date_order_endday', 'int');
|
||||
$search_date_order_endmonth = GETPOST('search_date_order_endmonth', 'int');
|
||||
$search_date_order_endyear = GETPOST('search_date_order_endyear', 'int');
|
||||
$search_date_order_start = dol_mktime(0, 0, 0, $search_date_order_startmonth, $search_date_order_startday, $search_date_order_startyear); // Use tzserver
|
||||
$search_date_order_end = dol_mktime(23, 59, 59, $search_date_order_endmonth, $search_date_order_endday, $search_date_order_endyear);
|
||||
$search_date_delivery_startday = GETPOST('search_date_delivery_startday', 'int');
|
||||
$search_date_delivery_startmonth = GETPOST('search_date_delivery_startmonth', 'int');
|
||||
$search_date_delivery_startyear = GETPOST('search_date_delivery_startyear', 'int');
|
||||
$search_date_delivery_endday = GETPOST('search_date_delivery_endday', 'int');
|
||||
$search_date_delivery_endmonth = GETPOST('search_date_delivery_endmonth', 'int');
|
||||
$search_date_delivery_endyear = GETPOST('search_date_delivery_endyear', 'int');
|
||||
$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear); // Use tzserver
|
||||
$search_date_delivery_end = dol_mktime(23, 59, 59, $search_date_delivery_endmonth, $search_date_delivery_endday, $search_date_delivery_endyear);
|
||||
|
||||
$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
|
||||
|
||||
@ -235,12 +246,22 @@ if (empty($reshook)) {
|
||||
$search_multicurrency_montant_ttc = '';
|
||||
$search_project_ref = '';
|
||||
$search_status = -1;
|
||||
$search_orderyear = '';
|
||||
$search_ordermonth = '';
|
||||
$search_orderday = '';
|
||||
$search_deliveryday = '';
|
||||
$search_deliverymonth = '';
|
||||
$search_deliveryyear = '';
|
||||
$search_date_order_startday = '';
|
||||
$search_date_order_startmonth = '';
|
||||
$search_date_order_startyear = '';
|
||||
$search_date_order_endday = '';
|
||||
$search_date_order_endmonth = '';
|
||||
$search_date_order_endyear = '';
|
||||
$search_date_order_start = '';
|
||||
$search_date_order_end = '';
|
||||
$search_date_delivery_startday = '';
|
||||
$search_date_delivery_startmonth = '';
|
||||
$search_date_delivery_startyear = '';
|
||||
$search_date_delivery_endday = '';
|
||||
$search_date_delivery_endmonth = '';
|
||||
$search_date_delivery_endyear = '';
|
||||
$search_date_delivery_start = '';
|
||||
$search_date_delivery_end = '';
|
||||
$billed = '';
|
||||
$search_billed = '';
|
||||
$toselect = '';
|
||||
@ -494,23 +515,41 @@ if (empty($reshook)) {
|
||||
if ($search_status != '') {
|
||||
$param .= '&search_status='.urlencode($search_status);
|
||||
}
|
||||
if ($search_orderday) {
|
||||
$param .= '&search_orderday='.urlencode($search_orderday);
|
||||
if ($search_date_order_startday) {
|
||||
$param .= '&search_date_order_startday='.urlencode($search_date_order_startday);
|
||||
}
|
||||
if ($search_ordermonth) {
|
||||
$param .= '&search_ordermonth='.urlencode($search_ordermonth);
|
||||
if ($search_date_order_startmonth) {
|
||||
$param .= '&search_date_order_startmonth='.urlencode($search_date_order_startmonth);
|
||||
}
|
||||
if ($search_orderyear) {
|
||||
$param .= '&search_orderyear='.urlencode($search_orderyear);
|
||||
if ($search_date_order_startyear) {
|
||||
$param .= '&search_date_order_startyear='.urlencode($search_date_order_startyear);
|
||||
}
|
||||
if ($search_deliveryday) {
|
||||
$param .= '&search_deliveryday='.urlencode($search_deliveryday);
|
||||
if ($search_date_order_endday) {
|
||||
$param .= '&search_date_order_endday='.urlencode($search_date_order_endday);
|
||||
}
|
||||
if ($search_deliverymonth) {
|
||||
$param .= '&search_deliverymonth='.urlencode($search_deliverymonth);
|
||||
if ($search_date_order_endmonth) {
|
||||
$param .= '&search_date_order_endmonth='.urlencode($search_date_order_endmonth);
|
||||
}
|
||||
if ($search_deliveryyear) {
|
||||
$param .= '&search_deliveryyear='.urlencode($search_deliveryyear);
|
||||
if ($search_date_order_endyear) {
|
||||
$param .= '&search_date_order_endyear='.urlencode($search_date_order_endyear);
|
||||
}
|
||||
if ($search_date_delivery_startday) {
|
||||
$param .= '&search_date_delivery_startday='.urlencode($search_date_delivery_startday);
|
||||
}
|
||||
if ($search_date_delivery_startmonth) {
|
||||
$param .= '&search_date_delivery_startmonth='.urlencode($search_date_delivery_startmonth);
|
||||
}
|
||||
if ($search_date_delivery_startyear) {
|
||||
$param .= '&search_date_delivery_startyear='.urlencode($search_date_delivery_startyear);
|
||||
}
|
||||
if ($search_date_delivery_endday) {
|
||||
$param .= '&search_date_delivery_endday='.urlencode($search_date_delivery_endday);
|
||||
}
|
||||
if ($search_date_delivery_endmonth) {
|
||||
$param .= '&search_date_delivery_endmonth='.urlencode($search_date_delivery_endmonth);
|
||||
}
|
||||
if ($search_date_delivery_endyear) {
|
||||
$param .= '&search_date_delivery_endyear='.urlencode($search_date_delivery_endyear);
|
||||
}
|
||||
if ($search_ref) {
|
||||
$param .= '&search_ref='.urlencode($search_ref);
|
||||
@ -684,8 +723,18 @@ if (GETPOST('statut', 'intcomma') !== '') {
|
||||
if ($search_status != '' && $search_status != '-1') {
|
||||
$sql .= " AND cf.fk_statut IN (".$db->sanitize($db->escape($search_status)).")";
|
||||
}
|
||||
$sql .= dolSqlDateFilter("cf.date_commande", $search_orderday, $search_ordermonth, $search_orderyear);
|
||||
$sql .= dolSqlDateFilter("cf.date_livraison", $search_deliveryday, $search_deliverymonth, $search_deliveryyear);
|
||||
if ($search_date_order_start) {
|
||||
$sql .= " AND cf.date_commande >= '".$db->idate($search_date_order_start)."'";
|
||||
}
|
||||
if ($search_date_order_end) {
|
||||
$sql .= " AND cf.date_commande <= '".$db->idate($search_date_order_end)."'";
|
||||
}
|
||||
if ($search_date_delivery_start) {
|
||||
$sql .= " AND cf.date_livraison >= '".$db->idate($search_date_delivery_start)."'";
|
||||
}
|
||||
if ($search_date_delivery_end) {
|
||||
$sql .= " AND cf.date_livraison <= '".$db->idate($search_date_delivery_end)."'";
|
||||
}
|
||||
if ($search_town) {
|
||||
$sql .= natural_search('s.town', $search_town);
|
||||
}
|
||||
@ -791,23 +840,41 @@ if ($resql) {
|
||||
if ($sall) {
|
||||
$param .= "&search_all=".urlencode($sall);
|
||||
}
|
||||
if ($search_orderday) {
|
||||
$param .= '&search_orderday='.urlencode($search_orderday);
|
||||
if ($search_date_order_startday) {
|
||||
$param .= '&search_date_order_startday='.urlencode($search_date_order_startday);
|
||||
}
|
||||
if ($search_ordermonth) {
|
||||
$param .= '&search_ordermonth='.urlencode($search_ordermonth);
|
||||
if ($search_date_order_startmonth) {
|
||||
$param .= '&search_date_order_startmonth='.urlencode($search_date_order_startmonth);
|
||||
}
|
||||
if ($search_orderyear) {
|
||||
$param .= '&search_orderyear='.urlencode($search_orderyear);
|
||||
if ($search_date_order_startyear) {
|
||||
$param .= '&search_date_order_startyear='.urlencode($search_date_order_startyear);
|
||||
}
|
||||
if ($search_deliveryday) {
|
||||
$param .= '&search_deliveryday='.urlencode($search_deliveryday);
|
||||
if ($search_date_order_endday) {
|
||||
$param .= '&search_date_order_endday='.urlencode($search_date_order_endday);
|
||||
}
|
||||
if ($search_deliverymonth) {
|
||||
$param .= '&search_deliverymonth='.urlencode($search_deliverymonth);
|
||||
if ($search_date_order_endmonth) {
|
||||
$param .= '&search_date_order_endmonth='.urlencode($search_date_order_endmonth);
|
||||
}
|
||||
if ($search_deliveryyear) {
|
||||
$param .= '&search_deliveryyear='.urlencode($search_deliveryyear);
|
||||
if ($search_date_order_endyear) {
|
||||
$param .= '&search_date_order_endyear='.urlencode($search_date_order_endyear);
|
||||
}
|
||||
if ($search_date_delivery_startday) {
|
||||
$param .= '&search_date_delivery_startday='.urlencode($search_date_delivery_startday);
|
||||
}
|
||||
if ($search_date_delivery_startmonth) {
|
||||
$param .= '&search_date_delivery_startmonth='.urlencode($search_date_delivery_startmonth);
|
||||
}
|
||||
if ($search_date_delivery_startyear) {
|
||||
$param .= '&search_date_delivery_startyear='.urlencode($search_date_delivery_startyear);
|
||||
}
|
||||
if ($search_date_delivery_endday) {
|
||||
$param .= '&search_date_delivery_endday='.urlencode($search_date_delivery_endday);
|
||||
}
|
||||
if ($search_date_delivery_endmonth) {
|
||||
$param .= '&search_date_delivery_endmonth='.urlencode($search_date_delivery_endmonth);
|
||||
}
|
||||
if ($search_date_delivery_endyear) {
|
||||
$param .= '&search_date_delivery_endyear='.urlencode($search_date_delivery_endyear);
|
||||
}
|
||||
if ($search_ref) {
|
||||
$param .= '&search_ref='.urlencode($search_ref);
|
||||
@ -1073,22 +1140,24 @@ if ($resql) {
|
||||
}
|
||||
// Date order
|
||||
if (!empty($arrayfields['cf.date_commande']['checked'])) {
|
||||
print '<td class="liste_titre nowraponall center">';
|
||||
if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) {
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_orderday" value="'.$search_orderday.'">';
|
||||
}
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_ordermonth" value="'.$search_ordermonth.'">';
|
||||
$formother->select_year($search_orderyear ? $search_orderyear : -1, 'search_orderyear', 1, 20, 5);
|
||||
print '<td class="liste_titre center">';
|
||||
print '<div class="nowrap">';
|
||||
print $form->selectDate($search_date_order_start ? $search_date_order_start : -1, 'search_date_order_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $form->selectDate($search_date_order_end ? $search_date_order_end : -1, 'search_date_order_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
}
|
||||
// Date delivery
|
||||
if (!empty($arrayfields['cf.date_livraison']['checked'])) {
|
||||
print '<td class="liste_titre nowraponall center">';
|
||||
if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) {
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_deliveryday" value="'.$search_deliveryday.'">';
|
||||
}
|
||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_deliverymonth" value="'.$search_deliverymonth.'">';
|
||||
$formother->select_year($search_deliveryyear ? $search_deliveryyear : -1, 'search_deliveryyear', 1, 20, 5);
|
||||
print '<td class="liste_titre center">';
|
||||
print '<div class="nowrap">';
|
||||
print $form->selectDate($search_date_delivery_start ? $search_date_delivery_start : -1, 'search_date_delivery_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $form->selectDate($search_date_delivery_end ? $search_date_delivery_end : -1, 'search_date_delivery_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['cf.total_ht']['checked'])) {
|
||||
|
||||
@ -2241,7 +2241,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
// Public URL
|
||||
if (empty($conf->global->PRODUCT_DISABLE_PUBLIC_URL)) {
|
||||
print '<tr><td>'.$langs->trans("PublicUrl").'</td><td>';
|
||||
print dol_print_url($object->url);
|
||||
print dol_print_url($object->url, '_blank', 128);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user