Visão Geral do Programa

O objetivo deste ProcessServer é possibilitar a inclusão / alteração de lançamento para uma parcela de um contrato do aluno através de WebService. Os lançamentos incluídos poderão ser visualizados através da visão de lançamentos do Totvs Gestão Financeira ou através da edição da parcela considerada na geração.

Através do processServer "EduGerarLancFromParcelaData" é possível, por meio do método ExecuteWithXmlParams, realizar a inclusão ou alteração de um lançamento de uma determinada parcela.

Se necessário clique aqui para obter ajuda na configuração do Host.

Método ExecuteWithXmlParams

Este método realizará a inclusão ou alteração de um lançamento. Deve ser informando o código da coligada e o id da parcela, além das outras informações que compõem o contexto de execução como $CODCOLIGADA, $CODFILIAL, $CODTIPOCURSO, $CODSISTEMA e $CODUSUARIO. O sistema irá realizar uma inclusão de lançamento caso não a parcela não possua vínculo com lançamento gerado (registro na SLAN). Se já existir um vínculo entre um lançamento e a parcela, o respectivo lançamento da parcela será alterado (regerado).

Utilização do WebService

Inclusão ou alteração de lançamento da parcela

Para realizar inclusão ou alteração de um lançamento para a parcela, deve ser utilizado a operação de ExecuteWithXmlParams. Deve ser passado um XML contendo basicamente a identificação da parcela (CODCOLIGADA, IDPARCELA) e os campos do contexto de execução com os valores como se o usuário estivesse logado no sistema.

Campos obrigatórios: CODCOLIGADA, IDPARCELA, $CODCOLIGADA, $CODFILIAL, $CODTIPOCURSO, $CODSISTEMA, $CODUSUARIO

Exemplo de XML para inclusão / alteração de lançamentos

Geração da parcela 48169
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tot="http://www.totvs.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <tot:ExecuteWithXmlParams>
         <!--Optional:-->
         <tot:ProcessServerName>EduGerarLancFromParcelaData</tot:ProcessServerName>
         <!--Optional:-->
         <tot:strXmlParams><![CDATA[<?xml version="1.0" encoding="utf-16"?>
<EduGeraLancParamsProc z:Id="i1" xmlns="http://www.totvs.com.br/RM/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
  <ActionModule xmlns="http://www.totvs.com/">S</ActionModule>
  <ActionName xmlns="http://www.totvs.com/">EduGerarLancFromParcela</ActionName>
  <CodUsuario xmlns="http://www.totvs.com/">mestre</CodUsuario>
  <Context z:Id="i2" xmlns="http://www.totvs.com/" xmlns:a="http://www.totvs.com.br/RM/">
    <a:_params xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$EXERCICIOFISCAL</b:Key>
        <b:Value i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">22</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODLOCPRT</b:Key>
        <b:Value i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">12</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODTIPOCURSO</b:Key>
        <b:Value i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">1</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$EDUTIPOUSR</b:Key>
        <b:Value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">A</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODUNIDADEBIB</b:Key>
        <b:Value i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">5</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODCOLIGADA</b:Key>
        <b:Value i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">1</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$RHTIPOUSR</b:Key>
        <b:Value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">01</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODIGOEXTERNO</b:Key>
        <b:Value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">-1</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODSISTEMA</b:Key>
        <b:Value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">S</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODUSUARIOSERVICO</b:Key>
        <b:Value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema" />
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODUSUARIO</b:Key>
        <b:Value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">mestre</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$IDPRJ</b:Key>
        <b:Value i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">-1</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CHAPAFUNCIONARIO</b:Key>
        <b:Value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">00027</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODFILIAL</b:Key>
        <b:Value i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">1</b:Value>
      </b:KeyValueOfanyTypeanyType>
    </a:_params>
    <a:Environment>DotNet</a:Environment>
  </Context>
  <PrimaryKeyList xmlns="http://www.totvs.com/" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <a:ArrayOfanyType>
      <a:anyType i:type="b:short" xmlns:b="http://www.w3.org/2001/XMLSchema">1</a:anyType>
      <a:anyType i:type="b:int" xmlns:b="http://www.w3.org/2001/XMLSchema">48169</a:anyType>
    </a:ArrayOfanyType>
  </PrimaryKeyList>
  <PrimaryKeyNames xmlns="http://www.totvs.com/" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <a:string>CODCOLIGADA</a:string>
    <a:string>IDPARCELA</a:string>
  </PrimaryKeyNames>
  <ClausulaFiltroRa i:nil="true" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
  <CodCurso i:nil="true" />
  <CodGrade i:nil="true" />
  <CodHabilitacao i:nil="true" />
  <CodSentencaSql i:nil="true" />
  <CodTurma i:nil="true" />
  <CodTurno>0</CodTurno>
  <ParamsGeraLanc z:Id="i3">
    <AgrupamentoBoleto i:nil="true" />
    <BoletoPorServico i:nil="true" />
    <CampoAlfaOp1 i:nil="true" />
    <CampoAlfaOp2 i:nil="true" />
    <CampoAlfaOp3 i:nil="true" />
    <CnabCarteira i:nil="true" />
    <CodCCusto i:nil="true" />
    <CodCfo i:nil="true" />
    <CodColCfo>0</CodColCfo>
    <CodColCxa i:nil="true" />
    <CodColCxaAPagar i:nil="true" />
    <CodColNatFinanceira i:nil="true" />
    <CodColigada>1</CodColigada>
    <CodColigadaConta>0</CodColigadaConta>
    <CodContrato i:nil="true" />
    <CodCxa i:nil="true" />
    <CodCxaAPagar i:nil="true" />
    <CodDepto i:nil="true" />
    <CodEvento i:nil="true" />
    <CodFilial>1</CodFilial>
    <CodMoeda i:nil="true" />
    <CodNatFinanceira i:nil="true" />
    <CodTabOp1 i:nil="true" />
    <CodTabOp2 i:nil="true" />
    <CodTabOp3 i:nil="true" />
    <CodTabOp4 i:nil="true" />
    <CodTabOp5 i:nil="true" />
    <CodTipoCurso>1</CodTipoCurso>
    <CodTipoDocumento i:nil="true" />
    <CodTipoDocumentoAPagar i:nil="true" />
    <CodUsuario>mestre</CodUsuario>
    <ContratoHabNull i:nil="true" />
    <CotaFinal i:nil="true" />
    <CotaInicial i:nil="true" />
    <DataCompetencia i:nil="true" />
    <DataFinal i:nil="true" />
    <DataInicial i:nil="true" />
    <DataOp1 i:nil="true" />
    <DataOp2 i:nil="true" />
    <DataOp3 i:nil="true" />
    <DataOp4 i:nil="true" />
    <DataOp5 i:nil="true" />
    <DataVencimento>0001-01-01T00:00:00</DataVencimento>
    <Historico i:nil="true" />
    <IncluirExcluirBolsaRetroativa>Inclusao</IncluirExcluirBolsaRetroativa>
    <IsBolsaRetroativaModAntigo_NaoReGerarBoleto>false</IsBolsaRetroativaModAntigo_NaoReGerarBoleto>
    <IsIncluirExcluirBolsaRetroativa>false</IsIncluirExcluirBolsaRetroativa>
    <IsSimulaLancamento>false</IsSimulaLancamento>
    <ListaAlunos xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
    <ListaContaCorrente />
    <ListaHabilitacaoFilial xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
    <ListaIdParcela xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
    <ListaPeriodoLetivo xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
    <ListaPlanosPgto xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
    <ListaServicos xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
    <ListaTipoContrato xmlns:a="http://schemas.datacontract.org/2004/07/RM.Edu.Consts" />
    <ListaTipoParcela xmlns:a="http://schemas.datacontract.org/2004/07/RM.Edu.Consts" />
    <NroConta i:nil="true" />
    <NumAgencia i:nil="true" />
    <NumAgenciaAPagar i:nil="true" />
    <NumBanco i:nil="true" />
    <NumBancoAPagar i:nil="true" />
    <OperacaoBolsaRetroativa i:nil="true" />
    <OrigemParcela i:nil="true" />
    <ParcelaFinal i:nil="true" />
    <ParcelaInicial i:nil="true" />
    <PermiteAtualizarContaCorrente>true</PermiteAtualizarContaCorrente>
    <TipoCob i:nil="true" />
    <TipoContaCaixa i:nil="true" />
    <TipoContabilLan i:nil="true" />
    <TipoContabilLanAPagar i:nil="true" />
    <TipoSelecaoParcela>IdParcela</TipoSelecaoParcela>
    <ValorBolsaRetroativa>0</ValorBolsaRetroativa>
    <ValorOriginal>0</ValorOriginal>
  </ParamsGeraLanc>
  <RA i:nil="true" />
  <SalvarParams>false</SalvarParams>
  <TipoFiltro>Nenhum</TipoFiltro>
  <ValorParamsConsultaSql i:nil="true" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
</EduGeraLancParamsProc>]]></tot:strXmlParams>
      </tot:ExecuteWithXmlParams>
   </soapenv:Body>
</soapenv:Envelope>

Exemplo do retorno da inclusão / alteração de lançamento

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <ExecuteWithXmlParamsResponse xmlns="http://www.totvs.com/">
         <ExecuteWithXmlParamsResult>1</ExecuteWithXmlParamsResult>
      </ExecuteWithXmlParamsResponse>
   </s:Body>
</s:Envelope>