rctab.routers.accounting.routes

Miscellaneous queries for the accounting schema.

Functions

get_allocations(sub_id)

Get all allocations for a subscription.

get_approvals(sub_id)

Get all approvals for a subscription.

get_costrecovery(sub_id)

Get all cost recovery items for a subscription.

get_desired_status([sub_id])

Returns the latest value of the desired status record for a subscription.

get_finance(sub_id)

Get all finance items for a subscription.

get_sub_allocations_summary([sub_id])

Returns an allocations summary for subscriptions.

get_sub_approvals_summary([sub_id])

Get total approved amount for each subscription.

get_sub_usage_summary([sub_id])

Summarise usage for subscriptions.

get_subscription_details([sub_id])

Returns latest information from subscription details.

get_subscription_id(conn, display_name)

Get the subscription ID(s) from a display name.

get_subscription_name([sub_id])

Make a query to find the display name(s) of a subscription.

get_subscriptions()

Returns all subscriptions.

get_subscriptions_summary([sub_id])

Returns a summary of one or all subscriptions.

get_subscriptions_with_disable(conn[, sub_id])

Get a query summarising the subscription and its remaining budget.

get_total_usage([start_date, end_date])

Get the total usage on the system between start_date and end_date.

get_usage(sub_id, target_date)

Get all usage items for a subscription.

sub_persistency_status([sub_id])

Returns the latest value of the always_on record for a subscription.

Classes

SubscriptionItem(*, sub_id)

A wrapper for a subscription id.

SubscriptionSummary(*, subscription_id, ...)

A summary of a subscription.