diff options
Diffstat (limited to 'FS/FS')
-rw-r--r-- | FS/FS/API.pm | 41 | ||||
-rw-r--r-- | FS/FS/Cron/breakage.pm | 2 | ||||
-rw-r--r-- | FS/FS/Setup.pm | 12 | ||||
-rw-r--r-- | FS/FS/cust_bill.pm | 19 | ||||
-rw-r--r-- | FS/FS/cust_main/API.pm | 6 | ||||
-rw-r--r-- | FS/FS/cust_main/Billing.pm | 2 | ||||
-rw-r--r-- | FS/FS/cust_pay.pm | 5 | ||||
-rw-r--r-- | FS/FS/tax_rate.pm | 3 |
8 files changed, 10 insertions, 80 deletions
diff --git a/FS/FS/API.pm b/FS/FS/API.pm index c49fb20..f848361 100644 --- a/FS/FS/API.pm +++ b/FS/FS/API.pm @@ -365,26 +365,6 @@ comma-separated list of email addresses for email invoices. The special value 'P postal_invoicing Set to 1 to enable postal invoicing -=item payby - -CARD, DCRD, CHEK, DCHK, LECB, BILL, COMP or PREPAY - -=item payinfo - -Card number for CARD/DCRD, account_number@aba_number for CHEK/DCHK, prepaid "pin" for PREPAY, purchase order number for BILL - -=item paycvv - -Credit card CVV2 number (1.5+ or 1.4.2 with CVV schema patch) - -=item paydate - -Expiration date for CARD/DCRD - -=item payname - -Exact name on credit card for CARD/DCRD, bank name for CHEK/DCHK - =item referral_custnum Referring customer number @@ -505,27 +485,6 @@ addition to email addresses), postal_invoicing Set to 1 to enable postal invoicing -=item payby - -CARD, DCRD, CHEK, DCHK, LECB, BILL, COMP or PREPAY - -=item payinfo - -Card number for CARD/DCRD, account_number@aba_number for CHEK/DCHK, prepaid -"pin" for PREPAY, purchase order number for BILL - -=item paycvv - -Credit card CVV2 number (1.5+ or 1.4.2 with CVV schema patch) - -=item paydate - -Expiration date for CARD/DCRD - -=item payname - -Exact name on credit card for CARD/DCRD, bank name for CHEK/DCHK - =item referral_custnum Referring customer number diff --git a/FS/FS/Cron/breakage.pm b/FS/FS/Cron/breakage.pm index 6dd904d..56a9df4 100644 --- a/FS/FS/Cron/breakage.pm +++ b/FS/FS/Cron/breakage.pm @@ -47,7 +47,7 @@ sub reconcile_breakage { my @customers = qsearch({ 'table' => 'cust_main', 'hashref' => { 'agentnum' => $agent->agentnum, - 'payby' => { op=>'!=', value=>'COMP', }, + 'complimentary' => { op=>'!=', value=>'Y', }, }, 'extra_sql' => $extra_sql, }); diff --git a/FS/FS/Setup.pm b/FS/FS/Setup.pm index 5528c89..f26e50e 100644 --- a/FS/FS/Setup.pm +++ b/FS/FS/Setup.pm @@ -363,13 +363,11 @@ sub initial_data { #with billing type Complimentary. Leave the First package dropdown set to #(none). 'cust_main' => [ - { 'agentnum' => 1, #XXX - 'refnum' => 1, #XXX - 'first' => 'System', - 'last' => 'Accounts', - 'payby' => 'COMP', - 'payinfo' => 'system', #or something - 'paydate' => '1/2037', + { 'agentnum' => 1, #XXX + 'refnum' => 1, #XXX + 'first' => 'System', + 'last' => 'Accounts', + 'complimentary' => 'Y', 'bill_location' => $cust_location, 'ship_location' => $cust_location, }, diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 26f10da..8d69661 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -6,6 +6,7 @@ use base qw( FS::cust_bill::Search FS::Template_Mixin use strict; use vars qw( $DEBUG $me ); # but NOT $conf +use Carp; use Fcntl qw(:flock); #for spool_csv use Cwd; use List::Util qw(min max sum); @@ -1953,24 +1954,8 @@ sub print_csv { } -=item comp - -Pays this invoice with a compliemntary payment. If there is an error, -returns the error, otherwise returns false. - -=cut - sub comp { - my $self = shift; - my $cust_pay = new FS::cust_pay ( { - 'invnum' => $self->invnum, - 'paid' => $self->owed, - '_date' => '', - 'payby' => 'COMP', - 'payinfo' => $self->cust_main->payinfo, - 'paybatch' => '', - } ); - $cust_pay->insert; + croak 'cust_bill->comp is deprecated (COMP payments are deprecated)'; } =item realtime_card diff --git a/FS/FS/cust_main/API.pm b/FS/FS/cust_main/API.pm index 158b5cf..2d6da9e 100644 --- a/FS/FS/cust_main/API.pm +++ b/FS/FS/cust_main/API.pm @@ -21,8 +21,7 @@ use vars qw( first last company daytime night fax mobile ); # locale -# payby payinfo payname paystart_month paystart_year payissue payip -# ss paytype paystate stateid stateid_state +# ss stateid stateid_state @location_editable_fields = qw( address1 address2 city county state zip country ); @@ -106,14 +105,12 @@ sub API_insert { #same for refnum like signup_server-default_refnum? my $cust_main = new FS::cust_main ( { # $class->new( { - 'payby' => 'BILL', 'tagnum' => [ FS::part_tag->default_tags ], map { $_ => $opt{$_} } qw( agentnum salesnum refnum agent_custid referral_custnum last first company daytime night fax mobile - payby payinfo paydate paycvv payname ), } ); @@ -176,7 +173,6 @@ sub API_update { agentnum salesnum refnum agent_custid referral_custnum last first company daytime night fax mobile - payby payinfo paydate paycvv payname ), my @invoicing_list; diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm index 9e2082f..b3d4e70 100644 --- a/FS/FS/cust_main/Billing.pm +++ b/FS/FS/cust_main/Billing.pm @@ -390,7 +390,7 @@ terms or the default terms are used. sub bill { my( $self, %options ) = @_; - return '' if $self->payby eq 'COMP'; + return '' if $self->complimentary eq 'Y'; local($DEBUG) = $FS::cust_main::DEBUG if $FS::cust_main::DEBUG > $DEBUG; my $log = FS::Log->new('FS::cust_main::Billing::bill'); diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index 139d2ff..e8f9aee 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -978,7 +978,6 @@ sub _upgrade_data { #class method $cust_pay->set('otaker', 'legacy'); } - delete $FS::payby::hash{'COMP'}->{cust_pay}; #quelle kludge my $error = $cust_pay->replace; if ( $error ) { @@ -987,8 +986,6 @@ sub _upgrade_data { #class method next; } - $FS::payby::hash{'COMP'}->{cust_pay} = ''; #restore it - $count++; if ( $DEBUG > 1 && $lastprog + 30 < time ) { warn "$me $count/$total (".sprintf('%.2f',100*$count/$total). '%)'."\n"; @@ -1042,9 +1039,7 @@ sub _upgrade_data { #class method # otaker->usernum upgrade ### - delete $FS::payby::hash{'COMP'}->{cust_pay}; #quelle kludge $class->_upgrade_otaker(%opt); - $FS::payby::hash{'COMP'}->{cust_pay} = ''; #restore it # if we do this anywhere else, it should become an FS::Upgrade method my $num_to_upgrade = $class->count('paybatch is not null'); diff --git a/FS/FS/tax_rate.pm b/FS/FS/tax_rate.pm index ec3bb12..0047f9d 100644 --- a/FS/FS/tax_rate.pm +++ b/FS/FS/tax_rate.pm @@ -2055,9 +2055,6 @@ sub generate_liability_report { join(';', map { "$_=". uri_escape($t->$_) } @params); my $itemdesc_loc = - # " payby != 'COMP' ". # breaks the entire report under 4.x - # # and unnecessary since COMP accounts don't - # # get taxes calculated in the first place " ( itemdesc = ? OR ? = '' AND itemdesc IS NULL ) ". "AND ". FS::tax_rate_location->location_sql( map { $_ => $t->$_ } @taxparams |