# EXT\_Article\_GetTotals

> MSS documentation · https://doc.sysdevmobile.com/mss/extensibility/functions-kalipso-to-mss/article/ext_article_gettotals
>
> EXT_Article_GetTotals calcula os totais de uma linha (descontos, valor sem IVA, IVA, taxas) a partir de quantidade, preço e descontos.

Function to get the totals for an article given a certain quantity, price and discounts.

_Input parameters_:

* inDocumentType – Type of the document;
* inCustomerCode – Code of the customer;
* inArticleCode – Code of article;
* inLength – Length of the article (ARTCMP);
* inWidth – Width of the article (ARTLGR);
* inHeight – Height of the article (ARTALT);
* inWeight – Weight of the article (ARTPES);
* inTotalWeight – Total weight (ARTPES \* Quantity);
* inQuantity – Quantity;
* inQuantityFactor – Quantity factor when using alternative units;
* inPrice – Price;
* inDiscount1 – Discount 1;
* inDiscount2 – Discount 2;
* inDiscount3 – Discount 3;
* inDiscount4 – Discount 4;
* inLineType – Line type (N – Normal / B – Bonus / O – Offer / D - Returns);
* inGlobalDiscount – Global commercial discount of the document;
* inPPDiscount – Global PP discount of the document;

_Output parameters_:

* outTotalDiscounts – Total value of the discounts applied;
* outTotalWithoutVAT – Total without VAT tax;
* outTotalAdditionalTaxes – Total of additional taxes;
* outTotalVAT – VAT total value;
* outTotalWithoutDiscounts – Total without discounts;
* outVATTax – VAT tax used in VAT calculation;

:::info
Note: Line total = outTotalWithoutVAT + outTotalVAT.
:::
