endi.models.expense.services package

Submodules

endi.models.expense.services.expense module

class endi.models.expense.services.expense.BaseExpenseLineService

Bases : BusinessLinkedServiceMixin

total_expense(query_filters=[], column_name='total_ht', tva_on_margin: Optional[bool] = None)

endi.models.expense.services.expense_types module

class endi.models.expense.services.expense_types.ExpenseTypeService

Bases : object

Handle complex queries en ExpenseTypes

classmethod active_or_used_in(*args)

Returns the union of the enabled ExpenseTypes and those used by provided object lists.

param *args: one or several iterables of elements having a

type_id attr

return: list of ExpenseTypes id (deduplicated)

classmethod allowed_driver(user, year)

Applies the optional per-user restriction on ExpenseKmType

Paramètres:
  • User (user) – the user who declared this vehicle

  • year – the year the vehicle is declared for

Renvoie:

the allowed ExpenseTypeKm

Type renvoyé:

list of ExpenseTypeKm

classmethod allowed_driver_or_used_in(user, year, *args)

Union of allowed_driver types and those already used in *args

Paramètres:
  • User (user) – the user who declared this vehicle

  • year – the year the vehicle is declared for

Renvoie:

the allowed ExpenseTypeKm

Type renvoyé:

list of ExpenseTypeKm

classmethod find_internal(etype_class)
static get_by_label(cls, label: str, case_sensitive: bool = False)

endi.models.expense.services.expensesheet_official_number module

class endi.models.expense.services.expensesheet_official_number.ExpMonthCompanySequence(*args, **kwargs)

Bases : ExpMonthSequence

class endi.models.expense.services.expensesheet_official_number.ExpMonthSequence(init_date_config_key, *args, **kwargs)

Bases : MonthSequence

class endi.models.expense.services.expensesheet_official_number.ExpenseSheetNumberService

Bases : AbstractNumberService

classmethod get_sequences_map()
returns: must include following keys“SEQGLOBAL”, “SEQYEAR”,

“SEQMONTH”, “SEQMONTHANA”

classmethod is_already_used(request, node_id, official_number) bool

endi.models.expense.services.sheet module

class endi.models.expense.services.sheet.ExpenseSheetService

Bases : object

classmethod get_lines_justified_status(instance) Union[None, bool]

Get common lines justified status

Renvoie:

True/False if all lines have same justified state. None else.

Module contents