Kjetil Kjernsmo > No-Giro-0.21 > No::Giro

Download:
No-Giro-0.21.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.21   Source  

NAME ^

No::Giro - Perl Module for generating Norwegian bank slips

SYNOPSIS ^

  use No::Giro;
  use PostScript::Simple;
  my $p = new PostScript::Simple(papersize => "A4",
                                 colour => 0,
                                 eps => 0,
                                 units => "mm");
  $p->newpage;
  my $giro = new No::Giro;
  $giro->kid(242345);
  $giro->belop(4534);
  $giro->tilkonto(12345678901);
  $giro->bettil(["Payme", 'Somewhere', '4932 Place']);
  my $e = $giro->eps;
  $p->importeps($e, 0,0);
  $p->output("giro.ps");

DESCRIPTION ^

It provides some methods to enter data into a standard F60-1 GIRO slip. This is an A4 sheet with a standard layout and where data are entered at the bottom and there is some space to enter any information at the top. It returns an Encapsulated Postscript object that can be used in a Postscript document, which again is suitable to be printed.

Data Methods

These are the accessor methods, they serve only the purpose of setting and retrieving the values of the data fields of the object.

These methods have Norwegian-looking names, except for that they are abbreviations and has not Norwegian characters, so I suppose you need to be Norwegian to understand them, or grab someone who is...

belop()

The amount of money to be paid.

frist()

Date payment is due. Currently, it should be a simple string.

betav()

Name and address of the person or institution making the payment. It is an array where each element represents a line. It takes 3-4 lines and does not attempt to check that it is within bounds.

bettil()

Name and address of the person or institution getting the payment. Like above, it is an array where each element representing a line.

betinf()

Payment information. This field can contain comments without any particular semantics. It is an array of strings, where each element represents an array. Each element should not exceed 40 characters, but only a warning is issued if it does.

kid()

The customer identification number, or KID. You need agreements with the banking system to actually use this meaningfully. There are constraints on length of numbers and how they are to be computed. Contact your bank for details if you plan to use this.

tilkonto()

The account number to be credited.

betkonto()

The account number of the payer.

belkonto()

Does nothing.

kvittering()

Does nothing.

Other Methods

new()

The constructor of this class.

eps

This method uses whatever data that has been previously set by the data methods, and puts them in appropriate positions, and returns a PostScript::Simple::EPS object. You may then use this object to import in a PostScript::Simple document, save it to a file or whatever. Just remember that it has to be imported at the very bottom of the an A4 page.

BUGS/TODO ^

This is an early release, mostly thrown together to meet the needs of the author. As is seen from the method documentation, it has methods to set all sensible fields, but not all of them are implemented to print anything. The fields that are unimplemented in this release are both something that very few issuers of these slips would ever need to do, and this module addresses their concerns mainly.

The standard strongly recommends the use of the ISO OCR B font for the fields that are to be OCRed, allthough Courier is also supported. I haven't got OCRB to work, even on a machine that has it, so for now, Courier-iso has been hardcoded as the font to use.

Internally, I have noted some problems with the measuring units, but right now it "works for me" and I have little time to grok the problem.

The module could also do some checking that KID and account numbers are valid, that's also a TODO.

I should probably have read the fine specifications for this stuff, but it is not quite clear to me what applies... Pointers are appreciated.

For other issues, please use the CPAN Request Tracker to report bugs.

SEE ALSO ^

PostScript::Simple, No::OCRData.

AUTHOR ^

Kjetil Kjernsmo, kjetilk@cpan.org. You may use English or Norwegian if you write me about this module.

COPYRIGHT AND LICENSE ^

Copyright (C) 2004 by Kjetil Kjernsmo

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: