myDATATools Class

Class myDATATools 
This class contains important and useful tools for managing myDATA. 
With this class, you can access functions to get a detailed analysis of some invoice fields or even retrieve ISO countries and currency codes. 
Combining the functionality of this class with other classes is the best way to manage my data.
Public Class myDATATools
This language is not supported or no code example is available.
public class myDATATools
This language is not supported or no code example is available.
Name Description
Public constructor myDATATools(string, string) It creates a new instance of the myDATATools class.
Top
Methods
 
Name Description
Public method calcNetVatRound(double, double) Calculates the Net Value and VAT Amount from the Gross Value while ensuring that the Gross Value remains constant. 
Use this function when you want to populate the exact net value and VAT amount, so the gross value is intact. 
This is useful when have a gross value and you need to calculate the net valu and value.
Public method checkClassification(string, string, string, int) Check the classification combination. If the combination is valid, it returns True. Otherwise, it returns False
This function can be used to check if an invoice classification is correct or not, right before you send the invoice or the classification.
Public method checkE3Class(string, string, int, bool) Checks whether the E3 Code and Category combination is valid in general, regardless of invoice type. 
Use this function to see if a combination occurs in general.
Public method checkE3Class(List<comb>, int, bool) Check whether a list of E3 Code and Category combination is valid. 
This function is not available in the Trial Version.
Public method getAllCategories(int) Get all the categories, no matter the invoice Type. 
Use this function to get all the supported categories, no matter of the invoice type. 
This function is useful for invoices where there are no specific supported categories. These invoice types are 1.6, 2.4, and 5.1. 
Categories are used in invoice classification for the field classification.Category or the field classifications.classificationCategory 
The responsibility for selecting the appropriate Category lies with the end user.
Public method getAllCategoriesNames(int) Get a list of all categories, regardless of invoice type, along with their entire descriptions. 
Use this function to get all the supported categories, no matter of the invoice type. 
This function is useful for invoices where there are no specific supported categories. These invoice types are 1.6, 2.4, and 5.1. 
The advantage of this method is that you can also get the description of each supported category, so the end user knows exactly what he is going to select. 
Categories are used in invoice classification for the field classification.Category or the field classifications.classificationCategory 
The responsibility for selecting the appropriate Category lies with the end user. This function is not available in the Trial Version.
Public method getAllE3(int) Get all E3 codes, regardless of invoice type. 
Use this function to get all the supported E3 Codes, no matter of the invoice type and category. 
This function is useful for invoices where there are no specific supported E3 Codes. These invoice types are 1.6, 2.4, and 5.1. 
E3 Codes are used in invoice classification for the field classification.Type or the field classifications.classificationType 
The responsibility for selecting the appropriate E3 Code lies with the end user.
Public method getAllE3Names(int) Get all E3 codes, regardless of invoice type, along with their entire descriptions. 
Use this function to get all the supported E3 Codes, no matter of the invoice type and category. 
This function is useful for invoices where there are no specific supported E3 Codes. These invoice types are 1.6, 2.4, and 5.1. 
The advantage of this method is that you can also get the description of each supported E3 Code, so the end user knows exactly what he is going to select. 
E3 Codes are used in invoice classification for the field classification.Type or the field classifications.classificationType 
The responsibility for selecting the appropriate E3 Code lies with the end user. 
This function is not available in the Trial Version.
Public method getClassInvType(string, string) Determine for which Invoice Type an E3Code-Category combination is valid. 
It could take up to 10 seconds to return data. 
This function is not available in the Trial Version.
Public method getCountries() Get the ISO 3166 Country Codes for all countries around the world. 
ISO Country Codes are used in the SendInvoices class for the fields issuer.country and counterpart.country.
Public method getCurrencies() Get the ISO Currency Codes for all countries around the world. 
ISO Currency Codes are used in the SendInvoices class for the field elements.currency.
Public method getF2Category(bool) Get all Categories of F2 (code and description). 
Categories of F2 are used in invoice classification for the field classification.vatCategory or the field classifications.VatCategory 
Public method getFeesCategory(bool) Get all Fees Categories (code and description). 
Fees Categories are used for the field invoiceLine.feesPercentCategory and it is mandatory field when Fees Amount of the invoiceLine has value other than 0. 
Use this function to get the supported Fees Categories.
Public method getGovName(string) Check if a Greek VAT Number belongs to a Government Organization. 
This is ctitical for the Invoicing Provider, in order to determine if the transaction is B2G.
Public method getGovs() Get the list of Goverment IDs, including VAT Number and Full Name. 
This method returns data for the extraDetails.govID field. 
To see all Government IDs, check the Gov IDs 
This function is not available in the Trial Version.
Public method getInvoiceDetailType(bool) Get all Invoice Detail Types (code and description). 
Invoice Detail Types are used for the field invoiceLine.invoiceDetailType
The values of these methods are used only for the invoice type 1.5.
Public method getInvoiceType(bool) Get all Invoice Types (code and description). 
Invoice Types are used in SendInvoices class for the field elements.invoiceType 
Use this function to get all supported Invoice Types, whether it is income or expense.
Public method getInvoiceType(int, int, bool) Get all Invoice Types (code and description) that are assigned only to the entity's income or only to its expenses based on the search method (what the entity sent, what they sent to the entity). 
Invoice Types are used in SendInvoices class for the field elements.invoiceType 
This function is not available in the Trial Version.
Public method getInvoiceTypeProvider(bool) Get all Invoice Types (code and description) that a provider can interact with. 
Invoice Types are used in SendInvoices class for the field elements.invoiceType 
Public method getInvoiceVariationType(bool) Get all Invoice Variation Types (code and description). 
Invoice Variation Types are used for the field elements.invoiceVariationType
Invoice Variation Type is a required field when an invoice is sent to myDATA in the event that the obligated issuer neglects to do so. 
Typically, it is applied to expenditures for which the Greek issuer neglected to send the invoice to myDATA.
Public method getMeasurementUnit(bool) Get all Measurement Units (code and description). 
Measurement Units are used for the field invoiceLine.measurementUnit
Public method getMovePurpose(bool) Get all Move Purposes (code and description). 
Move Purposes are used for the field elements.movePurpose
Public method getOtherCorrelatedEntitiesType(bool) Gets the other Correlated Entities Types, as Dictionary(Of Integer, String) 
Correlated Entities Types are used for the field otherCorrelatedEntities.type
The responsibility for selecting the appropriate Correlated Entity Type lies with the end user.
Public method getOtherTaxesCategory(bool, bool) Get all Other Taxes Categories (code and description). 
Taxes Categories are used for the field invoiceLine.otherTaxesPercentCategory and it is mandatory field when Othe Taxes Amount of the invoiceLine has value other than 0. 
Use this function to get the supported Taxes Categories.
Public method getPaymentMethods(bool) Get all Payment Methods (code and description). 
Payment Methods are used for the field paymentMethod.type
Public method getPeppolCPV(string) Get the CPV Code list according to peppol. 
This method returns data for the peppolItemClass.itemID field. 
For more information about each item classification code, check the Peppol Item Classification 
This function is not available in the Trial Version.
Public method getPeppolItemClass() Get the Item Classification Code list according to peppol. 
This method returns data for the peppolItemClass.itemClass field. 
For more information about each item classification code, check the Peppol Item Classification 
This function is not available in the Trial Version.
Public method getPeppolMeasurmentUnit() Get the Measurment Unit Code list according to peppol. 
This method returns data for the provLine.peppolMeasurementUnit field. 
For more information about each measurement unit, check the Peppol Measurement Unit 
This function is not available in the Trial Version.
Public method getPeppolTaxCategory() Get the Tax Category code list according to peppol. 
This method returns data for the provLine.peppolTaxCategory field. 
General rule is to you the tax category Z for 0% VAT and S when the VAT% is not 0%. 
For more information about each tax category, check the Peppol Tax Category 
This function is not available in the Trial Version.
Public method getPeppolVatex() Get the full list of vatExemptionCodes according to peppol. 
This method returns data for the provLine.peppolExemptionCode and provLine.peppolExemptionText fields. For more information about each exemption code, check the Peppol Vatex 
This function is not available in the Trial Version.
Public method getRecType(bool) Get all Record Types (code and description). 
Record Types are used for the field invoiceLine.RecType
Public method getStampDutyCategory(bool) Get all Stamp Duty Categories (code and description). 
Stamp Duty Categories are used for the field invoiceLine.stampDutyPercentCategory and it is mandatory field when Stamp Duty Amount of the invoiceLine has value other than 0. 
Use this function to get the supported Stamp Duty Categories.
Public method getValidCategory(string, int) Retrieve all valid categories of a specific Invoice Type. 
This function can be used to get all the categories supported by AADE for a specific invoice type, whether it is income or expense. 
This way, you can limit the end user's options and lead him to select the correct category. 
Categories are used in invoice classification for the field classification.Category or the field classifications.classificationCategory 
The responsibility for selecting the appropriate category lies with the end user.
Public method getValidCategory(string) Retrieve all valid categories of a specific Classification Type. 
This function works in reverse and returns all the acceptable categories for a specific E3 code. 
You can use this function when the use knows the E3 Code and he is not sure which category should select. 
Categories are used in invoice classification for the field classification.Category or the field classifications.classificationCategory 
The responsibility for selecting the appropriate category lies with the end user.
Public method getValidCategoryNames(string, int) Get a list of all valid Categories with full descriptions for a specific InvoiceType and ClassificationCategory combination. 
This function can be used to get all the categories supported by AADE for a specific invoice type, whether it is income or expense. 
This way, you can limit the end user's options and lead him to select the correct category. The advantage of this method is that you can also get the description of each supported category, so the end user knows exactly what he is going to select. 
Categories are used in invoice classification for the field classification.Category or the field classifications.classificationCategory 
The responsibility for selecting the appropriate category lies with the end user. 
This function is not available in the Trial Version.
Public method getValidCategoryNames(string) Retrieve all valid categories of a specific Classification Type. 
This function works in reverse and returns all the acceptable categories for a specific E3 code. The advantage of this method is that you can also get the description of each supported category, so the end user knows exactly what he is going to select. 
You can use this function when the use knows the E3 Code and he is not sure which category should select. 
Categories are used in invoice classification for the field classification.Category or the field classifications.classificationCategory 
The responsibility for selecting the appropriate category lies with the end user. This function is not available in the Trial Version.
Public method getValidE3(string, string, int) Get a list of all valid E3 codes for a specific InvoiceType and ClassificationCategory combination. 
This function can be used to get all the E3 Codes supported by AADE for a specific invoice type with a specific category, whether it is income or expense. 
This way, you can limit the end user's options and lead him to select the correct E3 Code. 
E3 Codes are used in invoice classification for the field classification.Type or the field classifications.classificationType 
The responsibility for selecting the appropriate E3 Code lies with the end user.
Public method getValidE3Names(string, string, int) Get a list of all valid E3 codes with full descriptions for a specific InvoiceType and ClassificationCategory combination. 
This function can be used to get all the E3 Codes supported by AADE for a specific invoice type with a specific category, whether it is income or expense. 
This way, you can limit the end user's options and lead him to select the correct E3 Code. 
The advantage of this method is that you can also get the description of each supported E3 Code, so the end user knows exactly what he is going to select. 
E3 Codes are used in invoice classification for the field classification.Type or the field classifications.classificationType 
The responsibility for selecting the appropriate E3 Code lies with the end user. 
This function is not available in the Trial Version.
Public method getVatCategory(bool) Get all Vat Categories (code and description). 
Invoice Types are used in SendInvoices class for the field invoiceLine.VatCategory 
This way, you can limit the end user's options and lead him to select the correct Vat Category. 
When the Vat Category is 7, then an Exemption Category is required.
Public method getVatExemptionCategory(bool) Get all Vat Exemption Categories (code and description). 
Exemption Categories are used for the field invoiceLine.vatExemptionCategory and it is mandatory field when Vat Category of the invoiceLine is 7. 
Use this function to get the supported Vat Exemption Categories.
Public method getWithheldCategory(bool) Get all Withheld Categories (code and description). 
Withheld Categories are used for the field invoiceLine.withheldPercentCategory and it is mandatory field when Withheld Amount of the invoiceLine has value other than 0. 
Use this function to get the supported Withheld Categories.
Public method getspecialInvoiceCategory(bool) Get all Special Invoice Categories (code and description). 
Special Invoice Categories are used for the field elements.specialInvoiceCategory
The responsibility for selecting the appropriate Special Invoice Category lies with the end user.
Public method isGov(string) Check if a Greek VAT Number belongs to a Government Organization. 
This is ctitical for the Invoicing Provider, in order to determine if the transaction is B2G.
Top
Name Description
Public structure comb Combination Structure to be used with myDATATools.checkE3Class 
This combination refers to the classification on an invoice. You can check the combination of an invoice right before sending an invoice or right before sending a separate invoice classification to myDATA.
Top
Remarks
 
You can check if a classification is correct by using checkClassification
You can get a list of Valid Categories of an Invoice Type using getValidCategory
You can get a list of Valid Classification Types of an Invoice Type using getValidE3
 
ArbitransMyData.MyDataUtilities.myDATATools

.NET Framework

Supported in: 3.5 or newer

In this article

Definition