Páginas filhas
  • DI Despesa Geral - PeriodGlBalance

A integração de despesa geral consiste na movimentação de lançamentos no sentido ERP para PIMS Multicultivos, ou seja, será realizada no ERP e enviada para o PIMS Multicultivos através do PIMSConnector. O objetivo é realizar o processamento dos custos agrícolas, através dos valores consumidos por centro de custos e conta contábil.

Observação: Caso seja necessário realizar o reprocessamento de despesas gerais, para o mesmo período, é preciso realizar a exclusão dos registros integrados no PIMS Multicultivos. Se a exclusão dos registros integrados não forem realizadas, pode gerar inconsistências nos valores enviados no processo de integração.

Informações da Mensagem

  • Identificador da Mensagem: PeriodGlBalance
  • Versão: 1.000
  • Módulo PIMS Multicultivos: Despesa Geral*
  • Tipo de Envio: Assíncrona / Síncrona

*Não há um módulo específico de Despesa Geral no PIMS Multicultivos, o conteúdo das integrações são gravadas na tabela "BRG_CSTG_INTDG" para posteriormente serem utilizadas no PIMS Multicultivos.

Campos Obrigatórios

  • Período das despesas gerais;
  • Código do centro de custos;
  • Código da conta contábil;
  • Código da empresa;
  • Código da filial;
  • Valor.

Exemplos de Mensagens

Mensagem XML

PeriodGlBalance_Envio
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TOTVSMessage>
	<MessageInformation version="1.000">
		<BranchId/>
		<CompanyId>50</CompanyId>
		<DeliveryType>Async</DeliveryType>
		<GeneratedOn>2018-05-17T10:52:41.656-03:00</GeneratedOn>
		<Product name="ERP" version="12.1.21"/>
		<SourceApplication>dts11buzios8480</SourceApplication>
		<StandardVersion>1.0</StandardVersion>
		<Transaction>periodglbalance</Transaction>
		<Type>BusinessMessage</Type>
		<UUID>f719a39e-cf4e-6d92-3c14-6f81041d15de</UUID>
	</MessageInformation>
	<BusinessMessage>
		<BusinessEvent>
			<Entity>periodglbalance</Entity>
			<Event>upsert</Event>
			<Identification/>
		</BusinessEvent>
		<BusinessContent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
			<PeriodGlBalance>
				<SelectionInformation>
					<ListOfRuleInformation>
						<RuleInformation>
							<RuleType>Conta Contábil</RuleType>
							<InitialValue>100000000000000</InitialValue>
							<FinalValue>300000000000000</FinalValue>
						</RuleInformation>
						<RuleInformation>
							<RuleType>Estabelecimento</RuleType>
							<InitialValue>001</InitialValue>
							<FinalValue>var</FinalValue>
						</RuleInformation>
						<RuleInformation>
							<RuleType>Unid Negócio</RuleType>
							<InitialValue>000</InitialValue>
							<FinalValue>XX3</FinalValue>
						</RuleInformation>
						<RuleInformation>
							<RuleType>Projeto</RuleType>
							<InitialValue/>
							<FinalValue/>
						</RuleInformation>
					</ListOfRuleInformation>
				</SelectionInformation>
				<ParametersInformation>
					<PeriodInformation>
						<GLPeriodDate>2017-01-31</GLPeriodDate>
					</PeriodInformation>
					<FirstPart>true</FirstPart>
				</ParametersInformation>
				<ListOfPeriodGLBalanceInformation>
					<PeriodGLBalanceInformation>
						<CompanyId>10</CompanyId>
						<BranchId>1</BranchId>
						<CompanyInternalId>10|1@empresa</CompanyInternalId>
						<CostCenterInformation>
							<CostCenterCode>000000000000100</CostCenterCode>
						</CostCenterInformation>
						<AccountInformation>
							<AccountCode>200000000000000</AccountCode>
						</AccountInformation>
						<InitialBalance>1091704.67</InitialBalance>
						<CreditValue>0</CreditValue>
						<DebitValue>121667</DebitValue>
						<FinalBalance>1213371.67</FinalBalance>
					</PeriodGLBalanceInformation>
					<PeriodGLBalanceInformation>
						<CompanyId>10</CompanyId>
						<BranchId>1</BranchId>
						<CompanyInternalId>10|1@empresa</CompanyInternalId>
						<CostCenterInformation>
							<CostCenterCode>000000000000100</CostCenterCode>
						</CostCenterInformation>
						<AccountInformation>
							<AccountCode>210000000000000</AccountCode>
						</AccountInformation>
						<InitialBalance>1091704.67</InitialBalance>
						<CreditValue>0</CreditValue>
						<DebitValue>121667</DebitValue>
						<FinalBalance>1213371.67</FinalBalance>
					</PeriodGLBalanceInformation>
					<PeriodGLBalanceInformation>
						<CompanyId>10</CompanyId>
						<BranchId>1</BranchId>
						<CompanyInternalId>10|1@empresa</CompanyInternalId>
						<CostCenterInformation>
							<CostCenterCode>000000000000100</CostCenterCode>
						</CostCenterInformation>
						<AccountInformation>
							<AccountCode>211000000000000</AccountCode>
						</AccountInformation>
						<InitialBalance>1091704.67</InitialBalance>
						<CreditValue>0</CreditValue>
						<DebitValue>121667</DebitValue>
						<FinalBalance>1213371.67</FinalBalance>
					</PeriodGLBalanceInformation>
					<PeriodGLBalanceInformation>
						<CompanyId>10</CompanyId>
						<BranchId>1</BranchId>
						<CompanyInternalId>10|1@empresa</CompanyInternalId>
						<CostCenterInformation>
							<CostCenterCode>000000000000100</CostCenterCode>
						</CostCenterInformation>
						<AccountInformation>
							<AccountCode>211050400000507</AccountCode>
						</AccountInformation>
						<InitialBalance>3684.44</InitialBalance>
						<CreditValue>0</CreditValue>
						<DebitValue>0</DebitValue>
						<FinalBalance>3684.44</FinalBalance>
					</PeriodGLBalanceInformation>
					<PeriodGLBalanceInformation>
						<CompanyId>10</CompanyId>
						<BranchId>1</BranchId>
						<CompanyInternalId>10|1@empresa</CompanyInternalId>
						<CostCenterInformation>
							<CostCenterCode>000000000000100</CostCenterCode>
						</CostCenterInformation>
						<AccountInformation>
							<AccountCode>211050400000529</AccountCode>
						</AccountInformation>
						<InitialBalance>1088020.23</InitialBalance>
						<CreditValue>0</CreditValue>
						<DebitValue>121667</DebitValue>
						<FinalBalance>1209687.23</FinalBalance>
					</PeriodGLBalanceInformation>
				</ListOfPeriodGLBalanceInformation>
			</PeriodGlBalance>
		</BusinessContent>
	</BusinessMessage>
</TOTVSMessage>
PeriodGlBalance_Retorno
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TOTVSMessage>
	<MessageInformation version="1.000">
		<BranchId/>
		<CompanyId>50</CompanyId>
		<DeliveryType>Async</DeliveryType>
		<GeneratedOn>2018-05-17T10:55:00</GeneratedOn>
		<Product name="PIMS" version="12.1.21"/>
		<SourceApplication>PIMSCONNECTOR</SourceApplication>
		<StandardVersion>1.000</StandardVersion>
		<Transaction>periodglbalance</Transaction>
		<Type>Response</Type>
		<UUID>edfc2b98-ae08-4f51-a142-655593843b39</UUID>
	</MessageInformation>
	<ResponseMessage>
		<ProcessingInformation>
			<ProcessedOn>2018-05-17T10:55:00</ProcessedOn>
			<Status>OK</Status>
		</ProcessingInformation>
		<ReceivedMessage>
			<MessageContent/>
			<SentBy>ERP</SentBy>
			<UUID>f719a39e-cf4e-6d92-3c14-6f81041d15de</UUID>
		</ReceivedMessage>
		<ReturnContent>
			<ListOfInternalId>
				<InternalId>
					<Destination>||5909965689642224688</Destination>
					<Name>periodglbalance</Name>
					<Origin>0</Origin>
				</InternalId>
			</ListOfInternalId>
		</ReturnContent>
	</ResponseMessage>
</TOTVSMessage>

Mensagem JSON

PeriodGlBalance_Envio
{
	"TOTVSMessage" : {
		"MessageInformation" : {
			"@version" : "1.000",
			"BranchId" : null,
			"CompanyId" : "50",
			"DeliveryType" : "Async",
			"GeneratedOn" : "2018-05-17T10:52:41.656-03:00",
			"Product" : {
				"@name" : "ERP",
				"@version" : "12.1.21"
			},
			"SourceApplication" : "dts11buzios8480",
			"StandardVersion" : "1.0",
			"Transaction" : "periodglbalance",
			"Type" : "BusinessMessage",
			"UUID" : "f719a39e-cf4e-6d92-3c14-6f81041d15de"
		},
		"BusinessMessage" : {
			"BusinessEvent" : {
				"Entity" : "periodglbalance",
				"Event" : "upsert",
				"Identification" : null
			},
			"BusinessContent" : {
				"@xmlns:xsi" : "http://www.w3.org/2001/XMLSchema-instance",
				"PeriodGlBalance" : {
					"SelectionInformation" : {
						"ListOfRuleInformation" : {
							"RuleInformation" : [ {
								"RuleType" : "Conta Contábil",
								"InitialValue" : "100000000000000",
								"FinalValue" : "300000000000000"
							}, {
								"RuleType" : "Estabelecimento",
								"InitialValue" : "001",
								"FinalValue" : "var"
							}, {
								"RuleType" : "Unid Negócio",
								"InitialValue" : "000",
								"FinalValue" : "XX3"
							}, {
								"RuleType" : "Projeto",
								"InitialValue" : null,
								"FinalValue" : null
							} ]
						}
					},
					"ParametersInformation" : {
						"PeriodInformation" : {
							"GLPeriodDate" : "2017-01-31"
						},
						"FirstPart" : "true"
					},
					"ListOfPeriodGLBalanceInformation" : {
						"PeriodGLBalanceInformation" : [ {
							"CompanyId" : "10",
							"BranchId" : "1",
							"CompanyInternalId" : "10|1@empresa",
							"CostCenterInformation" : {
								"CostCenterCode" : "000000000000100"
							},
							"AccountInformation" : {
								"AccountCode" : "200000000000000"
							},
							"InitialBalance" : "1091704.67",
							"CreditValue" : "0",
							"DebitValue" : "121667",
							"FinalBalance" : "1213371.67"
						}, {
							"CompanyId" : "10",
							"BranchId" : "1",
							"CompanyInternalId" : "10|1@empresa",
							"CostCenterInformation" : {
								"CostCenterCode" : "000000000000100"
							},
							"AccountInformation" : {
								"AccountCode" : "210000000000000"
							},
							"InitialBalance" : "1091704.67",
							"CreditValue" : "0",
							"DebitValue" : "121667",
							"FinalBalance" : "1213371.67"
						}, {
							"CompanyId" : "10",
							"BranchId" : "1",
							"CompanyInternalId" : "10|1@empresa",
							"CostCenterInformation" : {
								"CostCenterCode" : "000000000000100"
							},
							"AccountInformation" : {
								"AccountCode" : "211000000000000"
							},
							"InitialBalance" : "1091704.67",
							"CreditValue" : "0",
							"DebitValue" : "121667",
							"FinalBalance" : "1213371.67"
						}, {
							"CompanyId" : "10",
							"BranchId" : "1",
							"CompanyInternalId" : "10|1@empresa",
							"CostCenterInformation" : {
								"CostCenterCode" : "000000000000100"
							},
							"AccountInformation" : {
								"AccountCode" : "211050400000507"
							},
							"InitialBalance" : "3684.44",
							"CreditValue" : "0",
							"DebitValue" : "0",
							"FinalBalance" : "3684.44"
						}, {
							"CompanyId" : "10",
							"BranchId" : "1",
							"CompanyInternalId" : "10|1@empresa",
							"CostCenterInformation" : {
								"CostCenterCode" : "000000000000100"
							},
							"AccountInformation" : {
								"AccountCode" : "211050400000529"
							},
							"InitialBalance" : "1088020.23",
							"CreditValue" : "0",
							"DebitValue" : "121667",
							"FinalBalance" : "1209687.23"
						} ]
					}
				}
			}
		}
	}
}
PeriodGlBalance_Retorno
{
	"TOTVSMessage" : {
		"MessageInformation" : {
			"@version" : "1.000",
			"BranchId" : null,
			"CompanyId" : "50",
			"DeliveryType" : "Async",
			"GeneratedOn" : "2018-05-17T10:55:00",
			"Product" : {
				"@name" : "PIMS",
				"@version" : "12.1.21"
			},
			"SourceApplication" : "PIMSCONNECTOR",
			"StandardVersion" : "1.000",
			"Transaction" : "periodglbalance",
			"Type" : "Response",
			"UUID" : "edfc2b98-ae08-4f51-a142-655593843b39"
		},
		"ResponseMessage" : {
			"ProcessingInformation" : {
				"ProcessedOn" : "2018-05-17T10:55:00",
				"Status" : "OK"
			},
			"ReceivedMessage" : {
				"MessageContent" : null,
				"SentBy" : "ERP",
				"UUID" : "f719a39e-cf4e-6d92-3c14-6f81041d15de"
			},
			"ReturnContent" : {
				"ListOfInternalId" : {
					"InternalId" : {
						"Destination" : "||5909965689642224688",
						"Name" : "periodglbalance",
						"Origin" : "0"
					}
				}
			}
		}
	}
}

Descrição Detalhada das Tags

SEGMENTOTAGSTIPOTAMANHODESCRITIVO DA TAG


BusinessEvent

EntityString50Nome da entidade que gerou o evento
EventString10Qual foi o evento associado à mensagem (pode ser upsert – inclusão/alteração ou delete – eliminação)
IdentificationString-Campos da chave primária da transação. Atributo "Name" define o nome do campo, enquanto que o conteúdo do elemento representa o valor do campo






BusinessContent

TransactionNumber--

Número interno da transação, utilizado como chave primária no movimento de estoque

CompanyIdString20Código da empresa
BranchIdString

10

Código da filial

CostCenterCodeString20Código do centro de custo
AccountCodeString20Código da conta contábil
InitialBalanceNumber14,6Saldo inicial do período
CreditValueNumber14,6Valor de crédito do período
DebitValueNumber14,6Valor de débito do período
GLPeriodDateDate-Data da exportação do saldo

Limitações e Restrições

  • Esta integração está disponível a partir da versão 12.1.14 do PIMS Multicultivos e PIMSConnector;
  • A integração de cespesa geral para o PIMS Multicultivos é realizada em modo exclusivo entre as unidades administrativas.