activity.models.invoice

Classes

Invoice

A grouping of invoice items.

Functions

sync_invoice_items(→ None)

Module Contents

activity.models.invoice.sync_invoice_items(items: Iterable[InvoiceItem], capture: bool = True) None[source]
class activity.models.invoice.Invoice[source]

Bases: onegov.core.orm.Base, onegov.core.orm.mixins.TimestampMixin

A grouping of invoice items.

__tablename__ = 'invoices'[source]
id: Column[uuid.UUID][source]
period_id: Column[uuid.UUID][source]
period: relationship[Period][source]
user_id: Column[uuid.UUID][source]
user: relationship[User][source]
items: relationship[list[InvoiceItem]][source]
references: relationship[list[InvoiceReference]][source]
property price: onegov.pay.Price[source]
property has_donation: bool[source]
readable_by_bucket(bucket: str) str | None[source]
sync(capture: bool = True) None[source]
add(group: str, text: str, unit: decimal.Decimal, quantity: decimal.Decimal, organizer: str = '', attendee_id: uuid.UUID | None = None, flush: bool = True, **kwargs: Any) onegov.activity.models.invoice_item.InvoiceItem[source]
discourage_changes() bool[source]
disable_changes() bool[source]
has_online_payments() bool[source]
discourage_changes_for_items(items: Iterable[InvoiceItem]) bool[source]
disable_changes_for_items(items: Iterable[InvoiceItem]) bool[source]
has_online_payments_for_items(items: Iterable[InvoiceItem]) bool[source]
paid() bool[source]
total_amount() decimal.Decimal[source]
total_amount() ColumnElement[Decimal][source]
outstanding_amount()[source]
outstanding_amount()[source]
paid_amount() decimal.Decimal[source]
paid_amount() ColumnElement[Decimal][source]