From: Mark Wells Date: Wed, 31 Jul 2013 19:09:30 +0000 (-0700) Subject: a2billing export, #23281 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=af12e29224dd69ef1d577c5e9943644feafe5525 a2billing export, #23281 --- diff --git a/FS/FS/part_export/a2billing.pm b/FS/FS/part_export/a2billing.pm new file mode 100644 index 000000000..52680dc17 --- /dev/null +++ b/FS/FS/part_export/a2billing.pm @@ -0,0 +1,542 @@ +package FS::part_export::a2billing; + +use strict; +use vars qw(@ISA @EXPORT_OK $DEBUG %info %options); +use Exporter; +use Tie::IxHash; +use FS::Record qw( qsearch qsearchs str2time_sql ); +use FS::part_export; +use FS::svc_acct; +use FS::svc_phone; +use Locale::Country qw(country_code2code); +use Date::Format qw(time2str); +use Carp qw( cluck ); + +@ISA = qw(FS::part_export); + +$DEBUG = 0; + +tie %options, 'Tie::IxHash', + 'datasrc' => { label=>'DBI data source ' }, + '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', + options => ['monthly', 'weekly'] + }, + 'debug' => { label=>'Enable debugging', type=>'checkbox' } +; + +my $notes = <<'END'; +

Real-time export to the backend database of an Asterisk2Billing billing server. +This is both a svc_acct and a svc_phone export, and needs to be attached +to both a svc_acct and svc_phone definition within the same package.

+