Revision 5aa485a7
Von Sven Schöling vor etwa 10 Jahren hinzugefügt
SL/Controller/PriceRule.pm | ||
---|---|---|
my $report = SL::ReportGenerator->new(\%::myconfig, $::form);
|
||
$self->{report} = $report;
|
||
|
||
my @columns = qw(name type priority price discount);
|
||
my @sortable = qw(name type priority price discount);
|
||
my @columns = qw(name type priority price discount items);
|
||
my @sortable = qw(name type priority price discount );
|
||
|
||
my %column_defs = (
|
||
name => { obj_link => sub { $self->url_for(action => 'edit', 'price_rule.id' => $_[0]->id, callback => $callback) } },
|
||
... | ... | |
price => { sub => sub { $_[0]->price_as_number } },
|
||
discount => { sub => sub { $_[0]->discount_as_number } },
|
||
obsolete => { sub => sub { $_[0]->obsolete_as_bool_yn } },
|
||
items => { sub => sub { $_[0]->item_summary } },
|
||
);
|
||
|
||
map { $column_defs{$_}->{text} ||= $::locale->text( $self->models->get_sort_spec->{$_}->{title} ) } keys %column_defs;
|
||
... | ... | |
price => t8('Price'),
|
||
discount => t8('Discount'),
|
||
obsolete => t8('Obsolete'),
|
||
items => t8('Rule Details'),
|
||
},
|
||
);
|
||
}
|
SL/DB/PriceRule.pm | ||
---|---|---|
sub full_description {
|
||
my ($self) = @_;
|
||
|
||
my $items = join ', ', map { $_->full_description } $self->items;
|
||
my $items = $self->item_summary;
|
||
my $price = $self->price_or_discount
|
||
? t8('Discount #1%', $self->discount_as_number)
|
||
: t8('Price #1', $self->price_as_number);
|
||
... | ... | |
sprintf "%s: %s (%s)", $self->name, $price, $items;
|
||
}
|
||
|
||
sub item_summary {
|
||
join ', ', map { $_->full_description } $_[0]->items;
|
||
}
|
||
|
||
sub in_use {
|
||
my ($self) = @_;
|
||
|
locale/de/all | ||
---|---|---|
'Row was created from current record' => 'Zeile wurde aus aktuellem Beleg erstellt',
|
||
'Row was linked to another record' => 'Zeile wurde über einen anderen Beleg verlinkt',
|
||
'Row was source for current record' => 'Zeile war Quelle für aktuellen Beleg',
|
||
'Rule Details' => 'Regel Details',
|
||
'Run at' => 'Ausgeführt um',
|
||
'SAVED' => 'Gespeichert',
|
||
'SAVED FOR DUNNING' => 'Gespeichert',
|
Auch abrufbar als: Unified diff
PriceRule: Regeldetails anzeigen