| TOTVS Manufacture TOTVS Backoffice |
Product Line | Datasul Line |
Industry: | Manufacturing |
Module: | TOTVS Backoffice (Datasul Line) - Tax Liabilities (MOF) |
Function: | OF0313 - ICMS/IPI Verification Data Maintenance LF0202 - EMS Data Extractor SPOF009 - Tax Verification Tables Adjustment OF1001 - TAF Data Extractor html.taxAssessment - Tax Verification OF176 - ICMS ST Refund Verification OF0506 - ICMS Additional Statement OF07177 - ICMS Verification Record |
Country: | Brazil |
Requisite/Story/Issue (enter related requisite) : | DBACKFISINOV-6 |
We have two programs that perform tax calculations: OF0313 - ICMS/IPI Verification Data Maintenance and LF0213 - DIFAL FCP and ICMS ST Verification. These programs, though very similar, use distinct tables.
A program is being developed in HTML for new tax verification. To make this faster and less complicated, we need to unify the tables to verify all taxes in a single screen.
The unification of duplicated tables was developed thus:
The system no longer uses table apur-imposto and now uses table dwf-apurac-impto, the from/to occurring as follows:
| dwf-apurac-impto | apur-imposto |
Site | cod-estab | cod-estabel |
Verification Start Date | dat-apurac-inical-impto | dt-apur-ini |
Verification End Date | dat-apurac-final-impto | dt-apur-fim |
Delivery Date | dat-entrega | dt-entrega |
Delivery Location | des-local-entreg | loc-entrega |
Note | dsl-obs | note |
Tax Code | cod-impto | tp-imposto (convert tax type to save the value stated in full) |
The system no longer uses table imp-valor and now uses table dwf-apurac-impto-ajust, the from/to occurring as follows:
We have also removed free fields.
| dwf-apurac-impto-ajust | imp-valor |
Site | cod-estab | cod-estabel |
Verification Start Date | dat-apurac-inicial-impto | dt-apur-ini |
Verification End Date | dat-apurac-inicial-impto | dt-apur-fim |
Adjustment Code | cod-ajust | IF SUBSTRING(imp-valor.char-1,11,20) <> ? AND SUBSTRING(imp-valor.char-1,11,20) <> "" THEN SUBSTRING(imp-valor.char-1,11,20) ELSE substring(imp-valor.char-1,1,10)) |
Tax Code | cod-impto | tp-imposto (convert tax type to save the value stated in full) |
Adjustment Sequence | num-seq-ajust | nr-sequencia |
Adjustment Description | dsl-ajust-apurac | description |
Entry Code | cod-lancto | cod-lanc |
Dapi Reason | cod-motivo-dapi | substring(imp-valor.char-1,40,5) |
Balance Adjustment Code | cod-ajuste-sdo | substring(imp-valor.char-1,1,10) |
SPED Adjustment Code | cod-ajust-sped | substring(imp-valor.char-1,11,20) |
Source Number | num-orig | dwf-apurac-impto-ajust.num-livre-1 |
Document Code | cod-docto | dwf-apurac-impto-ajust.cod-livre-2 |
Automatic Record | log-automatico | imp-valor.log-1 |
The system no longer uses table imposto-guia and now uses table dwf-apurac-impto-recolh, the from/to occurring as follows:
| dwf-apurac-impto-recolh | imposto-guia |
Site | cod-estab | cod-estabel |
Verification Start Date | dat-apurac-inicial-impto | dt-apur-ini |
Verification End Date | dat-apurac-inicial-impto | dt-apur-fim |
Adjustment Code | cod-ajust | SUBSTR(imposto-guia.char-1,1,10) |
Tax Code | cod-impto | tp-imposto (convert tax type to save the value stated in full) |
State | cod-uf | Blank |
Sequence | nume-guia | nr-sequencia |
Revenue Code | cod-receita | SUBSTRING(imposto-guia.char-2,1,10) |
Verification Adjustment Value | val-ajust-apurac | dt-guia |
Due Date | dat-vencto | dt-guia |
Form Number | dec-num-guia | nr-guia |
Collecting Agency | cod-org-arrecad | org-arrecad |
OF0313 - ICMS/IPI Verification Data Maintenance
We changed program OF0313 to create table dwf-apurac-impto already when adding the verification cover.
LF0202 - EMS Data Extractor
We removed the creation of table dwf-apurac-impto from extraction. It is now created when adding the verification cover in OF0313.
SPOF009 - Tax Verification Tables Adjustment
Aiming to populate the new fields created in the tables, we created adjustment program Tax Verification Tables Adjustment, with access available through code spp\ofp\spof009.r.
The program reads tables apur-imposto, imp-valor and imposto-guia, then changes the data from tables dwf-apurac-impto, dwf-apurac-impto-ajust and dwf-apurac-impto-recolh respectively to the corresponding records and fields.
When the program reads the tables but fails to locate the corresponding record in MLF tables, it creates a new one.
OF1001 - TAF Data Extractor
We removed the reading of table apur-imposto and replaced it with dwf-apurac-impto.
html.taxAssessment - Tax Verification
We changed the program HTML Tax Verification to read only table dwf-apurac-impto because the system no longer uses table apur-imposto.
OF0721 - Tax Records IPI Verification Record
We changed the program replacing the reading of table Tax Verification (apur-imposto) for table MFL Tax Verification (dwf-apurac-impto).
OF0736 - New GIA-SP Magnetic Files
We changed the program replacing the reading of table Tax Verification (apur-imposto) for table MFL Tax Verification (dwf-apurac-impto).
OF176 - ICMS ST Refund Verification
We removed the reading and creation of table apur-imposto and replaced it with the reading and creation of dwf-apurac-impto.
OF0506 - ICMS Additional Statement
We removed the reading of table apur-imposto and replaced it with the reading of dwf-apurac-impto.
OF0717 - ICMS Verification Record
We removed the reading of table apur-imposto and replaced it with the reading of dwf-apurac-impto.