Kimai Forum
Kimai - Time Tracking Community
September 09, 2010, 09:59:29 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Kimai v 0.9.0.1082 final ready for download
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Invoice Extension, Variable "Order Number" in Kimai ?  (Read 234 times)
benjicux
Kimai Newbie
*
Posts: 3


View Profile
« on: February 21, 2010, 04:29:46 PM »

Hello,

the invoice template file has a variable "var.order". The print.php file shows that this order number
is fixed to 05123456.
Is this right so far ?

Is it planned to establish an order number to kimai or do I have to add such a field by myself to
let the invoice extension read the order number from the database to activate order / customer
numbers for use in the invoice ?

Thanks for your help.
Best regards
Benjamin
Logged
ServiusHack
Global Moderator
Kimai Guru
*****
Posts: 612


View Profile
« Reply #1 on: February 23, 2010, 10:41:13 PM »

Hi Benjamin,

the invoice template file has a variable "var.order". The print.php file shows that this order number
is fixed to 05123456.
Is this right so far ?
Yes, that's right.

The invoice extension should be called beta, as there are minor things like that and after all it only works with PDO, not with a native MySQL connection.

Is it planned to establish an order number to kimai or do I have to add such a field by myself to
let the invoice extension read the order number from the database to activate order / customer
numbers for use in the invoice ?
I'm currently not planning to work on this extension. But perhaps I will add a field so you can set the order number. If you implement something like this I would be happy to see it and perhaps add it to the official version.

Best Regards,
Severin Leonhardt
Logged
lang
Kimai Member
*
Posts: 5


View Profile
« Reply #2 on: February 25, 2010, 12:10:11 AM »

I've actually done quite a bit of customizing this extension for my own purposes. I'll go through and try to make it a little more generic and then upload what I've done. I'll warn you, though: I'm not a developer, I'm a mechanical engineer turned patent management consultant, so my code is probably infuriating to real developers.

For the Invoice Number, I simply made a concatenated string using the customer name and date elements. So for example, a January 2010 invoice for customer Acme has an invoice number of "Acme-10-01." Since I only send one invoice per client, per month, this works for my purposes. It would seem that making a sequential number would require adding a DB table, which I've avoided so far in making changes to this extension.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF | Simple Machines LLC