Class: C2eCore::Drops::FinancialReportDrop

Inherits:
BaseDrop
  • Object
show all
Includes:
Helpers::FinancialReportConversions
Defined in:
/build/app/mailers/c2e_core/drops/financial_report_drop.rb

Instance Method Summary collapse

Constructor Details

#initialize(financial_report) ⇒ FinancialReportDrop

Returns a new instance of FinancialReportDrop.

Instance Method Details

#currencyObject

#descriptionString

Returns - Description of financial report, which includes reportable type, reportable id and report sequence. E.g.: “CompanyBranch ~ 10 ~ 1”.

Returns:

  • (String)
    • Description of financial report, which includes reportable type, reportable id and report

    sequence. E.g.: “CompanyBranch ~ 10 ~ 1”.

#formatted_total_incomesString

Returns - Sum of all incomes converted to financial report’s currency and formatted. E.g.: "123,45 Kč".

Returns:

  • (String)
    • Sum of all incomes converted to financial report’s currency and formatted.

    E.g.: "123,45 Kč".

#formatted_total_with_credit_funds_transfersString

Returns - Formatted sum of all incomes and credit funds transfers values. E.g.: "123,45 Kč".

Returns:

  • (String)
    • Formatted sum of all incomes and credit funds transfers values. E.g.: "123,45 Kč".

#funds_transfersFinancialReportCreditTransferDrop?

Returns - Returns financial report for funds credit transfers as drop object, if any transfer is present.

Returns:

#grouped_incomesArray[FinancialReportPaymentTypeDrop]

Returns - Array of all incomes statistics from financial report grouped by payment method.

Returns:

#grouped_total_with_credit_funds_transfersArray[FinancialReportPaymentTypeDrop]

Returns - Array of statistics on the balance of credit funds transfers and incomes grouped by payment method.

Returns:

#idInteger

Returns - ID of financial report in database.

Returns:

  • (Integer)
    • ID of financial report in database.

#report_datetimeDateTime

Returns - The date and time when the report was created. E.g.: "2023-11-16T11:38:56+01:00".

Returns:

  • (DateTime)
    • The date and time when the report was created. E.g.: "2023-11-16T11:38:56+01:00"

#report_datetime_fromDateTime?

Returns - The date and time from which the report calculations begin. E.g.: "2023-11-16T11:38:56+01:00".

Returns:

  • (DateTime, nil)
    • The date and time from which the report calculations begin.

    E.g.: "2023-11-16T11:38:56+01:00"

#report_sequenceInteger

Returns - Financial report sequence number. E.g.: 142.

Returns:

  • (Integer)
    • Financial report sequence number. E.g.: 142

#reportableCashBoxDrop, ...

Returns - Returns the object for which the report was generated (cash box or company branch) as a drop object.

Returns:

  • (CashBoxDrop, CompanyBranchDrop, nil)
    • Returns the object for which the report was generated

    (cash box or company branch) as a drop object.

#terminal_financial_reportTerminalFinancialReportDrop?

Returns - Returns the terminal financial report as a drop object, if it is present.

Returns:

#total_incomesFloat

Returns - Sum of all incomes converted into financial report’s currency. E.g.: 78.

Returns:

  • (Float)
    • Sum of all incomes converted into financial report’s currency. E.g.: 78

#total_orders_and_transfers_countInteger

Returns - Number of orders and credit funds transfers. E.g.: 42.

Returns:

  • (Integer)
    • Number of orders and credit funds transfers. E.g.: 42

#total_orders_and_transfers_storno_countInteger

Returns - Number of canceled orders and canceled credit funds transfers. E.g.: 42.

Returns:

  • (Integer)
    • Number of canceled orders and canceled credit funds transfers. E.g.: 42

#total_orders_countInteger

Returns - The number of orders that belong to financial report. E.g.: 42.

Returns:

  • (Integer)
    • The number of orders that belong to financial report. E.g.: 42

#total_storno_countInteger

Returns - The number of canceled orders that belong to financial report. E.g.: 42.

Returns:

  • (Integer)
    • The number of canceled orders that belong to financial report. E.g.: 42

#total_vat_summarizationArray[FinancialReportVatDrop]

Returns - Array of all VAT statistic from financial report.

Returns:

#total_with_credit_funds_transfersFloat

Returns - Sum of all incomes and credit funds transfers values. E.g.: 78.

Returns:

  • (Float)
    • Sum of all incomes and credit funds transfers values. E.g.: 78