diff options
author | ivan <ivan> | 2008-09-12 02:02:05 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-09-12 02:02:05 +0000 |
commit | 569dbe716a5eb79f0f8e7216bb2baf27d40f60bf (patch) | |
tree | 1e3e78f2c5459fe948507ea88bc9b2e0b32c26c6 /FS | |
parent | bc65cfbb3b554ce94479c52c16bc6a27538b797a (diff) |
add billco respooling, not re-FTPing, RT#3971
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Conf.pm | 17 | ||||
-rw-r--r-- | FS/FS/cust_bill.pm | 34 |
2 files changed, 46 insertions, 5 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index d5ee8cbea..536ad6ffd 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -1883,6 +1883,21 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'cust_bill-spoolformat', + 'section' => 'billing', + 'description' => 'Enable spooling of raw invoice data - format.', + 'type' => 'select', + 'select_enum' => [ '', 'default', 'billco', ], + }, + + { + 'key' => 'cust_bill-spoolagent', + 'section' => 'billing', + 'description' => 'Enable per-agent spooling of raw invoice data.', + 'type' => 'checkbox', + }, + + { 'key' => 'svc_acct-usage_suspend', 'section' => 'billing', 'description' => 'Suspends the package an account belongs to when svc_acct.seconds or a bytecount is decremented to 0 or below (accounts with an empty seconds and up|down|totalbytes value are ignored). Typically used in conjunction with prepaid packages and freeside-sqlradius-radacctd.', @@ -2316,7 +2331,7 @@ worry that config_items is freeside-specific and icky. { 'key' => 'card_masking_method', 'section' => 'UI', - 'description' => 'Digits to display when masking credit cards. Note that the first six digits are necessary to canonically identify the credit card type (Visa/MC, Amex, Discover, Maestro, etc.) in all cases. The first four digits can identify the most common credit card types in most cases (Visa/MC, Amex, and Discover). The first two digits can distinguish between Visa/MC and Amex.', + 'description' => 'Digits to display when masking credit cards. Note that the first six digits are necessary to canonically identify the credit card type (Visa/MC, Amex, Discover, Maestro, etc.) in all cases. The first four digits can identify the most common credit card types in most cases (Visa/MC, Amex, and Discover). The first two digits can distinguish between Visa/MC and Amex. Note: You should manually remove stored paymasks if you change this value on an existing database, to avoid problems using stored cards.', 'type' => 'select', 'select_hash' => [ '' => '123456xxxxxx1234', diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 98091e1ac..37dbe3aae 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -935,6 +935,24 @@ sub ftp_invoice { ); } +=item spool_invoice [ TEMPLATENAME ] + +Spools this invoice data (see L<FS::spool_csv>) + +TEMPLATENAME is unused? + +=cut + +sub spool_invoice { + my $self = shift; + my $template = scalar(@_) ? shift : ''; + + $self->spool_csv( + 'format' => $conf->config('cust_bill-spoolformat'), + 'agent_spools' => $conf->exists('cust_bill-spoolagent'), + ); +} + =item send_if_newest [ TEMPLATENAME [ , AGENTNUM [ , INVOICE_FROM ] ] ] Like B<send>, but only sends the invoice if it is the newest open invoice for @@ -2668,7 +2686,7 @@ sub _items_payments { =over 4 -=item reprint +=item process_reprint =cut @@ -2676,7 +2694,7 @@ sub process_reprint { process_re_X('print', @_); } -=item reemail +=item process_reemail =cut @@ -2684,7 +2702,7 @@ sub process_reemail { process_re_X('email', @_); } -=item refax +=item process_refax =cut @@ -2692,7 +2710,7 @@ sub process_refax { process_re_X('fax', @_); } -=item reftp +=item process_reftp =cut @@ -2700,6 +2718,14 @@ sub process_reftp { process_re_X('ftp', @_); } +=item respool + +=cut + +sub process_respool { + process_re_X('spool', @_); +} + use Storable qw(thaw); use Data::Dumper; use MIME::Base64; |