projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a47155b
)
PriceSource: Dokufix
author
Sven Schöling
<s.schoeling@linet-services.de>
Mon, 8 Dec 2014 11:32:27 +0000
(12:32 +0100)
committer
Sven Schöling
<s.schoeling@linet-services.de>
Tue, 7 Apr 2015 13:54:06 +0000
(15:54 +0200)
SL/PriceSource/Discount.pm
patch
|
blob
|
history
diff --git
a/SL/PriceSource/Discount.pm
b/SL/PriceSource/Discount.pm
index
6c95f90
..
ded123a
100644
(file)
--- a/
SL/PriceSource/Discount.pm
+++ b/
SL/PriceSource/Discount.pm
@@
-46,32
+46,32
@@
__END__
=head1 NAME
=head1 NAME
-SL::PriceSource::
Price - contrainer to pass calculated price
s around
+SL::PriceSource::
Discount - contrainer to pass calculated discount
s around
=head1 SYNOPSIS
# in PriceSource::Base implementation
=head1 SYNOPSIS
# in PriceSource::Base implementation
- $price = SL::PriceSource::
Price
->new(
+ $price = SL::PriceSource::
Discount
->new(
discount => 10,
spec => 'summersale2014', # something you can easily parse later
description => t8('10% discount during summer sale 2014'),
price_source => $self,
)
discount => 10,
spec => 'summersale2014', # something you can easily parse later
description => t8('10% discount during summer sale 2014'),
price_source => $self,
)
- # special empty
price
in SL::PriceSource, for internal use.
- SL::PriceSource::
Price
->new(
+ # special empty
discount
in SL::PriceSource, for internal use.
+ SL::PriceSource::
Discount
->new(
description => t8('None (PriceSource)'),
);
# price can't be restored
description => t8('None (PriceSource)'),
);
# price can't be restored
- SL::PriceSource::
Price
->new(
+ SL::PriceSource::
Discount
->new(
missing => t8('Um, sorry, cannot find that one'),
price_source => $self,
);
missing => t8('Um, sorry, cannot find that one'),
price_source => $self,
);
- # invalid
price
- SL::PriceSource::
Price
->new(
-
price => $original_price
,
+ # invalid
discount
+ SL::PriceSource::
Dicount
->new(
+
discount => $original_discount
,
spec => $original_spec,
description => $original_description,
invalid => t8('Offer expired #1 weeks ago', $dt->delta_weeks),
spec => $original_spec,
description => $original_description,
invalid => t8('Offer expired #1 weeks ago', $dt->delta_weeks),
@@
-82,7
+82,7
@@
SL::PriceSource::Price - contrainer to pass calculated prices around
See L<SL::PriceSource> for information about the mechanism.
See L<SL::PriceSource> for information about the mechanism.
-This is a container for
price
s that are generated by L<SL::PriceSource::Base>
+This is a container for
discount
s that are generated by L<SL::PriceSource::Base>
implementations.
=head1 CONSTRUCTOR FIELDS
implementations.
=head1 CONSTRUCTOR FIELDS
@@
-93,17
+93,17
@@
implementations.
The discount in percent. A discount of 0 will be ignored. If passed as
part of C<available_prices> it will be filtered out. If returned as
The discount in percent. A discount of 0 will be ignored. If passed as
part of C<available_prices> it will be filtered out. If returned as
-C<best_
price> or C<price
_from_source> it will trigger a warning.
+C<best_
discount> or C<discount
_from_source> it will trigger a warning.
=item C<spec>
A unique string that can later be understood by the creating implementation.
=item C<spec>
A unique string that can later be understood by the creating implementation.
-Can be empty if the implementation only supports one
price
for a given
+Can be empty if the implementation only supports one
discount
for a given
record_item.
=item C<description>
record_item.
=item C<description>
-A localized short description of the origins of this
price
.
+A localized short description of the origins of this
discount
.
=item C<price_source>
=item C<price_source>
@@
-111,17
+111,17
@@
A ref to the creating algorithm.
=item C<missing>
=item C<missing>
-OPTIONAL. Both indicator and localized message that the
price
with this spec
+OPTIONAL. Both indicator and localized message that the
discount
with this spec
could not be reproduced and should be changed.
could not be reproduced and should be changed.
-If
price
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<invalid>
OPTIONAL. Both indicator and localized message that the conditions for this
=item C<invalid>
OPTIONAL. Both indicator and localized message that the conditions for this
-
price are no longer valid, and that the price
should be changed.
+
discount are no longer valid, and that the discount
should be changed.
-If
price
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>.
=back
=back