[Ledger-smb-devel] Math::BigFloat fixes

2011-10-25 Thread Chris Travers
Hi all;

Thanks to the generous assistance from David Bandel, I have been
successful at reproducing the issue with the recent
Math::BigFloat-induced bugs.  I have further been able to correct it
at least in my own instance.

Description of issue:

1.2:  When you try to update an existing transaction or print a sales
invoice you get an error similar to:

menu.pl:92: Can't call method is_zero on an undefined value at
/usr/local/lib/perl5/site_perl/5.12.4/Math/BigInt.pm line 1197

In 1.3:  You get an internal server error after selecting a customer
or vendor for an AR/AP transaction.  The logs reference a similar
error to the above message.

If you are not yet experiencing this error, please avoid updating Perl
dependencies while the fix is fully vetted by those who are currently
facing this issue.  We expect the next versions of both 1.2 and 1.3 to
have this error corrected.

If you are experiencing this error, please update to the latest files
from SVN on your branch.  (branches/1.2 and branches/1.3).  If you are
unable to apply the fix from SVN, please  contact me and we'll see
what we need to do about getting you a snapshot.  Please note that
such an update puts you in between releases, meaning that you are
getting relatively untested bugfixes.  Please put this through some
testing on a test server before putting it into production.

Best Wishes,
Chris Travers

--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel


[Ledger-smb-devel] Proposal: Web Services API

2011-10-25 Thread John Locke
Hi,

Erik and I were just chatting on IRC about web services. I recently
updated our in-house management system to generate new invoices in LSMB,
and it's a pain in the butt to do -- the current process looks like this:

1. Hit the Login page with username/pw, store session cookie
2. Post some minimal detail to is.pl - customer name/entity_credit_id,
part numbers/qty, action=update
3. Parse the response, scrape all the form fields out and merge their
values with the items we want to post -- and in 1.3 make sure to update
form_id to get past the anti-csrf protection
4. Post the resulting data to is.pl with action=post

... and then if we want to also send an email, essentially repeat the
last couple steps to send the email out to the billing address.

It sounds like adding a good web service api would help this project for
at least a few of us -- but probably help get far more wide-spread
adoption.

At Freelock, we do a substantial amount of web services work, both
creating servers and consuming them as clients. I've come to really
favor REST-based, resource-oriented APIs that use HTTP verbs to mean
something. I'd like to propose building a REST interface that can
interact with the data on the server.

Is this something that Moose will get us without much work?

If not, I'd be happy to contribute code to serve this purpose, if I can
find somebody to sponsor the work. And I'll definitely provide feedback
if anyone wants to take this on themselves.


What I'd like to see is basically an API that has a specific URI for
each resource. For example, an invoice #456 might be referenced at:

http://myledgeraddress.com/store/invoice/456

A simple GET on that address would check for authorized access, and then
retrieve the invoice in a form requested by the client. I generally set
up services to accept a content-type header to specify xml, json, html,
csv, etc -- and allow it to be overridden by a parameter in the query
string.

A PUT on that address with an updated object in the body would update
the object, again based on authorization. (I'm thinking to add payment
to an invoice).

A DELETE on that address would delete (almost certainly dis-allowed on
this type of object).

POST is used to create new objects, or do particular data-changing
actions on an object or in the system.

GET would also accept a variety of parameters, providing a built-in
search to get a collection of objects --

GET http://myledgeraddress.com/store/invoice/?eca_id=334open=any
GET
http://myledgeraddress.com/store/customer/?start_date=2011-01-01start_date_oper=gt


For implementation, this should be pretty easy to provide some sort of
request handler and load up the new objects that Chris has created, do
the appropriate changes, and save. The old code is obviously much harder.

Perhaps we can start with the new entities, customers and vendors that
have already been done, and add more of the accounting objects as they
get rewritten?

Cheers,
John Locke
http://www.freelock.com


--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel


Re: [Ledger-smb-devel] Ledger-smb-devel Digest, Vol 58, Issue 21

2011-10-25 Thread Hugh Esco
John:

Yes, that would be me, please.  

Two some years ago I did some preliminary work on:
http://search.cpan.org/~hesco/LedgerSMB-API-0.04a/lib/LedgerSMB/API.pm

And have experience writing RESTful interfaces using Application::REST, 
I think it is.  

Please include me in further discussions on this question.

Thanks,
Hugh Esco 
678-921-8186 x21
he...@campaignfoundations.com

From: ledger-smb-devel-requ...@lists.sourceforge.net
Subject: Ledger-smb-devel Digest, Vol 58, Issue 21
To: ledger-smb-devel@lists.sourceforge.net
Date: Tue, 25 Oct 2011 20:38:20 +


Today's Topics:

   8. Proposal: Web Services API (John Locke)


--

Message: 8
Date: Tue, 25 Oct 2011 13:38:11 -0700
From: John Locke m...@freelock.com
Subject: [Ledger-smb-devel] Proposal: Web Services API
To: Development discussion for LedgerSMB
ledger-smb-devel@lists.sourceforge.net
Message-ID: 4ea71e33.8030...@freelock.com
Content-Type: text/plain; charset=ISO-8859-1

Hi,

Erik and I were just chatting on IRC about web services. I recently
updated our in-house management system to generate new invoices in LSMB,
and it's a pain in the butt to do -- the current process looks like this:

1. Hit the Login page with username/pw, store session cookie
2. Post some minimal detail to is.pl - customer name/entity_credit_id,
part numbers/qty, action=update
3. Parse the response, scrape all the form fields out and merge their
values with the items we want to post -- and in 1.3 make sure to update
form_id to get past the anti-csrf protection
4. Post the resulting data to is.pl with action=post

... and then if we want to also send an email, essentially repeat the
last couple steps to send the email out to the billing address.

It sounds like adding a good web service api would help this project for
at least a few of us -- but probably help get far more wide-spread
adoption.

At Freelock, we do a substantial amount of web services work, both
creating servers and consuming them as clients. I've come to really
favor REST-based, resource-oriented APIs that use HTTP verbs to mean
something. I'd like to propose building a REST interface that can
interact with the data on the server.

Is this something that Moose will get us without much work?

If not, I'd be happy to contribute code to serve this purpose, if I can
find somebody to sponsor the work. And I'll definitely provide feedback
if anyone wants to take this on themselves.


What I'd like to see is basically an API that has a specific URI for
each resource. For example, an invoice #456 might be referenced at:

http://myledgeraddress.com/store/invoice/456

A simple GET on that address would check for authorized access, and then
retrieve the invoice in a form requested by the client. I generally set
up services to accept a content-type header to specify xml, json, html,
csv, etc -- and allow it to be overridden by a parameter in the query
string.

A PUT on that address with an updated object in the body would update
the object, again based on authorization. (I'm thinking to add payment
to an invoice).

A DELETE on that address would delete (almost certainly dis-allowed on
this type of object).

POST is used to create new objects, or do particular data-changing
actions on an object or in the system.

GET would also accept a variety of parameters, providing a built-in
search to get a collection of objects --

GET http://myledgeraddress.com/store/invoice/?eca_id=334open=any
GET
http://myledgeraddress.com/store/customer/?start_date=2011-01-01start_date_oper=gt


For implementation, this should be pretty easy to provide some sort of
request handler and load up the new objects that Chris has created, do
the appropriate changes, and save. The old code is obviously much harder.

Perhaps we can start with the new entities, customers and vendors that
have already been done, and add more of the accounting objects as they
get rewritten?

Cheers,
John Locke
http://www.freelock.com

___
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel

End of Ledger-smb-devel Digest, Vol 58, Issue 21



--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel


Re: [Ledger-smb-devel] Proposal: Web Services API

2011-10-25 Thread Chris Travers
On Tue, Oct 25, 2011 at 3:40 PM, Robert James Clay j...@rocasa.us wrote:
 On Tue, 2011-10-25 at 17:03 -0400, Hugh Esco wrote:
 Two some years ago I did some preliminary work on:
 http://search.cpan.org/~hesco/LedgerSMB-API-0.04a/lib/LedgerSMB/API.pm

 And have experience writing RESTful interfaces using Application::REST,
 I think it is.


     REST::Application, perhaps?  (librest-application-perl in Debian?)

We could go that route too.

Best Wishes,
Chris Travers

--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel