Revision 5384e5cb
Von Sven Schöling vor etwa 10 Jahren hinzugefügt
SL/Controller/ClientConfig.pm | ||
---|---|---|
14 | 14 |
use SL::DB::Unit; |
15 | 15 |
use SL::Helper::Flash; |
16 | 16 |
use SL::Locale::String qw(t8); |
17 |
use SL::PriceSource::ALL; |
|
17 | 18 |
use SL::Template; |
18 | 19 |
|
19 | 20 |
__PACKAGE__->run_before('check_auth'); |
20 | 21 |
|
21 | 22 |
use Rose::Object::MakeMethods::Generic ( |
22 |
'scalar --get_set_init' => [ qw(defaults all_warehouses all_weightunits all_languages all_currencies all_templates h_unit_name |
|
23 |
'scalar --get_set_init' => [ qw(defaults all_warehouses all_weightunits all_languages all_currencies all_templates all_price_sources h_unit_name
|
|
23 | 24 |
posting_options payment_options accounting_options inventory_options profit_options accounts balance_startdate_method_options) ], |
24 | 25 |
); |
25 | 26 |
|
... | ... | |
36 | 37 |
my $defaults = delete($::form->{defaults}) || {}; |
37 | 38 |
my $entered_currencies = delete($::form->{currencies}) || []; |
38 | 39 |
my $original_currency_id = $self->defaults->currency_id; |
40 |
$defaults->{disabled_price_sources} ||= []; |
|
39 | 41 |
|
40 | 42 |
# undef several fields if an empty value has been selected. |
41 | 43 |
foreach (qw(warehouse_id bin_id warehouse_id_ignore_onhand bin_id_ignore_onhand)) { |
... | ... | |
203 | 205 |
return \%accounts; |
204 | 206 |
} |
205 | 207 |
|
208 |
sub init_all_price_sources { |
|
209 |
my @classes = SL::PriceSource::ALL->all_price_sources; |
|
210 |
|
|
211 |
[ map { [ $_->name, $_->description ] } @classes ]; |
|
212 |
} |
|
213 |
|
|
206 | 214 |
# |
207 | 215 |
# filters |
208 | 216 |
# |
... | ... | |
218 | 226 |
sub edit_form { |
219 | 227 |
my ($self) = @_; |
220 | 228 |
|
229 |
$::request->layout->use_javascript("${_}.js") for qw(jquery.selectboxes jquery.multiselect2side); |
|
230 |
|
|
221 | 231 |
$self->render('client_config/form', title => t8('Client Configuration'), |
222 | 232 |
make_chart_title => sub { $_[0]->accno . '--' . $_[0]->description }, |
223 | 233 |
make_templates_value => sub { 'templates/' . $_[0] }, |
Auch abrufbar als: Unified diff
PriceSource: Konfiguration