forked from Dolibarr/dolibarr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into dev_addrecursupinvoice
- Loading branch information
Showing
8 changed files
with
57 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
* Copyright (C) 2021-2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2022 Josep Lluís Amador <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024 William Mead <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -146,6 +147,12 @@ | |
$search_status = GETPOST('search_status', 'alpha'); | ||
$search_note_public = GETPOST('search_note_public', 'alpha'); | ||
|
||
$search_option = GETPOST('search_option', 'alpha'); | ||
if ($search_option == 'late') { | ||
$search_status = '1'; | ||
$object_statut = '1'; | ||
} | ||
|
||
// Pagination | ||
$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; | ||
$sortfield = GETPOST('sortfield', 'aZ09comma'); | ||
|
@@ -257,11 +264,11 @@ | |
|
||
// List of fields to search into when doing a "search in all" | ||
/*$fieldstosearchall = array(); | ||
foreach ($object->fields as $key => $val) { | ||
if (!empty($val['searchall'])) { | ||
$fieldstosearchall['t.'.$key] = $val['label']; | ||
} | ||
}*/ | ||
foreach ($object->fields as $key => $val) { | ||
if (!empty($val['searchall'])) { | ||
$fieldstosearchall['t.'.$key] = $val['label']; | ||
} | ||
}*/ | ||
|
||
// Definition of array of fields for columns | ||
/*$arrayfields = array(); | ||
|
@@ -375,6 +382,7 @@ | |
$search_date_delivery_start = ''; | ||
$search_date_delivery_end = ''; | ||
$search_availability = ''; | ||
$search_option = ''; | ||
$search_status = ''; | ||
$search_categ_cus = 0; | ||
$search_fk_cond_reglement = ''; | ||
|
@@ -813,6 +821,9 @@ | |
} | ||
} | ||
} | ||
if ($search_option == 'late') { | ||
$sql .= " AND p.fin_validite < '".$db->idate(dol_now() - $conf->propal->cloture->warning_delay)."'"; | ||
} | ||
// Add where from extra fields | ||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; | ||
//print $sql; | ||
|
@@ -1716,10 +1727,11 @@ | |
|| !empty($arrayfields['total_margin']['checked']) | ||
|| !empty($arrayfields['total_margin_rate']['checked']) | ||
|| !empty($arrayfields['total_mark_rate']['checked']) | ||
) | ||
) { | ||
$with_margin_info = true; | ||
) | ||
) { | ||
$with_margin_info = true; | ||
} | ||
|
||
$total_ht = 0; | ||
$total_margin = 0; | ||
|
||
|
@@ -1733,6 +1745,9 @@ | |
if (empty($obj)) { | ||
break; // Should not happen | ||
} | ||
if ($search_option) { | ||
$param .= "&search_option=".urlencode($search_option); | ||
} | ||
|
||
$objectstatic->id = $obj->rowid; | ||
$objectstatic->ref = $obj->ref; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,10 @@ | |
* Copyright (C) 2014-2015 Marcos García <[email protected]> | ||
* Copyright (C) 2018 Nicolas ZABOURI <[email protected]> | ||
* Copyright (C) 2016-2022 Ferran Marcet <[email protected]> | ||
* Copyright (C) 2021-2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2022 Gauthier VERDOL <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2021-2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2022 Gauthier VERDOL <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024 William Mead <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -3632,10 +3633,12 @@ public function load_board($user, $mode) | |
} | ||
|
||
$response = new WorkboardResponse(); | ||
|
||
$response->warning_delay = $delay_warning; | ||
$response->label = $label; | ||
$response->labelShort = $labelShort; | ||
$response->url = $url; | ||
$response->url_late = DOL_URL_ROOT.'/commande/list.php?search_option=late&mainmenu=commercial&leftmenu=orders'; | ||
$response->img = img_object('', "order"); | ||
|
||
$generic_commande = new Commande($this->db); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
* Copyright (C) 2024 Noé Cendrier <[email protected]> | ||
* Copyright (C) 2024 Benjamin Falière <[email protected]> | ||
* Copyright (C) 2024 Alexandre Spangaro <[email protected]> | ||
* Copyright (C) 2024 William Mead <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -126,6 +127,11 @@ | |
$search_fk_mode_reglement = GETPOST('search_fk_mode_reglement', 'intcomma'); | ||
$search_fk_input_reason = GETPOST('search_fk_input_reason', 'intcomma'); | ||
|
||
$search_option = GETPOST('search_option', 'alpha'); | ||
if ($search_option == 'late') { | ||
$search_status = '-2'; | ||
} | ||
|
||
$diroutputmassaction = $conf->commande->multidir_output[$conf->entity].'/temp/massgeneration/'.$user->id; | ||
|
||
// Load variable for pagination | ||
|
@@ -316,6 +322,7 @@ | |
$search_fk_shipping_method = ''; | ||
$search_fk_mode_reglement = ''; | ||
$search_fk_input_reason = ''; | ||
$search_option = ''; | ||
} | ||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha') | ||
|| GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha')) { | ||
|
@@ -653,6 +660,9 @@ | |
if ($search_status != '') { | ||
$param .= '&search_status='.urlencode($search_status); | ||
} | ||
if ($search_option) { | ||
$param .= "&search_option=".urlencode($search_option); | ||
} | ||
if ($search_orderday) { | ||
$param .= '&search_orderday='.urlencode($search_orderday); | ||
} | ||
|
@@ -950,7 +960,9 @@ | |
$sql .= ' AND (c.fk_statut IN (1,2,3))'; // validated, in process or closed | ||
} | ||
} | ||
|
||
if ($search_option == 'late') { | ||
$sql .= " AND c.date_commande < '".$db->idate(dol_now() - $conf->commande->client->warning_delay)."'"; | ||
} | ||
if ($search_datecloture_start) { | ||
$sql .= " AND c.date_cloture >= '".$db->idate($search_datecloture_start)."'"; | ||
} | ||
|
@@ -1240,6 +1252,9 @@ | |
if ($search_status != '') { | ||
$param .= '&search_status='.urlencode($search_status); | ||
} | ||
if ($search_option) { | ||
$param .= "&search_option=".urlencode($search_option); | ||
} | ||
if ($search_datecloture_start) { | ||
$param .= '&search_datecloture_startday='.dol_print_date($search_datecloture_start, '%d').'&search_datecloture_startmonth='.dol_print_date($search_datecloture_start, '%m').'&search_datecloture_startyear='.dol_print_date($search_datecloture_start, '%Y'); | ||
} | ||
|
@@ -1541,6 +1556,7 @@ | |
$moreforfilter .= img_picto($tmptitle, 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses($search_warehouse, 'search_warehouse', '', 1, 0, 0, $tmptitle, 0, 0, array(), 'maxwidth250 widthcentpercentminusx'); | ||
$moreforfilter .= '</div>'; | ||
} | ||
|
||
$parameters = array(); | ||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook | ||
if (empty($reshook)) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters