Commit fd624e95 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Project name change

parent a5fbf96e
......@@ -3,13 +3,13 @@ Linux Installation Notes
1. Use database/schema.sql to initialize your database
2. Create ias-acc configuration file ~/.ias-acc
2. Create configuration file ~/.wiaflos
***
# The top directory of IAS Acc
Lib=/home/joesoap/ias-acc
# The top directory of Wiaflos
Lib=/home/joesoap/wiaflos
# Database details used to access the IAS Acc database
DBDSN=DBI:mysql:database=iasacc;host=localhost
# Database details used to access the Wiaflos database
DBDSN=DBI:mysql:database=wiaflos;host=localhost
DBUser=root
DBPass=
......@@ -30,14 +30,14 @@ Invoice_Template=../contrib/invoices/invoice1.tmpl
4. Run the admin interface in another terminal
# ./iasacc
# ./wiaflos
5. Connect to server in the admin interface
/> connect admin password
6. Load the basic set of accounts
/> load file="contrib/books/10-basic.iasacc"
/> load file="contrib/books/10-basic.wiaflos"
7. Type "help" at anytime to get help, or "help <command>"
......
......@@ -11,7 +11,7 @@ use strict;
use lib qw(../);
use Auth;
use ias::server::Clients qw();
use wiaflos::server::Clients qw();
# Ping to see if we still working
......@@ -38,7 +38,7 @@ sub getClient {
$detail->{'ClientRef'} = $data->{'ClientRef'};
# Grab and sanitize data
my $rawData = ias::server::Clients::getClient($detail);
my $rawData = wiaflos::server::Clients::getClient($detail);
if (ref $rawData ne "HASH") {
return -1;
}
......@@ -70,7 +70,7 @@ sub getClients {
my $authInfo = getAuthData();
# Grab and sanitize data
my $rawData = ias::server::Clients::getClients();;
my $rawData = wiaflos::server::Clients::getClients();;
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -139,7 +139,7 @@ sub createClient {
$detail->{'RegNumber'} = $data->{'RegNumber'};
$detail->{'TaxReference'} = $data->{'TaxReference'};
$detail->{'CreateSubAcc'} = $data->{'CreateSubAcc'};
my $res = ias::server::Clients::createClient($detail);
my $res = wiaflos::server::Clients::createClient($detail);
return $res;
}
......@@ -180,7 +180,7 @@ sub linkAddress {
$detail->{'ClientRef'} = $data->{'ClientRef'};
$detail->{'Type'} = $data->{'Type'};
$detail->{'Address'} = $data->{'Address'};
my $res = ias::server::Clients::linkAddress($detail);
my $res = wiaflos::server::Clients::linkAddress($detail);
return $res;
}
......@@ -221,7 +221,7 @@ sub linkEmailAddress {
$detail->{'ClientRef'} = $data->{'ClientRef'};
$detail->{'Type'} = $data->{'Type'};
$detail->{'Address'} = $data->{'Address'};
my $res = ias::server::Clients::linkEmailAddress($detail);
my $res = wiaflos::server::Clients::linkEmailAddress($detail);
return $res;
}
......@@ -265,7 +265,7 @@ sub linkPhoneNumber {
$detail->{'Type'} = $data->{'Type'};
$detail->{'PhNumber'} = $data->{'PhNumber'};
$detail->{'Name'} = $data->{'Name'};
my $res = ias::server::Clients::linkPhoneNumber($detail);
my $res = wiaflos::server::Clients::linkPhoneNumber($detail);
return $res;
}
......@@ -288,7 +288,7 @@ sub getAddresses {
$detail->{'ClientID'} = $data->{'ClientID'};
# Grab and sanitize data
my $rawData = ias::server::Clients::getAddresses($detail);
my $rawData = wiaflos::server::Clients::getAddresses($detail);
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -326,7 +326,7 @@ sub getEmailAddresses {
$detail->{'ClientID'} = $data->{'ClientID'};
# Grab and sanitize data
my $rawData = ias::server::Clients::getEmailAddresses($detail);
my $rawData = wiaflos::server::Clients::getEmailAddresses($detail);
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -364,7 +364,7 @@ sub getPhoneNumbers {
$detail->{'ClientID'} = $data->{'ClientID'};
# Grab and sanitize data
my $rawData = ias::server::Clients::getPhoneNumbers($detail);
my $rawData = wiaflos::server::Clients::getPhoneNumbers($detail);
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -408,7 +408,7 @@ sub removeClient {
# Do transaction
my $detail;
$detail->{'ClientRef'} = $data->{'ClientRef'};
my $res = ias::server::Clients::removeClient($detail);
my $res = wiaflos::server::Clients::removeClient($detail);
return $res;
}
......
......@@ -11,7 +11,7 @@ use strict;
use lib qw(../);
use Auth;
use ias::server::Engine qw();
use wiaflos::server::Engine qw();
# Ping to see if we still working
......
......@@ -11,7 +11,7 @@ use strict;
use lib qw(../);
use Auth;
use ias::server::GL qw();
use wiaflos::server::GL qw();
# Ping to see if we still working
......@@ -32,7 +32,7 @@ sub getAccounts {
my $authInfo = getAuthData();
# Grab and sanitize data
my $rawData = ias::server::GL::getAccounts();
my $rawData = wiaflos::server::GL::getAccounts();
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -66,7 +66,7 @@ sub getTransactions {
my $authInfo = getAuthData();
# Grab and sanitize data
my $rawData = ias::server::GL::getTransactions();
my $rawData = wiaflos::server::GL::getTransactions();
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -115,7 +115,7 @@ sub createTransaction {
my $detail;
$detail->{'Date'} = $data->{'Date'};
$detail->{'Ref'} = $data->{'Ref'};
my $res = ias::server::GL::createTransaction($detail);
my $res = wiaflos::server::GL::createTransaction($detail);
return $res;
}
......@@ -156,7 +156,7 @@ sub linkTransaction {
$detail->{'GLAccRef'} = $data->{'GLAccRef'};
$detail->{'Amount'} = $data->{'Amount'};
$detail->{'Ref'} = $data->{'Ref'};
my $res = ias::server::GL::linkTransactionByAccRef($detail);
my $res = wiaflos::server::GL::linkTransactionByAccRef($detail);
return $res;
}
......@@ -183,7 +183,7 @@ sub postTransaction {
# Do transaction
my $detail;
$detail->{'GLTransActID'} = $data->{'GLTransActID'};
my $res = ias::server::GL::postTransaction($detail);
my $res = wiaflos::server::GL::postTransaction($detail);
return $res;
}
......@@ -210,7 +210,7 @@ sub removeTransaction {
# Do transaction
my $detail;
$detail->{'GLTransActID'} = $data->{'GLTransActID'};
my $res = ias::server::GL::removeTransaction($detail);
my $res = wiaflos::server::GL::removeTransaction($detail);
return $res;
}
......@@ -237,7 +237,7 @@ sub getTransactionEntries {
# Grab and sanitize data
my $detail;
$detail->{'GLTransActID'} = $data->{'GLTransActID'};
my $rawData = ias::server::GL::getTransactionEntries($detail);
my $rawData = wiaflos::server::GL::getTransactionEntries($detail);
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -283,7 +283,7 @@ sub getAccountEntries {
# Grab and sanitize data
my $detail;
$detail->{'GLAccRef'} = $data->{'GLAccRef'};
my $rawData = ias::server::GL::getAccountEntries($detail);
my $rawData = wiaflos::server::GL::getAccountEntries($detail);
if (ref $rawData ne "ARRAY") {
return $rawData;
}
......@@ -349,7 +349,7 @@ sub createAccount {
$detail->{'FinCat'} = $data->{'FinCat'};
$detail->{'RwCat'} = $data->{'RwCat'};
$detail->{'ParentGLAcc'} = $data->{'ParentGLAcc'};
my $res = ias::server::GL::createAccount($detail);
my $res = wiaflos::server::GL::createAccount($detail);
return $res;
}
......
......@@ -11,7 +11,7 @@ use strict;
use lib qw(../);
use Auth;
use ias::server::Inventory qw();
use wiaflos::server::Inventory qw();
# Ping to see if we still working
......@@ -33,11 +33,11 @@ sub sanitizeRawItem {
$tmpItem->{'Mode'} = $rawItem->{'Mode'};
$tmpItem->{'Description'} = $rawItem->{'Description'};
$tmpItem->{'IncomeGLAccID'} = $rawItem->{'IncomeGLAccID'};
$tmpItem->{'IncomeGLAccRef'} = ias::server::GL::getAccRef($rawItem->{'IncomeGLAccID'});
$tmpItem->{'IncomeGLAccRef'} = wiaflos::server::GL::getAccRef($rawItem->{'IncomeGLAccID'});
$tmpItem->{'InventoryGLAccID'} = $rawItem->{'InventoryGLAccID'};
$tmpItem->{'InventoryGLAccRef'} = ias::server::GL::getAccRef($rawItem->{'InventoryGLAccID'});
$tmpItem->{'InventoryGLAccRef'} = wiaflos::server::GL::getAccRef($rawItem->{'InventoryGLAccID'});
$tmpItem->{'ExpenseGLAccID'} = $rawItem->{'ExpenseGLAccID'};
$tmpItem->{'ExpenseGLAccRef'} = ias::server::GL::getAccRef($rawItem->{'ExpenseGLAccID'});
$tmpItem->{'ExpenseGLAccRef'} = wiaflos::server::GL::getAccRef($rawItem->{'ExpenseGLAccID'});
$tmpItem->{'AvgCostPrice'} = $rawItem->{'AvgCostPrice'};
$tmpItem->{'SellPrice'} = $rawItem->{'SellPrice'};
$tmpItem->{'TaxTypeID'} = $rawItem->{'TaxTypeID'};
......@@ -59,7 +59,7 @@ sub getInventory {
my $authInfo = getAuthData();
# Grab and sanitize data
my $rawData = ias::server::Inventory::getInventory();
my $rawData = wiaflos::server::Inventory::getInventory();
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -161,7 +161,7 @@ sub createItem {
$detail->{'TaxMode'} = $data->{'TaxMode'};
$detail->{'Unit'} = $data->{'Unit'};
$detail->{'Discountable'} = $data->{'Discountable'};
my $res = ias::server::Inventory::createItem($detail);
my $res = wiaflos::server::Inventory::createItem($detail);
return $res;
}
......@@ -188,7 +188,7 @@ sub removeItem {
# Remove item
my $detail;
$detail->{'ItemRef'} = $data->{'ItemRef'};
my $res = ias::server::Inventory::removeItem($detail);
my $res = wiaflos::server::Inventory::removeItem($detail);
return $res;
}
......
......@@ -11,7 +11,7 @@ use strict;
use lib qw(../);
use Auth;
use ias::server::Invoicing qw();
use wiaflos::server::Invoicing qw();
# Ping to see if we still working
......@@ -31,7 +31,7 @@ sub getInvoices {
my $authInfo = getAuthData();
# Grab and sanitize data
my $rawData = ias::server::Invoicing::getInvoices();
my $rawData = wiaflos::server::Invoicing::getInvoices();
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -84,7 +84,7 @@ sub getInvoice {
# Grab and sanitize data
my $detail;
$detail->{'InvoiceRef'} = $data->{'InvoiceRef'};
my $rawData = ias::server::Invoicing::getInvoice($detail);
my $rawData = wiaflos::server::Invoicing::getInvoice($detail);
if (ref $rawData ne "HASH") {
return -1;
}
......@@ -135,7 +135,7 @@ sub getInvoiceItems {
# Grab and sanitize data
my $detail;
$detail->{'InvoiceRef'} = $data->{'InvoiceRef'};
my $rawData = ias::server::Invoicing::getInvoiceItems($detail);
my $rawData = wiaflos::server::Invoicing::getInvoiceItems($detail);
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -212,7 +212,7 @@ sub createInvoice {
$detail->{'IssueDate'} = $data->{'IssueDate'};
$detail->{'DueDate'} = $data->{'DueDate'};
$detail->{'OrderNumber'} = $data->{'OrderNumber'};
my $res = ias::server::Invoicing::createInvoice($detail);
my $res = wiaflos::server::Invoicing::createInvoice($detail);
return $res;
}
......@@ -257,7 +257,7 @@ sub linkInventoryItem {
$detail->{'Quantity'} = $data->{'Quantity'};
$detail->{'Discount'} = $data->{'Discount'};
$detail->{'UnitPrice'} = $data->{'UnitPrice'};
my $res = ias::server::Invoicing::linkItem($detail);
my $res = wiaflos::server::Invoicing::linkItem($detail);
return $res;
}
......@@ -285,7 +285,7 @@ sub postInvoice {
# Grab and sanitize data
my $detail;
$detail->{'InvoiceRef'} = $data->{'InvoiceRef'};
my $res = ias::server::Invoicing::postInvoice($detail);
my $res = wiaflos::server::Invoicing::postInvoice($detail);
return $res;
}
......@@ -317,7 +317,7 @@ sub buildInvoice {
my $detail;
$detail->{'InvoiceRef'} = $data->{'InvoiceRef'};
$detail->{'WriteTo'} = $data->{'WriteTo'};
my $res = ias::server::Invoicing::buildInvoice($detail);
my $res = wiaflos::server::Invoicing::buildInvoice($detail);
return $res;
}
......
......@@ -11,7 +11,7 @@ use strict;
use lib qw(../);
use Auth;
use ias::server::Purchasing qw();
use wiaflos::server::Purchasing qw();
# Ping to see if we still working
......@@ -31,7 +31,7 @@ sub getInvoices {
my $authInfo = getAuthData();
# Grab and sanitize data
my $rawData = ias::server::Purchasing::getInvoices();
my $rawData = wiaflos::server::Purchasing::getInvoices();
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -86,7 +86,7 @@ sub getInvoice {
# Grab and sanitize data
my $detail;
$detail->{'SupplierInvoiceRef'} = $data->{'SupplierInvoiceRef'};
my $rawData = ias::server::Purchasing::getInvoice($detail);
my $rawData = wiaflos::server::Purchasing::getInvoice($detail);
if (ref $rawData ne "HASH") {
return -1;
}
......@@ -136,7 +136,7 @@ sub getInvoiceItems {
# Grab and sanitize data
my $detail;
$detail->{'SupplierInvoiceRef'} = $data->{'SupplierInvoiceRef'};
my $rawData = ias::server::Purchasing::getInvoiceItems($detail);
my $rawData = wiaflos::server::Purchasing::getInvoiceItems($detail);
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -223,7 +223,7 @@ sub createInvoice {
$detail->{'OrderNumber'} = $data->{'OrderNumber'};
$detail->{'Note'} = $data->{'Note'};
my $res = ias::server::Purchasing::createInvoice($detail);
my $res = wiaflos::server::Purchasing::createInvoice($detail);
return $res;
}
......@@ -289,7 +289,7 @@ sub linkInventoryItem {
$detail->{'Discount'} = $data->{'Discount'};
$detail->{'TaxTypeID'} = $data->{'TaxTypeID'};
$detail->{'TaxMode'} = $data->{'TaxMode'};
my $res = ias::server::Purchasing::linkItem($detail);
my $res = wiaflos::server::Purchasing::linkItem($detail);
return $res;
}
......@@ -354,7 +354,7 @@ sub linkExpenseItem {
$detail->{'Discount'} = $data->{'Discount'};
$detail->{'TaxTypeID'} = $data->{'TaxTypeID'};
$detail->{'TaxMode'} = $data->{'TaxMode'};
my $res = ias::server::Purchasing::linkItem($detail);
my $res = wiaflos::server::Purchasing::linkItem($detail);
return $res;
}
......@@ -382,7 +382,7 @@ sub postInvoice {
# Grab and sanitize data
my $detail;
$detail->{'SupplierInvoiceRef'} = $data->{'SupplierInvoiceRef'};
my $res = ias::server::Purchasing::postInvoice($detail);
my $res = wiaflos::server::Purchasing::postInvoice($detail);
return $res;
}
......
......@@ -11,7 +11,7 @@ use strict;
use lib qw(../);
use Auth;
use ias::server::Suppliers qw();
use wiaflos::server::Suppliers qw();
# Ping to see if we still working
......@@ -42,7 +42,7 @@ sub getSupplier {
$detail->{'SupplierRef'} = $data->{'SupplierRef'};
# Grab and sanitize data
my $rawData = ias::server::Suppliers::getSupplier($detail);
my $rawData = wiaflos::server::Suppliers::getSupplier($detail);
if (ref $rawData ne "HASH") {
return -1;
}
......@@ -74,7 +74,7 @@ sub getSuppliers {
my $authInfo = getAuthData();
# Grab and sanitize data
my $rawData = ias::server::Suppliers::getSuppliers();;
my $rawData = wiaflos::server::Suppliers::getSuppliers();;
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -143,7 +143,7 @@ sub createSupplier {
$detail->{'RegNumber'} = $data->{'RegNumber'};
$detail->{'TaxReference'} = $data->{'TaxReference'};
$detail->{'CreateSubAcc'} = $data->{'CreateSubAcc'};
my $res = ias::server::Suppliers::createSupplier($detail);
my $res = wiaflos::server::Suppliers::createSupplier($detail);
return $res;
}
......@@ -184,7 +184,7 @@ sub linkAddress {
$detail->{'SupplierRef'} = $data->{'SupplierRef'};
$detail->{'Type'} = $data->{'Type'};
$detail->{'Address'} = $data->{'Address'};
my $res = ias::server::Suppliers::linkAddress($detail);
my $res = wiaflos::server::Suppliers::linkAddress($detail);
return $res;
}
......@@ -225,7 +225,7 @@ sub linkEmailAddress {
$detail->{'SupplierRef'} = $data->{'SupplierRef'};
$detail->{'Type'} = $data->{'Type'};
$detail->{'Address'} = $data->{'Address'};
my $res = ias::server::Suppliers::linkEmailAddress($detail);
my $res = wiaflos::server::Suppliers::linkEmailAddress($detail);
return $res;
}
......@@ -269,7 +269,7 @@ sub linkPhoneNumber {
$detail->{'Type'} = $data->{'Type'};
$detail->{'PhNumber'} = $data->{'PhNumber'};
$detail->{'Name'} = $data->{'Name'};
my $res = ias::server::Suppliers::linkPhoneNumber($detail);
my $res = wiaflos::server::Suppliers::linkPhoneNumber($detail);
return $res;
}
......@@ -295,7 +295,7 @@ sub getAddresses {
my $authInfo = getAuthData();
# Grab and sanitize data
my $rawData = ias::server::Suppliers::getAddresses($data);
my $rawData = wiaflos::server::Suppliers::getAddresses($data);
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -336,7 +336,7 @@ sub getEmailAddresses {
my $authInfo = getAuthData();
# Grab and sanitize data
my $rawData = ias::server::Suppliers::getEmailAddresses($data);
my $rawData = wiaflos::server::Suppliers::getEmailAddresses($data);
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -377,7 +377,7 @@ sub getPhoneNumbers {
my $authInfo = getAuthData();
# Grab and sanitize data
my $rawData = ias::server::Suppliers::getPhoneNumbers($data);
my $rawData = wiaflos::server::Suppliers::getPhoneNumbers($data);
if (ref $rawData ne "ARRAY") {
return -1;
}
......@@ -421,7 +421,7 @@ sub removeSupplier {
# Do transaction
my $detail;
$detail->{'SupplierRef'} = $data->{'SupplierRef'};
my $res = ias::server::Suppliers::removeSupplier($detail);
my $res = wiaflos::server::Suppliers::removeSupplier($detail);
return $res;
}
......
......@@ -11,7 +11,7 @@ use strict;
use lib qw(../);
use Auth;
use ias::server::Tax qw();
use wiaflos::server::Tax qw();
# Ping to see if we still working
......@@ -55,7 +55,7 @@ sub createType {
$detail->{'Desc'} = $data->{'Desc'};
$detail->{'GLAcc'} = $data->{'GLAcc'};
$detail->{'Rate'} = $data->{'Rate'};
my $res = ias::server::Tax::createType($detail);
my $res = wiaflos::server::Tax::createType($detail);
return $res;
}
......
#!/usr/bin/perl -w
# Author: Nigel Kukard <nkukard@lbsd.net>
# Date: 06/09/2005
# Desc: IAS Accounting SOAP server
# Desc: Wiaflos Accounting SOAP server
# License: GPL
use strict;
......@@ -18,19 +18,19 @@ require "http_transport.pm";
use Auth;
# Other stuff
use ias::version;
use ias::server::config;
use ias::server::dblayer;
use ias::server::users qw(User_auth);
use wiaflos::version;
use wiaflos::server::config;
use wiaflos::server::dblayer;
use wiaflos::server::users qw(User_auth);
# Pull in HTTP transport
use SOAP::Transport::HTTP;
print("IAS Accounting - SOAP Engine v$VERSION, Copyright (c) 2006-2007 LinuxRulz\n");
print("Wiaflos Accounting - SOAP Engine v$VERSION, Copyright (c) 2006-2007 LinuxRulz\n");
# Connect
if (!DBConnect()) {
print(STDERR ias::server::dblayer::Error()."\n");
print(STDERR wiaflos::server::dblayer::Error()."\n");
exit 1;
}
......@@ -198,7 +198,7 @@ sub authenticate {
$res = 0;
} else {
print(STDERR "User Auth: Failed for \"".$info->{'username'}."\" with error ".ias::server::users::Error().".\n");
print(STDERR "User Auth: Failed for \"".$info->{'username'}."\" with error ".wiaflos::server::users::Error().".\n");
}
# Authorize soap test
......
......@@ -5,7 +5,7 @@
package ias::client::cmdline;
package wiaflos::client::cmdline;
use strict;
......@@ -18,16 +18,16 @@ our (@ISA,@EXPORT);
);
use ias::client::config;
use ias::client::soap;
use ias::client::misc;
use ias::client::cmdline::GL;
use ias::client::cmdline::Inventory;
use ias::client::cmdline::Suppliers;
use ias::client::cmdline::Purchasing;
use ias::client::cmdline::Clients;
use ias::client::cmdline::Invoicing;
use ias::client::cmdline::Tax;
use wiaflos::client::config;
use wiaflos::client::soap;
use wiaflos::client::misc;
use wiaflos::client::cmdline::GL;
use wiaflos::client::cmdline::Inventory;
use wiaflos::client::cmdline::Suppliers;
use wiaflos::client::cmdline::Purchasing;
use wiaflos::client::cmdline::Clients;
use wiaflos::client::cmdline::Invoicing;
use wiaflos::client::cmdline::Tax;
use SOAP::Lite;
......@@ -51,42 +51,42 @@ my $GL_trans_cmds = {
'regex' => 'create',
'desc' => 'Create transaction',
'help' => 'create date="<YYYY-MM-DD>" ref="<reference>"',
'function' => \&ias::client::cmdline::GL::createTransaction,
'function' => \&wiaflos::client::cmdline::GL::createTransaction,
},
{
'command' => 'list',
'regex' => 'list$',
'desc' => 'List transactions',
'help' => 'list',
'function' => \&ias::client::cmdline::GL::listTransactions,
'function' => \&wiaflos::client::cmdline::GL::listTransactions,
},
{
'command' => 'link',
'regex' => 'link',