X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fa2billing.pm;h=f0e979f8365cf0aee3080ab6227ed3b16158490e;hb=7c5561b797cab20e0c579340c8b6cd6061d1a3ca;hp=52680dc175d6e4986dc0d9ab691b7c81ed7af535;hpb=7d41825f1f16ef85d39bcc55d39b815f7919b446;p=freeside.git diff --git a/FS/FS/part_export/a2billing.pm b/FS/FS/part_export/a2billing.pm index 52680dc17..f0e979f83 100644 --- a/FS/FS/part_export/a2billing.pm +++ b/FS/FS/part_export/a2billing.pm @@ -21,7 +21,6 @@ tie %options, 'Tie::IxHash', 'username' => { label=>'Database username' }, 'password' => { label=>'Database password' }, 'didgroup' => { label=>'DID group ID', default=>1 }, - 'tariffgroup' => { label=>'Tariff group ID', default=>1 }, 'credit' => { label=>'Default credit limit' }, 'billtype' => {label=>'Billing type', type => 'select', @@ -112,6 +111,7 @@ sub export_insert { my $cust_pkg = $svc->cust_svc->cust_pkg; my $cust_main = $cust_pkg->cust_main; my $location = $cust_pkg->cust_location; + my $part_pkg = $cust_pkg->part_pkg; my $error; $DEBUG ||= $self->option('debug'); @@ -131,9 +131,8 @@ sub export_insert { username => $username, useralias => $username, uipass => $svc->_password, - # XXX these options may move to a part_pkg at some point - credit => $self->option('credit') || 0, - tariff => $self->option('tariffgroup'), + credit => $cust_main->credit_limit || $self->option('credit') || 0, + tariff => $part_pkg->option('a2billing_tariff'), status => 1, lastname => $cust_main->last, # $svc->finger? firstname => $cust_main->first, @@ -143,9 +142,11 @@ sub export_insert { state => $location->state, country => $country3, zipcode => $location->zip, - typepaid => 1, + simultaccess => $part_pkg->option('a2billing_simultaccess'), + typepaid => $part_pkg->option('a2billing_type'), sip_buddy => 1, company_name => $cust_main->company, + activated => 't', ); warn "creating A2B cc_card record for $username\n" if $DEBUG; $error = $self->a2b_insert_or_replace('cc_card', 'svcnum', \%cc_card); @@ -444,7 +445,7 @@ sub export_unsuspend { if ( $svc->isa('FS::svc_acct') ) { $error = $self->a2b_insert_or_replace('cc_card', 'svcnum', { svcnum => $svc->svcnum, - status => 0, #"ACTIVE" + status => 1, #"ACTIVE" activated => 1, } );