Revision 549bce5b
Von Bernd Bleßmann vor mehr als 5 Jahren hinzugefügt
SL/AM.pm | ||
---|---|---|
use SL::DB;
|
||
use SL::GenericTranslations;
|
||
use SL::Helper::UserPreferences::PositionsScrollbar;
|
||
use SL::Helper::UserPreferences::PartPickerSearch;
|
||
|
||
use strict;
|
||
|
||
... | ... | |
SL::Helper::UserPreferences::PositionsScrollbar->new()->get_height();
|
||
}
|
||
|
||
sub purchase_search_makemodel {
|
||
SL::Helper::UserPreferences::PartPickerSearch->new()->get_purchase_search_makemodel();
|
||
}
|
||
|
||
sub sales_search_customer_partnumber {
|
||
SL::Helper::UserPreferences::PartPickerSearch->new()->get_sales_search_customer_partnumber();
|
||
}
|
||
|
||
sub save_preferences {
|
||
$main::lxdebug->enter_sub();
|
||
|
||
... | ... | |
if (exists $form->{positions_scrollbar_height}) {
|
||
SL::Helper::UserPreferences::PositionsScrollbar->new()->store_height($form->{positions_scrollbar_height})
|
||
}
|
||
if (exists $form->{purchase_search_makemodel}) {
|
||
SL::Helper::UserPreferences::PartPickerSearch->new()->store_purchase_search_makemodel($form->{purchase_search_makemodel})
|
||
}
|
||
if (exists $form->{sales_search_customer_partnumber}) {
|
||
SL::Helper::UserPreferences::PartPickerSearch->new()->store_sales_search_customer_partnumber($form->{sales_search_customer_partnumber})
|
||
}
|
||
|
||
$main::lxdebug->leave_sub();
|
||
|
SL/Helper/UserPreferences/PartPickerSearch.pm | ||
---|---|---|
package SL::Helper::UserPreferences::PartPickerSearch;
|
||
|
||
use strict;
|
||
use parent qw(Rose::Object);
|
||
|
||
use Carp;
|
||
use List::MoreUtils qw(none);
|
||
|
||
use SL::Helper::UserPreferences;
|
||
|
||
use Rose::Object::MakeMethods::Generic (
|
||
'scalar --get_set_init' => [ qw(user_prefs) ],
|
||
);
|
||
|
||
sub get_sales_search_customer_partnumber {
|
||
!!$_[0]->user_prefs->get('sales_search_customer_partnumber');
|
||
}
|
||
|
||
sub get_purchase_search_makemodel {
|
||
!!$_[0]->user_prefs->get('purchase_search_makemodel');
|
||
}
|
||
|
||
sub store_sales_search_customer_partnumber {
|
||
$_[0]->user_prefs->store('sales_search_customer_partnumber', $_[1]);
|
||
}
|
||
|
||
sub store_purchase_search_makemodel {
|
||
$_[0]->user_prefs->store('purchase_search_makemodel', $_[1]);
|
||
}
|
||
|
||
sub init_user_prefs {
|
||
SL::Helper::UserPreferences->new(
|
||
namespace => $_[0]->namespace,
|
||
)
|
||
}
|
||
|
||
# read only stuff
|
||
sub namespace { 'PartPickerSearch' }
|
||
sub version { 1 }
|
||
|
||
1;
|
||
|
||
__END__
|
||
|
||
=pod
|
||
|
||
=encoding utf-8
|
||
|
||
=head1 NAME
|
||
|
||
SL::Helper::UserPreferences::PartPickerSearch - preferences intended
|
||
to store user settings for the behavior of a partpicker search.
|
||
|
||
=head1 SYNOPSIS
|
||
|
||
use SL::Helper::UserPreferences::PartPickerSearch;
|
||
my $prefs = SL::Helper::UserPreferences::PartPickerSearch->new();
|
||
|
||
$prefs->store_purchase_search_makemodel(1);
|
||
my $value = $prefs->get_purchase_search_makemodel;
|
||
|
||
=head1 DESCRIPTION
|
||
|
||
This module manages storing the settings for the part picker to search for
|
||
customer/vendor partnumber in sales/purchase forms (new order controller).
|
||
|
||
=head1 BUGS
|
||
|
||
None yet :)
|
||
|
||
=head1 AUTHOR
|
||
|
||
Bernd Bleßmann E<lt>bernd@kivitendo-premium.deE<gt>
|
||
|
||
=cut
|
bin/mozilla/am.pl | ||
---|---|---|
|
||
$form->{displayable_name_specs_by_module} = AM->displayable_name_specs_by_module();
|
||
$form->{positions_scrollbar_height} = AM->positions_scrollbar_height();
|
||
$form->{purchase_search_makemodel} = AM->purchase_search_makemodel();
|
||
$form->{sales_search_customer_partnumber} = AM->sales_search_customer_partnumber();
|
||
|
||
$myconfig{show_form_details} = 1 unless (defined($myconfig{show_form_details}));
|
||
$form->{CAN_CHANGE_PASSWORD} = $main::auth->can_change_password();
|
locale/de/all | ||
---|---|---|
'Search AR Aging' => 'Offene Forderungen',
|
||
'Search bank transactions' => 'Filter für Bankbuchungen',
|
||
'Search contacts' => 'Personensuche',
|
||
'Search parts by customer partnumber in sales order forms' => 'Artikel nach Kunden-Art.-Nr. in Verkaufsbelegen suchen',
|
||
'Search parts by vendor partnumber (model) in purchase order forms' => 'Artikel nach Lieferanten-Art.-Nr. in Einkaufsbelegen suchen',
|
||
'Search term' => 'Suchbegriff',
|
||
'Searchable' => 'Durchsuchbar',
|
||
'Secondary sorting' => 'Untersortierung',
|
locale/en/all | ||
---|---|---|
'Search AR Aging' => '',
|
||
'Search bank transactions' => '',
|
||
'Search contacts' => '',
|
||
'Search parts by customer partnumber in sales order forms' => '',
|
||
'Search parts by vendor partnumber (model) in purchase order forms' => '',
|
||
'Search term' => '',
|
||
'Searchable' => '',
|
||
'Secondary sorting' => '',
|
templates/webpages/am/config.html | ||
---|---|---|
[% L.input_tag('positions_scrollbar_height', positions_scrollbar_height, size = 5) %]
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right">[% 'Search parts by vendor partnumber (model) in purchase order forms' | $T8 %]</th>
|
||
<td>
|
||
[% L.yes_no_tag('purchase_search_makemodel', purchase_search_makemodel) %]
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right">[% 'Search parts by customer partnumber in sales order forms' | $T8 %]</th>
|
||
<td>
|
||
[% L.yes_no_tag('sales_search_customer_partnumber', sales_search_customer_partnumber) %]
|
||
</td>
|
||
</tr>
|
||
[%- END -%]
|
||
|
||
<tr>
|
Auch abrufbar als: Unified diff
UserPreferences-Helper f. Part-Picker-Such-Einstellungen in Belegen
Hier kann der Benutzer einstellen, ob in Verkauf auch nach Kunden-Artikle-Nr.
und im Einkauf nach Lieferanten-Artikel-Nr. gesucht werden soll.