Skip to content

Commit

Permalink
Update envia_preco.json - utilização do parâmetro MV_LJCNVDA
Browse files Browse the repository at this point in the history
Foi incluido tratamento para utilizar o parâmetro MV_LJCNVDA, assim pode-se utilizar as tabelas SB0 ou DA0\DA1
  • Loading branch information
rfltdc authored Sep 8, 2023
1 parent 7b0ad28 commit c66f132
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions pdvsync/envio/envia_preco.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
{
"dataHoraVigenciaInicial": "&FwTimeStamp(3,SToD(Self:oPublica['DA1_DATVIG']),Self:oPublica['DA0'][1]['DA0_HORADE'])",
"dataHoraVigenciaFinal": "&IIf(!Empty(Self:oPublica['DA0'][1]['DA0_DATATE']),FwTimeStamp(3,SToD(Self:oPublica['DA0'][1]['DA0_DATATE']),Self:oPublica['DA0'][1]['DA0_HORATE']),'9999-01-31T23:59')",
"codigoProduto": "&Self:oPublica['DA1_CODPRO']",
"idRetaguardaProduto": "&Self:oPublica['DA1_CODPRO']",
"valor": "&StrTran( cValToChar(Self:oPublica['DA1_PRCVEN']), '.', ',') ",
"situacao": "&IIF(Self:cEvento == '1' .AND. Self:oPublica['DA0'][1]['DA0_ATIVO'] == '1' .AND. Self:oPublica['DA1_ATIVO'] == '1', 1, 0)",
"dataHoraVigenciaInicial": "&IIF( SuperGetMv('MV_LJCNVDA', , .F.), FwTimeStamp(3), FwTimeStamp(3,SToD(Self:oPublica['DA1_DATVIG']),Self:oPublica['DA0'][1]['DA0_HORADE']) )",
"dataHoraVigenciaFinal": "&IIF( SuperGetMv('MV_LJCNVDA', , .F.), 9999-01-31T23:59, IIF(!Empty(Self:oPublica['DA0'][1]['DA0_DATATE']),FwTimeStamp(3,SToD(Self:oPublica['DA0'][1]['DA0_DATATE']),Self:oPublica['DA0'][1]['DA0_HORATE']),'9999-01-31T23:59') )",
"codigoProduto": "&IIF( SuperGetMv('MV_LJCNVDA', , .F.), Self:oPublica['B0_COD'], Self:oPublica['DA1_CODPRO'] )",
"idRetaguardaProduto": "&IIF( SuperGetMv('MV_LJCNVDA', , .F.), Self:oPublica['B0_COD'], Self:oPublica['DA1_CODPRO'] )",
"valor": "&StrTran( cValToChar( IIF( Posicione('SB1', 1, xFilial('SB1') + Self:oPublica['DA1_CODPRO'], 'B1_PRV1') > 0, Posicione('SB1', 1, xFilial('SB1') + Self:oPublica['DA1_CODPRO'], 'B1_PRV1'), IIF( SuperGetMv('MV_LJCNVDA', , .F.), Self:oPublica['B0_PRV1'], Self:oPublica['DA1_PRCVEN'] ) ) ) , '.', ',' )",
"precoPromocional": "&StrTran( cValToChar( IIF( SuperGetMv('MV_LJCNVDA', , .F.), Self:oPublica['B0_PRV1'], Self:oPublica['DA1_PRCVEN'] ) ), '.', ',' )",
"situacao": "&IIF( SuperGetMv('MV_LJCNVDA', , .F.), IIF(Empty(Self:oPublica['B0_PRV1']) .Or. Self:cEvento <> '1', 0, 1), IIF(Self:cEvento == '1' .AND. Self:oPublica['DA0'][1]['DA0_ATIVO'] == '1' .AND. Self:oPublica['DA1_ATIVO'] == '1', 1, 0) )",
"sincronizadoEtiquetaEletronica": 0,
"idInquilino": "&self:oConfAssin['inquilino']",
"idRetaguarda": "&Self:oPublica['DA1_CODTAB'] + Self:oPublica['DA1_CODPRO']",
"dataAtualizacao": "&FwTimeStamp(6)",
"dataCadastro": "&FwTimeStamp(6)",
"idRetaguarda": "&IIF( SuperGetMv('MV_LJCNVDA', , .F.), '1' + Self:oPublica['B0_COD'], Self:oPublica['DA1_CODTAB'] + Self:oPublica['DA1_CODPRO'] + Self:oPublica['DA1_ITEM'] )",
"dataAtualizacao": "&FwTimeStamp(3)",
"dataCadastro": "&FwTimeStamp(3)",
"idProprietario": "&LjRetComp()",
"loteOrigem": "&Self:cLote",
"configPSH": { "Version": "1.0" }
}
"configPSH": {
"Version": "2.0"
}
}

0 comments on commit c66f132

Please sign in to comment.