Commit 9caa7992 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Class name fixups and refactoring

parent 06df96ae
......@@ -34,14 +34,14 @@ use base qw(SOAP::Transport::HTTPng::Daemon);
# Other stuff
use wiaflos::version;
use wiaflos::server::dblayer;
use wiaflos::server::dbilayer;
use wiaflos::server::cache;
use wiaflos::server::logging;
use wiaflos::server::users;
use wiaflos::server::templating;
use wiaflos::server::jobs;
use Auth qw();
use awitpt::db::dblayer;
use awitpt::db::dbilayer;
use awitpt::cache;
use wiaflos::server::core::logging;
use wiaflos::server::core::users;
use wiaflos::server::core::templating;
use wiaflos::server::core::jobs;
use wiaflos::server::api::auth qw();
# Pull in HTTP transport
......@@ -151,7 +151,7 @@ sub configure {
}
$soap->{'plugins'} = \@soap_plugins;
# Set other stuff
$soap->{'on_action'} = \&Auth::checkAccess;
$soap->{'on_action'} = \&wiaflos::server::api::auth::checkAccess;
# Template engine config
my @template_params = (
......@@ -194,7 +194,7 @@ sub post_configure_hook
$self->log(LOG_INFO,"Initializing authentication module...");
Auth::init($self);
wiaflos::server::api::auth::init($self);
$self->log(LOG_INFO,"Authentication module initialized.");
$self->log(LOG_INFO,"Plugin load started...");
......@@ -203,8 +203,8 @@ sub post_configure_hook
foreach my $plugin (@{$soapcfg->{'plugins'}}) {
# Load plugin
my $res = eval("
use $plugin;
plugin_register(\$self,\"$plugin\",\$${plugin}::pluginInfo);
use wiaflos::server::api::$plugin;
plugin_register(\$self,\"$plugin\",\$wiaflos::server::api::${plugin}::pluginInfo);
");
if ($@ || (defined($res) && $res != 0)) {
$self->log(LOG_WARN,"Error loading plugin $plugin ($@)\n");
......@@ -215,11 +215,11 @@ sub post_configure_hook
$self->log(LOG_INFO,"Initializing system modules...");
wiaflos::server::config::Init($self);
wiaflos::server::core::config::Init($self);
# Init templating engine
wiaflos::server::templating::Init($self);
wiaflos::server::core::templating::Init($self);
# Init caching engine
wiaflos::server::cache::Init($self);
awitpt::cache::Init($self);
$self->log(LOG_INFO,"System modules initialized.");
}
......@@ -229,7 +229,11 @@ sub map_dispatch {
my ($self,$module,$func) = @_;
my $soapcfg = $self->{'soap_config'};
push(@{$soapcfg->{'dispatch_to'}},$module."::".$func);
# Make sure class has ::'s not /'s
my $class = $module;
$class =~ s,/,::,g;
push(@{$soapcfg->{'dispatch_to'}},$class."::".$func);
}
# Register plugin info
......@@ -265,7 +269,7 @@ sub child_init_hook
$self->SUPER::child_init_hook();
# Initialize job control
wiaflos::server::jobs::Init($self);
wiaflos::server::core::jobs::Init($self);
}
......@@ -277,7 +281,7 @@ sub child_finish_hook
$self->SUPER::child_finish_hook();
# Shut down job control
wiaflos::server::jobs::Finish($self);
wiaflos::server::core::jobs::Finish($self);
}
......@@ -313,7 +317,7 @@ sub process_request
}
}
# Setup database handle
wiaflos::server::dblayer::setHandle($self->{'client'}->{'dbh'});
awitpt::db::dblayer::setHandle($self->{'client'}->{'dbh'});
# Check what we got back from our HTTP basic authentication, anything but 0 is bad, so return
......@@ -338,9 +342,9 @@ EOF
}
# Nuke session
Auth::sessionUnsetData();
wiaflos::server::api::auth::sessionUnsetData();
# Nuke database handle
wiaflos::server::dblayer::setHandle(undef);
awitpt::db::dblayer::setHandle(undef);
# Send reply to client
$c->send_response($response);
......@@ -388,7 +392,7 @@ sub server_exit
$self->log(LOG_INFO,"Destroying system modules...");
# Destroy cache
wiaflos::server::cache::Destroy($self);
awitpt::cache::Destroy($self);
$self->log(LOG_INFO,"System modules destroyed.");
$self->SUPER::server_exit();
......@@ -442,7 +446,7 @@ sub getAuthStatus
($username,$password) = split(/:/, $authStr, 2);
my $dbh = $self->{'client'}->{'dbh'};
my $userID = wiaflos::server::users::authenticate($username,$password);
my $userID = wiaflos::server::core::users::authenticate($username,$password);
# Authenticate user & pull in session
......@@ -457,9 +461,9 @@ sub getAuthStatus
}
# Get user capabilities
my $capabilities = wiaflos::server::users::getCapabilities($userID);
my $capabilities = wiaflos::server::core::users::getCapabilities($userID);
Auth::sessionSetData(
wiaflos::server::api::auth::sessionSetData(
'Username' => $username,
'Capabilities' => $capabilities,
......@@ -472,7 +476,7 @@ sub getAuthStatus
# Authentication Failed
} else {
$self->log(LOG_NOTICE,"[CORE] Authentication failed => User: $username, Reason: ".wiaflos::server::users::Error()."");
$self->log(LOG_NOTICE,"[CORE] Authentication failed => User: $username, Reason: ".wiaflos::server::core::users::Error()."");
$res = -2;
}
}
......
......@@ -37,8 +37,6 @@ use wiaflos::client::config;
use wiaflos::client::soap;
use wiaflos::client::misc;
use SOAP::Lite;
use Text::ParseWords;
......
......@@ -139,7 +139,7 @@ sub list
return ERR_C_PARAM;
}
my $res = soapCall($OUT,"Clients","getClients");
my $res = soapCall($OUT,"wiaflos/server/api/Clients","getClients");
if ($res->{'Result'} == RES_OK) {
print $OUT swrite(<<'END', "ID", "Code", "Name", "RegNumber", "TaxRef", "GLAcc");
......@@ -194,7 +194,7 @@ sub create
$detail->{'RegNumber'} = $parms->{'reg'};
$detail->{'TaxReference'} = $parms->{'taxref'};
$detail->{'CreateSubAccount'} = $parms->{'createsubaccount'};
my $res = soapCall($OUT,"Clients","createClient",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Clients","createClient",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......@@ -232,7 +232,7 @@ sub linkAddress
$detail->{'Code'} = $parms->{'client'};
$detail->{'Type'} = $parms->{'type'};
$detail->{'Address'} = $parms->{'address'};
my $res = soapCall($OUT,"Clients","linkClientAddress",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Clients","linkClientAddress",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......@@ -270,7 +270,7 @@ sub linkEmailAddress
$detail->{'Code'} = $parms->{'client'};
$detail->{'Type'} = $parms->{'type'};
$detail->{'Address'} = $parms->{'address'};
my $res = soapCall($OUT,"Clients","linkClientEmailAddress",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Clients","linkClientEmailAddress",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......@@ -309,7 +309,7 @@ sub linkPhoneNumber
$detail->{'Type'} = $parms->{'type'};
$detail->{'Number'} = $parms->{'number'};
$detail->{'Name'} = $parms->{'name'};
my $res = soapCall($OUT,"Clients","linkClientPhoneNumber",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Clients","linkClientPhoneNumber",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......@@ -336,28 +336,28 @@ sub show
my $res;
$res = soapCall($OUT,"Clients","getClient",$detail);
$res = soapCall($OUT,"wiaflos/server/api/Clients","getClient",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
}
my $client = $res->{'Data'};
$res = soapCall($OUT,"Clients","getClientAddresses",$detail);
$res = soapCall($OUT,"wiaflos/server/api/Clients","getClientAddresses",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
}
my $addies = $res->{'Data'};
$res = soapCall($OUT,"Clients","getClientPhoneNumbers",$detail);
$res = soapCall($OUT,"wiaflos/server/api/Clients","getClientPhoneNumbers",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
}
my $phones = $res->{'Data'};
$res = soapCall($OUT,"Clients","getClientEmailAddresses",$detail);
$res = soapCall($OUT,"wiaflos/server/api/Clients","getClientEmailAddresses",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......@@ -414,7 +414,7 @@ sub remove
my $detail;
$detail->{'Code'} = $parms->{'client'};
my $res= soapCall($OUT,"Clients","removeClient",$detail);
my $res= soapCall($OUT,"wiaflos/server/api/Clients","removeClient",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
}
......@@ -440,7 +440,7 @@ sub showGLAccountEntries
$detail->{'StartDate'} = $parms->{'start'};
$detail->{'EndDate'} = $parms->{'end'};
$detail->{'BalanceBroughtForward'} = $parms->{'balance-brought-forward'};
my $res = soapCall($OUT,"Clients","getClientGLAccountEntries",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Clients","getClientGLAccountEntries",$detail);
if ($res->{'Result'} == RES_OK) {
print $OUT swrite(<<'END', "ID", "Date", "Ref", "Amount", "Balance");
......@@ -522,7 +522,7 @@ sub createTransaction
$detail->{'GLAccountNumber'} = $parms->{'account'};
$detail->{'Date'} = $parms->{'date'};
$detail->{'Amount'} = $parms->{'amount'};
my $res = soapCall($OUT,"Clients","createAccountTransaction",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Clients","createAccountTransaction",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......@@ -547,7 +547,7 @@ sub showTransactions
my $detail;
$detail->{'Code'} = $parms->{'client'};
$detail->{'Type'} = $parms->{'type'};
my $res = soapCall($OUT,"Clients","getAccountTransactions",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Clients","getAccountTransactions",$detail);
if ($res->{'Result'} == RES_OK) {
print $OUT swrite(<<'END', "ID", "Number", "Date", "Reference", "Amount","Posted","Closed");
......@@ -592,7 +592,7 @@ sub postTransaction
my $detail;
$detail->{'Number'} = $parms->{'transaction'};
my $res = soapCall($OUT,"Clients","postAccountTransaction",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Clients","postAccountTransaction",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
}
......@@ -615,7 +615,7 @@ sub showTransactionAllocations
}
my $detail;
$detail->{'Number'} = $parms->{'transaction'};
my $res = soapCall($OUT,"Clients","getAccountTransactionAllocations",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Clients","getAccountTransactionAllocations",$detail);
if ($res->{'Result'} == RES_OK) {
print $OUT swrite(<<'END', "ID", "Amount", "CreditNoteID", "ReceiptAllocationID");
......
......@@ -66,7 +66,7 @@ sub cacheGetStats
}
my $detail;
my $res = soapCall($OUT,"Engine","cacheGetStats",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Engine","cacheGetStats",$detail);
if ($res->{'Result'} == RES_OK) {
print swrite(<<'END', "Hits", "Misses");
......
......@@ -133,7 +133,7 @@ sub list
my $parms = parseArgs(@args);
my $res = soapCall($OUT,"GL","getGLAccounts");
my $res = soapCall($OUT,"wiaflos/server/api/GL","getGLAccounts");
if ($res->{'Result'} == RES_OK) {
if (!defined($parms->{'format'}) || $parms->{'format'} eq "text") {
......@@ -192,7 +192,7 @@ sub show
$detail->{'EndDate'} = $parms->{'end'};
$detail->{'BalanceBroughtForward'} = $parms->{'balance-brought-forward'};
$detail->{'Type'} = $parms->{'type'};
my $res = soapCall($OUT,"GL","getGLAccountEntries",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/GL","getGLAccountEntries",$detail);
if ($res->{'Result'} == RES_OK) {
print $OUT swrite(<<'END', "ID", "Date", "Ref", "Type", "Amount", "Balance");
......@@ -243,7 +243,7 @@ sub createTransaction
$detail->{'Date'} = $parms->{'date'};
$detail->{'Reference'} = $parms->{'reference'};
$detail->{'Type'} = $parms->{'type'};
my $res = soapCall($OUT,"GL","createGLTransaction",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/GL","createGLTransaction",$detail);
if ($res->{'Result'} == RES_OK) {
# Save this ID
$last{'transactionid'} = $res->{'Data'};
......@@ -274,7 +274,7 @@ sub postTransaction
my $detail;
$detail->{'ID'} = $parms->{'transaction'};
my $res = soapCall($OUT,"GL","postGLTransaction",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/GL","postGLTransaction",$detail);
if ($res->{'Result'} == RES_OK) {
# Null the id
$last{'transactionid'} = undef;
......@@ -304,7 +304,7 @@ sub removeTransaction
my $detail;
$detail->{'ID'} = $parms->{'transaction'};
my $res = soapCall($OUT,"GL","removeGLTransaction",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/GL","removeGLTransaction",$detail);
if ($res->{'Result'} == RES_OK) {
# Null the id
......@@ -335,7 +335,7 @@ sub showTransaction
my $detail;
$detail->{'ID'} = $parms->{'transaction'};
my $res = soapCall($OUT,"GL","getGLTransactionEntries",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/GL","getGLTransactionEntries",$detail);
if ($res->{'Result'} == RES_OK) {
print $OUT swrite(<<'END', "ID", "GL Account", "Ref", "Amount");
......@@ -396,7 +396,7 @@ sub linkTransaction
$detail->{'Credit'} = $parms->{'credit'};
$detail->{'Debit'} = $parms->{'debit'};
$detail->{'Reference'} = $parms->{'reference'};
my $res = soapCall($OUT,"GL","linkGLTransaction",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/GL","linkGLTransaction",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......@@ -417,7 +417,7 @@ sub listTransactions
$detail->{'StartDate'} = $parms->{'start'};
$detail->{'EndDate'} = $parms->{'end'};
$detail->{'Type'} = $parms->{'type'};
my $res = soapCall($OUT,"GL","getGLTransactions",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/GL","getGLTransactions",$detail);
if ($res->{'Result'} == RES_OK) {
print $OUT swrite(<<'END', "ID", "TransDate", "Ref", "Type", "Posted");
......@@ -477,7 +477,7 @@ sub createAccount
$detail->{'RwCatCode'} = $parms->{'rwcat'};
$detail->{'ParentAccountNumber'} = $parms->{'parent'};
my $res = soapCall($OUT,"GL","createGLAccount",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/GL","createGLAccount",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......
......@@ -108,7 +108,7 @@ sub list
return ERR_C_PARAM;
}
my $res = soapCall($OUT,"Inventory","getInventory");
my $res = soapCall($OUT,"wiaflos/server/api/Inventory","getInventory");
if ($res->{'Result'} == RES_OK) {
print $OUT swrite(<<'END', "ID", "Code", "Type", "Mode", "Description", "Income", "Asset", "Expense", "SellPrice");
......@@ -188,7 +188,7 @@ sub create
$detail->{'TaxMode'} = $parms->{'taxmode'};
$detail->{'Unit'} = $parms->{'unit'};
$detail->{'Discountable'} = $parms->{'discoutable'};
my $res = soapCall($OUT,"Inventory","createInventoryItem",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Inventory","createInventoryItem",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......@@ -213,7 +213,7 @@ sub remove
my $detail;
$detail->{'Code'} = $parms->{'item'};
my $res = soapCall($OUT,"Inventory","removeInventoryItem",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Inventory","removeInventoryItem",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
}
......@@ -244,7 +244,7 @@ sub update
$detail->{'SellPrice'} = $parms->{'sellprice'};
$detail->{'Unit'} = $parms->{'unit'};
$detail->{'Discountable'} = $parms->{'discoutable'};
my $res = soapCall($OUT,"Inventory","updateInventoryItem",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Inventory","updateInventoryItem",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
}
......@@ -267,7 +267,7 @@ sub show
my $detail;
$detail->{'Code'} = $parms->{'item'};
my $res = soapCall($OUT,"Inventory","getInventoryItem",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Inventory","getInventoryItem",$detail);
if ($res->{'Result'} == RES_OK) {
my $data = $res->{'Data'};
......@@ -315,7 +315,7 @@ sub showMovement
my $detail;
$detail->{'Code'} = $parms->{'item'};
$detail->{'SerialNumber'} = $parms->{'serial'};
my $res = soapCall($OUT,"Inventory","getInventoryItemMovement",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Inventory","getInventoryItemMovement",$detail);
if ($res->{'Result'} == RES_OK) {
my $data = $res->{'Data'};
......@@ -376,7 +376,7 @@ sub linkExpense
$detail->{'Reference'} = $parms->{'reference'};
$detail->{'GLAccountNumber'} = $parms->{'account'};
$detail->{'SerialNumber'} = $parms->{'serial'};
my $res = soapCall($OUT,"Inventory","linkInventoryItemToExpenseAccount",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Inventory","linkInventoryItemToExpenseAccount",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......
......@@ -121,7 +121,7 @@ sub list
my $detail;
$detail->{'Type'} = $parms->{'type'};
my $res = soapCall($OUT,"Invoicing","getInvoices",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Invoicing","getInvoices",$detail);
if ($res->{'Result'} == RES_OK) {
print swrite(<<'END', "ID", "Invoice", "Client", "IssueDate", "DueDate", "TaxTotal", "InvTotal");
......@@ -182,7 +182,7 @@ sub createInvoice
$detail->{'DueDate'} = $parms->{'duedate'};
$detail->{'OrderNumber'} = $parms->{'ordernumber'};
$detail->{'Note'} = $parms->{'note'};
my $res = soapCall($OUT,"Invoicing","createInvoice",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Invoicing","createInvoice",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
}
......@@ -219,7 +219,7 @@ sub linkInventoryItem
$detail->{'UnitPrice'} = $parms->{'unitprice'};
$detail->{'Discount'} = $parms->{'discount'};
$detail->{'TaxTypeID'} = $parms->{'taxtype'};
my $res = soapCall($OUT,"Invoicing","linkInvoiceItem",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Invoicing","linkInvoiceItem",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
}
......@@ -243,7 +243,7 @@ sub show
my $detail;
$detail->{'Number'} = $parms->{'invoice'};
my $res = soapCall($OUT,"Invoicing","getInvoice",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Invoicing","getInvoice",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......@@ -273,7 +273,7 @@ Note:
my $subTotal = Math::BigFloat->new(0);
my $taxTotal = Math::BigFloat->new(0);
my $invTotal = Math::BigFloat->new(0);
$res = soapCall($OUT,"Invoicing","getInvoiceItems",$detail);
$res = soapCall($OUT,"wiaflos/server/api/Invoicing","getInvoiceItems",$detail);
if ($res->{'Result'} == RES_OK) {
print swrite(<<'END', "ID", "Description", "Invt/Exp", "Unit", "Qty", "UnitPrice", "Price", "TaxAmount", "Total");
+========+===========================================+===========+========+========+============+============+=============+==============+
......@@ -315,7 +315,7 @@ sub post
}
my $detail;
$detail->{'Number'} = $parms->{'invoice'};
my $res = soapCall($OUT,"Invoicing","postInvoice",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Invoicing","postInvoice",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
}
......@@ -345,7 +345,7 @@ sub send
my $detail;
$detail->{'Number'} = $parms->{'invoice'};
$detail->{'SendTo'} = $parms->{'sendto'};
my $res = soapCall($OUT,"Invoicing","sendInvoice",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Invoicing","sendInvoice",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......@@ -372,14 +372,14 @@ sub showTransactions
$detail->{'Number'} = $parms->{'invoice'};
# Pull in invoice
my $res = soapCall($OUT,"Invoicing","getInvoice",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Invoicing","getInvoice",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
}
my $invoice = $res->{'Data'};
$res = soapCall($OUT,"Invoicing","getInvoiceTransactions",$detail);
$res = soapCall($OUT,"wiaflos/server/api/Invoicing","getInvoiceTransactions",$detail);
if ($res->{'Result'} == RES_OK) {
print swrite(<<'END', $detail->{'Number'}, "ID", "Info", "Amount", "Balance");
Invoice transactions for: @<<<<<<<<<<<<<<<<<<<
......
......@@ -150,7 +150,7 @@ sub createPayment
$detail->{'Date'} = $parms->{'date'};
$detail->{'Reference'} = $parms->{'reference'};
$detail->{'Amount'} = $parms->{'amount'};
my $res = soapCall($OUT,"Payments","createPayment",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Payments","createPayment",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......@@ -171,7 +171,7 @@ sub list
# build request
my $detail;
$detail->{'Type'} = $parms->{'type'};
my $res = soapCall($OUT,"Payments","getPayments",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Payments","getPayments",$detail);
if ($res->{'Result'} == RES_OK) {
print swrite(<<'END', "ID", "Supplier", "GLAccount", "Payment", "TransDate", "Ref", "Amount");
......@@ -212,7 +212,7 @@ sub postPayment
my $detail;
$detail->{'Number'} = $parms->{'payment'};
my $res = soapCall($OUT,"Payments","postPayment",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Payments","postPayment",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
}
......@@ -249,7 +249,7 @@ sub createAllocation
$detail->{'PaymentNumber'} = $parms->{'payment'};
$detail->{'SupplierInvoiceNumber'} = $parms->{'invoice'};
$detail->{'Amount'} = $parms->{'amount'};
my $res = soapCall($OUT,"Payments","createPaymentAllocation",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Payments","createPaymentAllocation",$detail);
# Save this ID
if ($res->{'Result'} == RES_OK) {
# Save this ID
......@@ -281,7 +281,7 @@ sub postAllocation
my $detail;
$detail->{'ID'} = $parms->{'id'};
my $res = soapCall($OUT,"Payments","postPaymentAllocation",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Payments","postPaymentAllocation",$detail);
if ($res->{'Result'} == RES_OK) {
# Null the id
$last{'allocationid'} = undef;
......@@ -310,7 +310,7 @@ sub show
my $res;
$detail->{'Number'} = $parms->{'payment'};
$res = soapCall($OUT,"Payments","getPayment",$detail);
$res = soapCall($OUT,"wiaflos/server/api/Payments","getPayment",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......@@ -319,7 +319,7 @@ sub show
$detail = undef;
$detail->{'PaymentNumber'} = $parms->{'payment'};
$res = soapCall($OUT,"Payments","getPaymentAllocations",$detail);
$res = soapCall($OUT,"wiaflos/server/api/Payments","getPaymentAllocations",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......
......@@ -121,7 +121,7 @@ sub list
my $detail;
$detail->{'Type'} = $parms->{'type'};
my $res = soapCall($OUT,"Purchasing","getSupplierInvoices",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Purchasing","getSupplierInvoices",$detail);
if ($res->{'Result'} == RES_OK) {
print swrite(<<'END', "ID", "InvNum", "SupplrID", "SupplierInvNum", "IssueDate", "DueDate", "TaxTotal", "InvTotal");
......@@ -182,7 +182,7 @@ sub createInvoice
$detail->{'DueDate'} = $parms->{'duedate'};
$detail->{'OrderNumber'} = $parms->{'order'};
$detail->{'Note'} = $parms->{'note'};
my $res = soapCall($OUT,"Purchasing","createSupplierInvoice",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Purchasing","createSupplierInvoice",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......@@ -241,7 +241,7 @@ sub linkInventoryItem
$detail->{'Discount'} = $parms->{'discount'};
$detail->{'TaxTypeID'} = $parms->{'taxtypeid'};
$detail->{'TaxMode'} = $parms->{'taxmode'};
my $res = soapCall($OUT,"Purchasing","linkSupplierInvoiceInventoryItem",$detail);
my $res = soapCall($OUT,"wiaflos/server/api/Purchasing","linkSupplierInvoiceInventoryItem",$detail);
if ($res->{'Result'} != RES_OK) {
soapDebug($OUT,$res);
return $res->{'Result'};
......@@ -300,7 +300,7 @@ sub linkExpenseItem
$detail->{'Discount'} = $parms->{'discount'};
$detail->{'TaxTypeID'} = $parms->{'taxtypeid'};
$detail->{'TaxMode'} = $parms->{'taxmode'};
my $res = soapCall($OUT,"Purchasing","linkSupplierInvoiceExpenseItem",