vat_declarations
In short
VAT declaration activities over time, across the accounting firm's portfolio of customers.
For each company and depending on the declaration frequency, each row corresponds to a VAT declaration and its status.
For quarterly and yearly VAT declarations, the declaration period is longer than one month and the start of the period is specified in the period_start field, which is filled only if the declaration was made.
Filter key(s)
company_id
Sorting key
ClickHouse skips blocks only when the filter starts with this key, in this order. When the first column is `company_id`, put `company_id` in every query. Read a fleet one company at a time, or in batches of `company_id`. Do not run one query with no company filter. List only the columns you need. `SELECT *` reads columns you will not use.
company_id, period_start, id
Available columns
company_id
Int64
Unique ID of the company on Pennylane, referring to companies.id.
company_name
String
Company's display name on Pennylane.
period_start
Nullable(Date)
Beginning of the declaration period, filled only if the declaration has been done.
period_end
Date
End of the declaration period.
is_fiscal_year_calendar
UInt8
True when the company fiscal year matches the calendar year.
vat_frequency
Nullable(String)
VAT frequency of the company as configured on Pennylane.
Examples: "monthly", "quarterly", "yearly"
is_expected
Bool
True if a VAT declaration is expected for the declaration period ending at period_end.
status
Nullable(String)
Status of the VAT declaration for the period ending at period_end.
For paid declarations, it follows the declaration accomplishment order.
For not done declarations, not done if the declaration was expected considering the company VAT frequency and the legal deadline has passed. pending, if the declaration is expected considering the company VAT frequency and the legal deadline has not passed, empty if the declaration was not expected considering the company VAT frequency.
When the declaration is done in Pennylane and a vat return document is created, the displayed status is done and is ready to be sent to the Tax Administration.
When the declaration is sent to the Tax Administration, the displayed status is sent.
Then, when the declaration is accepted by the Tax Administration, the displayed status is accepted.
Finally, when the declaration payment is validated by the Tax Administration, the displayed status is paid.
VAT declarations can be marked as done in Pennylane without being sent via Pennylane.
Examples: "pending", "not_done", "paid", "accepted", "sent", "done"
declaration_document_id
Nullable(Int64)
ID of the document (vat return, yearly vat return) associated with the VAT declaration.
declaration_form_name
Nullable(String)
Form name of the VAT declaration for monthly, quarterly and yearly frequencies. Name could be only one of the following values: 3517SCA12, 3310CA3, 3514.
Examples: "3517SCA12", "3310CA3", "3514"
declaration_owner_id
Nullable(Int64)
ID of the user who submitted the VAT declaration to the tax administration. Filled only when the declaration was sent or accepted via Pennylane; NULL otherwise.
declaration_owner_email
Nullable(String)
Email address of the user who submitted the VAT declaration to the tax administration. Derived from the declaration owner; NULL when the declaration was not sent or accepted via Pennylane, or when the user cannot be resolved.
declaration_amount
Nullable(Decimal(15, 2))
Amount of the payment validated by the Tax Administration.
created_at
Nullable(DateTime64(6, 'UTC'))
Creation time of this record in Pennylane.
updated_at
Nullable(DateTime64(6, 'UTC'))
Last update time of this record in Pennylane.
synchronized_at
Nullable(DateTime64(6, 'UTC'))
Timestamp of the last time this row version was written in ClickHouse.