endi.models.expense package¶
Subpackages¶
Submodules¶
endi.models.expense.payment module¶
- class endi.models.expense.payment.ExpensePayment(**kwargs)¶
Bases :
TimeStampedMixin,PaymentModelMixin,BaseExpense Payment entry
- amount¶
- bank¶
- bank_id¶
- bank_remittance_id¶
- created_at¶
- date¶
- expense¶
- expense_sheet_id¶
- exported¶
- exports¶
- get_company_id()¶
- id¶
- mode¶
- property parent¶
- updated_at¶
- user¶
- user_id¶
- waiver¶
- endi.models.expense.payment.start_listening()¶
- endi.models.expense.payment.stop_listening()¶
- endi.models.expense.payment.update_if_waiver(mapper, conection, target)¶
If payment is a waiver, payment mode is forced to waiving.
endi.models.expense.sheet module¶
- class endi.models.expense.sheet.BaseExpenseLine(**kwargs)¶
Bases :
Base,BusinessLinkedModelMixinBase models for expense lines :param type: Column for polymorphic discrimination :param date: Date of the expense :param description: description of the expense :param code: analytic code related to this expense :param valid: validation status of the expense :param sheet_id: id of the expense sheet this expense is related to
- business¶
- business_id¶
- category¶
- customer¶
- customer_id¶
- date¶
- description¶
- duplicate(sheet)¶
- expense_type¶
- id¶
- classmethod linkable(business)¶
- long_label()¶
- parent_model¶
alias de
ExpenseSheet
- project¶
- project_id¶
- classmethod query_linked_to(target: BusinessMetricsMixin)¶
- sheet¶
- sheet_id¶
- classmethod total_expense(query_filters=[], column_name='total_ht', tva_on_margin: Optional[bool] = None) int¶
- type¶
- type_id¶
- valid¶
- class endi.models.expense.sheet.ExpenseKmLine(**kwargs)¶
Bases :
BaseExpenseLine,ExpenseKmLineComputeModel representing a specific expense related to kilometric fees :param start: starting point :param end: endpoint :param km: Number of kilometers :param ht: HT amount
- business¶
- business_id¶
- cache_ht(request)¶
- category¶
- customer¶
- customer_id¶
- date¶
- description¶
- duplicate(sheet)¶
- end¶
- expense_type¶
- ht¶
- id¶
- km¶
- on_before_commit(request, state, attributes=None)¶
- project¶
- project_id¶
- sheet¶
- sheet_id¶
- start¶
- type¶
- type_id¶
- valid¶
- property vehicle¶
- class endi.models.expense.sheet.ExpenseLine(**kwargs)¶
Bases :
BaseExpenseLine,ExpenseLineComputeCommon Expense line
- business¶
- business_id¶
- category¶
- check_justified_status_allowed(status, request, **kw)¶
- customer¶
- customer_id¶
- date¶
- description¶
- duplicate(sheet=None)¶
- expense_type¶
- files¶
- ht¶
- id¶
- invoice_number¶
- justified¶
- justified_state_manager = <endi.models.action_manager.ActionManager object>¶
- manual_ttc¶
- project¶
- project_id¶
- set_justified_status(status, request, **kw)¶
- sheet¶
- sheet_id¶
- supplier¶
- supplier_id¶
- tva¶
- type¶
- type_id¶
- valid¶
- class endi.models.expense.sheet.ExpenseSheet(**kwargs)¶
Bases :
OfficialNumberMixin,ValidationStatusHolderMixin,ExpenseCompute,PaidStatusHolderMixin,NodeModel representing a whole ExpenseSheet An expensesheet is related to a company and an employee (one user may have multiple expense sheets if it has multiple companies) :param company_id: The user’s company id :param user_id: The user’s id :param year: The year the expense is related to :param month: The month the expense is related to :param status: Status of the sheet :param status_user: The user related to statuschange :param lines: expense lines of this sheet
- check_justified_status_allowed(status, request, **kw)¶
- check_status_allowed(status, request, **kw)¶
- children¶
- company¶
- company_id¶
- created_at¶
- date¶
Date property used to match the official_numbering system
- duplicate(year, month)¶
- expense_exported¶
- exports¶
- file_requirements¶
- files¶
- get_company_id()¶
Return the if of the company associated to this model
- property global_status¶
Compile a global status essentially used to match css rules
- Type renvoyé:
- id¶
- justified¶
- justified_state_manager = <endi.models.action_manager.ActionManager object>¶
- kmlines¶
- lines¶
- month¶
- name¶
- official_number¶
- paid_status¶
- paid_status_comment¶
- paid_status_date¶
- paid_status_history¶
- paid_status_user_id¶
- parent: Any¶
- parent_id¶
- payments¶
- purchase_exported¶
- set_justified_status(status, request, **kw)¶
- set_status(status, request, **kw)¶
- status¶
- status_comment¶
- status_date¶
- status_user¶
- status_user_id¶
- statuses¶
- title¶
- type_¶
- updated_at¶
- user¶
- user_id¶
- validation_date_column = 'date'¶
- validation_state_manager = <endi.models.action_manager.ActionManager object>¶
- validation_status_history¶
- year¶
- endi.models.expense.sheet.get_expense_sheet_name(month, year)¶
Return the name of an expensesheet
- endi.models.expense.sheet.get_expense_years(kw)¶
Return the list of years that there were some expense configured
- endi.models.expense.sheet.get_new_expense_years(kw)¶
endi.models.expense.types module¶
- class endi.models.expense.types.ExpenseKmType(**kwargs)¶
Bases :
ExpenseTypeType of expenses related to kilometric fees
- active¶
- amount¶
- code¶
- code_tva¶
- compte_produit_tva_on_margin¶
- compte_tva¶
- contribution¶
- duplicate(year)¶
- get_by_year(year)¶
Retrieving the ExpenseKmType matching the current one but for the given year
- Paramètres:
year (int) – The year the type should be attached to
- Renvoie:
A ExpenseKmType instance
- id¶
- internal¶
- label¶
- order¶
- classmethod query_allowed_driver_or_used_in(user, year, *args)¶
- tva_on_margin¶
- type¶
- year¶
- class endi.models.expense.types.ExpenseTelType(**kwargs)¶
Bases :
ExpenseTypeType of expenses related to telefonic fees
- active¶
- code¶
- code_tva¶
- compte_produit_tva_on_margin¶
- compte_tva¶
- contribution¶
- id¶
- initialize¶
- internal¶
- label¶
- order¶
- percentage¶
- tva_on_margin¶
- type¶
- class endi.models.expense.types.ExpenseType(**kwargs)¶
Bases :
BaseBase Type for expenses :param label: Label of the expense type that will be used in the UI :param code: Analytic code related to this expense :param type: Column for polymorphic discrimination
- active¶
- code¶
- code_tva¶
- compte_produit_tva_on_margin¶
- compte_tva¶
- contribution¶
- property display_label¶
- property family¶
- classmethod find_internal()¶
- id¶
- classmethod insert(item, new_order)¶
Place the item at the given index
- Paramètres:
item (obj) – The item to move
new_order (int) – The new index of the item
- internal¶
- property is_tva_deductible¶
- label¶
- move_down()¶
Move the current instance down in the category’s order
- move_up()¶
Move the current instance up in the category’s order
- order¶
- classmethod query(*args, **kwargs)¶
return a query
- classmethod query_active_or_used_in(*args)¶
- tva_on_margin¶
- type¶