<<

NAME

writeoff_debts.pl

SYNOPSIS

  writeoff_debts.pl --confirm [--verbose] <filter options>
  writeoff_debts.pl --verbose <filter options>
  writeoff_debts.pl --help

  <filter options> are:
      [--type <type>] [--file <file>] [--added-before <date>]
      [--added-after <date>] [--category-code <category code>]

This script batch waives debts.

OPTIONS

The options to select the debt records to writeoff are cumulative. For example, supplying both --added_before and --type specifies that the accountline must meet both conditions to be selected for writeoff.

You must pass at least one of the filtering options for the script to run. This is to prevent an accidental 'writeoff all' operation. Please note that --category-code must be accompanied by another filter - the script will not run if this is the only filter provided.

-h|--help

Prints this help message

--added-before

Writeoff debts added before the date passed.

Dates should be in ISO format, e.g., 2013-07-19, and can be generated with `date -d '-3 month' --iso-8601`.

--added-after

Writeoff debts added after the date passed.

Dates should be in ISO format, e.g., 2013-07-19, and can be generated with `date -d '-3 month' --iso-8601`.

--category-code

Writeoff debts for patrons belonging to the passed categories.

Can be used multiple times for additional category codes.

This option cannot be used alone, it must be combined with another filter.

--type

Writeoff debts of the passed type. Accepts a list of debit type codes.

--file

Writeoff debts passed as one accountlines_id per line in this file. If other criteria are defined it will only writeoff those in the file that match those criteria.

-v|--verbose

This flag set the script to output logging for the actions it will perform.

The -v option is mandatory if -c is not supplied.

It can be repeated for increased verbosity.

-c|--confirm

This flag must be provided in order for the script to actually writeoff debts.

If it is not supplied, the -v option is required. The script will then only report on the accountline records it would have been written off.

AUTHOR

Martin Renvoize <martin.renvoize@ptfs-europe.com>

COPYRIGHT

Copyright 2020 PTFS Europe

LICENSE

This file is part of Koha.

Koha is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

Koha is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Koha; if not, see <http://www.gnu.org/licenses>.

DISCLAIMER OF WARRANTY

Koha is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

<<