# 602 - Save Document

> MSS documentation · https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/receipts/602-receipts-save-document
>
> Eventos EXT_0602 Before/Replace/After ao gravar um recibo; o Replace pode cancelar a gravação devolvendo outCanSave.

602 - Save Document

| [Before ](https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/receipts/602-receipts-save-document.md#before) | EXT_0602_1_Before | Will be executed before MSS saves the receipt; |
| --- | --- | --- |
| [Replace](https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/receipts/602-receipts-save-document.md#replace) | EXT_0602_2_Replace | Will be executed before MSS saves the receipt with the possibility to say MSS to cancel the saving process; |
| After | EXT_0602_3_After | Will be executed after the receipt is saved; |

### Before

_Input Parameters_

* inReceiptExercise – Exercise of the receipt;
* inReceiptType – Type of the receipt;
* inReceiptSeries – Series of the receipt;
* inReceiptNumber – Number of the receipt;
* inCustomerCode – Code of the selected customer;

### Replace

_Input Parameters_

* inReceiptExercise – Exercise of the receipt;
* inReceiptType – Type of the receipt;
* inReceiptSeries – Series of the receipt;
* inReceiptNumber – Number of the receipt;
* inCustomerCode – Code of the selected customer;

_Output Parameters_

* outCanSave – Return code: 1 – Save the document / 0 – Cancel
