X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FPriceSource%2FPrice.pm;h=89a23e8583830a499ae9420442b8ccab7f86bdcb;hb=09c8c053181f182143beff935d011af15afddb01;hp=b17fb36d8ab91ab674c8fa6bbe358648a056bb12;hpb=9f66626118ec0cdcee8082b3d81f288bbfa23648;p=kivitendo-erp.git diff --git a/SL/PriceSource/Price.pm b/SL/PriceSource/Price.pm index b17fb36d8..89a23e858 100644 --- a/SL/PriceSource/Price.pm +++ b/SL/PriceSource/Price.pm @@ -5,7 +5,7 @@ use strict; use parent 'SL::DB::Object'; use Rose::Object::MakeMethods::Generic ( scalar => [ qw(price description spec price_source invalid missing) ], - 'scalar --get_set_init' => [ qw(priority) ], + 'scalar --get_set_init' => [ qw(priority editable) ], ); require SL::DB::Helper::Attr; @@ -43,6 +43,10 @@ sub init_priority { 3 } +sub init_editable { + 0 +} + 1; __END__ @@ -51,7 +55,7 @@ __END__ =head1 NAME -SL::PriceSource::Price - contrainer to pass calculated prices around +SL::PriceSource::Price - container to pass calculated prices around =head1 SYNOPSIS @@ -116,9 +120,21 @@ A ref to the creating algorithm. =item C -OPTIONAL. Prices may supply a numerical priority. Higher will trump over lower, even when +OPTIONAL. Prices may supply a numerical priority. Higher will trump lower, even when supplying higher prices. Defaults to 3 (as in middle of 1-5). +=item C + +OPTIONAL. Prices may flag themselves as editable. An editable price will still +be subject to checks for higher or lower prices, but will be rendered in a +fashion that allows the user to overwrite it. + +This is potentially very distracting if the price is usually a default price +and will be changed in a lot of instances so use with caution. + +On the other hand it can provide the capability that users unfamiliar with the +system will intuitively expect so it can be a good way to introduce the system. + =item C OPTIONAL. Both indicator and localized message that the price with this spec