[Kde-finance-apps] Query methods for Alkimia Database Class

Klaas Freitag freitag at kde.org
Thu Jun 17 17:45:05 CEST 2010


Hi Mukesh,
> 
> I have written some initial code of the Database class which will handle
> all Sqlite database related operations for the alkimia Dbus service.
> The initial code contains methods for inserting and updating a record in
> the database.
Great. Does that mean that we do not use Akonadi now but a Sqlite DB? 

> Now i need a help regarding the possible query methods.The available fields
> are transaction id,source application name,memo,amount,status and date.
Please also add a "ident number" or "document id" which is important for 
identifying invoices for example. Also you probably want to add the currency.

What we discussed on the sprint was also that the amount could be split up
to a net amount and a list of tax amounts, but I am not really sure about
that. Maybe Thomas can help.

For invoices we also wanted to store a DueDate to implement scheduling of 
payment reminders.

> Also tell me what are the other methods that could become a part of the
> code.
AFAIR we were mentioning the following methods as part as the interface 
that your code should offer to the applications via DBUS:

registerTransactions: general method to register transactions 

registerInvoice: high level method to register a sent out invoice
registerExpense: register expense
registerPayment: register incoming payment

basically all these methods take the parameters listed above.

What I do not know is how we realise the list of valid transactions for
the registerTransactions method. Are we all ok to maintain a list of 
transactions in Alkimia? 

For queries, I can think of these query interface methods:

to get all bookings against a specific transaction or a list of:
  queryTransaction( transactionID ) 
  queryTransactions( TransactionList )

to query bookings within a timeframe:
  queryTransactionBookings( fromDate, toDate )
  queryExpenses( fromDate, toDate )
  queryPayments( fromDate, toDate )

and some high level methods like
  queryExpectedPayments
  queryPaymentStatus( document identifier ) 
  
Just a few ideas, I am sure the others have more ideas,

Klaas


More information about the Kde-finance-apps mailing list