Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 34cc5469

Von Sven Schöling vor mehr als 7 Jahren hinzugefügt

  • ID 34cc5469bf4a6d4476b5ae04d6c232e8da31ca6c
  • Vorgänger 3f543918
  • Nachfolger 8864a76c

PriceSource doku

Unterschiede anzeigen:

SL/PriceSource.pm
154 154
Implementations can choose to make prices editable, but even then deviations
155 155
from the calculatied price will be marked.
156 156

  
157
A that is not set from a source will not have any of this.
157
A price that is not set from a source will not have any of this.
158 158

  
159 159
=item 3.
160 160

  
......
176 176
=head1 STRUCTURE
177 177

  
178 178
Price sources are managed by this package (L<SL::PriceSource>), and all
179
external access should be by using it's interface.
179
external access should be by using its interface.
180 180

  
181 181
Each source is an instance of L<SL::PriceSource::Base> and the available
182 182
implementations are recorded in L<SL::PriceSource::ALL>. Prices and discounts
183 183
returned by interface methods are instances of L<SL::PriceSource::Price> and
184
L<SL::PriceSource::Discout>.
184
L<SL::PriceSource::Discount>.
185 185

  
186 186
Returned prices and discounts should be checked for entries in C<invalid> and
187 187
C<missing>, see documentation in their classes.
......
213 213

  
214 214
=item C<best_price>
215 215

  
216
Attempts to get the best available price. returns L<empty_price> if no price is found.
216
Attempts to get the best available price. returns L<empty_price> if no price is
217
found.
217 218

  
218 219
=item C<best_discount>
219 220

  
220
Attempts to get the best available discount. returns L<empty_discount> if no discount is found.
221
Attempts to get the best available discount. returns L<empty_discount> if no
222
discount is found.
221 223

  
222 224
=item C<empty_price>
223 225

  
224
A special empty price, that does not change the previously entered price, and
226
A special empty price that does not change the previously entered price and
225 227
opens the price field to manual changes.
226 228

  
227 229
=item C<empty_discount>
228 230

  
229
A special empty discount, that does not change the previously entered discount, and
230
opens the discount field to manual changes.
231
A special empty discount that does not change the previously entered discount
232
and opens the discount field to manual changes.
231 233

  
232 234
=back
233 235

  
......
305 307
sense anymore. The guarantees should be updated to reflect this and
306 308
transposition guidelines should be documented.
307 309

  
310
The previously mentioned linked prices can emulated by allowing price sources
311
to set a new price when changing to a new record in the workflow. The decision
312
about whether a price is eligable to be set can be suggested by the price
313
source implementation but is ultimately up to the surrounding framework, which
314
can make this configurable.
315

  
308 316
=item *
309 317

  
310 318
Prices were originally planned as a context element rather than a modal popup.
311 319
It would be great to have this now with better framework.
312 320

  
321
=item *
322

  
323
Large records (30 positions or more) in combination with complicated price
324
sources run into n+1 problems. There should be an extra hook that allows price
325
source implementations to make bulk calculations before the actual position loop.
326

  
313 327
=back
314 328

  
315 329
=head1 AUTHOR

Auch abrufbar als: Unified diff