Revision ea1f1390
Von Kivitendo Admin vor fast 10 Jahren hinzugefügt
SL/Controller/ClientConfig.pm | ||
---|---|---|
21 | 21 |
|
22 | 22 |
use Rose::Object::MakeMethods::Generic ( |
23 | 23 |
'scalar --get_set_init' => [ qw(defaults all_warehouses all_weightunits all_languages all_currencies all_templates all_price_sources h_unit_name |
24 |
posting_options payment_options accounting_options inventory_options profit_options accounts balance_startdate_method_options) ],
|
|
24 |
posting_options payment_options accounting_options inventory_options profit_options balance_startdate_method_options) ], |
|
25 | 25 |
); |
26 | 26 |
|
27 | 27 |
sub action_edit { |
... | ... | |
182 | 182 |
{ title => t8("Last opening balance or start of year"), value => "last_ob_or_start_of_year" }, ] |
183 | 183 |
} |
184 | 184 |
|
185 |
sub init_accounts { |
|
186 |
my %accounts; |
|
187 |
|
|
188 |
foreach my $chart (@{ SL::DB::Manager::Chart->get_all(where => [ link => { like => '%IC%' } ], sort_by => 'accno ASC') }) { |
|
189 |
my %added; |
|
190 |
|
|
191 |
foreach my $link (split m/:/, $chart->link) { |
|
192 |
my $key = lc($link =~ /cogs/ ? 'IC_expense' : $link =~ /sale/ ? 'IC_income' : $link); |
|
193 |
next if $added{$key}; |
|
194 |
|
|
195 |
$added{$key} = 1; |
|
196 |
$accounts{$key} ||= []; |
|
197 |
push @{ $accounts{$key} }, $chart; |
|
198 |
} |
|
199 |
} |
|
200 |
|
|
201 |
$accounts{fx_gain} = SL::DB::Manager::Chart->get_all(where => [ category => 'I', charttype => 'A' ], sort_by => 'accno ASC'); |
|
202 |
$accounts{fx_loss} = SL::DB::Manager::Chart->get_all(where => [ category => 'E', charttype => 'A' ], sort_by => 'accno ASC'); |
|
203 |
$accounts{ar_paid} = SL::DB::Manager::Chart->get_all(where => [ link => { like => '%AR_paid%' } ], sort_by => 'accno ASC'); |
|
204 |
|
|
205 |
return \%accounts; |
|
206 |
} |
|
207 |
|
|
208 | 185 |
sub init_all_price_sources { |
209 | 186 |
my @classes = SL::PriceSource::ALL->all_price_sources; |
210 | 187 |
|
Auch abrufbar als: Unified diff
Mandantenkonfiguration: Standardkonten als Chartpicker
Statt Dropdown werden die Standardkonten nun per Chartpicker ausgewählt.
Die Kontenlogik welche Konten als Standardkonten vorgeschlagen werden
steckt jetzt im Template in der Konfiguration des Chartpickers, nicht
mehr im ClientConfig Controller.