rctab.routers.accounting.finances

Deciding who to charge for a subscription’s spending.

Functions

check_create_finance(new_finance, conn)

Check whether the new finance row is valid.

check_update_finance(new_finance, conn)

Check that updating a finance row is allowed.

delete_finance(finance_id, subscription[, ...])

Deletes a Finance record.

get_end_month(date)

Return the end of the month of the provided date.

get_finance(finance_id[, _, conn])

Returns a Finance if given a finance table ID.

get_start_month(date)

Return the start of the month of the provided date.

get_subscription_finances(subscription[, _, ...])

Return a list of Finance objects for a subscription.

post_finance(new_finance[, user, conn])

Create a new finance record.

update_finance(finance_id, new_finance[, ...])

Update an existing Finance record.