X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FPriceSource.pm;h=ea1c1ac9026e5971360157bdf889c8b643345e62;hb=d4608fb4eff9392728d1287de4df3e865ebe7f6e;hp=bf4fc991b69e7e6d7e8ddec0ea5f0b2564c4cb44;hpb=8cf8798dc37fe8125b8008614f3ea087e549b8dc;p=kivitendo-erp.git diff --git a/SL/PriceSource.pm b/SL/PriceSource.pm index bf4fc991b..ea1c1ac90 100644 --- a/SL/PriceSource.pm +++ b/SL/PriceSource.pm @@ -149,8 +149,12 @@ and it is up to the user to change a price. =item 2. -If a price is set from a source, it is read only. A price edited manually is by -definition not a sourced price. +If a price is set from a source then the system will try to prevent the user +from messing it up. By default this means the price will be read-only. +Implementations can choose to make prices editable, but even then deviations +from the calculatied price will be marked. + +A price that is not set from a source will not have any of this. =item 3. @@ -172,12 +176,12 @@ information about rising or falling prices. =head1 STRUCTURE Price sources are managed by this package (L), and all -external access should be by using it's interface. +external access should be by using its interface. Each source is an instance of L and the available implementations are recorded in L. Prices and discounts returned by interface methods are instances of L and -L. +L. Returned prices and discounts should be checked for entries in C and C, see documentation in their classes. @@ -209,21 +213,23 @@ Returns all available discounts. =item C -Attempts to get the best available price. returns L if no price is found. +Attempts to get the best available price. returns L if no price is +found. =item C -Attempts to get the best available discount. returns L if no discount is found. +Attempts to get the best available discount. returns L if no +discount is found. =item C -A special empty price, that does not change the previously entered price, and +A special empty price that does not change the previously entered price and opens the price field to manual changes. =item C -A special empty discount, that does not change the previously entered discount, and -opens the discount field to manual changes. +A special empty discount that does not change the previously entered discount +and opens the discount field to manual changes. =back @@ -285,12 +291,6 @@ to be aware of units and price_factors. This is madness. =item * -A common complaint is that prices from certain vendors are always negotiated -and should use a default value but must be editable (like free prices) by -default. This should be orthogonal for all prices. - -=item * - The current implementation of lastcost is useless. Since it's one of the master_data prices it will always compete with listprice. But in real scenarios the listprice tends to go up, while lastcost stays the same, so lastcost @@ -307,6 +307,23 @@ Specifically when changing from sales to purchase records prices don't make sense anymore. The guarantees should be updated to reflect this and transposition guidelines should be documented. +The previously mentioned linked prices can emulated by allowing price sources +to set a new price when changing to a new record in the workflow. The decision +about whether a price is eligable to be set can be suggested by the price +source implementation but is ultimately up to the surrounding framework, which +can make this configurable. + +=item * + +Prices were originally planned as a context element rather than a modal popup. +It would be great to have this now with better framework. + +=item * + +Large records (30 positions or more) in combination with complicated price +sources run into n+1 problems. There should be an extra hook that allows price +source implementations to make bulk calculations before the actual position loop. + =back =head1 AUTHOR