V10 ResourcesGuides
ResourcesGuides
Guides
Back | List of Articles

How to manage employee receipts by integration?

Last changed in 02/07/2020

Processing receipts for employees is one of the most used features in the Human Resources module. From this operation, it is possible to generate receipts in PDF format with the values related to the allowances earned in the selected period.

Customize receipts

The receipts processing feature for employees comprehend a range of multiple options that allow to generate custom receipts, for example;

  • Agglomerate Receipts: identifies if the receipts should be generated as an agglomerate or separately;
  • Report: name of the report that will be used to generate the PDF. A system report is available, but the user could use another document if the structure suggested byPRIMAVERA is followed;
  • Employee Code: employee identifier;
  • Year: value regarding the year;
  • Period Number: month in which the receipt will be processed.

Process receipts

This article has the purpose of demonstrating how to process receipts using the engines, by following these steps:

Step 1 - Add references

To use the objects, it is necessary to apply the following references for the Human Resources engines:

  • RhpBE100;
  • IRhpBS100.

Step 2 - Fill in the object with the receipt information

To generate a receipt, it is necessary to consider a few configurations that allow to create the PDF, according to the user options.

The object "RHPBERecibo" must be filled in with the necessary properties.

RhpBERecibo  recibo = new RhpBERecibo

{

CodigoFuncionario = "Código do funcionário",

Ano = "Ano",

NumPeriodo = "Mês a considerar",

CodigoPeriodo = "Código do Período",

Observacoes = "Observações necessárias",

ImprAglomearar = "Validação de aglomeração",

Relatorio = "Nome do mapa, poderá ser RHPR0006",

Moeda ="0"

};

Step 3 - Fill in the objects with the processing information

The employee receipt can have more than one processing type, for example: salary, vacation and Christmas allowances. For that, it is necessary to add the processings regarding the receipt processed to the object created in the previous step.

Thus, you should add to the "RhpBERecibo" an object of the type "RhpBEReciboProcessamento" for each processing.

recibo.Processamentos.Add(new.RhpBEReciboProcessamento

{

NumProc = "Numero do processamento",

TipoVencimento = "Tipo Do vencimento",

DataMovimento = "Data do Movimento",

TotalDescontos = "Total de descontos do processamento",

TotalRemuneracoes = "Total de remunerações do processamento",

TotalLiquido = TotalDescontos - TotalRemuneracoes

});

Step 4 - Generate receipts in PDF

After performing the previous steps, it is possible to generate a receipt considering the filled in object. This operation is divided in three steps:

  1. Open the printing engine: Opens the printing engine once, allowing to quickly generate multiple receipts without needing to open the connection to each processing;
    PriEngine.Engine.RecursosHumanos.Recibos.IniciaProcessamentoRecibos();
  2. Process the receipt;

    PriEngine.Engine.RecursosHumanos.Recibos.ProcessaRecibos(recibo, false);
  3. Close the printing engine: After generating the receipts, the printing engine should be closed.
    PriEngine.Engine.RecursosHumanos.Recibos.TerminaProcessamentoRecibos();

The receipt information will be stores in the database in the table "Receipts", in the field PDF. The meta information regarding the processings used for the receipts is also stored in the table "FuncRecibosProcs".

Bookmark or share this article
Esta página foi útil?
Obrigado pelo seu voto.

login para deixar a sua opinião.

Obrigado pelo seu feedback. Iremos analisá-lo para continuarmos a melhorar!
Artigos Relacionados
Começar a Usar Como criar um projeto de integração com Visual Studio? Como criar um projeto de extensibilidade de interface (PEX) com Visual Studio? Como criar um projeto de extensibilidade de API (Motor) com Visual Studio? Como criar separadores do utilizador com Visual Studio?