Skip to content

Update bill.class.php #379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Update bill.class.php #379

wants to merge 4 commits into from

Conversation

IP-V15
Copy link

@IP-V15 IP-V15 commented Mar 8, 2024

Add bill value in list option

Comment on lines +228 to +237
$tab[] = [
'id' => '11',
'table' => 'glpi_plugin_order_bills',
'field' => 'order_name',
'name' => __('Order ID', 'order'),
'datatype' => 'string',
'nosearch' => true,
'massiveaction' => false,
'computation' => '(SELECT num_order FROM glpi_plugin_order_orders WHERE glpi_plugin_order_orders.id = glpi_plugin_order_bills.plugin_order_orders_id)',
];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant search option with search option 8

Suggested change
$tab[] = [
'id' => '11',
'table' => 'glpi_plugin_order_bills',
'field' => 'order_name',
'name' => __('Order ID', 'order'),
'datatype' => 'string',
'nosearch' => true,
'massiveaction' => false,
'computation' => '(SELECT num_order FROM glpi_plugin_order_orders WHERE glpi_plugin_order_orders.id = glpi_plugin_order_bills.plugin_order_orders_id)',
];

Comment on lines +203 to +209
'table' => 'glpi_plugin_order_bills',
'field' => 'order_name',
'name' => __('Order', 'order'),
'datatype' => 'string',
'nosearch' => true,
'massiveaction' => false,
'computation' => '(SELECT name FROM glpi_plugin_order_orders WHERE glpi_plugin_order_orders.id = glpi_plugin_order_bills.plugin_order_orders_id)',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should allow searching to list all bills associated with a specific order.

There is no need to use computation; refer to the previous search option that uses the 'dropdown' data type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants