The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Finance::Bank::NL::CLIEOP03 - Generate CLIEOP03 files for Dutch banks.

SYNOPSIS

 use Finance::Bank::NL::CLIEOP03;

 $c = Finance::Bank::NL::CLIEOP03->new;

 $batch = $c->batch (
   account => '1234567',
   sender_name => 'My Company',
   type => Finance::Bank::NL::CLIEOP03::T_INCASSI
 );

 $batch->add (
   amount => 25,
   account_number => '1234567',
   account_name => 'Ms. Example',
   description => 'Taking your money'
 );

 $c->write ( 'CLIEOP03' );

DESCRIPTION

This module allows for easy creation of CLIEOP03 batch transaction files which can be processed by Dutch banks. CLIEOP03 files can be used for automatic debiting ("automatische incasso") or batch transfers ("verzamelgiro"). You must have a business bank account and (usually) an additional agreement with your bank for using this.

DISCLAIMER

This module is provided as-is. Due to the nature of this module you should check for yourself that it does its work correctly, e.g. by auditing the source code and checking the generated files.

METHODS

Finance::Bank::NL::CLIEOP03

new

 $c = Finance::Bank::NL::CLIEOP03->new (
  sender_id => 'CMPNY'
 );

Create a new CLIEOP03 file. The following parameter can be specified:

  • always_include_name

    This tells the module to always include the name of the account holder, even when the CLIEOP03 documentation says it shouldn't do that. Use this to overcome compatibility problems with the software of the Postbank.

  • sender_id

    An identifier that is used to identify you. This may be anything of upto 5 characters. Optional, defaults to ''.

  • serial

    When more than one file is created on a single day, each must have a different serial. Specify the serial here. Optional, defaults to 1.

batch

 $b = $c->batch (
   account => '1234567',
   fixed_description => 'Costs for your hosting',
   sender_name => 'Hosting Corporation',
   type => Finance::Bank::NL::CLIEOP03::T_INCASSI
 )

Add a batch to the specified CLIEOP03 file. The batch is returned as a reference to a Finance::Bank::NL::CLIEOP03::Batch object. The following parameters can be specified:

  • account

    The account number of the party that is offering the transactions for processing (thus, your account number). This is either a 9-digit bank account or a 3 to 7 digit giro account. Required.

  • currency

    Indicates the currency that is to be used in this batch. Valid values are either 'NLG' for Dutch Guilder, or 'EUR' for Euro. Optional, defaults to 'EUR'.

  • fixed_description

    Indicate a description to be added to every transaction in this batch. This field is specified as a string, but will be processed as a maximum of four lines containing a maximum of 32 characters each. You can use newlines to split the lines, but the string will be capped if it exceeds the limits specified here. Optional, defaults to no fixed description.

  • is_test

    If this parameter is specified with a true value, the CLIEOP03 file is created as a 'test' file only. Optional, defaults to writing production files.

  • schedule_for

    Indicate the date on which the transactions from this batch are to be executed. Specify the date in the format DDMMYY, with the date no more than 30 days in the future. Optional, defaults to immediate transfer.

  • sender_name

    The name of the organisation creating the CLIEOP03 file, as it should appear on the bank statements of the other parties. The maximum length of this field is 35 characters, although the Postbank will only process the first 32 characters. Required.

  • type

    The type of transaction that this batch contains, required. The value for this can be specified using one of the following constants:

    • Finance::Bank::NL::CLIEOP03::T_BETALINGEN to indicate "verzamelgiro" bank transfers.

    • Finance::Bank::NL::CLIEOP03::T_INCASSI to indicate "automatische incasso" transactions.

as_string

 $s = $c->as_string;

Return the CLIEOP03 file as a single string, containing the records specified by a \r\n pair.

write

 $c->write ( 'CLIEOP03' );

Write the CLIEOP03 file to the filename specified.

head2 Finance::Bank::NL::CLIEOP03::Batch

add

Add a transaction to the current batch. This method is a frontend for add_betaling and add_incasso, and will select which method to be eventually executed based on the type of the current batch. Note that it is not possible to add transactions of a different type to a batch.

add_incasso

 $batch->add_incasso (
   account_number => '1234556789',
   amount => 10.00,
   description => 'Customer 1234',
   identifier => 6435893353335
 );

For payments in a batch of type T_INCASSI the following parameters can be specified:

  • account_city

    The city of residence of the payee, consisting of no more than 32 characters. This field is optional if 'check' is true, and ignored otherwise.

  • account_name

    The name of the payee, consisting of no more than 32 characters. This field is required if 'check' is true, and ignored otherwise.

  • account_number

    The account number of the payee, either as a 9-digit bank account number or a 3 to 7 digit giro number.

  • amount

    The amount to be debited, specified in the batch's currency. Required.

  • check

    If specified with a true value, the account number is to be checked against the specified name. This parameter is ignored with 9-digit bank accounts. Optional, defaults to true.

  • description

    The description of this transaction. This is added to the fixed_description of the batch, and should adhere to the exact same rules. Note that banks will usually only process the first four lines of the fixed_description and the description together. Optional.

  • identifier

    A unique identifier for this transaction, which will be reported by the bank on any feedback. Consists of no more than 16 digits (if less than 16 digits are specified, the identifier is padded with zeros at the left). Optional.

CAVEATS

This module currently only supports the T_INCASSI transaction type.

Please note the version number; this module has not yet been extensively tested. However, since implementing CLIEOP03 is both tedious and boring, I thought I should make this module available ASAP.

AUTHOR

Sebastiaan Hoogeveen <pause-zebaz@nederhost.nl>

COPYRIGHT

Copyright (c) 2007 Sebastiaan Hoogeveen. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html