Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented processor for Lenovo processing #107

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Commits on Sep 25, 2024

  1. Allow invoice subclasses to explicitly declare their exported columns…

    … and column names
    
    Two class attributes, `export_columns_list` and `exported_columns_map`,
    has been added to `Invoice`, along with a class function `_filter_columns()`.
    Subclasses of `Invoice` must now define `export_columns_list`, containing
    the ordered list of columns that must be exported in their respective
    invoices. Subclasses can optional define `exported_columns_map`,
    containing mappings between "internal" column names and what their
    name should be when exported.
    
    The field name `RATE_FIELD` has been added to `invoice.py`. It was
    previously forgotten.
    QuanMPhm committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    b5ca684 View commit details
    Browse the repository at this point in the history
  2. Implemented Processor class and refactored some preliminary processing

    A `Processor` class has been added, subclassing from the `Invoice` class.
    This is the first step to refactor invoicing in order to seperate the
    processing and filtering/exporting functionalities of our current
    Invoice subclasses. Subclasses of `Processor` should only process invoices
    and manipulate its internal data, while subclasses of `Invoice` should
    only perform filtering and exporting, never changing any data itself.
    
    In addition to implementing `Processor`, two of its subclasses,
    `ValidatePIAliasProcessor` and `AddInstitutionProcessor` has been
    added to perform some preliminary processing steps.
    QuanMPhm committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    d9b838c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    93a3f83 View commit details
    Browse the repository at this point in the history
  4. Implemented processor for Lenovo processing

    Note that, for now, only the Lenovo invoice will take the processed
    data from the `LenovoProcessor`. All other invoices will take the
    data from `AddInstituteProcessor`. This is due to the processors
    adding new columns. This odd code design will be removed once invoices
    gain the feature to filter out their exported columns.
    QuanMPhm committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    018a36c View commit details
    Browse the repository at this point in the history