projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rechnungsmaske: "Drucken und Buchen" und Browser-Zurück entschärfen
[kivitendo-erp.git]
/
SL
/
PriceSource
/
Discount.pm
diff --git
a/SL/PriceSource/Discount.pm
b/SL/PriceSource/Discount.pm
index
ded123a
..
66f9532
100644
(file)
--- a/
SL/PriceSource/Discount.pm
+++ b/
SL/PriceSource/Discount.pm
@@
-4,7
+4,8
@@
use strict;
use parent 'SL::DB::Object';
use Rose::Object::MakeMethods::Generic (
use parent 'SL::DB::Object';
use Rose::Object::MakeMethods::Generic (
- scalar => [ qw(discount description spec price_source invalid missing) ],
+ scalar => [ qw(discount description spec price_source invalid missing unknown) ],
+ 'scalar --get_set_init' => [ qw(priority) ],
);
require SL::DB::Helper::Attr;
);
require SL::DB::Helper::Attr;
@@
-38,6
+39,10
@@
sub to_str {
"source: @{[ $_[0]->source ]}, discount: @{[ $_[0]->discount ]}, description: @{[ $_[0]->description ]}"
}
"source: @{[ $_[0]->source ]}, discount: @{[ $_[0]->discount ]}, description: @{[ $_[0]->description ]}"
}
+sub init_priority {
+ 3
+}
+
1;
__END__
1;
__END__
@@
-46,7
+51,7
@@
__END__
=head1 NAME
=head1 NAME
-SL::PriceSource::Discount - cont
r
ainer to pass calculated discounts around
+SL::PriceSource::Discount - container to pass calculated discounts around
=head1 SYNOPSIS
=head1 SYNOPSIS
@@
-70,7
+75,7
@@
SL::PriceSource::Discount - contrainer to pass calculated discounts around
);
# invalid discount
);
# invalid discount
- SL::PriceSource::Dicount->new(
+ SL::PriceSource::Di
s
count->new(
discount => $original_discount,
spec => $original_spec,
description => $original_description,
discount => $original_discount,
spec => $original_spec,
description => $original_description,
@@
-109,6
+114,11
@@
A localized short description of the origins of this discount.
A ref to the creating algorithm.
A ref to the creating algorithm.
+=item C<priority>
+
+OPTIONAL. Discounts may supply a numerical priority. Higher will trump over lower, even when
+supplying lower discounts. Defaults to 3 (as in middle of 1-5).
+
=item C<missing>
OPTIONAL. Both indicator and localized message that the discount with this spec
=item C<missing>
OPTIONAL. Both indicator and localized message that the discount with this spec
@@
-123,6
+133,12
@@
discount are no longer valid, and that the discount should be changed.
If discount is missing, you do not need to supply anything except C<source>.
If discount is missing, you do not need to supply anything except C<source>.
+=item C<unknown>
+
+OPTIONAL. Boolean indicator that this discount was not computed for performance
+reasons. This is only valid for PriceSources flagged as C<fast>. This discount
+must be ignored.
+
=back
=head1 SEE ALSO
=back
=head1 SEE ALSO