[Openledger-developer] How to handle invoicenumbers?
Brought to you by:
klavs
From: Klavs K. <kl...@vs...> - 2005-02-21 08:09:09
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi guys, Currently SL's way of handling invoicenumbers does NOT work for me. It does not increment as it should and I have no way of defining a specific pattern I'd like (f.ex. $year-incnr, $year$xdigitincnr or $year$month$day$hour$min$sec etc. ). I was thinking that I'd add a function that gives you the next available invoicenumber (ie. whatever invoicenumbering scheme you use - +1 :) and also I'd like to make PostInvoice able to handle this, if the invoicenr. field is left out, it should automatically assign it the next available invoicenr. My reasoning for doing this, is that I currently handle invoicenumbers in my own scripts - and IMHO this is (again :) the responsibility of the accounting system - my scripts should not have to care about that for posting a mere invoice. I think I'll build the "get next invoicenr." function to use a openledger.conf file in which you can define the pattern - to begin with I'll build it to support the sceme I use, which is the $year followed by a 5 digitnr. in my case (ie. any invoicenumber is padded with zero's to always be 5 digits). I'll let the digit amount be defineable ofcourse - probably the printf way. What do you think? Any ideas to implementing it will be welcome - otherwise I'll just think of a way to get it rolling when I get to it :) I was thinking of a $InvoiceNumber variable to be defined in openledger.conf which would simply be used in printf - and any variables given in it, should also (somehow) be chosen from a predefined set in, and defined in openledger.conf. - -- Regards, Klavs Klavsen, GSEC - kl...@vs... - http://www.vsen.dk PGP: 7E063C62/2873 188C 968E 600D D8F8 B8DA 3D3A 0B79 7E06 3C62 "Those who do not understand Unix are condemned to reinvent it, poorly." ~ --Henry Spencer -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFCGZcoPToLeX4GPGIRArfTAJ9Ip5/aRglIdo1g/MpFSU+10kFDjgCfXpy1 KZgsUz6HubzHQ4tvKMuave4= =EoGG -----END PGP SIGNATURE----- |