Modelo 303
Modelo 303 has the following three main builders:
-
builders/modelos/Modelo303SummaryBuilder
The builder retrieves the majority of information visible in the report and settings specified in the report's configuration page. This builder is tied to the preprocessor processors/modelos/Modelo303SummaryPreProcessor. Because the query of the summary builder provides only one row, the preprocessor runs only one time per report generation.
-
builders/ActivityBuilder
The builder retrieves information about subsidiary activities for the end-of-year declarations. It passes information about the main and secondary activities to the processors/ActivityPreProcessor.
-
builders/modelos/Modelo303FiscalYearBuilder
The builder retrieves summary information about the transactions performed in the whole fiscal year needed for the end-of-year declarations. Its output is then passed on to the processors/EmptyPreProcessor that returns the output of the builder as it is.
The objects produced by the preprocessors are manipulated by the processors/modelos/Modelo303SummaryPostProcessor that in turn produces a single object that is passed on to the export processor processors/modelos/Modelo303TxtProcessor.
All the clickable Modelo 303 boxes in the report preview are associated to at least one detail builder and preprocessor. If boxes aggregate results from multiple queries, they may be associated to more than one builder and preprocessor couple. You will find a list of all the boxes, each one with an ID in the form "boxX", where X is the number of the box; property "source" identifies the data source, which is defined at the beginning of the file, where its builder and preprocessor are specified. Each box is also tied to a postprocessor, that is defined in property "processor" of the box itself. See example below for box 9.
To see the whole list of box details:
-
Go to Documents > Files > File Cabinet.
-
Go to SuiteApps > com.netsuite.spainlocalization > src > schemas.
-
Click on ES_MODELO_303_DETAILS.json and open the file.
Here, you will find a list of all the boxes with an ID in the boxX form, where X stands for the box number. The property source identifies the data source defined at the beginning of the file, where its builder and preprocessor are specified. Each box is also tied to a postprocessor that is defined in the property processor of the box itself. See example for box 9 below.
When modifying the behavior of a detail builder or processor, keep in mind that it can impact more than one box. Thus, make sure that the final result is as expected for all the involved boxes.
{
"name": "Modelo 303 Report",
"id": "MODELO_303_REPORT_DETAILS",
"type": "VAT",
"context": {
"report": {
"nexus": "reportparam.nexus",
"subsidiary": "reportparam.subsidiary"
}
},
"source": [
{
"id": "domestic_sale_drilldown",
"type": "query",
"querybuilder": {
"type": "suiteql",
"script": "SuiteApps/com.netsuite.spainlocalization/src/builders/DomesticSaleDetailsBuilder"
},
"processor": {
"type": "scheduled",
"script": "SuiteApps/com.netsuite.spainlocalization/src/processors/EmptyPreProcessor"
}
}
...
],
"data": [
...
{
"id": "box9",
"source": ["domestic_sale_drilldown"],
"processor": "SuiteApps/com.netsuite.spainlocalization/src/processors/modelos/Modelo303DetailsPostProcessor"
},
...
]
}