Revision 72e40323
Von Kivitendo Admin vor fast 9 Jahren hinzugefügt
SL/DB/Invoice.pm | ||
---|---|---|
|
||
require SL::DB::Chart;
|
||
if (!$params{ar_id}) {
|
||
my $chart = SL::DB::Manager::Chart->get_all(query => [ SL::DB::Manager::Chart->link_filter('AR') ],
|
||
sort_by => 'id ASC',
|
||
limit => 1)->[0];
|
||
my $chart;
|
||
if ($::instance_conf->get_ar_chart_id) {
|
||
$chart = SL::DB::Manager::Chart->find_by(id => $::instance_conf->get_ar_chart_id);
|
||
} else {
|
||
$chart = SL::DB::Manager::Chart->get_all(query => [ SL::DB::Manager::Chart->link_filter('AR') ],
|
||
sort_by => 'id ASC',
|
||
limit => 1)->[0];
|
||
};
|
||
croak("No AR chart found and no parameter 'ar_id' given") unless $chart;
|
||
$params{ar_id} = $chart->id;
|
||
}
|
Auch abrufbar als: Unified diff
SL::DB::Invoice.pm post Methode benutzt Standardforderungskonto
statt einfach das erste AR-Konto, wenn es in der Mandantenkonfiguration
gesetzt ist, und kein Forderungskonto übergeben wurde.