'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 = (
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;
'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,
eval "use Net::Artera;";
return $@ if $@;
+ $Net::Artera::DEBUG = 1 if $self->option('debug');
my $artera = $self->_new_Artera;
my $result = $artera->statusChange(