Skip to content
Snippets Groups Projects
Commit 78dae063 authored by Neda Moeini's avatar Neda Moeini
Browse files

Merge branch 'feature/update-sphinx' into 'develop'

Update the sphinx docs.

See merge request !3
parents 2c2fe99c a76c9c03
No related branches found
No related tags found
1 merge request!3Update the sphinx docs.
......@@ -3,4 +3,8 @@ venv
*.pyc
sage_validation/staticfiles
sage_validation/frontend/node_modules
.env
\ No newline at end of file
.env
docs/build
db.sqlite3
coverage.xml
.coverage
\ No newline at end of file
......@@ -12,8 +12,11 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('../sage-validation'))
import django
sys.path.insert(0, os.path.abspath("../../"))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sage_validation.settings")
django.setup()
# -- Project information -----------------------------------------------------
......
==========================================
Sage Validation - File Validator Forms
==========================================
.. automodule:: sage_validation.file_validator.forms
:members:
:undoc-members:
:show-inheritance:
\ No newline at end of file
==========================================
File Validator Module
==========================================
.. toctree::
:maxdepth: 2
:caption: Components:
views
forms
\ No newline at end of file
==========================================
Sage Validation - File Validator Views
==========================================
.. automodule:: sage_validation.file_validator.views
:members:
:undoc-members:
:show-inheritance:
\ No newline at end of file
......@@ -10,11 +10,5 @@ Welcome to Sage Validation's documentation!
:maxdepth: 2
:caption: Contents:
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
validations
file_validator/index
\ No newline at end of file
====================================
CSV Upload Validation Rules
====================================
The following table describes the validation rules applied when uploading a CSV file.
.. list-table::
:header-rows: 1
:widths: 20 20 40 20
* - **Type**
- **Field**
- **Logic**
- **Comments**
* - Structural
- *(All Fields)*
- Ensure that all required field names are present.
- -
* - Update
- `...NominalAccountNumber` (*n)
- If value starts with `xx-`, map `NominalCostCentre` using `dbo.meoCostCentres` and retrieve `NominalAccountNumber` from `dbo.vw_xx-data`.
- Ensure the correct nominal code is assigned.
* - Checks
- AccountNumber
- Validate against `dbo.meoValidSuppliers`.
- Ensure the account exists in the valid suppliers list.
* - Checks
- Source
- Should always be `80`.
- Reject rows where `Source != 80`.
* - Checks
- SYSTraderTranType
- Should always be `4`.
- Reject rows where `SYSTraderTranType != 4`.
* - Update
- TransactionDate
- Set to today’s date (`dd/mm/yyyy`).
- Ensure all rows have a consistent transaction date.
* - Checks
- `...NominalAccountNumber` (*n)
- Validate against `[Nom]` in `dbo.meoNominal`.
- Ensure all nominal account numbers exist.
* - Checks
- `...NominalCostCentre` (*n)
- Validate against `dbo.meoCostCentres`.
- Ensure cost centres exist.
* - Checks
- Combination of `...NominalAccountNumber`, `...NominalCostCentre`, and `...NominalDepartment`
- Validate against `dbo.meoValidSageAccounts`.
- The combination of the three fields must be valid.
* - Checks
- `...TaxRate`
- Validate against `[Tax code]` in `dbo.meoValidVAT`.
- Ensure valid tax rates.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment