bank_import Package¶
models Module¶
Models related to Bank Accounts & Imports.
- class bank_import.models.BankAccount(*args, **kwargs)[source]¶
An Accountant-Visible Wrapper for an Account.
This lets us keep track of the importer class to use for each Account.
- account¶
The Account the BankAccount is linked to. This is the Account that will have it’s Entries imported.
- name¶
A name for the Bank Account, used in forms.
- bank¶
The module/function path to the statement importer to use for this account.
- class bank_import.models.CheckRange(*args, **kwargs)[source]¶
Store a Default Account/Memo/Payee for a BankAccount’s Checks.
When importing a bank statement, any expense checks that fall within a CheckRange should be pre-filled with the default_account, default_payee, & default_memo of the CheckRange.
- bank_account¶
The BankAccount that the CheckRange applies to.
- start_number¶
The starting check number of the range.
- end_number¶
The ending check number of the range.
- default_payee¶
The Payee to use for checks that fall within the range.
- default_memo¶
The Memo to use for checks that fall within the range.
forms Module¶
Forms & Formsets Used in the import_bank Views.
- class bank_import.forms.BankAccountForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.util.ErrorList'>, label_suffix=':', empty_permitted=False)[source]¶
A Form to Select a BankAccount and Upload an Import File.
- class bank_import.forms.ReceivingImportForm(*args, **kwargs)[source]¶
A form for importing unmatched BankReceivingEntries.
views Module¶
Views for Importing Bank Statements.
importers.base Module¶
Abstract Classes that Custom Importers Should Inherit From.
- class bank_import.importers.base.BaseImporter(file_object, *args, **kwargs)[source]¶
An abstract class for the import_bank_statement view.
Descendants of this class handle parsing the file_object and returning the parsed transaction dictionaries.
- class bank_import.importers.base.CSVImporter(file_object, *args, **kwargs)[source]¶
An abstact Bank Statement Importer to process CSV Files.
The file_object passed to the constructor should point to a CSV file whose first row are headers for the columns.
Implementations must specify two class attributes:
- CSV_TO_DATA_FIELDS - a dictionary mapping from CSV column names to data field names. Required field names are date, amount, check_number, type`, & ``memo.
- CSV_TYPE_TO_DATA_TYPE - a dictionary mapping from CSV type column values to data type values. Valid data type values are transfer_deposit, transfer_withdrawal`, ``deposit, or withdrawal.
An optional CSV_DATE_FORMAT class attribute may modify the format string used to parse the date field. By default, MM/DD/YYYY is expected.
importers.vcb Module¶
Implements the Importers for Virginia Community Bank.