Merge branch 'master' of git.freeside.biz:/home/git/freeside
authorJonathan Prykop <jonathan@freeside.biz>
Mon, 16 Feb 2015 19:53:36 +0000 (13:53 -0600)
committerJonathan Prykop <jonathan@freeside.biz>
Mon, 16 Feb 2015 19:53:36 +0000 (13:53 -0600)
1  2 
FS/FS/AccessRight.pm
FS/FS/Schema.pm
httemplate/elements/menu.html

diff --combined FS/FS/AccessRight.pm
@@@ -53,7 -53,6 +53,6 @@@ assigned to users and/or groups
  #    'billing' => [
  #      '_desc' => 'Access to billing configuration',
  #      'payment_gateway'  => {},
- #      'part_bill_event'  => {},
  #      'prepay_credit'    => {},
  #      'rate'             => {},
  #      'cust_main_county' => {},
@@@ -221,8 -220,6 +220,8 @@@ tie my %rights, 'Tie::IxHash'
      { rightname=>'Backdate credit', desc=>'Enable credits to be posted for days other than today.' },
      'Credit line items', #NEWNEWNEW
      'Apply credit', #NEWNEW
 +    'Void credit', #NEWER than things marked NEWNEWNEW
 +    'Unvoid credit', #NEWER than things marked NEWNEWNEW
      { rightname=>'Unapply credit', desc=>'Enable "unapplication" of unclosed credits.' }, #aka unapplycredits
      { rightname=>'Delete credit', desc=>'Enable deletion of unclosed credits. Be very careful!  Only delete credits that were data-entry errors, not adjustments.' }, #aka. deletecredits Optionally specify one or more comma-separated email addresses to be notified when a credit is deleted.
      'View refunds',
      'Refund Echeck payment',
      'Delete refund', #NEW
      'Add on-the-fly credit reason', #NEW
 +    'Add on-the-fly void credit reason',
      'Add on-the-fly refund reason', #NEW
    ],
    
diff --combined FS/FS/Schema.pm
@@@ -794,58 -794,6 +794,6 @@@ sub tables_hashref 
                          ],
      },
  
-     #old "invoice" events, deprecated
-     'cust_bill_event' => {
-       'columns' => [
-         'eventnum',    'serial',  '', '', '', '', 
-         'invnum',   'int',  '', '', '', '', 
-         'eventpart',   'int',  '', '', '', '', 
-         '_date',     @date_type, '', '', 
-         'status', 'varchar', '', $char_d, '', '', 
-         'statustext', 'text', 'NULL', '', '', '', 
-       ],
-       'primary_key'  => 'eventnum',
-       #no... there are retries now #'unique' => [ [ 'eventpart', 'invnum' ] ],
-       'unique'       => [],
-       'index'        => [ ['invnum'], ['status'], ['eventpart'],
-                           ['statustext'], ['_date'],
-                         ],
-       'foreign_keys' => [
-                           { columns    => [ 'invnum' ],
-                             table      => 'cust_bill',
-                           },
-                           { columns    => [ 'eventpart' ],
-                             table      => 'part_bill_event',
-                           },
-                         ],
-     },
-     #old "invoice" events, deprecated
-     'part_bill_event' => {
-       'columns' => [
-         'eventpart',    'serial',  '', '', '', '', 
-         'freq',        'varchar',       'NULL',     $char_d, '', '', 
-         'payby',       'char',  '', 4, '', '', 
-         'event',       'varchar',           '',     $char_d, '', '', 
-         'eventcode',    @perl_type, '', '', 
-         'seconds',     'int', 'NULL', '', '', '', 
-         'weight',      'int', '', '', '', '', 
-         'plan',       'varchar', 'NULL', $char_d, '', '', 
-         'plandata',   'text', 'NULL', '', '', '', 
-         'reason',     'int', 'NULL', '', '', '', 
-         'disabled',     'char', 'NULL', 1, '', '', 
-       ],
-       'primary_key'  => 'eventpart',
-       'unique'       => [],
-       'index'        => [ ['payby'], ['disabled'], ],
-       'foreign_keys' => [
-                           { columns    => [ 'reason' ],
-                             table      => 'reason',
-                             references => [ 'reasonnum' ],
-                           },
-                         ],
-     },
      'part_event' => {
        'columns' => [
          'eventpart',   'serial',      '',      '', '', '', 
          #void fields
          'void_date',  @date_type,                  '', '', 
          'void_reason', 'varchar', 'NULL', $char_d, '', '', 
 +        'void_reasonnum', 'int', 'NULL', '', '', '', 
          'void_usernum',    'int', 'NULL',      '', '', '',
        ],
        'primary_key'  => 'crednum',
                              table      => 'cust_pkg',
                              references => [ 'pkgnum' ],
                            },
 +                          { columns    => [ 'void_reasonnum' ],
 +                            table      => 'reason',
 +                            references => [ 'reasonnum' ],
 +                          },
                            { columns    => [ 'void_usernum' ],
                              table      => 'access_user',
                              references => [ 'usernum' ],
@@@ -317,8 -317,6 +317,6 @@@ tie my %report_ticketing, 'Tie::IxHash'
  tie my %report_bill_event, 'Tie::IxHash',
    'All billing events' => [ $fsurl.'search/report_cust_event.html', 'All billing events for a date range' ],
    'Billing event errors' => [ $fsurl.'search/report_cust_event.html?failed=1', 'Failed credit cards, processor or printer problems, etc.' ],
- #  'All invoice events' => [ $fsurl.'search/cust_bill_event.html', 'Reports on deprecated, old-style invoice events for a date range' ],
- #  'Invoice event errors' => [ $fsurl.'search/cust_bill_event.html?failed=1', 'Reports on deprecated, old-style events for failed credit cards, processor or printer problems, etc.' ],
  ;
  
  tie my %report_payments, 'Tie::IxHash',
@@@ -340,7 -338,6 +338,7 @@@ tie my %report_credits, 'Tie::IxHash'
    'Credit package source detail' => [ $fsurl.'search/report_cust_credit_source_bill_pkg.html', 'Line-item detail for triggered package credits' ],
    'Credit application detail' => [ $fsurl.'search/report_cust_credit_bill_pkg.html', 'Line item application detail' ],
    'Unapplied Credits' => [ $fsurl.'search/report_cust_credit.html?unapplied=1', 'Unapplied credit report (by type and/or date range)' ],
 +  'Voided Credits' => [ $fsurl.'search/report_cust_credit_void.html', 'Voided credit report (by employee and/or date range)' ],
  ;
  
  tie my %report_refunds, 'Tie::IxHash',
@@@ -668,7 -665,6 +666,6 @@@ $config_billing{'Billing events'} = [ $
      if $curuser->access_right('Edit billing events')
      || $curuser->access_right('Edit global billing events');
  if ( $curuser->access_right('Configuration') ) {
-   #$config_billing{'Invoice events'}         = [ $fsurl.'browse/part_bill_event.cgi', 'Deprecated, old-style actions for overdue invoices' ];
    $config_billing{'Invoice configurations'}      = [ $fsurl.'browse/invoice_conf.html', 'Adjust invoice settings for special-purpose notices' ];
    $config_billing{'Invoice templates'}      = [ $fsurl.'browse/invoice_template.html', 'Edit templates for HTML, plaintext and typeset invoices' ];
    $config_billing{'separator'} = ''; #its a separator!