# 3200 - Purchases Module

> MSS documentation · https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/purchases/3200-purchases-purchases-module
>
> Eventos EXT_3200 ao abrir e fechar o módulo Compras; o Replace substitui o módulo e devolve o documento criado (outEXR, outTPD, outSER, outNDC).

3200 - Purchases Module

| Event | Extension action set | Description |
| --- | --- | --- |
| [Before ](https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/purchases/3200-purchases-purchases-module.md#before) | EXT_3200_1_Before | Will be executed before MSS opens the Purchases module; |
| [Replace](https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/purchases/3200-purchases-purchases-module.md#replace) | EXT_3200_2_Replace | Will replace MSS Purchases module; |
| [After](https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/purchases/3200-purchases-purchases-module.md#after) | EXT_3200_3_After | Will be executed after closing the Purchases module; |

### Before

_Input Parameters_

* inDocumentType – Document type to select automatically;
* inSupplierCode – Customer code to select automatically;
* inDeliveryPlaceCode – Delivery place to select automatically;
* inRouteCode – Active route code;
* inSubRouteCode – Active sub-route code;

### Replace

_Input Parameters_

* inDocumentType – Document type to select automatically;
* inSupplierCode – Customer code to select automatically;
* inDeliveryPlaceCode – Delivery place to select automatically;
* inRouteCode – Active route code;
* inSubRouteCode – Active sub-route code;

_Output Parameters_

* outResultCode – Return code: 1 – a document was created / 0 – no document was created;
* outEXR – Exercise of the document created;
* outTPD – Document type;
* outSER – Serie;
* outNDC – Number;

### After

_Input Parameters_

* inDocumentExercise – Exercise of the document;
* inDocumentType – Type of the document;
* inDocumentSeries – Series of the document;
* inDocumentNumber – Number of the document;
* inSupplierCode – Code of the selected customer;
