[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [LedgerSMB] Financial rewrite: Journal and Ledger Design (#562)





On Fri, Nov 28, 2014 at 5:21 AM, Erik Huelsmann <..hidden..> wrote:
Hi Chris,


On github you filed the issue below (https://github.com/ledgersmb/LedgerSMB/issues/562):

Planning the following regarding the journal design and rewrite:

Database tables:

  • journal (stores journal identifiers, not journal entries, i.e, general journal, sales journal etc).
  • journal_entry (stores journal entry data)
  • journal_line (stores journal entry line items)
As we have developed a strong tradition in designing a functional interface to the database, I'd love to see some of that here as well. 

The GL section is likely to test capabilities there.  Due to the complexity of the data, our existing service locators aren't sufficient.  I have new ones on CPAN, but they are relatively untested.  I will add this to the description but my plan is listed below. 

Also, I don't see any tables related to currencies. Does that mean you're leaving that question out of the scope of this part? Or are currencies embedded in the GL lines (and you left out the tables for the default values?).

I want to get the currency rewrite done before I design the db side here.  Not reconsidering scope. 

Can we proceed with this rewrite without touching reporting units?

Yep.

As for the functional interface, my plan is to move from the simple mappings we have to one where we are passing the entire journal entry in as a composite type.

The idea is that we will have a composite type called gen_journal_entry  (or maybe this willb e journal_entry and the journal_entry table will be renamed to journal_entry_head).

We would then have a couple of functions:

jounral_entry__get(in_id int);  returns a gen_journal_entry (simple mapping)
save(self gen_journal_entry); takes a gen_journal_entry and saves it (composite type mapping).


 

URL namespaces:

  • .../journal/general/entry/new/ (get a form for a new entry)
  • .../journal/general/entry/:id (show an entry by id, as a report)
  • .../journal/general/entry/:id.{html/json/xml/csv/pdf} (show entry with format shown)
  • .../ledger/general/:accno[.ext]?date_from=...&date_to=... General ledger for account
  • .../journal/search/... (current gl/search report)
This seems mostly concerned with GET requests? If so, could you quickly outline the effects and URLs for PUT, POST and DELETE? OTOH, maybe you can just refer me to documentation stating how they're usually handled, if you think we can use a standard approach.

Right,  I think for posting, one would put new.js/xml/html or  post to the id to approve.  However, since this is mostly append-only, I can't think of more than that.

--
Bye,

Erik.

http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.



--
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor lock-in.
http://www.efficito.com/learn_more
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-devel mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel