X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fartera_turbo.pm;h=af4c79052ecf50b055814c513f560d4dff6e4c3b;hb=2041a9143fac20b79ead4a1ae01224dedf5b27c2;hp=1e229615519f77dd5df41130b75c879c9ebfd4d1;hpb=dda265d579b6f754feea0deacd12ae358d552f11;p=freeside.git diff --git a/FS/FS/part_export/artera_turbo.pm b/FS/FS/part_export/artera_turbo.pm index 1e2296155..af4c79052 100644 --- a/FS/FS/part_export/artera_turbo.pm +++ b/FS/FS/part_export/artera_turbo.pm @@ -18,9 +18,13 @@ tie my %options, 'Tie::IxHash', 'agent_aid' => { 'label' => 'Export agentnum values to Artera AID', 'type' => 'checkbox', }, + 'aid' => { 'label' => 'Artera Agent ID to use if not using agentnum values', }, 'production' => { 'label' => 'Production mode (leave unchecked for staging)', 'type' => 'checkbox', }, + 'debug' => { 'label' => 'Enable debug logging', + 'type' => 'checkbox', + }, ; %info = ( @@ -61,6 +65,7 @@ sub _export_insert { eval "use Net::Artera;"; return $@ if $@; + $Net::Artera::DEBUG = 1 if $self->option('debug'); my $artera = $self->_new_Artera; my $cust_pkg = $svc_external->cust_svc->cust_pkg; @@ -80,7 +85,9 @@ sub _export_insert { 'email' => $email, 'cname' => $cust_main->name, 'ref' => $svc_external->svcnum, - 'aid' => ( $self->option('agent_aid') ? $cust_main->agentnum : '' ), + 'aid' => ( $self->option('agent_aid') + ? $cust_main->agentnum + : $self->option('aid') ), 'add1' => $cust_main->address1, 'add2' => $cust_main->address2, 'add3' => $cust_main->city, @@ -130,6 +137,7 @@ sub statusChange { eval "use Net::Artera;"; return $@ if $@; + $Net::Artera::DEBUG = 1 if $self->option('debug'); my $artera = $self->_new_Artera; my $result = $artera->statusChange(