use SL::DB::PartsGroup;
use SL::DB::Business;
use SL::Helper::Flash;
-use SL::ClientJS;
use SL::Locale::String;
use Rose::Object::MakeMethods::Generic
(
- 'scalar --get_set_init' => [ qw(models price_rule vc js pricegroups partsgroups businesses) ],
+ 'scalar --get_set_init' => [ qw(models price_rule vc pricegroups partsgroups businesses) ],
);
# __PACKAGE__->run_before('check_auth');
->js
->before('#price_rule_new_items', $html)
->reinit_widgets
- ->render($self);
+ ->render;
}
sub action_price_type_help {
}
sub add_javascripts {
- $::request->{layout}->add_javascripts(qw(kivi.PriceRule.js autocomplete_customer.js autocomplete_vendor.js autocomplete_part.js));
+ $::request->{layout}->add_javascripts(qw(kivi.PriceRule.js autocomplete_customer.js autocomplete_vendor.js kivi.Part.js));
}
sub init_price_rule {
$::form->{filter}{type};
}
-sub init_js {
- SL::ClientJS->new;
-}
-
sub init_businesses {
SL::DB::Manager::Business->get_all;
}
sub init_pricegroups {
- SL::DB::Manager::Pricegroup->get_all;
+ SL::DB::Manager::Pricegroup->get_all_sorted;
}
sub init_partsgroups {