KVSKBAPEPPOL30SalesValidation
Implements #e1966889b5fb4fdaa84cea71b590e1a9#"PEPPOL30 Validation" . Summary: Codeunit for validating sales documents in the KUMAVISION base PEPPOL 3.0 format.
Procedures
OnRun
procedure OnRun(Rec: Record "#437dbf0e84ff417a965ded2bb9650972#Sales Header")
ValidateDocument(Variant) :
Summary: Validates a sales document header against PEPPOL 3.0 requirements.
procedure ValidateDocument(RecordVariant: Variant):
Parameters:
RecordVariant: The sales header record to validate.
Remarks: The validation is delegated to the PEPPOL app codeunit "PEPPOL30 Sales Validation".
ValidateDocumentLines(Variant) :
Summary: Validates all sales document lines against PEPPOL 3.0 requirements.
procedure ValidateDocumentLines(RecordVariant: Variant):
Parameters:
RecordVariant: The sales header record whose lines should be validated.
Remarks: Line validation is performed by the custom implementation KVSKBAPEPPOL30SalesValidatImpl.
ValidateDocumentLine(Variant) :
Summary: Validates a single sales document line against PEPPOL 3.0 requirements.
procedure ValidateDocumentLine(RecordVariant: Variant):
Parameters:
RecordVariant: The sales line record to validate.
Remarks: Line validation is performed by the custom implementation KVSKBAPEPPOL30SalesValidatImpl.
ValidatePostedDocument(Variant) :
Summary: Validates a posted sales document against PEPPOL 3.0 requirements.
procedure ValidatePostedDocument(RecordVariant: Variant):
Parameters:
RecordVariant: The posted sales document record to validate.
Remarks: Posted document validation is performed by the custom implementation KVSKBAPEPPOL30SalesValidatImpl.
ValidateLineTypeAndDescription(Variant) : Boolean
Summary: Validates the sales line type and description.
procedure ValidateLineTypeAndDescription(RecordVariant: Variant): Boolean
Parameters:
RecordVariant: The sales line record to validate.
Returns: True if the line type or description is invalid; otherwise, false.
Remarks: The validation is delegated to the PEPPOL app codeunit "PEPPOL30 Sales Validation".
CheckCurrencyCode(Code[10]) :
Summary: Validates the currency code.
procedure CheckCurrencyCode(CurrencyCode: Code[10]):
Parameters:
CurrencyCode: The currency code to validate.
Remarks: The validation is delegated to the PEPPOL app codeunit "PEPPOL30 Sales Validation".
CheckCountryRegionCode(Code[10]) :
Summary: Validates the country/region code.
procedure CheckCountryRegionCode(CountryRegionCode: Code[10]):
Parameters:
CountryRegionCode: The country/region code to validate.
Remarks: The validation is delegated to the PEPPOL app codeunit "PEPPOL30 Sales Validation".
CheckShipToAddress(Record Sales Header) :
Summary: Validates the ship-to address fields on a sales header.
procedure CheckShipToAddress(SalesHeader: Record "Sales Header"):
Parameters:
SalesHeader: The sales header record to validate.
Remarks: The validation is delegated to the PEPPOL app codeunit "PEPPOL30 Sales Validation".
CheckTaxCategory(Record Sales Line) :
Summary: Validates the tax category for a sales line.
procedure CheckTaxCategory(SalesLine: Record "Sales Line"):
Parameters:
SalesLine: The sales line record to validate.
Remarks: The validation is delegated to the PEPPOL app codeunit "PEPPOL30 Sales Validation".
EnsureZeroRate(Decimal, Code[10]) :
Summary: Checks that the VAT percentage is zero for the specified tax category.
procedure EnsureZeroRate(VatPercent: Decimal; TaxCategoryCode: Code[10]):
Parameters:
VatPercent: The VAT percentage to check.TaxCategoryCode: The tax category code for error reporting.
Remarks: The check is delegated to the PEPPOL app codeunit "PEPPOL30 Sales Validation".
EnsurePositiveRate(Decimal, Code[10]) :
Summary: Checks that the VAT percentage is positive for the specified tax category.
procedure EnsurePositiveRate(VatPercent: Decimal; TaxCategoryCode: Code[10]):
Parameters:
VatPercent: The VAT percentage to check.TaxCategoryCode: The tax category code for error reporting.
Remarks: The check is delegated to the PEPPOL app codeunit "PEPPOL30 Sales Validation".
EnsureSingleOutsideScopeVATBreakdown(Record Sales Line) :
Summary: Ensures that only a single outside-scope VAT breakdown exists.
procedure EnsureSingleOutsideScopeVATBreakdown(SalesLine: Record "Sales Line"):
Parameters:
SalesLine: The sales line record to check.
Remarks: The validation is delegated to the PEPPOL app codeunit "PEPPOL30 Sales Validation".