X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcdr.pm;h=5a1d8ea232a39aa0f4b611a586943cd7341074a8;hb=488d3c15c9aaea2a17826600ee332f0af9b0634d;hp=cdca6fc750e4c9974694a176b96d0e6c74bd7b23;hpb=343eff0feb81094bf3e47ab994caae126fa8dfe8;p=freeside.git diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm index cdca6fc75..5a1d8ea23 100644 --- a/FS/FS/cdr.pm +++ b/FS/FS/cdr.pm @@ -214,6 +214,7 @@ sub table_info { #'upstream_rateplanid' => '', #'ratedetailnum' => '', 'rated_price' => 'Rated price', + 'rated_cost' => 'Rated cost', #'distance' => '', #'islocal' => '', #'calltypenum' => '', @@ -463,7 +464,9 @@ Sets the status and rated price. Available options are: inbound, rated_pretty_dst, rated_regionname, rated_seconds, rated_minutes, rated_granularity, rated_ratedetailnum, -rated_classnum, rated_ratename. +rated_classnum, rated_ratename. If rated_ratedetailnum is provided, +will also set a recalculated L in the rated_cost field +after the other fields are set (does not work with inbound.) If there is an error, returns the error, otherwise returns false. @@ -501,6 +504,8 @@ sub set_status_and_rated_price { qw( pretty_dst regionname seconds minutes granularity ratedetailnum classnum ratename ); $self->svcnum($svcnum) if $svcnum; + $self->rated_cost($self->rate_cost) if $opt{'rated_ratedetailnum'}; + return $self->replace(); }