Incio em 19/02/2024 10:59:12
psDDFChamada=1, psFileDDS=dd_files/erp_ORDENS_CanalWeb.dda, psTagDDS=Padrao_CPgmto, psLogin=133, psLogin0=, piTimeLogin=1708351088315, psAncestrais=1121035, psIrmasTias=13//2024-02-16 00:00:00/1/10/72840/0//1/0/0/0/0/0/0/0/0/0/0//0//0.00000/JUSTO DO BRASIL LTDA, piSss=3
psOOpLogin=-1, sRoot=0, psTDoc=, psMnemTDoc=Ordens, psCliPasta=desenvolvimento, ppChaveSalva_1=
plMobile=0, plEchoJson=0, plEchoUtf8=0
GET -> key => value = sCliPasta => desenvolvimento
GET -> key => value = pCiaLogin => 0
GET -> key => value = iCompany => 12
GET -> key => value = sDDFChamada => 1
GET -> key => value = sFileDDS => dd_files/erp_ORDENS_CanalWeb.dda
GET -> key => value = sTagDDS => Padrao_CPgmto
GET -> key => value = sLogin => 133
GET -> key => value = fLogin => 118
GET -> key => value = sTDoc => 
GET -> key => value = sMnemTDoc => Ordens
GET -> key => value = sAncestrais => 1121035
GET -> key => value = sIrmasTias => 13//2024-02-16 00:00:00/1/10/72840/0//1/0/0/0/0/0/0/0/0/0/0//0//0.00000/JUSTO DO BRASIL LTDA
GET -> key => value = sId => 1121035
GET -> key => value = spOOp => -1
GET -> key => value = sRoot => 0
GET -> key => value = iDesenvolvedor => 0
GET -> key => value = iGlobalKeyUser => 0
GET -> key => value = iTimeLogin => 1708351088315
GET -> key => value = iSss => 3
al_Get_fsLoad_include.php-inicio
fsLoadTag
fsLoadBloco
fsLoadFTag
fsLoadFBloco
al_Get_fsLoad_include.php-fim-sTxt=<Padrao_1> 
   sTagMnemTDoc     = Ordens
   sTagTit          = Tit1
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens
   sTagMenu         = Menu1
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Incluir,Alterar,Excluir,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagRAc          = false
   sTagOnSave       = flOnSave(23) flOnSave(45) 
   sTagMarcacao     = true
   sTagDbToVars     = DbToVars1
   sTagVarsDef      = VarsDefault1   
   sTagScript       = ScriptForm1
   sTagVarsToServer = VarsToServer1
   sTagVarsToDb     = VarsToDb1
   sTagServerVal    = ServerValids1
   sTagTitulo       = TelaTit1
   sTagIncSeq       = IncSeq1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagSubGrid      = 1,2
</Padrao_1>
<Padrao_2> 
   sTagMnemTDoc     = Ordens
   sTagTit          = Tit2
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql2
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens
   sTagMenu         = Menu1
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Incluir,Alterar,Excluir,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagRAc          = false
   sTagOnSave       = flOnSave(23) flOnSave(45) 
   sTagMarcacao     = true
   sTagDbToVars     = DbToVars1
   sTagVarsDef      = VarsDefault1   
   sTagScript       = ScriptForm1
   sTagVarsToServer = VarsToServer1
   sTagVarsToDb     = VarsToDb1
   sTagServerVal    = ServerValids1
   sTagTitulo       = TelaTit1
   sTagIncSeq       = IncSeq1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagSubGrid      = 1,2
</Padrao_2>
<Padrao_3> 
   sTagMnemTDoc     = Ordens
   sTagTit          = Tit3
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql3
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens
   sTagMenu         = Menu1
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Incluir,Alterar,Excluir,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagRAc          = false
   sTagOnSave       = flOnSave(23) flOnSave(45) 
   sTagMarcacao     = true
   sTagDbToVars     = DbToVars1
   sTagVarsDef      = VarsDefault1   
   sTagScript       = ScriptForm1
   sTagVarsToServer = VarsToServer1
   sTagVarsToDb     = VarsToDb1
   sTagServerVal    = ServerValids1
   sTagTitulo       = TelaTit1
   sTagIncSeq       = IncSeq1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagSubGrid      = 1,2
</Padrao_3>
<Padrao_4> 
   sTagMnemTDoc     = Ordens
   sTagTit          = Tit4
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql4
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens
   sTagMenu         = Menu1
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Incluir,Alterar,Excluir,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagRAc          = false
   sTagOnSave       = flOnSave(23) flOnSave(45) 
   sTagMarcacao     = true
   sTagDbToVars     = DbToVars1
   sTagVarsDef      = VarsDefault1   
   sTagScript       = ScriptForm1
   sTagVarsToServer = VarsToServer1
   sTagVarsToDb     = VarsToDb1
   sTagServerVal    = ServerValids1
   sTagTitulo       = TelaTit1
   sTagIncSeq       = IncSeq1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagSubGrid      = 1,2
</Padrao_4>
<Padrao_1_1> 
   sTagMnemTDoc     = Ordens
   sTagTit          = Tit1
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql1_1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens
   sTagMenu         = Menu2
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Incluir,Alterar,Excluir,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagRAc          = false
   sTagOnSave       = flOnSave(23) flOnSave(45) 
   sTagMarcacao     = true
   sTagDbToVars     = DbToVars1
   sTagVarsDef      = VarsDefault1   
   sTagScript       = ScriptForm1_1
   sTagVarsToServer = VarsToServer1_1
   sTagVarsToDb     = VarsToDb1
   sTagServerVal    = ServerValids1
   sTagTitulo       = TelaTit1
   sTagIncSeq       = IncSeq1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagSubGrid      = 1,2
</Padrao_1_1>
<Padrao_1_2> 
   sTagMnemTDoc     = Ordens
   sTagTit          = Tit2
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql1_2
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens
   sTagMenu         = Menu2
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Incluir,Alterar,Excluir,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagRAc          = false
   sTagOnSave       = flOnSave(23) flOnSave(45) 
   sTagMarcacao     = true
   sTagDbToVars     = DbToVars1
   sTagVarsDef      = VarsDefault1   
   sTagScript       = ScriptForm1_1
   sTagVarsToServer = VarsToServer1_1
   sTagVarsToDb     = VarsToDb1
   sTagServerVal    = ServerValids1
   sTagTitulo       = TelaTit1
   sTagIncSeq       = IncSeq1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagSubGrid      = 1,2
</Padrao_1_2>
<Padrao_1_3> 
   sTagMnemTDoc     = Ordens
   sTagTit          = Tit3
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql1_3
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens
   sTagMenu         = Menu2
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Incluir,Alterar,Excluir,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagRAc          = false
   sTagOnSave       = flOnSave(23) flOnSave(45) 
   sTagMarcacao     = true
   sTagDbToVars     = DbToVars1
   sTagVarsDef      = VarsDefault1   
   sTagScript       = ScriptForm1_1
   sTagVarsToServer = VarsToServer1
   sTagVarsToDb     = VarsToDb1
   sTagServerVal    = ServerValids1_1
   sTagTitulo       = TelaTit1
   sTagIncSeq       = IncSeq1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagSubGrid      = 1,2
</Padrao_1_3>
<Padrao_1_4> 
   sTagMnemTDoc     = Ordens
   sTagTit          = Tit4
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql1_4
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens
   sTagMenu         = Menu2
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Incluir,Alterar,Excluir,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagRAc          = false
   sTagOnSave       = flOnSave(23) flOnSave(45) 
   sTagMarcacao     = true
   sTagDbToVars     = DbToVars1
   sTagVarsDef      = VarsDefault1   
   sTagScript       = ScriptForm1_1
   sTagVarsToServer = VarsToServer1_1
   sTagVarsToDb     = VarsToDb1
   sTagServerVal    = ServerValids1_1
   sTagTitulo       = TelaTit1
   sTagIncSeq       = IncSeq1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagSubGrid      = 1,2
</Padrao_1_4>
<Padrao_Email> 
   sTagTit          = Tit1
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = NFCapa
   sTagMenu         = Menu1
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Incluir,Excluir,Alterar,Zoom,Pesquisar
   sTagRAc          = false
   sTagPesquisar    = Pesquisar1
   sTagMarcacao     = true
   sTagDbToVars     = DbToVars1
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptFormEmail
   sTagVarsToServer = VarsToServerEmail
   sTagVarsToDb     = VarsToDbEmail
   sTagServerVal    = ServerValidsEmail
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagSubGrid      = 1
   sTagIncSeq       = IncSeq1
   sTagOnSave       = flOnSave(46)
</Padrao_Email>
<Padrao_CPgmto> 
   sTagMnemTDoc     = Ordens
   sTagTit          = Tit1
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens
   sTagMenu         = Menu1
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Alterar
   sTagPesquisar    = Pesquisar
   sTagRAc          = false
   sTagOnSave       = flOnSave(70)
   sTagMarcacao     = true
   sTagDbToVars     = DbToVars1
   sTagVarsDef      = VarsDefault1   
   sTagScript       = ScriptFormCPgmto
   sTagVarsToServer = VarsToServer1CPgmto
   sTagVarsToDb     = VarsToDb1
   sTagServerVal    = ServerValidsCPgmto
   sTagTitulo       = TelaTit1
   sTagIncSeq       = IncSeq1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagSubGrid      = 1,2
</Padrao_CPgmto>
<Padrao_CPgmto1_1> 
   sTagMnemTDoc     = Ordens
   sTagTit          = Tit1
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens
   sTagMenu         = Menu1
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Alterar
   sTagPesquisar    = Pesquisar
   sTagRAc          = false
   sTagOnSave       = flOnSave(70)
   sTagMarcacao     = true
   sTagDbToVars     = DbToVars1
   sTagVarsDef      = VarsDefault1   
   sTagScript       = ScriptFormCPgmto
   sTagVarsToServer = VarsToServer1CPgmto1_1
   sTagVarsToDb     = VarsToDb1
   sTagServerVal    = ServerValidsCPgmto
   sTagTitulo       = TelaTit1
   sTagIncSeq       = IncSeq1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagSubGrid      = 1,2
</Padrao_CPgmto1_1>
<Esc_Padrao_1>
   sTagMnemTDoc     = Ordens
   sTagTit          = Esc_Tit1
   sTagCpoTit       = Esc_CpoTit1
   sTagCpo          = Esc_Cpo1
   sTagSql          = Esc_Sql1
   sTagSqlEscVars   = Esc_SqlVars1
   sTagNr0          = Nr01
   sTagTipoNr0      = TipoNr01
   sTagCpoEscVars   = Esc_VarsServerToClient1
   sTagToolsBar     = Pesquisar
</Esc_Padrao_1>
<Tit1>Pedidos do ltimo dia/incluir pedidos</Tit1>
<Tit2>Pedidos dos ltimos 15 dias</Tit2>
<Tit3>Pedidos dos ltimos 40 dias</Tit3>
<Tit4>Pedidos dos ltimos 90 dias</Tit4>
<CpoTit1>
  -l
  OV-i-5                          ; a.pPId
  Status-s-30
  Emi-s-20                    ; a.sDoc,a.pPId
  Ped.Cliente-s-20                 ; a.sDoc,a.pPId  
  Destinatrio-s-40               ; a.sDoc,a.pPId
  UF-s-10                         ; a.sDoc,a.pPId
  TOper-s-20                      ; a.sDoc,a.pPId
  Valor Ped-sn-18-2             ; a.sDoc,a.pPId 
  Porc CTR-sn-18-2   ;
  Entrega-s-20
  Validado-t-20                   ; a.tValPreco,a.pPId
  Grupo-i-10                           ; 
  Envio-t-20                      ; a.tLibCom,a.pPId
  ConfComercial-t-20              ; a.tConf,a.pPId
  Liberao-t-20                  ; a.tLib,a.pPId
  Cancelada-t-20                  ; a.tCanc,a.pPId
  Obs-s-20
</CpoTit1>
<Cpo1>
   'js.this.flMarcado('.$aLin["PPID"].')'
   $aLin["PPID"]
   ($aLin[strtoupper('lAgendamento')]==1 ? 'Agendamento' : '') . '<br>' . ($aLin[strtoupper('lAgendamento')]==1 ? $aOSaStatusAge[$aLin["JOSASTATUSAGE"]] : '')
   $aLin["SEMI"]
   $aLin["SDOC"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt_ font-family: verdana_ font-size: 10px_ color: inherit_ width: 300px_"><tr><td style="text-align: left_             ">' . $aLin["SDEST"] . '</td></tr><tr><td style="text-align: left_             ">' . $aLin["PDEST"] . '</td></tr><tr><td style="text-align: left_             ">' . ($aLin["SCNPJ"]!='' ? $aLin["SCNPJ"] : $aLin["SCPF"]) . '</td></tr><tr><td style="text-align: left_             ">' . ($aLin["TCLIREJEITO"]!='' ? '<font color=#BB0000>'.'CLIENTE RETIDO'.'</font>' : ($aLin["LCLIINATIVO"]==0 ? '' : '<font color=#BB0000>'.'CLIENTE INATIVO (EM ANALISE)'.'</font>')) . '</td></tr><tr><td style="text-align: left_             ">' . ($aLin["LTNETA"]==0 ? '' : '<font color=#BB0000>'.'ATUALIZAR INFORMACOES DO CLIENTE'.'</font>')  .'</td></tr></table>'
   $aLin["SDESTSIGLAENT"]
   $aLin["STOPERCOD"] 
   $aLin["LCALCULADO"]==0 ? '[Recalcular]' : number_format($aLin["NTOT_VPROD"],2,',','.')
   $aLin["LCALCULADO"]==0 ? '' : number_format($aLin["NPORCCTR"],2,",",".")
   ($aLin["TAGE"]=='' ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt_ font-family: verdana_ font-size: 10px_ color: inherit_ width: 120px_"><tr><td style="text-align: left_ width: 20px_"><b>Planejada</b></td><td style="text-align: left_ width: 5px_">&nbsp_:&nbsp_</td><td style="text-align: left_            ">'. ($aLin["LFERIADO"]==0 ? '' : '<b>Feriado</b>') . ($aLin["JDTPLAENT"]==0 ? ( $aLin["TENTPLACALC"] <> '' ? date('d/m/Y',strtotime($aLin["TENTPLACALC"])) : '' ) : ($aLin["JDTPLAENT"]==1 ? ($aLin["TENTPLA"] <> '' ? date('d/m/Y',strtotime($aLin["TENTPLA"])) : '' ) : '')).'</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt_ font-family: verdana_ font-size: 10px_ color: inherit_ width: 150px_"><tr><td style="text-align: left_ width: 20px_"><b>Agendada</b></td><td style="text-align: left_ width: 5px_">&nbsp_:&nbsp_</td><td style="text-align: left_            ">'.  date('d/m/Y',strtotime($aLin["TAGE"])) .'</td></tr></table>')
   $aLin["TVALPRECO"]=='' ? '' : date('d/m/Y', strtotime($aLin["TVALPRECO"]))
   $aLin["PORDEMGRUPO"]==0 ? '' : $aLin["PORDEMGRUPO"]
   $aLin["TLIBCOM"  ]=='' ? '' : date('d/m/Y', strtotime($aLin["TLIBCOM"]))
   $aLin["TCONF"    ]=='' ? '' : date('d/m/Y', strtotime($aLin["TCONF"]))
   $aLin["TLIB"    ]=='' ? '' : date('d/m/Y', strtotime($aLin["TLIB"]))
   $aLin["TCANC"    ]=='' ? '' : date('d/m/Y', strtotime($aLin["TCANC"]))
   ($aLin["JFASE"]==7 ? '<font color=#BB0000>'.'PEDIDO FATURADO'.'</font>' : '')
   $aLin["PPID"]    
   $aLin["PTOPER"]  
   $aLin["SMOE"]    
   $aLin["JDTPLAENT"]==1 ? $aLin["TENTPLA"] : $aLin["TENTPLACALC"]
   $aLin["JENTSAI"]
   $aLin["PEMI"]
   $aLin["PDEST"]
   0   
   $aLin["NDFIN"]
   $aLin["PMOE"]
   $aLin["JBC_PIS"]
   $aLin["JBC_COFINS"]
   $aLin["JBC_ICMS"]
   $aLin["JBC_IPI"]
   $aLin["JBC_ICMSST"]
   $aLin["JBC_II"]
   $aLin["JBC_ISS"]
   $aLin["JVL_ICMSST"]
   $aLin["JVL_ICMS"]
   $aLin["LFINANC"]
   $aLin["LTRANSFREM"]
   $aLin["PORDEMGRUPO"]
   $aLin["LTRANSFDEP3O"]
   $aLin["NPDESCLOG"]
   $aLin["SDEST"]
</Cpo1>
<colA>
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt_ font-family: verdana_ font-size: 10px_ color: inherit_ width: 300px_">
     <tr>
      <td style="text-align: left_             ">' . $aLin["SDEST"] . '</td>
     </tr>
     <tr>
      <td style="text-align: left_             ">' . $aLin["PDEST"] . '</td>
     </tr>
     <tr>
      <td style="text-align: left_             ">' . ($aLin["SCNPJ"]!='' ? $aLin["SCNPJ"] : $aLin["SCPF"]) . '</td>
     </tr>
     <tr>
      <td style="text-align: left_             ">' . ($aLin["TCLIREJEITO"]!='' ? '<font color=#BB0000>'.'CLIENTE RETIDO'.'</font>' : ($aLin["LCLIINATIVO"]==0 ? '' : '<font color=#BB0000>'.'CLIENTE INATIVO (EM ANALISE)'.'</font>')) . '</td>
     </tr>
     <tr>
      <td style="text-align: left_             ">' . ($aLin["LTNETA"]==0 ? '' : '<font color=#BB0000>'.'ATUALIZAR INFORMACOES DO CLIENTE'.'</font>')  .'</td>
     </tr>
    </table>'
</colA>
<colEnt>
  '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt_ font-family: verdana_ font-size: 10px_ color: inherit_ width: 120px_">
      <tr>
         <td style="text-align: left_ width: 20px_"><b>Planejada</b></td>
         <td style="text-align: left_ width: 5px_">&nbsp_:&nbsp_</td>
         <td style="text-align: left_            ">'. ($aLin["LFERIADO"]==0 ? '' : '<b>Feriado</b>') . ($aLin["JDTPLAENT"]==0 ? ( $aLin["TENTPLACALC"] <> '' ? date('d/m/Y',strtotime($aLin["TENTPLACALC"])) : '' ) : ($aLin["JDTPLAENT"]==1 ? ($aLin["TENTPLA"] <> '' ? date('d/m/Y',strtotime($aLin["TENTPLA"])) : '' ) : '')).'</td>
      </tr>
   </table>'
</colEnt>
<colAge>
  '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt_ font-family: verdana_ font-size: 10px_ color: inherit_ width: 150px_">
      <tr>
         <td style="text-align: left_ width: 20px_"><b>Agendada</b></td>
         <td style="text-align: left_ width: 5px_">&nbsp_:&nbsp_</td>
         <td style="text-align: left_            ">'.  date('d/m/Y',strtotime($aLin["TAGE"])) .'</td>
      </tr>
   </table>'
</colAge>
<Sql1> 
   select a.pPId,
          a.tIn0,
          a.tLibCom,
          a.tLib,
          a.pOrdemGrupo,
          a.tValPreco,
          a.pBOPaiDeTodos,
          a.lGerarPreNF,
          a.tConc,
          a.tIn0,
          a.tEmissao,
          a.tConf,
          a.nTot_vProd,
          a.nPorcCTR,
          a.tCanc,
          a.pTOper,
          a.pDest,
          a.pEmi,
          a.nDescFin,
          a.nPDescLog,
          a.tEntPla,
          a.tEntPlaCalc,
          a.jTipo jEntSai,
          a.sDoc,
          a.jOrigem,
          b.sSigla   sEmi,
          c.sCoringa sDest,
          c.sCNPJ,
          c.sCPF,
          a.pMoe,
          a.nTot_vNF,
          a.jBC_Pis,
          a.jBC_Cofins,
          a.jBC_Icms,
          a.jBC_IPI,
          a.jBC_II,
          a.jBC_ICMSST,
          a.jBC_ISS,
          a.jVl_ICMSST,
          a.jVl_ICMS,
          a.lLimCred,
          a.lFinanc,
          c.sEmail,
          c.sEmail_Temp,
          a.pTOper,
          a.fTOper,
          e.sDescricao sTOper,
          e.sCodigo    sTOperCod,
          a.lCalculado,
          a.jDtPlaEnt,
          h.nDFin,
          a.lCliInativo,
          a.jFase,
          c.lTNetA,
          a.sMotCliRejeito,
          a.tCliRejeito,
          q.sSigla     sDestSiglaEnt,
          a.tAge,
          a.tEntPlaOrig,
          a.jOSaStatusAge,
          a.lAgendamento
   from Ordens  a      join CUP                b on a.pEmi                =  b.pPId   and  b.iVer = a.fEmi
                       join CUP                c on a.pDest               =  c.pPId   and  c.iVer = c.iVAt
                       join TOper              e on a.pTOper              =  e.pPId   and  e.iVer = a.fTOper
                  left join Enderecos          n on  a.pDestEndEnt        =  n.pPId and  n.iVer =  n.iVAt
                  left join CEPs               o on  n.pCEP               =  o.pPId and  o.iVer =  o.iVAt
                  left join Cidades            p on  o.pCid               =  p.pPId and  p.iVer =  p.iVAt
                  left join UFs                q on  p.pUF                =  q.pPId and  q.iVer =  q.iVAt
                  left join Ordens_FPgmto      f on a.pPId                =  f.pOrdem and  f.iVer = f.iVAt and f.lExc=0
                  left join PED_FPgmto_CPgmto  g on f.pPED_FPgmto_CPgmto  =  g.pPId   and  g.iVer = (case when f.fPED_FPgmto_CPgmto=0 then g.iVAt else f.fPED_FPgmto_CPgmto end) and g.lExc=0
                  left join CPgmto             h on g.pCPgmto             =  h.pPId   and  h.iVer = h.iVAt
   where a.lExc   = 0      and a.iVer  = a.iVAt
     and a.jTipo  = 1
     and a.lPedAnjo = 1
     and a.tIn0 >= ((cast('today' as date)) || ' 00:00:00')
   order by a.pPId desc
</Sql1>
<Sql2> 
   select a.pPId,
          a.tIn0,
          a.pBOPaiDeTodos,
          a.lGerarPreNF,
          a.tLibCom,
          a.tLib,
          a.tValPreco,
          a.pOrdemGrupo,
          a.tConc,
          a.tIn0,
          a.tEmissao,
          a.tConf,
          a.tCanc,
          a.pTOper,
          a.nTot_vProd,
          a.nPorcCTR,
          a.pDest,
          a.pEmi,
          a.nDescFin,
          a.nPDescLog,
          a.tEntPla,
          a.tEntPlaCalc,
          a.jTipo jEntSai,
          a.sDoc,
          a.jOrigem,
          b.sSigla   sEmi,
          c.sCoringa sDest,
          c.sCNPJ,
          c.sCPF,
          a.pMoe,
          a.nTot_vNF,
          a.jBC_Pis,
          a.jBC_Cofins,
          a.jBC_Icms,
          a.jBC_IPI,
          a.jBC_II,
          a.jBC_ICMSST,
          a.jBC_ISS,
          a.jVl_ICMSST,
          a.jVl_ICMS,
          a.lLimCred,
          a.lFinanc,
          c.sEmail,
          c.sEmail_Temp,
          a.pTOper,
          a.fTOper,
          e.sDescricao sTOper,
          e.sCodigo    sTOperCod,
          a.lCalculado,
          a.jDtPlaEnt,
          h.nDFin,
          a.lCliInativo,
          a.jFase,
          c.lTNetA,
          a.sMotCliRejeito,
          a.tCliRejeito,
          q.sSigla     sDestSiglaEnt,
          a.tAge,
          a.tEntPlaOrig,
          a.jOSaStatusAge,
          a.lAgendamento
   from Ordens  a      join CUP                b on a.pEmi                =  b.pPId   and  b.iVer = a.fEmi
                       join CUP                c on a.pDest               =  c.pPId   and  c.iVer = c.iVAt
                       join TOper              e on a.pTOper              =  e.pPId   and  e.iVer = a.fTOper
                  left join Enderecos          n on  a.pDestEndEnt        =  n.pPId and  n.iVer =  n.iVAt
                  left join CEPs               o on  n.pCEP               =  o.pPId and  o.iVer =  o.iVAt
                  left join Cidades            p on  o.pCid               =  p.pPId and  p.iVer =  p.iVAt
                  left join UFs                q on  p.pUF                =  q.pPId and  q.iVer =  q.iVAt
                  left join Ordens_FPgmto      f on a.pPId                =  f.pOrdem and  f.iVer = f.iVAt and f.lExc=0
                  left join PED_FPgmto_CPgmto  g on f.pPED_FPgmto_CPgmto  =  g.pPId   and  g.iVer = f.pPED_FPgmto_CPgmto and g.lExc=0
                  left join CPgmto             h on g.pCPgmto             =  h.pPId   and  h.iVer = h.iVAt
   where a.lExc   = 0      and a.iVer  = a.iVAt
     and a.jTipo  = 1
     and a.lPedAnjo = 1
     and a.tIn0 >= ((cast('today' as date)- 15) || ' 00:00:00')
   order by a.pPId desc
</Sql2>
<Sql3> 
   select a.pPId,
          a.tIn0,
          a.pBOPaiDeTodos,
          a.lGerarPreNF,
          a.tConc,
          a.pOrdemGrupo,
          a.tLibCom,
          a.tLib,
          a.tValPreco,
          a.tIn0,
          a.tEmissao,
          a.tConf,
          a.tCanc,
          a.pTOper,
          a.pDest,
          a.pEmi,
          a.nTot_vProd,
          a.nPorcCTR,
          a.nDescFin,
          a.nPDescLog,
          a.tEntPla,
          a.tEntPlaCalc,
          a.jTipo jEntSai,
          a.sDoc,
          a.jOrigem,
          b.sSigla   sEmi,
          c.sCoringa sDest,
          c.sCNPJ,
          c.sCPF,
          a.pMoe,
          a.nTot_vNF,
          a.jBC_Pis,
          a.jBC_Cofins,
          a.jBC_Icms,
          a.jBC_IPI,
          a.jBC_II,
          a.jBC_ICMSST,
          a.jBC_ISS,
          a.jVl_ICMSST,
          a.jVl_ICMS,
          a.lLimCred,
          a.lFinanc,
          c.sEmail,
          c.sEmail_Temp,
          a.pTOper,
          a.fTOper,
          e.sDescricao sTOper,
          e.sCodigo    sTOperCod,
          a.lCalculado,
          a.jDtPlaEnt,
          h.nDFin,
          a.lCliInativo,
          a.jFase,
          c.lTNetA,
          a.sMotCliRejeito,
          a.tCliRejeito,
          q.sSigla     sDestSiglaEnt,
          a.tAge,
          a.tEntPlaOrig,
          a.jOSaStatusAge,
          a.lAgendamento
   from Ordens  a      join CUP                b on a.pEmi                =  b.pPId   and  b.iVer = a.fEmi
                       join CUP                c on a.pDest               =  c.pPId   and  c.iVer = c.iVAt
                       join TOper              e on a.pTOper              =  e.pPId   and  e.iVer = a.fTOper
                  left join Enderecos          n on  a.pDestEndEnt        =  n.pPId and  n.iVer =  n.iVAt
                  left join CEPs               o on  n.pCEP               =  o.pPId and  o.iVer =  o.iVAt
                  left join Cidades            p on  o.pCid               =  p.pPId and  p.iVer =  p.iVAt
                  left join UFs                q on  p.pUF                =  q.pPId and  q.iVer =  q.iVAt
                  left join Ordens_FPgmto      f on a.pPId                =  f.pOrdem and  f.iVer = f.iVAt and f.lExc=0
                  left join PED_FPgmto_CPgmto  g on f.pPED_FPgmto_CPgmto  =  g.pPId   and  g.iVer = (case when f.fPED_FPgmto_CPgmto=0 then g.iVAt else f.fPED_FPgmto_CPgmto end) and g.lExc=0
                  left join CPgmto             h on g.pCPgmto             =  h.pPId   and  h.iVer = h.iVAt
   where a.lExc   = 0      and a.iVer  = a.iVAt
     and a.jTipo  = 1
     and a.lPedAnjo = 1
     and a.tIn0 >= ((cast('today' as date)- 100) || ' 00:00:00')
   order by a.pPId desc
</Sql3>
<Sql4> 
   select a.pPId,
          a.tIn0,
          a.pBOPaiDeTodos,
          a.lGerarPreNF,
          a.tConc,
          a.tLibCom,
          a.tLib,
          a.pOrdemGrupo,
          a.tValPreco,
          a.tIn0,
          a.tEmissao,
          a.tConf,
          a.tCanc,
          a.pTOper,
          a.pDest,
          a.pEmi,
          a.nTot_vProd,
          a.nPorcCTR,
          a.nDescFin,
          a.nPDescLog,
          a.tEntPla,
          a.tEntPlaCalc,
          a.jTipo jEntSai,
          a.sDoc,
          a.jOrigem,
          b.sSigla   sEmi,
          c.sCoringa sDest,
          c.sCNPJ,
          c.sCPF,
          a.pMoe,
          a.nTot_vNF,
          a.jBC_Pis,
          a.jBC_Cofins,
          a.jBC_Icms,
          a.jBC_IPI,
          a.jBC_II,
          a.jBC_ICMSST,
          a.jBC_ISS,
          a.jVl_ICMSST,
          a.jVl_ICMS,
          a.lLimCred,
          a.lFinanc,
          c.sEmail,
          c.sEmail_Temp,
          a.pTOper,
          a.fTOper,
          e.sDescricao sTOper,
          e.sCodigo    sTOperCod,
          a.lCalculado,
          a.jDtPlaEnt,
          h.nDFin,
          a.lCliInativo,
          a.jFase,
          c.lTNetA,
          a.sMotCliRejeito,
          a.tCliRejeito,
          q.sSigla     sDestSiglaEnt,
          a.tAge,
          a.tEntPlaOrig,
          a.jOSaStatusAge,
          a.lAgendamento
   from Ordens  a      join CUP                b on a.pEmi                =  b.pPId   and  b.iVer = a.fEmi
                       join CUP                c on a.pDest               =  c.pPId   and  c.iVer = c.iVAt
                       join TOper              e on a.pTOper              =  e.pPId   and  e.iVer = a.fTOper
                  left join Enderecos          n on  a.pDestEndEnt        =  n.pPId and  n.iVer =  n.iVAt
                  left join CEPs               o on  n.pCEP               =  o.pPId and  o.iVer =  o.iVAt
                  left join Cidades            p on  o.pCid               =  p.pPId and  p.iVer =  p.iVAt
                  left join UFs                q on  p.pUF                =  q.pPId and  q.iVer =  q.iVAt
                  left join Ordens_FPgmto      f on a.pPId                =  f.pOrdem and  f.iVer = f.iVAt and f.lExc=0
                  left join PED_FPgmto_CPgmto  g on f.pPED_FPgmto_CPgmto  =  g.pPId   and  g.iVer = (case when f.fPED_FPgmto_CPgmto=0 then g.iVAt else f.fPED_FPgmto_CPgmto end) and g.lExc=0
                  left join CPgmto             h on g.pCPgmto             =  h.pPId   and  h.iVer = h.iVAt
   where a.lExc   = 0      and a.iVer  = a.iVAt
     and a.jTipo  = 1
     and a.pRepCom = {pLogin}
     and a.tIn0 >= ((cast('today' as date)- 180) || ' 00:00:00')
   order by a.pPId desc
</Sql4>
<Sql1_1> 
   select a.pPId,
          a.tIn0,
          a.tLibCom,
          a.tLib,
          a.tValPreco,
          a.pBOPaiDeTodos,
          a.lGerarPreNF,
          a.pOrdemGrupo,
          a.tConc,
          a.tIn0,
          a.tEmissao,
          a.tConf,
          a.nTot_vProd,
          a.nPorcCTR,
          a.tCanc,
          a.pTOper,
          a.pDest,
          a.pEmi,
          a.nDescFin,
          a.nPDescLog,
          a.tEntPla,
          a.tEntPlaCalc,
          a.jTipo jEntSai,
          a.sDoc,
          a.jOrigem,
          b.sSigla   sEmi,
          c.sCoringa sDest,
          c.sCNPJ,
          c.sCPF,
          a.pMoe,
          a.nTot_vNF,
          a.jBC_Pis,
          a.jBC_Cofins,
          a.jBC_Icms,
          a.jBC_IPI,
          a.jBC_II,
          a.jBC_ICMSST,
          a.jBC_ISS,
          a.jVl_ICMSST,
          a.jVl_ICMS,
          a.lLimCred,
          a.lFinanc,
          c.sEmail,
          c.sEmail_Temp,
          a.pTOper,
          a.fTOper,
          e.sDescricao sTOper,
          e.sCodigo    sTOperCod,
          a.lCalculado,
          a.jDtPlaEnt,
          h.nDFin,
          a.lCliInativo,
          a.jFase,
          c.lTNetA,
          a.sMotCliRejeito,
          a.tCliRejeito,
          q.sSigla     sDestSiglaEnt,
          a.tAge,
          a.tEntPlaOrig,
          a.jOSaStatusAge,
          a.lAgendamento
   from Ordens  a      join CUP                b on a.pEmi                =  b.pPId   and  b.iVer = a.fEmi
                       join CUP                c on a.pDest               =  c.pPId   and  c.iVer = c.iVAt
                       join TOper              e on a.pTOper              =  e.pPId   and  e.iVer = a.fTOper
                  left join Enderecos          n on  a.pDestEndEnt        =  n.pPId and  n.iVer =  n.iVAt
                  left join CEPs               o on  n.pCEP               =  o.pPId and  o.iVer =  o.iVAt
                  left join Cidades            p on  o.pCid               =  p.pPId and  p.iVer =  p.iVAt
                  left join UFs                q on  p.pUF                =  q.pPId and  q.iVer =  q.iVAt
                  left join Ordens_FPgmto      f on a.pPId                =  f.pOrdem and  f.iVer = f.iVAt and f.lExc=0
                  left join PED_FPgmto_CPgmto  g on f.pPED_FPgmto_CPgmto  =  g.pPId   and  g.iVer = (case when f.fPED_FPgmto_CPgmto=0 then g.iVAt else f.fPED_FPgmto_CPgmto end) and g.lExc=0
                  left join CPgmto             h on g.pCPgmto             =  h.pPId   and  h.iVer = h.iVAt
   where a.lExc   = 0      and a.iVer  = a.iVAt
     and a.jTipo  = 1
     and a.lPedAnjo = 1
     and a.tIn0 >= ((cast('today' as date)) || ' 00:00:00')
   order by a.pPId desc
</Sql1_1>
<Sql1_2> 
   select a.pPId,
          a.tIn0,
          a.pBOPaiDeTodos,
          a.lGerarPreNF,
          a.tLibCom,
          a.tLib,
          a.tValPreco,
          a.tConc,
          a.pOrdemGrupo,
          a.tIn0,
          a.tEmissao,
          a.tConf,
          a.tCanc,
          a.pTOper,
          a.nTot_vProd,
          a.nPorcCTR,
          a.pDest,
          a.pEmi,
          a.nDescFin,
          a.nPDescLog,
          a.tEntPla,
          a.tEntPlaCalc,
          a.jTipo jEntSai,
          a.sDoc,
          a.jOrigem,
          b.sSigla   sEmi,
          c.sCoringa sDest,
          c.sCNPJ,
          c.sCPF,
          a.pMoe,
          a.nTot_vNF,
          a.jBC_Pis,
          a.jBC_Cofins,
          a.jBC_Icms,
          a.jBC_IPI,
          a.jBC_II,
          a.jBC_ICMSST,
          a.jBC_ISS,
          a.jVl_ICMSST,
          a.jVl_ICMS,
          a.lLimCred,
          a.lFinanc,
          c.sEmail,
          c.sEmail_Temp,
          a.pTOper,
          a.fTOper,
          e.sDescricao sTOper,
          e.sCodigo    sTOperCod,
          a.lCalculado,
          a.jDtPlaEnt,
          h.nDFin,
          a.lCliInativo,
          a.jFase,
          c.lTNetA,
          a.sMotCliRejeito,
          a.tCliRejeito,
          q.sSigla     sDestSiglaEnt,
          a.tAge,
          a.tEntPlaOrig,
          a.jOSaStatusAge,
          a.lAgendamento
   from Ordens  a      join CUP                b on a.pEmi                =  b.pPId   and  b.iVer = a.fEmi
                       join CUP                c on a.pDest               =  c.pPId   and  c.iVer = c.iVAt
                       join TOper              e on a.pTOper              =  e.pPId   and  e.iVer = a.fTOper
                  left join Enderecos          n on  a.pDestEndEnt        =  n.pPId and  n.iVer =  n.iVAt
                  left join CEPs               o on  n.pCEP               =  o.pPId and  o.iVer =  o.iVAt
                  left join Cidades            p on  o.pCid               =  p.pPId and  p.iVer =  p.iVAt
                  left join UFs                q on  p.pUF                =  q.pPId and  q.iVer =  q.iVAt
                  left join Ordens_FPgmto      f on a.pPId                =  f.pOrdem and  f.iVer = f.iVAt and f.lExc=0
                  left join PED_FPgmto_CPgmto  g on f.pPED_FPgmto_CPgmto  =  g.pPId   and  g.iVer = f.pPED_FPgmto_CPgmto and g.lExc=0
                  left join CPgmto             h on g.pCPgmto             =  h.pPId   and  h.iVer = h.iVAt
   where a.lExc   = 0      and a.iVer  = a.iVAt
     and a.jTipo  = 1
     and a.lPedAnjo = 1
     and cast(a.tIn0 as date) >= dateadd(day, -15, current_date)
   order by a.pPId desc
</Sql1_2>
<Sql1_3> 
   select a.pPId,
          a.tIn0,
          a.pBOPaiDeTodos,
          a.lGerarPreNF,
          a.tConc,
          a.tLibCom,
          a.tLib,
          a.tValPreco,
          a.tIn0,
          a.tEmissao,
          a.tConf,
          a.tCanc,
          a.pTOper,
          a.pDest,
          a.pEmi,
          a.pOrdemGrupo,
          a.nTot_vProd,
          a.nPorcCTR,
          a.nDescFin,
          a.nPDescLog,
          a.tEntPla,
          a.tEntPlaCalc,
          a.jTipo jEntSai,
          a.sDoc,
          a.jOrigem,
          b.sSigla   sEmi,
          c.sCoringa sDest,
          c.sCNPJ,
          c.sCPF,
          a.pMoe,
          a.nTot_vNF,
          a.jBC_Pis,
          a.jBC_Cofins,
          a.jBC_Icms,
          a.jBC_IPI,
          a.jBC_II,
          a.jBC_ICMSST,
          a.jBC_ISS,
          a.jVl_ICMSST,
          a.jVl_ICMS,
          a.lLimCred,
          a.lFinanc,
          c.sEmail,
          c.sEmail_Temp,
          a.pTOper,
          a.fTOper,
          e.sDescricao sTOper,
          e.sCodigo    sTOperCod,
          a.lCalculado,
          a.jDtPlaEnt,
          h.nDFin,
          a.lCliInativo,
          a.jFase,
          c.lTNetA,
          a.sMotCliRejeito,
          a.tCliRejeito,
          q.sSigla     sDestSiglaEnt,
          a.tAge,
          a.tEntPlaOrig,
          a.jOSaStatusAge,
          a.lAgendamento
   from Ordens  a      join CUP                b on a.pEmi                =  b.pPId   and  b.iVer = a.fEmi
                       join CUP                c on a.pDest               =  c.pPId   and  c.iVer = c.iVAt
                       join TOper              e on a.pTOper              =  e.pPId   and  e.iVer = a.fTOper
                  left join Enderecos          n on  a.pDestEndEnt        =  n.pPId and  n.iVer =  n.iVAt
                  left join CEPs               o on  n.pCEP               =  o.pPId and  o.iVer =  o.iVAt
                  left join Cidades            p on  o.pCid               =  p.pPId and  p.iVer =  p.iVAt
                  left join UFs                q on  p.pUF                =  q.pPId and  q.iVer =  q.iVAt
                  left join Ordens_FPgmto      f on a.pPId                =  f.pOrdem and  f.iVer = f.iVAt and f.lExc=0
                  left join PED_FPgmto_CPgmto  g on f.pPED_FPgmto_CPgmto  =  g.pPId   and  g.iVer = (case when f.fPED_FPgmto_CPgmto=0 then g.iVAt else f.fPED_FPgmto_CPgmto end) and g.lExc=0
                  left join CPgmto             h on g.pCPgmto             =  h.pPId   and  h.iVer = h.iVAt
   where a.lExc   = 0      and a.iVer  = a.iVAt
     and a.jTipo  = 1
     and a.lPedAnjo = 1
     and cast(a.tIn0 as date) >= dateadd(day, -40, current_date)
   order by a.pPId desc
</Sql1_3>
<Sql1_4> 
   select a.pPId,
          a.tIn0,
          a.pBOPaiDeTodos,
          a.lGerarPreNF,
          a.tConc,
          a.tLibCom,
          a.pOrdemGrupo,
          a.tLib,
          a.tValPreco,
          a.tIn0,
          a.tEmissao,
          a.tConf,
          a.tCanc,
          a.pTOper,
          a.pDest,
          a.pEmi,
          a.nTot_vProd,
          a.nPorcCTR,
          a.nDescFin,
          a.nPDescLog,
          a.tEntPla,
          a.tEntPlaCalc,
          a.jTipo jEntSai,
          a.sDoc,
          a.jOrigem,
          b.sSigla   sEmi,
          c.sCoringa sDest,
          c.sCNPJ,
          c.sCPF,
          a.pMoe,
          a.nTot_vNF,
          a.jBC_Pis,
          a.jBC_Cofins,
          a.jBC_Icms,
          a.jBC_IPI,
          a.jBC_II,
          a.jBC_ICMSST,
          a.jBC_ISS,
          a.jVl_ICMSST,
          a.jVl_ICMS,
          a.lLimCred,
          a.lFinanc,
          c.sEmail,
          c.sEmail_Temp,
          a.pTOper,
          a.fTOper,
          e.sDescricao sTOper,
          e.sCodigo    sTOperCod,
          a.lCalculado,
          a.jDtPlaEnt,
          h.nDFin,
          a.lCliInativo,
          a.jFase,
          c.lTNetA,
          a.sMotCliRejeito,
          a.tCliRejeito,
          q.sSigla     sDestSiglaEnt,
          a.tAge,
          a.tEntPlaOrig,
          a.jOSaStatusAge,
          a.lAgendamento
   from Ordens  a      join CUP                b on a.pEmi                =  b.pPId   and  b.iVer = a.fEmi
                       join CUP                c on a.pDest               =  c.pPId   and  c.iVer = c.iVAt
                       join TOper              e on a.pTOper              =  e.pPId   and  e.iVer = a.fTOper
                  left join Enderecos          n on  a.pDestEndEnt        =  n.pPId and  n.iVer =  n.iVAt
                  left join CEPs               o on  n.pCEP               =  o.pPId and  o.iVer =  o.iVAt
                  left join Cidades            p on  o.pCid               =  p.pPId and  p.iVer =  p.iVAt
                  left join UFs                q on  p.pUF                =  q.pPId and  q.iVer =  q.iVAt
                  left join Ordens_FPgmto      f on a.pPId                =  f.pOrdem and  f.iVer = f.iVAt and f.lExc=0
                  left join PED_FPgmto_CPgmto  g on f.pPED_FPgmto_CPgmto  =  g.pPId   and  g.iVer = (case when f.fPED_FPgmto_CPgmto=0 then g.iVAt else f.fPED_FPgmto_CPgmto end) and g.lExc=0
                  left join CPgmto             h on g.pCPgmto             =  h.pPId   and  h.iVer = h.iVAt
   where a.lExc   = 0      and a.iVer  = a.iVAt
     and a.jTipo  = 1
     and a.lPedAnjo = 1
     and cast(a.tIn0 as date) >= dateadd(day, -90, current_date)
   order by a.pPId desc
</Sql1_4>
<Pesquisar1>
    (upper(a.pDest) like upper('%{p0}%') or upper(a.pPId) like upper('%{p0}%') or a.tIn0 like upper('%{p0}%') or upper(b.sCoringa) like upper('%{p0}%') or upper(c.sCoringa) like upper('%{p0}%') or upper(a.sDoc)  like upper('%{p0}%'))
</Pesquisar1>
<Menu1> 
   main1 ; Itens da Ordem       ; flGrid(this.oPai,'dd_files/erp_ORDENS_CanalWeb_Itens.dda','Padrao_1a')
   main1 ; Itens Tabela de Preo  ; flGrid(this.oPai,'dd_files/erp_ORDENS_CanalWeb_Mobile_Itens.dda','Padrao_2')
   main1 ; Agrupar Pedidos      ; flCallSysPOP(1142,this.oPai,'Deseja Agrupar Pedidos Marcados ?'   ,this.oPai.fiChaveAtual()) 
   main1 ; Recalcular             ; flCallSysPOP(1240,this.oPai,'',this.oPai.fiChaveAtual())   
   main1 ; Condio de Pagamento  ; this.oPai.flGridAlt('dd_files/erp_ORDENS_CanalWeb.dda','Padrao_CPgmto')
   main1 ; Enviar               ; flCallSysPOP(1129,this.oPai,'Liberar Pedido em questo?'   ,this.oPai.fiChaveAtual())
   main1 ; Atualizar Informaes Cliente ; flGrid(this.oPai,'dd_files/erp_Cliente.dda','Padrao_7')
   main1 ; Enviar Email         ; this.oPai.flGridAlt('dd_files/erp_ORDENS_CanalWeb.dda','Padrao_Email')
   main1 ; NFe                  ; flGrid(this.oPai,'dd_files/erp_NFCapa.dda','Padrao_1a')
   main1 ; Visualizar/Imprimir  ; <imp
   <imp  ; Visualizar           ; flOpenWindowPost('../../FullPlat/processos/OSa_Imprimir3.php?sCliPasta='+parent.sCliPasta+'&iCompany='+parent.iGlobalCompany+'&sId='+this.oPai.fiChaveAtual()+'&sLogin='+parent.aGlobalLogin[1]+'&sRoot='+parent.sGlobalRoot)
   <imp  ; Gerar PDF (Imprimir) ; flOpenWindowPost('../../FullPlat/processos/OSa_Imprimir3PDF.php?sCliPasta='+parent.sCliPasta+'&iCompany='+parent.iGlobalCompany+'&sId='+this.oPai.fiChaveAtual()+'&sLogin='+parent.aGlobalLogin[1]+'&sRoot='+parent.sGlobalRoot)
</Menu1>
<Menu2> 
   main1 ; Itens da Ordem       ; flGrid(this.oPai,'dd_files/erp_ORDENS_CanalWeb_Itens.dda','Padrao_1a')
   main1 ; Itens Tabela de Preo  ; flGrid(this.oPai,'dd_files/erp_ORDENS_CanalWeb_Mobile_Itens.dda','Padrao_2')
   main1 ; Agrupar Pedidos      ; flCallSysPOP(1142,this.oPai,'Deseja Agrupar Pedidos Marcados ?'   ,this.oPai.fiChaveAtual()) 
   main1 ; Recalcular             ; flCallSysPOP(1240,this.oPai,'',this.oPai.fiChaveAtual())   
   main1 ; Validar Preos       ; flCallSysPOP(1143,this.oPai,'',this.oPai.fiChaveAtual())
   main1 ; Condio de Pagamento  ; this.oPai.flGridAlt('dd_files/erp_ORDENS_CanalWeb.dda','Padrao_CPgmto1_1')
   main1 ; Enviar               ; flCallSysPOP(1129,this.oPai,'Liberar Pedido em questo?'   ,this.oPai.fiChaveAtual())
   main1 ; Atualizar Informaes Cliente ; flGrid(this.oPai,'dd_files/erp_Cliente.dda','Padrao_7')
   main1 ; Impressao            ; <imp
   main1 ; Enviar Email         ; this.oPai.flGridAlt('dd_files/erp_ORDENS_CanalWeb.dda','Padrao_Email')
   main1 ; NFe                  ; flGrid(this.oPai,'dd_files/erp_NFCapa.dda','Padrao_1a')
   <imp  ; Visualizar           ; flOpenWindowPost('../../FullPlat/processos/OEnt_Imprimir3.php?sCliPasta='+parent.sCliPasta+'&iCompany='+parent.iGlobalCompany+'&sId='+this.oPai.fiChaveAtual()+'&sLogin='+parent.aGlobalLogin[1]+'&sRoot='+parent.sGlobalRoot)
   <imp  ; Gerar PDF (Imprimir) ; flOpenWindowPost('../../FullPlat/processos/OEnt_Imprimir3PDF.php?sCliPasta='+parent.sCliPasta+'&iCompany='+parent.iGlobalCompany+'&sId='+this.oPai.fiChaveAtual()+'&sLogin='+parent.aGlobalLogin[1]+'&sRoot='+parent.sGlobalRoot)
   <imp  ; Gerar PDF (Imprimir/Enviar Email) ; flOpenWindowPost('../../FullPlat/processos/OEnt_Imprimir3_Envia_PDF.php?sCliPasta='+parent.sCliPasta+'&iCompany='+parent.iGlobalCompany+'&sId='+this.oPai.fiChaveAtual()+'&sLogin='+parent.aGlobalLogin[1]+'&sRoot='+parent.sGlobalRoot)
   <imp  ; Impressora           ; flRangeProcesso('dd_files/erp_OEnt_Imprimir_Arq_Imp_TQ.dda','Processo_2','processos/OEnt_Imprimir_Arq_Imp_TQ.php',this.oPai)
   <imp  ; Arquivo              ; flRangeProcesso('dd_files/erp_OEnt_Imprimir_Arq_Imp_TQ.dda','Processo_1','processos/OEnt_Imprimir_Arq_Imp_TQ.php',this.oPai)
</Menu2>
<IncSeq1>
    flGrid(this.oPai,'dd_files/erp_ORDENS_CanalWeb_Itens.dda','Padrao_1a')
</IncSeq1>
<Nr01>alert("Qtux-Dialog\n\nNada a relacionar ...")</Nr01>
<Nr02>oGrid.flGridInc()</Nr02>
<Nr00>alert("Qtux-Dialog\n\nNada a relacionar, verifique se as Ordens esto confirmadas ...")</Nr00>
<TipoNr01>0</TipoNr01>
<TipoNr02>1</TipoNr02>
<TipoNr03>2</TipoNr03>
<Esc_Tit1>ltimos 100 Pedidos, resultado da busca por [{p0}]</Esc_Tit1>
<Esc_CpoTit1>
  Id-i-5                          ; a.pPId
  Emisso-d-20                    ; a.tIn0
  Planejada-d-20                  ; a.tEntPla
  Emissor-s-20                    ; a.sDoc,a.pPId
  Destinatrio-s-40               ; a.sDoc,a.pPId
  Valor Total-n-18-2              ;
  Validado-t-20                   ; a.tValPreco,a.pPId
  Envio-t-20                      ; a.tLibCom,a.pPId
  ConfComercial-t-20              ; a.tConf,a.pPId
</Esc_CpoTit1>
<Esc_Cpo1>
   $aLin["PPID"]
   $aLin["TIN0"]
   $aLin["DENTPLA"]
   $aLin["SEMI"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt_ font-family: verdana_ font-size: 10px_ color: inherit_ width: 300px_"><tr><td style="text-align: left_             ">' . $aLin["SDEST"] . '</td></tr><tr><td style="text-align: left_             ">' . $aLin["PDEST"] . '</td></tr><tr><td style="text-align: left_             ">' . ($aLin["SCNPJ"]!='' ? $aLin["SCNPJ"] : $aLin["SCPF"]) . '</td></tr><tr><td style="text-align: left_             ">' . ($aLin["TCLIREJEITO"]!='' ? '<font color=#BB0000>'.'CLIENTE RETIDO'.'</font>' : ($aLin["LCLIINATIVO"]==0 ? '' : '<font color=#BB0000>'.'CLIENTE INATIVO (EM ANALISE)'.'</font>')) . '</td></tr><tr><td style="text-align: left_             ">' . ($aLin["LTNETA"]==0 ? '' : '<font color=#BB0000>'.'ATUALIZAR INFORMACOES DO CLIENTE'.'</font>')  .'</td></tr></table>'
   $aLin["NTOT_VPROD"]
   $aLin["TVALPRECO"]=='' ? '' : date('d/m/Y', strtotime($aLin["TVALPRECO"]))
   $aLin["TLIBCOM"]
   $aLin["TCONF"]=='' ? '' : date('d/m/Y', strtotime($aLin["TCONF"]))
   $aLin["PPID"]    
</Esc_Cpo1>
<Esc_Sql1>
   select first 100 a.pPId,
          a.tIn0,
          a.tLibCom,
          a.tValPreco,
          a.pBOPaiDeTodos,
          a.lGerarPreNF,
          a.tConc,
          a.tIn0,
          a.tEmissao,
          a.tConf,
          a.nTot_vProd,
          a.nPorcCTR,
          a.tCanc,
          a.pTOper,
          a.pDest,
          a.pEmi,
          a.nDescFin,
          a.nPDescLog,
          a.tEntPla  dEntPla,
          a.tEntPlaCalc,
          a.jTipo jEntSai,
          a.sDoc,
          a.jOrigem,
          b.sSigla   sEmi,
          c.sCoringa sDest,
          c.sCNPJ,
          c.sCPF,
          a.pMoe,
          a.nTot_vNF,
          a.jBC_Pis,
          a.jBC_Cofins,
          a.jBC_Icms,
          a.jBC_IPI,
          a.jBC_II,
          a.jBC_ICMSST,
          a.jBC_ISS,
          a.jVl_ICMSST,
          a.jVl_ICMS,
          a.lLimCred,
          a.lFinanc,
          c.sEmail,
          c.sEmail_Temp
   from Ordens  a left join CUP    b on a.pEmi   = b.pPId and b.iVer = a.fEmi
                  left join CUP    c on a.pDest  = c.pPId and c.iVer = a.fDest
   where a.lExc   = 0      and a.iVer  = a.iVAt
     and a.jTipo  = 1
     and a.pRepCom = {p1}
     and a.pEmi    = {p2}
     and a.pDest   = {p3}
     and a.pTOper  = {p4}
     and a.tConf is not null
   order by a.tConf desc   
</Esc_Sql1>
<Esc_SqlVars1>
   select a.pPId,
          a.tIn0 dIn0
   from Ordens  a
  where a.pPId = {pEscId}
    and a.iVer = a.iVAt
</Esc_SqlVars1>
<Esc_VarsServerToClient1>
   $aLin["PPID"]
   $aLin["DIN0"]
</Esc_VarsServerToClient1>
<TelaTit1>
     Dados do Pedido
</TelaTit1>
<DbToVars1>  
    select a.tInc,
           a.iVer,
           a.iVAt,
	   a.pPId,
           a.sVer,
	   a.tIn0     dIn0,
           a.sObsTNet,     
           a.jOrigem,  
           a.tEntPla  sEntPla,
           a.tConf,    
           a.tCanc,
           a.tEmissao tEmissao, 
           a.tSaida   dSaida,   
           a.sDoc,
           a.jTipo jEntSai,
           a.nTot_vBC,
           a.nTot_vICMS,
           a.nTot_vBCST,
           a.nTot_vST,
           a.nTot_vProd,
           a.nPorcCTR,
           a.nTot_vFrete,
           a.nTot_vSeg,
           a.nTot_vDesc,
           a.nTot_vII,
           a.nTot_vIPI,
           a.nTot_vPIS,
           a.nTot_vCOFINS,
           a.nTot_vOutro,
           a.nTot_vNF,
           a.nTot_vFIN,
           a.nTot_vNF-a.nTot_vFIN nTot_vFINDesc,
           a.nTot_vTrib,
           a.nISSQNtot_vServ,
           a.nISSQNtot_vBC,
           a.nISSQNtot_vISS,
           a.nISSQNtot_vPIS,
           a.nISSQNtot_vCOFINS,
           a.iVol_qVol,
           a.sVol_esp,
           a.sVol_marca,
           a.sVol_nVOL,
           a.nVol_pesoL,
           a.nVol_pesoB,
           a.tEntPlaCalc  dEntPlaCalc,
           a.pEmi,
	   a.fEmi,    
           b.sCoringa  sEmi0,
           b.sCoringa  sEmi1,
           b.sEmail   sEmail0,
	   b.sCNPJ    sEmiCNPJ,    
	   b.sCPF     sEmiCPF,    
           a.pDest, 
	   a.fDest,
	   c.sCoringa sDest0,    
	   c.sCNPJ    sDestCNPJ,    
	   c.sCPF     sDestCPF,    
      c.lInativo,           
	   c.sCoringa sDest1,    
	   c.sCoringa sDest1a,    
	   c.sCNPJ    sCNPJ,    
	   c.sCPF     sCPF,    
      c.sEmail   sEmail1,
	   c.sCoringa sDest2,    
	   c.sFanta   sFantaDest,    
      c.sPassaporte, 
           a.pMoe,
           a.fMoe,
           v.sDescricao  sMoe,
           v.sDescricao  sMoe0,
           a.pTOper,   
	   a.fTOper,
	   d.sDescricao sTOper,
           d.sCodigo    sTOperCod,
           a.pNatOper,
           dd.sDescricao  sDesNatOper,
           a.fNatOper,
           a.pRepCom, 
	   a.fRepCom,
	   f.sCoringa sRepComEnt,
	   f.sCoringa sRepComSai,
           a.pEmiEndPos,  
           a.pEmiEndEnt,  
           a.pEmiEndCob,  
           a.fEmiEndPos,  
           a.fEmiEndEnt,  
           a.fEmiEndCob,  
           a.pEmiCEPPos, 
           a.pEmiCEPEnt, 
           a.pEmiCEPCob, 
           a.fEmiCEPPos, 
           a.fEmiCEPEnt, 
           a.fEmiCEPCob, 
           a.pEmiCidPos, 
           a.pEmiCidEnt, 
           a.pEmiCidCob, 
           a.fEmiCidPos, 
           a.fEmiCidEnt, 
           a.fEmiCidCob, 
           a.pEmiUFPos, 
           a.pEmiUFEnt, 
           a.pEmiUFCob, 
           a.fEmiUFPos, 
           a.fEmiUFEnt, 
           a.fEmiUFCob, 
           a.pEmiPaisPos, 
           a.pEmiPaisEnt, 
           a.pEmiPaisCob, 
           a.fEmiPaisPos, 
           a.fEmiPaisEnt, 
           a.fEmiPaisCob, 
           c1.sCEP       sEmiPosCEP, 
           c1.sLog       sEmiPosLog,
           b1.sNr        sEmiPosNr,   
           b1.sComp      sEmiPosComp,           
           c1.sBai       sEmiPosBai,
           d1.sCidade    sEmiPosCid,
           e1.sSigla     sEmiPosSigla,
           h1.sDescricao sEmiPosPais,
           c3.sCEP       sEmiCEPEnt, 
           c3.sLog       sEmiLogEnt,
           b3.sNr        sEmiNrEnt,   
           b3.sComp      sEmiCompEnt,           
           c3.sBai       sEmiBaiEnt,
           d3.sCidade    sEmiCidEnt,
           e3.sSigla     sEmiSiglaEnt,
           h3.sDescricao sEmiPaisEnt,
           c4.sCEP       sEmiCEPCob,
           c4.sLog       sEmiLogCob,
           b4.sNr        sEmiNrCob,   
           b4.sComp      sEmiCompCob,           
           c4.sBai       sEmiBaiCob,
           d4.sCidade    sEmiCidCob,
           e4.sSigla     sEmiSiglaCob,
           h4.sDescricao sEmiPaisCob,
           a.pDestEndPos, 
           a.pDestEndEnt, 
           a.pDestEndCob, 
           a.fDestEndPos, 
           a.fDestEndEnt, 
           a.fDestEndCob, 
           a.pDestCEPPos, 
           a.pDestCEPEnt, 
           a.pDestCEPCob, 
           a.fDestCEPPos, 
           a.fDestCEPEnt, 
           a.fDestCEPCob, 
           a.pDestCidPos, 
           a.pDestCidEnt, 
           a.pDestCidCob, 
           a.fDestCidPos, 
           a.fDestCidEnt, 
           a.fDestCidCob, 
           a.pDestUFPos, 
           a.pDestUFEnt, 
           a.pDestUFCob, 
           a.fDestUFPos, 
           a.fDestUFEnt, 
           a.fDestUFCob, 
           a.pDestPaisPos, 
           a.pDestPaisEnt, 
           a.pDestPaisCob, 
           a.fDestPaisPos, 
           a.fDestPaisEnt, 
           a.fDestPaisCob, 
           cc1.sCEP       sDestPosCEP, 
           cc1.sLog       sDestPosLog,
           bb1.sNr        sDestPosNr,   
           bb1.sComp      sDestPosComp,           
           cc1.sBai       sDestPosBai,
           dd1.sCidade    sDestPosCid,
           ee1.sSigla     sDestPosSigla,
           hh1.sDescricao sDestPosPais,
           cc3.sCEP       sDestCEPEnt, 
           cc3.sLog       sDestLogEnt,
           bb3.sNr        sDestNrEnt, 
           bb3.sComp      sDestCompEnt,           
           cc3.sBai       sDestBaiEnt,
           dd3.sCidade    sDestCidEnt,
           ee3.sSigla     sDestSiglaEnt,
           hh3.sDescricao sDestPaisEnt,
           cc4.sCEP       sDestCEPCob,
           cc4.sLog       sDestLogCob,
           bb4.sNr        sDestNrCob,   
           bb4.sComp      sDestCompCob,           
           cc4.sBai       sDestBaiCob,
           dd4.sCidade    sDestCidCob,
           ee4.sSigla     sDestSiglaCob,
           hh4.sDescricao sDestPaisCob,
           a.lImpDtSai,
           a.jTpTab,
           a.lLCredDest,
           a.lLCredGrpCli,
           a.lCrtlRot, 
           a.lCrtlItem, 
           a.lGerNFe,
           a.lComisRep,
           a.jDtPlaEnt,
           a.jBC_Pis,
           a.jBC_Cofins,
           a.jBC_Icms,
           a.jBC_IPI,
           a.jBC_II,
           a.jBC_ICMSST,
           a.jBC_ISS,
           a.jVl_ICMSST,
           a.jVl_ICMS,
           a.jPriori,
           a.lCotas,
           a.lGlobal,
           a.lSCusto,
           a.lBonif,
           a.lBrinde,
           a.lComis,
           a.lABC,
           a.lACC,
           a.lCCusto,
           a.nDescFin,
           a.lCtrlBloqFin,
           a.lBloqAuto, 
           a.lFinanc,
           a.lCttos,
           a.jFrete,
           a.lRetira,
           a.lAgendamento,
           a.lImpTxAgenNF,
           a.lCPalet,
           a.lCanh, 
           a.lContPrazo,
           a.iAnteciMax,
           a.iAtrasoMax,
           a.sObsNF,
           a.sObsNFM,
           a.pVeic,
           g1.sVeic,
           g1.sPlaca,
           g1.sMarca,
           g1.iAno,
           g1.sCor,
           g1.sChassi,	
           g1.sRenav,
           g1.sRNTC,
           a.fVeic,
           a.pTipoVeic,
           i1.sDescricao sDescTipoVeic,
           i1.jTipoVeic,
           i1.nTotMax,
           i1.iVolMax,
           i1.iPesoMax,
           i1.jComb,
           i1.iQtEixo,       
           a.fTipoVeic,
           a.pTransp,
           f1.sCoringa sTransp,
           a.fTransp,
           a.pPTOpED,
           a.fPTOpED,
           a.jEmitido,
           a.tEmitido,
           a.pEmitido,
           x.sCoringa sEmitido,
           a.tBasePrest,
           a.pDoc,
           a.fDoc,
           a.pCC,
           a.fCC,
           g.pAgencia,
           g.fAgencia,
           g.sCC        sCC,
           g.sDac       sDac,
           h.sAgencia   sAgeNr,
           h.sCoringa   sAge,
           h.pBanco     pBanco,
           h.fBanco     fBanco,
           i.sCodigo    sCodBanco,
           i.sDescricao sDesBanco,
           a.pContr,
           e.sDescricao sDesContr,
           e.sCodigo    sCodContr,
           a.fContr,
           a.lSped,
           a.jClaSped,
           a.sIde_Serie,
           a.lEstouroOrcamento,
           a.tLibEstouroOrcamento  dLibEstouroOrcamento,
           a.pLibEstouroOrcamento,
           ii.sCoringa sLibEstouroOrcamento,
           a.lLimCred,
           a.tLibLimCred  dLibLimCred,
           a.pLibLimCred,
           jj.sCoringa sLibLimCred,
           a.sTxtSN,
           a.pRotItinEnt,
           a.fRotItinEnt,
           a.pPRepUNeg,
           a.fPRepUNeg,
           a.pTabPreco,
           w.sCodigo     sTab,
           w.sDescricao  sCodTab,
           a.fTabPreco,
           a.pGestor,
           w1.sCoringa sGestor,
           a.nPGestor,
           a.fGestor,
           a.jide_Mod,
           a.jide_indFinal,
           a.jide_indPres,
           a.jide_idDest,
           a.nTot_vICMSDeson,
           a.tISSQN_dCompet,
           a.nISSQNtot_vDeducao,
           a.nISSQNtot_vOutro,
           a.nISSQNtot_vDescIncond,
           a.nISSQNtot_vDescCond,
           a.nISSQNtot_vISSRet,
           a.jISSQN_cRegTrib,
           a.nTot_vTotTrib,
           a.nVFCPUFDest,
           a.nVICMSUFDest,
           a.nVICMSUFRemet,
           a.sObsFin,
           a.lZFM,
           a.lZFMAbat,
           a.jCargaI,
           a.pPed,
           l.tIn0   tIncPed,
           a.sEmailDest,
           a.sEmail_Temp,
           a.iTemp,
           a.lDevoluc,
           a.lTransfRem,
           a.lRedesp,
           a.lCalculado,
           a.lCliInativo,
           a.pPFinHold_Linha,
           a.pPFinHold,
           a.pHold,
           a.fPFinHold_Linha,
           a.fPFinHold,
           a.fHold,
           a.nPDescLog,
           a.lPedAnjo,
           a.pOrdemGrupo,
           a.tCliRejeito,
           a.pCliRejeito,
           x4.sCoringa  sCliRejeito,
           a.sMotCliRejeito,
           a.lAmazon,
           a.sObsRep,
           z.sCoringa
   from Ordens     a    left join  Enderecos      b1  on a.pEmiEndPos    =  b1.pPId  and  ((a.tConf is null and b1.iVer= b1.iVAt) or (a.tConf is not null and b1.iVer=a.fEmiEndPos))
                        left join  CEPs           c1  on a.pEmiCEPPos    =  c1.pPId  and  ((a.tConf is null and c1.iVer= c1.iVAt) or (a.tConf is not null and c1.iVer=a.fEmiCEPPos))
                        left join  Cidades        d1  on a.pEmiCidPos    =  d1.pPId  and  ((a.tConf is null and d1.iVer= d1.iVAt) or (a.tConf is not null and d1.iVer=a.fEmiCidPos))
                        left join  UFs            e1  on a.pEmiUFPos     =  e1.pPId  and  ((a.tConf is null and e1.iVer= e1.iVAt) or (a.tConf is not null and e1.iVer=a.fEmiUFPos))
                        left join  Paises         h1  on a.pEmiPaisPos   =  h1.pPId  and  ((a.tConf is null and h1.iVer= h1.iVAt) or (a.tConf is not null and h1.iVer=a.fEmiPaisPos))
                        left join  Enderecos      b3  on a.pEmiEndEnt    =  b3.pPId  and  ((a.tConf is null and b3.iVer= b3.iVAt) or (a.tConf is not null and b3.iVer=a.fEmiEndEnt))
                        left join  CEPs           c3  on a.pEmiCEPEnt    =  c3.pPId  and  ((a.tConf is null and c3.iVer= c3.iVAt) or (a.tConf is not null and c3.iVer=a.fEmiCEPEnt))
                        left join  Cidades        d3  on a.pEmiCidEnt    =  d3.pPId  and  ((a.tConf is null and d3.iVer= d3.iVAt) or (a.tConf is not null and d3.iVer=a.fEmiCidEnt))
                        left join  UFs            e3  on a.pEmiUFEnt     =  e3.pPId  and  ((a.tConf is null and e3.iVer= e3.iVAt) or (a.tConf is not null and e3.iVer=a.fEmiUFEnt))
                        left join  Paises         h3  on a.pEmiPaisEnt   =  h3.pPId  and  ((a.tConf is null and h3.iVer= h3.iVAt) or (a.tConf is not null and h3.iVer=a.fEmiPaisEnt))
                        left join  Enderecos      b4  on a.pEmiEndCob    =  b4.pPId  and  ((a.tConf is null and b4.iVer= b4.iVAt) or (a.tConf is not null and b4.iVer=a.fEmiEndCob))
                        left join  CEPs           c4  on a.pEmiCEPCob    =  c4.pPId  and  ((a.tConf is null and c4.iVer= c4.iVAt) or (a.tConf is not null and c4.iVer=a.fEmiCEPCob))
                        left join  Cidades        d4  on a.pEmiCidCob    =  d4.pPId  and  ((a.tConf is null and d4.iVer= d4.iVAt) or (a.tConf is not null and d4.iVer=a.fEmiCidCob))
                        left join  UFs            e4  on a.pEmiUFCob     =  e4.pPId  and  ((a.tConf is null and e4.iVer= e4.iVAt) or (a.tConf is not null and e4.iVer=a.fEmiUFCob))
                        left join  Paises         h4  on a.pEmiPaisCob   =  h4.pPId  and  ((a.tConf is null and h4.iVer= h4.iVAt) or (a.tConf is not null and h4.iVer=a.fEmiPaisCob))
                       	left join  Enderecos     bb1  on a.pDestEndPos   = bb1.pPId  and  ((a.tConf is null and bb1.iVer=bb1.iVAt) or (a.tConf is not null and bb1.iVer=a.fDestEndPos)) 
                        left join  CEPs          cc1  on a.pDestCEPPos   = cc1.pPId  and  ((a.tConf is null and cc1.iVer=cc1.iVAt) or (a.tConf is not null and cc1.iVer=a.fDestCEPPos))
                        left join  Cidades       dd1  on a.pDestCidPos   = dd1.pPId  and  ((a.tConf is null and dd1.iVer=dd1.iVAt) or (a.tConf is not null and dd1.iVer=a.fDestCidPos))
                        left join  UFs           ee1  on a.pDestUFPos    = ee1.pPId  and  ((a.tConf is null and ee1.iVer=ee1.iVAt) or (a.tConf is not null and ee1.iVer=a.fDestUFPos))
                        left join  Paises        hh1  on a.pDestPaisPos  = hh1.pPId  and  ((a.tConf is null and hh1.iVer=hh1.iVAt) or (a.tConf is not null and hh1.iVer=a.fDestPaisPos))
                        left join  Enderecos     bb3  on a.pDestEndEnt   = bb3.pPId  and  ((a.tConf is null and bb3.iVer=bb3.iVAt) or (a.tConf is not null and bb3.iVer=a.fDestEndEnt))
                        left join  CEPs          cc3  on a.pDestCEPEnt   = cc3.pPId  and  ((a.tConf is null and cc3.iVer=cc3.iVAt) or (a.tConf is not null and cc3.iVer=a.fDestCEPEnt))
                        left join  Cidades       dd3  on a.pDestCidEnt   = dd3.pPId  and  ((a.tConf is null and dd3.iVer=dd3.iVAt) or (a.tConf is not null and dd3.iVer=a.fDestCidEnt))
                        left join  UFs           ee3  on a.pDestUFEnt    = ee3.pPId  and  ((a.tConf is null and ee3.iVer=ee3.iVAt) or (a.tConf is not null and ee3.iVer=a.fDestUFEnt))
                        left join  Paises        hh3  on a.pDestPaisEnt  = hh3.pPId  and  ((a.tConf is null and hh3.iVer=hh3.iVAt) or (a.tConf is not null and hh3.iVer=a.fDestPaisEnt))
                        left join  Enderecos     bb4  on a.pDestEndCob   = bb4.pPId  and  ((a.tConf is null and bb4.iVer=bb4.iVAt) or (a.tConf is not null and bb4.iVer=a.fDestEndCob))
                        left join  CEPs          cc4  on a.pDestCEPCob   = cc4.pPId  and  ((a.tConf is null and cc4.iVer=cc4.iVAt) or (a.tConf is not null and cc4.iVer=a.fDestCEPCob))
                        left join  Cidades       dd4  on a.pDestCidCob   = dd4.pPId  and  ((a.tConf is null and dd4.iVer=dd4.iVAt) or (a.tConf is not null and dd4.iVer=a.fDestCidCob))
                        left join  UFs           ee4  on a.pDestUFCob    = ee4.pPId  and  ((a.tConf is null and ee4.iVer=ee4.iVAt) or (a.tConf is not null and ee4.iVer=a.fDestUFCob))
                        left join  Paises        hh4  on a.pDestPaisCob  = hh4.pPId  and  ((a.tConf is null and hh4.iVer=hh4.iVAt) or (a.tConf is not null and hh4.iVer=a.fDestPaisCob))
                        left join CUP              f  on a.pRepCom       =   f.pPId  and  ((a.tConf is null and f.iVer = f.iVAt) or (a.tConf is not null and   f.iVer=a.fRepCom)) 
                        left join NatOper          dd on a.pNatOper      =   dd.pPId and  ((a.tConf is null and dd.iVer = dd.iVAt) or (a.tConf is not null and   dd.iVer=a.fNatOper))
                        left join Moeda            v  on a.pMoe          =   v.pPId  and  ((a.tConf is null and v.iVer = v.iVAt) or (a.tConf is not null and   v.iVer=a.fMoe))
                        left join CUP              f1 on a.pTransp       =   f1.pPId and  ((a.tConf is null and f1.iVer = f1.iVAt) or (a.tConf is not null and   f1.iVer=a.fTransp))
                        left join Veiculos         g1 on a.pVeic         =   g1.pPId and  ((a.tConf is null and g1.iVer = g1.iVAt) or (a.tConf is not null and   g1.iVer=a.fVeic))
                        left join Tipo_Veiculos    i1 on a.pTipoVeic     =   i1.pPId and  ((a.tConf is null and i1.iVer = i1.iVAt) or (a.tConf is not null and   i1.iVer=a.fTipoVeic))
                        left join CUP              x  on a.pEmitido      =    x.pPId and x.iVer = x.iVAt
                        left join ConComSerIns     e on a.pContr         = e.pPId and ((a.tConf is null and e.iVer = e.iVAt) or (a.tConf is not null and  e.iVer=a.fContr))
                        left join CC               g on a.pCC             =  g.pPId and  ((a.tConf is null and g.iVer = g.iVAt) or (a.tConf is not null and  g.iVer=a.fCC))
                        left join TabPrecos        w on a.pTabPreco       =  w.pPId and  ((a.tConf is null and w.iVer = w.iVAt) or (a.tConf is not null and  w.iVer=a.fTabPreco))
                        left join CUP              w1 on a.pGestor        =  w1.pPId and  ((a.tConf is null and w1.iVer = w1.iVAt) or (a.tConf is not null and  w1.iVer=a.fGestor))
                        left join CUP              h on g.pAgencia = h.pPid and h.iVer = h.iVAt
                        left join Banco            i on h.pBanco   = i.pPid and i.iVer = i.iVAt
                        left join CUP              ii on a.pLibEstouroOrcamento = ii.pPid and ii.iVer = ii.iVAt
                        left join CUP              jj on a.pLibLimCred          = jj.pPid and jj.iVer = jj.iVAt
                        left join Ordens           l  on a.pPed                 = l.pPid  and l.iVer  = l.iVAt 
                        left join CUP              x4  on a.pCliRejeito    =  x4.pPId and x4.iVer = x4.iVAt,
        CUP      b,
        CUP      c,
        TOper    d,
        PTOpED   j,
        CUP      z
   where a.pPId     = {pId}
     and a.iVer     = {a.iVer}
     and a.pEmi   = b.pPId and b.iVer = a.fEmi  
     and a.pDest  = c.pPId and c.iVer = a.fDest 
     and a.pTOper   = d.pPId  and d.iVer = d.iVAt 
     and a.pInc     = z.pPId  and z.iVer = z.iVAt
     and a.pPTOpED  = j.pPId  and j.iVer = j.iVAt
     order by 2
</DbToVars1>
<1>
   select a.pPId                 pOrdens_FPgmto_i,
          a.iVer                 fOrdem_i,
          a.pPED_FPgmto_CPgmto   pPED_FPgmto_CPgmto_i,
          a.fPED_FPgmto_CPgmto   fPED_FPgmto_CPgmto_i,
          a.nPorc                nPorc_i,
          d.pPId                 pPED_FPG_i,
          c.pPId                 pCPgmto_i,
          c.sCPgmto              sCPgmto_i,
          e.pPId                 pFPgmto_i,
          (case when ((f.lBoleto=1)and(j.pTipoCob>0) and (g.tIn0>i.tIn0) and (n.lFatHolding=0)) then k.pPId else f.pPId  end) pTipoCob_i,
          b.lDefault             lDefault_i,
          e.sDescricao           sFPgmto_i,
          (case when ((f.lBoleto=1)and(j.pTipoCob>0) and (g.tIn0>i.tIn0) and (n.lFatHolding=0)) then k.sDescricao else f.sDescricao  end) sTipoCob_i,
          (case when ((f.lBoleto=1)and(j.pTipoCob>0) and (g.tIn0>i.tIn0) and (n.lFatHolding=0)) then k.sCodigo    else f.sCodigo     end) sCodTipoCob_i,
          c.nDFin                nDFin_i,
          a.t1aPrest             d1aPrest_i,
          j.pTipoCob             pTipoCobHld_i,
          f.lBoleto              lBoleto_i,
          a.lAplicarCPgmto       lAplicarCPgmto_i
   from Ordens_FPgmto     a      join PED_FPgmto_CPgmto  b on a.pPED_FPgmto_CPgmto = b.pPId and b.iVer = (case when a.fPED_FPgmto_CPgmto=0 then b.iVAt else a.fPED_FPgmto_CPgmto end)
                                 join Ordens             g on a.pOrdem             = g.pPId and g.iVer = g.iVAt
                            left join CPgmto             c on b.pCPgmto            = c.pPId and c.iVer = c.iVAt
                            left join PED_FPgmto         d on b.pPED_FPG           = d.pPId and d.iVer = d.iVAt
                            left join FPgmto             e on d.pFPgmto            = e.pPId and e.iVer = e.iVAt
                            left join Tipo_Cobrancas     f on d.pTipoCob           = f.pPId and f.iVer = f.iVAt
                            left join PED                n on d.pPED               = n.pPId and n.iVer = n.iVAt
                            left join PFinHold_Linha         j on j.pUNeg    = g.pEmi   and j.iVer = j.iVAt and j.lExc=0
                            left join PFinHold               i on j.pCapa    = i.pPId   and i.iVer = i.iVAt and i.lExc=0
                            left join Tipo_Cobrancas         k on j.pTipoCob = k.pPId   and k.iVer = k.iVAt                    
   where  a.lExc               = 0
      and a.pOrdem             = {ChaveAtual_0}
      and a.iVer = a.iVAt
   order by e.sDescricao,f.sDescricao,c.sCPgmto
</1>
<2>
   select a.pPId        pOrdens_Prest_i,
          a.sDup_nDup   sDup_nDup_i,
          a.dDup_Venc   dDup_Venc_i,
          a.nDup_vDup   nDup_vDup_i
   from Ordens_Prest a
   where a.iVer   = a.iVAt
     and a.lExc   = 0
     and a.pOrdem = {ChaveAtual_0}
</2>
<VarsDefault1>
   sVerVAt    = {iVer+'/'+iVAt}
   sRastro    = {sVerVAt+', '+sCoringa+', '+tInc}
   jEntSai    = 1
   jDtPlaEnt  = 1
   mObsTNet   = {sObsTNet}
   mObsNF    = {sObsNF}
   mObsNFM   = {sObsNFM}
   mTxtSN    = {sTxtSN}
   mObsFin   = {sObsFin}
   mDesContr = {sDesContr}
   mObsRep   = {sObsRep}
   mMotCliRejeito = {sMotCliRejeito}
   nPorc_{i}  = 100
   jEmitido   = 1
   pLogin     = {pLogin}
   lEndDest   = 0
   jOrigem = 4;
   dEntPla = {flDiaDeHj()} ; {sEntPla}   
   aCargaI =No carregar itens - incluso manual de itens avulsos,Carregar os itens da ltima venda (Apenas itens Qt>0 e ordens confirmadas)
   iPed    = {pPed  ==0 ? '' : pPed  }
   sCodDest = {pDest==0 ? '' : pDest}
   lBloq = 0
</VarsDefault1>
<ScriptForm1>
   ;
   Nmero da OV ; pPId-10 ; editable=false; visible=iDDFChamada>0 ; identlabel=5
   Emissor                               ; sEmi1-60               ; identlabel=5      ; esc=('dd_files/UNeg.dda','Esc_Padrao_3a','sEmi1,pLogin' ,'pEmi,fEmi,sEmi1,sEmiCNPJ,sEmiCPF,sEmiPosCEP,sEmiPosLog,sEmiPosComp,sEmiPosBai,sEmiPosCid,sEmiPosSigla,sEmiPosNr,sEmiPosPais,sEmiCEPEnt,sEmiLogEnt,sEmiNrEnt,sEmiCompEnt,sEmiBaiEnt,sEmiCidEnt,sEmiSiglaEnt,sEmiPaisEnt,sEmiCEPCob,sEmiLogCob,sEmiNrCob,sEmiCompCob,sEmiBaiCob,sEmiCidCob,sEmiSiglaCob,sEmiPaisCob,pEmiEndPos,pEmiEndEnt,pEmiEndCob,fEmiEndPos,fEmiEndEnt,fEmiEndCob,pEmiCEPPos,pEmiCEPEnt,pEmiCEPCob,fEmiCEPPos,fEmiCEPEnt,fEmiCEPCob,pEmiCidPos,pEmiCidEnt,pEmiCidCob,fEmiCidPos,fEmiCidEnt,fEmiCidCob,pEmiUFPos,pEmiUFEnt,pEmiUFCob,fEmiUFPos,fEmiUFEnt,fEmiUFCob,pEmiPaisPos,pEmiPaisEnt,pEmiPaisCob,fEmiPaisPos,fEmiPaisEnt,fEmiPaisCob')                 ; valid=(((pEmi>0) ||(jEntSai!=1)) ,'O Emissor deve ser informado.')     ; exec=(this.flSetVar('pDest',0) && this.flSetVar('fDest',0) && this.flSetVar('sDest0','') && this.flSetVar('sCodDest','') && this.flSetVar('sDest1a','') &&  this.flSetVar('sDest1','') && this.flSetVar('sFantaDest','') && this.flSetVar('sDestCNPJ','') && this.flSetVar('sDestCPF','') && this.flSetVar('sPassaporte','') && this.flSetVar('sEmailDest','') && this.flSetVar('sDestPosCEP','') && this.flSetVar('sDestPosLog','') && this.flSetVar('sDestPosCom','') && this.flSetVar('sDestPosBai','') && this.flSetVar('sDestPosCid','') && this.flSetVar('sDestPosSigla','') && this.flSetVar('sDestPosNr','') && this.flSetVar('sDestPosPais','') && this.flSetVar('sDestCEPEnt','') && this.flSetVar('sDestLogEnt','') && this.flSetVar('sDestCompEnt','') && this.flSetVar('sDestBaiEnt','') && this.flSetVar('sDestCidEnt','') && this.flSetVar('sDestSiglaEnt','') && this.flSetVar('sDestNrEnt','') && this.flSetVar('sDestPaisEnt','') && this.flSetVar('sDestCEPCob','') && this.flSetVar('sDestLogCob','') && this.flSetVar('sDestCompCob','') && this.flSetVar('sDestBaiCob','') && this.flSetVar('sDestCidCob','') && this.flSetVar('sDestSiglaCob','') && this.flSetVar('sDestNrCob','') && this.flSetVar('sDestPaisCob','') && this.flSetVar('pDestEndPos',0) && this.flSetVar('pDestEndEnt',0) && this.flSetVar('pDestEndCob',0) && this.flSetVar('fDestEndPos',0) && this.flSetVar('fDestEndEnt',0) && this.flSetVar('fDestEndCob',0) && this.flSetVar('pDestCEPPos',0) && this.flSetVar('pDestCEPEnt',0) && this.flSetVar('pDestCEPCob',0) && this.flSetVar('fDestCEPPos',0) && this.flSetVar('fDestCEPEnt',0) && this.flSetVar('fDestCEPCob',0) && this.flSetVar('pDestCidPos',0) && this.flSetVar('pDestCidEnt',0) && this.flSetVar('pDestCidCob',0) && this.flSetVar('fDestCidPos',0) && this.flSetVar('fDestCidEnt',0) && this.flSetVar('fDestCidCob',0) && this.flSetVar('pDestUFPos',0) && this.flSetVar('pDestUFEnt',0) && this.flSetVar('pDestUFCob',0) && this.flSetVar('fDestUFPos',0) && this.flSetVar('fDestUFEnt',0) && this.flSetVar('fDestUFCob',0) && this.flSetVar('pPaisPos',0) && this.flSetVar('pDestPaisEnt',0) && this.flSetVar('pDestPaisCob',0) && this.flSetVar('fDestPaisPos',0) && this.flSetVar('fDestPaisEnt',0) && this.flSetVar('fDestPaisCob',0) && this.flSetVarSOA('pPED_FPgmto_CPgmto_{1}',0) && this.flSetVarSOA('fPED_FPgmto_CPgmto_{1}',0) && this.flSetVarSOA('pFPgmto_{1}',0) && this.flSetVarSOA('pTipoCob_{1}',0) && this.flSetVarSOA('pCPgmto_{1}',0) && this.flSetVarSOA('sFPgmto_{1}','') && this.flSetVarSOA('sCPgmto_{1}','') && this.flSetVarSOA('sTipoCob_{1}','') && this.flSetVarSOA('sCodTipoCob_{1}','') && this.flSetVarSOA('lDefault_{1}',0) && this.flSetVarSOA('sDFin_{1}','') && this.flSetVar('pTOper',0) && this.flSetVar('fTOper',0) && this.flSetVar('sTOperCod','') && this.flSetVar('sTOper','') &&  this.flSetVar('pNatOper',0) && this.flSetVar('fNatOper',0) && this.flSetVar('sDesNatOper','') && this.flSetVar('pMoe',0) && this.flSetVar('sMoe','')&& this.flSetVar('sMoe0','') && this.flSetVar('nDescFin',0) && this.flSetVar('nPDescLog',0) && this.flSetVar('lFinanc',0) && this.flSetVar('lCttos',0)&& this.flSetVar('jPriori',0) && this.flSetVar('lGlobal',0) && this.flSetVar('lSCusto',0) && this.flSetVar('lCotas',0) &&  this.flSetVar('lBonif',0)  &&  this.flSetVar('lBrinde',0) && this.flSetVar('lComis',0) && this.flSetVar('lABC',0)&& this.flSetVar('jFrete',0) && this.flSetVar('lRetira',0) && this.flSetVar('lAgendamento',0) && this.flSetVar('lImpTxAgenNF',0) && this.flSetVar('lCPalet',0) && this.flSetVar('lCanh',0)&& this.flSetVar('fMoe',0)&& this.flSetVar('sTransp','') && this.flSetVar('pTransp',0) && this.flSetVar('fTransp',0) && this.flSetVar('pVeic',0)&& this.flSetVar('fVeic',0) && this.flSetVar('pTipoVeic',0)&& this.flSetVar('fTipoVeic',0) && this.flSetVar('jTipoVeic',0) && this.flSetVar('sVeic','') && this.flSetVar('sMarca','') && this.flSetVar('sPlaca','')&& this.flSetVar('iAno',0)&& this.flSetVar('sCor','')&& this.flSetVar('sChassi','')&& this.flSetVar('sRNTC','')&& this.flSetVar('nTotMax',0)&& this.flSetVar('jComb',0)&& this.flSetVar('iPesoMax',0)&& this.flSetVar('iVolMax',0)&& this.flSetVar('sRenav',0)&& this.flSetVar('sDesTipoVeic','') && this.flSetVar('iQtEixo',0) && this.flSetVar('sVol_esp','')&& this.flSetVar('sVol_marca','') &&  this.flSetVar('pDest',0) && this.flSetVar('fDest',0) && this.flSetVar('sDest0','') && this.flSetVar('sDestCNPJ','') && this.flSetVar('sDestCPF','') && this.flSetVar('pRepCom',0) && this.flSetVar('fRepCom',0) && this.flSetVar('sRepComEnt','')  && this.flSetVar('sRepComSai','') && this.flSetVar('pPRepUNeg',0)&& this.flSetVar('fPRepUNeg',0)&& this.flSetVar('pGestor',0)&& this.flSetVar('fGestor',0)&& this.flSetVar('sGestor','')&& this.flSetVar('lCliInativo',0))
   CNPJ                                  ; sEmiCNPJ-15            ; identlabel=5      ; visible=(sEmiCNPJ!='')     ; editable=false ;
   CFP                                   ; sEmiCPF-15             ; identlabel=5      ; visible=(sEmiCPF!='')      ; editable=false ;
   ;
   Cdigo do Cliente                     ; sCodDest-10             ; identlabel=5     ; visible=(jEntSai==1)       ; esc=('dd_files/erp_Cliente.dda','Esc_Padrao_2aa','sCodDest,pEmi,jEntSai,pLogin','pDest,fDest,sDest1,sDestCPF,sDestCNPJ,sPassaporte,sDestPosCEP,sDestPosLog,sDestPosComp,sDestPosBai,sDestPosCid,sDestPosSigla,sDestPosNr,sDestPosPais,sDestCEPEnt,sDestLogEnt,sDestCompEnt,sDestBaiEnt,sDestCidEnt,sDestSiglaEnt,sDestNrEnt,sDestPaisEnt,sDestCEPCob,sDestLogCob,sDestCompCob,sDestBaiCob,sDestCidCob,sDestSiglaCob,sDestNrCob,sDestPaisCob,pDestEndPos,pDestEndEnt,pDestEndCob,fDestEndPos,fDestEndEnt,fDestEndCob,pDestCEPPos,pDestCEPEnt,pDestCEPCob,fDestCEPPos,fDestCEPEnt,fDestCEPCob,pDestCidPos,pDestCidEnt,pDestCidCob,fDestCidPos,fDestCidEnt,fDestCidCob,pDestUFPos,pDestUFEnt,pDestUFCob,fDestUFPos,fDestUFEnt,fDestUFCob,pDestPaisPos,pDestPaisEnt,pDestPaisCob,fDestPaisPos,fDestPaisEnt,fDestPaisCob,pRotItinEnt,fRotItinEnt,sFantaDest,sDest1a,sCodDest,sEmailDest,pRepCom,fRepCom,sRepComSai,pGestor,fGestor,sGestor,pPRepUNeg,fPRepUNeg,lComisRep,jTpTab,nPGestor,lACC,lBloq,lCliInativo,pCliGrupo,sCliGrupo,mObsRep,pPED_FPgmto_CPgmto_{1},fPED_FPgmto_CPgmto_{1},pFPgmto_{1},pTipoCob_{1},pCPgmto_{1},sFPgmto_{1},sTipoCob_{1},sCodTipoCob_{1},sCPgmto_{1},lDefault_{1},sDFin_{1},pTipoCobHld_{1}') ; valid=(((sCodDest>0)||(jEntSai!=1)) ,'O Destinatrio deve ser informado.') ; exec=(this.flSetVar('pTOper',0) && this.flSetVar('fTOper',0) && this.flSetVar('sTOperCod','') && this.flSetVar('sTOper','') &&  this.flSetVar('pNatOper',0) && this.flSetVar('fNatOper',0) && this.flSetVar('sDesNatOper','')&& this.flSetVar('pMoe',0) && this.flSetVar('sMoe','')&& this.flSetVar('sMoe0','') && this.flSetVar('nDescFin',0) && this.flSetVar('nPDescLog',0) && this.flSetVar('lFinanc',0) && this.flSetVar('lCttos',0)&& this.flSetVar('jPriori',0) && this.flSetVar('lGlobal',0) && this.flSetVar('lSCusto',0) && this.flSetVar('lCotas',0) &&  this.flSetVar('lBonif',0) &&  this.flSetVar('lBrinde',0) && this.flSetVar('lComis',0) && this.flSetVar('lABC',0) && this.flSetVar('jFrete',0) && this.flSetVar('lRetira',0) && this.flSetVar('lAgendamento',0) && this.flSetVar('lImpTxAgenNF',0) && this.flSetVar('lCPalet',0) && this.flSetVar('lCanh',0) && this.flSetVar('fMoe',0) && this.flSetVar('sTransp','') && this.flSetVar('pTransp',0) && this.flSetVar('fTransp',0)&& this.flSetVar('pVeic',0)&& this.flSetVar('fVeic',0) && this.flSetVar('pTipoVeic',0)&& this.flSetVar('fTipoVeic',0) && this.flSetVar('jTipoVeic',0) && this.flSetVar('sVeic','') && this.flSetVar('sMarca','') && this.flSetVar('sPlaca','')&& this.flSetVar('iAno',0)&& this.flSetVar('sCor','')&& this.flSetVar('sChassi','')&& this.flSetVar('sRNTC','')&& this.flSetVar('nTotMax',0)&& this.flSetVar('jComb',0)&& this.flSetVar('iPesoMax',0)&& this.flSetVar('iVolMax',0)&& this.flSetVar('sRenav',0)&& this.flSetVar('sDesTipoVeic','') && this.flSetVar('iQtEixo',0) && this.flSetVar('sVol_esp','')&& this.flSetVar('sVol_marca','')) ; esc_varnoempty ; 
   Destinatrio                          ; sDest1-60               ; identlabel=5     ; visible=(sCodDest=='')     ; esc=('dd_files/erp_Cliente.dda','Esc_Padrao_2a','sDest1,pEmi,jEntSai,pLogin','pDest,fDest,sDest1,sDestCPF,sDestCNPJ,sPassaporte,sDestPosCEP,sDestPosLog,sDestPosComp,sDestPosBai,sDestPosCid,sDestPosSigla,sDestPosNr,sDestPosPais,sDestCEPEnt,sDestLogEnt,sDestCompEnt,sDestBaiEnt,sDestCidEnt,sDestSiglaEnt,sDestNrEnt,sDestPaisEnt,sDestCEPCob,sDestLogCob,sDestCompCob,sDestBaiCob,sDestCidCob,sDestSiglaCob,sDestNrCob,sDestPaisCob,pDestEndPos,pDestEndEnt,pDestEndCob,fDestEndPos,fDestEndEnt,fDestEndCob,pDestCEPPos,pDestCEPEnt,pDestCEPCob,fDestCEPPos,fDestCEPEnt,fDestCEPCob,pDestCidPos,pDestCidEnt,pDestCidCob,fDestCidPos,fDestCidEnt,fDestCidCob,pDestUFPos,pDestUFEnt,pDestUFCob,fDestUFPos,fDestUFEnt,fDestUFCob,pDestPaisPos,pDestPaisEnt,pDestPaisCob,fDestPaisPos,fDestPaisEnt,fDestPaisCob,pRotItinEnt,fRotItinEnt,sFantaDest,sDest1a,sCodDest,sEmailDest,pRepCom,fRepCom,sRepComSai,pGestor,fGestor,sGestor,pPRepUNeg,fPRepUNeg,lComisRep,jTpTab,nPGestor,lACC,lBloq,lCliInativo,pCliGrupo,sCliGrupo,mObsRep,pPED_FPgmto_CPgmto_{1},fPED_FPgmto_CPgmto_{1},pFPgmto_{1},pTipoCob_{1},pCPgmto_{1},sFPgmto_{1},sTipoCob_{1},sCodTipoCob_{1},sCPgmto_{1},lDefault_{1},sDFin_{1},pTipoCobHld_{1}') ; valid=(((pDest>0)||(jEntSai!=1)) ,'O Destinatrio deve ser informado.') ; exec=(this.flSetVar('pTOper',0) && this.flSetVar('fTOper',0) && this.flSetVar('sTOperCod','') && this.flSetVar('sTOper','') &&  this.flSetVar('pNatOper',0) && this.flSetVar('fNatOper',0) && this.flSetVar('sDesNatOper','')&& this.flSetVar('pMoe',0) && this.flSetVar('sMoe','')&& this.flSetVar('sMoe0','') && this.flSetVar('nDescFin',0) && this.flSetVar('nPDescLog',0) && this.flSetVar('lFinanc',0) && this.flSetVar('lCttos',0)&& this.flSetVar('jPriori',0) && this.flSetVar('lGlobal',0) && this.flSetVar('lSCusto',0) && this.flSetVar('lCotas',0) &&  this.flSetVar('lBonif',0)  &&  this.flSetVar('lBrinde',0) && this.flSetVar('lComis',0) && this.flSetVar('lABC',0) && this.flSetVar('jFrete',0) && this.flSetVar('lRetira',0) && this.flSetVar('lAgendamento',0) && this.flSetVar('lImpTxAgenNF',0) && this.flSetVar('lCPalet',0) && this.flSetVar('lCanh',0) && this.flSetVar('fMoe',0) && this.flSetVar('sTransp','') && this.flSetVar('pTransp',0) && this.flSetVar('fTransp',0)&& this.flSetVar('pVeic',0)&& this.flSetVar('fVeic',0) && this.flSetVar('pTipoVeic',0)&& this.flSetVar('fTipoVeic',0) && this.flSetVar('jTipoVeic',0) && this.flSetVar('sVeic','') && this.flSetVar('sMarca','') && this.flSetVar('sPlaca','')&& this.flSetVar('iAno',0)&& this.flSetVar('sCor','')&& this.flSetVar('sChassi','')&& this.flSetVar('sRNTC','')&& this.flSetVar('nTotMax',0)&& this.flSetVar('jComb',0)&& this.flSetVar('iPesoMax',0)&& this.flSetVar('iVolMax',0)&& this.flSetVar('sRenav',0)&& this.flSetVar('sDesTipoVeic','') && this.flSetVar('iQtEixo',0) && this.flSetVar('sVol_esp','')&& this.flSetVar('sVol_marca','')) ; editable=(pOrdemGrupo==0)
   Destinatrio                          ; sDest1a-60              ; identlabel=5     ; visible=(jEntSai==1)       ; visible=(sCodDest!='') ; editable=false
   Nome Fantasia                         ; sFantaDest-60           ; identlabel=5     ; visible=(sFantaDest!='')   ; editable=false ;
   CNPJ                                  ; sDestCNPJ-15            ; identlabel=5     ; visible=(sDestCNPJ!='')    ; editable=false ;
   CPF                                   ; sDestCPF-15             ; identlabel=5     ; visible=(sDestCPF!='')     ; editable=false ;
   ID Estrangeiro (Passaporte)           ; sPassaporte-20          ; identlabel=5     ; visible=(sPassaporte!='')  ; editable=false ;
   E-mail                                ; sEmailDest-20           ; identlabel=5     ; visible=(sEmailDest!='')   ; editable=false  ;
   <b>(Cliente Bloqueado, contatar departamento Financeiro.)</b>           ;                     ; fontcolor='red' ; fontlen=-1 ; colspan=true ; identlabel=5 ; visible=(lBloq==1) ;
   <b>(Cliente Inativo, se continuar a incluso do pedido, o cliente ser enviado automaticamento para analise cadastral.)</b>           ;                     ; fontcolor='red' ; fontlen=-1 ; colspan=true ; identlabel=5 ; visible=(lCliInativo==1) ;
   ;; visible=(pCliRejeito>0)
   Data da Reteno                   ; tCliRejeito                 ; identlabel=5      ;  editable=false ; visible=(tCliRejeito!='')
   Retido por                         ; sCliRejeito-50              ; identlabel=5      ;  editable=false ; visible=(pCliRejeito>0)
   Motivo da Reteno                 ; mMotCliRejeito-60-10-2000  ; identlabel=5      ; editable=false ; visible=(mMotCliRejeito!='')
   ;
Endereos Destinatrio                ; lEndDest-5          ; identlabel=5 ; edtzoom=true ; visible=(pDest>0)         
   ;; visible=(lEndDest==1) 
   Endereo Postal                    ;                     ; fontweight='bold'   ; visible=(lEndDest==1); identlabel=10
      CEP                                ; sDestPosCEP-8       ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0 
      Logradouro                         ; sDestPosLog-50      ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      Nmero                             ; sDestPosNr-5        ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      Complemento                        ; sDestPosComp-15     ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      Bairro                             ; sDestPosBai-30      ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      Cidade                             ; sDestPosCid-30      ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      UF                                 ; sDestPosSigla-2     ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      Pas                               ; sDestPosPais-20     ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      ;; visible=(lEndDest==1)
   Endereo Entrega                   ;                     ; fontweight='bold'   ; visible=(lEndDest==1); identlabel=10 ; fieldborder=0
      CEP                                ; sDestCEPEnt-8       ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0 
      Logradouro                         ; sDestLogEnt-50      ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      Nmero                             ; sDestNrEnt-5        ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0 
      Complemento                        ; sDestCompEnt-15     ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      Bairro                             ; sDestBaiEnt-30      ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      Cidade                             ; sDestCidEnt-30      ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      UF                                 ; sDestSiglaEnt-2     ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      Pas                               ; sDestPaisEnt-20     ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      ;; visible=(lEndDest==1)
   Endereo cobrana                  ;                     ; fontweight='bold'   ; visible=(lEndDest==1); identlabel=10 ; fieldborder=0
      CEP                                ; sDestCEPCob-8       ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0 
      Logradouro                         ; sDestLogCob-50      ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      Nmero                             ; sDestNrCob-5        ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0 
      Complemento                        ; sDestCompCob-15     ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      Bairro                             ; sDestBaiCob-30      ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      Cidade                             ; sDestCidCob-30      ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      UF                                 ; sDestSiglaCob-2     ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      Pas                               ; sDestPaisCob-20     ; identlabel=15    ; visible=(lEndDest==1); editable=false ; fieldborder=0
      ;; visible=(lEndDest==1) 
   ;
   Tipo de Operao                      ; sTOperCod-30        ; identlabel=5        ; editable=(lBloq==0) ; esc=('dd_files/erp_TOper.dda','Esc_Padrao_3A','sTOperCod,pEmi,pDest,jEntSai','pPTOpED,fPTOpED,pTOper,fTOper,sTOperCod,sTOper,pNatOper,fNatOper,sDesNatOper,nDescFin,lFinanc,lLCredDest,lLCredGrpCli,jPriori,lGlobal,lSCusto,lBonif,lABC,jFrete,lRetira,lAgendamento,lImpTxAgenNF,lCPalet,lCanh,lComis,stmp,lCrtlRot,lCrtlItem,lImpDtSai,lGerNFe,mObsNFM,lCtrlBloqFin,lBloqAuto,pMoe,fMoe,sMoe,lCCusto,jBC_Pis,jBC_Cofins,jBC_Icms,jBC_IPI,jBC_ICMSST,jBC_II,jBC_ISS,jVl_ICMSST,jVl_ICMS,lContPrazo,iAnteciMax,iAtrasoMax,pCC,fCC,pAgencia,fAgencia,sCC,sDac,sAgeNr,sAge,pBanco,fBanco,sCodBanco,sDesBanco,pContr,fContr,sCodContr,mDesContr,lSped,jClaSped,sIde_Serie,jide_Mod,jide_indFinal,jide_indPres,lZFM,lDevoluc,lTransfRem,lRedesp,jDevTit,lTransfDep3o,lZFMAbat,pPFinHold_Linha,pPFinHold,pHold,stmp,fPFinHold_Linha,fPFinHold,fHold,nPDescLog,lBrinde,lAmazon') 
                                         ; sTOper-50           ; identlabel=5        ; editable=false ; fieldborder=0
   ;
   Data Planejada Entrega                ; dEntPla-20             ; identlabel=5      ; visible=(jDtPlaEnt==1) ; editable=(lBloq==0)
   ;
   Carga dos Itens                       ; aCargaI[jCargaI]       ; identlabel=5      ; exec=(this.flSetVar('iPed','')&&this.flSetVar('tIncPed','')) ; editable=(lBloq==0)
   ltimo Pedido                         ; iPed-10                ; identlabel=5      ; esc=('dd_files/erp_ORDENS_CanalWeb.dda','Esc_Padrao_1','iPed,pLogin,pEmi,pDest,pTOper','iPed,tIncPed') ;  visible=(jCargaI==1)
   Incluso                              ; tIncPed-20             ; identlabel=5      ; editable=false ;  visible=((jCargaI==1)&&(iPed>0))
   ;  
   No. Pedido Cliente                    ; sDoc-30                ; identlabel=5      ; editable=(lBloq==0)
   ;
   Observaes Gerais Representante      ; mObsTNet-50-5-2500         ; identlabel=5      ; editable=(lBloq==0)
   Observacoes Gerais Comerciais         ; mObs-50-5-2500       ; identlabel=5    ; help= ; editable=false
   ;
</ScriptForm1>
<ScriptForm1_1>
   ;
   Emissor                               ; sEmi1-60               ; identlabel=5      ; esc=('dd_files/UNeg.dda','Esc_Padrao_3','sEmi1' ,'pEmi,fEmi,sEmi1,sEmiCNPJ,sEmiCPF,sEmiPosCEP,sEmiPosLog,sEmiPosComp,sEmiPosBai,sEmiPosCid,sEmiPosSigla,sEmiPosNr,sEmiPosPais,sEmiCEPEnt,sEmiLogEnt,sEmiNrEnt,sEmiCompEnt,sEmiBaiEnt,sEmiCidEnt,sEmiSiglaEnt,sEmiPaisEnt,sEmiCEPCob,sEmiLogCob,sEmiNrCob,sEmiCompCob,sEmiBaiCob,sEmiCidCob,sEmiSiglaCob,sEmiPaisCob,pEmiEndPos,pEmiEndEnt,pEmiEndCob,fEmiEndPos,fEmiEndEnt,fEmiEndCob,pEmiCEPPos,pEmiCEPEnt,pEmiCEPCob,fEmiCEPPos,fEmiCEPEnt,fEmiCEPCob,pEmiCidPos,pEmiCidEnt,pEmiCidCob,fEmiCidPos,fEmiCidEnt,fEmiCidCob,pEmiUFPos,pEmiUFEnt,pEmiUFCob,fEmiUFPos,fEmiUFEnt,fEmiUFCob,pEmiPaisPos,pEmiPaisEnt,pEmiPaisCob,fEmiPaisPos,fEmiPaisEnt,fEmiPaisCob')                 ; valid=(((pEmi>0) ||(jEntSai!=1)) ,'O Emissor deve ser informado.')     ;  exec=(this.flSetVar('pDest',0) && this.flSetVar('fDest',0) && this.flSetVar('sDest0','') && this.flSetVar('sCodDest','') && this.flSetVar('sDest1a','') &&  this.flSetVar('sDest1','') && this.flSetVar('sFantaDest','') && this.flSetVar('sDestCNPJ','') && this.flSetVar('sDestCPF','') && this.flSetVar('sPassaporte','') && this.flSetVar('sEmailDest','') && this.flSetVar('sDestPosCEP','') && this.flSetVar('sDestPosLog','') && this.flSetVar('sDestPosCom','') && this.flSetVar('sDestPosBai','') && this.flSetVar('sDestPosCid','') && this.flSetVar('sDestPosSigla','') && this.flSetVar('sDestPosNr','') && this.flSetVar('sDestPosPais','') && this.flSetVar('sDestCEPEnt','') && this.flSetVar('sDestLogEnt','') && this.flSetVar('sDestCompEnt','') && this.flSetVar('sDestBaiEnt','') && this.flSetVar('sDestCidEnt','') && this.flSetVar('sDestSiglaEnt','') && this.flSetVar('sDestNrEnt','') && this.flSetVar('sDestPaisEnt','') && this.flSetVar('sDestCEPCob','') && this.flSetVar('sDestLogCob','') && this.flSetVar('sDestCompCob','') && this.flSetVar('sDestBaiCob','') && this.flSetVar('sDestCidCob','') && this.flSetVar('sDestSiglaCob','') && this.flSetVar('sDestNrCob','') && this.flSetVar('sDestPaisCob','') && this.flSetVar('pDestEndPos',0) && this.flSetVar('pDestEndEnt',0) && this.flSetVar('pDestEndCob',0) && this.flSetVar('fDestEndPos',0) && this.flSetVar('fDestEndEnt',0) && this.flSetVar('fDestEndCob',0) && this.flSetVar('pDestCEPPos',0) && this.flSetVar('pDestCEPEnt',0) && this.flSetVar('pDestCEPCob',0) && this.flSetVar('fDestCEPPos',0) && this.flSetVar('fDestCEPEnt',0) && this.flSetVar('fDestCEPCob',0) && this.flSetVar('pDestCidPos',0) && this.flSetVar('pDestCidEnt',0) && this.flSetVar('pDestCidCob',0) && this.flSetVar('fDestCidPos',0) && this.flSetVar('fDestCidEnt',0) && this.flSetVar('fDestCidCob',0) && this.flSetVar('pDestUFPos',0) && this.flSetVar('pDestUFEnt',0) && this.flSetVar('pDestUFCob',0) && this.flSetVar('fDestUFPos',0) && this.flSetVar('fDestUFEnt',0) && this.flSetVar('fDestUFCob',0) && this.flSetVar('pPaisPos',0) && this.flSetVar('pDestPaisEnt',0) && this.flSetVar('pDestPaisCob',0) && this.flSetVar('fDestPaisPos',0) && this.flSetVar('fDestPaisEnt',0) && this.flSetVar('fDestPaisCob',0) && this.flSetVarSOA('pPED_FPgmto_CPgmto_{1}',0) && this.flSetVarSOA('fPED_FPgmto_CPgmto_{1}',0) && this.flSetVarSOA('pFPgmto_{1}',0) && this.flSetVarSOA('pTipoCob_{1}',0) && this.flSetVarSOA('pCPgmto_{1}',0) && this.flSetVarSOA('sFPgmto_{1}','') && this.flSetVarSOA('sCPgmto_{1}','') && this.flSetVarSOA('sTipoCob_{1}','') && this.flSetVarSOA('sCodTipoCob_{1}','') && this.flSetVarSOA('lDefault_{1}',0) && this.flSetVarSOA('sDFin_{1}','') && this.flSetVar('pTOper',0) && this.flSetVar('fTOper',0) && this.flSetVar('sTOperCod','') && this.flSetVar('sTOper','') &&  this.flSetVar('pNatOper',0) && this.flSetVar('fNatOper',0) && this.flSetVar('sDesNatOper','') && this.flSetVar('pMoe',0) && this.flSetVar('sMoe','')&& this.flSetVar('sMoe0','') && this.flSetVar('nDescFin',0) && this.flSetVar('nPDescLog',0) && this.flSetVar('lFinanc',0) && this.flSetVar('lCttos',0)&& this.flSetVar('jPriori',0) && this.flSetVar('lGlobal',0) && this.flSetVar('lSCusto',0) && this.flSetVar('lCotas',0) &&  this.flSetVar('lBonif',0)  &&  this.flSetVar('lBrinde',0) && this.flSetVar('lComis',0) && this.flSetVar('lABC',0)&& this.flSetVar('jFrete',0) && this.flSetVar('lRetira',0) && this.flSetVar('lAgendamento',0) && this.flSetVar('lImpTxAgenNF',0) && this.flSetVar('lCPalet',0) && this.flSetVar('lCanh',0)&& this.flSetVar('fMoe',0)&& this.flSetVar('sTransp','') && this.flSetVar('pTransp',0) && this.flSetVar('fTransp',0) && this.flSetVar('pVeic',0)&& this.flSetVar('fVeic',0) && this.flSetVar('pTipoVeic',0)&& this.flSetVar('fTipoVeic',0) && this.flSetVar('jTipoVeic',0) && this.flSetVar('sVeic','') && this.flSetVar('sMarca','') && this.flSetVar('sPlaca','')&& this.flSetVar('iAno',0)&& this.flSetVar('sCor','')&& this.flSetVar('sChassi','')&& this.flSetVar('sRNTC','')&& this.flSetVar('nTotMax',0)&& this.flSetVar('jComb',0)&& this.flSetVar('iPesoMax',0)&& this.flSetVar('iVolMax',0)&& this.flSetVar('sRenav',0)&& this.flSetVar('sDesTipoVeic','') && this.flSetVar('iQtEixo',0) && this.flSetVar('sVol_esp','')&& this.flSetVar('sVol_marca','') &&  this.flSetVar('pDest',0) && this.flSetVar('fDest',0) && this.flSetVar('sDest0','') && this.flSetVar('sDestCNPJ','') && this.flSetVar('sDestCPF','') && this.flSetVar('pRepCom',0) && this.flSetVar('fRepCom',0) && this.flSetVar('sRepComEnt','')  && this.flSetVar('sRepComSai','') && this.flSetVar('pPRepUNeg',0)&& this.flSetVar('fPRepUNeg',0)&& this.flSetVar('pGestor',0)&& this.flSetVar('fGestor',0)&& this.flSetVar('sGestor',''))
   CNPJ                                  ; sEmiCNPJ-15            ; identlabel=5      ; visible=(sEmiCNPJ!='')     ; editable=false ;
   CFP                                   ; sEmiCPF-15             ; identlabel=5      ; visible=(sEmiCPF!='')      ; editable=false ;
   ;
   Cdigo do Cliente                     ; sCodDest-10             ; identlabel=5     ; visible=(jEntSai==1)       ; esc=('dd_files/erp_Cliente.dda','Esc_Padrao_2d','sCodDest,pEmi,jEntSai','pDest,fDest,sDest1,sDestCPF,sDestCNPJ,sPassaporte,sDestPosCEP,sDestPosLog,sDestPosComp,sDestPosBai,sDestPosCid,sDestPosSigla,sDestPosNr,sDestPosPais,sDestCEPEnt,sDestLogEnt,sDestCompEnt,sDestBaiEnt,sDestCidEnt,sDestSiglaEnt,sDestNrEnt,sDestPaisEnt,sDestCEPCob,sDestLogCob,sDestCompCob,sDestBaiCob,sDestCidCob,sDestSiglaCob,sDestNrCob,sDestPaisCob,pDestEndPos,pDestEndEnt,pDestEndCob,fDestEndPos,fDestEndEnt,fDestEndCob,pDestCEPPos,pDestCEPEnt,pDestCEPCob,fDestCEPPos,fDestCEPEnt,fDestCEPCob,pDestCidPos,pDestCidEnt,pDestCidCob,fDestCidPos,fDestCidEnt,fDestCidCob,pDestUFPos,pDestUFEnt,pDestUFCob,fDestUFPos,fDestUFEnt,fDestUFCob,pDestPaisPos,pDestPaisEnt,pDestPaisCob,fDestPaisPos,fDestPaisEnt,fDestPaisCob,pRotItinEnt,fRotItinEnt,sFantaDest,sDest1a,sCodDest,sEmailDest,pRepCom,fRepCom,sRepComSai,pGestor,fGestor,sGestor,pPRepUNeg,fPRepUNeg,lComisRep,jTpTab,nPGestor,lACC,lBloq,lCliInativo,pPED_FPgmto_CPgmto_{1},fPED_FPgmto_CPgmto_{1},pFPgmto_{1},pTipoCob_{1},pCPgmto_{1},sFPgmto_{1},sTipoCob_{1},sCodTipoCob_{1},sCPgmto_{1},lDefault_{1},sDFin_{1},pTipoCobHld_{1}') ; valid=(((sCodDest>0)||(jEntSai!=1)) ,'O Destinatrio deve ser informado.') ; exec=(this.flSetVar('pTOper',0) && this.flSetVar('fTOper',0) && this.flSetVar('sTOperCod','') && this.flSetVar('sTOper','') &&  this.flSetVar('pNatOper',0) && this.flSetVar('fNatOper',0) && this.flSetVar('sDesNatOper','')&& this.flSetVar('pMoe',0) && this.flSetVar('sMoe','')&& this.flSetVar('sMoe0','') && this.flSetVar('nDescFin',0) && this.flSetVar('nPDescLog',0) && this.flSetVar('lFinanc',0) && this.flSetVar('lCttos',0)&& this.flSetVar('jPriori',0) && this.flSetVar('lGlobal',0) && this.flSetVar('lSCusto',0) && this.flSetVar('lCotas',0) &&  this.flSetVar('lBonif',0)  &&  this.flSetVar('lBrinde',0) && this.flSetVar('lComis',0) && this.flSetVar('lABC',0) && this.flSetVar('jFrete',0) && this.flSetVar('lRetira',0) && this.flSetVar('lAgendamento',0) && this.flSetVar('lImpTxAgenNF',0) && this.flSetVar('lCPalet',0) && this.flSetVar('lCanh',0) && this.flSetVar('fMoe',0) && this.flSetVar('sTransp','') && this.flSetVar('pTransp',0) && this.flSetVar('fTransp',0)&& this.flSetVar('pVeic',0)&& this.flSetVar('fVeic',0) && this.flSetVar('pTipoVeic',0)&& this.flSetVar('fTipoVeic',0) && this.flSetVar('jTipoVeic',0) && this.flSetVar('sVeic','') && this.flSetVar('sMarca','') && this.flSetVar('sPlaca','')&& this.flSetVar('iAno',0)&& this.flSetVar('sCor','')&& this.flSetVar('sChassi','')&& this.flSetVar('sRNTC','')&& this.flSetVar('nTotMax',0)&& this.flSetVar('jComb',0)&& this.flSetVar('iPesoMax',0)&& this.flSetVar('iVolMax',0)&& this.flSetVar('sRenav',0)&& this.flSetVar('sDesTipoVeic','') && this.flSetVar('iQtEixo',0) && this.flSetVar('sVol_esp','')&& this.flSetVar('sVol_marca','')) ; esc_varnoempty ; 
   Destinatrio                          ; sDest1-60               ; identlabel=5     ; visible=(sCodDest=='')     ; esc=('dd_files/erp_Cliente.dda','Esc_Padrao_2','sDest1,pEmi,jEntSai','pDest,fDest,sDest1,sDestCPF,sDestCNPJ,sPassaporte,sDestPosCEP,sDestPosLog,sDestPosComp,sDestPosBai,sDestPosCid,sDestPosSigla,sDestPosNr,sDestPosPais,sDestCEPEnt,sDestLogEnt,sDestCompEnt,sDestBaiEnt,sDestCidEnt,sDestSiglaEnt,sDestNrEnt,sDestPaisEnt,sDestCEPCob,sDestLogCob,sDestCompCob,sDestBaiCob,sDestCidCob,sDestSiglaCob,sDestNrCob,sDestPaisCob,pDestEndPos,pDestEndEnt,pDestEndCob,fDestEndPos,fDestEndEnt,fDestEndCob,pDestCEPPos,pDestCEPEnt,pDestCEPCob,fDestCEPPos,fDestCEPEnt,fDestCEPCob,pDestCidPos,pDestCidEnt,pDestCidCob,fDestCidPos,fDestCidEnt,fDestCidCob,pDestUFPos,pDestUFEnt,pDestUFCob,fDestUFPos,fDestUFEnt,fDestUFCob,pDestPaisPos,pDestPaisEnt,pDestPaisCob,fDestPaisPos,fDestPaisEnt,fDestPaisCob,pRotItinEnt,fRotItinEnt,sFantaDest,sDest1a,sCodDest,sEmailDest,pRepCom,fRepCom,sRepComSai,pGestor,fGestor,sGestor,pPRepUNeg,fPRepUNeg,lComisRep,jTpTab,nPGestor,lACC,lBloq,lCliInativo,pPED_FPgmto_CPgmto_{1},fPED_FPgmto_CPgmto_{1},pFPgmto_{1},pTipoCob_{1},pCPgmto_{1},sFPgmto_{1},sTipoCob_{1},sCodTipoCob_{1},sCPgmto_{1},lDefault_{1},sDFin_{1},pTipoCobHld_{1}') ; valid=(((pDest>0)||(jEntSai!=1)) ,'O Destinatrio deve ser informado.') ; exec=(this.flSetVar('pTOper',0) && this.flSetVar('fTOper',0) && this.flSetVar('sTOperCod','') && this.flSetVar('sTOper','') &&  this.flSetVar('pNatOper',0) && this.flSetVar('fNatOper',0) && this.flSetVar('sDesNatOper','')&& this.flSetVar('pMoe',0) && this.flSetVar('sMoe','')&& this.flSetVar('sMoe0','') && this.flSetVar('nDescFin',0) && this.flSetVar('nPDescLog',0) && this.flSetVar('lFinanc',0) && this.flSetVar('lCttos',0)&& this.flSetVar('jPriori',0) && this.flSetVar('lGlobal',0) && this.flSetVar('lSCusto',0) && this.flSetVar('lCotas',0) &&  this.flSetVar('lBonif',0)  &&  this.flSetVar('lBrinde',0) && this.flSetVar('lComis',0) && this.flSetVar('lABC',0) && this.flSetVar('jFrete',0) && this.flSetVar('lRetira',0) && this.flSetVar('lAgendamento',0) && this.flSetVar('lImpTxAgenNF',0) && this.flSetVar('lCPalet',0) && this.flSetVar('lCanh',0) && this.flSetVar('fMoe',0) && this.flSetVar('sTransp','') && this.flSetVar('pTransp',0) && this.flSetVar('fTransp',0)&& this.flSetVar('pVeic',0)&& this.flSetVar('fVeic',0) && this.flSetVar('pTipoVeic',0)&& this.flSetVar('fTipoVeic',0) && this.flSetVar('jTipoVeic',0) && this.flSetVar('sVeic','') && this.flSetVar('sMarca','') && this.flSetVar('sPlaca','')&& this.flSetVar('iAno',0)&& this.flSetVar('sCor','')&& this.flSetVar('sChassi','')&& this.flSetVar('sRNTC','')&& this.flSetVar('nTotMax',0)&& this.flSetVar('jComb',0)&& this.flSetVar('iPesoMax',0)&& this.flSetVar('iVolMax',0)&& this.flSetVar('sRenav',0)&& this.flSetVar('sDesTipoVeic','') && this.flSetVar('iQtEixo',0) && this.flSetVar('sVol_esp','')&& this.flSetVar('sVol_marca','')) ;
   Destinatrio                          ; sDest1a-60              ; identlabel=5     ; visible=(jEntSai==1)       ; visible=(sCodDest!='') ; editable=false
   Nome Fantasia                         ; sFantaDest-60           ; identlabel=5     ; visible=(sFantaDest!='')   ; editable=false ;
   CNPJ                                  ; sDestCNPJ-15            ; identlabel=5     ; visible=(sDestCNPJ!='')    ; editable=false ;
   CPF                                   ; sDestCPF-15             ; identlabel=5     ; visible=(sDestCPF!='')     ; editable=false ;
   ID Estrangeiro (Passaporte)           ; sPassaporte-20          ; identlabel=5     ; visible=(sPassaporte!='')  ; editable=false ;
   E-mail                                ; sEmailDest-20           ; identlabel=5     ; visible=(sEmailDest!='')  ; editable=false ;
   <b>(Cliente Bloqueado, contatar departamento Financeiro.)</b>           ;                     ; fontcolor='red' ; fontlen=-1 ; colspan=true ; identlabel=5 ; visible=(lBloq==1) ;
   <b>(Cliente Inativo, se continuar a incluso do pedido, o cliente ser enviado automaticamento para analise cadastral.)</b>           ;                     ; fontcolor='red' ; fontlen=-1 ; colspan=true ; identlabel=5 ; visible=(lCliInativo==1) ;
   ;; visible=(pCliRejeito>0)
   Data da Reteno                   ; tCliRejeito-10              ; identlabel=5      ;  editable=false ; visible=(tCliRejeito!='')
   Retido por                         ; sCliRejeito-50              ; identlabel=5      ;  editable=false ; visible=(pCliRejeito>0)
   Motivo da Reteno                 ; mMotCliRejeito-60-10-2000  ; identlabel=5      ; editable=false ; visible=(mMotCliRejeito!='')
   ;
Endereos Destinatrio                ; lEndDest-5          ; identlabel=5 ; edtzoom=true ; visible=(pDest>0)         
   ;; visible=((lEndDest==1)&&(pDest>0))
   Endereo Postal                    ;                     ; fontweight='bold'   ; visible=((lEndDest==1)&&(pDest>0)); identlabel=10
      CEP                                ; sDestPosCEP-8       ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0 
      Logradouro                         ; sDestPosLog-50      ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      Nmero                             ; sDestPosNr-5        ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      Complemento                        ; sDestPosComp-15     ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      Bairro                             ; sDestPosBai-30      ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      Cidade                             ; sDestPosCid-30      ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      UF                                 ; sDestPosSigla-2     ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      Pas                               ; sDestPosPais-20     ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      ;; visible=((lEndDest==1)&&(pDest>0))
   Endereo Entrega                   ;                     ; fontweight='bold'   ; visible=((lEndDest==1)&&(pDest>0)); identlabel=10 ; fieldborder=0
      CEP                                ; sDestCEPEnt-8       ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0 
      Logradouro                         ; sDestLogEnt-50      ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      Nmero                             ; sDestNrEnt-5        ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0 
      Complemento                        ; sDestCompEnt-15     ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      Bairro                             ; sDestBaiEnt-30      ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      Cidade                             ; sDestCidEnt-30      ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      UF                                 ; sDestSiglaEnt-2     ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      Pas                               ; sDestPaisEnt-20     ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      ;; visible=((lEndDest==1)&&(pDest>0))
   Endereo cobrana                  ;                     ; fontweight='bold'   ; visible=((lEndDest==1)&&(pDest>0)); identlabel=10 ; fieldborder=0
      CEP                                ; sDestCEPCob-8       ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0 
      Logradouro                         ; sDestLogCob-50      ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      Nmero                             ; sDestNrCob-5        ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0 
      Complemento                        ; sDestCompCob-15     ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      Bairro                             ; sDestBaiCob-30      ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      Cidade                             ; sDestCidCob-30      ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      UF                                 ; sDestSiglaCob-2     ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      Pas                               ; sDestPaisCob-20     ; identlabel=15    ; visible=((lEndDest==1)&&(pDest>0)); editable=false ; fieldborder=0
      ;; visible=((lEndDest==1)&&(pDest>0))
   ;
   Representante da Operao             ; sRepComSai-50           ; identlabel=5    ; visible=((sDDFTagApl!='Padrao_2')&&(jEntSai==1)) ; esc=('dd_files/erp_Repres.dda','Esc_Padrao_2','sRepCom,pEmi,pDest,jEntSai','pPRepUNeg,fPRepUNeg,pRepCom,fRepCom,sRepComSai,lComisRep,lACC,pTabPreco,fTabPreco,sTab,sCodTab,pGestor,fGestor,sGestor,nPGestor,jTpTab') ;
   Gestor                                ; sGestor-50              ; identlabel=5    ; visible=((sDDFTagApl!='Padrao_2')&&(jEntSai==1)&&(pRepCom>0)) ; esc=('dd_files/erp_Repres.dda','Esc_Padrao_1','sGestor','pGestor,sGestor,fGestor')  ; esc_varnoempty
   ;
   Tipo de Operao                      ; sTOperCod-30        ; identlabel=5         ; editable=(lBloq==0) ; esc=('dd_files/erp_TOper.dda','Esc_Padrao_3A','sTOperCod,pEmi,pDest,jEntSai','pPTOpED,fPTOpED,pTOper,fTOper,sTOperCod,sTOper,pNatOper,fNatOper,sDesNatOper,nDescFin,lFinanc,lLCredDest,lLCredGrpCli,jPriori,lGlobal,lSCusto,lBonif,lABC,jFrete,lRetira,lAgendamento,lImpTxAgenNF,lCPalet,lCanh,lComis,stmp,lCrtlRot,lCrtlItem,lImpDtSai,lGerNFe,mObsNFM,lCtrlBloqFin,lBloqAuto,pMoe,fMoe,sMoe,lCCusto,jBC_Pis,jBC_Cofins,jBC_Icms,jBC_IPI,jBC_ICMSST,jBC_II,jBC_ISS,jVl_ICMSST,jVl_ICMS,lContPrazo,iAnteciMax,iAtrasoMax,pCC,fCC,pAgencia,fAgencia,sCC,sDac,sAgeNr,sAge,pBanco,fBanco,sCodBanco,sDesBanco,pContr,fContr,sCodContr,mDesContr,lSped,jClaSped,sIde_Serie,jide_Mod,jide_indFinal,jide_indPres,lZFM,lDevoluc,lTransfRem,lRedesp,jDevTit,lTransfDep3o,lZFMAbat,pPFinHold_Linha,pPFinHold,pHold,stmp,fPFinHold_Linha,fPFinHold,fHold,nPDescLog,lBrinde,lAmazon') 
   ;
   Data Planejada Entrega                ; dEntPla-20             ; identlabel=5      ; visible=(jDtPlaEnt==1) ; editable=(lBloq==0)
   ;
   Carga dos Itens                       ; aCargaI[jCargaI]       ; identlabel=5      ; exec=(this.flSetVar('iPed','')&&this.flSetVar('tIncPed','')) ; editable=(lBloq==0)
   ltimo Pedido                         ; iPed-5                 ; identlabel=5      ; esc=('dd_files/erp_ORDENS_CanalWeb.dda','Esc_Padrao_1','iPed,pLogin,pEmi,pDest,pTOper','iPed,tIncPed') ;  visible=(jCargaI==1)
   Incluso                              ; tIncPed-20             ; identlabel=5      ; editable=false ;  visible=((jCargaI==1)&&(iPed>0))
   ;  
   No. Pedido Cliente                    ; sDoc-30                ; identlabel=5      ; editable=(lBloq==0)
   ;
   SubGrid-1 {
      Condio de Pagamento             ; sCPgmto_i-30     ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)) ; identlabel=5 ; editable=false ; fieldborder=0
      ;;visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1))
   }
   Observaes Gerais                    ; mObsTNet-50-5-2500         ; identlabel=5      ; editable=(lBloq==0)
   ;
</ScriptForm1_1>
<ScriptFormEmail>
   E-mail para o envio do Pedido ;               ; identlabel=3  ; fontweight='bold' ; fontcolor='#00AA00' ; edtzoom=true
   ;
   E-mail para o envio           ; sEmailDest-50 ; identlabel=10 ;
</ScriptFormEmail>
<VarsToServerEmail>
   sEmail_Temp = sEmailDest
   iTemp       = iTemp+1
</VarsToServerEmail>
<VarsToDbEmail>
   sDDFTabela = Ordens
   sEmail_Temp
   iTemp
</VarsToDbEmail>
<ServerValidsEmail>
   sEmail_Temp ; $_POST[.] !='' ;  necessrio informar um e-mail.
</ServerValidsEmail>
<ScriptFormCPgmto>
  ;
Formas e Condies de Pagamento ;; fontweight='bold'; identlabel=5 ;   visible=((lFinanc==1)&&(sDDFTagApl!='Padrao_2'))
   SubGrid-1 {
      (i))                              ;                  ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 
      Forma de Pagamento                ; sFPgmto_i-30     ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; esc=('dd_files/erp_POLITICAS_ED_FPgmto.dda','Esc_Padrao_2','sFPgmto_i,pEmi,pDest,jEntSai,pTOper','pPED_FPgmto_CPgmto_i,fPED_FPgmto_CPgmto_i,sFPgmto_i,sCPgmto_i,sTipoCob_i,sCodTipoCob_i,lDefault_i,nDFin_i,pTipoCobHld_i,lBoleto_i,nVlPedCPgmto_i')
      Condio de Pagamento             ; sCPgmto_i-30     ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; editable=false ; fieldborder=0
      Desconto da Condio de Pagamento ; nDFin_i-10       ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; editable=false ; fieldborder=0
      Tipo de Cobrana                  ; sTipoCob_i-30    ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; editable=false ; fieldborder=0
                                        ; sCodTipoCob_i-30 ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; editable=false ; fieldborder=0
      Default                           ; lDefault_i       ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; editable=false ; fieldborder=0
      ; ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10
      Deseja aplicar essa Condio de Pagamento ?  ; lAplicarCPgmto_i ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10
      ; ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10
   }
</ScriptFormCPgmto>
<VarsToServer1>
   lBloq
   jTipo  = jEntSai
   jCargaI
   pPed  = iPed
   iVol_qVol
   sVol_esp
   sVol_marca
   sVol_nVOL
   nVol_pesoL
   nVol_pesoB
   lCalculado = 0
   pPRepUNeg 
   fPRepUNeg 
   lCliInativo
   sIde_Serie
   lSped
   jClaSped
   lZFM
   lZFMAbat
   lAmazon
   lDevoluc
   lTransfRem
   lRedesp
   jide_indFinal
   jide_indPres
   jide_Mod
   pPFinHold_Linha
   pPFinHold
   pHold
   fPFinHold_Linha
   fPFinHold
   fHold
   nPDescLog
   jide_idDest
   nTot_vICMSDeson
   tISSQN_dCompet
   nISSQNtot_vDeducao
   nISSQNtot_vOutro
   nISSQNtot_vDescIncond
   nISSQNtot_vDescCond
   nISSQNtot_vISSRet
   jISSQN_cRegTrib
   nTot_vTotTrib
   nVFCPUFDest
   nVICMSUFDest
   nVICMSUFRemet
   pEmi     
   fEmi
   pDest    
   fDest    
   pMoe = 1
   fMoe
   pTOper   
   fTOper   
   jDtPlaEnt
   pGestor
   fGestor
   nPGestor
   pCC
   fCC
   pContr
   fContr
   pRotItinEnt = pRotItinEnt > 0  ? pRotItinEnt : 0
   fRotItinEnt = fRotItinEnt > 0  ? fRotItinEnt : 0
   jEmitido
   pRepCom  = pLogin
   fRepCom 
   pTabPreco 
   fTabPreco 
   pNatOper
   fNatOper
   jBC_Pis
   jBC_Cofins
   jBC_Icms
   jBC_IPI
   jBC_ICMSST
   jBC_II
   jBC_ISS
   jVl_ICMSST
   jVl_ICMS
   jPriori  
   lCotas   = lCotas  =='' ? 0 : lCotas
   lGlobal  = lGlobal =='' ? 0 : lGlobal   
   lSCusto  = lSCusto =='' ? 0 : lSCusto   
   lBonif   = lBonif  =='' ? 0 : lBonif  
   lBrinde  = lBrinde =='' ? 0 : lBrinde
   lComis   = lComis  =='' ? 0 : lComis  
   lABC     = lABC    =='' ? 0 : lABC    
   lCCusto  = lCCusto =='' ? 0 : lCCusto
   pTransp
   fTransp
   lPedAnjo = 1
   pVeic
   fVeic
   pTipoVeic
   fTipoVeic
   lContPrazo = lContPrazo=='' ? 0 : lContPrazo
   iAnteciMax
   iAtrasoMax
   jTpTab
   lLCredDest   = lLCredDest  =='' ? 0 : lLCredDest
   lLCredGrpCli = lLCredGrpCli=='' ? 0 : lLCredGrpCli
   lCrtlRot     = lCrtlRot    =='' ? 0 : lCrtlRot
   lCrtlItem    = lCrtlItem   =='' ? 0 : lCrtlItem
   lImpDtSai    = lImpDtSai   =='' ? 0 : lImpDtSai
   lComisRep    = lComisRep   =='' ? 0 : lComisRep
   lACC         = lACC        =='' ? 0 : lACC
   nDescFin      
   lCtrlBloqFin = lCtrlBloqFin=='' ? 0 : lCtrlBloqFin  
   lBloqAuto    = lBloqAuto   =='' ? 0 : lBloqAuto     
   lFinanc      = lFinanc     =='' ? 0 : lFinanc 
   lCttos       = lCttos      =='' ? 0 : lCttos 
   jFrete        
   lRetira      = lRetira     =='' ? 0 : lRetira       
   lAgendamento = lAgendamento=='' ? 0 : lAgendamento
   lImpTxAgenNF = lImpTxAgenNF=='' ? 0 : lImpTxAgenNF
   lCPalet      = lCPalet     =='' ? 0 : lCPalet   
   lCanh        = lCanh       =='' ? 0 : lCanh
   pEmiEndPos
   pEmiEndEnt
   pEmiEndCob
   pEmiCEPPos 
   pEmiCEPEnt 
   pEmiCEPCob 
   pEmiCidPos 
   pEmiCidEnt 
   pEmiCidCob 
   pEmiUFPos  
   pEmiUFEnt  
   pEmiUFCob  
   pEmiPaisPos
   pEmiPaisEnt
   pEmiPaisCob
   fEmiEndPos 
   fEmiEndEnt 
   fEmiEndCob 
   fEmiCEPPos 
   fEmiCEPEnt 
   fEmiCEPCob 
   fEmiCidPos 
   fEmiCidEnt 
   fEmiCidCob 
   fEmiUFPos  
   fEmiUFEnt  
   fEmiUFCob  
   fEmiPaisPos
   fEmiPaisEnt
   fEmiPaisCob
   pDestEndPos
   pDestEndEnt
   pDestEndCob
   pDestCEPPos
   pDestCEPEnt
   pDestCEPCob
   pDestCidPos
   pDestCidEnt
   pDestCidCob
   pDestUFPos 
   pDestUFEnt 
   pDestUFCob 
   pDestPaisPos
   pDestPaisEnt
   pDestPaisCob
   fDestEndPos
   fDestEndEnt
   fDestEndCob
   fDestCEPPos
   fDestCEPEnt
   fDestCEPCob
   fDestCidPos
   fDestCidEnt
   fDestCidCob
   fDestUFPos 
   fDestUFEnt 
   fDestUFCob 
   fDestPaisPos
   fDestPaisEnt
   fDestPaisCob
   nTot_vBC          
   nTot_vICMS        
   nTot_vBCST        
   nTot_vST          
   nTot_vProd        
   nTot_vFrete       
   nTot_vSeg         
   nTot_vDesc        
   nTot_vII          
   nTot_vIPI         
   nTot_vPIS         
   nTot_vCOFINS      
   nTot_vOutro       
   nTot_vNF          
   nISSQNtot_vServ
   nISSQNtot_vBC
   nISSQNtot_vISS
   nISSQNtot_vPIS
   nISSQNtot_vCOFINS
   nTot_vTrib
   sObsTNet = mObsTNet
   sObsRep = mObsRep
   sObsFin = mObsFin
   sObsNF = mObsNF   
   sObsNFM = mObsNFM   
   sTxtSN = mTxtSN
   sDoc
   jOrigem  
   tEmissao = tEmissao=='' ? 'now' : tEmissao
   tSaida   = dSaida
   tEntPla  = dEntPla
   tEntPlaCalc = dEntPlaCalc
   pPTOpED
   fPTOpED
   pDoc
   fDoc   
   sEmailDest
   iVer
   pOrdens_FPgmto_{i}
   pPED_FPgmto_CPgmto_{i}
   fPED_FPgmto_CPgmto_{i}
   nPorc_{i}
   d1aPrest_{i}
   nVlPedCPgmto_{i}
   lAplicarCPgmto_{i}
</VarsToServer1>
<VarsToServer1_1>
   lBloq
   jTipo  = jEntSai
   jCargaI
   pPed  = iPed
   iVol_qVol
   sVol_esp
   sVol_marca
   sVol_nVOL
   nVol_pesoL
   nVol_pesoB
   lCalculado = 0
   pPRepUNeg 
   fPRepUNeg 
   lCliInativo
   sIde_Serie
   lSped
   jClaSped
   lZFM
   lZFMAbat
   lAmazon
   lDevoluc
   lTransfRem
   lRedesp
   jide_indFinal
   jide_indPres
   jide_Mod
   pPFinHold_Linha
   pPFinHold
   pHold
   fPFinHold_Linha
   fPFinHold
   fHold
   nPDescLog
   lPedAnjo = 1
   jide_idDest
   nTot_vICMSDeson
   tISSQN_dCompet
   nISSQNtot_vDeducao
   nISSQNtot_vOutro
   nISSQNtot_vDescIncond
   nISSQNtot_vDescCond
   nISSQNtot_vISSRet
   jISSQN_cRegTrib
   nTot_vTotTrib
   nVFCPUFDest
   nVICMSUFDest
   nVICMSUFRemet
   pEmi     
   fEmi
   pDest    
   fDest    
   pMoe = 1
   fMoe
   pTOper   
   fTOper   
   jDtPlaEnt
   pGestor
   fGestor
   nPGestor
   pCC
   fCC
   pContr
   fContr
   pRotItinEnt = pRotItinEnt > 0  ? pRotItinEnt : 0
   fRotItinEnt = fRotItinEnt > 0  ? fRotItinEnt : 0
   jEmitido
   pRepCom  
   fRepCom 
   pTabPreco 
   fTabPreco 
   pNatOper
   fNatOper
   jBC_Pis
   jBC_Cofins
   jBC_Icms
   jBC_IPI
   jBC_ICMSST
   jBC_II
   jBC_ISS
   jVl_ICMSST
   jVl_ICMS
   jPriori  
   lCotas   = lCotas  =='' ? 0 : lCotas
   lGlobal  = lGlobal =='' ? 0 : lGlobal   
   lSCusto  = lSCusto =='' ? 0 : lSCusto   
   lBonif   = lBonif  =='' ? 0 : lBonif  
   lBrinde  = lBrinde =='' ? 0 : lBrinde
   lComis   = lComis  =='' ? 0 : lComis  
   lABC     = lABC    =='' ? 0 : lABC    
   lCCusto  = lCCusto =='' ? 0 : lCCusto
   pTransp
   fTransp
   pVeic
   fVeic
   pTipoVeic
   fTipoVeic
   lContPrazo = lContPrazo=='' ? 0 : lContPrazo
   iAnteciMax
   iAtrasoMax
   jTpTab
   lLCredDest   = lLCredDest  =='' ? 0 : lLCredDest
   lLCredGrpCli = lLCredGrpCli=='' ? 0 : lLCredGrpCli
   lCrtlRot     = lCrtlRot    =='' ? 0 : lCrtlRot
   lCrtlItem    = lCrtlItem   =='' ? 0 : lCrtlItem
   lImpDtSai    = lImpDtSai   =='' ? 0 : lImpDtSai
   lComisRep    = lComisRep   =='' ? 0 : lComisRep
   lACC         = lACC        =='' ? 0 : lACC
   nDescFin      
   lCtrlBloqFin = lCtrlBloqFin=='' ? 0 : lCtrlBloqFin  
   lBloqAuto    = lBloqAuto   =='' ? 0 : lBloqAuto     
   lFinanc      = lFinanc     =='' ? 0 : lFinanc 
   lCttos       = lCttos      =='' ? 0 : lCttos 
   jFrete        
   lRetira      = lRetira     =='' ? 0 : lRetira       
   lAgendamento = lAgendamento=='' ? 0 : lAgendamento
   lImpTxAgenNF = lImpTxAgenNF=='' ? 0 : lImpTxAgenNF
   lCPalet      = lCPalet     =='' ? 0 : lCPalet   
   lCanh        = lCanh       =='' ? 0 : lCanh
   pEmiEndPos
   pEmiEndEnt
   pEmiEndCob
   pEmiCEPPos 
   pEmiCEPEnt 
   pEmiCEPCob 
   pEmiCidPos 
   pEmiCidEnt 
   pEmiCidCob 
   pEmiUFPos  
   pEmiUFEnt  
   pEmiUFCob  
   pEmiPaisPos
   pEmiPaisEnt
   pEmiPaisCob
   fEmiEndPos 
   fEmiEndEnt 
   fEmiEndCob 
   fEmiCEPPos 
   fEmiCEPEnt 
   fEmiCEPCob 
   fEmiCidPos 
   fEmiCidEnt 
   fEmiCidCob 
   fEmiUFPos  
   fEmiUFEnt  
   fEmiUFCob  
   fEmiPaisPos
   fEmiPaisEnt
   fEmiPaisCob
   pDestEndPos
   pDestEndEnt
   pDestEndCob
   pDestCEPPos
   pDestCEPEnt
   pDestCEPCob
   pDestCidPos
   pDestCidEnt
   pDestCidCob
   pDestUFPos 
   pDestUFEnt 
   pDestUFCob 
   pDestPaisPos
   pDestPaisEnt
   pDestPaisCob
   fDestEndPos
   fDestEndEnt
   fDestEndCob
   fDestCEPPos
   fDestCEPEnt
   fDestCEPCob
   fDestCidPos
   fDestCidEnt
   fDestCidCob
   fDestUFPos 
   fDestUFEnt 
   fDestUFCob 
   fDestPaisPos
   fDestPaisEnt
   fDestPaisCob
   nTot_vBC          
   nTot_vICMS        
   nTot_vBCST        
   nTot_vST          
   nTot_vProd        
   nTot_vFrete       
   nTot_vSeg         
   nTot_vDesc        
   nTot_vII          
   nTot_vIPI         
   nTot_vPIS         
   nTot_vCOFINS      
   nTot_vOutro       
   nTot_vNF          
   nISSQNtot_vServ
   nISSQNtot_vBC
   nISSQNtot_vISS
   nISSQNtot_vPIS
   nISSQNtot_vCOFINS
   nTot_vTrib
   sObsTNet = mObsTNet
   sObsRep = mObsRep
   sObsFin = mObsFin
   sObsNF = mObsNF   
   sObsNFM = mObsNFM   
   sTxtSN = mTxtSN
   sDoc
   jOrigem  
   tEmissao = tEmissao=='' ? 'now' : tEmissao
   tSaida   = dSaida
   tEntPla  = dEntPla
   tEntPlaCalc = dEntPlaCalc
   pPTOpED
   fPTOpED
   pDoc
   fDoc   
   sEmailDest
   iVer
   pOrdens_FPgmto_{i}
   pPED_FPgmto_CPgmto_{i}
   fPED_FPgmto_CPgmto_{i}
   nPorc_{i}
   d1aPrest_{i}
   nVlPedCPgmto_{i}
   lAplicarCPgmto_{i}
</VarsToServer1_1>
<VarsToServer1CPgmto>
   lBloq
   jTipo  = jEntSai
   jCargaI
   pPed  = iPed
   iVol_qVol
   sVol_esp
   sVol_marca
   sVol_nVOL
   nVol_pesoL
   nVol_pesoB
   lCalculado 
   pPRepUNeg 
   fPRepUNeg 
   lCliInativo
   sIde_Serie
   lSped
   jClaSped
   lZFM
   lZFMAbat
   lDevoluc
   lTransfRem
   lRedesp
   jide_indFinal
   jide_indPres
   jide_Mod
   pPFinHold_Linha
   pPFinHold
   pHold
   fPFinHold_Linha
   fPFinHold
   fHold
   nPDescLog
   jide_idDest
   nTot_vICMSDeson
   tISSQN_dCompet
   nISSQNtot_vDeducao
   nISSQNtot_vOutro
   nISSQNtot_vDescIncond
   nISSQNtot_vDescCond
   nISSQNtot_vISSRet
   jISSQN_cRegTrib
   nTot_vTotTrib
   nVFCPUFDest
   nVICMSUFDest
   nVICMSUFRemet
   pEmi     
   fEmi
   pDest    
   fDest    
   pMoe = 1
   fMoe
   pTOper   
   fTOper   
   jDtPlaEnt
   pGestor
   fGestor
   nPGestor
   pCC
   fCC
   pContr
   fContr
   pRotItinEnt = pRotItinEnt > 0  ? pRotItinEnt : 0
   fRotItinEnt = fRotItinEnt > 0  ? fRotItinEnt : 0
   jEmitido
   pRepCom  = pLogin
   fRepCom 
   pTabPreco 
   fTabPreco 
   pNatOper
   fNatOper
   jBC_Pis
   jBC_Cofins
   jBC_Icms
   jBC_IPI
   jBC_ICMSST
   jBC_II
   jBC_ISS
   jVl_ICMSST
   jVl_ICMS
   jPriori  
   lCotas   = lCotas  =='' ? 0 : lCotas
   lGlobal  = lGlobal =='' ? 0 : lGlobal   
   lSCusto  = lSCusto =='' ? 0 : lSCusto   
   lBonif   = lBonif  =='' ? 0 : lBonif  
   lBrinde  = lBrinde =='' ? 0 : lBrinde
   lComis   = lComis  =='' ? 0 : lComis  
   lABC     = lABC    =='' ? 0 : lABC    
   lCCusto  = lCCusto =='' ? 0 : lCCusto
   pTransp
   fTransp
   lPedAnjo
   lAmazon
   pVeic
   fVeic
   pTipoVeic
   fTipoVeic
   lContPrazo = lContPrazo=='' ? 0 : lContPrazo
   iAnteciMax
   iAtrasoMax
   jTpTab
   lLCredDest   = lLCredDest  =='' ? 0 : lLCredDest
   lLCredGrpCli = lLCredGrpCli=='' ? 0 : lLCredGrpCli
   lCrtlRot     = lCrtlRot    =='' ? 0 : lCrtlRot
   lCrtlItem    = lCrtlItem   =='' ? 0 : lCrtlItem
   lImpDtSai    = lImpDtSai   =='' ? 0 : lImpDtSai
   lComisRep    = lComisRep   =='' ? 0 : lComisRep
   lACC         = lACC        =='' ? 0 : lACC
   nDescFin      
   lCtrlBloqFin = lCtrlBloqFin=='' ? 0 : lCtrlBloqFin  
   lBloqAuto    = lBloqAuto   =='' ? 0 : lBloqAuto     
   lFinanc      = lFinanc     =='' ? 0 : lFinanc 
   lCttos       = lCttos      =='' ? 0 : lCttos 
   jFrete        
   lRetira      = lRetira     =='' ? 0 : lRetira       
   lAgendamento = lAgendamento=='' ? 0 : lAgendamento
   lImpTxAgenNF = lImpTxAgenNF=='' ? 0 : lImpTxAgenNF
   lCPalet      = lCPalet     =='' ? 0 : lCPalet   
   lCanh        = lCanh       =='' ? 0 : lCanh
   pEmiEndPos
   pEmiEndEnt
   pEmiEndCob
   pEmiCEPPos 
   pEmiCEPEnt 
   pEmiCEPCob 
   pEmiCidPos 
   pEmiCidEnt 
   pEmiCidCob 
   pEmiUFPos  
   pEmiUFEnt  
   pEmiUFCob  
   pEmiPaisPos
   pEmiPaisEnt
   pEmiPaisCob
   fEmiEndPos 
   fEmiEndEnt 
   fEmiEndCob 
   fEmiCEPPos 
   fEmiCEPEnt 
   fEmiCEPCob 
   fEmiCidPos 
   fEmiCidEnt 
   fEmiCidCob 
   fEmiUFPos  
   fEmiUFEnt  
   fEmiUFCob  
   fEmiPaisPos
   fEmiPaisEnt
   fEmiPaisCob
   pDestEndPos
   pDestEndEnt
   pDestEndCob
   pDestCEPPos
   pDestCEPEnt
   pDestCEPCob
   pDestCidPos
   pDestCidEnt
   pDestCidCob
   pDestUFPos 
   pDestUFEnt 
   pDestUFCob 
   pDestPaisPos
   pDestPaisEnt
   pDestPaisCob
   fDestEndPos
   fDestEndEnt
   fDestEndCob
   fDestCEPPos
   fDestCEPEnt
   fDestCEPCob
   fDestCidPos
   fDestCidEnt
   fDestCidCob
   fDestUFPos 
   fDestUFEnt 
   fDestUFCob 
   fDestPaisPos
   fDestPaisEnt
   fDestPaisCob
   nTot_vBC          
   nTot_vICMS        
   nTot_vBCST        
   nTot_vST          
   nTot_vProd        
   nTot_vFrete       
   nTot_vSeg         
   nTot_vDesc        
   nTot_vII          
   nTot_vIPI         
   nTot_vPIS         
   nTot_vCOFINS      
   nTot_vOutro       
   nTot_vNF          
   nISSQNtot_vServ
   nISSQNtot_vBC
   nISSQNtot_vISS
   nISSQNtot_vPIS
   nISSQNtot_vCOFINS
   nTot_vTrib
   sObsTNet = mObsTNet
   sObsRep = mObsRep
   sObsFin = mObsFin
   sObsNF = mObsNF   
   sObsNFM = mObsNFM   
   sTxtSN = mTxtSN
   sDoc
   jOrigem  
   tEmissao = tEmissao=='' ? 'now' : tEmissao
   tSaida   = dSaida
   tEntPla  = dEntPla
   tEntPlaCalc = dEntPlaCalc
   pPTOpED
   fPTOpED
   pDoc
   fDoc   
   sEmailDest
   iVer
   pOrdens_FPgmto_{i}
   pPED_FPgmto_CPgmto_{i}
   fPED_FPgmto_CPgmto_{i}
   nPorc_{i}
   d1aPrest_{i}
   lAplicarCPgmto_{i}
</VarsToServer1CPgmto>
<VarsToServer1CPgmto1_1>
   lBloq
   jTipo  = jEntSai
   jCargaI
   pPed  = iPed
   iVol_qVol
   sVol_esp
   sVol_marca
   sVol_nVOL
   nVol_pesoL
   nVol_pesoB
   lCalculado 
   pPRepUNeg 
   fPRepUNeg 
   lCliInativo
   sIde_Serie
   lSped
   jClaSped
   lZFM
   lZFMAbat
   lDevoluc
   lTransfRem
   lRedesp
   jide_indFinal
   jide_indPres
   jide_Mod
   pPFinHold_Linha
   pPFinHold
   pHold
   fPFinHold_Linha
   fPFinHold
   fHold
   nPDescLog
   lAmazon
   jide_idDest
   nTot_vICMSDeson
   tISSQN_dCompet
   nISSQNtot_vDeducao
   nISSQNtot_vOutro
   nISSQNtot_vDescIncond
   nISSQNtot_vDescCond
   nISSQNtot_vISSRet
   jISSQN_cRegTrib
   nTot_vTotTrib
   nVFCPUFDest
   nVICMSUFDest
   nVICMSUFRemet
   pEmi     
   fEmi
   pDest    
   fDest    
   pMoe = 1
   fMoe
   pTOper   
   fTOper   
   jDtPlaEnt
   pGestor
   fGestor
   nPGestor
   pCC
   fCC
   pContr
   fContr
   pRotItinEnt = pRotItinEnt > 0  ? pRotItinEnt : 0
   fRotItinEnt = fRotItinEnt > 0  ? fRotItinEnt : 0
   jEmitido
   pRepCom
   fRepCom 
   pTabPreco 
   fTabPreco 
   pNatOper
   fNatOper
   jBC_Pis
   jBC_Cofins
   jBC_Icms
   jBC_IPI
   jBC_ICMSST
   jBC_II
   jBC_ISS
   jVl_ICMSST
   jVl_ICMS
   jPriori  
   lCotas   = lCotas  =='' ? 0 : lCotas
   lGlobal  = lGlobal =='' ? 0 : lGlobal   
   lSCusto  = lSCusto =='' ? 0 : lSCusto   
   lBonif   = lBonif  =='' ? 0 : lBonif  
   lBrinde  = lBrinde =='' ? 0 : lBrinde
   lComis   = lComis  =='' ? 0 : lComis  
   lABC     = lABC    =='' ? 0 : lABC    
   lCCusto  = lCCusto =='' ? 0 : lCCusto
   pTransp
   fTransp
   lPedAnjo
   pVeic
   fVeic
   pTipoVeic
   fTipoVeic
   lContPrazo = lContPrazo=='' ? 0 : lContPrazo
   iAnteciMax
   iAtrasoMax
   jTpTab
   lLCredDest   = lLCredDest  =='' ? 0 : lLCredDest
   lLCredGrpCli = lLCredGrpCli=='' ? 0 : lLCredGrpCli
   lCrtlRot     = lCrtlRot    =='' ? 0 : lCrtlRot
   lCrtlItem    = lCrtlItem   =='' ? 0 : lCrtlItem
   lImpDtSai    = lImpDtSai   =='' ? 0 : lImpDtSai
   lComisRep    = lComisRep   =='' ? 0 : lComisRep
   lACC         = lACC        =='' ? 0 : lACC
   nDescFin      
   lCtrlBloqFin = lCtrlBloqFin=='' ? 0 : lCtrlBloqFin  
   lBloqAuto    = lBloqAuto   =='' ? 0 : lBloqAuto     
   lFinanc      = lFinanc     =='' ? 0 : lFinanc 
   lCttos       = lCttos      =='' ? 0 : lCttos 
   jFrete        
   lRetira      = lRetira     =='' ? 0 : lRetira       
   lAgendamento = lAgendamento=='' ? 0 : lAgendamento
   lImpTxAgenNF = lImpTxAgenNF=='' ? 0 : lImpTxAgenNF
   lCPalet      = lCPalet     =='' ? 0 : lCPalet   
   lCanh        = lCanh       =='' ? 0 : lCanh
   pEmiEndPos
   pEmiEndEnt
   pEmiEndCob
   pEmiCEPPos 
   pEmiCEPEnt 
   pEmiCEPCob 
   pEmiCidPos 
   pEmiCidEnt 
   pEmiCidCob 
   pEmiUFPos  
   pEmiUFEnt  
   pEmiUFCob  
   pEmiPaisPos
   pEmiPaisEnt
   pEmiPaisCob
   fEmiEndPos 
   fEmiEndEnt 
   fEmiEndCob 
   fEmiCEPPos 
   fEmiCEPEnt 
   fEmiCEPCob 
   fEmiCidPos 
   fEmiCidEnt 
   fEmiCidCob 
   fEmiUFPos  
   fEmiUFEnt  
   fEmiUFCob  
   fEmiPaisPos
   fEmiPaisEnt
   fEmiPaisCob
   pDestEndPos
   pDestEndEnt
   pDestEndCob
   pDestCEPPos
   pDestCEPEnt
   pDestCEPCob
   pDestCidPos
   pDestCidEnt
   pDestCidCob
   pDestUFPos 
   pDestUFEnt 
   pDestUFCob 
   pDestPaisPos
   pDestPaisEnt
   pDestPaisCob
   fDestEndPos
   fDestEndEnt
   fDestEndCob
   fDestCEPPos
   fDestCEPEnt
   fDestCEPCob
   fDestCidPos
   fDestCidEnt
   fDestCidCob
   fDestUFPos 
   fDestUFEnt 
   fDestUFCob 
   fDestPaisPos
   fDestPaisEnt
   fDestPaisCob
   nTot_vBC          
   nTot_vICMS        
   nTot_vBCST        
   nTot_vST          
   nTot_vProd        
   nTot_vFrete       
   nTot_vSeg         
   nTot_vDesc        
   nTot_vII          
   nTot_vIPI         
   nTot_vPIS         
   nTot_vCOFINS      
   nTot_vOutro       
   nTot_vNF          
   nISSQNtot_vServ
   nISSQNtot_vBC
   nISSQNtot_vISS
   nISSQNtot_vPIS
   nISSQNtot_vCOFINS
   nTot_vTrib
   sObsTNet = mObsTNet
   sObsRep = mObsRep
   sObsFin = mObsFin
   sObsNF = mObsNF   
   sObsNFM = mObsNFM   
   sTxtSN = mTxtSN
   sDoc
   jOrigem  
   tEmissao = tEmissao=='' ? 'now' : tEmissao
   tSaida   = dSaida
   tEntPla  = dEntPla
   tEntPlaCalc = dEntPlaCalc
   pPTOpED
   fPTOpED
   pDoc
   fDoc   
   sEmailDest
   iVer
   pOrdens_FPgmto_{i}
   pPED_FPgmto_CPgmto_{i}
   fPED_FPgmto_CPgmto_{i}
   nPorc_{i}
   d1aPrest_{i}
   lAplicarCPgmto_{i}
</VarsToServer1CPgmto1_1>
<VarsToDb1>
   sDDFTabela = Ordens
   jCargaI
   pPed
   iVol_qVol
   sVol_esp
   sVol_marca
   sVol_nVOL
   nVol_pesoL
   nVol_pesoB
   lCalculado
   pPRepUNeg 
   fPRepUNeg 
   jide_Mod
   jide_indFinal
   jide_indPres
   lZFM
   lZFMAbat
   lCliInativo
   pPFinHold_Linha
   pPFinHold
   pHold
   fPFinHold_Linha
   fPFinHold
   fHold
   nPDescLog
   jide_idDest
   nTot_vICMSDeson
   tISSQN_dCompet
   nISSQNtot_vDeducao
   nISSQNtot_vOutro
   nISSQNtot_vDescIncond
   nISSQNtot_vDescCond
   nISSQNtot_vISSRet
   jISSQN_cRegTrib
   nTot_vTotTrib
   lPedAnjo
   nVFCPUFDest
   nVICMSUFDest
   nVICMSUFRemet
   jDtPlaEnt
   tEntPlaCalc
   jEmitido
   lDevoluc
   lTransfRem
   lRedesp
   pCC
   fCC
   pGestor
   fGestor
   nPGestor
   sIde_Serie
   lSped
   jClaSped
   pContr
   fContr
   lAmazon
   lContPrazo
   iAnteciMax
   iAtrasoMax
   pRotItinEnt
   fRotItinEnt
   jTipo
   pNatOper
   fNatOper
   pEmi     
   fEmi
   pDest    
   fDest    
   pMoe
   fMoe
   pTOper   
   fTOper   
   pRepCom 
   fRepCom 
   pTabPreco 
   fTabPreco 
   pTransp
   fTransp
   pVeic
   fVeic
   pTipoVeic
   fTipoVeic
   lLCredGrpCli
   lACC
   lCCusto
   jPriori  
   lCotas   
   lGlobal  
   lSCusto  
   lBonif 
   lBrinde
   lComis 
   lABC   
   jBC_Pis
   jBC_Cofins
   jBC_Icms
   jBC_IPI
   jBC_ICMSST
   jBC_II
   jBC_ISS
   jVl_ICMSST
   jVl_ICMS
   jTpTab
   lLCredDest
   lCrtlRot  
   lCrtlItem 
   lImpDtSai
   lComisRep
   nDescFin      
   lCtrlBloqFin  
   lBloqAuto     
   lFinanc 
   lCttos  
   jFrete        
   lRetira       
   lAgendamento  
   lImpTxAgenNF  
   lCPalet       
   lCanh 
   pEmiEndPos
   pEmiEndEnt
   pEmiEndCob
   pEmiCEPPos 
   pEmiCEPEnt 
   pEmiCEPCob 
   pEmiCidPos 
   pEmiCidEnt 
   pEmiCidCob 
   pEmiUFPos  
   pEmiUFEnt  
   pEmiUFCob  
   pEmiPaisPos
   pEmiPaisEnt
   pEmiPaisCob
   fEmiEndPos 
   fEmiEndEnt 
   fEmiEndCob 
   fEmiCEPPos 
   fEmiCEPEnt 
   fEmiCEPCob 
   fEmiCidPos 
   fEmiCidEnt 
   fEmiCidCob 
   fEmiUFPos  
   fEmiUFEnt  
   fEmiUFCob  
   fEmiPaisPos
   fEmiPaisEnt
   fEmiPaisCob
   pDestEndPos
   pDestEndEnt
   pDestEndCob
   pDestCEPPos
   pDestCEPEnt
   pDestCEPCob
   pDestCidPos
   pDestCidEnt
   pDestCidCob
   pDestUFPos 
   pDestUFEnt 
   pDestUFCob 
   pDestPaisPos
   pDestPaisEnt
   pDestPaisCob
   fDestEndPos
   fDestEndEnt
   fDestEndCob
   fDestCEPPos
   fDestCEPEnt
   fDestCEPCob
   fDestCidPos
   fDestCidEnt
   fDestCidCob
   fDestUFPos 
   fDestUFEnt 
   fDestUFCob 
   fDestPaisPos
   fDestPaisEnt
   fDestPaisCob
   nTot_vBC
   nTot_vICMS
   nTot_vBCST
   nTot_vST
   nTot_vProd
   nTot_vFrete
   nTot_vSeg
   nTot_vDesc
   nTot_vII
   nTot_vIPI
   nTot_vPIS
   nTot_vCOFINS
   nTot_vOutro
   nTot_vNF
   nISSQNtot_vServ
   nISSQNtot_vBC
   nISSQNtot_vISS
   nISSQNtot_vPIS
   nISSQNtot_vCOFINS
   nTot_vTrib
   sObs
   sObsTNet
   sObsRep
   sObsFin
   sObsNF
   sObsNFM
   sTxtSN
   sDoc
   jOrigem  
   tEmissao
   tBasePrest = $_POST[tEmissao]
   tSaida   
   tEntPla
   pPTOpED
   fPTOpED
   pDoc
   fDoc
   sEmailDest
   sDDFSubTabela      = Ordens_FPgmto
   pSubPId            = $_POST[pOrdens_FPgmto_{i}]
   pOrdem             = {ChaveAtual_0}
   fOrdem             = $_POST[iVer]
   pPED_FPgmto_CPgmto = $_POST[pPED_FPgmto_CPgmto_{i}]
   fPED_FPgmto_CPgmto = $_POST[fPED_FPgmto_CPgmto_{i}]
   nPorc              = $_POST[nPorc_{i}]
   t1aPrest           = $_POST[d1aPrest_{i}]
   lAplicarCPgmto     = $_POST[lAplicarCPgmto_{i}]
   lExc               = $_POST[pPED_FPgmto_CPgmto_{i}]==0 ? 1 : 0
</VarsToDb1>
<PodeAlterar1>
   select count(*) from Ordens where pPId={ChaveAtual_0} and iVer=iVAt and tLibCom is null ; Esse Pedido no pode ser alterado porque j foi Enviado.
</PodeAlterar1>
<PodeExcluir1>
   select count(*) from Ordens where pPId={ChaveAtual_0} and iVer=iVAt and tLibCom is null ; Esse Pedido no pode ser excluido porque j foi Enviado.
</PodeExcluir1>
<ServerValids1>
   pEmi         ; $_POST[.]>0   ; O Emissor deve ser informado.
   pDest        ; $_POST[.]>0   ; O Destintrio deve ser informado.
   pTOper       ; $_POST[.]>0   ; O Tipo de Operao deve ser informado.
   lBloq        ; $_POST[.]==0  ; Cliente Bloqueado, contatar departamento Financeiro.
   tEntPla      ; strtotime($_POST[.]) > strtotime('now -1 days') ; A Data da entrega no pode ser menor que a data atual
</ServerValids1>
sDDSTxt=   sTagMnemTDoc     = Ordens
   sTagTit          = Tit1
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens
   sTagMenu         = Menu1
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Alterar
   sTagPesquisar    = Pesquisar
   sTagRAc          = false
   sTagOnSave       = flOnSave(70)
   sTagMarcacao     = true
   sTagDbToVars     = DbToVars1
   sTagVarsDef      = VarsDefault1   
   sTagScript       = ScriptFormCPgmto
   sTagVarsToServer = VarsToServer1CPgmto
   sTagVarsToDb     = VarsToDb1
   sTagServerVal    = ServerValidsCPgmto
   sTagTitulo       = TelaTit1
   sTagIncSeq       = IncSeq1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagSubGrid      = 1,2
pChaveAtual_1=0, pChaveAtual_2=0, psDDFChamada=1
tela edicao
psQry=select current_transaction from rdb$database
durao 0, iDb=1
fhDBConnect - sUser=sysdba, Transaction ID=78428 , hBase=Resource id #44, hTr=Resource id #45, ghBase=Resource id #44
flDBDisconnect - phBase=Resource id #45, ghBase=Resource id #44
lAlt=1
RAcs ERP - Inicio - iDesenvolvedor=0, iGlobalKeyUser=0
psQry=select current_transaction from rdb$database
durao 0, iDb=1
fhDBConnect - sUser=sysdba, Transaction ID=78430 , hBase=Resource id #62, hTr=Resource id #63, ghBase=Resource id #62
sSqlRAc=select pOOp,a.lEdiAlt
                           from sysRAcLinhas a,
                                sysRAcCapa   b
                           where a.pRacCapa = b.pPId
                             and b.jTipo=3
                             and sPar1 = 'dd_files/erp_ORDENS_CanalWeb.dda'
                             and sPar2 = 'Padrao_CPgmto'
                             --and a.lEdiAlt=1
                             and a.iVer=a.iVAt
                             and b.iVer=b.iVAt
                             and a.lExc=0
                             and b.lExc=0
hBase=Resource id #63
psQry=select pOOp,a.lEdiAlt from sysRAcLinhas a,sysRAcCapa b where a.pRacCapa=b.pPId and b.jTipo=3 and sPar1='dd_files/erp_ORDENS_CanalWeb.dda' and sPar2='Padrao_CPgmto' and a.iVer=a.iVAt and b.iVer=b.iVAt and a.lExc=0 and b.lExc=0
durao 0, iDb=0
iTmpRAc=0
flDBDisconnect - phBase=Resource id #63, ghBase=Resource id #62
RAcs ERP - Fim
psDDFChamada=1, lAlt=1
dentro do if
psQry=select current_transaction from rdb$database
durao 0, iDb=1
fhDBConnect - sUser=sysdba, Transaction ID=78432 , hBase=Resource id #83, hTr=Resource id #84, ghBase=Resource id #83
flDBDisconnect - phBase=Resource id #84, ghBase=Resource id #83
psQry=select current_transaction from rdb$database
durao 0, iDb=1
fhDBConnect - sUser=sysdba, Transaction ID=78434 , hBase=Resource id #563, hTr=Resource id #564, ghBase=Resource id #563
flDBDisconnect - phBase=Resource id #564, ghBase=Resource id #563
sVTS=   lBloq
   jTipo  = jEntSai
   jCargaI
   pPed  = iPed
   iVol_qVol
   sVol_esp
   sVol_marca
   sVol_nVOL
   nVol_pesoL
   nVol_pesoB
   lCalculado 
   pPRepUNeg 
   fPRepUNeg 
   lCliInativo
   sIde_Serie
   lSped
   jClaSped
   lZFM
   lZFMAbat
   lDevoluc
   lTransfRem
   lRedesp
   jide_indFinal
   jide_indPres
   jide_Mod
   pPFinHold_Linha
   pPFinHold
   pHold
   fPFinHold_Linha
   fPFinHold
   fHold
   nPDescLog
   jide_idDest
   nTot_vICMSDeson
   tISSQN_dCompet
   nISSQNtot_vDeducao
   nISSQNtot_vOutro
   nISSQNtot_vDescIncond
   nISSQNtot_vDescCond
   nISSQNtot_vISSRet
   jISSQN_cRegTrib
   nTot_vTotTrib
   nVFCPUFDest
   nVICMSUFDest
   nVICMSUFRemet
   pEmi     
   fEmi
   pDest    
   fDest    
   pMoe = 1
   fMoe
   pTOper   
   fTOper   
   jDtPlaEnt
   pGestor
   fGestor
   nPGestor
   pCC
   fCC
   pContr
   fContr
   pRotItinEnt = pRotItinEnt > 0  ? pRotItinEnt : 0
   fRotItinEnt = fRotItinEnt > 0  ? fRotItinEnt : 0
   jEmitido
   pRepCom  = pLogin
   fRepCom 
   pTabPreco 
   fTabPreco 
   pNatOper
   fNatOper
   jBC_Pis
   jBC_Cofins
   jBC_Icms
   jBC_IPI
   jBC_ICMSST
   jBC_II
   jBC_ISS
   jVl_ICMSST
   jVl_ICMS
   jPriori  
   lCotas   = lCotas  =='' ? 0 : lCotas
   lGlobal  = lGlobal =='' ? 0 : lGlobal   
   lSCusto  = lSCusto =='' ? 0 : lSCusto   
   lBonif   = lBonif  =='' ? 0 : lBonif  
   lBrinde  = lBrinde =='' ? 0 : lBrinde
   lComis   = lComis  =='' ? 0 : lComis  
   lABC     = lABC    =='' ? 0 : lABC    
   lCCusto  = lCCusto =='' ? 0 : lCCusto
   pTransp
   fTransp
   lPedAnjo
   lAmazon
   pVeic
   fVeic
   pTipoVeic
   fTipoVeic
   lContPrazo = lContPrazo=='' ? 0 : lContPrazo
   iAnteciMax
   iAtrasoMax
   jTpTab
   lLCredDest   = lLCredDest  =='' ? 0 : lLCredDest
   lLCredGrpCli = lLCredGrpCli=='' ? 0 : lLCredGrpCli
   lCrtlRot     = lCrtlRot    =='' ? 0 : lCrtlRot
   lCrtlItem    = lCrtlItem   =='' ? 0 : lCrtlItem
   lImpDtSai    = lImpDtSai   =='' ? 0 : lImpDtSai
   lComisRep    = lComisRep   =='' ? 0 : lComisRep
   lACC         = lACC        =='' ? 0 : lACC
   nDescFin      
   lCtrlBloqFin = lCtrlBloqFin=='' ? 0 : lCtrlBloqFin  
   lBloqAuto    = lBloqAuto   =='' ? 0 : lBloqAuto     
   lFinanc      = lFinanc     =='' ? 0 : lFinanc 
   lCttos       = lCttos      =='' ? 0 : lCttos 
   jFrete        
   lRetira      = lRetira     =='' ? 0 : lRetira       
   lAgendamento = lAgendamento=='' ? 0 : lAgendamento
   lImpTxAgenNF = lImpTxAgenNF=='' ? 0 : lImpTxAgenNF
   lCPalet      = lCPalet     =='' ? 0 : lCPalet   
   lCanh        = lCanh       =='' ? 0 : lCanh
   pEmiEndPos
   pEmiEndEnt
   pEmiEndCob
   pEmiCEPPos 
   pEmiCEPEnt 
   pEmiCEPCob 
   pEmiCidPos 
   pEmiCidEnt 
   pEmiCidCob 
   pEmiUFPos  
   pEmiUFEnt  
   pEmiUFCob  
   pEmiPaisPos
   pEmiPaisEnt
   pEmiPaisCob
   fEmiEndPos 
   fEmiEndEnt 
   fEmiEndCob 
   fEmiCEPPos 
   fEmiCEPEnt 
   fEmiCEPCob 
   fEmiCidPos 
   fEmiCidEnt 
   fEmiCidCob 
   fEmiUFPos  
   fEmiUFEnt  
   fEmiUFCob  
   fEmiPaisPos
   fEmiPaisEnt
   fEmiPaisCob
   pDestEndPos
   pDestEndEnt
   pDestEndCob
   pDestCEPPos
   pDestCEPEnt
   pDestCEPCob
   pDestCidPos
   pDestCidEnt
   pDestCidCob
   pDestUFPos 
   pDestUFEnt 
   pDestUFCob 
   pDestPaisPos
   pDestPaisEnt
   pDestPaisCob
   fDestEndPos
   fDestEndEnt
   fDestEndCob
   fDestCEPPos
   fDestCEPEnt
   fDestCEPCob
   fDestCidPos
   fDestCidEnt
   fDestCidCob
   fDestUFPos 
   fDestUFEnt 
   fDestUFCob 
   fDestPaisPos
   fDestPaisEnt
   fDestPaisCob
   nTot_vBC          
   nTot_vICMS        
   nTot_vBCST        
   nTot_vST          
   nTot_vProd        
   nTot_vFrete       
   nTot_vSeg         
   nTot_vDesc        
   nTot_vII          
   nTot_vIPI         
   nTot_vPIS         
   nTot_vCOFINS      
   nTot_vOutro       
   nTot_vNF          
   nISSQNtot_vServ
   nISSQNtot_vBC
   nISSQNtot_vISS
   nISSQNtot_vPIS
   nISSQNtot_vCOFINS
   nTot_vTrib
   sObsTNet = mObsTNet
   sObsRep = mObsRep
   sObsFin = mObsFin
   sObsNF = mObsNF   
   sObsNFM = mObsNFM   
   sTxtSN = mTxtSN
   sDoc
   jOrigem  
   tEmissao = tEmissao=='' ? 'now' : tEmissao
   tSaida   = dSaida
   tEntPla  = dEntPla
   tEntPlaCalc = dEntPlaCalc
   pPTOpED
   fPTOpED
   pDoc
   fDoc   
   sEmailDest
   iVer
   pOrdens_FPgmto_{i}
   pPED_FPgmto_CPgmto_{i}
   fPED_FPgmto_CPgmto_{i}
   nPorc_{i}
   d1aPrest_{i}
   lAplicarCPgmto_{i}, sTagVarsToServer=VarsToServer1CPgmto
sTit=     Dados do Pedido
psQry=select current_transaction from rdb$database
durao 0, iDb=1
fhDBConnect - sUser=sysdba, Transaction ID=78436 , hBase=Resource id #614, hTr=Resource id #615, ghBase=Resource id #614
flDBDisconnect - phBase=Resource id #615, ghBase=Resource id #614
s=1~dd_files/erp_ORDENS_CanalWeb.dda~Padrao_CPgmto~1121035~     Dados do Pedido~pOrdens_FPgmto_1=1111754
fOrdem_1=1
pPED_FPgmto_CPgmto_1=457037
fPED_FPgmto_CPgmto_1=1
nPorc_1=100
pPED_FPG_1=86658
pCPgmto_1=101
sCPgmto_1=28,35 DIAS
pFPgmto_1=9
pTipoCob_1=14
lDefault_1=1
sFPgmto_1=Boleto bancrio
sTipoCob_1=SANTANDER CARTEIRA 101 CDI
sCodTipoCob_1=1.0 - ST 101 CDI
nDFin_1=0.00
d1aPrest_1=
pTipoCobHld_1=
lBoleto_1=1
lAplicarCPgmto_1=0
pOrdens_FPgmto_2=0
fOrdem_2=0
pPED_FPgmto_CPgmto_2=0
fPED_FPgmto_CPgmto_2=
nPorc_2=100
pPED_FPG_2=0
pCPgmto_2=0
sCPgmto_2=
pFPgmto_2=0
pTipoCob_2=0
lDefault_2=0
sFPgmto_2=
sTipoCob_2=
sCodTipoCob_2=
nDFin_2=0.00
d1aPrest_2=
pTipoCobHld_2=0
lBoleto_2=0
lAplicarCPgmto_2=0
pOrdens_FPgmto_3=0
fOrdem_3=0
pPED_FPgmto_CPgmto_3=0
fPED_FPgmto_CPgmto_3=
nPorc_3=100
pPED_FPG_3=0
pCPgmto_3=0
sCPgmto_3=
pFPgmto_3=0
pTipoCob_3=0
lDefault_3=0
sFPgmto_3=
sTipoCob_3=
sCodTipoCob_3=
nDFin_3=0.00
d1aPrest_3=
pTipoCobHld_3=0
lBoleto_3=0
lAplicarCPgmto_3=0
pOrdens_FPgmto_4=0
fOrdem_4=0
pPED_FPgmto_CPgmto_4=0
fPED_FPgmto_CPgmto_4=
nPorc_4=100
pPED_FPG_4=0
pCPgmto_4=0
sCPgmto_4=
pFPgmto_4=0
pTipoCob_4=0
lDefault_4=0
sFPgmto_4=
sTipoCob_4=
sCodTipoCob_4=
nDFin_4=0.00
d1aPrest_4=
pTipoCobHld_4=0
lBoleto_4=0
lAplicarCPgmto_4=0
pOrdens_FPgmto_5=0
fOrdem_5=0
pPED_FPgmto_CPgmto_5=0
fPED_FPgmto_CPgmto_5=
nPorc_5=100
pPED_FPG_5=0
pCPgmto_5=0
sCPgmto_5=
pFPgmto_5=0
pTipoCob_5=0
lDefault_5=0
sFPgmto_5=
sTipoCob_5=
sCodTipoCob_5=
nDFin_5=0.00
d1aPrest_5=
pTipoCobHld_5=0
lBoleto_5=0
lAplicarCPgmto_5=0
pOrdens_FPgmto_6=0
fOrdem_6=0
pPED_FPgmto_CPgmto_6=0
fPED_FPgmto_CPgmto_6=
nPorc_6=100
pPED_FPG_6=0
pCPgmto_6=0
sCPgmto_6=
pFPgmto_6=0
pTipoCob_6=0
lDefault_6=0
sFPgmto_6=
sTipoCob_6=
sCodTipoCob_6=
nDFin_6=0.00
d1aPrest_6=
pTipoCobHld_6=0
lBoleto_6=0
lAplicarCPgmto_6=0
pOrdens_FPgmto_7=0
fOrdem_7=0
pPED_FPgmto_CPgmto_7=0
fPED_FPgmto_CPgmto_7=
nPorc_7=100
pPED_FPG_7=0
pCPgmto_7=0
sCPgmto_7=
pFPgmto_7=0
pTipoCob_7=0
lDefault_7=0
sFPgmto_7=
sTipoCob_7=
sCodTipoCob_7=
nDFin_7=0.00
d1aPrest_7=
pTipoCobHld_7=0
lBoleto_7=0
lAplicarCPgmto_7=0
pOrdens_FPgmto_8=0
fOrdem_8=0
pPED_FPgmto_CPgmto_8=0
fPED_FPgmto_CPgmto_8=
nPorc_8=100
pPED_FPG_8=0
pCPgmto_8=0
sCPgmto_8=
pFPgmto_8=0
pTipoCob_8=0
lDefault_8=0
sFPgmto_8=
sTipoCob_8=
sCodTipoCob_8=
nDFin_8=0.00
d1aPrest_8=
pTipoCobHld_8=0
lBoleto_8=0
lAplicarCPgmto_8=0
pOrdens_FPgmto_9=0
fOrdem_9=0
pPED_FPgmto_CPgmto_9=0
fPED_FPgmto_CPgmto_9=
nPorc_9=100
pPED_FPG_9=0
pCPgmto_9=0
sCPgmto_9=
pFPgmto_9=0
pTipoCob_9=0
lDefault_9=0
sFPgmto_9=
sTipoCob_9=
sCodTipoCob_9=
nDFin_9=0.00
d1aPrest_9=
pTipoCobHld_9=0
lBoleto_9=0
lAplicarCPgmto_9=0
pOrdens_FPgmto_10=0
fOrdem_10=0
pPED_FPgmto_CPgmto_10=0
fPED_FPgmto_CPgmto_10=
nPorc_10=100
pPED_FPG_10=0
pCPgmto_10=0
sCPgmto_10=
pFPgmto_10=0
pTipoCob_10=0
lDefault_10=0
sFPgmto_10=
sTipoCob_10=
sCodTipoCob_10=
nDFin_10=0.00
d1aPrest_10=
pTipoCobHld_10=0
lBoleto_10=0
lAplicarCPgmto_10=0
pOrdens_FPgmto_11=0
fOrdem_11=0
pPED_FPgmto_CPgmto_11=0
fPED_FPgmto_CPgmto_11=
nPorc_11=100
pPED_FPG_11=0
pCPgmto_11=0
sCPgmto_11=
pFPgmto_11=0
pTipoCob_11=0
lDefault_11=0
sFPgmto_11=
sTipoCob_11=
sCodTipoCob_11=
nDFin_11=0.00
d1aPrest_11=
pTipoCobHld_11=0
lBoleto_11=0
lAplicarCPgmto_11=0
iTotLinSubGridPreenchidos_1=1
iTotLinSubGrid_1=11
pOrdens_Prest_1=0
sDup_nDup_1=
dDup_Venc_1=
nDup_vDup_1=0.00
pOrdens_Prest_2=0
sDup_nDup_2=
dDup_Venc_2=
nDup_vDup_2=0.00
pOrdens_Prest_3=0
sDup_nDup_3=
dDup_Venc_3=
nDup_vDup_3=0.00
pOrdens_Prest_4=0
sDup_nDup_4=
dDup_Venc_4=
nDup_vDup_4=0.00
pOrdens_Prest_5=0
sDup_nDup_5=
dDup_Venc_5=
nDup_vDup_5=0.00
pOrdens_Prest_6=0
sDup_nDup_6=
dDup_Venc_6=
nDup_vDup_6=0.00
pOrdens_Prest_7=0
sDup_nDup_7=
dDup_Venc_7=
nDup_vDup_7=0.00
pOrdens_Prest_8=0
sDup_nDup_8=
dDup_Venc_8=
nDup_vDup_8=0.00
pOrdens_Prest_9=0
sDup_nDup_9=
dDup_Venc_9=
nDup_vDup_9=0.00
pOrdens_Prest_10=0
sDup_nDup_10=
dDup_Venc_10=
nDup_vDup_10=0.00
iTotLinSubGridPreenchidos_2=0
iTotLinSubGrid_2=10
tInc=2024-02-16 14:47:56
iVer=1
iVAt=1
pPId=1121035
sVer=dd_files/erp_ORDENS_CanalWeb_Mobile.dda/Padrao_2 -> editado por celular
dIn0=2024-02-16 14:47:56
sObsTNet=
jOrigem=4
sEntPla=2024-02-16 00:00:00
tConf=
tCanc=
tEmissao=
dSaida=
sDoc=
jEntSai=1
nTot_vBC=0.00
nTot_vICMS=0.00
nTot_vBCST=0.00
nTot_vST=0.00
nTot_vProd=0.00
nPorcCTR=0.00000
nTot_vFrete=0.00
nTot_vSeg=0.00
nTot_vDesc=0.00
nTot_vII=0.00
nTot_vIPI=0.00
nTot_vPIS=0.00
nTot_vCOFINS=0.00
nTot_vOutro=0.00
nTot_vNF=0.00
nTot_vFIN=0.00
nTot_vFINDesc=0.00
nTot_vTrib=0.00000
nISSQNtot_vServ=0.00
nISSQNtot_vBC=0.00
nISSQNtot_vISS=0.00
nISSQNtot_vPIS=0.00
nISSQNtot_vCOFINS=0.00
iVol_qVol=0
sVol_esp=
sVol_marca=
sVol_nVOL=
nVol_pesoL=0.000
nVol_pesoB=0.000
dEntPlaCalc=
pEmi=10
fEmi=26
sEmi0=TOTAL CENTRO DE DISTRIBUICAO INTEGRADA LTDA
sEmi1=TOTAL CENTRO DE DISTRIBUICAO INTEGRADA LTDA
sEmail0=
sEmiCNPJ=12460301000187
sEmiCPF=
pDest=72840
fDest=2
sDest0=JUSTO DO BRASIL LTDA
sDestCNPJ=42868551000200
sDestCPF=
lInativo=0
sDest1=JUSTO DO BRASIL LTDA
sDest1a=JUSTO DO BRASIL LTDA
sCNPJ=42868551000200
sCPF=
sEmail1=fernanda.barbosa@s
sDest2=JUSTO DO BRASIL LTDA
sFantaDest=JUSTO DO BRASIL LTDA
sPassaporte=
pMoe=1
fMoe=2
sMoe=REAL
sMoe0=REAL
pTOper=13
fTOper=9
sTOper=BONIFICACAO DE MERCADORIA
sTOperCod=502
pNatOper=4
sDesNatOper=BONIFICACAO
fNatOper=1
pRepCom=261
fRepCom=24
sRepComEnt=VANDERLEI S. SANT.AGATA - Z. SUL
sRepComSai=VANDERLEI S. SANT.AGATA - Z. SUL
pEmiEndPos=2
pEmiEndEnt=2
pEmiEndCob=2
fEmiEndPos=11
fEmiEndEnt=11
fEmiEndCob=11
pEmiCEPPos=660498
pEmiCEPEnt=660498
pEmiCEPCob=660498
fEmiCEPPos=1
fEmiCEPEnt=1
fEmiCEPCob=1
pEmiCidPos=4084
pEmiCidEnt=4084
pEmiCidCob=4084
fEmiCidPos=2
fEmiCidEnt=2
fEmiCidCob=2
pEmiUFPos=26
pEmiUFEnt=26
pEmiUFCob=26
fEmiUFPos=5
fEmiUFEnt=5
fEmiUFCob=5
pEmiPaisPos=1
pEmiPaisEnt=0
pEmiPaisCob=0
fEmiPaisPos=1
fEmiPaisEnt=0
fEmiPaisCob=0
sEmiPosCEP=06817175
sEmiPosLog=R ILHA DE SAO FRANCISCO
sEmiPosNr=28
sEmiPosComp=GALPAO26/78 LOT
sEmiPosBai=ESPLANADA
sEmiPosCid=EMBU DAS ARTES
sEmiPosSigla=SP
sEmiPosPais=Brasil
sEmiCEPEnt=06817175
sEmiLogEnt=R ILHA DE SAO FRANCISCO
sEmiNrEnt=28
sEmiCompEnt=GALPAO26/78 LOT
sEmiBaiEnt=ESPLANADA
sEmiCidEnt=EMBU DAS ARTES
sEmiSiglaEnt=SP
sEmiPaisEnt=
sEmiCEPCob=06817175
sEmiLogCob=R ILHA DE SAO FRANCISCO
sEmiNrCob=28
sEmiCompCob=GALPAO26/78 LOT
sEmiBaiCob=ESPLANADA
sEmiCidCob=EMBU DAS ARTES
sEmiSiglaCob=SP
sEmiPaisCob=
pDestEndPos=84303
pDestEndEnt=84303
pDestEndCob=84303
fDestEndPos=2
fDestEndEnt=2
fDestEndCob=2
pDestCEPPos=681868
pDestCEPEnt=681868
pDestCEPCob=681868
fDestCEPPos=1
fDestCEPEnt=1
fDestCEPCob=1
pDestCidPos=329
pDestCidEnt=329
pDestCidCob=329
fDestCidPos=2
fDestCidEnt=2
fDestCidCob=2
pDestUFPos=26
pDestUFEnt=26
pDestUFCob=26
fDestUFPos=5
fDestUFEnt=5
fDestUFCob=5
pDestPaisPos=1
pDestPaisEnt=1
pDestPaisCob=1
fDestPaisPos=1
fDestPaisEnt=1
fDestPaisCob=1
sDestPosCEP=02145900
sDestPosLog=AVENIDA MARIO HABERFELD
sDestPosNr=555
sDestPosComp=GALPAO02
sDestPosBai=PARQUE NOVO MUNDO
sDestPosCid=SAO PAULO                     
sDestPosSigla=SP
sDestPosPais=Brasil
sDestCEPEnt=02145900
sDestLogEnt=AVENIDA MARIO HABERFELD
sDestNrEnt=555
sDestCompEnt=GALPAO02
sDestBaiEnt=PARQUE NOVO MUNDO
sDestCidEnt=SAO PAULO                     
sDestSiglaEnt=SP
sDestPaisEnt=Brasil
sDestCEPCob=02145900
sDestLogCob=AVENIDA MARIO HABERFELD
sDestNrCob=555
sDestCompCob=GALPAO02
sDestBaiCob=PARQUE NOVO MUNDO
sDestCidCob=SAO PAULO                     
sDestSiglaCob=SP
sDestPaisCob=Brasil
lImpDtSai=0
jTpTab=0
lLCredDest=0
lLCredGrpCli=0
lCrtlRot=1
lCrtlItem=0
lGerNFe=0
lComisRep=0
jDtPlaEnt=1
jBC_Pis=0
jBC_Cofins=0
jBC_Icms=0
jBC_IPI=0
jBC_II=0
jBC_ICMSST=0
jBC_ISS=0
jVl_ICMSST=0
jVl_ICMS=0
jPriori=0
lCotas=0
lGlobal=1
lSCusto=0
lBonif=1
lBrinde=0
lComis=0
lABC=0
lACC=0
lCCusto=0
nDescFin=0.00000
lCtrlBloqFin=1
lBloqAuto=0
lFinanc=0
lCttos=0
jFrete=0
lRetira=0
lAgendamento=0
lImpTxAgenNF=0
lCPalet=0
lCanh=0
lContPrazo=0
iAnteciMax=0
iAtrasoMax=0
sObsNF=
sObsNFM=
pVeic=0
sVeic=
sPlaca=
sMarca=
iAno=
sCor=
sChassi=
sRenav=
sRNTC=
fVeic=0
pTipoVeic=0
sDescTipoVeic=
jTipoVeic=
nTotMax=
iVolMax=
iPesoMax=
jComb=
iQtEixo=
fTipoVeic=0
pTransp=0
sTransp=
fTransp=0
pPTOpED=167573
fPTOpED=1
jEmitido=1
tEmitido=
pEmitido=0
sEmitido=
tBasePrest=
pDoc=0
fDoc=0
pCC=1224
fCC=3
pAgencia=3073
fAgencia=2
sCC=13002531
sDac=1
sAgeNr=3726
sAge=Santander
pBanco=88
fBanco=1
sCodBanco=033       
sDesBanco=Banco Santander (Brasil) S.A
pContr=0
sDesContr=
sCodContr=
fContr=0
lSped=0
jClaSped=0
sIde_Serie=
lEstouroOrcamento=0
dLibEstouroOrcamento=
pLibEstouroOrcamento=0
sLibEstouroOrcamento=
lLimCred=0
dLibLimCred=
pLibLimCred=0
sLibLimCred=
sTxtSN=
pRotItinEnt=64
fRotItinEnt=2
pPRepUNeg=111289
fPRepUNeg=1
pTabPreco=0
sTab=
sCodTab=
fTabPreco=0
pGestor=0
sGestor=
nPGestor=0.00000
fGestor=0
jide_Mod=0
jide_indFinal=0
jide_indPres=0
jide_idDest=0
nTot_vICMSDeson=0.00
tISSQN_dCompet=
nISSQNtot_vDeducao=0.00
nISSQNtot_vOutro=0.00
nISSQNtot_vDescIncond=0.00
nISSQNtot_vDescCond=0.00
nISSQNtot_vISSRet=0.00
jISSQN_cRegTrib=0
nTot_vTotTrib=0.00
nVFCPUFDest=0.00000
nVICMSUFDest=0.00000
nVICMSUFRemet=0.00000
sObsFin=
lZFM=0
lZFMAbat=0
jCargaI=0
pPed=0
tIncPed=
sEmailDest=fernanda.barbosa@s
sEmail_Temp=
iTemp=0
lDevoluc=0
lTransfRem=0
lRedesp=0
lCalculado=0
lCliInativo=0
pPFinHold_Linha=0
pPFinHold=0
pHold=0
fPFinHold_Linha=0
fPFinHold=0
fHold=0
nPDescLog=0.00000
lPedAnjo=1
pOrdemGrupo=0
tCliRejeito=
pCliRejeito=0
sCliRejeito=
sMotCliRejeito=
lAmazon=0
sObsRep=
sCoringa=VANDERLEI S. SANT.AGATA - Z. SUL
sVerVAt={iVer+'/'+iVAt}
sRastro={sVerVAt+', '+sCoringa+', '+tInc}
mObsTNet={sObsTNet}
mObsNF={sObsNF}
mObsNFM={sObsNFM}
mTxtSN={sTxtSN}
mObsFin={sObsFin}
mDesContr={sDesContr}
mObsRep={sObsRep}
mMotCliRejeito={sMotCliRejeito}
pLogin=133
lEndDest=0
dEntPla={sEntPla}
aCargaI=No carregar itens - incluso manual de itens avulsos,Carregar os itens da ltima venda (Apenas itens Qt>0 e ordens confirmadas)
iPed={pPed==0 ? '' : pPed  }
sCodDest={pDest==0 ? '' : pDest}
lBloq=0
~  ;
Formas e Condies de Pagamento ;; fontweight='bold'; identlabel=5 ;   visible=((lFinanc==1)&&(sDDFTagApl!='Padrao_2'))
   SubGrid-1 {
      (i))                              ;                  ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 
      Forma de Pagamento                ; sFPgmto_i-30     ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; esc=('dd_files/erp_POLITICAS_ED_FPgmto.dda','Esc_Padrao_2','sFPgmto_i,pEmi,pDest,jEntSai,pTOper','pPED_FPgmto_CPgmto_i,fPED_FPgmto_CPgmto_i,sFPgmto_i,sCPgmto_i,sTipoCob_i,sCodTipoCob_i,lDefault_i,nDFin_i,pTipoCobHld_i,lBoleto_i,nVlPedCPgmto_i')
      Condio de Pagamento             ; sCPgmto_i-30     ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; editable=false ; fieldborder=0
      Desconto da Condio de Pagamento ; nDFin_i-10       ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; editable=false ; fieldborder=0
      Tipo de Cobrana                  ; sTipoCob_i-30    ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; editable=false ; fieldborder=0
                                        ; sCodTipoCob_i-30 ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; editable=false ; fieldborder=0
      Default                           ; lDefault_i       ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; editable=false ; fieldborder=0
      ; ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10
      Deseja aplicar essa Condio de Pagamento ?  ; lAplicarCPgmto_i ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10
      ; ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10
   }~   lBloq
   jTipo  = jEntSai
   jCargaI
   pPed  = iPed
   iVol_qVol
   sVol_esp
   sVol_marca
   sVol_nVOL
   nVol_pesoL
   nVol_pesoB
   lCalculado 
   pPRepUNeg 
   fPRepUNeg 
   lCliInativo
   sIde_Serie
   lSped
   jClaSped
   lZFM
   lZFMAbat
   lDevoluc
   lTransfRem
   lRedesp
   jide_indFinal
   jide_indPres
   jide_Mod
   pPFinHold_Linha
   pPFinHold
   pHold
   fPFinHold_Linha
   fPFinHold
   fHold
   nPDescLog
   jide_idDest
   nTot_vICMSDeson
   tISSQN_dCompet
   nISSQNtot_vDeducao
   nISSQNtot_vOutro
   nISSQNtot_vDescIncond
   nISSQNtot_vDescCond
   nISSQNtot_vISSRet
   jISSQN_cRegTrib
   nTot_vTotTrib
   nVFCPUFDest
   nVICMSUFDest
   nVICMSUFRemet
   pEmi     
   fEmi
   pDest    
   fDest    
   pMoe = 1
   fMoe
   pTOper   
   fTOper   
   jDtPlaEnt
   pGestor
   fGestor
   nPGestor
   pCC
   fCC
   pContr
   fContr
   pRotItinEnt = pRotItinEnt > 0  ? pRotItinEnt : 0
   fRotItinEnt = fRotItinEnt > 0  ? fRotItinEnt : 0
   jEmitido
   pRepCom  = pLogin
   fRepCom 
   pTabPreco 
   fTabPreco 
   pNatOper
   fNatOper
   jBC_Pis
   jBC_Cofins
   jBC_Icms
   jBC_IPI
   jBC_ICMSST
   jBC_II
   jBC_ISS
   jVl_ICMSST
   jVl_ICMS
   jPriori  
   lCotas   = lCotas  =='' ? 0 : lCotas
   lGlobal  = lGlobal =='' ? 0 : lGlobal   
   lSCusto  = lSCusto =='' ? 0 : lSCusto   
   lBonif   = lBonif  =='' ? 0 : lBonif  
   lBrinde  = lBrinde =='' ? 0 : lBrinde
   lComis   = lComis  =='' ? 0 : lComis  
   lABC     = lABC    =='' ? 0 : lABC    
   lCCusto  = lCCusto =='' ? 0 : lCCusto
   pTransp
   fTransp
   lPedAnjo
   lAmazon
   pVeic
   fVeic
   pTipoVeic
   fTipoVeic
   lContPrazo = lContPrazo=='' ? 0 : lContPrazo
   iAnteciMax
   iAtrasoMax
   jTpTab
   lLCredDest   = lLCredDest  =='' ? 0 : lLCredDest
   lLCredGrpCli = lLCredGrpCli=='' ? 0 : lLCredGrpCli
   lCrtlRot     = lCrtlRot    =='' ? 0 : lCrtlRot
   lCrtlItem    = lCrtlItem   =='' ? 0 : lCrtlItem
   lImpDtSai    = lImpDtSai   =='' ? 0 : lImpDtSai
   lComisRep    = lComisRep   =='' ? 0 : lComisRep
   lACC         = lACC        =='' ? 0 : lACC
   nDescFin      
   lCtrlBloqFin = lCtrlBloqFin=='' ? 0 : lCtrlBloqFin  
   lBloqAuto    = lBloqAuto   =='' ? 0 : lBloqAuto     
   lFinanc      = lFinanc     =='' ? 0 : lFinanc 
   lCttos       = lCttos      =='' ? 0 : lCttos 
   jFrete        
   lRetira      = lRetira     =='' ? 0 : lRetira       
   lAgendamento = lAgendamento=='' ? 0 : lAgendamento
   lImpTxAgenNF = lImpTxAgenNF=='' ? 0 : lImpTxAgenNF
   lCPalet      = lCPalet     =='' ? 0 : lCPalet   
   lCanh        = lCanh       =='' ? 0 : lCanh
   pEmiEndPos
   pEmiEndEnt
   pEmiEndCob
   pEmiCEPPos 
   pEmiCEPEnt 
   pEmiCEPCob 
   pEmiCidPos 
   pEmiCidEnt 
   pEmiCidCob 
   pEmiUFPos  
   pEmiUFEnt  
   pEmiUFCob  
   pEmiPaisPos
   pEmiPaisEnt
   pEmiPaisCob
   fEmiEndPos 
   fEmiEndEnt 
   fEmiEndCob 
   fEmiCEPPos 
   fEmiCEPEnt 
   fEmiCEPCob 
   fEmiCidPos 
   fEmiCidEnt 
   fEmiCidCob 
   fEmiUFPos  
   fEmiUFEnt  
   fEmiUFCob  
   fEmiPaisPos
   fEmiPaisEnt
   fEmiPaisCob
   pDestEndPos
   pDestEndEnt
   pDestEndCob
   pDestCEPPos
   pDestCEPEnt
   pDestCEPCob
   pDestCidPos
   pDestCidEnt
   pDestCidCob
   pDestUFPos 
   pDestUFEnt 
   pDestUFCob 
   pDestPaisPos
   pDestPaisEnt
   pDestPaisCob
   fDestEndPos
   fDestEndEnt
   fDestEndCob
   fDestCEPPos
   fDestCEPEnt
   fDestCEPCob
   fDestCidPos
   fDestCidEnt
   fDestCidCob
   fDestUFPos 
   fDestUFEnt 
   fDestUFCob 
   fDestPaisPos
   fDestPaisEnt
   fDestPaisCob
   nTot_vBC          
   nTot_vICMS        
   nTot_vBCST        
   nTot_vST          
   nTot_vProd        
   nTot_vFrete       
   nTot_vSeg         
   nTot_vDesc        
   nTot_vII          
   nTot_vIPI         
   nTot_vPIS         
   nTot_vCOFINS      
   nTot_vOutro       
   nTot_vNF          
   nISSQNtot_vServ
   nISSQNtot_vBC
   nISSQNtot_vISS
   nISSQNtot_vPIS
   nISSQNtot_vCOFINS
   nTot_vTrib
   sObsTNet = mObsTNet
   sObsRep = mObsRep
   sObsFin = mObsFin
   sObsNF = mObsNF   
   sObsNFM = mObsNFM   
   sTxtSN = mTxtSN
   sDoc
   jOrigem  
   tEmissao = tEmissao=='' ? 'now' : tEmissao
   tSaida   = dSaida
   tEntPla  = dEntPla
   tEntPlaCalc = dEntPlaCalc
   pPTOpED
   fPTOpED
   pDoc
   fDoc   
   sEmailDest
   iVer
   pOrdens_FPgmto_{i}
   pPED_FPgmto_CPgmto_{i}
   fPED_FPgmto_CPgmto_{i}
   nPorc_{i}
   d1aPrest_{i}
   lAplicarCPgmto_{i}~Left~    flGrid(this.oPai,'dd_files/erp_ORDENS_CanalWeb_Itens.dda','Padrao_1a')~~1~1,2~1~/^/~ScriptFormCPgmto~~
retorno=
 0-psDDFChamada=1
 1-psFileDDS=dd_files/erp_ORDENS_CanalWeb.dda
 2-psTagDDS=Padrao_CPgmto
 3-psId=1121035
 4-sTit=     Dados do Pedido
 5-sVars=pOrdens_FPgmto_1=1111754
fOrdem_1=1
pPED_FPgmto_CPgmto_1=457037
fPED_FPgmto_CPgmto_1=1
nPorc_1=100
pPED_FPG_1=86658
pCPgmto_1=101
sCPgmto_1=28,35 DIAS
pFPgmto_1=9
pTipoCob_1=14
lDefault_1=1
sFPgmto_1=Boleto bancrio
sTipoCob_1=SANTANDER CARTEIRA 101 CDI
sCodTipoCob_1=1.0 - ST 101 CDI
nDFin_1=0.00
d1aPrest_1=
pTipoCobHld_1=
lBoleto_1=1
lAplicarCPgmto_1=0
pOrdens_FPgmto_2=0
fOrdem_2=0
pPED_FPgmto_CPgmto_2=0
fPED_FPgmto_CPgmto_2=
nPorc_2=100
pPED_FPG_2=0
pCPgmto_2=0
sCPgmto_2=
pFPgmto_2=0
pTipoCob_2=0
lDefault_2=0
sFPgmto_2=
sTipoCob_2=
sCodTipoCob_2=
nDFin_2=0.00
d1aPrest_2=
pTipoCobHld_2=0
lBoleto_2=0
lAplicarCPgmto_2=0
pOrdens_FPgmto_3=0
fOrdem_3=0
pPED_FPgmto_CPgmto_3=0
fPED_FPgmto_CPgmto_3=
nPorc_3=100
pPED_FPG_3=0
pCPgmto_3=0
sCPgmto_3=
pFPgmto_3=0
pTipoCob_3=0
lDefault_3=0
sFPgmto_3=
sTipoCob_3=
sCodTipoCob_3=
nDFin_3=0.00
d1aPrest_3=
pTipoCobHld_3=0
lBoleto_3=0
lAplicarCPgmto_3=0
pOrdens_FPgmto_4=0
fOrdem_4=0
pPED_FPgmto_CPgmto_4=0
fPED_FPgmto_CPgmto_4=
nPorc_4=100
pPED_FPG_4=0
pCPgmto_4=0
sCPgmto_4=
pFPgmto_4=0
pTipoCob_4=0
lDefault_4=0
sFPgmto_4=
sTipoCob_4=
sCodTipoCob_4=
nDFin_4=0.00
d1aPrest_4=
pTipoCobHld_4=0
lBoleto_4=0
lAplicarCPgmto_4=0
pOrdens_FPgmto_5=0
fOrdem_5=0
pPED_FPgmto_CPgmto_5=0
fPED_FPgmto_CPgmto_5=
nPorc_5=100
pPED_FPG_5=0
pCPgmto_5=0
sCPgmto_5=
pFPgmto_5=0
pTipoCob_5=0
lDefault_5=0
sFPgmto_5=
sTipoCob_5=
sCodTipoCob_5=
nDFin_5=0.00
d1aPrest_5=
pTipoCobHld_5=0
lBoleto_5=0
lAplicarCPgmto_5=0
pOrdens_FPgmto_6=0
fOrdem_6=0
pPED_FPgmto_CPgmto_6=0
fPED_FPgmto_CPgmto_6=
nPorc_6=100
pPED_FPG_6=0
pCPgmto_6=0
sCPgmto_6=
pFPgmto_6=0
pTipoCob_6=0
lDefault_6=0
sFPgmto_6=
sTipoCob_6=
sCodTipoCob_6=
nDFin_6=0.00
d1aPrest_6=
pTipoCobHld_6=0
lBoleto_6=0
lAplicarCPgmto_6=0
pOrdens_FPgmto_7=0
fOrdem_7=0
pPED_FPgmto_CPgmto_7=0
fPED_FPgmto_CPgmto_7=
nPorc_7=100
pPED_FPG_7=0
pCPgmto_7=0
sCPgmto_7=
pFPgmto_7=0
pTipoCob_7=0
lDefault_7=0
sFPgmto_7=
sTipoCob_7=
sCodTipoCob_7=
nDFin_7=0.00
d1aPrest_7=
pTipoCobHld_7=0
lBoleto_7=0
lAplicarCPgmto_7=0
pOrdens_FPgmto_8=0
fOrdem_8=0
pPED_FPgmto_CPgmto_8=0
fPED_FPgmto_CPgmto_8=
nPorc_8=100
pPED_FPG_8=0
pCPgmto_8=0
sCPgmto_8=
pFPgmto_8=0
pTipoCob_8=0
lDefault_8=0
sFPgmto_8=
sTipoCob_8=
sCodTipoCob_8=
nDFin_8=0.00
d1aPrest_8=
pTipoCobHld_8=0
lBoleto_8=0
lAplicarCPgmto_8=0
pOrdens_FPgmto_9=0
fOrdem_9=0
pPED_FPgmto_CPgmto_9=0
fPED_FPgmto_CPgmto_9=
nPorc_9=100
pPED_FPG_9=0
pCPgmto_9=0
sCPgmto_9=
pFPgmto_9=0
pTipoCob_9=0
lDefault_9=0
sFPgmto_9=
sTipoCob_9=
sCodTipoCob_9=
nDFin_9=0.00
d1aPrest_9=
pTipoCobHld_9=0
lBoleto_9=0
lAplicarCPgmto_9=0
pOrdens_FPgmto_10=0
fOrdem_10=0
pPED_FPgmto_CPgmto_10=0
fPED_FPgmto_CPgmto_10=
nPorc_10=100
pPED_FPG_10=0
pCPgmto_10=0
sCPgmto_10=
pFPgmto_10=0
pTipoCob_10=0
lDefault_10=0
sFPgmto_10=
sTipoCob_10=
sCodTipoCob_10=
nDFin_10=0.00
d1aPrest_10=
pTipoCobHld_10=0
lBoleto_10=0
lAplicarCPgmto_10=0
pOrdens_FPgmto_11=0
fOrdem_11=0
pPED_FPgmto_CPgmto_11=0
fPED_FPgmto_CPgmto_11=
nPorc_11=100
pPED_FPG_11=0
pCPgmto_11=0
sCPgmto_11=
pFPgmto_11=0
pTipoCob_11=0
lDefault_11=0
sFPgmto_11=
sTipoCob_11=
sCodTipoCob_11=
nDFin_11=0.00
d1aPrest_11=
pTipoCobHld_11=0
lBoleto_11=0
lAplicarCPgmto_11=0
iTotLinSubGridPreenchidos_1=1
iTotLinSubGrid_1=11
pOrdens_Prest_1=0
sDup_nDup_1=
dDup_Venc_1=
nDup_vDup_1=0.00
pOrdens_Prest_2=0
sDup_nDup_2=
dDup_Venc_2=
nDup_vDup_2=0.00
pOrdens_Prest_3=0
sDup_nDup_3=
dDup_Venc_3=
nDup_vDup_3=0.00
pOrdens_Prest_4=0
sDup_nDup_4=
dDup_Venc_4=
nDup_vDup_4=0.00
pOrdens_Prest_5=0
sDup_nDup_5=
dDup_Venc_5=
nDup_vDup_5=0.00
pOrdens_Prest_6=0
sDup_nDup_6=
dDup_Venc_6=
nDup_vDup_6=0.00
pOrdens_Prest_7=0
sDup_nDup_7=
dDup_Venc_7=
nDup_vDup_7=0.00
pOrdens_Prest_8=0
sDup_nDup_8=
dDup_Venc_8=
nDup_vDup_8=0.00
pOrdens_Prest_9=0
sDup_nDup_9=
dDup_Venc_9=
nDup_vDup_9=0.00
pOrdens_Prest_10=0
sDup_nDup_10=
dDup_Venc_10=
nDup_vDup_10=0.00
iTotLinSubGridPreenchidos_2=0
iTotLinSubGrid_2=10
tInc=2024-02-16 14:47:56
iVer=1
iVAt=1
pPId=1121035
sVer=dd_files/erp_ORDENS_CanalWeb_Mobile.dda/Padrao_2 -> editado por celular
dIn0=2024-02-16 14:47:56
sObsTNet=
jOrigem=4
sEntPla=2024-02-16 00:00:00
tConf=
tCanc=
tEmissao=
dSaida=
sDoc=
jEntSai=1
nTot_vBC=0.00
nTot_vICMS=0.00
nTot_vBCST=0.00
nTot_vST=0.00
nTot_vProd=0.00
nPorcCTR=0.00000
nTot_vFrete=0.00
nTot_vSeg=0.00
nTot_vDesc=0.00
nTot_vII=0.00
nTot_vIPI=0.00
nTot_vPIS=0.00
nTot_vCOFINS=0.00
nTot_vOutro=0.00
nTot_vNF=0.00
nTot_vFIN=0.00
nTot_vFINDesc=0.00
nTot_vTrib=0.00000
nISSQNtot_vServ=0.00
nISSQNtot_vBC=0.00
nISSQNtot_vISS=0.00
nISSQNtot_vPIS=0.00
nISSQNtot_vCOFINS=0.00
iVol_qVol=0
sVol_esp=
sVol_marca=
sVol_nVOL=
nVol_pesoL=0.000
nVol_pesoB=0.000
dEntPlaCalc=
pEmi=10
fEmi=26
sEmi0=TOTAL CENTRO DE DISTRIBUICAO INTEGRADA LTDA
sEmi1=TOTAL CENTRO DE DISTRIBUICAO INTEGRADA LTDA
sEmail0=
sEmiCNPJ=12460301000187
sEmiCPF=
pDest=72840
fDest=2
sDest0=JUSTO DO BRASIL LTDA
sDestCNPJ=42868551000200
sDestCPF=
lInativo=0
sDest1=JUSTO DO BRASIL LTDA
sDest1a=JUSTO DO BRASIL LTDA
sCNPJ=42868551000200
sCPF=
sEmail1=fernanda.barbosa@s
sDest2=JUSTO DO BRASIL LTDA
sFantaDest=JUSTO DO BRASIL LTDA
sPassaporte=
pMoe=1
fMoe=2
sMoe=REAL
sMoe0=REAL
pTOper=13
fTOper=9
sTOper=BONIFICACAO DE MERCADORIA
sTOperCod=502
pNatOper=4
sDesNatOper=BONIFICACAO
fNatOper=1
pRepCom=261
fRepCom=24
sRepComEnt=VANDERLEI S. SANT.AGATA - Z. SUL
sRepComSai=VANDERLEI S. SANT.AGATA - Z. SUL
pEmiEndPos=2
pEmiEndEnt=2
pEmiEndCob=2
fEmiEndPos=11
fEmiEndEnt=11
fEmiEndCob=11
pEmiCEPPos=660498
pEmiCEPEnt=660498
pEmiCEPCob=660498
fEmiCEPPos=1
fEmiCEPEnt=1
fEmiCEPCob=1
pEmiCidPos=4084
pEmiCidEnt=4084
pEmiCidCob=4084
fEmiCidPos=2
fEmiCidEnt=2
fEmiCidCob=2
pEmiUFPos=26
pEmiUFEnt=26
pEmiUFCob=26
fEmiUFPos=5
fEmiUFEnt=5
fEmiUFCob=5
pEmiPaisPos=1
pEmiPaisEnt=0
pEmiPaisCob=0
fEmiPaisPos=1
fEmiPaisEnt=0
fEmiPaisCob=0
sEmiPosCEP=06817175
sEmiPosLog=R ILHA DE SAO FRANCISCO
sEmiPosNr=28
sEmiPosComp=GALPAO26/78 LOT
sEmiPosBai=ESPLANADA
sEmiPosCid=EMBU DAS ARTES
sEmiPosSigla=SP
sEmiPosPais=Brasil
sEmiCEPEnt=06817175
sEmiLogEnt=R ILHA DE SAO FRANCISCO
sEmiNrEnt=28
sEmiCompEnt=GALPAO26/78 LOT
sEmiBaiEnt=ESPLANADA
sEmiCidEnt=EMBU DAS ARTES
sEmiSiglaEnt=SP
sEmiPaisEnt=
sEmiCEPCob=06817175
sEmiLogCob=R ILHA DE SAO FRANCISCO
sEmiNrCob=28
sEmiCompCob=GALPAO26/78 LOT
sEmiBaiCob=ESPLANADA
sEmiCidCob=EMBU DAS ARTES
sEmiSiglaCob=SP
sEmiPaisCob=
pDestEndPos=84303
pDestEndEnt=84303
pDestEndCob=84303
fDestEndPos=2
fDestEndEnt=2
fDestEndCob=2
pDestCEPPos=681868
pDestCEPEnt=681868
pDestCEPCob=681868
fDestCEPPos=1
fDestCEPEnt=1
fDestCEPCob=1
pDestCidPos=329
pDestCidEnt=329
pDestCidCob=329
fDestCidPos=2
fDestCidEnt=2
fDestCidCob=2
pDestUFPos=26
pDestUFEnt=26
pDestUFCob=26
fDestUFPos=5
fDestUFEnt=5
fDestUFCob=5
pDestPaisPos=1
pDestPaisEnt=1
pDestPaisCob=1
fDestPaisPos=1
fDestPaisEnt=1
fDestPaisCob=1
sDestPosCEP=02145900
sDestPosLog=AVENIDA MARIO HABERFELD
sDestPosNr=555
sDestPosComp=GALPAO02
sDestPosBai=PARQUE NOVO MUNDO
sDestPosCid=SAO PAULO                     
sDestPosSigla=SP
sDestPosPais=Brasil
sDestCEPEnt=02145900
sDestLogEnt=AVENIDA MARIO HABERFELD
sDestNrEnt=555
sDestCompEnt=GALPAO02
sDestBaiEnt=PARQUE NOVO MUNDO
sDestCidEnt=SAO PAULO                     
sDestSiglaEnt=SP
sDestPaisEnt=Brasil
sDestCEPCob=02145900
sDestLogCob=AVENIDA MARIO HABERFELD
sDestNrCob=555
sDestCompCob=GALPAO02
sDestBaiCob=PARQUE NOVO MUNDO
sDestCidCob=SAO PAULO                     
sDestSiglaCob=SP
sDestPaisCob=Brasil
lImpDtSai=0
jTpTab=0
lLCredDest=0
lLCredGrpCli=0
lCrtlRot=1
lCrtlItem=0
lGerNFe=0
lComisRep=0
jDtPlaEnt=1
jBC_Pis=0
jBC_Cofins=0
jBC_Icms=0
jBC_IPI=0
jBC_II=0
jBC_ICMSST=0
jBC_ISS=0
jVl_ICMSST=0
jVl_ICMS=0
jPriori=0
lCotas=0
lGlobal=1
lSCusto=0
lBonif=1
lBrinde=0
lComis=0
lABC=0
lACC=0
lCCusto=0
nDescFin=0.00000
lCtrlBloqFin=1
lBloqAuto=0
lFinanc=0
lCttos=0
jFrete=0
lRetira=0
lAgendamento=0
lImpTxAgenNF=0
lCPalet=0
lCanh=0
lContPrazo=0
iAnteciMax=0
iAtrasoMax=0
sObsNF=
sObsNFM=
pVeic=0
sVeic=
sPlaca=
sMarca=
iAno=
sCor=
sChassi=
sRenav=
sRNTC=
fVeic=0
pTipoVeic=0
sDescTipoVeic=
jTipoVeic=
nTotMax=
iVolMax=
iPesoMax=
jComb=
iQtEixo=
fTipoVeic=0
pTransp=0
sTransp=
fTransp=0
pPTOpED=167573
fPTOpED=1
jEmitido=1
tEmitido=
pEmitido=0
sEmitido=
tBasePrest=
pDoc=0
fDoc=0
pCC=1224
fCC=3
pAgencia=3073
fAgencia=2
sCC=13002531
sDac=1
sAgeNr=3726
sAge=Santander
pBanco=88
fBanco=1
sCodBanco=033       
sDesBanco=Banco Santander (Brasil) S.A
pContr=0
sDesContr=
sCodContr=
fContr=0
lSped=0
jClaSped=0
sIde_Serie=
lEstouroOrcamento=0
dLibEstouroOrcamento=
pLibEstouroOrcamento=0
sLibEstouroOrcamento=
lLimCred=0
dLibLimCred=
pLibLimCred=0
sLibLimCred=
sTxtSN=
pRotItinEnt=64
fRotItinEnt=2
pPRepUNeg=111289
fPRepUNeg=1
pTabPreco=0
sTab=
sCodTab=
fTabPreco=0
pGestor=0
sGestor=
nPGestor=0.00000
fGestor=0
jide_Mod=0
jide_indFinal=0
jide_indPres=0
jide_idDest=0
nTot_vICMSDeson=0.00
tISSQN_dCompet=
nISSQNtot_vDeducao=0.00
nISSQNtot_vOutro=0.00
nISSQNtot_vDescIncond=0.00
nISSQNtot_vDescCond=0.00
nISSQNtot_vISSRet=0.00
jISSQN_cRegTrib=0
nTot_vTotTrib=0.00
nVFCPUFDest=0.00000
nVICMSUFDest=0.00000
nVICMSUFRemet=0.00000
sObsFin=
lZFM=0
lZFMAbat=0
jCargaI=0
pPed=0
tIncPed=
sEmailDest=fernanda.barbosa@s
sEmail_Temp=
iTemp=0
lDevoluc=0
lTransfRem=0
lRedesp=0
lCalculado=0
lCliInativo=0
pPFinHold_Linha=0
pPFinHold=0
pHold=0
fPFinHold_Linha=0
fPFinHold=0
fHold=0
nPDescLog=0.00000
lPedAnjo=1
pOrdemGrupo=0
tCliRejeito=
pCliRejeito=0
sCliRejeito=
sMotCliRejeito=
lAmazon=0
sObsRep=
sCoringa=VANDERLEI S. SANT.AGATA - Z. SUL
sVerVAt={iVer+'/'+iVAt}
sRastro={sVerVAt+', '+sCoringa+', '+tInc}
mObsTNet={sObsTNet}
mObsNF={sObsNF}
mObsNFM={sObsNFM}
mTxtSN={sTxtSN}
mObsFin={sObsFin}
mDesContr={sDesContr}
mObsRep={sObsRep}
mMotCliRejeito={sMotCliRejeito}
pLogin=133
lEndDest=0
dEntPla={sEntPla}
aCargaI=No carregar itens - incluso manual de itens avulsos,Carregar os itens da ltima venda (Apenas itens Qt>0 e ordens confirmadas)
iPed={pPed==0 ? '' : pPed  }
sCodDest={pDest==0 ? '' : pDest}
lBloq=0

 6-sScr=  ;
Formas e Condies de Pagamento ;; fontweight='bold'; identlabel=5 ;   visible=((lFinanc==1)&&(sDDFTagApl!='Padrao_2'))
   SubGrid-1 {
      (i))                              ;                  ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 
      Forma de Pagamento                ; sFPgmto_i-30     ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; esc=('dd_files/erp_POLITICAS_ED_FPgmto.dda','Esc_Padrao_2','sFPgmto_i,pEmi,pDest,jEntSai,pTOper','pPED_FPgmto_CPgmto_i,fPED_FPgmto_CPgmto_i,sFPgmto_i,sCPgmto_i,sTipoCob_i,sCodTipoCob_i,lDefault_i,nDFin_i,pTipoCobHld_i,lBoleto_i,nVlPedCPgmto_i')
      Condio de Pagamento             ; sCPgmto_i-30     ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; editable=false ; fieldborder=0
      Desconto da Condio de Pagamento ; nDFin_i-10       ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; editable=false ; fieldborder=0
      Tipo de Cobrana                  ; sTipoCob_i-30    ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; editable=false ; fieldborder=0
                                        ; sCodTipoCob_i-30 ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; editable=false ; fieldborder=0
      Default                           ; lDefault_i       ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10 ; editable=false ; fieldborder=0
      ; ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10
      Deseja aplicar essa Condio de Pagamento ?  ; lAplicarCPgmto_i ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10
      ; ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_2')) ; identlabel=10
   }
 7-sVTS=   lBloq
   jTipo  = jEntSai
   jCargaI
   pPed  = iPed
   iVol_qVol
   sVol_esp
   sVol_marca
   sVol_nVOL
   nVol_pesoL
   nVol_pesoB
   lCalculado 
   pPRepUNeg 
   fPRepUNeg 
   lCliInativo
   sIde_Serie
   lSped
   jClaSped
   lZFM
   lZFMAbat
   lDevoluc
   lTransfRem
   lRedesp
   jide_indFinal
   jide_indPres
   jide_Mod
   pPFinHold_Linha
   pPFinHold
   pHold
   fPFinHold_Linha
   fPFinHold
   fHold
   nPDescLog
   jide_idDest
   nTot_vICMSDeson
   tISSQN_dCompet
   nISSQNtot_vDeducao
   nISSQNtot_vOutro
   nISSQNtot_vDescIncond
   nISSQNtot_vDescCond
   nISSQNtot_vISSRet
   jISSQN_cRegTrib
   nTot_vTotTrib
   nVFCPUFDest
   nVICMSUFDest
   nVICMSUFRemet
   pEmi     
   fEmi
   pDest    
   fDest    
   pMoe = 1
   fMoe
   pTOper   
   fTOper   
   jDtPlaEnt
   pGestor
   fGestor
   nPGestor
   pCC
   fCC
   pContr
   fContr
   pRotItinEnt = pRotItinEnt > 0  ? pRotItinEnt : 0
   fRotItinEnt = fRotItinEnt > 0  ? fRotItinEnt : 0
   jEmitido
   pRepCom  = pLogin
   fRepCom 
   pTabPreco 
   fTabPreco 
   pNatOper
   fNatOper
   jBC_Pis
   jBC_Cofins
   jBC_Icms
   jBC_IPI
   jBC_ICMSST
   jBC_II
   jBC_ISS
   jVl_ICMSST
   jVl_ICMS
   jPriori  
   lCotas   = lCotas  =='' ? 0 : lCotas
   lGlobal  = lGlobal =='' ? 0 : lGlobal   
   lSCusto  = lSCusto =='' ? 0 : lSCusto   
   lBonif   = lBonif  =='' ? 0 : lBonif  
   lBrinde  = lBrinde =='' ? 0 : lBrinde
   lComis   = lComis  =='' ? 0 : lComis  
   lABC     = lABC    =='' ? 0 : lABC    
   lCCusto  = lCCusto =='' ? 0 : lCCusto
   pTransp
   fTransp
   lPedAnjo
   lAmazon
   pVeic
   fVeic
   pTipoVeic
   fTipoVeic
   lContPrazo = lContPrazo=='' ? 0 : lContPrazo
   iAnteciMax
   iAtrasoMax
   jTpTab
   lLCredDest   = lLCredDest  =='' ? 0 : lLCredDest
   lLCredGrpCli = lLCredGrpCli=='' ? 0 : lLCredGrpCli
   lCrtlRot     = lCrtlRot    =='' ? 0 : lCrtlRot
   lCrtlItem    = lCrtlItem   =='' ? 0 : lCrtlItem
   lImpDtSai    = lImpDtSai   =='' ? 0 : lImpDtSai
   lComisRep    = lComisRep   =='' ? 0 : lComisRep
   lACC         = lACC        =='' ? 0 : lACC
   nDescFin      
   lCtrlBloqFin = lCtrlBloqFin=='' ? 0 : lCtrlBloqFin  
   lBloqAuto    = lBloqAuto   =='' ? 0 : lBloqAuto     
   lFinanc      = lFinanc     =='' ? 0 : lFinanc 
   lCttos       = lCttos      =='' ? 0 : lCttos 
   jFrete        
   lRetira      = lRetira     =='' ? 0 : lRetira       
   lAgendamento = lAgendamento=='' ? 0 : lAgendamento
   lImpTxAgenNF = lImpTxAgenNF=='' ? 0 : lImpTxAgenNF
   lCPalet      = lCPalet     =='' ? 0 : lCPalet   
   lCanh        = lCanh       =='' ? 0 : lCanh
   pEmiEndPos
   pEmiEndEnt
   pEmiEndCob
   pEmiCEPPos 
   pEmiCEPEnt 
   pEmiCEPCob 
   pEmiCidPos 
   pEmiCidEnt 
   pEmiCidCob 
   pEmiUFPos  
   pEmiUFEnt  
   pEmiUFCob  
   pEmiPaisPos
   pEmiPaisEnt
   pEmiPaisCob
   fEmiEndPos 
   fEmiEndEnt 
   fEmiEndCob 
   fEmiCEPPos 
   fEmiCEPEnt 
   fEmiCEPCob 
   fEmiCidPos 
   fEmiCidEnt 
   fEmiCidCob 
   fEmiUFPos  
   fEmiUFEnt  
   fEmiUFCob  
   fEmiPaisPos
   fEmiPaisEnt
   fEmiPaisCob
   pDestEndPos
   pDestEndEnt
   pDestEndCob
   pDestCEPPos
   pDestCEPEnt
   pDestCEPCob
   pDestCidPos
   pDestCidEnt
   pDestCidCob
   pDestUFPos 
   pDestUFEnt 
   pDestUFCob 
   pDestPaisPos
   pDestPaisEnt
   pDestPaisCob
   fDestEndPos
   fDestEndEnt
   fDestEndCob
   fDestCEPPos
   fDestCEPEnt
   fDestCEPCob
   fDestCidPos
   fDestCidEnt
   fDestCidCob
   fDestUFPos 
   fDestUFEnt 
   fDestUFCob 
   fDestPaisPos
   fDestPaisEnt
   fDestPaisCob
   nTot_vBC          
   nTot_vICMS        
   nTot_vBCST        
   nTot_vST          
   nTot_vProd        
   nTot_vFrete       
   nTot_vSeg         
   nTot_vDesc        
   nTot_vII          
   nTot_vIPI         
   nTot_vPIS         
   nTot_vCOFINS      
   nTot_vOutro       
   nTot_vNF          
   nISSQNtot_vServ
   nISSQNtot_vBC
   nISSQNtot_vISS
   nISSQNtot_vPIS
   nISSQNtot_vCOFINS
   nTot_vTrib
   sObsTNet = mObsTNet
   sObsRep = mObsRep
   sObsFin = mObsFin
   sObsNF = mObsNF   
   sObsNFM = mObsNFM   
   sTxtSN = mTxtSN
   sDoc
   jOrigem  
   tEmissao = tEmissao=='' ? 'now' : tEmissao
   tSaida   = dSaida
   tEntPla  = dEntPla
   tEntPlaCalc = dEntPlaCalc
   pPTOpED
   fPTOpED
   pDoc
   fDoc   
   sEmailDest
   iVer
   pOrdens_FPgmto_{i}
   pPED_FPgmto_CPgmto_{i}
   fPED_FPgmto_CPgmto_{i}
   nPorc_{i}
   d1aPrest_{i}
   lAplicarCPgmto_{i}
 8-sLblAli=Left
 9-sIncSeq=    flGrid(this.oPai,'dd_files/erp_ORDENS_CanalWeb_Itens.dda','Padrao_1a')
10-sAltSeq=
11-lAlt=1
12-sTagSubGrid=1,2
13-lPodeAlterar=1
14-sSOAMarcados=/^/
15-sRetTagScript=ScriptFormCPgmto
16-sTagSubGridRange=
17-sTagBtnTela=
--//--
Encerrado em 19/02/2024 10:59:14