[freeside-commits] branch master updated. 8cd40200c27a569c222ab2e031f9b08bea818f3f

Ivan ivan at 420.am
Mon Jun 9 18:15:08 PDT 2014


The branch, master has been updated
       via  8cd40200c27a569c222ab2e031f9b08bea818f3f (commit)
      from  e7b182e430521163e989afb81b64971752a4b116 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8cd40200c27a569c222ab2e031f9b08bea818f3f
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Jun 9 18:15:07 2014 -0700

    Wholesale CDR cost re-billing, RT#27555

diff --git a/FS/FS/part_pkg/agent_cdr.pm b/FS/FS/part_pkg/agent_cdr.pm
index 8c97a01..fc8436c 100644
--- a/FS/FS/part_pkg/agent_cdr.pm
+++ b/FS/FS/part_pkg/agent_cdr.pm
@@ -16,6 +16,11 @@ $DEBUG = 0;
 
 $me = '[FS::part_pkg::agent_cdr]';
 
+tie my %temporalities, 'Tie::IxHash',
+  'upcoming'  => "Upcoming (future)",
+  'preceding' => "Preceding (past)",
+;
+
 %info = (
   'name'      => 'Wholesale CDR cost billing, for master customers of an agent.',
   'shortname' => 'Whilesale CDR cost billing for agent.',
@@ -43,18 +48,7 @@ $me = '[FS::part_pkg::agent_cdr]';
     'output_format' => { 'name' => 'CDR invoice display format',
                          'type' => 'select',
                          'select_options' => { FS::cdr::invoice_formats() },
-                         'default'        => 'simple2', #XXX test
-                       },
-
-    'usage_section' => { 'name' => 'Section in which to place separate usage charges',
-                       },
-
-    'summarize_usage' => { 'name' => 'Include usage summary with recurring charges when usage is in separate section',
-                          'type' => 'checkbox',
-                        },
-
-    'usage_mandate' => { 'name' => 'Always put usage details in separate section',
-                          'type' => 'checkbox',
+                         'default'        => 'simple2', #with source
                        },
     #eofalse
 
@@ -62,9 +56,7 @@ $me = '[FS::part_pkg::agent_cdr]';
 
   'fieldorder' => [ qw( recur_temporality recur_method cutoff_day ),
                     FS::part_pkg::prorate_Mixin::fieldorder, 
-                    qw(
-                       output_format usage_section summarize_usage usage_mandate
-                    )
+                    qw( output_format ),
                   ],
 
   'weight' => 53,
@@ -72,7 +64,7 @@ $me = '[FS::part_pkg::agent_cdr]';
 );
 
 sub calc_recur {
-  my $self, $cust_pkg, $sdate, $details, $param ) = @_;
+  my( $self, $cust_pkg, $sdate, $details, $param ) = @_;
 
   #my $last_bill = $cust_pkg->last_bill;
   my $last_bill = $cust_pkg->get('last_bill'); #->last_bill falls back to setup
@@ -83,6 +75,8 @@ sub calc_recur {
 
   my $charges = 0;
 
+  my $output_format = $self->option('output_format', 'Hush!') || 'simple2';
+
   #CDR calculations
 
   #false laziness w/agent.pm

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/part_pkg/agent_cdr.pm |   26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)




More information about the freeside-commits mailing list