Skip to content

Commit c68f917

Browse files
stonebuzzRom1-B
andauthored
Fix(Bill): Fix add order / bill search option (#516)
* Fix(Bill): Fix add order / bill search option * fix rector --------- Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com>
1 parent 71de1d6 commit c68f917

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
### Fixed
1111

12+
- Fix `order` search option from `Bill`
13+
14+
### Add
15+
16+
- add missing `value` / `num_order` from `Bill` search option
1217
- Fix missing PDF generation menu
1318
- Fix warning: Invalid relations declared between `glpi_plugin_order_accountsections` and `glpi_plugin_order_accountsections` table.
1419

hook.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ function plugin_order_getAddSearchOptions($itemtype)
256256

257257
function plugin_order_addLeftJoin($type, $ref_table, $new_table, $linkfield, &$already_link_tables)
258258
{
259+
if ($type == PluginOrderBill::class) {
260+
return "";
261+
}
262+
259263
$out = "";
260264
switch ($new_table) {
261265
case "glpi_plugin_order_orders": // From items

inc/bill.class.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,20 @@ public function rawSearchOptions()
192192
'name' => __s('Name'),
193193
'datatype' => 'itemlink',
194194
], [
195+
'id' => 10,
196+
'table' => PluginOrderOrder::getTable(),
197+
'field' => 'num_order',
198+
'name' => __s('Order number', 'order'),
199+
'datatype' => 'text',
200+
'itemlink_type' => 'PluginOrderOrder',
201+
'massiveaction' => false,
202+
], [
203+
'id' => 11,
204+
'table' => self::getTable(),
205+
'field' => 'value',
206+
'name' => __('Value'),
207+
'datatype' => 'decimal',
208+
],[
195209
'id' => 16,
196210
'table' => self::getTable(),
197211
'field' => 'comment',

0 commit comments

Comments
 (0)