CF Partner Supports Integration of Commerce and Accounting

Today, a first release candidate for LedgerSMB-API was posted to the Comprehensive Perl Archive Network. Early this coming week, it is expected to be also released on SourceForge. This new module is intended to support the work of developers who seek to integrate online commerce applications with a full featured accounting system.

As a part of all of its hosting packages, CampaignFoundations.com has offered since its inception, SQL-Ledger, a double-entry GAAP compliant accounting system made available to support campaign treasurers. LedgerSMB recently forked from this mature application and has attracted several experienced developers to the project as a result. CampaignFoundations.com has plans to install new clients on and migrate existing clients to an installation of the forked application.

CampaignFoundations.com founding partner Hugh Esco has been one of the two principal developers working to make LedgerSMB::API available to integrators. "Integrating our donor forms and the ecommerce applications used by our client campaigns for campaign merchandising has long been on our to-do list," said Esco, who has previously shared his Perl coding skills with the public under open source licensing. LedgerSMB::API represents his fifth contribution to the open source CPAN library. Each of his contributions were developed to serve the needs of Green Parties and their campaigns, but offer benefits to far broader audiences. "This past year we finally added to our supporters.cgi application (which provides donor forms) the ability to register an Instant Payment Notification. The obvious next step is to post those donations straight to the campaign books, relieving overworked volunteer campaign treasurers of those bookkeeping duties."

In his previous contributions to CPAN Esco has released under the Gnu Public License, the following modules:

* Test::MonitoSites written under contract to the Green Party of Canada.

* GD::Graph::Thermometer written to be integrated with supporters.cgi for the McKinney 2006 Congressional Campaign Debt Retirement effort, prior to the launch of her bid for the 2008 Green Party Presidential Nomination.

* Business::CCProcessor to provide for safely handing off a donor transaction to a secure server, prior to the collection of confidential financial data.

* Config::Simple::Extended to add additional features to a popular application configuration module. So far this module offers two additional features over Config::Simple which have become indispensible to custom development being done by CampaignFoundations, including the ability to choose a configuration based on the incoming url, and the ability to inherit a configuration, overwriting job configurations on top of client and server wide configurations.

"Long range, we hope that CampaignFoundations.com can also extend our accounting system on the other side to integrate directly with FECFile, to provide for the seemless production of Federal Campaign Finance Reports," said Esco. "We also want to create new custom reports to make disclosure compliance with state and local campaign finance laws less tedious for the campaigns we support. We're working to build a toolkit to support often underfunded Green candidates and their campaigns."

-- 30 --

The complete text of today's announcement follows:

LedgerSMB::API News:

In a collaboration initiated between Nigel Titley and Hugh Esco -- but open to others, operating under a SourceForge project as LedgerSMB-OSCommerce, but with an expanded focus of supporting developers seeking to integrate LedgerSMB generically with other applications which have a need to post transactions to or pull reports from an accounting database.

You may get your copy using your cpan> prompt, or download it from the sourceforge or CPAN websites at these links:

https://sourceforge.net/projects/ledgersmb-oscom/
http://search.cpan.org/~hesco/LedgerSMB-API-0.04a/

As initiating co-conspirators we've agreed to make this work available under the GPL inviting your collaboration in making this a trully useful tool. For now, we offer this, our first humble alpha release, at version 0.04a, nicknamed: Caveat Emptor.

Developers are urged to TEST this module against a TEST database. Testers are urged NOT TO DEPLOY this code against a production copy of clients accounting databases, without further testing of all your customary interactions, from posting orders, invoices, payments, through reports, book closing and review of audit data. There is much left to test and we are developers, Not Accountants, and certainly not developers who have any sort of firm grasp on LedgerSMB/ SQL-Ledger's programming interface.

We are only developers who simply seek to expose LedgerSMB's API in a usable way, as we come to understand it.

As we complete this initial layer, we hope that others will step forward to develop:

LedgerSMB::API::OSCommerce,
LedgerSMB::API::XAO,
LedgerSMB::API::ZenCart,
LedgerSMB::API::AgoraCart,

plus
LedgerSMB::API::YourFavorite

and of course
LedgerSMB::API::YourCustomApplication.

So, CAVEAT EMPTOR:

You are encouraged to access with your browser the administrative interface of your LedgerSMB installation, to create and populate a new database, perhaps lsmb_api_test, and create a new user, lsmb_api_test, with privileges on that database. The tests have been written against the chart of accounts provided by the US_Service_Company database template.

Full instructions are available in the INSTALL file, and are summarized for the installer by running the Makefile.PL script.

If you like the initial tests, you might then consider using pgdump to backup a production accounting database, then as your postgres user, the psql command to restore that data to your lsmb_api_test database, after you have DROP'd and re-CREATE'd it.

So, what's it do, you ask?

So far, the following routines seems to be passing rudimentary automated and eyeball-on-browser tests.

new_lsmb()
create_new_vendor()
id_existing_vendor()
create_new_customer()
id_existing_customer()
create_new_part()
create_new_purchase_order()
generate_invoice_from_purchase_order()
post_payment_to_ap_invoice()
create_new_sales_order()

This routine is partially working and the nature of the known bug is recorded in perldoc.

create_new_assembly()

These routines are priority for the current developers, but of course, others are encouraged to contribute code and documentation to help with these or to scratch their own known itches.

generate_invoice_from_sales_order()
post_payment_to_ar_invoice()
generate_account_statement()

Feedback, comments, use cases, bug reports, tests for bugs, patches, new code, new or revised perldoc, inspiration, development sponsorship and other paying work from those who find this module useful are welcomed and encouraged. This is a work in progress. Help us do the work which makes for the progress.

Submitted by hesco on Mon, 2009-02-09 03:29.