1 package SL::Helper::UserPreferences::PartPickerSearch;
4 use parent qw(Rose::Object);
7 use List::MoreUtils qw(none);
9 use SL::Helper::UserPreferences;
11 use Rose::Object::MakeMethods::Generic (
12 'scalar --get_set_init' => [ qw(user_prefs) ],
15 sub get_sales_search_customer_partnumber {
16 !!$_[0]->user_prefs->get('sales_search_customer_partnumber');
19 sub get_purchase_search_makemodel {
20 !!$_[0]->user_prefs->get('purchase_search_makemodel');
23 sub store_sales_search_customer_partnumber {
24 $_[0]->user_prefs->store('sales_search_customer_partnumber', $_[1]);
27 sub store_purchase_search_makemodel {
28 $_[0]->user_prefs->store('purchase_search_makemodel', $_[1]);
32 SL::Helper::UserPreferences->new(
33 namespace => $_[0]->namespace,
38 sub namespace { 'PartPickerSearch' }
51 SL::Helper::UserPreferences::PartPickerSearch - preferences intended
52 to store user settings for the behavior of a partpicker search.
56 use SL::Helper::UserPreferences::PartPickerSearch;
57 my $prefs = SL::Helper::UserPreferences::PartPickerSearch->new();
59 $prefs->store_purchase_search_makemodel(1);
60 my $value = $prefs->get_purchase_search_makemodel;
64 This module manages storing the settings for the part picker to search for
65 customer/vendor partnumber in sales/purchase forms (new order controller).
73 Bernd Bleßmann E<lt>bernd@kivitendo-premium.deE<gt>