Incio em 27/11/2025 17:32:14
iCount_GET=29, iCount_POST=0
Tempo 1-27/11/2025 17:32:14
psFileDDS=dd_files/erp_ORDENS_Itens.dda
sSearch=
jGetPost=0, psTipo=0, psFileDDS=dd_files/erp_ORDENS_Itens.dda, psTagDDS=Padrao_1, psAncestrais=1383722, psIrmasTias=254//2025-11-27 17:30:53/1/5/31217/0//1/0/0/0/0/0/0/0/0/0/0/0/0/0/0.00000/0.00000, psLogin=379, psTDoc=
psMnemTDoc=Ordens, psRecsPage=100, psPage=0, psOOpLogin=86, psRoot=1, sSearch=, psId=0, psCalendario=
psSlim=0, iDesenvolvedor=1, psCiaLogin=0, psMarcados=/, sInMarcados=0,0, psMarcadosPai=/1383705/, sInMarcadosPai=0,1383705,0, psVarTmp=, psCliPasta=desenvolvimento, piTimeLogin=1764274947844
sGlobal_pUNeg=, ioCaller_ChaveAtual=0, piSss=3, plMobile=0, plEchoJson=0, plEchoUtf8=0
psLogin0=, psVerQTUX=, psPesquisarFull=, psFiltrosSet=, ppChaveSalva_1=0
sVarsTxt=$jHisDB = '0';
$iPagAtrasado = '0';
$jIdioma = '0';
$sMnemProp = 'Desenvolvimento';
$jClassUser = '1';
$sProprietario = 'DESENVOLVIMENTO QTUX - Banco TQ';
$sPathDB = '/qtux/database/tq';
$sHost = '127.0.0.1';
$sPathFileSys = '/qtux/database/desenvolvimento/db_file_sys';
$sDB = 'gps_01.gdb';
$sPathAnexos = 'anexos/gps_producao';
$sSairHtml = 'index.php';
$sSubDomain = '/desenvolvimento';
$sLocalServer = '<b>Qtux ERP/GPS - LOCAWEB/SP</b>';
$sIniMailHeader = 'From: gps_master@qtux.com.br';
$sIniMailAdvisor = 'Governance Advisor';
$sPathDBCentral = '/qtux/database/gps_producao/gps_01.gdb';
$sLTokenProd = 'iH1EjVbAieeMNi5rnyCm9q2mSELvD59pJyJDlm61aB';
$sLTokenHomo = 'hL2CAZ3v1bF0Pc7yvTeiFFZcO6BUMJNPe2Fx7Dd39d';
$sIFCUser = 'ifc-TotalQui';
$sIFCPass = 'wYpJ1pd934Fk';
$sConsIFCUser = 'totalquimica';
$sConsIFCPass = 'tQfF2hr504RgC';
$sTokenRecWS = 'c8fceed6762b7df02fc065afe340018f8de2038a7daaa28bc402b728407f52e4';
$iDiasRecWS = '20';
$sChaveAPIProd = '8c418eda305cbd2810dd';
$sChaveAPIHomo = '8c418eda305cbd2810dd';
$sChaveAPLProd = 'ca20b1c0-68da-4f17-876a-8db2a3eb74a3';
$sChaveAPLHomo = 'ca20b1c0-68da-4f17-876a-8db2a3eb74a3';
$lLGI_Prod = '0';
$sVNDAXShopHostHomo_G = 'giorno.vnda.dev';
$sVNDATokenHomo_G = 'QZm8UftnhhA832dwWEzG913M';
$sVNDAURLIntHomo = 'api.sandbox.vnda.com.br/api/v2/';
$sVNDAXShopHostProd_G = 'www.giorno.com.br';
$sVNDATokenProd_G = 'S2ReKo1Ra7AMK9jQSccea5Qk';
$sVNDAURLIntProd = 'api.vnda.com.br/api/v2/';
$sChaveAPICRM = 'c2e2a4af-19ac-4049-aff1-9d008646ed13';
$sChaveAPIBrasilAberto = '3RTcEew3FeddxhDPhbBf0ZQfeo32Jg6IfLDpC5NWajt0m5j2wv6ybtcPRjayMrdO';
$sNFeCustom = 'Desenvolvimento';
$iTimeSleep = '10';
$iTimeOutSin = '3*60';
$sCanalACBR = 'Desenvolvimento';
$sPathQtux = '/qtux/samba/NFe/sinais/<sPathCia>/';
$sPathACBR = 'F:\qtux\samba\NFe\sinais\<sPathCia>\\';
$sPathEnv = '/qtux/samba/NFe/sinais/NFeEnviadas/<sPathCia>/';
$sPathEnvDesc = '/qtux/samba/NFe/sinais/<sPathCia>/Descarte/';
$sPathCanDesc = '/qtux/samba/NFe/sinais/<sPathCia>/Cancelamento/Descarte/';
$sPathCce = '/qtux/samba/NFe/sinais/<sPathCia>/Cce/';
$sPathACBREnv = 'F:\qtux\samba\NFe\sinais\NFeEnviadas\<sPathCia>\\';
$sImpressoraDanfe = '';
$lNFeAgruparLotes = '1';
$sPathERP = '/qtux/samba/NFe/sinais/QryAEnviar/';
$sPathERPEnv = '/qtux/samba/NFe/sinais/QryEnviadas/';
$sPathERPFalhou = '/qtux/samba/NFe/sinais/QryProblemas/';
$sFileLockGerarXML_Enviar = '/qtux/samba/NFe/sinais/<sPathCia>/GerarXML_Enviar.lock';
$sFileLockRecepcaoACBR = '/qtux/samba/NFe/sinais/<sPathCia>/RecepcaoACBR.lock';
$sFileLockSolicitaACBR = '/qtux/samba/NFe/sinais/<sPathCia>/SolicitaACBR.lock';
$sFileLockQryFromERP = '/qtux/samba/NFe/sinais/<sPathCia>/QryFromERP.lock';
$sPathEDICxEnt = '/qtux/samba/edi/<sCanalEDI>/cx_entrada/';
$sPathEDICxProc = '/qtux/samba/edi/<sCanalEDI>/cx_processadas/';
$sPathEDICxSai = '/qtux/samba/edi/<sCanalEDI>/cx_saida/';
$sPathEDICxProb = '/qtux/samba/edi/<sCanalEDI>/cx_problemas/';
$sPathReports1 = '/qtux/samba/reports/';
$sPathReports2 = '/qtux/samba/reports/AImprimir/';
$sImagemInd = 'logo_ind_desenvolvimento.png';
$sImagemRel = 'logo_rel_desenvolvimento.png';
$ghBase = '0';

psDSN=127.0.0.1:/qtux/database/tq/gps_01.gdb
Tempo 2-27/11/2025 17:32:14
GET['sQry']=
psQry=
psQrySum=
psQrySum2=
psVars=
psEscId=
psEscIdIrma1=
sSearch=
iDeepGrid=1
Tempo 3-27/11/2025 17:32:14
psFileDDS=dd_files/erp_ORDENS_Itens.dda
sTxt 1
sTxt=<Padrao_1>   
   sTagTit          = Tit1
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Incluir,Excluir,Alterar,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagMarcacao     = true
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1>
<Padrao_1a>   
   sTagTit          = Tit1a
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1a
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1a>
<Padrao_1b>   
   sTagTit          = Tit1b
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1b
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1b
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Alterar,Excluir,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1b>
<Padrao_1c>   
   sTagTit          = Tit1b
   sTagCpoTit       = CpoTit1c
   sTagCpo          = Cpo1c
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1b
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Alterar,Excluir,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1c>
<Padrao_1d>   
   sTagTit          = Tit1a
   sTagCpoTit       = CpoTit1d
   sTagCpo          = Cpo1d
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1d
   sTagNr0          = Nr01
   sTagTipoNr0      = TipoNr01
   sTagToolsBar     = Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1d>
<Padrao_1e>   
   sTagTit          = Tit1e
   sTagCpoTit       = CpoTit1e
   sTagCpo          = Cpo1e
   sTagSql          = Sql1e
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1a
   sTagNr0          = Nr01
   sTagTipoNr0      = TipoNr01
   sTagToolsBar     = Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1e>
<Padrao_2>   
   sTagTit          = Tit2
   sTagCpoTit       = CpoTit2
   sTagCpo          = Cpo2
   sTagSql          = Sql2
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu2
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_2>
<Padrao_3>   
   sTagTit          = Tit3
   sTagCpoTit       = CpoTit3
   sTagCpo          = Cpo3
   sTagSql          = Sql3
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Incluir,Excluir,Alterar,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault3
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_3>
<Padrao_4>   
   sTagTit          = Tit1
   sTagCpoTit       = CpoTit2
   sTagCpo          = Cpo2
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu4
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagMarcacao     = true
   sTagToolsBar     = Incluir,Excluir,Alterar,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_4>
<Padrao_5>   
   sTagTit          = Tit5
   sTagCpoTit       = CpoTit5
   sTagCpo          = Cpo5
   sTagSql          = Sql5
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu5
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_5>
<Esc_Padrao_1>
   sTagMnemTDoc     = Ordens_Itens
   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>
<Esc_Padrao_2>
   sTagMnemTDoc     = Ordens_Itens
   sTagTit          = Esc_Tit2
   sTagCpoTit       = Esc_CpoTit2
   sTagCpo          = Esc_Cpo2
   sTagSql          = Esc_Sql2
   sTagSqlEscVars   = Esc_SqlVars2
   sTagNr0          = Nr01
   sTagTipoNr0      = TipoNr01
   sTagCpoEscVars   = Esc_VarsServerToClient2
   sTagToolsBar     = Pesquisar
</Esc_Padrao_2>
<Tit1>Itens da Ordem [{this.oPai.aGrid[this.oPai.iArray][1]}]</Tit1>
<Tit1a>Itens da Ordem [{this.oPai.aGrid[this.oPai.iArray][0]}]</Tit1a>
<Tit2>Servios a Faturar da Ordem [{this.oPai.aGrid[this.oPai.iArray][2]}]</Tit2>
<Tit3>Itens do Pedido [{this.oPai.aGrid[this.oPai.iArray][2]}]</Tit3>
<Tit1b>Itens da Ordem [{this.oPai.aGrid[this.oPai.iArray][0]}]</Tit1b>
<Tit5>Detalhamentos</Tit5>
<Tit1e>Histrico de Quantidades Agendadas Parcialmente</Tit1e>
<CpoTit1>
   -l
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -s-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit1>
<Cpo1>
   'js.this.flMarcado('.$aLin["PPID"].')'
   $aLin["PPID"] .'/'. $aLin["ISERIAL"] . '<br> IS: ' . $aLin[strtoupper('pISRegFis')] . '<br> IBSUF: ' . $aLin[strtoupper('pRegFisIBS')] . '<br> IBSMun: ' . $aLin[strtoupper('pRegFisIBSMun')] . '<br> CBS: ' . $aLin[strtoupper('pRegFisCBS')]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? fsLoadTag('expcpo1') : fsLoadTag('expcpo2')
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
</Cpo1>
<CpoTit1c>
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -s-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit1c>
<Cpo1c>
   $aLin["PPID"] .'/'. $aLin["ISERIAL"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? fsLoadTag('expcpo1') : fsLoadTag('expcpo2')
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
</Cpo1c>
<Cpo1b>
   $aLin["PPID"] .'/'. $aLin["ISERIAL"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? fsLoadTag('expcpo1') : fsLoadTag('expcpo2')
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
   $aLin["PORDEM"]
   $aLin["SCODITEM"]
</Cpo1b>
<CpoTit2>
   -l-20
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-n-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-n-12-5
   -s-12-5       ; 
   Vl.Total-n-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit2>
<Cpo2>
   'js.this.flMarcado('.$aLin["PPID"].')'
   $aLin["PPID"]                                       
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? fsLoadTag('expcpo1') : fsLoadTag('expcpo2')
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   $aLin["NPRBRUTO"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   $aLin["NPROD_VPROD"]
   $aLin["PPID"]
   'js.this.flMarcadosIgualAoOriginal('.$aLin["PITEM"].')'
</Cpo2>
<CpoTit1d>
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -s-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit1d>
<Cpo1d>
   $aLin["PPID"] .'/'. $aLin["ISERIAL"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
   fsLoadTag('expcpo3') 
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
</Cpo1d>
<CpoTit1e>
   Pedido-s-10
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -s-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit1e>
<Cpo1e>
   $aLin["PORDEM"]
   $aLin["PPID"] .'/'. $aLin["ISERIAL"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
   fsLoadTag('expcpo2') 
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
</Cpo1e>
<expcpo1>
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>'
</expcpo1>
<expcpo2>
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
</expcpo2>
<expcpo3>
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_">
       <tr>
          <td style="text-align: left"><b>Qt Origem</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td>
          <td><b>' . number_format($aLin["NQTAGE"],5,",",".") . '</b></td>
       </tr>
       <tr>
          <td style="text-align: left"><b>Saldo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td>
          <td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td>
       </tr>
    </table>'
</expcpo3>
<Sql1>
   select a.iSerial,
          a.jTipo,
          a.pPId,
          a.pOrdem,
          a.nQt,
          a.nQtRes,
          a.nQtLib,
          a.nQtEnt,
          a.nQtOP,
          a.nQtCanc,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.jProd_indTot,
          a.jOrig,
          a.nPrBruto,
          b.sCodigo     sCodItem,
          b.sDescricao  sItem,
          c.sCodigo    sCodUni,
          c.sUnidade   sDesUni,
          c.jDec,
          a.nQtAge,
          a.nProd_vFrete,
          a.nProd_vSeg,
          a.nProd_vOutro,
          a.pMoe,
          k.sDescricao      sMoe,
          a.fMoe,
          a.nQtMoe,
          a.jCam,
          a.pCam,
          a.fCam,
          kk1.sDescricao  sMoeCambio,
          a.nCam,
          a.sCam,
          a.nVDescTpED,
          a.nVDescTpEDG,
          a.nVEncFinTpED,
          a.nVDescInc,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          d.jTipo jEntSai,
          a.pISRegFis,
          a.pRegFisIBS,
          a.pRegFisIBSMun,
          a.pRegFisCBS,
          a.pItem
   from Ordens_Itens  a    left join Moeda         k   on a.pMoe    = k.pPId   and k.iVer   = k.iVAt
                           left join Cambio        kk  on a.pCam    = kk.pPId  and kk.iVer  = kk.iVAt
                           left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and kk1.iVer = kk1.iVAt
                           left join NCM           g   on a.pNCM    = g.pPId   and g.iVer   = a.fNCM
                           left join UnidadeMedida c   on a.pUni   = c.pPId and c.iVer  = c.iVAt,
        Itens         b,
        Ordens        d
   where a.lExc   = 0  
     and a.iVer   = a.iVAt
     and a.pOrdem = {ChaveAtual_1}
     and a.pOrdem = d.pPId and d.iVer  = d.iVAt
     and a.pItem  = b.pPId and b.iVer  = a.fItem
   order by a.iSerial
</Sql1>
<Sql1e>
   select a.iSerial,
          a.jTipo,
          a.pPId,
          a.pOrdem,
          a.nQt,
          a.nQtRes,
          a.nQtLib,
          a.nQtEnt,
          a.nQtOP,
          a.nQtCanc,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.jProd_indTot,
          a.jOrig,
          a.nPrBruto,
          b.sCodigo     sCodItem,
          b.sDescricao  sItem,
          c.sCodigo    sCodUni,
          c.sUnidade   sDesUni,
          c.jDec,
          a.nQtAge,
          a.nProd_vFrete,
          a.nProd_vSeg,
          a.nProd_vOutro,
          a.pMoe,
          k.sDescricao      sMoe,
          a.fMoe,
          a.nQtMoe,
          a.jCam,
          a.pCam,
          a.fCam,
          kk1.sDescricao  sMoeCambio,
          a.nCam,
          a.sCam,
          a.nVDescTpED,
          a.nVDescTpEDG,
          a.nVEncFinTpED,
          a.nVDescInc,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          d.jTipo jEntSai,
          a.pItem
   from Ordens_Itens  a    left join Moeda         k   on a.pMoe    = k.pPId   and k.iVer   = k.iVAt
                           left join Cambio        kk  on a.pCam    = kk.pPId  and kk.iVer  = kk.iVAt
                           left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and kk1.iVer = kk1.iVAt
                           left join NCM           g   on a.pNCM    = g.pPId   and g.iVer   = a.fNCM
                           left join UnidadeMedida c   on a.pUni   = c.pPId and c.iVer  = c.iVAt,
        Itens         b,
        Ordens        d
   where a.lExc   = 0  
     and a.iVer   = a.iVAt
     and a.pOSaIAgePai = {ChaveAtual_1}
     and a.pOrdem = d.pPId and d.iVer  = d.iVAt
     and a.pItem  = b.pPId and b.iVer  = a.fItem
   order by a.iSerial
</Sql1e>
<CpoTit2>
   -l
   Codigo-s-30            ; b.sCodigo
   Servio-s-30           ; b.sDescricao
</CpoTit2>
<Cpo2>
   'js.this.flMarcado('.$aLin["PPID"].')'
   $aLin["SCODIGO"]
   $aLin["SDESCRICAO"]
   $aLin["PPID"]
</Cpo2>
<Sql2>
   select a.pPId,
          b.sCodigo,
          b.sDescricao,
          a.pItem
   from Ordens_Itens  a,
        Itens         b
   where a.lExc   = 0  
     and a.iVer   = a.iVAt
     and a.pOrdem = {ChaveIrma_1_12}
     and a.pItem  = b.pPId and b.iVer = a.fItem
   order by b.sCodigo
</Sql2>
<CpoTit3>
   -p-10
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   Vl.Total-n-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit3>
<Cpo3>
   $aLin["PPID"]                                       
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? fsLoadTag('expcpo1') : fsLoadTag('expcpo2')
   number_format($aLin["NPROD_VPROD"],5,",",".")
   $aLin["NPROD_VPROD"]
   $aLin["PPID"]
   $aLin["PITEM"]
</Cpo3>
<Sql3>
   select a.iSerial,
          a.jTipo,
          a.pPId,
          a.nQt,
          a.pItem,
          a.nQtEnt,
          a.nQtOP,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.jProd_indTot,
          a.jOrig,
          a.nPrBruto,
          b.sCodigo     sCodItem,
          b.sDescricao  sItem,
          c.sCodigo    sCodUni,
          c.sUnidade   sDesUni,
          c.jDec,
          a.nProd_vFrete,
          a.nProd_vSeg,
          a.nProd_vOutro,
          a.pMoe,
          k.sDescricao      sMoe,
          a.fMoe,
          a.nQtMoe,
          a.jCam,
          a.pCam,
          a.fCam,
          kk1.sDescricao  sMoeCambio,
          a.nCam,
          a.sCam,
          a.nVDescTpED,
          a.nVDescTpEDG,
          a.nVEncFinTpED,
          a.nVDescInc,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          d.jTipo jEntSai
   from Ordens_Itens  a    left join Moeda         k   on a.pMoe    = k.pPId   and k.iVer   = k.iVAt
                           left join Cambio        kk  on a.pCam    = kk.pPId  and kk.iVer  = kk.iVAt
                           left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and kk1.iVer = kk1.iVAt
                           left join NCM           g   on a.pNCM    = g.pPId   and g.iVer   = a.fNCM
                           left join UnidadeMedida c   on a.pUni     = c.pPId and c.iVer  = c.iVAt,
        Itens         b,
        Ordens        d
   where a.lExc   = 0  
     and a.iVer   = a.iVAt
     and a.pOrdem = {ChaveAtual_1}
     and a.pOrdem = d.pPId and d.iVer  = d.iVAt
     and a.pItem  = b.pPId and b.iVer  = a.fItem
     and a.pUni   = c.pPId and c.iVer  = c.iVAt
   order by a.iSerial
</Sql3>
<Sql4>
   select a.iSerial,
          a.jTipo,
          a.pPId,
          a.nQt,
          a.nQtRes,
          a.nQtLib,
          a.nQtEnt,
          a.nQtOP,
          a.nQtCanc,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.jProd_indTot,
          a.jOrig,
          a.nPrBruto,
          b.sCodigo     sCodItem,
          b.sDescricao  sItem,
          c.sCodigo    sCodUni,
          c.sUnidade   sDesUni,
          c.jDec,
          a.nProd_vFrete,
          a.nProd_vSeg,
          a.nProd_vOutro,
          a.pMoe,
          k.sDescricao      sMoe,
          a.fMoe,
          a.nQtMoe,
          a.jCam,
          a.pCam,
          a.fCam,
          kk1.sDescricao  sMoeCambio,
          a.nCam,
          a.sCam,
          a.nVDescTpED,
          a.nVDescTpEDG,
          a.nVEncFinTpED,
          a.nVDescInc,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          d.jTipo jEntSai,
          a.pItem
   from Ordens_Itens  a    left join Moeda         k   on a.pMoe    = k.pPId   and k.iVer   = k.iVAt
                           left join Cambio        kk  on a.pCam    = kk.pPId  and kk.iVer  = kk.iVAt
                           left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and kk1.iVer = kk1.iVAt
                           left join NCM           g   on a.pNCM    = g.pPId   and g.iVer   = a.fNCM
                           left join UnidadeMedida c   on a.pUni   = c.pPId and c.iVer  = c.iVAt,
        Itens         b,
        Ordens        d
   where a.lExc   = 0  
     and a.iVer   = a.iVAt
     and a.pOrdem = {ChaveAtual_1}
     and a.pOrdem = d.pPId and d.iVer  = d.iVAt
     and a.pItem  = b.pPId and b.iVer  = a.fItem
   order by a.iSerial
</Sql4>
<CpoTit5>
   Ordem-p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -n-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -n-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -n-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit5>
<Cpo5>
   $aLin["PORDEM"] 
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? fsLoadTag('expcpo1') : fsLoadTag('expcpo2')
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
</Cpo5>
<Sql5>
   select a.iSerial,
          a.pOrdem,
          a.jTipo,
          a.pPId,
          a.nQt,
          a.nQtRes,
          a.nQtLib,
          a.nQtEnt,
          a.nQtOP,
          a.nQtCanc,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.jProd_indTot,
          a.jOrig,
          a.nPrBruto,
          b.sCodigo     sCodItem,
          b.sDescricao  sItem,
          c.sCodigo    sCodUni,
          c.sUnidade   sDesUni,
          c.jDec,
          a.nProd_vFrete,
          a.nProd_vSeg,
          a.nProd_vOutro,
          a.pMoe,
          k.sDescricao      sMoe,
          a.fMoe,
          a.nQtMoe,
          a.jCam,
          a.pCam,
          a.fCam,
          kk1.sDescricao  sMoeCambio,
          a.nCam,
          a.sCam,
          a.nVDescTpED,
          a.nVDescTpEDG,
          a.nVEncFinTpED,
          a.nVDescInc,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          d.jTipo jEntSai,
          a.pItem
   from  ORDENS_Consolidar_Detalhamentos   aa  join Ordens_Itens  a   on aa.pItem  = a.pItem  and a.iVer   = a.iVAt and a.lExc = 0 and a.pOrdem = aa.pOrdemDet
                                               join Itens         b   on a.pItem   = b.pPId   and b.iVer   = a.fItem
                                               join Ordens        d   on a.pOrdem  = d.pPId   and d.iVer   = d.iVAt
                                          left join Moeda         k   on a.pMoe    = k.pPId   and k.iVer   = k.iVAt
                                          left join Cambio        kk  on a.pCam    = kk.pPId  and kk.iVer  = kk.iVAt
                                          left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and kk1.iVer = kk1.iVAt
                                          left join NCM           g   on a.pNCM    = g.pPId   and g.iVer   = a.fNCM
                                          left join UnidadeMedida c   on a.pUni    = c.pPId and c.iVer     = c.iVAt
   where aa.lExc   = 0  
     and aa.iVer   = aa.iVAt
     and aa.pOrdemConsol = {ChaveIrma_1_0}
     and b.sCodigo = '{ChaveIrma_1_1}'
   order by a.iSerial
</Sql5>
<Pesquisar1>
   ((upper(b.sCodigo) like '%{p0}%') or (upper(b.sDescricao) like '%{p0}%') or (upper(g.sCodigo) like '%{p0}%') or (upper(g.sDescricao) like '%{p0}%'))
</Pesquisar1>
<Menu1>
   main1 ; Alterar Valor [UN] Bruto (marcados)   ; flRangeProcesso("dd_files/erp_ORDENS_Itens_AltPrecoMarcados.dda","Processo_1","processos/ORDENS_Itens_AltPrecoMarcados.php",this.oPai)
   main1 ; CTR                                   ; flGrid(this.oPai,'dd_files/erp_ORDENS_Itens_CTR.dda','Padrao_2')
   main1 ; Tabela de Preo                       ; flGrid(this.oPai,'dd_files/erp_POLITICAS_TabPrecos_Itens.dda','Padrao_3')
   main1 ; Tabela de Preo Promocional           ; flGrid(this.oPai,'dd_files/erp_POLITICAS_TabPrecos_ExcTQ_GrpPromo.dda','Padrao_2')
</Menu1>
<Menu1a>
</Menu1a>
<Menu1b>
   main1 ; Detalhamento dos Itens          ; flGrid(this.oPai,'dd_files/erp_ORDENS_Itens.dda','Padrao_5')
</Menu1b>
<Menu1d>
   main1 ; Histrico de Quantidades Agendadas Parcialmente  ; flGrid(this.oPai,'dd_files/erp_ORDENS_Itens.dda','Padrao_1e')
</Menu1d>
<Menu2>
   main1 ; Anexar Servios marcados ; flCallSysPOP(1219,this.oPai,'',this.oPai.fiChaveAtual())
</Menu2>
<Menu4>
   main1 ; Gerar Recebimento Fragmentado    ;  flCallSysPOP(1138,this.oPai,'Gerar Recebimento dos itens marcados?'   ,this.oPai.fiChaveAtual())
   main1 ; Excluir Itens Marcados           ;  flCallSysPOP(1014,this.oPai,'Excluir Itens Marcados?'   ,this.oPai.fiChaveAtual())
</Menu4>
<Menu5>
</Menu5>
<Nr01>alert("Qtux-Dialog\n\nNada a relacionar ...")</Nr01>
<Nr02>oGrid.flGridInc()</Nr02>
<TipoNr01>0</TipoNr01>
<TipoNr02>1</TipoNr02>
<Esc_Tit1>Item: [{p5}]  -  Qt: [{p4}]  -  Un: [{p3}] </Esc_Tit1>
<Esc_CpoTit1>
   Ordem Id-i-10
   Unidade da Ordem-s-30
   Saldo da Ordem-n-18-5
   Fator-n-18-5
   Saldo Convertido-n-18-5      
</Esc_CpoTit1>
<Esc_Cpo1>
   $aLin["PORDEM"]
   $aLin["SUNIORDEM"]
   $aLin["NQTPEND"]
   $aLin["PUNIORDEM"]==$aLin["PUNIPRENF"] ? 1  :($aLin["NFATOR"]==0 ? 'Sem Fator' : $aLin["NFATOR"])
   $aLin["PUNIORDEM"]==$aLin["PUNIPRENF"] ? $aLin["NQTPEND"] : $aLin["NQTPEND2"]
   $aLin["PPID"]
</Esc_Cpo1>
<Esc_Sql1>
   select  a.pPId,
           a.pOrdem,
           d.sCodigo    sCodItem,
           d.sDescricao sItem,
           e.pPId       pUniOrdem,
           e.sUnidade   sUniOrdem,
           f.pPId       pUniPreNF,
           f.sUnidade   sUniRFis,
           g.nFator,  
           g.nFator*(a.nQt-a.nQtEnt) nQtPend2,
          (a.nQt-a.nQtEnt) nQtPend
   from Ordens_Itens      a,
        Ordens            b,
        PreNF             c,
        Itens             d,
        UnidadeMedida     e  left join Conversao_UnidadeMedida g on  g.iver=g.ivat and ((g.pUni1 = e.pPId and g.pUni2 = {p2}) or (g.pUni1 = {p2} and g.pUni2 =  e.pPId)),
        UnidadeMedida     f
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pItem   = {p1}
     and a.pItem   = d.pPId and d.iVer = a.fItem
     and a.pUni    = e.pPId and e.iVer = e.iVAt
     and f.pPId    = {p2}   and f.iVer = f.iVAt
     and a.pOrdem  = b.pPId and b.iVer = b.iVAt
     and b.jTipo   = 0
     and b.tConf   is not null
     and c.pPId    = {ChaveAtual_2} and c.iVer = c.iVAt
     and b.pDest   = c.pDest
     and b.pEmi    = c.pEmi
     and (a.nQt-a.nQtEnt) > 0
     and a.lBaixa  = 0
   order by pOrdem
</Esc_Sql1>
<Esc_SqlVars1>
   select a.pPId,
          a.iVer,
          a.pOrdem
   from Ordens_Itens    a
   where a.pPId = {pEscId}
     and a.iVer = a.iVAt
</Esc_SqlVars1>
<Esc_VarsServerToClient1>
   $aLin["PPID"]
   $aLin["IVER"]
   $aLin["PORDEM"]
</Esc_VarsServerToClient1>
<Esc_Tit2>Itens da Ordem, resultado da busca por [{p0}]</Esc_Tit2>
<Esc_CpoTit2>
   Ordem Id-i-10
   No. Doc Origem-s-20
   Cdigo-s-20
   Item-s-50
   Saldo a Produzir-n-18-5
</Esc_CpoTit2>
<Esc_Cpo2>
   $aLin["PORDEM"]
   $aLin["SDOC"]
   $aLin["SCODITEM"]
   $aLin["SITEM"]
   $aLin["NSDOPROD"]
   $aLin["PPID"]
</Esc_Cpo2>
<Esc_Sql2>
   select  a.pPId,
           a.pOrdem,
           b.sDoc,
           d.sCodigo    sCodItem,
           d.sDescricao sItem,
           a.nQt-a.nQtOP nSdoProd
   from Ordens_Itens      a,
        Ordens            b,
        Itens             d
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and b.pDest   = {p1}
     and b.pEmi    = {p2}
     and a.pItem   = d.pPId and d.iVer = d.iVAt
     and a.pOrdem  = b.pPId and b.iVer = b.iVAt
     and b.jTipo   = 1
     and b.tConf is null
   order by pOrdem
</Esc_Sql2>
<Esc_SqlVars2>
   select  a.pPId,
           a.iVer,
           a.iVAt,
           b.sDoc,
           a.pOrdem,
           a.pItem,
           a.fItem,
           d.sCodigo    sCodItem,
           d.sDescricao sItem,
           c.sCodigo sUnProd,
           d.pRegDepProd,
           e3.sUFis sUn1Prod,
           f3.sUFis sUn2Prod,
           g3.sUFis sUn3Prod,
           h3.sUFis sUn4Prod,
           i3.sUFis sUn5Prod,
           j3.sUFis sUn6Prod,
           k3.sUFis sUn7Prod,
           l3.sDescricao sInsProd
   from Ordens_Itens      a,
        Ordens            b,
        Itens             d   left join EST_RegDepositos  o on d.pRegDepProd  = o.pPId  and  o.iVer =  o.iVAt
                              left join EST_Depositos     r on o.pDep         = r.pPId  and  r.iVer =  r.iVAt
                              left join UFis             e3 on r.pUFis        = e3.pPId and e3.iVer = e3.iVAt
                              left join UFis             f3 on e3.pParent     = f3.pPId and f3.iVer = f3.iVAt
                              left join UFis             g3 on f3.pParent     = g3.pPId and g3.iVer = g3.iVAt
                              left join UFis             h3 on g3.pParent     = h3.pPId and h3.iVer = h3.iVAt
                              left join UFis             i3 on h3.pParent     = i3.pPId and i3.iVer = i3.iVAt
                              left join UFis             j3 on i3.pParent     = j3.pPId and j3.iVer = j3.iVAt
                              left join UFis             k3 on j3.pParent     = k3.pPId and k3.iVer = k3.iVAt
                              left join EST_Instancias   l3 on  o.pIns        = l3.pPId and l3.iVer = l3.iVAt
                              left join UnidadeMedida     c on  d.pUnProd     = c.pPId  and c.iVer=c.iVAt
   where a.pPId = {pEscId}
     and a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pItem   = d.pPId and d.iVer = d.iVAt
     and a.pOrdem  = b.pPId and b.iVer = b.iVAt
     and b.jTipo   = 1
   order by pOrdem
</Esc_SqlVars2>
<Esc_VarsServerToClient2>
   $aLin["PPID"]
   $aLin["IVER"]
   $aLin["PITEM"]
   $aLin["FITEM"]
   $aLin["SCODITEM"]
   $aLin["SITEM"]
   $aLin["SUNPROD"]
   $aLin["PREGDEPPROD"]
   $aLin["SUN1PROD"]
   $aLin["SUN2PROD"]
   $aLin["SUN3PROD"]
   $aLin["SUN4PROD"]
   $aLin["SUN5PROD"]
   $aLin["SUN6PROD"]
   $aLin["SUN7PROD"]
   $aLin["SINSPROD"]
   $aLin["PORDEM"]
   $aLin["SDOC"]
</Esc_VarsServerToClient2>
<TelaTit1>
   Ficha da Linha da Ordem 
</TelaTit1>
<DbToVars1> 
   select a.tInc,
          a.iVer,
          a.iVAt,
          a.pPId,
          a.iSerial,
          a.nQt,
          a.nQt nQtPed,
          a.nQtRes,
          a.nQtEnt,
          a.nQtLib,
          a.nQtFat,
          a.nQtCanc,
          (a.nQt-a.nQtEnt-a.nQtCanc) nQtPend,
          a.nQtCarga,         
          a.lBaixa,
          a.pRegFis,
          a.fRegFis,
          a.pNeg,
          a.fNeg,
          a.pTab,
          r.sCodigo     sCodTab,
          r.sDescricao  sDesTab,
          a.fTab,
          a.pTabI,
          a.fTabI,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.nProd_vFrete,
          a.nVMLE,
          a.nProd_vSeg,
          a.nProd_vDesc,
          a.nProd_vOutro,
          a.jProd_indTot,
          a.sDI_nDI,               
          a.dDI_dDI,                
          a.sDI_xLocDesemb,        
          a.sDI_UFDesemb,           
          a.dDI_dDesemb,             
          a.sDI_cExportador,
          a.iAdi_nAdicao,          
          a.iAdi_nSeqAdic,         
          a.sAdi_cFabricante,      
          a.nAdi_vDescDI,          
          a.sAdi_xPed,             
          a.iAdi_nItemPed,
          a.nCIDE_qBCprod, 
          a.nCIDE_vAliqProd,
          a.nCIDE_vCIDE,
          a.jICMS_GrupoTrib,
          a.jICMS_orig,
          a.jICMS_modBC,
          a.nICMS_vBC,
          a.nICMS_pICMS,
          a.nICMS_vICMS,
          a.jICMS_modBCST,
          a.nICMS_pMVAST,
          a.nICMS_pRedBCST,
          a.nICMS_vBCST,
          a.nICMS_pICMSST,
          a.nICMS_vICMSST,
          a.nICMS_pRedBC,
          a.jICMS_motDesICMS,
          a.nICMS_vBCSTRet,
          a.nICMS_vICMSSTRet,
          a.jICMSPart_orig,
          a.jICMSPart_CST,
          a.jICMSPart_modBC,
          a.nICMSPart_vBC,
          a.nICMSPart_pRedBC,
          a.nICMSPart_pICMS,
          a.nICMSPart_vICMS,
          a.jICMSPart_modBCST,
          a.nICMSPart_pMVAST,
          a.nICMSPart_pRedBCT,
          a.nICMSPart_vBCST,
          a.nICMSPart_pICMSST,
          a.nICMSPart_vICMSST,
          a.nICMSPart_pBCOp,
          a.sICMSPart_UFST,
          a.jICMSST_orig,
          a.jICMSST_CST,
          a.nICMSST_vBCSTRet,
          a.nICMSST_vICMSSTRe,
          a.nICMSST_vBCSTDest,
          a.nICMSST_vICMSSTDes,
          a.jGrupo_simples,    
          a.jICMSSN_Orig,
          a.jICMSSN_CSOSN,
          a.nICMSSN_pCredSN,
          a.nICMSSN_vCredICMSSN,
          a.jICMSSN_modBCST,
          a.nICMSSN_pMVAST,
          a.nICMSSN_pRedBCST,
          a.nICMSSN_vBCST,
          a.nICMSSN_pICMSST,
          a.nICMSSN_vICMSST,
          a.nICMSSN_vBCSTRet,
          a.nICMSSN_vICMSSTRet,
          a.jICMSSN_modBC,
          a.nICMSSN_vBC,
          a.nICMSSN_pRedBC,
          a.nICMSSN_pICMS,
          a.nICMSSN_vICMS,
          a.sIPI_clEnq,
          a.sIPI_CNPJProd,
          a.sIPI_cSelo,
          a.nIPI_qSelo,
          a.sIPI_cEnq,
          a.jIPINT_CST,
          a.nIPITrib_vBC,
          a.nIPITrib_pIPI,
          a.nIPITrib_qUnid,
          a.nIPITrib_vUnid,
          a.nIPITrib_vIPI,
          a.nII_vBC,
          a.nII_vDespAdu,
          a.nII_vII,
          a.nII_vIOF,
          a.jPIS_CST,  
          a.nPIS_vBC,
          a.nPIS_pPIS,
          a.nPIS_vPIS,
          a.nPIS_qBCProd, 
          a.nPIS_vAliqProd, 
          a.nPISST_vBC,
          a.nPISST_pPIS,
          a.nPISST_qBCProd,
          a.nPISST_vAliqProd,
          a.nPISST_vPIS,
          a.jCOFINS_CST,
          a.nCOFINS_vBC,
          a.nCOFINS_pCOFINS,
          a.nCOFINS_vCOFINS,
          a.nCOFINS_qBCProd,
          a.nCOFINS_vAliqProd,
          a.nCOFINSST_vBC,
          a.nCOFINSST_pCOFINS,
          a.nCOFINSST_qBCProd,
          a.nCOFINSST_vAliqProd,
          a.nCOFINSST_vCOFINS,
          a.nISSQN_vBC,
          a.nISSQN_vAliq,
          a.nISSQN_vISSQN,
          a.nISSQN_cMunFG,
          a.nISSQN_cListServ,
          a.jISSQN_cSitTrib,
          a.sInfAdProd,
          a.jTipo,
          a.tEntPla,
          a.tEmissao,
          a.tSaida,
          a.pItem,
          a.fItem,
          c.sCodigo     sRegCodItem,
          c.sDescricao  sRegDesItem,
          c.sCodigo     sNegCodItem,
          c.sDescricao  sNegDesItem,
          c.sCodigo     sTabCodItem,
          c.sDescricao  sTabDesItem,
          n.sCEST,
          c.lLote  iLote,
          a.pUni,
          a.fUni,
          e.sCodigo      sCodUni,
          e.sUnidade    sUni,
          a.pNCM,   
          a.fNCM,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          a.pCFO,   
          a.fCFO,
          h.sCodigo     sCodCFO,
          h.sAbrev,
          a.pLote,
          ii.sDescricao  sDesLote,
          a.fLote,
          a.jFDiasEnt,
          a.iDiasInf,
          a.iDiasCalc,
          a.lInspecao,
          a.nDesc,
          a.pIPIRegFis,
          a.pICMSRegFis,        
          a.pICMSSNRegFis,        
          a.pICMSPartRegFis,        
          a.pICMSSTRetRegFis,
          a.pISSQNRegFis,       
          a.pIRPJRegFis,        
          a.pCofinsRegFis,      
          a.pPISRegFis,         
          a.pCofinsSTRegFis,    
          a.pPISSTRegFis,       
          a.pIIRegFis,
          a.fIIRegFis,
          a.fIPIRegFis,         
          a.fICMSRegFis,        
          a.fICMSSNRegFis,        
          a.fICMSPartRegFis,        
          a.fICMSSTRetRegFis,
          a.fISSQNRegFis,       
          a.fIRPJRegFis,        
          a.fCofinsRegFis,      
          a.fPISRegFis,         
          a.fCofinsSTRegFis,    
          a.fPISSTRegFis,       
          a.pPTOpEDItem,
          a.fPTOpEDItem,
          a.pPTOpEDGrpItem,
          a.fPTOpEDGrpItem,
          a.nPrBruto,
          a.nPDescCP,     
          a.nVDescCP,     
          a.nPDescTpED,   
          a.nVDescTpED,   
          a.nVEncFinTpED,   
          a.nPDescTpEDG,  
          a.nVDescTpEDG,  
          a.nPDescInc,    
          a.nVDescInc,    
          a.nProd_pDesc,  
          a.pMoe,    
          k.sDescricao      sMoe,
          a.fMoe,    
          a.nQtMoe,  
          a.jCam,
          a.pCam,
          a.fCam,    
          kk1.sDescricao  sMoeCambio,
          a.nCam,    
          a.sCam,    
          a.lCCusto,
          a.lCrtlItem,
          a.jOrig,
          a.jBC_II,
          a.jBC_IPI,
          a.jBC_ICMS,
          a.jBC_ICMSST,
          a.jBC_PIS,
          a.jBC_COFINS,
          a.jBC_ISS,
          a.jVl_ICMSST,
          a.jVl_ICMS,
          a.nBC_II,
          a.nBC_IPI,
          a.nBC_ICMS,
          a.nBC_ICMSST,
          a.nBC_PIS,
          a.nBC_COFINS,
          a.nBC_ISS,
          a.nVl_ICMSST,
          a.nVl_ICMS,
          a.nICMS_vICMSSubstituto,
          a.nICMS_pRedBCEfet,
          a.nICMS_vBCEfet,
          a.nICMS_pICMSEfet,
          a.nICMS_vICMSEfet,
          a.nICMS_vICMSSTRet,
          a.nPEncFinTpED,
          a.nQtMin,     
          a.nQtMax,      
          a.nPrecoMin,  
          a.nPrecoMax,   
          a.lContQua,    
          a.lContPreco,  
          a.iCiclo,      
          a.iCicloAtual, 
          a.jTempo,      
          a.lSkipLote,
          a.pRegDepVen,
          a.fRegDepVen,
          b1.pDep,
          bb.pUFis,
          e1.sUFis      sUn1,
          f1.sUFis      sUn2,
          g1.sUFis      sUn3,
          h1.sUFis      sUn4,
          i1.sUFis      sUn5,
          j1.sUFis      sUn6,
          k1.sUFis      sUn7,
          l1.sDescricao sIns,
          c1.sCodigo    sUnidade,
          a.pRegDepRFis,
          a.fRegDepRFis,
          b2.pDep       pDepRFis,
          bbb.pUFis      pUFisRFis,
          e2.sUFis      sUn1RFis,
          f2.sUFis      sUn2RFis,
          g2.sUFis      sUn3RFis,
          h2.sUFis      sUn4RFis,
          i2.sUFis      sUn5RFis,
          j2.sUFis      sUn6RFis,
          k2.sUFis      sUn7RFis,
          l2.sDescricao sInsRFis,
          c2.sCodigo    sUnidadeRFis,
          a.pRegDepTransf,
          a.fRegDepTransf,
          b3.pDep        pDepTransf,
          bb3.pUFis      pUFisTransf,
          e3.sUFis       sUnTransf1,
          f3.sUFis       sUnTransf2,
          g3.sUFis       sUnTransf3,
          h3.sUFis       sUnTransf4,
          i3.sUFis       sUnTransf5,
          j3.sUFis       sUnTransf6,
          k3.sUFis       sUnTransf7,
          l3.sDescricao  sInsTransf,
          m3.sCodigo     sUnidadeTransf,
          a.lImport,
          a.lImposImpor,
          a.lAdicoes,
          a.lCIDE,   
          a.lICMS_ST,    
          a.lICMS_P,   
          a.lICMS_RR,   
          a.lICMS_SN,
          a.lIPI,       
          a.lPIS,    
          a.lPIS_ST,    
          a.lCofins, 
          a.lCofins_ST,
          a.lISSQN,
          a.lTranspFiscal,
          a.sFCI,
          a.jFinalidade,
          a.nAliqTranspImport,
          a.nAliqTranspNac,
          a.nTot_vTrib,
          a.jDI_tpViaTransp,
          a.nDI_vAFRMM,
          a.jDI_tpIntermedio,
          a.sDI_CNPJ,
          a.sDI_UFTerceiro,
          a.nImp_vTotTrib,
          a.nICMS_vICMSDeson,
          a.nICMS_vICMSOp,
          a.nICMS_pDif,
          a.nICMS_vICMSDif,
          a.nISSQN_vDeducao,
          a.nISSQN_vOutro,
          a.nISSQN_vDescIncond,
          a.nISSQN_vDescCond,
          a.nISSQN_vISSRet,
          a.jISSQN_indISS,
          a.sISSQN_cServico,
          a.sISSQN_nProcesso,
          a.lISSQN_indIncentivo,
          a.pISSQN_cServico,
          m.sCodigo       sISSQN_cServico,
          m.sDescricao    sISSQN_sServico,
          a.fISSQN_cServico,
          a.pISSQN_cMun,
          j.sCidade   sISSQN_sMun,
          j.iIBGE     sISSQN_cMun,
          a.pISSQN_cPais,
          l.sDescricao  sISSQN_sPais,
          l.sCodigo     sISSQN_cPais,
          a.fISSQN_cMun,
          a.fISSQN_cPais,
          a.nVBCUFDest,
          a.nPFCPUFDest,
          a.nPICMSUFDest,
          a.nPICMSInter,
          a.nPICMSInterPart,
          a.nVFCPUFDest,
          a.nVICMSUFDest,
          a.nVICMSUFRemet,
          a.pMotAltPed,
          s.sCodigo     sCodMotAltPed,
          s.sDescricao  sDesMotAltPed,
          s.sCodigo     sCodMotAltPe2,
          s.sDescricao  sDesMotAltPe2,
          a.fMotAltPed,
          a.pTabGrpP,  
          a.fTabGrpP,  
          a.pTabGrpPI,
          a.fTabGrpPI,
          a.lRE,
          a.lIPI_RE,
          a.lIPI_UT,
          a.tUltInsp  dUltInsp,
          a.pInsp,
          a.fInsp,
          a.pDepInsp,
          a.fDepInsp,
          e4.sUFis sUn1Insp,
          f4.sUFis sUn2Insp,
          g4.sUFis sUn3Insp,
          h4.sUFis sUn4Insp,
          i4.sUFis sUn5Insp,
          j4.sUFis sUn6Insp,
          k4.sUFis sUn7Insp,
          a.pDepReje,
          a.fDepReje,
          e5.sUFis sUn1Reje,
          f5.sUFis sUn2Reje,
          g5.sUFis sUn3Reje,
          h5.sUFis sUn4Reje,
          i5.sUFis sUn5Reje,
          j5.sUFis sUn6Reje,
          k5.sUFis sUn7Reje,
          a.pDepEnt,
          e6.sUFis sUn1Ent,
          f6.sUFis sUn2Ent,
          g6.sUFis sUn3Ent,
          h6.sUFis sUn4Ent,
          i6.sUFis sUn5Ent,
          j6.sUFis sUn6Ent,
          k6.sUFis sUn7Ent,
          a.pInsEnt,
          l6.sDescricao sInsEnt,
          a.nCTR_VlCalcI,
          e.lInt,
          a.nVTCI,
          a.nICMS_vBCFCP,
          a.nICMS_pFCP,
          a.nICMS_vFCP,
          a.nICMS_vBCFCPST,
          a.nICMS_pFCPST,
          a.nICMS_vFCPST,
          a.nICMS_vBCFCPSTRet,
          a.nICMS_pFCPSTRet,
          a.nICMS_vFCPSTRet,
          a.nICMSSN_pFCPST,
          a.nICMSSN_vFCPST,
          a.nICMSSN_vBCFCPST,
          a.nICMSSN_pFCPSTRet,
          a.nICMSSN_vFCPSTRet,
          a.nICMSSN_vBCFCPSTRet,
          a.nVBCFCPUFDest,
          a.nVDescLog,
          a.pCBenef,
          t.sCBenef,
          a.nVAcresCRTOsa,
          a.nPAcresCRTOsa,
          a.sProd_EX_TIPI,
          a.nIS_pIS,
          a.nIS_pISEspec,
          a.nIBSCBS_vBC,
          a.nIBSUF_pIBSUF,
          a.nIBSUF_pDif,
          a.nIBSUF_pRedAliq,
          a.nIBSUF_pAliqEfet,
          a.nIBSMun_pIBSMun,
          a.nIBSMun_pDif,
          a.nIBSMun_pRedAliq,
          a.nIBSMun_pAliqEfet,
          a.nIBSCBS_vIBS,
          a.nCBS_pCBS,
          a.nCBS_pDif,
          a.nCBS_pRedAliq,
          a.nCBS_pAliqEfet,
          a.nCBS_vDevTrib,
          a.nTribReg_pAliqEfetRegIBSUF,
          a.nTribReg_pAliqEfetRegIBSMun,
          a.nTribReg_pAliqEfetRegCBS,
          a.jIBSCP_cCredPres,
          a.nIBSCP_pCredPres,
          a.jCBSCP_cCredPres,
          a.nCBSCP_pCredPres,
          a.nTribCG_pAliqIBSUF,
          a.nTribCG_pAliqIBSMun,
          a.nTribCG_pAliqCBS,
          a.nIBSCBS_adRemIBS,
          a.nIBSCBS_adRemCBS,
          a.nIBSCBS_adRemIBSReten,
          a.nIBSCBS_adRemCBSReten,
          a.nIBSCBS_adRemIBSRet,
          a.nIBSCBS_vIBSMonoRet,
          a.nIBSCBS_adRemCBSRet,
          a.nIBSCBS_pDifIBS,
          a.nIBSCBS_pDifCBS,
          a.nTransfCred_vIBS,
          a.nTransfCred_vCBS,
          a.jIBSCBS_tpCredPresIBSZFM,
          a.pISRegFis,
          a.fISRegFis,
          a.sIS_CSTIS,
          a.sIS_CodCSTIS,
          a.sIS_ClassTribIS,
          a.pIBSCBSRegFis,
          a.fIBSCBSRegFis,
          a.sIBSCBS_CST,
          a.sIBSCBS_CodCST,
          a.sIBSCBS_ClassTrib,
          a.sTribReg_CodCSTReg,
          a.sTribReg_cClassTribReg,
          a.lImpSel,
          a.lIBSCBS,
          a.nIS_vBCIS,
          a.sIS_uTrib,
          a.nIS_qTrib,
          a.nIS_vIS,
          a.nIBSUF_vIBSUF,
          a.nIBSUF_vDif,
          a.nIBSUF_vDevTrib,
          a.nIBSMun_vDif,
          a.nIBSMun_vDevTrib,
          a.nIBSMun_vIBSMun,
          a.nCBS_vDif,
          a.nCBS_vCBS,
          a.nTribReg_vTribRegIBSUF,
          a.nTribReg_vTribRegIBSMun,
          a.nTribReg_vTribRegCBS,
          a.nIBSCP_vCredPres,
          a.nIBSCP_vCredPresCondSus,
          a.nIBSCBS_vIBSMono,
          a.nIBSCBS_vCBSMono,
          a.nIBSCBS_qBCMonoReten,
          a.nIBSCBS_vIBSMonoReten,
          a.nIBSCBS_vCBSMonoReten,
          a.nIBSCBS_qBCMonoRet,
          a.nIBSCBS_vCBSMonoRet,
          a.nIBSCBS_vIBSMonoDif,
          a.nIBSCBS_vCBSMonoDif,
          a.nIBSCBS_vTotIBSMonItem,
          a.nIBSCBS_vTotCBSMonItem,
          a.pRegFisIBS,     
          a.fRegFisIBS,  
          a.pRegFisIBSMun,  
          a.fRegFisIBSMun,
          a.pRegFisCBS,     
          a.fRegFisCBS,
          z.sCoringa
   from   Ordens_Itens   a left join Ordens        i   on a.pOrdem           = i.pPId and i.iVer = i.iVAt
                           left join Itens         c   on a.pItem            = c.pPId and c.iVer = a.fItem
                           left join UnidadeMedida e   on a.pUni             = e.pPId and ((i.tConf is null and e.iVer = e.iVAt) or (i.tConf is not null and e.iVer=a.fUni)) 
                           left join NCM           g   on a.pNCM             = g.pPId and ((i.tConf is null and g.iVer = g.iVAt) or (i.tConf is not null and g.iVer=a.fNCM))
                           left join CFO           h   on a.pCFO             = h.pPId and h.iVer = h.iVAt
                           left join NCM_CodCEST      n on c.pNCMCodCEST  = n.pPId  and  n.iVer =  n.iVAt
                           left join Moeda         k   on a.pMoe             = k.pPId and ((i.tConf is null and k.iVer = k.iVAt) or (i.tConf is not null and k.iVer=a.fMoe))
                           left join Cidades       j   on a.pISSQN_cMun      = j.pPId and ((i.tConf is null and j.iVer = j.iVAt) or (i.tConf is not null and j.iVer=a.fISSQN_cMun))
                           left join Paises        l   on a.pISSQN_cPais     = l.pPId and ((i.tConf is null and l.iVer = l.iVAt) or (i.tConf is not null and l.iVer=a.fISSQN_cPais))
                           left join TipoServico   m   on a.pISSQN_cServico  = m.pPId and ((i.tConf is null and m.iVer = m.iVAt) or (i.tConf is not null and m.iVer=a.fISSQN_cServico))
                           left join TabPrecos     r   on a.pTab             = r.pPId and ((i.tConf is null and r.iVer = r.iVAt) or (i.tConf is not null and r.iVer=a.fTab))
                           left join MotivoAltPedidosClientes     s   on a.pMotAltPed = s.pPId and s.iVer=s.iVAt 
                           left join Cambio        kk  on a.pCam    = kk.pPId  and ((i.tConf is null and kk.iVer = kk.iVAt) or (i.tConf is not null and kk.iVer=a.fCam))
                           left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and ((i.tConf is null and kk1.iVer = kk1.iVAt) or (i.tConf is not null and kk1.iVer=a.fCam))
                           left join LotesItens    ii  on a.pLote   =  ii.pPId and ((i.tConf is null and ii.iVer = ii.iVAt) or (i.tConf is not null and ii.iVer=a.fLote))
                           left join UF_CBenef      t on a.pCBenef  = t.pPId  and  t.iVer =  t.iVAt
                           left join EST_RegDepositos   b1 on a.pRegDepVen     = b1.pPId    and b1.iVer = b1.iVAt 
                           left join EST_Depositos      bb on b1.pDep          = bb.pPId    and bb.iVer = bb.iVAt
                           left join UFis               e1 on bb.pUFis         = e1.pPId    and e1.iVer = e1.iVAt
                           left join UFis               f1 on e1.pParent       = f1.pPId    and f1.iVer = f1.iVAt
                           left join UFis               g1 on f1.pParent       = g1.pPId    and g1.iVer = g1.iVAt
                           left join UFis               h1 on g1.pParent       = h1.pPId    and h1.iVer = h1.iVAt
                           left join UFis               i1 on h1.pParent       = i1.pPId    and i1.iVer = i1.iVAt
                           left join UFis               j1 on i1.pParent       = j1.pPId    and j1.iVer = j1.iVAt
                           left join UFis               k1 on j1.pParent       = k1.pPId    and k1.iVer = k1.iVAt
                           left join EST_Instancias     l1 on b1.pIns          = l1.pPId    and l1.iVer = l1.iVAt
                           left join UnidadeMedida      c1 on b1.pUni          = c1.pPId    and c1.iVer = c1.iVAt
                           left join EST_RegDepositos   b2  on a.pRegDepRFis    = b2.pPId    and b2.iVer = b2.iVAt 
                           left join EST_Depositos      bbb on b2.pDep          = bbb.pPId   and bbb.iVer = bbb.iVAt
                           left join UFis               e2  on bbb.pUFis        = e2.pPId    and e2.iVer = e2.iVAt
                           left join UFis               f2  on e2.pParent       = f2.pPId    and f2.iVer = f2.iVAt
                           left join UFis               g2  on f2.pParent       = g2.pPId    and g2.iVer = g2.iVAt
                           left join UFis               h2  on g2.pParent       = h2.pPId    and h2.iVer = h2.iVAt
                           left join UFis               i2  on h2.pParent       = i2.pPId    and i2.iVer = i2.iVAt
                           left join UFis               j2  on i2.pParent       = j2.pPId    and j2.iVer = j2.iVAt
                           left join UFis               k2  on j2.pParent       = k2.pPId    and k2.iVer = k2.iVAt
                           left join EST_Instancias     l2  on b2.pIns          = l2.pPId    and l2.iVer = l2.iVAt
                           left join UnidadeMedida      c2  on b2.pUni          = c2.pPId    and c2.iVer = c2.iVAt
                           left join EST_RegDepositos   b3  on a.pRegDepTransf  = b3.pPId     and b3.iVer = b3.iVAt 
                           left join EST_Depositos      bb3 on b3.pDep          = bb3.pPId    and bb3.iVer = bb3.iVAt
                           left join UFis                e3 on bb3.pUFis        =  e3.pPId    and  e3.iVer =  e3.iVAt
                           left join UFis                f3 on e3.pParent       =  f3.pPId    and  f3.iVer =  f3.iVAt
                           left join UFis                g3 on f3.pParent       =  g3.pPId    and  g3.iVer =  g3.iVAt
                           left join UFis                h3 on g3.pParent       =  h3.pPId    and  h3.iVer =  h3.iVAt
                           left join UFis                i3 on h3.pParent       =  i3.pPId    and  i3.iVer =  i3.iVAt
                           left join UFis                j3 on i3.pParent       =  j3.pPId    and  j3.iVer =  j3.iVAt
                           left join UFis                k3 on j3.pParent       =  k3.pPId    and  k3.iVer =  k3.iVAt
                           left join EST_Instancias      l3 on b3.pIns          =  l3.pPId    and  l3.iVer =  l3.iVAt
                           left join UnidadeMedida       m3 on b3.pUni          =  m3.pPId    and  m3.iVer =  m3.iVAt 
                           left join EST_Depositos       c4 on  a.pDepInsp      = c4.pPId     and  c4.iVer = c4.iVAt 
                           left join UFis                e4 on c4.pUFis         = e4.pPId     and  e4.iVer = e4.iVAt
                           left join UFis                f4 on e4.pParent       = f4.pPId     and  f4.iVer = f4.iVAt
                           left join UFis                g4 on f4.pParent       = g4.pPId     and  g4.iVer = g4.iVAt
                           left join UFis                h4 on g4.pParent       = h4.pPId     and  h4.iVer = h4.iVAt
                           left join UFis                i4 on h4.pParent       = i4.pPId     and  i4.iVer = i4.iVAt
                           left join UFis                j4 on i4.pParent       = j4.pPId     and  j4.iVer = j4.iVAt
                           left join UFis                k4 on j4.pParent       = k4.pPId     and  k4.iVer = k4.iVAt
                           left join EST_Depositos       c5 on  a.pDepReje      = c5.pPId     and  c5.iVer = c5.iVAt 
                           left join UFis                e5 on c5.pUFis         = e5.pPId     and  e5.iVer = e5.iVAt
                           left join UFis                f5 on e5.pParent       = f5.pPId     and  f5.iVer = f5.iVAt
                           left join UFis                g5 on f5.pParent       = g5.pPId     and  g5.iVer = g5.iVAt
                           left join UFis                h5 on g5.pParent       = h5.pPId     and  h5.iVer = h5.iVAt
                           left join UFis                i5 on h5.pParent       = i5.pPId     and  i5.iVer = i5.iVAt
                           left join UFis                j5 on i5.pParent       = j5.pPId     and  j5.iVer = j5.iVAt
                           left join UFis                k5 on j5.pParent       = k5.pPId     and  k5.iVer = k5.iVAt
                           left join EST_Depositos       c6 on  a.pDepEnt       = c6.pPId     and  c6.iVer = c6.iVAt 
                           left join UFis                e6 on c6.pUFis         = e6.pPId     and  e6.iVer = e6.iVAt
                           left join UFis                f6 on e6.pParent       = f6.pPId     and  f6.iVer = f6.iVAt
                           left join UFis                g6 on f6.pParent       = g6.pPId     and  g6.iVer = g6.iVAt
                           left join UFis                h6 on g6.pParent       = h6.pPId     and  h6.iVer = h6.iVAt
                           left join UFis                i6 on h6.pParent       = i6.pPId     and  i6.iVer = i6.iVAt
                           left join UFis                j6 on i6.pParent       = j6.pPId     and  j6.iVer = j6.iVAt
                           left join UFis                k6 on j6.pParent       = k6.pPId     and  k6.iVer = k6.iVAt
                           left join EST_Instancias      l6 on a.pInsEnt        = l6.pPId     and  l6.iVer = l6.iVAt,
          CUP            z
   where a.pPId = {pId}
     and a.iVer = {a.iVer}
     and a.pInc = z.pPId and z.iVer = z.iVAt
</DbToVars1>
<1>
   select a.pPId       pOrdens_Item_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,
          b.sCCUsto    sCCusto_i,
          a.nRatCCusto nRatCCusto_i
   from Ordens_Item_CCusto a,
        CCusto             b
   where a.iVer       = a.iVAt
     and a.lExc       = 0
     and a.pOrdemItem = {ChaveAtual_0}
     and a.pCCusto    = b.pPId
     and b.iVer       = b.iVAt
  order by b.sCCUsto
</1>
<2>
   select a.pPId           pOrdens_Item_CContCred_i,
          e.pPId           pCContCred_i,
          a.fCPla          fCContCred_i,
          e.sCodigo        sCodCredPla_i,
          e.sDescricao     sDesCredPla_i,
          a.nRatCredCCont  nRatCredCCont_i
   from Ordens_Item_CContabil  a left join PlaConta   e on a.pCPla = e.pPid and e.iVer = e.iVAt
   where a.iVer  = a.iVAt
     and a.lExc  = 0
     and a.pOrdemItem ={ChaveAtual_0}
     and a.lDeb  = 0
   order by e.sCodigo,e.sDescricao
</2>
<3>
   select a.pPId          pOrdens_Item_CContDeb_i,
          e.pPId          pCContDeb_i,
          a.fCPla         fCContDeb_i,
          e.sCodigo       sCodDebPla_i,
          e.sDescricao    sDesDebPla_i,
          a.nRatDebCCont  nRatDebCCont_i
   from Ordens_Item_CContabil  a left join PlaConta   e on a.pCPla = e.pPid and e.iVer = e.iVAt
   where a.iVer       = a.iVAt
     and a.lExc       = 0
     and a.pOrdemItem = {ChaveAtual_0}
     and a.lDeb  = 1
   order by e.sCodigo,e.sDescricao
</3>
<VarsDefault1>
   sVerVAt = {pPId+'-'+iVer+'/'+iVAt}
   sRastro = {sVerVAt+', '+sCoringa+', '+tInc}
   lRastro = 0
   lImpSel = 1
   lIBSCBS = 1
   pOrdem      = {ChaveAtual_1}
   pTOper      = {ChaveIrma_1_0}
   sMoeCapa    = {ChaveIrma_1_1}
   tEntPla     = {ChaveIrma_1_2}
   jEntSai     = {ChaveIrma_1_3}
   pEmi        = {ChaveIrma_1_4}
   pDest       = {ChaveIrma_1_5}
   pDestDefault = 36669 
   nDescFin    = {ChaveIrma_1_6} 
   nDFin       = {ChaveIrma_1_7} 
   pCapaMoe    = {ChaveIrma_1_8} 
   jBC_PIS     = {ChaveIrma_1_9};
   jBC_COFINS  = {ChaveIrma_1_10};
   jBC_ICMS    = {ChaveIrma_1_11};
   jBC_IPI     = {ChaveIrma_1_12};
   jBC_ICMSST  = {ChaveIrma_1_13};
   jBC_II      = {ChaveIrma_1_14};
   jBC_ISS     = {ChaveIrma_1_15};
   jVl_ICMSST  = {ChaveIrma_1_16};
   jVl_ICMS    = {ChaveIrma_1_17};
   lFinanc     = {ChaveIrma_1_18}
   lTransfRem  = {ChaveIrma_1_19}
   lTransfDep3o = {ChaveIrma_1_21}
   nPDescLog    = {ChaveIrma_1_22}
   aEntSai = Entrada (Compra),Sada (Venda),Entrada/Sada,Transferncia
   mInfAdProd = {sInfAdProd}
   aPriori = Muito Baixa,Baixa,Normal,Alta,Muito Alta
   aTipo   = Manual,Negociao,Tabela de Preo
   aTipoTQ = Manual,Negociao
   pMotAltPed    = 0  
   sCodMotAltPed =    
   sDesMotAltPed =    
   lImpSel = 0
   lIBSCBS = 0
   aProd_indTot      = 0-Valor item no compe valor total , 1-Valor item compe valor total
   aICMS_GrupoTrib   = 00-Tributada integralmente, 10-Tributada com cobrana ICMS substituio tributria ,20-Com reduo de base de clculo , 30-Isenta/no tributada com cobrana ICMS substituio tributria ,40-Isenta ,41-No Tributada, 50-Suspenso , 51-Diferimento , 60-ICMS cobrado anteriormente por substituio tributria , 70-Com reduo base clculo e cobrana do ICMS substituio tributria , 90-Outros
   aICMS_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMS_modBC       = 0-Margem Valor Agregado(%), 1-Pauta(Valor), 2-Preo Tabelado Mx(Valor), 3-Valor Operao  
   aICMS_modBCST     = 0-Preo Tabelado ou Mximo Sugerido, 1-Lista Negativa(Valor), 2-Lista Positiva(valor), 3-Lista Neutra(valor), 4-Margem Valor Agregado(%), 5-Pauta(valor)  
   aICMSPart_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSPart_CST     = 10-Tributada com cobrana ICMS por substituio, 90-Outros
   aICMSPart_modBC   = 0-Margem Valor Agregado (%), 1-Pauta (Valor), 2-Preo Tabelado Mx (valor) 
   aICMSPart_modBCST = 0 Preo tabelado ou mximo sugerido, 1-Lista Negativa (valor), 2-Lista Positiva (valor), 3-Lista Neutra (valor), 4-Margem Valor Agregado(%), 5-Pauta (valor) 
   aOrig             = 0-Nac exceto as indicadas nos cdigos 3 a 5,1-Est Importao direta- exceto a indicada no cdigo 6,2-Est Adquirida no mercado interno- exceto a indicada no cdigo 7,3-Nac mercadoria ou bem com Contedo de Importao superior a 40%,4-Nac c/ produo feita em conformidade com os processos produtivos bsicos,5-Nac mercadoria/bem c/ Contedo de Importao- inferior ou igual a 40%,6-Est Importao direta- sem similar nacional- constante na Camex,7-Est Adquirida no mercado interno - sem similar nacional-constante na Camex,8-Nacional - mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSST_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSST_CST   = 41=No Tributado,60=cobrado anteriormente por substituio tributria
   aGrupo_simples    = Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=101 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=102 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=103 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=201 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=202 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=203 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=300 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=400 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=500 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=900 
   aICMSSN_Orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSSN_CSOSN     = 101-Tributada com permisso de crdito , 102-Tributada sem permisso de crdito , 103-Iseno para faixa de receita bruta , 201-Tributada com permisso de crdito com cobrana do ICMS por Substituio Tributria , 202-Tributada sem permisso de crdito com cobrana do ICMS por Substituio Tributria , 203-Iseno para faixa de receita bruta com cobrana do ICMS por Substituio Tributria , 300-Imune , 400-No tributada , 500-ICMS cobrado anteriormente por substituio tributria ou por antecipao, 900-Outros
   aICMSSN_modBCST   = 0-Preo Tabelado ou Mximo Sugerido, 1-Lista Negativa(Valor), 2-Lista Positiva(valor), 3-Lista Neutra(valor),4 - Margem Valor Agregado (%),5 - Pauta (valor) (v.2.0)
   aICMSSN_modBC     = 0-Margem Valor Agregado(%), 1-Pauta(Valor), 2-Preo Tabelado Mx(Valor), 3-Valor Operao , 4-Margem Valor Agregado(%), 5-Pauta (valor)
   aIPINT_CST        = 00-Entrada com recuperao de crdito, 01-Entrada tributada com alquota zero, 02-Entrada isenta, 03-Entrada no-tributada, 04-Entrada imune, 05-Entrada com suspenso,49-Outras entradas, 50-Sada tributada, 51-Sada tributada com alquota zero, 52-Sada isenta, 53-Sada no-tributada, 54-Sada imune, 55-Sada com suspenso, 99-Outras sadas
   aPIS_CST          = 01=Oper Tribut (BC= valor da oper alq normal (cumulativo/no cumulativo)),02=Oper Tribut (BC= valor da oper (alq diferenciada)),03-Oper Tribut (BC= QT vendida x alq por unidade de produto,04=Oper Tribut (tributao monofsica (alquota zero)),06=Oper Tribut (alquota zero),07=Oper Isenta da Contribuio,08=Oper Sem Incidncia da Contribuio,09=Oper com Suspenso da Contribuio,99=Outras Operaes,05=Oper Tribut (Substituio Tributria),49=Outras Operaes de Sada,50=Oper com Direito a Crd - Vinculada Exc a Receita Trib no Mercado Interno,51=Oper com Direito a Crd - Vinculada Exc a Receita No Trib no Mercado Interno,52=Oper com Direito a Crd . Vinculada Exc a Receita de Exportao,53=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno,54=Oper com Direito a Crd - Vinculada a Rec Tribut no Mercado Interno e de Export,55=Oper com Direito a Crd - Vinculada a Rec NoTribut no Mercado Interno e de Export,56=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno- e de Export,60=Crd Presumido - Operao de Aq Vinculada Excl a Receita Tribut no Mercado Interno,61=Crd Presumido - Operao de Aq Vinculada Excl a Receita No-Tribut no Mercado Interno,62=Crd Presumido - Operao de Aq Vinculada Excl a Receita de Exportao,63=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno,64=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut no Mercado Interno e de Export,65=Crd Presumido - Operao de Aq Vinculada a Receitas No-Tribut no Mercado Interno e de Export,66=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno- e de Export,67=Crd Presumido - Outras Operaes,70=Operao de Aquisio sem Direito a Crdito,71=Operao de Aquisio com Iseno,72=Operao de Aquisio com Suspenso,73=Operao de Aquisio a Alquota Zero,74=Operao de Aquisio sem Incidncia da Contribuio,75=Operao de Aquisio por Substituio Tributria,98=Outras Operaes de Entrada
   aCOFINS_CST       = 01=Oper Tribut (BC= valor da oper alq normal (cumulativo/no cumulativo)),02=Oper Tribut (BC= valor da oper (alq diferenciada)),03-Oper Tribut (BC= QT vendida x alq por unidade de produto,04=Oper Tribut (tributao monofsica (alquota zero)),06=Oper Tribut (alquota zero),07=Oper Isenta da Contribuio,08=Oper Sem Incidncia da Contribuio,09=Oper com Suspenso da Contribuio,99=Outras Operaes,05=Oper Tribut (Substituio Tributria),49=Outras Operaes de Sada,50=Oper com Direito a Crd - Vinculada Exc a Receita Trib no Mercado Interno,51=Oper com Direito a Crd - Vinculada Exc a Receita No Trib no Mercado Interno,52=Oper com Direito a Crd . Vinculada Exc a Receita de Exportao,53=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno,54=Oper com Direito a Crd - Vinculada a Rec Tribut no Mercado Interno e de Export,55=Oper com Direito a Crd - Vinculada a Rec NoTribut no Mercado Interno e de Export,56=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno- e de Export,60=Crd Presumido - Operao de Aq Vinculada Excl a Receita Tribut no Mercado Interno,61=Crd Presumido - Operao de Aq Vinculada Excl a Receita No-Tribut no Mercado Interno,62=Crd Presumido - Operao de Aq Vinculada Excl a Receita de Exportao,63=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno,64=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut no Mercado Interno e de Export,65=Crd Presumido - Operao de Aq Vinculada a Receitas No-Tribut no Mercado Interno e de Export,66=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno- e de Export,67=Crd Presumido - Outras Operaes,70=Operao de Aquisio sem Direito a Crdito,71=Operao de Aquisio com Iseno,72=Operao de Aquisio com Suspenso,73=Operao de Aquisio a Alquota Zero,74=Operao de Aquisio sem Incidncia da Contribuio,75=Operao de Aquisio por Substituio Tributria,98=Outras Operaes de Entrada
   aISSQN_cSitTrib   = N=NORMAL, R=RETIDA, S=SUBSTITUTA, I=ISENTA         
   aFDiasEnt         = Calculado,Informado 
   jProd_indTot      = 1;
   iDesc1            = %
   iDesc2            = Valor
   iDesc3            = VL/UN
   aCam    = 1-Data Emissao da Ordem,2-Data Emisso da NFe,3-Data Emisso da NFe -1
   aBC        = Calculada, Informada
   aTempo  = Mensal,Bimestral,Semestral,Anual
   aFinalidade = Outros Fins,Uso e Consumo,Complemento de Impostos
   aDI_tpViaTransp    = 1=Martima,Nota Fiscal eletrnica,2=Fluvial,3=Lacustre,4=Area,5=Postal,6=Ferroviria,7=Rodoviria,8=Conduto / Rede Transmisso,9=Meios Prprios,10=Entrada / Sada ficta,11=Courier,12=Handcarry
   aDI_tpIntermedio   = 1=Importao por conta prpria,2=Importao por conta e ordem,3=Importao por encomenda
   aISSQN_indISS      = 1=Exigvel, 2=No incidncia, 3=Iseno, 4=Exportao, 5=Imunidade, 6=Exigibilidade Suspensa por Deciso Judicial, 7=Exigibilidade Suspensa por Processo Administrativo 
   aICMS_motDesICMS  = 1-Txi,2-Deficiente Fsico,3-Produtor Agropecurio,4-Frotista/Locadora,5-Diplomtico/Consular,6-Utilitrios/Motocicletas reas de Livre Comrcio CONTRAN suas alteraes,7-SUFRAMA, 8-Venda a rgo Pblico,9-Outros,10=Deficiente Condutor,11-Deficiente No Condutor,12-rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS20 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS30 = 6=Utilitrios e Motocicletas da Amaznia Ocidental e reas de Livre Comrcio, 7=SUFRAMA, 9=Outros
   aICMS_motDesICMS40 = 1=Txi, 2=Deficiente Fsico *** Eliminado***, 3=Produtor Agropecurio,4=Frotista/Locadora,5=Diplomtico/Consular,6=Utilitrios e Motocicletas da Amaznia Ocidental ereas de Livre Comrcio,7=SUFRAMA, 8=Venda a rgo Pblico, 9=Outros, 10=Deficiente Condutor, 11=Deficiente No Condutor
   aICMS_motDesICMS70 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS90 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aIBSCP_cCredPres = 1 - Aquisio de Produtor Rural no contribuinte,2 - Tomador de servio de transporte de TAC PF no contrib,3 - Aquisio de pessoa fsica com destino a reciclagem,4 - Aquisio de bens mveis de PF no contrib. para revenda (veculos / brech),5 - Regime opcional para cooperativa.
   aIBSCBS_tpCredPresIBSZFM = 0 - Sem Crdito Presumido, 1 - Bens de consumo final (55%), 2 - Bens de capital (75%), 3 - Bens intermedirios (90/25%), 4 - Bens de informtica e outros definidos em legislao (100%)
</VarsDefault1>
<VarsDefault3>
   sVerVAt = {pPId+'-'+iVer+'/'+iVAt}
   sRastro = {sVerVAt+', '+sCoringa+', '+tInc}
   lRastro = 0
   pOrdem      = {ChaveAtual_1}
   pTOper      = {ChaveIrma_1_0}
   sMoeCapa    = {ChaveIrma_1_1}
   tEntPla     = {ChaveIrma_1_2}
   jEntSai     = {ChaveIrma_1_3}
   pEmi        = {ChaveIrma_1_4}
   pDest       = {ChaveIrma_1_5}
   pDestDefault = 36669  
   nDescFin    = {ChaveIrma_1_6} 
   nDFin       = {ChaveIrma_1_7} 
   pCapaMoe    = {ChaveIrma_1_8} 
   jBC_PIS     = {ChaveIrma_1_9};
   jBC_COFINS  = {ChaveIrma_1_10};
   jBC_ICMS    = {ChaveIrma_1_11};
   jBC_IPI     = {ChaveIrma_1_12};
   jBC_ICMSST  = {ChaveIrma_1_13};
   jBC_II      = {ChaveIrma_1_14};
   jBC_ISS     = {ChaveIrma_1_15};
   jVl_ICMSST  = {ChaveIrma_1_16};
   jVl_ICMS    = {ChaveIrma_1_17};
   lFinanc     = {ChaveIrma_1_18}
   lTransfRem  = {ChaveIrma_1_19}
   lTransfDep3o = {ChaveIrma_1_21}
   nPDescLog    = {ChaveIrma_1_22}
   aEntSai = Entrada (Compra),Sada (Venda),Entrada/Sada,Transferncia
   mInfAdProd = {sInfAdProd}
   aPriori = Muito Baixa,Baixa,Normal,Alta,Muito Alta
   aTipo   = Manual,Negociao,Tabela de Preo
   aTipoTQ = Manual,Negociao
   aProd_indTot      = 0-Valor item no compe valor total , 1-Valor item compe valor total
   aICMS_GrupoTrib   = 00-Tributada integralmente, 10-Tributada com cobrana ICMS substituio tributria ,20-Com reduo de base de clculo , 30-Isenta/no tributada com cobrana ICMS substituio tributria ,40-Isenta ,41-No Tributada, 50-Suspenso , 51-Diferimento , 60-ICMS cobrado anteriormente por substituio tributria , 70-Com reduo base clculo e cobrana do ICMS substituio tributria , 90-Outros
   aICMS_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMS_modBC       = 0-Margem Valor Agregado(%), 1-Pauta(Valor), 2-Preo Tabelado Mx(Valor), 3-Valor Operao  
   aICMS_modBCST     = 0-Preo Tabelado ou Mximo Sugerido, 1-Lista Negativa(Valor), 2-Lista Positiva(valor), 3-Lista Neutra(valor), 4-Margem Valor Agregado(%), 5-Pauta(valor)  
   aICMSPart_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSPart_CST     = 10-Tributada com cobrana ICMS por substituio, 90-Outros
   aICMSPart_modBC   = 0-Margem Valor Agregado (%), 1-Pauta (Valor), 2-Preo Tabelado Mx (valor) 
   aICMSPart_modBCST = 0 Preo tabelado ou mximo sugerido, 1-Lista Negativa (valor), 2-Lista Positiva (valor), 3-Lista Neutra (valor), 4-Margem Valor Agregado(%), 5-Pauta (valor) 
   aOrig             = 0-Nac exceto as indicadas nos cdigos 3 a 5,1-Est Importao direta- exceto a indicada no cdigo 6,2-Est Adquirida no mercado interno- exceto a indicada no cdigo 7,3-Nac mercadoria ou bem com Contedo de Importao superior a 40%,4-Nac c/ produo feita em conformidade com os processos produtivos bsicos,5-Nac mercadoria/bem c/ Contedo de Importao- inferior ou igual a 40%,6-Est Importao direta- sem similar nacional- constante na Camex,7-Est Adquirida no mercado interno - sem similar nacional-constante na Camex,8-Nacional - mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSST_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSST_CST   = 41=No Tributado,60=cobrado anteriormente por substituio tributria
   aGrupo_simples    = Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=101 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=102 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=103 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=201 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=202 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=203 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=300 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=400 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=500 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=900 
   aICMSSN_Orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSSN_CSOSN     = 101-Tributada com permisso de crdito , 102-Tributada sem permisso de crdito , 103-Iseno para faixa de receita bruta , 201-Tributada com permisso de crdito com cobrana do ICMS por Substituio Tributria , 202-Tributada sem permisso de crdito com cobrana do ICMS por Substituio Tributria , 203-Iseno para faixa de receita bruta com cobrana do ICMS por Substituio Tributria , 300-Imune , 400-No tributada , 500-ICMS cobrado anteriormente por substituio tributria ou por antecipao, 900-Outros
   aICMSSN_modBCST   = 0-Preo Tabelado ou Mximo Sugerido, 1-Lista Negativa(Valor), 2-Lista Positiva(valor), 3-Lista Neutra(valor),4 - Margem Valor Agregado (%),5 - Pauta (valor) (v.2.0)
   aICMSSN_modBC     = 0-Margem Valor Agregado(%), 1-Pauta(Valor), 2-Preo Tabelado Mx(Valor), 3-Valor Operao , 4-Margem Valor Agregado(%), 5-Pauta (valor)
   aIPINT_CST        = 00-Entrada com recuperao de crdito, 01-Entrada tributada com alquota zero, 02-Entrada isenta, 03-Entrada no-tributada, 04-Entrada imune, 05-Entrada com suspenso,49-Outras entradas, 50-Sada tributada, 51-Sada tributada com alquota zero, 52-Sada isenta, 53-Sada no-tributada, 54-Sada imune, 55-Sada com suspenso, 99-Outras sadas
   aPIS_CST          = 01=Oper Tribut (BC= valor da oper alq normal (cumulativo/no cumulativo)),02=Oper Tribut (BC= valor da oper (alq diferenciada)),03-Oper Tribut (BC= QT vendida x alq por unidade de produto,04=Oper Tribut (tributao monofsica (alquota zero)),06=Oper Tribut (alquota zero),07=Oper Isenta da Contribuio,08=Oper Sem Incidncia da Contribuio,09=Oper com Suspenso da Contribuio,99=Outras Operaes,05=Oper Tribut (Substituio Tributria),49=Outras Operaes de Sada,50=Oper com Direito a Crd - Vinculada Exc a Receita Trib no Mercado Interno,51=Oper com Direito a Crd - Vinculada Exc a Receita No Trib no Mercado Interno,52=Oper com Direito a Crd . Vinculada Exc a Receita de Exportao,53=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno,54=Oper com Direito a Crd - Vinculada a Rec Tribut no Mercado Interno e de Export,55=Oper com Direito a Crd - Vinculada a Rec NoTribut no Mercado Interno e de Export,56=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno- e de Export,60=Crd Presumido - Operao de Aq Vinculada Excl a Receita Tribut no Mercado Interno,61=Crd Presumido - Operao de Aq Vinculada Excl a Receita No-Tribut no Mercado Interno,62=Crd Presumido - Operao de Aq Vinculada Excl a Receita de Exportao,63=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno,64=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut no Mercado Interno e de Export,65=Crd Presumido - Operao de Aq Vinculada a Receitas No-Tribut no Mercado Interno e de Export,66=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno- e de Export,67=Crd Presumido - Outras Operaes,70=Operao de Aquisio sem Direito a Crdito,71=Operao de Aquisio com Iseno,72=Operao de Aquisio com Suspenso,73=Operao de Aquisio a Alquota Zero,74=Operao de Aquisio sem Incidncia da Contribuio,75=Operao de Aquisio por Substituio Tributria,98=Outras Operaes de Entrada
   aCOFINS_CST       = 01=Oper Tribut (BC= valor da oper alq normal (cumulativo/no cumulativo)),02=Oper Tribut (BC= valor da oper (alq diferenciada)),03-Oper Tribut (BC= QT vendida x alq por unidade de produto,04=Oper Tribut (tributao monofsica (alquota zero)),06=Oper Tribut (alquota zero),07=Oper Isenta da Contribuio,08=Oper Sem Incidncia da Contribuio,09=Oper com Suspenso da Contribuio,99=Outras Operaes,05=Oper Tribut (Substituio Tributria),49=Outras Operaes de Sada,50=Oper com Direito a Crd - Vinculada Exc a Receita Trib no Mercado Interno,51=Oper com Direito a Crd - Vinculada Exc a Receita No Trib no Mercado Interno,52=Oper com Direito a Crd . Vinculada Exc a Receita de Exportao,53=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno,54=Oper com Direito a Crd - Vinculada a Rec Tribut no Mercado Interno e de Export,55=Oper com Direito a Crd - Vinculada a Rec NoTribut no Mercado Interno e de Export,56=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno- e de Export,60=Crd Presumido - Operao de Aq Vinculada Excl a Receita Tribut no Mercado Interno,61=Crd Presumido - Operao de Aq Vinculada Excl a Receita No-Tribut no Mercado Interno,62=Crd Presumido - Operao de Aq Vinculada Excl a Receita de Exportao,63=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno,64=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut no Mercado Interno e de Export,65=Crd Presumido - Operao de Aq Vinculada a Receitas No-Tribut no Mercado Interno e de Export,66=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno- e de Export,67=Crd Presumido - Outras Operaes,70=Operao de Aquisio sem Direito a Crdito,71=Operao de Aquisio com Iseno,72=Operao de Aquisio com Suspenso,73=Operao de Aquisio a Alquota Zero,74=Operao de Aquisio sem Incidncia da Contribuio,75=Operao de Aquisio por Substituio Tributria,98=Outras Operaes de Entrada
   aISSQN_cSitTrib   = N=NORMAL, R=RETIDA, S=SUBSTITUTA, I=ISENTA         
   aFDiasEnt         = Calculado,Informado 
   jProd_indTot      = 1;
   iDesc1            = %
   iDesc2            = Valor
   iDesc3            = VL/UN
   aCam    = 1-Data Emissao da Ordem,2-Data Emisso da NFe,3-Data Emisso da NFe -1
   aBC        = Calculada, Informada
   aTempo  = Mensal,Bimestral,Semestral,Anual
   aFinalidade = Outros Fins,Uso e Consumo,Complemento de Impostos
   jTipo = 0
   aDI_tpViaTransp    = 1=Martima,Nota Fiscal eletrnica,2=Fluvial,3=Lacustre,4=Area,5=Postal,6=Ferroviria,7=Rodoviria,8=Conduto / Rede Transmisso,9=Meios Prprios,10=Entrada / Sada ficta,11=Courier,12=Handcarry
   aDI_tpIntermedio   = 1=Importao por conta prpria,2=Importao por conta e ordem,3=Importao por encomenda
   aISSQN_indISS      = 1=Exigvel, 2=No incidncia, 3=Iseno, 4=Exportao, 5=Imunidade, 6=Exigibilidade Suspensa por Deciso Judicial, 7=Exigibilidade Suspensa por Processo Administrativo 
  aICMS_motDesICMS  = 1-Txi,2-Deficiente Fsico,3-Produtor Agropecurio,4-Frotista/Locadora,5-Diplomtico/Consular,6-Utilitrios/Motocicletas reas de Livre Comrcio CONTRAN suas alteraes,7-SUFRAMA, 8-Venda a rgo Pblico,9-Outros,10=Deficiente Condutor,11-Deficiente No Condutor,12-rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS20 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS30 = 6=Utilitrios e Motocicletas da Amaznia Ocidental e reas de Livre Comrcio, 7=SUFRAMA, 9=Outros
   aICMS_motDesICMS40 = 1=Txi, 2=Deficiente Fsico *** Eliminado***, 3=Produtor Agropecurio,4=Frotista/Locadora,5=Diplomtico/Consular,6=Utilitrios e Motocicletas da Amaznia Ocidental ereas de Livre Comrcio,7=SUFRAMA, 8=Venda a rgo Pblico, 9=Outros, 10=Deficiente Condutor, 11=Deficiente No Condutor
   aICMS_motDesICMS70 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS90 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aIBSCP_cCredPres = 1 - Aquisio de Produtor Rural no contribuinte,2 - Tomador de servio de transporte de TAC PF no contrib,3 - Aquisio de pessoa fsica com destino a reciclagem,4 - Aquisio de bens mveis de PF no contrib. para revenda (veculos / brech),5 - Regime opcional para cooperativa.
   aIBSCBS_tpCredPresIBSZFM = 0 - Sem Crdito Presumido, 1 - Bens de consumo final (55%), 2 - Bens de capital (75%), 3 - Bens intermedirios (90/25%), 4 - Bens de informtica e outros definidos em legislao (100%)
</VarsDefault3>
<ScriptForm1>
   Rastreabilidade                           ; lRastro-5                         ; fontweight='bold' ; edtzoom=true ;  visible=(sDDFTagApl!='Padrao_3')
   Verso                                    ; sRastro-60                        ; identlabel=5      ; editable=false ; visible=((iDDFChamada>0)&&(lRastro==1)&&(sDDFTagApl!='Padrao_3')) ; 
   Identificao                             ;                                   ; fontweight='bold' ; editable=false ; visible=(sDDFTagApl!='Padrao_3')
   ;   ; visible=(iDDFChamada>0)
   Origem do Preo                           ; aTipo[jTipo]                      ; identlabel=5      ; visible=((sDDFTagApl!='Padrao_3')&&((sDDFMnemProp=='MT')||(sDDFMnemProp=='Desenvolvimento'))) ; exec=fsLoadTag('exec1')
   Origem do Preo                           ; aTipoTQ[jTipo]                    ; identlabel=5      ; visible=((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')) ; exec=fsLoadTag('exec1')
   Indicador Valor Item                      ; aProd_indTot[jProd_indTot]        ; identlabel=5      ; visible=(sDDFTagApl!='Padrao_3')
   Origem Mercadoria                         ; aOrig[jOrig]-30                   ; identlabel=5      ; visible=(sDDFTagApl!='Padrao_3')
   <i>(para realizar uma Ordem de importao vc dever ter em mos a DANFE e o DI - Documento de Importao)</i> ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; fontcolor='00AA00' ; identlabel=5 ; fontlen=-1
   ; 
   Item                                      ; sRegCodItem-20                    ; identlabel=5      ; visible=((jTipo==0)||(jTipo==3)||(jTipo==4)) ; esc=fsLoadTag('esc1') ; exec=fsLoadTag('exec2')
   Item                                      ; sNegCodItem-20                    ; identlabel=5      ; visible=(jTipo==1) ; esc=fsLoadTag('esc2') ; exec=fsLoadTag('exec3')  
   Item                                      ; sTabCodItem-20                    ; identlabel=5      ; visible=(jTipo==2) ; esc=fsLoadTag('esc3') ; exec=fsLoadTag('exec4') 
                                             ; sRegDesItem-60                    ; identlabel=5      ; editable=false     ; 
   ;
   Tabela de Preo                           ; sCodTab-30                        ; identlabel=5      ; editable=false     ; visible=(jTipo==2)
                                             ; sDesTab-60                        ; identlabel=5      ; editable=false     ; visible=(jTipo==2)
   ; ; visible=(jTipo==2)
   Finalidade do Consumo                     ; aFinalidade[jFinalidade]    ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
   ; ; visible=(sDDFTagApl!='Padrao_3')
   Qt.Pedida                                 ; nQt-15-5                          ; identlabel=5      ; exec=fsLoadTag('exec5') ; valid=(((lInt==0) || (nQt==parseInt(nQt))),'A quantidade deve ser um numero inteiro')
   Unidade Medida                            ; sCodUni-10                        ; identlabel=5      ; visible=(sDDFTagApl!='Padrao_3') ; esc=('dd_files/erp_UnidadeMedida.dda','Esc_Padrao_1','sCodUni','pUni,sCodUni,sUni,fUni,stmp,lInt') ; 
   ; ; visible=(sDDFTagApl!='Padrao_3')
   Valor [UN] em Moeda Estrangeira           ; nQtMoe-18-5                       ; identlabel=10     ; editable=(jTipo==0) ; visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3'))                  ; exec=fsLoadTag('exec8')
   <i>(na importao esse  o campo do Valor [UN] da Mercadoria no Local de Embarque em moeda estrangeira)</i>    ;; colspan=true ; visible=((jOrig==1)&&(pCapaMoe!=pMoe)&&(pMoe>0)&&(sDDFTagApl!='Padrao_3')) ; identlabel=10 ; fontlen=-1 ;  fontcolor='00AA00'
   ; ; visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3'))
   Cambio                                    ; aCam[jCam]                        ; identlabel=10     ; editable=(jTipo==0) ; visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3')) ; 
   Cotao                                   ; sMoeCambio-50                     ; identlabel=15     ;                       visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3')) ; esc=('dd_files/erp_Cambio.dda','Esc_Padrao_2','sMoeCambio,pMoe,pCapaMoe','pCam,nCam,fCam,sCam,sMoeCambio') ;  exec=fsLoadTag('exec9')
   Valor do Cambio                           ; nCam-15-5                         ; identlabel=15     ;                       visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false ;                   
   Data do Cambio                            ; sCam-20                           ; identlabel=15     ;                       visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false ;                   
   (*) Os valores abaixo esto expressos em moeda operao. ; ; fontcolor='00AA00' ; visible=(sDDFTagApl!='Padrao_3')
   <b>Valor [UN] Bruto</b>                      ; nPrBruto-15-9                     ;                   ; identlabel=5  ; editable=((jTipo==0) && (pCapaMoe==pMoe) && (pMoe>0)) ; exec=fsLoadTag('exec10') ; fontlen=-1
   <i>(esse  o campo do Valor [UN] da Mercadoria no Local de Embarque em moeda da operao)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
   ; ; visible=(sDDFTagApl!='Padrao_3')
   <b>Descontos sobre Valor [UN] Bruto</b>     ; iDesc2-15,iDesc1-15                   ; editable=false      ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
   [$][%]  Desconto Incondicional  [UN]        ; nVDescInc-15-5,nPDescInc-15-5         ; identlabel=10       ; exec=fsLoadTag('exec11a') ; 1-editable=false
   Desconto em %                               ; nPDescTpEDG-15-5                      ; editable=(jTipo==2) ; identlabel=10 ; exec=fsLoadTag('exec10') ; visible=(sDDFTagApl!='Padrao_3') ; rightlabel=<span style='color: #00AA00_ font-size: 9px_'>[Tipo de Operao / Emissor / Destinatrio / Grupo de Itens]</span>
   Encargos Financeiros                        ; nVEncFinTpED-15-5,nPEncFinTpED-15-5   ; editable=false      ; identlabel=10 ;                            visible=(sDDFTagApl!='Padrao_3') ; rightlabel=<span style='color: #00AA00_ font-size: 9px_'>[Tipo de Operao / Emissor / Destinatrio] / Grupo de Itens]</span>
   Acrscimo de Contrato                       ; nVAcresCRTOsa-15-5,nPAcresCRTOsa-15-5 ; editable=false      ; identlabel=10 ;                            visible=(sDDFTagApl!='Padrao_3') ; rightlabel=<span style='color: #00AA00_ font-size: 9px_'>[Emissor / Destinatrio] / CTR]</span>
   Desconto Condio de Pagamento              ; nVDescCP-15-5,nDFin-15-5              ; editable=false      ; identlabel=10 ;                            visible=(sDDFTagApl!='Padrao_3') ; rightlabel=<span style='color: #00AA00_ font-size: 9px_'>[Emissor / Destinatrio / Condio de Pagamento]</span>
   Desconto Logistico                          ; nVDescLog-15-5,nPDescLog-15-5         ; editable=false      ; identlabel=10 ; exec=fsLoadTag('exec14') ; visible=(sDDFTagApl!='Padrao_3') ; rightlabel=<span style='color: #00AA00_ font-size: 9px_'>[Tipo de Operao / Emissor / Destinatrio]</span>
<b>Valor [UN] Comercial</b>                    ; nProd_vUnCom-15-5                 ; editable=false ; identlabel=5 ; fontlen=-1 ; visible=(sDDFTagApl!='Padrao_3')
   <i>(esse  o campo do Valor [UN] da Mercadoria no Local de Embarque em moeda da operao)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
; ; visible=(sDDFTagApl!='Padrao_3')
   Valor [Total] Frete                       ; nProd_vFrete-15-2                 ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
   Valor [Total] Seguro                      ; nProd_vSeg-15-2                   ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
   Valor [Total] Outras Despesas             ; nProd_vOutro-15-2                 ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
<i>(obter do DI quando importao - siscomex)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
   Valor [Total] Imposto Importao          ; nII_vII-15-2                      ; identlabel=5 ; editable=false ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3'))
<i>(o valor desse campo s  obtido aps salvar, ele no  atualizado durante a edio)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
<b>Valor [Total] Comercial</b>               ; nProd_vProd-15-5                  ; editable=false ; identlabel=5 ; fontlen=-1
<b>Valor [Total] Contrato</b>                ; nCTR_VlCalcI-15-5                 ; editable=false ; identlabel=5 ; fontlen=-1
<i>(esse  o campo do Valor [TOTAL] da Mercadoria no Local de Embarque em moeda da operao)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
<b>Valor [Total] Comercial da Importao</b> ; nVTCI-15-2                        ; identlabel=5 ; editable=false ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; fontlen=-1
 <i>(Valor [Total] Comercial + Frete + Seguro + Imposto Importao -> o valor desse campo s  obtido aps salvar, ele no  atualizado durante a edio)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
   ;; visible=(sDDFTagApl!='Padrao_3')
    Valor [Total] Desconto Condicional        ; nProd_vDesc-15-2                  ; exec=fsLoadTag('exec13') ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
    ;
  ; btn_SalvarInc    ; onclick={this}.flOnSubmit(1) ; value=Salvar e Incluir Prximo
  ; btn_Salvar       ; onclick={this}.flOnSubmit()  ; value=Salvar
    ;
    Moeda                                     ; sMoe-50                           ; identlabel=5      ; editable=(jTipo==0) ; visible=(sDDFTagApl!='Padrao_3')                                                  ; esc=('dd_files/erp_Moeda.dda','Esc_Padrao_1','sMoe','pMoe,sCodMoe,sMoe,fMoe') ; exec=fsLoadTag('exec7')
    ;
   Motivo dessa alterao                    ; sCodMotAltPed-30                  ; identlabel=5      ; visible=((jEntSai==1)&&(iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; esc=('dd_files/erp_MotivoAltPedidosClientes.dda','Esc_Padrao_1','sCodMotAltPed','pMotAltPed,sCodMotAltPed,sDesMotAltPed,fMotAltPed') ; 
                                             ; sDesMotAltPed-60                  ; identlabel=5      ; visible=((jEntSai==1)&&(iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false
   ; ; visible=((iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))
   ;
   Motivo da ltima alterao                ; sCodMotAltPe2-30                  ; identlabel=5      ; visible=((iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false
                                             ; sDesMotAltPe2-60                  ; identlabel=5      ; visible=((iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false
   ; ; visible=((iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))
   ; ; visible=(sDDFTagApl!='Padrao_3')
    Base Calculo PIS                            ; aBC[jBC_PIS]                          ; identlabel=5  ; rightlabel=[Informada quando importao] ; visible=(sDDFTagApl!='Padrao_3')
   Valor da Base Calculo PIS                   ; nBC_PIS-10-2                          ; identlabel=5  ; editable=(jBC_PIS==1)    ; visible=((jBC_PIS==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter do DI quando importao]
   Base Calculo COFINS                         ; aBC[jBC_COFINS]                       ; identlabel=5  ; rightlabel=[Informada quando importao] ; visible=(sDDFTagApl!='Padrao_3')
   Valor da Base Calculo COFINS                ; nBC_COFINS-10-2                       ; identlabel=5  ; editable=(jBC_COFINS==1) ; visible=((jBC_COFINS==1)&&(sDDFTagApl!='Padrao_3')) ; rightlabel=[obter do DI quando importao]
   Base Calculo ICMS                           ; aBC[jBC_ICMS]                         ; identlabel=5  ;  visible=(sDDFTagApl!='Padrao_3')
   <i>(deve ser informada apenas para conta de energia eletrica e telefonia)</i>       ;; colspan=true ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00' ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   Valor da Base Calculo ICMS                  ; nBC_ICMS-10-2                         ; identlabel=5  ; editable=(jBC_ICMS==1)    ; visible=((jBC_ICMS==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter da Nota Fiscal]
   Base Calculo IPI                            ; aBC[jBC_IPI]                          ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
   Valor da Base Calculo IPI                   ; nBC_IPI-10-2                          ; identlabel=5  ; editable=(jBC_IPI==1)    ; visible=((jBC_IPI==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter da Nota Fiscal]
    Base Calculo ICMS ST                       ; aBC[jBC_ICMSST]                       ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
    Valor da Base Calculo ICMS ST              ; nBC_ICMSST-10-2                       ; identlabel=5  ; editable=(jBC_ICMSST==1)    ; visible=((jBC_ICMSST==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter da Nota Fiscal]
    Valor do ICMS                              ; aBC[jVl_ICMS]                         ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
    Valor Informado do ICMS                    ; nVl_ICMS-10-2                         ; identlabel=5  ; editable=(jVl_ICMS==1)    ; visible=((jVl_ICMS==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter da Nota Fiscal]
    Valor do ICMS-ST                           ; aBC[jVl_ICMSST]                       ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
    Valor Informado do ICMS-ST                 ; nVl_ICMSST-10-2                       ; identlabel=5  ; editable=(jVl_ICMSST==1)    ; visible=((jVl_ICMSST==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter da Nota Fiscal]
   ;; visible=(sDDFTagApl!='Padrao_3')
   Atualiza Custo do Item                    ; lCCusto            ; identlabel=5 ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   ; ; visible=(sDDFTagApl!='Padrao_3')
   Nmero da FCI                             ; sFCI-36                           ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
; ; visible=(sDDFTagApl!='Padrao_3')
   Informaes Adicionais do Produto         ; mInfAdProd-40-5-500               ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
   ; ; visible=(sDDFTagApl!='Padrao_3')
   Cdigo NCM                                ; sCodNCM-8                         ; identlabel=5      ; editable=false ; visible=(sDDFTagApl!='Padrao_3') 
   Descrico                                 ; sDesNCM-60                        ; identlabel=5      ; editable=false ; visible=(sDDFTagApl!='Padrao_3')
   ;
   Cdigo CEST                               ; sCEST-s-7                         ; identlabel=5      ; editable=false     ; 
   ;
   CFOP                                      ; sCodCFO-20                        ; identlabel=5      ; editable=false ; visible=(sDDFTagApl!='Padrao_3')
   Abreviatura                               ; sAbrev-60                         ; identlabel=5      ; editable=false ; visible=(sDDFTagApl!='Padrao_3')
   ;
   ; ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   Emisso                                   ; tEmissao-20                       ; identlabel=5 ; editable=false ; visible=((iDDFChamada>0)&&(sDDFTagApl!='Padrao_3'))
   Sada                                     ; tSaida-20                         ; identlabel=5 ; editable=false ; visible=((iDDFChamada>0)&&(sDDFTagApl!='Padrao_3'))
   ;; visible=(sDDFTagApl!='Padrao_3')
   <b>Quantidades</b>                        ;                                   ; identlabel=5 ; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) 
   Pedida                                    ; nQtPed-18-5                       ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Reservada                                 ; nQtRes-18-5                       ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Liberada                                  ; nQtLib-18-5                       ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Carregada                                 ; nQtCarga-18-5                     ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Entregue                                  ; nQtEnt-18-5                       ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Faturada                                  ; nQtFat-18-5                       ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Cancelada                                 ; nQtCanc-18-5                      ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
;
Rateios ;; fontweight='bold'; visible=((lFinanc==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ;
; ; visible=((lFinanc==1)&&(sDDFTagApl!='Padrao_3'))
Centros de RECEBIMENTOS    ;; fontweight='bold'; identlabel=10 ; visible=((lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
Centros de CUSTOS/RECEITAS ;; fontweight='bold'; identlabel=10 ; visible=((lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   SubGrid-1 {
      (i))      ; sCCusto_i-50 ; identlabel=15 ; esc=('dd_files/erp_CCusto.dda','Esc_Padrao_1','sCCusto_i','pCCusto_i,sTmp,sCCusto_i,fCCusto_i') ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_3'))
      % Rateio Custos/Receitas ; nRatCCusto_i-18-2 ; identlabel=15 ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_3'))
   }
   <span style='color: #00AA00_ text-decoration: underline_ cursor: pointer_' onclick='oTelaDefault.flIncSubGrid(1,"pCCusto")_'>Incluir</span> ; ; identlabel=15; visible=((iDDFChamada<2)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_3'))
   ;;  visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(sDDFTagApl!='Padrao_3'))
; ; visible=((lFinanc==1)&&(sDDFTagApl!='Padrao_3'))
Contas Contbeis de CRDITO;; fontweight='bold'; identlabel=10 ; visible=((lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) ;
   SubGrid-2 {
     (i)) Plano de Contas CRDITO     ; sCodCredPla_i-10       ; identlabel=15 ; esc=('dd_files/erp_PlaConta.dda','Esc_Padrao_1','sCodCredPla_i','pCContCred_i,sCodCredPla_i,sDesCredPla_i,fCContCred_i') ;  visible=(((i))<=(iTotLinSubGridPreenchidos_2)&&(lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
     Descrio                        ; sDesCredPla_i-30       ; identlabel=19 ; editable=false ; visible=(((i))<=(iTotLinSubGridPreenchidos_2)&&(lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
     % Rateio de Crdito              ; nRatCredCCont_i-18-2   ; identlabel=15 ;  visible=(((i))<=(iTotLinSubGridPreenchidos_2)&&(lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
                                      ;                                      ; visible=(((i))<=(iTotLinSubGridPreenchidos_2)&&(lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   }
   <span style='color: #00AA00_ text-decoration: underline_ cursor: pointer_' onclick='oTelaDefault.flIncSubGrid(2,"pCContCred")_'>Incluir</span> ; ; identlabel=15; visible=((iDDFChamada<2)&&(lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
  ; ; visible=((lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
Contas Contbeis de DBITO;; fontweight='bold'; identlabel=10; visible=((lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   SubGrid-3 {
     (i)) Plano de Contas DBITO      ; sCodDebPla_i-10     ; identlabel=15 ; esc=('dd_files/erp_PlaConta.dda','Esc_Padrao_1','sCodDebPla_i','pCContDeb_i,sCodDebPla_i,sDesDebPla_i,fCContDeb_i') ;  visible=(((i))<=(iTotLinSubGridPreenchidos_3)&&(lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))	
     Descrio                        ; sDesDebPla_i-30     ; identlabel=19 ; editable=false ; visible=(((i))<=(iTotLinSubGridPreenchidos_3)&&(lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
     % Rateio de Dbito               ; nRatDebCCont_i-18-2   ;  identlabel=15 ; visible=(((i))<=(iTotLinSubGridPreenchidos_3)&&(lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
                                      ;                                     ; visible=(((i))<=(iTotLinSubGridPreenchidos_3)&&(lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   }
   <span style='color: #00AA00_ text-decoration: underline_ cursor: pointer_' onclick='oTelaDefault.flIncSubGrid(3,"pCContDeb")_'>Incluir</span> ; ; identlabel=15; visible=((iDDFChamada<2)&&(lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
;  ; visible=((lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
Logstica  ;; fontweight='bold'    ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5
     Depsito Entrada              ; sUn1RFis-50            ; identlabel=10  ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3')) ; esc=('dd_files/erp_EST_RegDepositos.dda','Esc_Padrao_1','sUn1RFis,pItem,pEmi','pRegDepRFis,sUn1RFis,sUn2RFis,sUn3RFis,sUn4RFis,sUn5RFis,sUn6RFis,sUn7RFis,sInsRFis,fRegDepRFis,sUnidade') 
                                   ; sUn2RFis-50            ; editable=false ; visible=((sUn2RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
                                   ; sUn3RFis-50            ; editable=false ; visible=((sUn3RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn4RFis-50            ; editable=false ; visible=((sUn4RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn5RFis-50            ; editable=false ; visible=((sUn5RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn6RFis-50            ; editable=false ; visible=((sUn6RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn7RFis-50            ; editable=false ; visible=((sUn7RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3')) 
  	  Instncia                     ; sInsRFis-50            ; editable=false ; identlabel=10 ; visible=((lCrtlItem==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
    ;; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
Logstica  ;; fontweight='bold'    ; visible=((jEntSai==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5
   Realiza Movimentao Fisica               ; lCrtlItem          ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3') ; exec=(this.flSetVar('pDepEnt',0)&& this.flSetVar('sUn1Ent','')&& this.flSetVar('sUn2Ent','')&& this.flSetVar('sUn3Ent','')&& this.flSetVar('sUn4Ent','')&& this.flSetVar('sUn5Ent','')&& this.flSetVar('sUn6Ent','')&& this.flSetVar('sUn7Ent','')&& this.flSetVar('pInsEnt',0)&& this.flSetVar('sInsEnt',''))
;
     Depsito Sada                ; sUn1-50            ; editable=lTransfDep3o==1 ; identlabel=5   ; visible=((lCrtlItem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) ; esc=('dd_files/erp_EST_RegDepositos.dda','Esc_Padrao_1','sUn1,pItem,pEmi','pRegDepVen,sUn1,sUn2,sUn3,sUn4,sUn5,sUn6,sUn7,sIns,fRegDepVen,sUnidade') 
                                   ; sUn2-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn2!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
                                   ; sUn3-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn3!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn4-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn4!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn5-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn5!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn6-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn6!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn7-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn7!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) 
     Instncia Sada               ; sIns-50            ; editable=false ; identlabel=5 ; visible=((lCrtlItem==1)&&(pRegDepVen>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
    ;; visible=((jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
                                      ; pDepEnt-5                      ; identlabel=5  ; editable=false ; visible=((lCrtlItem==1)&&(pDepEnt>0)&&(lTransfDep3o==1)&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false ; fieldborder=0 
    Depsito Entrada                  ; sUn1Ent-50                     ; identlabel=5  ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; esc=('dd_files/erp_EST_Depositos.dda','Esc_Padrao_1','sUn1Ent','pDepEnt,fDepEnt,sUn1Ent,sUn2Ent,sUn3Ent,sUn4Ent,sUn5Ent,sUn6Ent,sUn7Ent')
                                      ; sUn2Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn2Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn3Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn3Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn4Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn4Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn5Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn5Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn6Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn6Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn7Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn7Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                        ; editable=false ; fieldborder=0 ;
     Instncia Entrada                ; sInsEnt-50                     ; identlabel=5   ; esc=('dd_files/erp_EST_Instancias.dda','Esc_Padrao_1','sInsEnt','pInsEnt,fInsEnt,sInsEnt') ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; valid=(((pInsEnt>0) ||(pDepEnt==0)),'A Instncia do Depsito de Entrada deve ser informada')
     Depsito Entrada de Transferncia Id  ; pRegDepTransf-5          ; identlabel=5   ; editable=false ; visible=((lTransfRem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
     Depsito Entrada                      ; sUnTransf1-50            ; identlabel=5   ; visible=((jEntSai==1)&&(sDDFTagApl!='Padrao_3')&&(lTransfRem==1)) ; esc=('dd_files/erp_EST_RegDepositos.dda','Esc_Padrao_1','sUn1,pItem,pEmi','pRegDepTransf,sUnTransf1,sUnTransf2,sUnTransf3,sUnTransf4,sUnTransf5,sUnTransf6,sUnTransf7,sInsTransf,fRegDepTransf,sUnidadeTransf') 
                                           ; sUnTransf2-50            ; editable=false ; visible=((sUnTransf2!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
                                           ; sUnTransf3-50            ; editable=false ; visible=((sUnTransf3!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                           ; sUnTransf4-50            ; editable=false ; visible=((sUnTransf4!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                           ; sUnTransf5-50            ; editable=false ; visible=((sUnTransf5!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                           ; sUnTransf6-50            ; editable=false ; visible=((sUnTransf6!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                           ; sUnTransf7-50            ; editable=false ; visible=((sUnTransf7!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) 
     Instncia Entrada                     ; sInsTransf-50            ; editable=false ; visible=((lTransfRem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5
     ;; visible=((lTransfDep3o)||((lTransfRem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')))
     Lote Transferncia                    ; sDesLote-40              ; identlabel=5   ; esc=('dd_files/erp_LotesItens.dda','Esc_Padrao_2','sDesLote,pItem','pLote,sDesLote,stmp,fLote') ; visible=((lTransfDep3o==1)||((lTransfRem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')&&(iLote==1))) ; valid2=(((lTransfDep3o==true)&&(iLote==1)&&(pLote==0)) ,'O Lote deve ser informado.') 
     ;; visible=((lTransfRem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Tolerncia                                ;                                   ; identlabel=5    ; fontweight='bold' ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   Controle Quantitativo                     ; lContQua                          ; identlabel=10   ; visible=((jEntSai==0)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3')) 
   % Min Divergencia Qtde Comp/Rec/NF        ; nQtMin-18-5                       ; identlabel=15   ; visible=((lContQua==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3')) 
   % Max Divergencia Qtde Comp/Rec/NF        ; nQtMax-18-5                       ; identlabel=15   ; visible=((lContQua==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))    
   Controle Preo                            ; lContPreco                        ; identlabel=10   ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))  
   Preo Min.                                ; nPrecoMin-18-5                    ; identlabel=15   ; visible=((lContPreco==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))    
   Preo Max.                                ; nPrecoMax-18-5                    ; identlabel=15   ; visible=((lContPreco==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))   
; ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   Controle Inspeco                  ; lInspecao                       ; identlabel=5   ; fontweight='bold' ; visible=((jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; exec=(this.flSetVar('pDepInsp',0) && this.flSetVar('fDepInsp',0) && this.flSetVar('pDepReje',0) && this.flSetVar('fDepReje',0) && this.flSetVar('lSkipLote',0) && thi.flSetVar('jTempo',0) && this.flSetVar('dUltInsp','') && this.flSetVar('iCiclo',0) && this.flSetVar('iCicloAtual',0)&& this.flSetVar('sUn1Insp','')&& this.flSetVar('sUn2Insp','')&& this.flSetVar('sUn3Insp','')&& this.flSetVar('sUn4Insp','')&& this.flSetVar('sUn5Insp','')&& this.flSetVar('sUn6Insp','')&& this.flSetVar('sUn7Insp','')&& this.flSetVar('sUn1Reje','')&& this.flSetVar('sUn2Reje','')&& this.flSetVar('sUn3Reje','')&& this.flSetVar('sUn4Reje','')&& this.flSetVar('sUn5Reje','')&& this.flSetVar('sUn6Reje','')&& this.flSetVar('sUn7Reje','')) 
   Depsito Inspeo                  ; pDepInsp-5                      ; identlabel=10  ; editable=false ; visible=((lInspecao==1)&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false ; fieldborder=0 
                                      ; sUn1Insp-50                     ; identlabel=10  ; visible=((lInspecao==1)&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; esc=('dd_files/erp_EST_Depositos.dda','Esc_Padrao_1','sUn1Insp','pDepInsp,fDepInsp,sUn1Insp,sUn2Insp,sUn3Insp,sUn4Insp,sUn5Insp,sUn6Insp,sUn7Insp')
                                      ; sUn2Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn2Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn3Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn3Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                        ; editable=false ; fieldborder=0 ;
                                      ; sUn4Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn4Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                        ; editable=false ; fieldborder=0 ;
                                      ; sUn5Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn5Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn6Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn6Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn7Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn7Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                        ; editable=false ; fieldborder=0 ;
   ;                                                                                     ; editable=false ; visible=((lInspecao==1)&&(pDepInsp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))
   Depsito Rejeito                   ; pDepReje-5                      ; identlabel=10  ; editable=false ; visible=((lInspecao==1)&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false ; fieldborder=0 
                                      ; sUn1Reje-50                     ; identlabel=10  ; visible=((lInspecao==1)&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))  ; esc=('dd_files/erp_EST_Depositos.dda','Esc_Padrao_1','sUn1Reje','pDepReje,fDepReje,sUn1Reje,sUn2Reje,sUn3Reje,sUn4Reje,sUn5Reje,sUn6Reje,sUn7Reje')
                                      ; sUn2Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn2Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn3Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn3Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn4Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn4Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn5Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn5Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn6Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn6Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn7Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn7Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
   ;
   Declarao de Importao                                  ; lImport                                     ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; editalbe=(jOrig==1) ; visible=(sDDFTagApl!='Padrao_3')
      Nmero Documento Importao DI/DSI/DA                  ; sDI_nDI-10                                  ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Data Registro DI/DSI/DA                                ; dDI_dDI                                     ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Local Desembarao                                      ; sDI_xLocDesemb-60                           ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      UF Desembarao                                         ; sDI_UFDesemb-2                              ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Data Desembarao                                       ; dDI_dDesemb                                 ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Cdigo Exportador                                      ; sDI_cExportador-60                          ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Via de transporte internacional                        ; aDI_tpViaTransp[jDI_tpViaTransp]            ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Valor da AFRMM                                         ; nDI_vAFRMM-13-2                             ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Forma de importao quanto a intermediao             ; aDI_tpIntermedio[jDI_tpIntermedio]          ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      CNPJ do adquirente ou do encomendante                  ; sDI_CNPJ-14                                 ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Sigla da UF do adquirente ou do encomendante           ; sDI_UFTerceiro-2                            ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
   Situao Tributria do II                                 ; lImposImpor                                 ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pIIRegFis-6,fIIRegFis-3                     ; identlabel=5     ; editable=false ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3'))
      Valor BC Imposto Importao                            ; nII_vBC-16-2                                ; identlabel=5     ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false
      Valor Despesas Aduaneiras                              ; nII_vDespAdu-16-2                           ; identlabel=5     ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false
      Valor Imposto Importao                               ; nII_vII-16-2                                ; identlabel=5     ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false
      Valor Imposto sobre Operaes Financeiras              ; nII_vIOF-16-2                               ; identlabel=5     ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false
      Valor Total tributos federais, estaduais e municipais  ; nImp_vTotTrib-16-2                          ; identlabel=5     ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3')) ; 
   Adies                                                   ; lAdicoes                                    ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Nmero Adio                                          ; iAdi_nAdicao-3                              ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3'))          
      Nmero Sequencial Item                                 ; iAdi_nSeqAdic-3                             ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3')) 
      Cdigo Fabricante Estrangeiro                          ; sAdi_cFabricante-60                         ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3'))
      Valor Desconto                                         ; nAdi_vDescDI-16-2                           ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3')) 
      Nmero Pedido Compra                                   ; sAdi_xPed-15                                ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3'))
      Item Pedido Compra                                     ; iAdi_nItemPed-6                             ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3'))
   Informaes da CIDE                                       ; lCIDE                                       ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      BC CIDE                                                ; nCIDE_qBCprod-17-4                          ; identlabel=5     ; editable=false ;visible=((lCIDE>0)&&(sDDFTagApl!='Padrao_3')) ; 
      Valor aliquota CIDE                                    ; nCIDE_vAliqProd-16-4                        ; identlabel=5     ; editable=false ;visible=((lCIDE>0)&&(sDDFTagApl!='Padrao_3')) ; 
      Valor CIDE                                             ; nCIDE_vCIDE-16-2                            ; identlabel=5     ; editable=false ;visible=((lCIDE>0)&&(sDDFTagApl!='Padrao_3')) ; 
   ICMS Operao Prpria e ST                                ; lICMS_ST                                    ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pICMSRegFis-6,fICMSRegFis-3                 ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Regime Especial ICMS                                   ; lRE                                         ; identlabel=5     ; editable=false ;   visible=((jEntSai==1)&&(lICMS_ST>0)) ; identlabel=5
      Grupo de Tributao/CST                                ; aICMS_GrupoTrib[jICMS_GrupoTrib]-30         ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Modalidade Determinao BC/ICMS                        ; aICMS_modBC[jICMS_modBC]-30                 ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib!=3)&&(jICMS_GrupoTrib!=4)&&(jICMS_GrupoTrib!=5)&&(jICMS_GrupoTrib!=6)&&(jICMS_GrupoTrib!=8)&&(sDDFTagApl!='Padrao_3'))
      Percentual Reduo BC                                  ; nICMS_pRedBC-12-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==7)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS                                          ; nICMS_vBC-16-2                              ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib!=3)||(jICMS_GrupoTrib!=4)||(jICMS_GrupoTrib!=5)||(jICMS_GrupoTrib!=6)||(jICMS_GrupoTrib!=8))&&(sDDFTagApl!='Padrao_3'))
      Alquota Imposto                                       ; nICMS_pICMS-12-2                             ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib!=3)||(jICMS_GrupoTrib!=4)||(jICMS_GrupoTrib!=5)||(jICMS_GrupoTrib!=6)||(jICMS_GrupoTrib!=8))&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS                                             ; nICMS_vICMS-16-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib!=3)||(jICMS_GrupoTrib!=8))&&(sDDFTagApl!='Padrao_3'))
      Modalidade Determinao BC/ICMS ST                     ; aICMS_modBCST[jICMS_modBCST]-30             ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Percentual Margem Valor adicionado ICMS ST             ; nICMS_pMVAST-12-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Percentual Reduo BC/ICMS ST                          ; nICMS_pRedBCST-12-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS ST                                       ; nICMS_vBCST-16-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Alquota Imposto ICMS ST                               ; nICMS_pICMSST-12-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST                                          ; nICMS_vICMSST-16-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS ST Retido                                ; nICMS_vBCSTRet-16-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib==8)&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST Retido                                   ; nICMS_vICMSSTRet-16-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib==8)&&(sDDFTagApl!='Padrao_3'))
      Motivo desonerao ICMS                                ; aICMS_motDesICMS[jICMS_motDesICMS]-30       ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==4)||(jICMS_GrupoTrib==5)||(jICMS_GrupoTrib==6)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS desonerado                               ; nICMS_vICMSDeson-13-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==4)||(jICMS_GrupoTrib==5)||(jICMS_GrupoTrib==6)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      ;;visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==2)&&(sDDFTagApl!='Padrao_3')))
      Cdigo do Beneficirio                                 ; sCBenef-15                                  ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==2)&&(sDDFTagApl!='Padrao_3')))
      ; ; visible=(lICMS_ST>0)
      Valor BC ICMS na UF de destino                         ; nVBCUFDest-13-2                             ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor da BC FCP na UF de destino                       ; nVBCFCPUFDest-13-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Percentual ICMS relativo ao (FCP) na UF de destino     ; nPFCPUFDest-13-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota interna da UF de destino                      ; nPICMSUFDest-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota interestadual das UF envolvidas               ; nPICMSInter-13-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Percentual provisrio partilhado ICMS Interestadual    ; nPICMSInterPart-13-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS relativo ao (FCP) da UF de destino       ; nVFCPUFDest-13-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS Interestadual para a UF de destino       ; nVICMSUFDest-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS Interestadual para a UF do remetente     ; nVICMSUFRemet-13-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS prprio do Substituto                    ; nICMS_vICMSSubstituto-13-2                  ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor da BC do FCP                                     ; nICMS_vBCFCP-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)))                                          
      Percentual do FCP                                      ; nICMS_pFCP-13-2                             ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)))
      Valor do FCP                                           ; nICMS_vFCP-13-2                             ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)))
      Valor da BC do FCP retido por ST                       ; nICMS_vBCFCPST-13-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==7)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10)))
      Percentual do FCP retido por ST                        ; nICMS_pFCPST-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==7)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10)))
      Valor do FCP retido por ST                             ; nICMS_vFCPST-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==7)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10)))
      Valor da BC do FCP retido anteriormente por ST         ; nICMS_vBCFCPSTRet-13-2                      ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && (jICMS_GrupoTrib==8))
      Percentual do FCP retido anteriormente por ST          ; nICMS_pFCPSTRet-13-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && (jICMS_GrupoTrib==8))
      Valor do FCP retido por ST                             ; nICMS_vFCPSTRet-13-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && (jICMS_GrupoTrib==8))
      Valor do ICMS da Operao                              ; nICMS_vICMSOp-13-2                          ; identlabel=5     ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib==7)&&(sDDFTagApl!='Padrao_3'))
      Percentual do Diferimento                              ; nICMS_pDif-13-2                             ; identlabel=5     ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib==7)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS Diferido                                 ; nICMS_vICMSDif-13-2                         ; identlabel=5     ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib==7)&&(sDDFTagApl!='Padrao_3'))
    ICMS Partilhado                                          ; lICMS_P                                     ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pICMSPartRegFis-6,fICMSPartRegFis-3         ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3')) 
      Tributao  ICMS                                       ; aICMSPart_CST[jICMSPart_CST]-30             ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Modalidade determinao BC do ICMS                     ; aICMSPart_modBC[jICMSPart_modBC]-30         ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Valor da BC  ICMS                                      ; nICMSPart_vBC-16-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Percentual  Reduo de BC                              ; nICMSPart_pRedBC-6-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota  imposto                                      ; nICMSPart_pICMS-6-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS                                          ; nICMSPart_vICMS-16-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Modalidade determinao BC/ICMS ST                     ; aICMSPart_modBCST[jICMSPart_modBCST]-30     ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Percentual margem valor Adicionado ICMS ST             ; nICMSPart_pMVAST-6-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))                   
      Percentual Reduo BC/ICMS ST                          ; nICMSPart_pRedBCT-6-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS ST                                       ; nICMSPart_vBCST-16-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota imposto ICMS                                  ; nICMSPart_pICMSST-6-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST                                          ; nICMSPart_vICMSST-16-2                      ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Percentual BC operao prpria                         ; nICMSPart_pBCOp-6-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      UF para qual devido ICMS ST                            ; sICMSPart_UFST-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
   ICMS ST - Repasse de ICMS ST Retido                       ; lICMS_RR                                    ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pICMSSTRetRegFis-6,fICMSSTRetRegFis-3       ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
      Tributao do ICMS                                     ; aICMSST_CST[jICMSST_CST]-30                 ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS ST retido na UF remetente                ; nICMSST_vBCSTRet-16-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST retido UF remetente                      ; nICMSST_vICMSSTRe-16-2                      ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS ST UF destino                            ; nICMSST_vBCSTDest-16-2                      ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST UF destino                               ; nICMSST_vICMSSTDes-16-2                     ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
  ICMS Simples Nacional                                      ; lICMS_SN                                    ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pICMSSNRegFis-6,fICMSSNRegFis-3             ; identlabel=5     ; editable=false  ;visible=((lICMS_SN>0)&&(sDDFTagApl!='Padrao_3'))      
      Cdigo do Tipo do ICMS                                 ; aGrupo_simples[jGrupo_simples]              ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(sDDFTagApl!='Padrao_3'))
      Cdigo Situao Operao                               ; aICMSSN_CSOSN[jICMSSN_CSOSN]                ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(sDDFTagApl!='Padrao_3'))
      Modalidade determinao BC do ICMS                     ; aICMSSN_modBC[jICMSSN_modBC]                ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==9)&&(sDDFTagApl!='Padrao_3'))
      Valor BC ICMS                                          ; nICMSSN_vBC-16-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==9)&&(sDDFTagApl!='Padrao_3'))
      Percentual Reduo BC do ICMS                          ; nICMSSN_pRedBC-6-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==9)&&(sDDFTagApl!='Padrao_3'))
      Alquota Imposto                                       ; nICMSSN_pICMS-6-2                           ; identlabel=5     ; editable=false ; visible=(((jGrupo_simples==9)||(jGrupo_simples==4))&&(sDDFTagApl!='Padrao_3')&&(lICMS_SN>0))
      Valor ICMS                                             ; nICMSSN_vICMS-16-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==9)&&(sDDFTagApl!='Padrao_3'))
      Modalidade determinao BC ICMS ST                     ; aICMSSN_modBCST[jICMSSN_modBCST]            ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Percentual margem valor Adicionado  ICMS ST            ; nICMSSN_pMVAST-6-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Percentual Reduo BC ICMS ST                          ; nICMSSN_pRedBCST-6-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Valor BC ICMS ST                                       ; nICMSSN_vBCST-16-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Alquota imposto do ICMS ST                            ; nICMSSN_pICMSST-6-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST                                          ; nICMSSN_vICMSST-16-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Alquota aplicvel clculo do crdito                  ; nICMSSN_pCredSN-6-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==0)||(jGrupo_simples==3)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Valor crdito ICMS que pode ser aproveitado nos        ;                                             ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==0)||(jGrupo_simples==3)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      termos do art. 23 da LC 123                            ; nICMSSN_vCredICMSSN-16-2                    ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==0)||(jGrupo_simples==3)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Valor BC ICMS ST retido                                ; nICMSSN_vBCSTRet-16-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==8)&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST retido                                   ; nICMSSN_vICMSSTRet-16-2                     ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==8)&&(sDDFTagApl!='Padrao_3'))
      Valor da BC do FCP retido por ST                       ; nICMSSN_vBCFCPST-13-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& ((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9)))
      Percentual do FCP retido por ST                        ; nICMSSN_pFCPST-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& ((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9)))
      Valor do FCP retido por ST                             ; nICMSSN_vFCPST-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& ((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))) 
      Valor da BC do FCP retido anteriormente por ST         ; nICMSSN_vBCFCPSTRet-13-2                      ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& (jGrupo_simples==8))
      Percentual do FCP retido anteriormente por ST          ; nICMSSN_pFCPSTRet-13-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& (jGrupo_simples==8))
      Valor do FCP retido por ST                             ; nICMSSN_vFCPSTRet-13-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& (jGrupo_simples==8)) 
   IPI                                                       ; lIPI                                        ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pIPIRegFis-6,fIPIRegFis-3                   ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))                            
       Regime Especial IPI                                   ; lIPI_RE                                     ; identlabel=5     ; editable=false ;   visible=((jEntSai==1)&&(lIPI>0)) ; identlabel=5
      IPI por Unidade Tributvel                             ; lIPI_UT-5                                   ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))                            
      Classe enquadramento IPI Cigarros/Bebidas              ; sIPI_clEnq-5                                ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))                            
      CNPJ produtor mercadoria,                              ;                                             ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      diferente emitente Somente para os casos               ;                                             ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      exportao direta/indireta                             ; sIPI_CNPJProd-14                            ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Cdigo selo controle IPI                               ; sIPI_cSelo-60                               ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Quantidade selo controle                               ; nIPI_qSelo-12-0                             ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Cdigo Enquadramento Legal IPI                         ; sIPI_cEnq-3                                 ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Cdigo Situao Tributria IPI                         ; aIPINT_CST[jIPINT_CST]                      ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Valor BC IPI                                           ; nIPITrib_vBC-16-2                           ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota IPI                                           ; nIPITrib_pIPI-6-2                           ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Quantidade total na unidade padro para                ;                                             ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      tributao(produtos tributados por unidade)            ; nIPITrib_qUnid-17-4                         ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Valor por Unidade Tributvel                           ; nIPITrib_vUnid-16-4                         ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Valor IPI                                              ; nIPITrib_vIPI-16-2                          ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Cdigo Exceo Tabela IPI                              ; sProd_EX_TIPI-3                             ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
   PIS                                                       ; lPIS                                        ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pPISRegFis-6,fPISRegFis-3                   ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Cdigo Situao Tributria PIS                         ; aPIS_CST[jPIS_CST]                          ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Valor Base Clculo PIS                                 ; nPIS_vBC-16-2                               ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Alquota PIS (em percentual)                           ; nPIS_pPIS-6-2                               ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Quantidade Vendida                                     ; nPIS_qBCProd-17-4                           ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Alquota PIS (em reais)                                ; nPIS_vAliqProd-16-4                         ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Valor PIS                                              ; nPIS_vPIS-16-2                              ; identlabel=5     ; editable=false ; visible=(lPIS>0)
   PIS ST                                                    ; lPIS_ST                                     ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pPISSTRegFis-6,fPISSTRegFis-3               ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor Base Clculo PIS                                 ; nPISST_vBC-16-2                             ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota PIS (em percentual)                           ; nPISST_pPIS-6-2                             ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Quantidade Vendida                                     ; nPISST_qBCProd-17-4                         ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota PIS (em reais)                                ; nPISST_vAliqProd-16-4                       ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor PIS                                              ; nPISST_vPIS-16-2                            ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
   COFINS                                                    ; lCofins                                     ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pCofinsRegFis-6,fCofinsRegFis-3             ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Cdigo de Situao Tributria COFINS                   ; aCOFINS_CST[jCOFINS_CST]                    ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Valor Base Clculo COFINS                              ; nCOFINS_vBC-16-2                            ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Alquota COFINS (em percentual)                        ; nCOFINS_pCOFINS-6-2                         ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Quantidade Vendida                                     ; nCOFINS_qBCProd-17-4                        ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Alquota COFINS (em reais)                             ; nCOFINS_vAliqProd-16-4                      ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Valor COFINS                                           ; nCOFINS_vCOFINS-16-2                        ; identlabel=5     ; editable=false ; visible=(lCofins>0)
   COFINS ST                                                 ; lCofins_ST                                  ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pCofinsSTRegFis-6,fCofinsSTRegFis-3         ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor da Base de Clculo COFINS                        ; nCOFINSST_vBC-16-2                          ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))      
      Alquota COFINS (em percentual)                        ; nCOFINSST_pCOFINS-6-2                       ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))   
      Quantidade Vendida                                     ; nCOFINSST_qBCProd-17-4                      ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))   
      Alquota COFINS (em reais)                             ; nCOFINSST_vAliqProd-16-4                    ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor COFINS                                           ; nCOFINSST_vCOFINS-16-2                      ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))   
   ISSQN                                                     ; lISSQN                                      ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pISSQNRegFis-6,fISSQNRegFis-3               ; identlabel=5     ; editable=false   ;visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor Base Clculo ISSQN                               ; nISSQN_vBC-16-2                             ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Alquota ISSQN                                         ; nISSQN_vAliq-6-2                            ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor ISSQN                                            ; nISSQN_vISSQN-16-2                          ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor Deduo para Reduo da Base de Clculo          ; nISSQN_vDeducao-16-2                          ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor outras Retenes                                 ; nISSQN_vOutro-16-2                          ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor Desconto Incondicionado                          ; nISSQN_vDescIncond-16-2                     ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor Desconto Condicionado                            ; nISSQN_vDescCond-16-2                       ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor Reteno ISS                                     ; nISSQN_vISSRet-16-2                         ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Indicador da Exigibilidade do ISS                      ; aISSQN_indISS[jISSQN_indISS]-16-2           ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Nr.Processo Jud/Adm de suspenso da exigibilidade      ; sISSQN_nProcesso-30                         ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Indicador de incentivo Fiscal                          ; lISSQN_indIncentivo                         ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      ; ; visible=(lISSQN>0)
      Servio Prestado dentro do Municpio                   ; sISSQN_sServico-50                          ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; esc=('dd_files/erp_TipoServico.dda','Esc_Padrao_1','sISSQN_sServico','pISSQN_cServico,sISSQN_cServico,sISSQN_sServico,fISSQN_cServico')
      Cdigo do Servio Prestado dentro do Municpio         ; sISSQN_cServico-30                          ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; editable=false
      ; ; visible=(lISSQN>0)
      Municpio de Incidncia do Imposto                     ; sISSQN_sMun-50                              ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; esc=('dd_files/Cidades.dda','Esc_Padrao_1','sISSQN_cMun','sISSQN_sMun,stmp,pISSQN_cMun,stmp,pISSQN_cPais,sISSQN_sPais,fISSQN_cMun,fISSQN_cPais,sISSQN_cMun,sISSQN_cPais')
      Cdigo do Municpio de Incidncia do Imposto           ; sISSQN_cMun-10                              ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; editable=false
      ; ; visible=(lISSQN>0)
      Pas onde o Servio foi Prestado                       ; sISSQN_sPais-10                             ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; esc=('dd_files/erp_Paises.dda','Esc_Padrao_1','sISSQN_sPais','pISSQN_cPais,sISSQN_cPais,sISSQN_sPais,fISSQN_cPais')
      Cdigo do Pas onde o Servio foi Prestado             ; sISSQN_cPais-10                             ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; editable=false
      ; ; visible=(lISSQN>0)
      Cdigo municpio ocorrncia fato gerador ISSQN         ; nISSQN_cMunFG-8-0                           ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Item da Lista de Servios                              ; nISSQN_cListServ-5-0                        ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Cdigo Tributao ISSQN                                ; aISSQN_cSitTrib[jISSQN_cSitTrib]             ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
   Transparncia Fiscal                                      ; lTranspFiscal                               ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=((jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
     Alquota Nacional                                       ; nAliqTranspNac-6-2                          ; identlabel=10    ; editable=false  ; visible=((lTranspFiscal>0)&&((jOrig!=1)&&(jOrig!=6))&&(sDDFTagApl!='Padrao_3'))
     Alquota Importada                                      ; nAliqTranspImport-6-2                       ; identlabel=10    ; editable=false  ; visible=((lTranspFiscal>0)&&((jOrig==1)||(jOrig==6))&&(sDDFTagApl!='Padrao_3'))
     Valor Tributado Transparencia Fiscal                    ; nTot_vTrib-6-2                              ; identlabel=10    ; editable=false  ; visible=((lTranspFiscal>0)&&(sDDFTagApl!='Padrao_3'))
  ;
Dados Fiscais (Imposto Seletivo/IBS/CBS)   ;  ; fontweight='bold';  identlabel=5
   Imposto Seletivo                                                    ; lImpSel                         ; identlabel=5  ; fontweight='bold'; edtzoom=true
      Registro Fiscal Id/Verso                                        ; pISRegFis-6,fISRegFis-3         ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ; 
      Classificao Tributria do Imposto Seletivo                     ; sIS_ClassTribIS-20              ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      Situao Tributria do Imposto Seletivo                          ; sIS_CodCSTIS-20                 ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ; 
                                                                       ; sIS_CSTIS-60                    ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      Valor Base de Clculo Imposto Seletivo                           ; nIS_vBCIS-18-5                  ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      % Imposto Seletivo                                               ; nIS_pIS-18-5                    ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      % Especfica por Unidade Apropriada                              ; nIS_pISEspec-18-5               ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      Unidade de Medida Tributvel                                     ; sIS_uTrib-6                     ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      Quantidade Tributvel                                            ; nIS_qTrib-18-5                  ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      Valor Imposto Seletivo                                           ; nIS_vIS-18-5                    ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
   ; ; visible=(lImpSel==1)
   IBS / CBS                                                                ; lIBSCBS                         ; identlabel=5  ; fontweight='bold'; edtzoom=true
       Classificao Tributria do IBS e CBS                                ; sIBSCBS_ClassTrib-20            ; identlabel=10 ; visible=(lIBSCBS==1) ; editable=false ;
       Situao Tributria do IBS e CBS                                     ; sIBSCBS_CodCST-20               ; identlabel=10 ; visible=(lIBSCBS==1) ; editable=false ; 
                                                                            ; sIBSCBS_CST-60                  ; identlabel=10 ; visible=(lIBSCBS==1) ; editable=false ;
       ;
       Valor Base de Clculo IBS/CBS                                        ; nIBSCBS_vBC-18-5                  ; identlabel=10 ; visible=(lIBSCBS==1)  ; editable=false ;
       IBSUF                                                                ;                                 ; identlabel=10 ; fontweight='bold'; visible=(lIBSCBS==1)
         Registro Fiscal Id/Verso                                          ; pRegFisIBS-6,fRegFisIBS-3       ; identlabel=10 ; visible=(lIBSCBS==1)  ; editable=false ; 
         % IBS Competncia UF                                               ; nIBSUF_pIBSUF-18-5              ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ;
         % Diferimento                                                      ; nIBSUF_pDif-18-5                ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ;
         Valor Diferimento                                                  ; nIBSUF_vDif-18-5                ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ;
         Valor Tributo Devolvido                                            ; nIBSUF_vDevTrib-18-5            ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ;
         % Reduo alquota cClassTrib                                      ; nIBSUF_pRedAliq-18-5            ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % IBS Competncia das UF que ser aplicada a Base de Clculo       ; nIBSUF_pAliqEfet-18-5           ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor IBS Competncia UF                                           ; nIBSUF_vIBSUF-18-5              ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
      IBSMun                                                                ;                                 ; identlabel=10 ; fontweight='bold'; visible=(lIBSCBS==1)
         Registro Fiscal Id/Verso                                        ; pRegFisIBSMun-6,fRegFisIBSMun-3     ; identlabel=10 ; visible=(lIBSCBS==1)  ; editable=false ; 
         % IBS Competncia Municpio                                        ; nIBSMun_pIBSMun-18-5            ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % Diferimento                                                      ; nIBSMun_pDif-18-5               ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor Diferimento                                                  ; nIBSMun_vDif-18-5               ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor Tributo Devolvido                                            ; nIBSMun_vDevTrib-18-2           ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % Reduo alquota cClassTrib                                      ; nIBSMun_pRedAliq-18-5           ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % IBS Competncia do Municpio que ser aplicada a Base de Clculo ; nIBSMun_pAliqEfet-18-5          ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor IBS Competncia Municpio                                    ; nIBSMun_vIBSMun-18-2            ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
      Total IBS UF + IBS Municipio                                          ; nIBSCBS_vIBS-18-2           ; identlabel=10  ; fontweight='bold'; editable=false ; visible=(lIBSCBS==1)
      CBS                                                                   ;                                 ; identlabel=10 ; fontweight='bold'; visible=(lIBSCBS==1)
         Registro Fiscal Id/Verso                                        ; pRegFisCBS-6,fRegFisCBS-3         ; identlabel=10 ; visible=(lIBSCBS==1)  ; editable=false ; 
         % CBS                                                              ; nCBS_pCBS-18-5                  ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % Diferimento                                                      ; nCBS_pDif-18-5                  ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor Diferimento                                                  ; nCBS_vDif-18-2                  ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor Tributo Devolvido                                            ; nCBS_vDevTrib-18-2           ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % Reduo alquota cClassTrib                                      ; nCBS_pRedAliq-18-5              ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % CBS que ser aplicada a Base de Clculo                          ; nCBS_pAliqEfet-18-5             ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor da CBS                                                       ; nCBS_vCBS-18-2            ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
 ;
</ScriptForm1>
<VarsToServer1>
   pPId
   iVer
   pOrdem   = {ChaveAtual_1}
   nQtMoe
   pCam  
   fCam  
   pMoe  
   fMoe  
   nCam  
   sCam
   jCam
   lInspecao
   lRE
   lIPI_RE
   lIPI_UT
   nVBCUFDest
   nPFCPUFDest
   nPICMSUFDest
   nPICMSInter
   nPICMSInterPart
   nVFCPUFDest
   nVICMSUFDest
   nVICMSUFRemet
   nICMS_vBCFCP
   nICMS_pFCP
   nICMS_vFCP
   nICMS_vBCFCPST
   nICMS_pFCPST
   nICMS_vFCPST
   nICMS_vBCFCPSTRet
   nICMS_pFCPSTRet
   nICMS_vFCPSTRet
   nVBCFCPUFDest
   nICMSSN_pFCPST
   nICMSSN_vFCPST
   nICMSSN_vBCFCPST
   nICMSSN_pFCPSTRet
   nICMSSN_vFCPSTRet
   nICMSSN_vBCFCPSTRet
   pDepInsp
   pDepReje
   fDepInsp
   fDepReje
   tUltInsp = dUltInsp
   pInsp
   fInsp
   nVDescLog
   nVTCI = jOrig==1 ? nProd_vProd+nProd_vFrete+nProd_vSeg+nII_vII : 0 
   pDepEnt
   pInsEnt
   nPAcresCRTOsa
   nVAcresCRTOsa
   jDI_tpViaTransp    
   nDI_vAFRMM         
   jDI_tpIntermedio   
   sDI_CNPJ           
   sDI_UFTerceiro     
   nImp_vTotTrib      
   nICMS_vICMSDeson   
   nICMS_vICMSOp      
   nICMS_pDif         
   nICMS_vICMSDif     
   nISSQN_vDeducao    
   nISSQN_vOutro      
   nISSQN_vDescIncond 
   nISSQN_vDescCond   
   nISSQN_vISSRet     
   jISSQN_indISS      
   pISSQN_cServico    
   fISSQN_cServico    
   pISSQN_cMun        
   pISSQN_cPais       
   fISSQN_cMun        
   fISSQN_cPais       
   sISSQN_nProcesso   
   lISSQN_indIncentivo
   nCTR_VlCalcI
   jFinalidade
   sFCI
   pRegDepVen
   fRegDepVen
   pRegDepTransf
   fRegDepTransf
   pMotAltPed
   fMotAltPed
   lImport     
   lImposImpor 
   lAdicoes    
   lCIDE       
   lICMS_ST    
   lICMS_P     
   lICMS_RR    
   lICMS_SN    
   lIPI        
   lPIS        
   lPIS_ST     
   lCofins     
   lCofins_ST  
   lISSQN      
   lTranspFiscal
   nTot_vTrib 
   nAliqTranspImport
   nAliqTranspNac   
   pRegDepRFis
   fRegDepRFis
   jBC_PIS
   jBC_COFINS
   jBC_ICMS
   jBC_IPI
   jBC_ICMSST
   jBC_II
   jBC_ISS
   jVl_ICMSST
   jVl_ICMS
   nBC_ICMS
   nBC_COFINS
   nBC_PIS
   nBC_IPI
   nBC_ICMSST
   nBC_II
   nBC_ISS
   nVl_ICMSST
   nVl_ICMS
   nICMS_vICMSSubstituto
   nPEncFinTpED
   lCCusto  
   lCrtlItem
   jOrig
   iSerial
   jFDiasEnt
   iDiasInf
   iDiasCalc
   pItem 
   pUni         
   fUni
   pNeg          = jTipo==0 ? 1  : pNeg  
   fNeg          = jTipo==0 ? 1  : fNeg  
   pTab  = 0         
   fTab  = 0        
   pTabI = 0        
   fTabI = 0        
   pTabGrpP = 0 
   fTabGrpP = 0 
   pTabGrpPI= 0 
   fTabGrpPI= 0 
   pNCM    
   fNCM    
   pCFO    
   fCFO    
   jTipo
   nQt
   tEntPla 
   tEmissao
   tSaida
   pItem
   fItem
   nDesc
   nQtMin
   nQtMax
   nPrecoMin
   nPrecoMax
   lContQua
   lContPreco
   iCiclo
   iCicloAtual
   jTempo
   lSkipLote
   nPrBruto
   nPDescCP = nDFin
   nVDescCP
   nPDescTpED = nDescFin
   nVDescTpED
   nVEncFinTpED
   nPDescTpEDG
   nVDescTpEDG
   nPDescInc
   nVDescInc
   nProd_pDesc
   pPTOpEDItem
   fPTOpEDItem
   pPTOpEDGrpItem
   fPTOpEDGrpItem
   pLote
   fLote
   nProd_vUnCom
   nProd_vProd
   nProd_vFrete
   nVMLE
   nProd_vSeg
   nProd_vDesc
   nProd_vOutro
   jProd_indTot
   sDI_nDI               
   dDI_dDI               
   sDI_xLocDesemb        
   sDI_UFDesemb          
   dDI_dDesemb           
   sDI_cExportador  
   iAdi_nAdicao          
   iAdi_nSeqAdic         
   sAdi_cFabricante      
   nAdi_vDescDI          
   sAdi_xPed             
   iAdi_nItemPed
   nCIDE_qBCprod
   nCIDE_vAliqProd
   nCIDE_vCIDE
   jICMS_GrupoTrib    
   jICMS_orig
   jICMS_modBC
   nICMS_vBC
   nICMS_pICMS
   nICMS_vICMS
   jICMS_modBCST
   nICMS_pMVAST
   nICMS_pRedBCST
   nICMS_vBCST
   nICMS_pICMSST
   nICMS_vICMSST
   nICMS_pRedBC
   jICMS_motDesICMS
   nICMS_vBCSTRet
   nICMS_vICMSSTRet
   jICMSPart_orig
   jICMSPart_CST
   jICMSPart_modBC
   nICMSPart_vBC
   nICMSPart_pRedBC
   nICMSPart_pICMS
   nICMSPart_vICMS
   jICMSPart_modBCST
   nICMSPart_pMVAST
   nICMSPart_pRedBCT
   nICMSPart_vBCST
   nICMSPart_pICMSST
   nICMSPart_vICMSST
   nICMSPart_pBCOp
   sICMSPart_UFST
   jICMSST_orig
   jICMSST_CST
   nICMSST_vBCSTRet
   nICMSST_vICMSSTRe
   nICMSST_vBCSTDest
   nICMSST_vICMSSTDes
   jGrupo_simples
   jICMSSN_Orig
   jICMSSN_CSOSN
   nICMSSN_pCredSN
   nICMSSN_vCredICMSSN
   jICMSSN_modBCST
   nICMSSN_pMVAST
   nICMSSN_pRedBCST
   nICMSSN_vBCST
   nICMSSN_pICMSST
   nICMSSN_vICMSST
   nICMSSN_vBCSTRet
   nICMSSN_vICMSSTRet
   jICMSSN_modBC
   nICMSSN_vBC
   nICMSSN_pRedBC
   nICMSSN_pICMS
   nICMSSN_vICMS
   sIPI_clEnq
   sIPI_CNPJProd
   sIPI_cSelo   
   nIPI_qSelo   
   sIPI_cEnq    
   jIPINT_CST      
   nIPITrib_vBC 
   nIPITrib_pIPI
   nIPITrib_qUnid
   nIPITrib_vUnid
   nIPITrib_vIPI 
   nII_vBC 
   nII_vDespAdu
   nII_vII     
   nII_vIOF    
   jPIS_CST  
   nPIS_vBC 
   nPIS_pPIS 
   nPIS_vPIS 
   nPIS_qBCProd 
   nPIS_vAliqProd 
   nPISST_vBC 
   nPISST_pPIS
   nPISST_qBCProd 
   nPISST_vAliqProd
   nPISST_vPIS
   jCOFINS_CST  
   nCOFINS_vBC  
   nCOFINS_pCOFINS 
   nCOFINS_vCOFINS 
   nCOFINS_qBCProd
   nCOFINS_vAliqProd
   nCOFINSST_vBC
   nCOFINSST_pCOFINS
   nCOFINSST_qBCProd
   nCOFINSST_vAliqProd
   nCOFINSST_vCOFINS
   nISSQN_vBC
   nISSQN_vAliq
   nISSQN_vISSQN
   nISSQN_cMunFG
   nISSQN_cListServ
   jISSQN_cSitTrib
   sInfAdProd = mInfAdProd
   pOrdens_Item_CCusto_{i}
   pCCusto_{i}
   fCCusto_{i}
   nRatCCusto_{i}
   pOrdens_Item_CContCred_{i}
   pCContCred_{i}
   fCContCred_{i}
   nRatCredCCont_{i}
   pOrdens_Item_CContDeb_{i}
   pCContDeb_{i}
   fCContDeb_{i}
   nRatDebCCont_{i}
</VarsToServer1>
<VarsToDb1>  
   sDDFTabela = Ordens_Itens
   aSerial[]  = 'OSa_{ChaveAtual_1}'
   iSerial    = $aSerial[0]
   nQtMoe
   pCam  
   fCam 
   pMoe
   fMoe
   nCam
   sCam
   jCam
   nVBCUFDest
   nPFCPUFDest
   nPICMSUFDest
   nPICMSInter
   nPICMSInterPart
   nVFCPUFDest
   nVICMSUFDest
   nVICMSUFRemet
   nVBCFCPUFDest
   nICMS_vBCFCP
   nICMS_pFCP
   nICMS_vFCP
   nICMS_vBCFCPST
   nICMS_pFCPST
   nICMS_vFCPST
   nICMS_vBCFCPSTRet
   nICMS_pFCPSTRet
   nICMS_vFCPSTRet
   nICMSSN_pFCPST
   nICMSSN_vFCPST
   nICMSSN_vBCFCPST
   nICMSSN_pFCPSTRet
   nICMSSN_vFCPSTRet
   nICMSSN_vBCFCPSTRet
   pRegDepVen
   fRegDepVen
   sFCI
   nVDescLog
   pDepInsp
   pDepReje
   fDepInsp
   fDepReje
   tUltInsp
   pInsp
   fInsp
   nVTCI
   pDepEnt
   pInsEnt
   lRE
   lIPI_RE
   lIPI_UT
   lInspecao
   pRegDepRFis
   fRegDepRFis
   pRegDepTransf
   fRegDepTransf
   pMotAltPed
   fMotAltPed
   nPAcresCRTOsa
   nVAcresCRTOsa
   jDI_tpViaTransp    
   nDI_vAFRMM         
   jDI_tpIntermedio   
   sDI_CNPJ           
   sDI_UFTerceiro     
   nImp_vTotTrib      
   nICMS_vICMSDeson   
   nICMS_vICMSOp      
   nICMS_pDif         
   nICMS_vICMSDif     
   nISSQN_vDeducao    
   nISSQN_vOutro      
   nISSQN_vDescIncond 
   nISSQN_vDescCond   
   nISSQN_vISSRet     
   jISSQN_indISS      
   pISSQN_cServico    
   fISSQN_cServico    
   pISSQN_cMun        
   pISSQN_cPais       
   fISSQN_cMun        
   fISSQN_cPais       
   sISSQN_nProcesso   
   lISSQN_indIncentivo
   lImport     
   lImposImpor 
   lAdicoes    
   lCIDE       
   lICMS_ST    
   lICMS_P     
   lICMS_RR    
   lICMS_SN    
   lIPI        
   lPIS        
   lPIS_ST     
   lCofins     
   lCofins_ST  
   lISSQN      
   lTranspFiscal
   nCTR_VlCalcI
   jBC_PIS
   jBC_COFINS
   jBC_ICMS
   jBC_IPI
   jBC_ICMSST
   jBC_II
   jBC_ISS
   jVl_ICMSST
   jVl_ICMS
   nBC_ICMS
   nBC_COFINS
   nBC_PIS
   nBC_IPI
   nBC_ICMSST
   nBC_II
   nBC_ISS
   nVl_ICMSST
   nVl_ICMS
   nICMS_vICMSSubstituto
   nTot_vTrib 
   nAliqTranspImport
   nAliqTranspNac   
   nPEncFinTpED
   jOrig
   jFDiasEnt
   iDiasInf
   iDiasCalc
   pOrdem 
   pItem
   fItem
   pUni
   fUni
   pNeg
   fNeg
   pTab
   fTab
   pTabI
   fTabI
   pTabGrpP  
   fTabGrpP  
   pTabGrpPI 
   fTabGrpPI 
   pNCM
   fNCM
   pCFO
   fCFO
   jTipo
   nQt
   tEntPla
   tEmissao
   tSaida
   nDesc
   lCCusto  
   lCrtlItem
   pPTOpEDItem
   fPTOpEDItem
   pPTOpEDGrpItem
   fPTOpEDGrpItem
   nQtMin
   nQtMax
   nPrecoMin
   nPrecoMax
   lContQua
   lContPreco
   iCiclo
   iCicloAtual
   jTempo
   lSkipLote
   nPrBruto   
   nPDescCP   
   nVDescCP   
   nPDescTpED 
   nVDescTpED 
   nVEncFinTpED 
   nPDescTpEDG
   nVDescTpEDG
   nPDescInc  
   nVDescInc  
   nProd_pDesc
   pLote
   fLote
   jFinalidade
   nProd_vUnCom
   nProd_vProd
   nProd_vFrete
   nVMLE
   nProd_vSeg
   nProd_vDesc
   nProd_vOutro
   jProd_indTot
   sDI_nDI               
   dDI_dDI               
   sDI_xLocDesemb        
   sDI_UFDesemb          
   dDI_dDesemb           
   sDI_cExportador  
   iAdi_nAdicao          
   iAdi_nSeqAdic         
   sAdi_cFabricante      
   nAdi_vDescDI          
   sAdi_xPed             
   iAdi_nItemPed         
   nCIDE_qBCprod
   nCIDE_vAliqProd
   nCIDE_vCIDE
   jICMS_GrupoTrib
   jICMS_orig 
   jICMS_modBC
   nICMS_vBC
   nICMS_pICMS
   nICMS_vICMS
   jICMS_modBCST
   nICMS_pMVAST
   nICMS_pRedBCST
   nICMS_vBCST
   nICMS_pICMSST
   nICMS_vICMSST
   nICMS_pRedBC
   jICMS_motDesICMS
   nICMS_vBCSTRet
   nICMS_vICMSSTRet
   jICMSPart_orig
   jICMSPart_CST
   jICMSPart_modBC
   nICMSPart_vBC
   nICMSPart_pRedBC
   nICMSPart_pICMS
   nICMSPart_vICMS
   jICMSPart_modBCST
   nICMSPart_pMVAST
   nICMSPart_pRedBCT
   nICMSPart_vBCST
   nICMSPart_pICMSST
   nICMSPart_vICMSST
   nICMSPart_pBCOp
   sICMSPart_UFST
   jICMSST_orig
   jICMSST_CST
   nICMSST_vBCSTRet
   nICMSST_vICMSSTRe
   nICMSST_vBCSTDest
   nICMSST_vICMSSTDes
   jGrupo_simples
   jICMSSN_Orig
   jICMSSN_CSOSN
   nICMSSN_pCredSN
   nICMSSN_vCredICMSSN
   jICMSSN_modBCST
   nICMSSN_pMVAST
   nICMSSN_pRedBCST
   nICMSSN_vBCST
   nICMSSN_pICMSST
   nICMSSN_vICMSST
   nICMSSN_vBCSTRet
   nICMSSN_vICMSSTRet
   jICMSSN_modBC
   nICMSSN_vBC
   nICMSSN_pRedBC
   nICMSSN_pICMS
   nICMSSN_vICMS
   sIPI_clEnq
   sIPI_CNPJProd
   sIPI_cSelo
   nIPI_qSelo
   sIPI_cEnq
   jIPINT_CST
   nIPITrib_vBC
   nIPITrib_pIPI
   nIPITrib_qUnid
   nIPITrib_vUnid
   nIPITrib_vIPI
   nII_vBC
   nII_vDespAdu
   nII_vII
   nII_vIOF
   jPIS_CST  
   nPIS_vBC 
   nPIS_pPIS 
   nPIS_vPIS 
   nPIS_qBCProd 
   nPIS_vAliqProd 
   nPISST_vBC 
   nPISST_pPIS
   nPISST_qBCProd 
   nPISST_vAliqProd
   nPISST_vPIS   
   jCOFINS_CST
   nCOFINS_vBC
   nCOFINS_pCOFINS
   nCOFINS_vCOFINS
   nCOFINS_qBCProd
   nCOFINS_vAliqProd
   nCOFINSST_vBC
   nCOFINSST_pCOFINS
   nCOFINSST_qBCProd
   nCOFINSST_vAliqProd
   nCOFINSST_vCOFINS
   nISSQN_vBC 
   nISSQN_vAliq 
   nISSQN_vISSQN
   nISSQN_cMunFG    
   nISSQN_cListServ 
   jISSQN_cSitTrib
   sInfAdProd   
   sDDFSubTabela = Ordens_Item_CCusto
   pSubPId       = $_POST[pOrdens_Item_CCusto_{i}]
   pOrdemItem    = {ChaveAtual_0}
   fOrdemItem    = $_POST[iVer]
   pCCusto       = $_POST[pCCusto_{i}]
   fCCusto       = $_POST[fCCusto_{i}]
   nRatCCusto    = $_POST[nRatCCusto_{i}]
   lExc          = $_POST[pCCusto_{i}]==0 ? 1 : 0
   sDDFSubTabela = Ordens_Item_CContabil
   pSubPId       = $_POST[pOrdens_Item_CContCred_{i}]
   pOrdemItem    = {ChaveAtual_0}
   fOrdemItem    = $_POST[iVer]
   pCPla         = $_POST[pCContCred_{i}]
   fCPla         = $_POST[fCContCred_{i}]
   nRatCredCCont = $_POST[nRatCredCCont_{i}]
   lDeb          = 0
   lExc          = $_POST[pCContCred_{i}]==0 ? 1 : 0
   sDDFSubTabela = Ordens_Item_CContabil
   pSubPId       = $_POST[pOrdens_Item_CContDeb_{i}]
   pOrdemItem    = {ChaveAtual_0}
   fOrdemItem    = $_POST[iVer]
   pCPla         = $_POST[pCContDeb_{i}]
   fCPla         = $_POST[fCContDeb_{i}]
   nRatDebCCont  = $_POST[nRatDebCCont_{i}]
   lDeb          = 1
   lExc          = $_POST[pCContDeb_{i}]==0 ? 1 : 0
</VarsToDb1>
<ServerValids1>
   pItem        ; $_POST[.]>0 ;  O Item deve ser informado.
   pUni         ; $_POST[.]>0 ;  A unidade da transao deve ser informada.
   nQt          ; $_POST[.]>=0 ;  A Qt.Pedida deve ser Preenchida.
   pMoe         ; $_POST[.]>0 ;  A Moeda do Item deve ser informada.
   nProd_vUnCom ; $_POST[.]>=0 ;  O Valor [UN]  c/ (Pr) Descontos deve ser preenchido.
   pItem        ; flEhUnico("select count(*) from Ordens_Itens a, Ordens b, TOper c where a.pItem=$_POST[.] and a.pPId!=$_POST[pPId] and a.pOrdem=$_POST[pOrdem] and a.pOrdem=b.pPId and b.pTOper = c.pPId and b.lTransfDep3o=0 and c.lRejOrdemDupl=1  and a.iVer = a.iVAt and b.iVer = b.iVAt and c.iVer = c.iVAt") ; J existe esse Item cadastrado no Item da Ordem, se no encontrar verifique na lixeira.
</ServerValids1>
<PodeIncluir1>
     select count(*) from Ordens where pPId={ChaveAtual_1} and iVer=iVAt and tConf is null ; Esse Item no pode ser includo porque a Ordem j foi Confirmada
</PodeIncluir1>
<PodeExcluir1>
   select count(*) from Ordens where pPId={ChaveAtual_1} and iVer=iVAt and tConf is null ; Esse Item no pode ser excluido porque a Ordem j foi Confirmada
</PodeExcluir1>
<PodeAlterar1>
   select count(*) from Ordens where pPId={ChaveAtual_1} and iVer=iVAt and tConf is null ; Esse Item no pode ser alterado porque a Ordem j foi Confirmada
</PodeAlterar1>
<exec1>
(
      this.flSetVar('pItem',0) 
   && this.flSetVar('fItem',0) 
   && this.flSetVar('sRegCodItem','') 
   && this.flSetVar('sTabCodItem','') 
   && this.flSetVar('sNegCodItem','') 
   && this.flSetVar('sRegDesItem','') 
   && this.flSetVar('pTab','0') 
   && this.flSetVar('fTab','0') 
   && this.flSetVar('pTabI','0') 
   && this.flSetVar('fTabI','0') 
   && this.flSetVar('sCodTab','') 
   && this.flSetVar('sDesTab','') 
   && this.flSetVar('pLote',0) 
   && this.flSetVar('fLote',0) 
   && this.flSetVar('sLote','') 
   && this.flSetVar('jOrig',0)   
   && this.flSetVar('jICMS_Orig',0)   
   && this.flSetVar('pUni',0)         
   && this.flSetVar('sCodUni','')     
   && this.flSetVar('sUni','')        
   && this.flSetVar('pNCM',0)         
   && this.flSetVar('sCodNCM','')     
   && this.flSetVar('sDesNCM','')     
   && this.flSetVar('pNeg',0)         
   && this.flSetVar('fNeg',0)         
   && this.flSetVar('nPrBruto','0,00000') 
   && this.flSetVar('nVDescCP','0,00000') 
   && this.flSetVar('nVDescTpED','0,00000') 
   && this.flSetVar('nVEncFinTpED','0,00000') 
   && this.flSetVar('nVDescTpEDG','0,00000') 
   && this.flSetVar('nPEncFinTpED','0,00000') 
   && this.flSetVar('sMoe','') 
   && this.flSetVar('pMoe',0) 
   && this.flSetVar('fMoe',0) 
   && this.flSetVar('nQtMoe','0,00000') 
   && this.flSetVar('sMoeCambio','') 
   && this.flSetVar('pCam',0) 
   && this.flSetVar('fCam',0) 
   && this.flSetVar('nCam','0,00000') 
   && this.flSetVar('sCam','') 
   && this.flSetVar('jCam',0) 
   && this.flSetVar('nProd_vUnCom','0,00000') 
   && this.flSetVar('nProd_vFrete','0,00') 
   && this.flSetVar('nVMLE','0,00') 
   && this.flSetVar('nProd_vSeg','0,00') 
   && this.flSetVar('nProd_vDesc','0,00000') 
   && this.flSetVar('nProd_vProd','0,00') 
   && this.flSetVar('pCFO',0) 
   && this.flSetVar('sCodCFO','') 
   && this.flSetVar('sAbrev','') 
   && this.flSetVar('fCFO',0) 
   && this.flSetVar('pRegDepVen',0) 
   && this.flSetVar('pDepVen',0) 
   && this.flSetVar('pUFisVen',0) 
   && this.flSetVar('pUFisVen',0) 
   && this.flSetVar('sUn1Ven','') 
   && this.flSetVar('sUn2Ven','') 
   && this.flSetVar('sUn3Ven','') 
   && this.flSetVar('sUn4Ven','') 
   && this.flSetVar('sUn5Ven','') 
   && this.flSetVar('sUn6Ven','') 
   && this.flSetVar('sUn7Ven','') 
   && this.flSetVar('pRegDepRFis',0) 
   && this.flSetVar('pDepRFis',0) 
   && this.flSetVar('pUFisRFis',0) 
   && this.flSetVar('pUFisRFis',0) 
   && this.flSetVar('sUn1RFis','') 
   && this.flSetVar('sUn2RFis','') 
   && this.flSetVar('sUn3RFis','') 
   && this.flSetVar('sUn4RFis','') 
   && this.flSetVar('sUn5RFis','') 
   && this.flSetVar('sUn6RFis','') 
   && this.flSetVar('sUn7RFis','')  
   && this.flSetVar('tEntPla','') 
   && this.flSetVar('tEmissao','') 
   && this.flSetVar('tSaida ','') 
   && this.flSetVar('sDI_nDI','') 
   && this.flSetVar('dDI_dDI','') 
   && this.flSetVar('sDI_xLocDesemb','') 
   && this.flSetVar('sDI_UFDesemb','') 
   && this.flSetVar('dDI_dDesemb','') 
   && this.flSetVar('sDI_cExportador','') 
   && this.flSetVar('nII_vBC','0,00') 
   && this.flSetVar('nII_vDespAdu','0,00') 
   && this.flSetVar('nII_vII','0,00') 
   && this.flSetVar('nII_vIOF','0,00') 
   && this.flSetVar('iAdi_nAdicao',0) 
   && this.flSetVar('iAdi_nSeqAdic',0) 
   && this.flSetVar('sAdi_cFabricante','') 
   && this.flSetVar('nAdi_vDescDI','0,00000') 
   && this.flSetVar('sAdi_xPed','') 
   && this.flSetVar('iAdi_nItemPed',0) 
   && this.flSetVar('nCIDE_qBCprod','0,00') 
   && this.flSetVar('nCIDE_vAliqProd','0,00') 
   && this.flSetVar('nCIDE_vCIDE','0,00') 
   && this.flSetVar('jICMS_GrupoTrib',0) 
   && this.flSetVar('jICMS_orig',0) 
   && this.flSetVar('jICMS_modBC',0) 
   && this.flSetVar('nICMS_pRedBC','0,00') 
   && this.flSetVar('nICMS_vBC','0,00') 
   && this.flSetVar('nICMS_pICMS','0,00') 
   && this.flSetVar('nICMS_vICMS','0,00') 
   && this.flSetVar('jICMS_modBCST',0) 
   && this.flSetVar('nICMS_pMVAST','0,00') 
   && this.flSetVar('nICMS_pRedBCST','0,00') 
   && this.flSetVar('nICMS_vBCST','0,00') 
   && this.flSetVar('nICMS_pICMSST','0,00') 
   && this.flSetVar('nICMS_vICMSST','0,00') 
   && this.flSetVar('nICMS_vBCSTRet','0,00') 
   && this.flSetVar('nICMS_vICMSSTRet','0,00') 
   && this.flSetVar('jICMS_motDesICMS',0) 
   && this.flSetVar('jICMSPart_orig',0) 
   && this.flSetVar('jICMSPart_CST',0) 
   && this.flSetVar('jICMSPart_modBC',0) 
   && this.flSetVar('nICMSPart_vBC','0,00') 
   && this.flSetVar('nICMSPart_pRedBC','0,00') 
   && this.flSetVar('nICMSPart_pICMS','0,00') 
   && this.flSetVar('nICMSPart_vICMS','0,00') 
   && this.flSetVar('jICMSPart_modBCST',0) 
   && this.flSetVar('nICMSPart_pMVAST','0,00') 
   && this.flSetVar('nICMSPart_pRedBCT','0,00') 
   && this.flSetVar('nICMSPart_vBCST','0,00') 
   && this.flSetVar('nICMSPart_pICMSST','0,00') 
   && this.flSetVar('nICMSPart_vICMSST','0,00') 
   && this.flSetVar('nICMSPart_pBCOp','0,00') 
   && this.flSetVar('sICMSPart_UFST','') 
   && this.flSetVar('jICMSST_orig',0) 
   && this.flSetVar('jICMSST_CST',0) 
   && this.flSetVar('nICMSST_vBCSTRet','0,00') 
   && this.flSetVar('nICMSST_vICMSSTRe','0,00') 
   && this.flSetVar('nICMSST_vBCSTDest','0,00') 
   && this.flSetVar('nICMSST_vICMSSTDes','0,00') 
   && this.flSetVar('jGrupo_simples',0) 
   && this.flSetVar('jICMSSN_Orig',0) 
   && this.flSetVar('jICMSSN_CSOSN',0) 
   && this.flSetVar('jICMSSN_modBC',0) 
   && this.flSetVar('nICMSSN_vBC','0,00') 
   && this.flSetVar('nICMSSN_pRedBC','0,00') 
   && this.flSetVar('nICMSSN_pICMS','0,00') 
   && this.flSetVar('nICMSSN_vICMS','0,00') 
   && this.flSetVar('jICMSSN_modBCST',0) 
   && this.flSetVar('nICMSSN_pMVAST','0,00') 
   && this.flSetVar('nICMSSN_pRedBCST','0,00') 
   && this.flSetVar('nICMSSN_vBCST','0,00') 
   && this.flSetVar('nICMSSN_pICMSST','0,00') 
   && this.flSetVar('nICMSSN_vICMSST','0,00') 
   && this.flSetVar('nICMSSN_pCredSN','0,00') 
   && this.flSetVar('nICMSSN_vCredICMSSN','0,00') 
   && this.flSetVar('nICMSSN_vBCSTRet','0,00') 
   && this.flSetVar('nICMSSN_vICMSSTRet','0,00') 
   && this.flSetVar('sIPI_clEnq','') 
   && this.flSetVar('sIPI_CNPJProd','') 
   && this.flSetVar('sIPI_cSelo','') 
   && this.flSetVar('nIPI_qSelo','0,00') 
   && this.flSetVar('sIPI_cEnq','') 
   && this.flSetVar('jIPINT_CST',0) 
   && this.flSetVar('nIPITrib_vBC','0,00') 
   && this.flSetVar('nIPITrib_pIPI','0,00') 
   && this.flSetVar('nIPITrib_qUnid','0,00') 
   && this.flSetVar('nIPITrib_vUnid','0,00') 
   && this.flSetVar('nIPITrib_vIPI','0,00') 
   && this.flSetVar('jPIS_CST',0) 
   && this.flSetVar('nPIS_vBC','0,00') 
   && this.flSetVar('nPIS_pPIS','0,00') 
   && this.flSetVar('nPIS_qBCProd','0,00') 
   && this.flSetVar('nPIS_vAliqProd','0,00') 
   && this.flSetVar('nPIS_vPIS','0,00') 
   && this.flSetVar('nPISST_vBC','0,00') 
   && this.flSetVar('nPISST_pPIS','0,00') 
   && this.flSetVar('nPISST_qBCProd','0,00') 
   && this.flSetVar('nPISST_vAliqProd','0,00') 
   && this.flSetVar('nPISST_vPIS','0,00') 
   && this.flSetVar('jCOFINS_CST',0) 
   && this.flSetVar('nCOFINS_vBC','0,00') 
   && this.flSetVar('nCOFINS_pCOFINS','0,00') 
   && this.flSetVar('nCOFINS_qBCProd','0,00') 
   && this.flSetVar('nCOFINS_vAliqProd','0,00') 
   && this.flSetVar('nCOFINS_vCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_vBC','0,00') 
   && this.flSetVar('nCOFINSST_pCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_qBCProd','0,00') 
   && this.flSetVar('nCOFINSST_vAliqProd','0,00') 
   && this.flSetVar('nCOFINSST_vCOFINS','0,00') 
   && this.flSetVar('nISSQN_vBC','0,00') 
   && this.flSetVar('nISSQN_vAliq','0,00') 
   && this.flSetVar('nISSQN_vISSQN','0,00') 
   && this.flSetVar('nISSQN_cMunFG','0,00') 
   && this.flSetVar('nISSQN_cListServ','0,00') 
   && this.flSetVar('jISSQN_cSitTrib',0) 
   && this.flSetVar('mInfAdProd','')
   && this.flSetVar('nQtMin','0,00') 
   && this.flSetVar('nQtMax','0,00') 
   && this.flSetVar('nPrecoMin','0,00') 
   && this.flSetVar('nPrecoMax','0,00') 
   && this.flSetVar('lContQua',0) 
   && this.flSetVar('lContPreco',0) 
   && this.flSetVar('iCiclo',0) 
   && this.flSetVar('iCicloAtual',0) 
   && this.flSetVar('jTempo',0) 
   && this.flSetVar('lSkipLote',0) 
)
</exec1>
<exec2>
(
      this.flSetVar('nPrBruto','0,00000') 
   && this.flSetVar('nVDescCP','0,00000') 
   && this.flSetVar('nVDescTpED','0,00000') 
   && this.flSetVar('nVEncFinED','0,00000') 
   && this.flSetVar('nVEncFinTpED','0,00000') 
   && this.flSetVar('nVDescTpEDG','0,00000')                                                                                   
   && this.flSetVar('nQtMoe','0,00000') 
   && this.flSetVar('sMoeCambio','') 
   && this.flSetVar('pCam',0) 
   && this.flSetVar('fCam',0)
   && this.flSetVar('nCam','0,00000') 
   && this.flSetVar('sCam','')                             
   && this.flSetVar('nProd_vUnCom','0,00000') 
   && this.flSetVar('nProd_vFrete','0,00') 
   && this.flSetVar('nVMLE','0,00') 
   && this.flSetVar('nProd_vSeg','0,00') 
   && this.flSetVar('nProd_vDesc','0,00000') 
   && this.flSetVar('nProd_vProd','0,00') 
   && this.flSetVar('pCFO',0) 
   && this.flSetVar('sCodCFO','') 
   && this.flSetVar('sAbrev','') 
   && this.flSetVar('fCFO',0) 
   && this.flSetVar('tEntPla','') 
   && this.flSetVar('tEmissao','') 
   && this.flSetVar('tSaida ','') 
   && this.flSetVar('sDI_nDI','') 
   && this.flSetVar('dDI_dDI','') 
   && this.flSetVar('sDI_xLocDesemb','') 
   && this.flSetVar('sDI_UFDesemb','') 
   && this.flSetVar('dDI_dDesemb','') 
   && this.flSetVar('sDI_cExportador','') 
   && this.flSetVar('nII_vBC','0,00') 
   && this.flSetVar('nII_vDespAdu','0,00') 
   && this.flSetVar('nII_vII','0,00') 
   && this.flSetVar('nII_vIOF','0,00') 
   && this.flSetVar('iAdi_nAdicao',0) 
   && this.flSetVar('iAdi_nSeqAdic',0) 
   && this.flSetVar('sAdi_cFabricante','') 
   && this.flSetVar('nAdi_vDescDI','0,00000') 
   && this.flSetVar('sAdi_xPed','') 
   && this.flSetVar('iAdi_nItemPed',0) 
   && this.flSetVar('nCIDE_qBCprod','0,00') 
   && this.flSetVar('nCIDE_vAliqProd','0,00') 
   && this.flSetVar('nCIDE_vCIDE','0,00') 
   && this.flSetVar('jICMS_GrupoTrib',0) 
   && this.flSetVar('jICMS_orig',0) 
   && this.flSetVar('jICMS_modBC',0) 
   && this.flSetVar('nICMS_pRedBC','0,00') 
   && this.flSetVar('nICMS_vBC','0,00') 
   && this.flSetVar('nICMS_pICMS','0,00') 
   && this.flSetVar('nICMS_vICMS','0,00') 
   && this.flSetVar('jICMS_modBCST',0) 
   && this.flSetVar('nICMS_pMVAST','0,00') 
   && this.flSetVar('nICMS_pRedBCST','0,00') 
   && this.flSetVar('nICMS_vBCST','0,00') 
   && this.flSetVar('nICMS_pICMSST','0,00') 
   && this.flSetVar('nICMS_vICMSST','0,00') 
   && this.flSetVar('nICMS_vBCSTRet','0,00') 
   && this.flSetVar('nICMS_vICMSSTRet','0,00') 
   && this.flSetVar('jICMS_motDesICMS',0) 
   && this.flSetVar('jICMSPart_orig',0) 
   && this.flSetVar('jICMSPart_CST',0) 
   && this.flSetVar('jICMSPart_modBC',0) 
   && this.flSetVar('nICMSPart_vBC','0,00') 
   && this.flSetVar('nICMSPart_pRedBC','0,00') 
   && this.flSetVar('nICMSPart_pICMS','0,00') 
   && this.flSetVar('nICMSPart_vICMS','0,00') 
   && this.flSetVar('jICMSPart_modBCST',0) 
   && this.flSetVar('nICMSPart_pMVAST','0,00') 
   && this.flSetVar('nICMSPart_pRedBCT','0,00') 
   && this.flSetVar('nICMSPart_vBCST','0,00') 
   && this.flSetVar('nICMSPart_pICMSST','0,00') 
   && this.flSetVar('nICMSPart_vICMSST','0,00') 
   && this.flSetVar('nICMSPart_pBCOp','0,00') 
   && this.flSetVar('sICMSPart_UFST','') 
   && this.flSetVar('jICMSST_orig',0) 
   && this.flSetVar('jICMSST_CST',0) 
   && this.flSetVar('nICMSST_vBCSTRet','0,00') 
   && this.flSetVar('nICMSST_vICMSSTRe','0,00') 
   && this.flSetVar('nICMSST_vBCSTDest','0,00') 
   && this.flSetVar('nICMSST_vICMSSTDes','0,00') 
   && this.flSetVar('jGrupo_simples',0) 
   && this.flSetVar('jICMSSN_Orig',0) 
   && this.flSetVar('jICMSSN_CSOSN',0) 
   && this.flSetVar('jICMSSN_modBC',0) 
   && this.flSetVar('nICMSSN_vBC','0,00') 
   && this.flSetVar('nICMSSN_pRedBC','0,00') 
   && this.flSetVar('nICMSSN_pICMS','0,00') 
   && this.flSetVar('nICMSSN_vICMS','0,00') 
   && this.flSetVar('jICMSSN_modBCST',0) 
   && this.flSetVar('nICMSSN_pMVAST','0,00') 
   && this.flSetVar('nICMSSN_pRedBCST','0,00') 
   && this.flSetVar('nICMSSN_vBCST','0,00') 
   && this.flSetVar('nICMSSN_pICMSST','0,00') 
   && this.flSetVar('nICMSSN_vICMSST','0,00') 
   && this.flSetVar('nICMSSN_pCredSN','0,00') 
   && this.flSetVar('nICMSSN_vCredICMSSN','0,00') 
   && this.flSetVar('nICMSSN_vBCSTRet','0,00') 
   && this.flSetVar('nICMSSN_vICMSSTRet','0,00') 
   && this.flSetVar('sIPI_clEnq','') 
   && this.flSetVar('sIPI_CNPJProd','') 
   && this.flSetVar('sIPI_cSelo','') 
   && this.flSetVar('nIPI_qSelo','0,00') 
   && this.flSetVar('sIPI_cEnq','') 
   && this.flSetVar('jIPINT_CST',0) 
   && this.flSetVar('nIPITrib_vBC','0,00') 
   && this.flSetVar('nIPITrib_pIPI','0,00') 
   && this.flSetVar('nIPITrib_qUnid','0,00') 
   && this.flSetVar('nIPITrib_vUnid','0,00') 
   && this.flSetVar('nIPITrib_vIPI','0,00') 
   && this.flSetVar('jPIS_CST',0) 
   && this.flSetVar('nPIS_vBC','0,00') 
   && this.flSetVar('nPIS_pPIS','0,00') 
   && this.flSetVar('nPIS_qBCProd','0,00') 
   && this.flSetVar('nPIS_vAliqProd','0,00') 
   && this.flSetVar('nPIS_vPIS','0,00') 
   && this.flSetVar('nPISST_vBC','0,00') 
   && this.flSetVar('nPISST_pPIS','0,00') 
   && this.flSetVar('nPISST_qBCProd','0,00') 
   && this.flSetVar('nPISST_vAliqProd','0,00') 
   && this.flSetVar('nPISST_vPIS','0,00') 
   && this.flSetVar('jCOFINS_CST',0) 
   && this.flSetVar('nCOFINS_vBC','0,00') 
   && this.flSetVar('nCOFINS_pCOFINS','0,00') 
   && this.flSetVar('nCOFINS_qBCProd','0,00') 
   && this.flSetVar('nCOFINS_vAliqProd','0,00') 
   && this.flSetVar('nCOFINS_vCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_vBC','0,00') 
   && this.flSetVar('nCOFINSST_pCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_qBCProd','0,00') 
   && this.flSetVar('nCOFINSST_vAliqProd','0,00') 
   && this.flSetVar('nCOFINSST_vCOFINS','0,00') 
   && this.flSetVar('nISSQN_vBC','0,00') 
   && this.flSetVar('nISSQN_vAliq','0,00') 
   && this.flSetVar('nISSQN_vISSQN','0,00') 
   && this.flSetVar('nISSQN_cMunFG','0,00') 
   && this.flSetVar('nISSQN_cListServ','0,00') 
   && this.flSetVar('jISSQN_cSitTrib',0) 
   && this.flSetVar('mInfAdProd','') 
   && this.flSetVar('nVDescInc','0,00')
   && this.flSetVar('pLote',0) 
   && this.flSetVar('fLote',0) 
   && this.flSetVar('sLote','') 
)
</exec2>
<exec3>
( 
   ( (pCapaMoe!=pMoe) 
     ? 
     (this.flSetVar('nQtMoe',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nPrBruto','0,00000'))  
     : 
     (this.flSetVar('nPrBruto',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nQtMoe','0,00000')) 
   ) 
   && this.flSetVar('nVDescCP','0,00000') 
   && this.flSetVar('nVDescTpED','0,00000') 
   && this.flSetVar('nVEncFinTpED','0,00000') 
   && this.flSetVar('nVDescTpEDG','0,00000') 
   && this.flSetVar('sMoeCambio','') 
   && this.flSetVar('pCam',0) 
   && this.flSetVar('fCam',0)
   && this.flSetVar('nCam','0,00000') 
   && this.flSetVar('sCam','') 
   && this.flSetVar('nProd_vUnCom','0,00000') 
   && this.flSetVar('nProd_vFrete','0,00') 
   && this.flSetVar('nVMLE','0,00') 
   && this.flSetVar('nProd_vSeg','0,00') 
   && this.flSetVar('nProd_vDesc','0,00000') 
   && this.flSetVar('nProd_vProd','0,00') 
   && this.flSetVar('pCFO',0) 
   && this.flSetVar('sCodCFO','') 
   && this.flSetVar('sAbrev','') 
   && this.flSetVar('fCFO',0) 
   && this.flSetVar('tEntPla','') 
   && this.flSetVar('tEmissao','') 
   && this.flSetVar('tSaida ','') 
   && this.flSetVar('sDI_nDI','') 
   && this.flSetVar('dDI_dDI','') 
   && this.flSetVar('sDI_xLocDesemb','') 
   && this.flSetVar('sDI_UFDesemb','') 
   && this.flSetVar('dDI_dDesemb','') 
   && this.flSetVar('sDI_cExportador','') 
   && this.flSetVar('nII_vBC','0,00') 
   && this.flSetVar('nII_vDespAdu','0,00') 
   && this.flSetVar('nII_vII','0,00') 
   && this.flSetVar('nII_vIOF','0,00') 
   && this.flSetVar('iAdi_nAdicao',0) 
   && this.flSetVar('iAdi_nSeqAdic',0) 
   && this.flSetVar('sAdi_cFabricante','') 
   && this.flSetVar('nAdi_vDescDI','0,00000') 
   && this.flSetVar('sAdi_xPed','') 
   && this.flSetVar('iAdi_nItemPed',0) 
   && this.flSetVar('nCIDE_qBCprod','0,00') 
   && this.flSetVar('nCIDE_vAliqProd','0,00') 
   && this.flSetVar('nCIDE_vCIDE','0,00') 
   && this.flSetVar('jICMS_GrupoTrib',0) 
   && this.flSetVar('jICMS_orig',0) 
   && this.flSetVar('jICMS_modBC',0) 
   && this.flSetVar('nICMS_pRedBC','0,00') 
   && this.flSetVar('nICMS_vBC','0,00') 
   && this.flSetVar('nICMS_pICMS','0,00') 
   && this.flSetVar('nICMS_vICMS','0,00') 
   && this.flSetVar('jICMS_modBCST',0) 
   && this.flSetVar('nICMS_pMVAST','0,00') 
   && this.flSetVar('nICMS_pRedBCST','0,00') 
   && this.flSetVar('nICMS_vBCST','0,00') 
   && this.flSetVar('nICMS_pICMSST','0,00') 
   && this.flSetVar('nICMS_vICMSST','0,00') 
   && this.flSetVar('nICMS_vBCSTRet','0,00') 
   && this.flSetVar('nICMS_vICMSSTRet','0,00') 
   && this.flSetVar('jICMS_motDesICMS',0) 
   && this.flSetVar('jICMSPart_orig',0) 
   && this.flSetVar('jICMSPart_CST',0) 
   && this.flSetVar('jICMSPart_modBC',0) 
   && this.flSetVar('nICMSPart_vBC','0,00') 
   && this.flSetVar('nICMSPart_pRedBC','0,00') 
   && this.flSetVar('nICMSPart_pICMS','0,00') 
   && this.flSetVar('nICMSPart_vICMS','0,00') 
   && this.flSetVar('jICMSPart_modBCST',0) 
   && this.flSetVar('nICMSPart_pMVAST','0,00') 
   && this.flSetVar('nICMSPart_pRedBCT','0,00') 
   && this.flSetVar('nICMSPart_vBCST','0,00') 
   && this.flSetVar('nICMSPart_pICMSST','0,00') 
   && this.flSetVar('nICMSPart_vICMSST','0,00') 
   && this.flSetVar('nICMSPart_pBCOp','0,00') 
   && this.flSetVar('sICMSPart_UFST','') 
   && this.flSetVar('jICMSST_orig',0) 
   && this.flSetVar('jICMSST_CST',0) 
   && this.flSetVar('nICMSST_vBCSTRet','0,00') 
   && this.flSetVar('nICMSST_vICMSSTRe','0,00') 
   && this.flSetVar('nICMSST_vBCSTDest','0,00') 
   && this.flSetVar('nICMSST_vICMSSTDes','0,00') 
   && this.flSetVar('jGrupo_simples',0) 
   && this.flSetVar('jICMSSN_Orig',0) 
   && this.flSetVar('jICMSSN_CSOSN',0) 
   && this.flSetVar('jICMSSN_modBC',0) 
   && this.flSetVar('nICMSSN_vBC','0,00') 
   && this.flSetVar('nICMSSN_pRedBC','0,00') 
   && this.flSetVar('nICMSSN_pICMS','0,00') 
   && this.flSetVar('nICMSSN_vICMS','0,00') 
   && this.flSetVar('jICMSSN_modBCST',0) 
   && this.flSetVar('nICMSSN_pMVAST','0,00') 
   && this.flSetVar('nICMSSN_pRedBCST','0,00') 
   && this.flSetVar('nICMSSN_vBCST','0,00') 
   && this.flSetVar('nICMSSN_pICMSST','0,00') 
   && this.flSetVar('nICMSSN_vICMSST','0,00') 
   && this.flSetVar('nICMSSN_pCredSN','0,00') 
   && this.flSetVar('nICMSSN_vCredICMSSN','0,00') 
   && this.flSetVar('nICMSSN_vBCSTRet','0,00') 
   && this.flSetVar('nICMSSN_vICMSSTRet','0,00') 
   && this.flSetVar('sIPI_clEnq','') 
   && this.flSetVar('sIPI_CNPJProd','') 
   && this.flSetVar('sIPI_cSelo','') 
   && this.flSetVar('nIPI_qSelo','0,00') 
   && this.flSetVar('sIPI_cEnq','') 
   && this.flSetVar('jIPINT_CST',0) 
   && this.flSetVar('nIPITrib_vBC','0,00') 
   && this.flSetVar('nIPITrib_pIPI','0,00') 
   && this.flSetVar('nIPITrib_qUnid','0,00') 
   && this.flSetVar('nIPITrib_vUnid','0,00') 
   && this.flSetVar('nIPITrib_vIPI','0,00') 
   && this.flSetVar('jPIS_CST',0) 
   && this.flSetVar('nPIS_vBC','0,00') 
   && this.flSetVar('nPIS_pPIS','0,00') 
   && this.flSetVar('nPIS_qBCProd','0,00') 
   && this.flSetVar('nPIS_vAliqProd','0,00') 
   && this.flSetVar('nPIS_vPIS','0,00') 
   && this.flSetVar('nPISST_vBC','0,00') 
   && this.flSetVar('nPISST_pPIS','0,00') 
   && this.flSetVar('nPISST_qBCProd','0,00') 
   && this.flSetVar('nPISST_vAliqProd','0,00') 
   && this.flSetVar('nPISST_vPIS','0,00') 
   && this.flSetVar('jCOFINS_CST',0) 
   && this.flSetVar('nCOFINS_vBC','0,00') 
   && this.flSetVar('nCOFINS_pCOFINS','0,00') 
   && this.flSetVar('nCOFINS_qBCProd','0,00') 
   && this.flSetVar('nCOFINS_vAliqProd','0,00') 
   && this.flSetVar('nCOFINS_vCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_vBC','0,00') 
   && this.flSetVar('nCOFINSST_pCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_qBCProd','0,00') 
   && this.flSetVar('nCOFINSST_vAliqProd','0,00') 
   && this.flSetVar('nCOFINSST_vCOFINS','0,00') 
   && this.flSetVar('nISSQN_vBC','0,00') 
   && this.flSetVar('nISSQN_vAliq','0,00') 
   && this.flSetVar('nISSQN_vISSQN','0,00') 
   && this.flSetVar('nISSQN_cMunFG','0,00') 
   && this.flSetVar('nISSQN_cListServ','0,00') 
   && this.flSetVar('jISSQN_cSitTrib',0) 
   && this.flSetVar('mInfAdProd','') 
   && this.flSetVar('pLote',0) 
   && this.flSetVar('fLote',0) 
   && this.flSetVar('sLote','') 
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5)) 
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec3>
<exec4>
( 
   ( 
     (pCapaMoe!=pMoe) 
     ?  
     (this.flSetVar('nQtMoe',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nPrBruto','0,00000')) 
     : 
     (this.flSetVar('nPrBruto',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nQtMoe','0,00000'))  
   ) 
   && this.flSetVar('nVDescCP','0,00000') 
   && this.flSetVar('nVDescTpED','0,00000') 
   && this.flSetVar('nVEncFinTpED','0,00000') 
   && this.flSetVar('nVDescTpEDG','0,00000') 
   && this.flSetVar('sMoeCambio','') 
   && this.flSetVar('pCam',0) 
   && this.flSetVar('fCam',0)
   && this.flSetVar('nCam','0,00000')
   && this.flSetVar('sCam','')
   && this.flSetVar('nProd_vUnCom','0,00000') 
   && this.flSetVar('nProd_vFrete','0,00') 
   && this.flSetVar('nVMLE','0,00') 
   && this.flSetVar('nProd_vSeg','0,00') 
   && this.flSetVar('nProd_vDesc','0,00000') 
   && this.flSetVar('nProd_vProd','0,00') 
   && this.flSetVar('pCFO',0) 
   && this.flSetVar('sCodCFO','') 
   && this.flSetVar('sAbrev','') 
   && this.flSetVar('fCFO',0) 
   && this.flSetVar('tEntPla','') 
   && this.flSetVar('tEmissao','') 
   && this.flSetVar('tSaida ','') 
   && this.flSetVar('sDI_nDI','') 
   && this.flSetVar('dDI_dDI','') 
   && this.flSetVar('sDI_xLocDesemb','') 
   && this.flSetVar('sDI_UFDesemb','') 
   && this.flSetVar('dDI_dDesemb','') 
   && this.flSetVar('sDI_cExportador','') 
   && this.flSetVar('nII_vBC','0,00') 
   && this.flSetVar('nII_vDespAdu','0,00') 
   && this.flSetVar('nII_vII','0,00') 
   && this.flSetVar('nII_vIOF','0,00') 
   && this.flSetVar('iAdi_nAdicao',0) 
   && this.flSetVar('iAdi_nSeqAdic',0) 
   && this.flSetVar('sAdi_cFabricante','') 
   && this.flSetVar('nAdi_vDescDI','0,00000') 
   && this.flSetVar('sAdi_xPed','') 
   && this.flSetVar('iAdi_nItemPed',0) 
   && this.flSetVar('nCIDE_qBCprod','0,00') 
   && this.flSetVar('nCIDE_vAliqProd','0,00') 
   && this.flSetVar('nCIDE_vCIDE','0,00') 
   && this.flSetVar('jICMS_GrupoTrib',0) 
   && this.flSetVar('jICMS_orig',0) 
   && this.flSetVar('jICMS_modBC',0) 
   && this.flSetVar('nICMS_pRedBC','0,00') 
   && this.flSetVar('nICMS_vBC','0,00') 
   && this.flSetVar('nICMS_pICMS','0,00') 
   && this.flSetVar('nICMS_vICMS','0,00') 
   && this.flSetVar('jICMS_modBCST',0) 
   && this.flSetVar('nICMS_pMVAST','0,00') 
   && this.flSetVar('nICMS_pRedBCST','0,00') 
   && this.flSetVar('nICMS_vBCST','0,00') 
   && this.flSetVar('nICMS_pICMSST','0,00') 
   && this.flSetVar('nICMS_vICMSST','0,00') 
   && this.flSetVar('nICMS_vBCSTRet','0,00') 
   && this.flSetVar('nICMS_vICMSSTRet','0,00') 
   && this.flSetVar('jICMS_motDesICMS',0) 
   && this.flSetVar('jICMSPart_orig',0) 
   && this.flSetVar('jICMSPart_CST',0) 
   && this.flSetVar('jICMSPart_modBC',0) 
   && this.flSetVar('nICMSPart_vBC','0,00') 
   && this.flSetVar('nICMSPart_pRedBC','0,00') 
   && this.flSetVar('nICMSPart_pICMS','0,00') 
   && this.flSetVar('nICMSPart_vICMS','0,00') 
   && this.flSetVar('jICMSPart_modBCST',0) 
   && this.flSetVar('nICMSPart_pMVAST','0,00') 
   && this.flSetVar('nICMSPart_pRedBCT','0,00') 
   && this.flSetVar('nICMSPart_vBCST','0,00') 
   && this.flSetVar('nICMSPart_pICMSST','0,00') 
   && this.flSetVar('nICMSPart_vICMSST','0,00') 
   && this.flSetVar('nICMSPart_pBCOp','0,00') 
   && this.flSetVar('sICMSPart_UFST','') 
   && this.flSetVar('jICMSST_orig',0) 
   && this.flSetVar('jICMSST_CST',0) 
   && this.flSetVar('nICMSST_vBCSTRet','0,00') 
   && this.flSetVar('nICMSST_vICMSSTRe','0,00') 
   && this.flSetVar('nICMSST_vBCSTDest','0,00') 
   && this.flSetVar('nICMSST_vICMSSTDes','0,00') 
   && this.flSetVar('jGrupo_simples',0) 
   && this.flSetVar('jICMSSN_Orig',0) 
   && this.flSetVar('jICMSSN_CSOSN',0) 
   && this.flSetVar('jICMSSN_modBC',0) 
   && this.flSetVar('nICMSSN_vBC','0,00') 
   && this.flSetVar('nICMSSN_pRedBC','0,00') 
   && this.flSetVar('nICMSSN_pICMS','0,00') 
   && this.flSetVar('nICMSSN_vICMS','0,00') 
   && this.flSetVar('jICMSSN_modBCST',0) 
   && this.flSetVar('nICMSSN_pMVAST','0,00') 
   && this.flSetVar('nICMSSN_pRedBCST','0,00') 
   && this.flSetVar('nICMSSN_vBCST','0,00') 
   && this.flSetVar('nICMSSN_pICMSST','0,00') 
   && this.flSetVar('nICMSSN_vICMSST','0,00') 
   && this.flSetVar('nICMSSN_pCredSN','0,00') 
   && this.flSetVar('nICMSSN_vCredICMSSN','0,00') 
   && this.flSetVar('nICMSSN_vBCSTRet','0,00') 
   && this.flSetVar('nICMSSN_vICMSSTRet','0,00') 
   && this.flSetVar('sIPI_clEnq','') 
   && this.flSetVar('sIPI_CNPJProd','') 
   && this.flSetVar('sIPI_cSelo','') 
   && this.flSetVar('nIPI_qSelo','0,00') 
   && this.flSetVar('sIPI_cEnq','') 
   && this.flSetVar('jIPINT_CST',0) 
   && this.flSetVar('nIPITrib_vBC','0,00') 
   && this.flSetVar('nIPITrib_pIPI','0,00') 
   && this.flSetVar('nIPITrib_qUnid','0,00') 
   && this.flSetVar('nIPITrib_vUnid','0,00') 
   && this.flSetVar('nIPITrib_vIPI','0,00') 
   && this.flSetVar('jPIS_CST',0) 
   && this.flSetVar('nPIS_vBC','0,00') 
   && this.flSetVar('nPIS_pPIS','0,00') 
   && this.flSetVar('nPIS_qBCProd','0,00') 
   && this.flSetVar('nPIS_vAliqProd','0,00') 
   && this.flSetVar('nPIS_vPIS','0,00') 
   && this.flSetVar('nPISST_vBC','0,00') 
   && this.flSetVar('nPISST_pPIS','0,00') 
   && this.flSetVar('nPISST_qBCProd','0,00') 
   && this.flSetVar('nPISST_vAliqProd','0,00') 
   && this.flSetVar('nPISST_vPIS','0,00') 
   && this.flSetVar('jCOFINS_CST',0) 
   && this.flSetVar('nCOFINS_vBC','0,00') 
   && this.flSetVar('nCOFINS_pCOFINS','0,00') 
   && this.flSetVar('nCOFINS_qBCProd','0,00') 
   && this.flSetVar('nCOFINS_vAliqProd','0,00') 
   && this.flSetVar('nCOFINS_vCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_vBC','0,00') 
   && this.flSetVar('nCOFINSST_pCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_qBCProd','0,00') 
   && this.flSetVar('nCOFINSST_vAliqProd','0,00') 
   && this.flSetVar('nCOFINSST_vCOFINS','0,00') 
   && this.flSetVar('nISSQN_vBC','0,00') 
   && this.flSetVar('nISSQN_vAliq','0,00') 
   && this.flSetVar('nISSQN_vISSQN','0,00') 
   && this.flSetVar('nISSQN_cMunFG','0,00') 
   && this.flSetVar('nISSQN_cListServ','0,00') 
   && this.flSetVar('jISSQN_cSitTrib',0) 
   && this.flSetVar('mInfAdProd','') 
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5)) 
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec4>
<exec5>
( 
 this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec5>
<exec6>
( 
 this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec6>
<exec7>
(
      this.flSetVar('sMoeCambio','') 
   && this.flSetVar('pCam','0') 
   && this.flSetVar('nCam','0,00000') 
   && this.flSetVar('fCam','0') 
   && this.flSetVar('sCam','') 
   && this.flSetVar('nVDescCP','0,00000') 
   && this.flSetVar('nVDescTpED','0,00000') 
   && this.flSetVar('nVEncFinTpED','0,00000') 
   && this.flSetVar('nVDescTpEDG','0,00000') 
   && this.flSetVar('nQtMoe','0,00000') 
   && this.flSetVar('nProd_vUnCom','0,00000')
)
</exec7>
<exec8>
(
      this.flSetVar('nPrBruto',fsReplaceDecimalPoint((nQtMoe*nCam),".",",",5)) 
   && this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDFin),".",",",5)) 
   && this.flSetVar('nVDescTpED',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDescFin),".",",",5)) 
   && this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nPDescTpEDG),".",",",5)) 
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nQtMoe*nCam)-(nVDescInc+((nQtMoe*nCam)/100*(nDFin))+((nQtMoe*nCam)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5)) 
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nQtMoe*nCam)-(nVDescInc+((nQtMoe*nCam)/100*(nDFin))+((nQtMoe*nCam)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec8>
<exec9>
(
      this.flSetVar('nPrBruto',fsReplaceDecimalPoint((nQtMoe*nCam),".",",",5) ) 
   && this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDFin),".",",",5)) 
   && this.flSetVar('nVDescTpED',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDescFin),".",",",5))
   && this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nPDescTpEDG),".",",",5)) 
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint(((nQtMoe*nCam))-(nVDescInc+(((nQtMoe*nCam))/100*(nDFin))+(((nQtMoe*nCam))/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint(((((nQtMoe*nCam))-(nVDescInc+(((nQtMoe*nCam))/100*(nDFin))+(((nQtMoe*nCam))/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
   )
</exec9>
<exec10>
(
      this.flSetVar('nVDescInc',fsReplaceDecimalPoint(((nPrBruto)/100*nPDescInc),".",",",5))
   && this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin),".",",",5)) 
   && this.flSetVar('nVDescTpED',fsReplaceDecimalPoint((nPrBruto/100*nDescFin),".",",",5))
   && this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint((nPrBruto/100*nPDescTpEDG),".",",",5)) 
   && this.flSetVar('nVDescLog',fsReplaceDecimalPoint((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec10>
<exec11>
(
   this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec11>
<exec11a>
(
   this.flSetVar('nVDescInc',fsReplaceDecimalPoint(((nPrBruto)/100*nPDescInc),".",",",5))
   && this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin),".",",",5)) 
   && this.flSetVar('nVDescLog',fsReplaceDecimalPoint((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec11a>
<exec12>
(
      this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec12>
<exec13>
( 
 this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec13>
<exec14>
(
   this.flSetVar('nVDescLog',fsReplaceDecimalPoint(((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec14>
<esc1>
(
 'dd_files/erp_PTOpED_Item.dda',
 'Esc_Padrao_1',
 'sRegCodItem,pTOper,pEmi,pDest,pOrdem,pDestDefault',
 '
  pPTOpEDItem,
  fPTOpEDItem,
  pItem,
  fItem,
  sRegCodItem,
  sRegDesItem,
  sEAN,sGTIN,
  jICMS_Orig,
  pUni,
  fUni,
  sCodUni,
  sUni,
  pNCM,
  fNCM,
  sCodNCM,
  sDesNCM,
  jFDiasEnt,
  iDiasInf,
  iDiasCalc,
  lInspecao,
  nPDescTpEDG,
  jCam,
  sMoe,
  pMoe,
  fMoe,
  lCCusto,
  lCrtlItem,
  stmp,
  nPEncFinTpED,
  lContQua,
  nQtMin,
  nQtMax,
  lContPreco,
  nPrecoMin,
  nPrecoMax,
  iCiclo,
  iCicloAtual,
  lSkipLote,
  stmp,
  pRegDepVen,
  fRegDepVen,
  pDep,
  pUFis,
  sUn1,
  sUn2,
  sUn3,
  sUn4,
  sUn5,
  sUn6,
  sUn7,
  sIns,
  pRegDepRFis,
  fRegDepRFis,
  pDepRFis,
  pUFisRFis,
  sUn1RFis,
  sUn2RFis,
  sUn3RFis,
  sUn4RFis,
  sUn5RFis,
  sUn6RFis,
  sUn7RFis,
  sInsRFis,
  jFinalidade,
  nAliqTranspImport,
  nAliqTranspNac,
  sCEST,
  pRegDepTransf,
  fRegDepTransf,
  pDepTransf,
  pUFisTransf,
  sUnTransf1,
  sUnTransf2,
  sUnTransf3,
  sUnTransf4,
  sUnTransf5,
  sUnTransf6,
  sUnTransf7,
  sInsTransf,
  iLote,
  jTempo,
  pDepInsp,
  fDepInsp,
  sUn1Insp,
  sUn2Insp,
  sUn3Insp,
  sUn4Insp,
  sUn5Insp,
  sUn6Insp,
  sUn7Insp,
  pDepReje,
  fDepReje,
  sUn1Reje,
  sUn2Reje,
  sUn3Reje,
  sUn4Reje,
  sUn5Reje,
  sUn6Reje,
  sUn7Reje,
  dUltInsp,
  pInsp,
  fInsp,  
  lInt,
  pTmp1_{1},
  pCCusto_{1},
  fCCusto_{1},
  sCCusto_{1},
  nRatCCusto_{1},
  pTmp2_{2},
  pCContCred_{2},
  fCContCred_{2},
  sCodCredPla_{2},
  sDesCredPla_{2},
  nRatCredCCont_{2},
  pTmp3_{3},
  pCContDeb_{3},
  fCContDeb_{3},
  sCodDebPla_{3},
  sDesDebPla_{3},
  nRatDebCCont_{3}
 '
)
</esc1>
<esc2>
(
 'dd_files/erp_PTOpED_Item.dda',
 'Esc_Padrao_2',
 'sNegCodItem,pTOper,pEmi,pDest,pOrdem',
 '
  pPTOpEDItem,
  fPTOpEDItem,
  pItem,
  fItem,
  sNegCodItem,
  sRegDesItem,
  sEAN,
  sGTIN,
  jICMS_Orig,
  pUni,
  fUni,
  sCodUni,
  sUni,
  pNCM,
  fNCM,
  sCodNCM,
  sDesNCM,
  jFDiasEnt,
  iDiasInf,
  iDiasCalc,
  lInspecao,
  nPDescTpEDG,
  sTmp,
  nPrBruto,
  jCam,
  sMoe,
  pMoe,
  fMoe,
  lCCusto,
  lCrtlItem,
  nPEncFinTpED,
  lContQua,
  nQtMin,
  nQtMax,
  lContPreco,
  nPrecoMin,
  nPrecoMax,
  iCiclo,
  iCicloAtual,
  lSkipLote,
  stmp,
  pRegDepVen,
  fRegDepVen,
  pDep,
  pUFis,
  sUn1,
  sUn2,
  sUn3,
  sUn4,
  sUn5,
  sUn6,
  sUn7,
  sIns,
  pRegDepRFis,
  fRegDepRFis,
  pDepRFis,
  pUFisRFis,
  sUn1RFis,
  sUn2RFis,
  sUn3RFis,
  sUn4RFis,
  sUn5RFis,
  sUn6RFis,
  sUn7RFis,
  sInsRFis,
  jFinalidade,
  nAliqTranspImport,
  nAliqTranspNac,
  sCEST,
  pRegDepTransf,
  fRegDepTransf,
  pDepTransf,
  pUFisTransf,
  sUnTransf1,
  sUnTransf2,
  sUnTransf3,
  sUnTransf4,
  sUnTransf5,
  sUnTransf6,
  sUnTransf7,
  sInsTransf,
  iLote,
  jTempo,
  pDepInsp,
  fDepInsp,
  sUn1Insp,
  sUn2Insp,
  sUn3Insp,
  sUn4Insp,
  sUn5Insp,
  sUn6Insp,
  sUn7Insp,
  pDepReje,
  fDepReje,
  sUn1Reje,
  sUn2Reje,
  sUn3Reje,
  sUn4Reje,
  sUn5Reje,
  sUn6Reje,
  sUn7Reje,
  dUltInsp,
  pInsp,
  fInsp,  
  lInt,
  pTmp1_{1},
  pCCusto_{1},
  fCCusto_{1},
  sCCusto_{1},
  nRatCCusto_{1},
  pTmp2_{2},
  pCContCred_{2},
  fCContCred_{2},
  sCodCredPla_{2},
  sDesCredPla_{2},
  nRatCredCCont_{2},
  pTmp3_{3},
  pCContDeb_{3},
  fCContDeb_{3},
  sCodDebPla_{3},
  sDesDebPla_{3},
  nRatDebCCont_{3}
 '
)   
</esc2>
<esc3>
(
 'dd_files/erp_PTOpED_Item.dda',
 'Esc_Padrao_3',
 'sTabCodItem,pTOper,pEmi,pDest,pOrdem',
 '
  pPTOpEDItem,
  fPTOpEDItem,
  pTab,
  fTab,
  pTabI,
  fTabI,
  pItem,
  fItem,
  sTabCodItem,
  sRegDesItem,
  sCodTab,
  sDesTab,
  sEAN,
  sGTIN,
  jICMS_Orig,
  pUni,
  fUni,
  sCodUni,
  sUni,
  pNCM,
  fNCM,
  sCodNCM,
  sDesNCM,
  jFDiasEnt,
  iDiasInf,
  iDiasCalc,
  lInspecao,
  nPDescTpEDG,
  sTmp,
  nPrBruto,
  jCam,
  sMoe,
  pMoe,
  fMoe,
  lCCusto,
  lCrtlItem,
  nPEncFinTpED,
  lContQua,
  nQtMin,
  nQtMax,
  lContPreco,
  nPrecoMin,
  nPrecoMax,
  iCiclo,
  iCicloAtual,
  lSkiLote,
  stmp,
  pRegDepVen,
  fRegDepVen,
  pDep,
  pUFis,
  sUn1,
  sUn2,
  sUn3,
  sUn4,
  sUn5,
  sUn6,
  sUn7,
  sIns,
  pRegDepRFis,
  fRegDepRFis,
  pDepRFis,
  pUFisRFis,
  sUn1RFis,
  sUn2RFis,
  sUn3RFis,
  sUn4RFis,
  sUn5RFis,
  sUn6RFis,
  sUn7RFis,
  sInsRFis,
  jFinalidade,
  nAliqTranspImport,
  nAliqTranspNac,
  sCEST,
  pRegDepTransf,
  fRegDepTransf,
  pDepTransf,
  pUFisTransf,
  sUnTransf1,
  sUnTransf2,
  sUnTransf3,
  sUnTransf4,
  sUnTransf5,
  sUnTransf6,
  sUnTransf7,
  sInsTransf,
  iLote,
  jTempo,
  pDepInsp,
  fDepInsp,
  sUn1Insp,
  sUn2Insp,
  sUn3Insp,
  sUn4Insp,
  sUn5Insp,
  sUn6Insp,
  sUn7Insp,
  pDepReje,
  fDepReje,
  sUn1Reje,
  sUn2Reje,
  sUn3Reje,
  sUn4Reje,
  sUn5Reje,
  sUn6Reje,
  sUn7Reje,
  dUltInsp,
  pInsp,
  fInsp,  
  lInt,
  pTmp1_{1},
  pCCusto_{1},
  fCCusto_{1},
  sCCusto_{1},
  nRatCCusto_{1},
  pTmp2_{2},
  pCContCred_{2},
  fCContCred_{2},
  sCodCredPla_{2},
  sDesCredPla_{2},
  nRatCredCCont_{2},
  pTmp3_{3},
  pCContDeb_{3},
  fCContDeb_{3},
  sCodDebPla_{3},
  sDesDebPla_{3},
  nRatDebCCont_{3}
 '
)
</esc3>

--//--

Tempo 4-27/11/2025 17:32:14
al_Get_fsLoad_include.php-inicio
fsLoadTag
fsLoadBloco
fsLoadFTag
fsLoadFBloco
al_Get_fsLoad_include.php-fim-sTxt=<Padrao_1>   
   sTagTit          = Tit1
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Incluir,Excluir,Alterar,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagMarcacao     = true
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1>
<Padrao_1a>   
   sTagTit          = Tit1a
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1a
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1a>
<Padrao_1b>   
   sTagTit          = Tit1b
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1b
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1b
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Alterar,Excluir,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1b>
<Padrao_1c>   
   sTagTit          = Tit1b
   sTagCpoTit       = CpoTit1c
   sTagCpo          = Cpo1c
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1b
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Alterar,Excluir,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1c>
<Padrao_1d>   
   sTagTit          = Tit1a
   sTagCpoTit       = CpoTit1d
   sTagCpo          = Cpo1d
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1d
   sTagNr0          = Nr01
   sTagTipoNr0      = TipoNr01
   sTagToolsBar     = Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1d>
<Padrao_1e>   
   sTagTit          = Tit1e
   sTagCpoTit       = CpoTit1e
   sTagCpo          = Cpo1e
   sTagSql          = Sql1e
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1a
   sTagNr0          = Nr01
   sTagTipoNr0      = TipoNr01
   sTagToolsBar     = Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1e>
<Padrao_2>   
   sTagTit          = Tit2
   sTagCpoTit       = CpoTit2
   sTagCpo          = Cpo2
   sTagSql          = Sql2
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu2
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_2>
<Padrao_3>   
   sTagTit          = Tit3
   sTagCpoTit       = CpoTit3
   sTagCpo          = Cpo3
   sTagSql          = Sql3
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Incluir,Excluir,Alterar,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault3
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_3>
<Padrao_4>   
   sTagTit          = Tit1
   sTagCpoTit       = CpoTit2
   sTagCpo          = Cpo2
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu4
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagMarcacao     = true
   sTagToolsBar     = Incluir,Excluir,Alterar,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_4>
<Padrao_5>   
   sTagTit          = Tit5
   sTagCpoTit       = CpoTit5
   sTagCpo          = Cpo5
   sTagSql          = Sql5
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu5
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_5>
<Esc_Padrao_1>
   sTagMnemTDoc     = Ordens_Itens
   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>
<Esc_Padrao_2>
   sTagMnemTDoc     = Ordens_Itens
   sTagTit          = Esc_Tit2
   sTagCpoTit       = Esc_CpoTit2
   sTagCpo          = Esc_Cpo2
   sTagSql          = Esc_Sql2
   sTagSqlEscVars   = Esc_SqlVars2
   sTagNr0          = Nr01
   sTagTipoNr0      = TipoNr01
   sTagCpoEscVars   = Esc_VarsServerToClient2
   sTagToolsBar     = Pesquisar
</Esc_Padrao_2>
<Tit1>Itens da Ordem [{this.oPai.aGrid[this.oPai.iArray][1]}]</Tit1>
<Tit1a>Itens da Ordem [{this.oPai.aGrid[this.oPai.iArray][0]}]</Tit1a>
<Tit2>Servios a Faturar da Ordem [{this.oPai.aGrid[this.oPai.iArray][2]}]</Tit2>
<Tit3>Itens do Pedido [{this.oPai.aGrid[this.oPai.iArray][2]}]</Tit3>
<Tit1b>Itens da Ordem [{this.oPai.aGrid[this.oPai.iArray][0]}]</Tit1b>
<Tit5>Detalhamentos</Tit5>
<Tit1e>Histrico de Quantidades Agendadas Parcialmente</Tit1e>
<CpoTit1>
   -l
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -s-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit1>
<Cpo1>
   'js.this.flMarcado('.$aLin["PPID"].')'
   $aLin["PPID"] .'/'. $aLin["ISERIAL"] . '<br> IS: ' . $aLin[strtoupper('pISRegFis')] . '<br> IBSUF: ' . $aLin[strtoupper('pRegFisIBS')] . '<br> IBSMun: ' . $aLin[strtoupper('pRegFisIBSMun')] . '<br> CBS: ' . $aLin[strtoupper('pRegFisCBS')]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
</Cpo1>
<CpoTit1c>
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -s-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit1c>
<Cpo1c>
   $aLin["PPID"] .'/'. $aLin["ISERIAL"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
</Cpo1c>
<Cpo1b>
   $aLin["PPID"] .'/'. $aLin["ISERIAL"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
   $aLin["PORDEM"]
   $aLin["SCODITEM"]
</Cpo1b>
<CpoTit2>
   -l-20
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-n-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-n-12-5
   -s-12-5       ; 
   Vl.Total-n-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit2>
<Cpo2>
   'js.this.flMarcado('.$aLin["PPID"].')'
   $aLin["PPID"]                                       
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   $aLin["NPRBRUTO"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   $aLin["NPROD_VPROD"]
   $aLin["PPID"]
   'js.this.flMarcadosIgualAoOriginal('.$aLin["PITEM"].')'
</Cpo2>
<CpoTit1d>
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -s-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit1d>
<Cpo1d>
   $aLin["PPID"] .'/'. $aLin["ISERIAL"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Origem</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQTAGE"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Saldo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr></table>' 
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
</Cpo1d>
<CpoTit1e>
   Pedido-s-10
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -s-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit1e>
<Cpo1e>
   $aLin["PORDEM"]
   $aLin["PPID"] .'/'. $aLin["ISERIAL"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>' 
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
</Cpo1e>
<expcpo1>
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>'
</expcpo1>
<expcpo2>
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
</expcpo2>
<expcpo3>
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_">
       <tr>
          <td style="text-align: left"><b>Qt Origem</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td>
          <td><b>' . number_format($aLin["NQTAGE"],5,",",".") . '</b></td>
       </tr>
       <tr>
          <td style="text-align: left"><b>Saldo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td>
          <td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td>
       </tr>
    </table>'
</expcpo3>
<Sql1>
   select a.iSerial,
          a.jTipo,
          a.pPId,
          a.pOrdem,
          a.nQt,
          a.nQtRes,
          a.nQtLib,
          a.nQtEnt,
          a.nQtOP,
          a.nQtCanc,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.jProd_indTot,
          a.jOrig,
          a.nPrBruto,
          b.sCodigo     sCodItem,
          b.sDescricao  sItem,
          c.sCodigo    sCodUni,
          c.sUnidade   sDesUni,
          c.jDec,
          a.nQtAge,
          a.nProd_vFrete,
          a.nProd_vSeg,
          a.nProd_vOutro,
          a.pMoe,
          k.sDescricao      sMoe,
          a.fMoe,
          a.nQtMoe,
          a.jCam,
          a.pCam,
          a.fCam,
          kk1.sDescricao  sMoeCambio,
          a.nCam,
          a.sCam,
          a.nVDescTpED,
          a.nVDescTpEDG,
          a.nVEncFinTpED,
          a.nVDescInc,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          d.jTipo jEntSai,
          a.pISRegFis,
          a.pRegFisIBS,
          a.pRegFisIBSMun,
          a.pRegFisCBS,
          a.pItem
   from Ordens_Itens  a    left join Moeda         k   on a.pMoe    = k.pPId   and k.iVer   = k.iVAt
                           left join Cambio        kk  on a.pCam    = kk.pPId  and kk.iVer  = kk.iVAt
                           left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and kk1.iVer = kk1.iVAt
                           left join NCM           g   on a.pNCM    = g.pPId   and g.iVer   = a.fNCM
                           left join UnidadeMedida c   on a.pUni   = c.pPId and c.iVer  = c.iVAt,
        Itens         b,
        Ordens        d
   where a.lExc   = 0  
     and a.iVer   = a.iVAt
     and a.pOrdem = {ChaveAtual_1}
     and a.pOrdem = d.pPId and d.iVer  = d.iVAt
     and a.pItem  = b.pPId and b.iVer  = a.fItem
   order by a.iSerial
</Sql1>
<Sql1e>
   select a.iSerial,
          a.jTipo,
          a.pPId,
          a.pOrdem,
          a.nQt,
          a.nQtRes,
          a.nQtLib,
          a.nQtEnt,
          a.nQtOP,
          a.nQtCanc,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.jProd_indTot,
          a.jOrig,
          a.nPrBruto,
          b.sCodigo     sCodItem,
          b.sDescricao  sItem,
          c.sCodigo    sCodUni,
          c.sUnidade   sDesUni,
          c.jDec,
          a.nQtAge,
          a.nProd_vFrete,
          a.nProd_vSeg,
          a.nProd_vOutro,
          a.pMoe,
          k.sDescricao      sMoe,
          a.fMoe,
          a.nQtMoe,
          a.jCam,
          a.pCam,
          a.fCam,
          kk1.sDescricao  sMoeCambio,
          a.nCam,
          a.sCam,
          a.nVDescTpED,
          a.nVDescTpEDG,
          a.nVEncFinTpED,
          a.nVDescInc,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          d.jTipo jEntSai,
          a.pItem
   from Ordens_Itens  a    left join Moeda         k   on a.pMoe    = k.pPId   and k.iVer   = k.iVAt
                           left join Cambio        kk  on a.pCam    = kk.pPId  and kk.iVer  = kk.iVAt
                           left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and kk1.iVer = kk1.iVAt
                           left join NCM           g   on a.pNCM    = g.pPId   and g.iVer   = a.fNCM
                           left join UnidadeMedida c   on a.pUni   = c.pPId and c.iVer  = c.iVAt,
        Itens         b,
        Ordens        d
   where a.lExc   = 0  
     and a.iVer   = a.iVAt
     and a.pOSaIAgePai = {ChaveAtual_1}
     and a.pOrdem = d.pPId and d.iVer  = d.iVAt
     and a.pItem  = b.pPId and b.iVer  = a.fItem
   order by a.iSerial
</Sql1e>
<CpoTit2>
   -l
   Codigo-s-30            ; b.sCodigo
   Servio-s-30           ; b.sDescricao
</CpoTit2>
<Cpo2>
   'js.this.flMarcado('.$aLin["PPID"].')'
   $aLin["SCODIGO"]
   $aLin["SDESCRICAO"]
   $aLin["PPID"]
</Cpo2>
<Sql2>
   select a.pPId,
          b.sCodigo,
          b.sDescricao,
          a.pItem
   from Ordens_Itens  a,
        Itens         b
   where a.lExc   = 0  
     and a.iVer   = a.iVAt
     and a.pOrdem = {ChaveIrma_1_12}
     and a.pItem  = b.pPId and b.iVer = a.fItem
   order by b.sCodigo
</Sql2>
<CpoTit3>
   -p-10
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   Vl.Total-n-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit3>
<Cpo3>
   $aLin["PPID"]                                       
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],5,",",".")
   $aLin["NPROD_VPROD"]
   $aLin["PPID"]
   $aLin["PITEM"]
</Cpo3>
<Sql3>
   select a.iSerial,
          a.jTipo,
          a.pPId,
          a.nQt,
          a.pItem,
          a.nQtEnt,
          a.nQtOP,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.jProd_indTot,
          a.jOrig,
          a.nPrBruto,
          b.sCodigo     sCodItem,
          b.sDescricao  sItem,
          c.sCodigo    sCodUni,
          c.sUnidade   sDesUni,
          c.jDec,
          a.nProd_vFrete,
          a.nProd_vSeg,
          a.nProd_vOutro,
          a.pMoe,
          k.sDescricao      sMoe,
          a.fMoe,
          a.nQtMoe,
          a.jCam,
          a.pCam,
          a.fCam,
          kk1.sDescricao  sMoeCambio,
          a.nCam,
          a.sCam,
          a.nVDescTpED,
          a.nVDescTpEDG,
          a.nVEncFinTpED,
          a.nVDescInc,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          d.jTipo jEntSai
   from Ordens_Itens  a    left join Moeda         k   on a.pMoe    = k.pPId   and k.iVer   = k.iVAt
                           left join Cambio        kk  on a.pCam    = kk.pPId  and kk.iVer  = kk.iVAt
                           left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and kk1.iVer = kk1.iVAt
                           left join NCM           g   on a.pNCM    = g.pPId   and g.iVer   = a.fNCM
                           left join UnidadeMedida c   on a.pUni     = c.pPId and c.iVer  = c.iVAt,
        Itens         b,
        Ordens        d
   where a.lExc   = 0  
     and a.iVer   = a.iVAt
     and a.pOrdem = {ChaveAtual_1}
     and a.pOrdem = d.pPId and d.iVer  = d.iVAt
     and a.pItem  = b.pPId and b.iVer  = a.fItem
     and a.pUni   = c.pPId and c.iVer  = c.iVAt
   order by a.iSerial
</Sql3>
<Sql4>
   select a.iSerial,
          a.jTipo,
          a.pPId,
          a.nQt,
          a.nQtRes,
          a.nQtLib,
          a.nQtEnt,
          a.nQtOP,
          a.nQtCanc,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.jProd_indTot,
          a.jOrig,
          a.nPrBruto,
          b.sCodigo     sCodItem,
          b.sDescricao  sItem,
          c.sCodigo    sCodUni,
          c.sUnidade   sDesUni,
          c.jDec,
          a.nProd_vFrete,
          a.nProd_vSeg,
          a.nProd_vOutro,
          a.pMoe,
          k.sDescricao      sMoe,
          a.fMoe,
          a.nQtMoe,
          a.jCam,
          a.pCam,
          a.fCam,
          kk1.sDescricao  sMoeCambio,
          a.nCam,
          a.sCam,
          a.nVDescTpED,
          a.nVDescTpEDG,
          a.nVEncFinTpED,
          a.nVDescInc,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          d.jTipo jEntSai,
          a.pItem
   from Ordens_Itens  a    left join Moeda         k   on a.pMoe    = k.pPId   and k.iVer   = k.iVAt
                           left join Cambio        kk  on a.pCam    = kk.pPId  and kk.iVer  = kk.iVAt
                           left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and kk1.iVer = kk1.iVAt
                           left join NCM           g   on a.pNCM    = g.pPId   and g.iVer   = a.fNCM
                           left join UnidadeMedida c   on a.pUni   = c.pPId and c.iVer  = c.iVAt,
        Itens         b,
        Ordens        d
   where a.lExc   = 0  
     and a.iVer   = a.iVAt
     and a.pOrdem = {ChaveAtual_1}
     and a.pOrdem = d.pPId and d.iVer  = d.iVAt
     and a.pItem  = b.pPId and b.iVer  = a.fItem
   order by a.iSerial
</Sql4>
<CpoTit5>
   Ordem-p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -n-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -n-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -n-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit5>
<Cpo5>
   $aLin["PORDEM"] 
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
</Cpo5>
<Sql5>
   select a.iSerial,
          a.pOrdem,
          a.jTipo,
          a.pPId,
          a.nQt,
          a.nQtRes,
          a.nQtLib,
          a.nQtEnt,
          a.nQtOP,
          a.nQtCanc,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.jProd_indTot,
          a.jOrig,
          a.nPrBruto,
          b.sCodigo     sCodItem,
          b.sDescricao  sItem,
          c.sCodigo    sCodUni,
          c.sUnidade   sDesUni,
          c.jDec,
          a.nProd_vFrete,
          a.nProd_vSeg,
          a.nProd_vOutro,
          a.pMoe,
          k.sDescricao      sMoe,
          a.fMoe,
          a.nQtMoe,
          a.jCam,
          a.pCam,
          a.fCam,
          kk1.sDescricao  sMoeCambio,
          a.nCam,
          a.sCam,
          a.nVDescTpED,
          a.nVDescTpEDG,
          a.nVEncFinTpED,
          a.nVDescInc,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          d.jTipo jEntSai,
          a.pItem
   from  ORDENS_Consolidar_Detalhamentos   aa  join Ordens_Itens  a   on aa.pItem  = a.pItem  and a.iVer   = a.iVAt and a.lExc = 0 and a.pOrdem = aa.pOrdemDet
                                               join Itens         b   on a.pItem   = b.pPId   and b.iVer   = a.fItem
                                               join Ordens        d   on a.pOrdem  = d.pPId   and d.iVer   = d.iVAt
                                          left join Moeda         k   on a.pMoe    = k.pPId   and k.iVer   = k.iVAt
                                          left join Cambio        kk  on a.pCam    = kk.pPId  and kk.iVer  = kk.iVAt
                                          left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and kk1.iVer = kk1.iVAt
                                          left join NCM           g   on a.pNCM    = g.pPId   and g.iVer   = a.fNCM
                                          left join UnidadeMedida c   on a.pUni    = c.pPId and c.iVer     = c.iVAt
   where aa.lExc   = 0  
     and aa.iVer   = aa.iVAt
     and aa.pOrdemConsol = {ChaveIrma_1_0}
     and b.sCodigo = '{ChaveIrma_1_1}'
   order by a.iSerial
</Sql5>
<Pesquisar1>
   ((upper(b.sCodigo) like '%{p0}%') or (upper(b.sDescricao) like '%{p0}%') or (upper(g.sCodigo) like '%{p0}%') or (upper(g.sDescricao) like '%{p0}%'))
</Pesquisar1>
<Menu1>
   main1 ; Alterar Valor [UN] Bruto (marcados)   ; flRangeProcesso("dd_files/erp_ORDENS_Itens_AltPrecoMarcados.dda","Processo_1","processos/ORDENS_Itens_AltPrecoMarcados.php",this.oPai)
   main1 ; CTR                                   ; flGrid(this.oPai,'dd_files/erp_ORDENS_Itens_CTR.dda','Padrao_2')
   main1 ; Tabela de Preo                       ; flGrid(this.oPai,'dd_files/erp_POLITICAS_TabPrecos_Itens.dda','Padrao_3')
   main1 ; Tabela de Preo Promocional           ; flGrid(this.oPai,'dd_files/erp_POLITICAS_TabPrecos_ExcTQ_GrpPromo.dda','Padrao_2')
</Menu1>
<Menu1a>
</Menu1a>
<Menu1b>
   main1 ; Detalhamento dos Itens          ; flGrid(this.oPai,'dd_files/erp_ORDENS_Itens.dda','Padrao_5')
</Menu1b>
<Menu1d>
   main1 ; Histrico de Quantidades Agendadas Parcialmente  ; flGrid(this.oPai,'dd_files/erp_ORDENS_Itens.dda','Padrao_1e')
</Menu1d>
<Menu2>
   main1 ; Anexar Servios marcados ; flCallSysPOP(1219,this.oPai,'',this.oPai.fiChaveAtual())
</Menu2>
<Menu4>
   main1 ; Gerar Recebimento Fragmentado    ;  flCallSysPOP(1138,this.oPai,'Gerar Recebimento dos itens marcados?'   ,this.oPai.fiChaveAtual())
   main1 ; Excluir Itens Marcados           ;  flCallSysPOP(1014,this.oPai,'Excluir Itens Marcados?'   ,this.oPai.fiChaveAtual())
</Menu4>
<Menu5>
</Menu5>
<Nr01>alert("Qtux-Dialog\n\nNada a relacionar ...")</Nr01>
<Nr02>oGrid.flGridInc()</Nr02>
<TipoNr01>0</TipoNr01>
<TipoNr02>1</TipoNr02>
<Esc_Tit1>Item: [{p5}]  -  Qt: [{p4}]  -  Un: [{p3}] </Esc_Tit1>
<Esc_CpoTit1>
   Ordem Id-i-10
   Unidade da Ordem-s-30
   Saldo da Ordem-n-18-5
   Fator-n-18-5
   Saldo Convertido-n-18-5      
</Esc_CpoTit1>
<Esc_Cpo1>
   $aLin["PORDEM"]
   $aLin["SUNIORDEM"]
   $aLin["NQTPEND"]
   $aLin["PUNIORDEM"]==$aLin["PUNIPRENF"] ? 1  :($aLin["NFATOR"]==0 ? 'Sem Fator' : $aLin["NFATOR"])
   $aLin["PUNIORDEM"]==$aLin["PUNIPRENF"] ? $aLin["NQTPEND"] : $aLin["NQTPEND2"]
   $aLin["PPID"]
</Esc_Cpo1>
<Esc_Sql1>
   select  a.pPId,
           a.pOrdem,
           d.sCodigo    sCodItem,
           d.sDescricao sItem,
           e.pPId       pUniOrdem,
           e.sUnidade   sUniOrdem,
           f.pPId       pUniPreNF,
           f.sUnidade   sUniRFis,
           g.nFator,  
           g.nFator*(a.nQt-a.nQtEnt) nQtPend2,
          (a.nQt-a.nQtEnt) nQtPend
   from Ordens_Itens      a,
        Ordens            b,
        PreNF             c,
        Itens             d,
        UnidadeMedida     e  left join Conversao_UnidadeMedida g on  g.iver=g.ivat and ((g.pUni1 = e.pPId and g.pUni2 = {p2}) or (g.pUni1 = {p2} and g.pUni2 =  e.pPId)),
        UnidadeMedida     f
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pItem   = {p1}
     and a.pItem   = d.pPId and d.iVer = a.fItem
     and a.pUni    = e.pPId and e.iVer = e.iVAt
     and f.pPId    = {p2}   and f.iVer = f.iVAt
     and a.pOrdem  = b.pPId and b.iVer = b.iVAt
     and b.jTipo   = 0
     and b.tConf   is not null
     and c.pPId    = {ChaveAtual_2} and c.iVer = c.iVAt
     and b.pDest   = c.pDest
     and b.pEmi    = c.pEmi
     and (a.nQt-a.nQtEnt) > 0
     and a.lBaixa  = 0
   order by pOrdem
</Esc_Sql1>
<Esc_SqlVars1>
   select a.pPId,
          a.iVer,
          a.pOrdem
   from Ordens_Itens    a
   where a.pPId = {pEscId}
     and a.iVer = a.iVAt
</Esc_SqlVars1>
<Esc_VarsServerToClient1>
   $aLin["PPID"]
   $aLin["IVER"]
   $aLin["PORDEM"]
</Esc_VarsServerToClient1>
<Esc_Tit2>Itens da Ordem, resultado da busca por [{p0}]</Esc_Tit2>
<Esc_CpoTit2>
   Ordem Id-i-10
   No. Doc Origem-s-20
   Cdigo-s-20
   Item-s-50
   Saldo a Produzir-n-18-5
</Esc_CpoTit2>
<Esc_Cpo2>
   $aLin["PORDEM"]
   $aLin["SDOC"]
   $aLin["SCODITEM"]
   $aLin["SITEM"]
   $aLin["NSDOPROD"]
   $aLin["PPID"]
</Esc_Cpo2>
<Esc_Sql2>
   select  a.pPId,
           a.pOrdem,
           b.sDoc,
           d.sCodigo    sCodItem,
           d.sDescricao sItem,
           a.nQt-a.nQtOP nSdoProd
   from Ordens_Itens      a,
        Ordens            b,
        Itens             d
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and b.pDest   = {p1}
     and b.pEmi    = {p2}
     and a.pItem   = d.pPId and d.iVer = d.iVAt
     and a.pOrdem  = b.pPId and b.iVer = b.iVAt
     and b.jTipo   = 1
     and b.tConf is null
   order by pOrdem
</Esc_Sql2>
<Esc_SqlVars2>
   select  a.pPId,
           a.iVer,
           a.iVAt,
           b.sDoc,
           a.pOrdem,
           a.pItem,
           a.fItem,
           d.sCodigo    sCodItem,
           d.sDescricao sItem,
           c.sCodigo sUnProd,
           d.pRegDepProd,
           e3.sUFis sUn1Prod,
           f3.sUFis sUn2Prod,
           g3.sUFis sUn3Prod,
           h3.sUFis sUn4Prod,
           i3.sUFis sUn5Prod,
           j3.sUFis sUn6Prod,
           k3.sUFis sUn7Prod,
           l3.sDescricao sInsProd
   from Ordens_Itens      a,
        Ordens            b,
        Itens             d   left join EST_RegDepositos  o on d.pRegDepProd  = o.pPId  and  o.iVer =  o.iVAt
                              left join EST_Depositos     r on o.pDep         = r.pPId  and  r.iVer =  r.iVAt
                              left join UFis             e3 on r.pUFis        = e3.pPId and e3.iVer = e3.iVAt
                              left join UFis             f3 on e3.pParent     = f3.pPId and f3.iVer = f3.iVAt
                              left join UFis             g3 on f3.pParent     = g3.pPId and g3.iVer = g3.iVAt
                              left join UFis             h3 on g3.pParent     = h3.pPId and h3.iVer = h3.iVAt
                              left join UFis             i3 on h3.pParent     = i3.pPId and i3.iVer = i3.iVAt
                              left join UFis             j3 on i3.pParent     = j3.pPId and j3.iVer = j3.iVAt
                              left join UFis             k3 on j3.pParent     = k3.pPId and k3.iVer = k3.iVAt
                              left join EST_Instancias   l3 on  o.pIns        = l3.pPId and l3.iVer = l3.iVAt
                              left join UnidadeMedida     c on  d.pUnProd     = c.pPId  and c.iVer=c.iVAt
   where a.pPId = {pEscId}
     and a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pItem   = d.pPId and d.iVer = d.iVAt
     and a.pOrdem  = b.pPId and b.iVer = b.iVAt
     and b.jTipo   = 1
   order by pOrdem
</Esc_SqlVars2>
<Esc_VarsServerToClient2>
   $aLin["PPID"]
   $aLin["IVER"]
   $aLin["PITEM"]
   $aLin["FITEM"]
   $aLin["SCODITEM"]
   $aLin["SITEM"]
   $aLin["SUNPROD"]
   $aLin["PREGDEPPROD"]
   $aLin["SUN1PROD"]
   $aLin["SUN2PROD"]
   $aLin["SUN3PROD"]
   $aLin["SUN4PROD"]
   $aLin["SUN5PROD"]
   $aLin["SUN6PROD"]
   $aLin["SUN7PROD"]
   $aLin["SINSPROD"]
   $aLin["PORDEM"]
   $aLin["SDOC"]
</Esc_VarsServerToClient2>
<TelaTit1>
   Ficha da Linha da Ordem 
</TelaTit1>
<DbToVars1> 
   select a.tInc,
          a.iVer,
          a.iVAt,
          a.pPId,
          a.iSerial,
          a.nQt,
          a.nQt nQtPed,
          a.nQtRes,
          a.nQtEnt,
          a.nQtLib,
          a.nQtFat,
          a.nQtCanc,
          (a.nQt-a.nQtEnt-a.nQtCanc) nQtPend,
          a.nQtCarga,         
          a.lBaixa,
          a.pRegFis,
          a.fRegFis,
          a.pNeg,
          a.fNeg,
          a.pTab,
          r.sCodigo     sCodTab,
          r.sDescricao  sDesTab,
          a.fTab,
          a.pTabI,
          a.fTabI,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.nProd_vFrete,
          a.nVMLE,
          a.nProd_vSeg,
          a.nProd_vDesc,
          a.nProd_vOutro,
          a.jProd_indTot,
          a.sDI_nDI,               
          a.dDI_dDI,                
          a.sDI_xLocDesemb,        
          a.sDI_UFDesemb,           
          a.dDI_dDesemb,             
          a.sDI_cExportador,
          a.iAdi_nAdicao,          
          a.iAdi_nSeqAdic,         
          a.sAdi_cFabricante,      
          a.nAdi_vDescDI,          
          a.sAdi_xPed,             
          a.iAdi_nItemPed,
          a.nCIDE_qBCprod, 
          a.nCIDE_vAliqProd,
          a.nCIDE_vCIDE,
          a.jICMS_GrupoTrib,
          a.jICMS_orig,
          a.jICMS_modBC,
          a.nICMS_vBC,
          a.nICMS_pICMS,
          a.nICMS_vICMS,
          a.jICMS_modBCST,
          a.nICMS_pMVAST,
          a.nICMS_pRedBCST,
          a.nICMS_vBCST,
          a.nICMS_pICMSST,
          a.nICMS_vICMSST,
          a.nICMS_pRedBC,
          a.jICMS_motDesICMS,
          a.nICMS_vBCSTRet,
          a.nICMS_vICMSSTRet,
          a.jICMSPart_orig,
          a.jICMSPart_CST,
          a.jICMSPart_modBC,
          a.nICMSPart_vBC,
          a.nICMSPart_pRedBC,
          a.nICMSPart_pICMS,
          a.nICMSPart_vICMS,
          a.jICMSPart_modBCST,
          a.nICMSPart_pMVAST,
          a.nICMSPart_pRedBCT,
          a.nICMSPart_vBCST,
          a.nICMSPart_pICMSST,
          a.nICMSPart_vICMSST,
          a.nICMSPart_pBCOp,
          a.sICMSPart_UFST,
          a.jICMSST_orig,
          a.jICMSST_CST,
          a.nICMSST_vBCSTRet,
          a.nICMSST_vICMSSTRe,
          a.nICMSST_vBCSTDest,
          a.nICMSST_vICMSSTDes,
          a.jGrupo_simples,    
          a.jICMSSN_Orig,
          a.jICMSSN_CSOSN,
          a.nICMSSN_pCredSN,
          a.nICMSSN_vCredICMSSN,
          a.jICMSSN_modBCST,
          a.nICMSSN_pMVAST,
          a.nICMSSN_pRedBCST,
          a.nICMSSN_vBCST,
          a.nICMSSN_pICMSST,
          a.nICMSSN_vICMSST,
          a.nICMSSN_vBCSTRet,
          a.nICMSSN_vICMSSTRet,
          a.jICMSSN_modBC,
          a.nICMSSN_vBC,
          a.nICMSSN_pRedBC,
          a.nICMSSN_pICMS,
          a.nICMSSN_vICMS,
          a.sIPI_clEnq,
          a.sIPI_CNPJProd,
          a.sIPI_cSelo,
          a.nIPI_qSelo,
          a.sIPI_cEnq,
          a.jIPINT_CST,
          a.nIPITrib_vBC,
          a.nIPITrib_pIPI,
          a.nIPITrib_qUnid,
          a.nIPITrib_vUnid,
          a.nIPITrib_vIPI,
          a.nII_vBC,
          a.nII_vDespAdu,
          a.nII_vII,
          a.nII_vIOF,
          a.jPIS_CST,  
          a.nPIS_vBC,
          a.nPIS_pPIS,
          a.nPIS_vPIS,
          a.nPIS_qBCProd, 
          a.nPIS_vAliqProd, 
          a.nPISST_vBC,
          a.nPISST_pPIS,
          a.nPISST_qBCProd,
          a.nPISST_vAliqProd,
          a.nPISST_vPIS,
          a.jCOFINS_CST,
          a.nCOFINS_vBC,
          a.nCOFINS_pCOFINS,
          a.nCOFINS_vCOFINS,
          a.nCOFINS_qBCProd,
          a.nCOFINS_vAliqProd,
          a.nCOFINSST_vBC,
          a.nCOFINSST_pCOFINS,
          a.nCOFINSST_qBCProd,
          a.nCOFINSST_vAliqProd,
          a.nCOFINSST_vCOFINS,
          a.nISSQN_vBC,
          a.nISSQN_vAliq,
          a.nISSQN_vISSQN,
          a.nISSQN_cMunFG,
          a.nISSQN_cListServ,
          a.jISSQN_cSitTrib,
          a.sInfAdProd,
          a.jTipo,
          a.tEntPla,
          a.tEmissao,
          a.tSaida,
          a.pItem,
          a.fItem,
          c.sCodigo     sRegCodItem,
          c.sDescricao  sRegDesItem,
          c.sCodigo     sNegCodItem,
          c.sDescricao  sNegDesItem,
          c.sCodigo     sTabCodItem,
          c.sDescricao  sTabDesItem,
          n.sCEST,
          c.lLote  iLote,
          a.pUni,
          a.fUni,
          e.sCodigo      sCodUni,
          e.sUnidade    sUni,
          a.pNCM,   
          a.fNCM,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          a.pCFO,   
          a.fCFO,
          h.sCodigo     sCodCFO,
          h.sAbrev,
          a.pLote,
          ii.sDescricao  sDesLote,
          a.fLote,
          a.jFDiasEnt,
          a.iDiasInf,
          a.iDiasCalc,
          a.lInspecao,
          a.nDesc,
          a.pIPIRegFis,
          a.pICMSRegFis,        
          a.pICMSSNRegFis,        
          a.pICMSPartRegFis,        
          a.pICMSSTRetRegFis,
          a.pISSQNRegFis,       
          a.pIRPJRegFis,        
          a.pCofinsRegFis,      
          a.pPISRegFis,         
          a.pCofinsSTRegFis,    
          a.pPISSTRegFis,       
          a.pIIRegFis,
          a.fIIRegFis,
          a.fIPIRegFis,         
          a.fICMSRegFis,        
          a.fICMSSNRegFis,        
          a.fICMSPartRegFis,        
          a.fICMSSTRetRegFis,
          a.fISSQNRegFis,       
          a.fIRPJRegFis,        
          a.fCofinsRegFis,      
          a.fPISRegFis,         
          a.fCofinsSTRegFis,    
          a.fPISSTRegFis,       
          a.pPTOpEDItem,
          a.fPTOpEDItem,
          a.pPTOpEDGrpItem,
          a.fPTOpEDGrpItem,
          a.nPrBruto,
          a.nPDescCP,     
          a.nVDescCP,     
          a.nPDescTpED,   
          a.nVDescTpED,   
          a.nVEncFinTpED,   
          a.nPDescTpEDG,  
          a.nVDescTpEDG,  
          a.nPDescInc,    
          a.nVDescInc,    
          a.nProd_pDesc,  
          a.pMoe,    
          k.sDescricao      sMoe,
          a.fMoe,    
          a.nQtMoe,  
          a.jCam,
          a.pCam,
          a.fCam,    
          kk1.sDescricao  sMoeCambio,
          a.nCam,    
          a.sCam,    
          a.lCCusto,
          a.lCrtlItem,
          a.jOrig,
          a.jBC_II,
          a.jBC_IPI,
          a.jBC_ICMS,
          a.jBC_ICMSST,
          a.jBC_PIS,
          a.jBC_COFINS,
          a.jBC_ISS,
          a.jVl_ICMSST,
          a.jVl_ICMS,
          a.nBC_II,
          a.nBC_IPI,
          a.nBC_ICMS,
          a.nBC_ICMSST,
          a.nBC_PIS,
          a.nBC_COFINS,
          a.nBC_ISS,
          a.nVl_ICMSST,
          a.nVl_ICMS,
          a.nICMS_vICMSSubstituto,
          a.nICMS_pRedBCEfet,
          a.nICMS_vBCEfet,
          a.nICMS_pICMSEfet,
          a.nICMS_vICMSEfet,
          a.nICMS_vICMSSTRet,
          a.nPEncFinTpED,
          a.nQtMin,     
          a.nQtMax,      
          a.nPrecoMin,  
          a.nPrecoMax,   
          a.lContQua,    
          a.lContPreco,  
          a.iCiclo,      
          a.iCicloAtual, 
          a.jTempo,      
          a.lSkipLote,
          a.pRegDepVen,
          a.fRegDepVen,
          b1.pDep,
          bb.pUFis,
          e1.sUFis      sUn1,
          f1.sUFis      sUn2,
          g1.sUFis      sUn3,
          h1.sUFis      sUn4,
          i1.sUFis      sUn5,
          j1.sUFis      sUn6,
          k1.sUFis      sUn7,
          l1.sDescricao sIns,
          c1.sCodigo    sUnidade,
          a.pRegDepRFis,
          a.fRegDepRFis,
          b2.pDep       pDepRFis,
          bbb.pUFis      pUFisRFis,
          e2.sUFis      sUn1RFis,
          f2.sUFis      sUn2RFis,
          g2.sUFis      sUn3RFis,
          h2.sUFis      sUn4RFis,
          i2.sUFis      sUn5RFis,
          j2.sUFis      sUn6RFis,
          k2.sUFis      sUn7RFis,
          l2.sDescricao sInsRFis,
          c2.sCodigo    sUnidadeRFis,
          a.pRegDepTransf,
          a.fRegDepTransf,
          b3.pDep        pDepTransf,
          bb3.pUFis      pUFisTransf,
          e3.sUFis       sUnTransf1,
          f3.sUFis       sUnTransf2,
          g3.sUFis       sUnTransf3,
          h3.sUFis       sUnTransf4,
          i3.sUFis       sUnTransf5,
          j3.sUFis       sUnTransf6,
          k3.sUFis       sUnTransf7,
          l3.sDescricao  sInsTransf,
          m3.sCodigo     sUnidadeTransf,
          a.lImport,
          a.lImposImpor,
          a.lAdicoes,
          a.lCIDE,   
          a.lICMS_ST,    
          a.lICMS_P,   
          a.lICMS_RR,   
          a.lICMS_SN,
          a.lIPI,       
          a.lPIS,    
          a.lPIS_ST,    
          a.lCofins, 
          a.lCofins_ST,
          a.lISSQN,
          a.lTranspFiscal,
          a.sFCI,
          a.jFinalidade,
          a.nAliqTranspImport,
          a.nAliqTranspNac,
          a.nTot_vTrib,
          a.jDI_tpViaTransp,
          a.nDI_vAFRMM,
          a.jDI_tpIntermedio,
          a.sDI_CNPJ,
          a.sDI_UFTerceiro,
          a.nImp_vTotTrib,
          a.nICMS_vICMSDeson,
          a.nICMS_vICMSOp,
          a.nICMS_pDif,
          a.nICMS_vICMSDif,
          a.nISSQN_vDeducao,
          a.nISSQN_vOutro,
          a.nISSQN_vDescIncond,
          a.nISSQN_vDescCond,
          a.nISSQN_vISSRet,
          a.jISSQN_indISS,
          a.sISSQN_cServico,
          a.sISSQN_nProcesso,
          a.lISSQN_indIncentivo,
          a.pISSQN_cServico,
          m.sCodigo       sISSQN_cServico,
          m.sDescricao    sISSQN_sServico,
          a.fISSQN_cServico,
          a.pISSQN_cMun,
          j.sCidade   sISSQN_sMun,
          j.iIBGE     sISSQN_cMun,
          a.pISSQN_cPais,
          l.sDescricao  sISSQN_sPais,
          l.sCodigo     sISSQN_cPais,
          a.fISSQN_cMun,
          a.fISSQN_cPais,
          a.nVBCUFDest,
          a.nPFCPUFDest,
          a.nPICMSUFDest,
          a.nPICMSInter,
          a.nPICMSInterPart,
          a.nVFCPUFDest,
          a.nVICMSUFDest,
          a.nVICMSUFRemet,
          a.pMotAltPed,
          s.sCodigo     sCodMotAltPed,
          s.sDescricao  sDesMotAltPed,
          s.sCodigo     sCodMotAltPe2,
          s.sDescricao  sDesMotAltPe2,
          a.fMotAltPed,
          a.pTabGrpP,  
          a.fTabGrpP,  
          a.pTabGrpPI,
          a.fTabGrpPI,
          a.lRE,
          a.lIPI_RE,
          a.lIPI_UT,
          a.tUltInsp  dUltInsp,
          a.pInsp,
          a.fInsp,
          a.pDepInsp,
          a.fDepInsp,
          e4.sUFis sUn1Insp,
          f4.sUFis sUn2Insp,
          g4.sUFis sUn3Insp,
          h4.sUFis sUn4Insp,
          i4.sUFis sUn5Insp,
          j4.sUFis sUn6Insp,
          k4.sUFis sUn7Insp,
          a.pDepReje,
          a.fDepReje,
          e5.sUFis sUn1Reje,
          f5.sUFis sUn2Reje,
          g5.sUFis sUn3Reje,
          h5.sUFis sUn4Reje,
          i5.sUFis sUn5Reje,
          j5.sUFis sUn6Reje,
          k5.sUFis sUn7Reje,
          a.pDepEnt,
          e6.sUFis sUn1Ent,
          f6.sUFis sUn2Ent,
          g6.sUFis sUn3Ent,
          h6.sUFis sUn4Ent,
          i6.sUFis sUn5Ent,
          j6.sUFis sUn6Ent,
          k6.sUFis sUn7Ent,
          a.pInsEnt,
          l6.sDescricao sInsEnt,
          a.nCTR_VlCalcI,
          e.lInt,
          a.nVTCI,
          a.nICMS_vBCFCP,
          a.nICMS_pFCP,
          a.nICMS_vFCP,
          a.nICMS_vBCFCPST,
          a.nICMS_pFCPST,
          a.nICMS_vFCPST,
          a.nICMS_vBCFCPSTRet,
          a.nICMS_pFCPSTRet,
          a.nICMS_vFCPSTRet,
          a.nICMSSN_pFCPST,
          a.nICMSSN_vFCPST,
          a.nICMSSN_vBCFCPST,
          a.nICMSSN_pFCPSTRet,
          a.nICMSSN_vFCPSTRet,
          a.nICMSSN_vBCFCPSTRet,
          a.nVBCFCPUFDest,
          a.nVDescLog,
          a.pCBenef,
          t.sCBenef,
          a.nVAcresCRTOsa,
          a.nPAcresCRTOsa,
          a.sProd_EX_TIPI,
          a.nIS_pIS,
          a.nIS_pISEspec,
          a.nIBSCBS_vBC,
          a.nIBSUF_pIBSUF,
          a.nIBSUF_pDif,
          a.nIBSUF_pRedAliq,
          a.nIBSUF_pAliqEfet,
          a.nIBSMun_pIBSMun,
          a.nIBSMun_pDif,
          a.nIBSMun_pRedAliq,
          a.nIBSMun_pAliqEfet,
          a.nIBSCBS_vIBS,
          a.nCBS_pCBS,
          a.nCBS_pDif,
          a.nCBS_pRedAliq,
          a.nCBS_pAliqEfet,
          a.nCBS_vDevTrib,
          a.nTribReg_pAliqEfetRegIBSUF,
          a.nTribReg_pAliqEfetRegIBSMun,
          a.nTribReg_pAliqEfetRegCBS,
          a.jIBSCP_cCredPres,
          a.nIBSCP_pCredPres,
          a.jCBSCP_cCredPres,
          a.nCBSCP_pCredPres,
          a.nTribCG_pAliqIBSUF,
          a.nTribCG_pAliqIBSMun,
          a.nTribCG_pAliqCBS,
          a.nIBSCBS_adRemIBS,
          a.nIBSCBS_adRemCBS,
          a.nIBSCBS_adRemIBSReten,
          a.nIBSCBS_adRemCBSReten,
          a.nIBSCBS_adRemIBSRet,
          a.nIBSCBS_vIBSMonoRet,
          a.nIBSCBS_adRemCBSRet,
          a.nIBSCBS_pDifIBS,
          a.nIBSCBS_pDifCBS,
          a.nTransfCred_vIBS,
          a.nTransfCred_vCBS,
          a.jIBSCBS_tpCredPresIBSZFM,
          a.pISRegFis,
          a.fISRegFis,
          a.sIS_CSTIS,
          a.sIS_CodCSTIS,
          a.sIS_ClassTribIS,
          a.pIBSCBSRegFis,
          a.fIBSCBSRegFis,
          a.sIBSCBS_CST,
          a.sIBSCBS_CodCST,
          a.sIBSCBS_ClassTrib,
          a.sTribReg_CodCSTReg,
          a.sTribReg_cClassTribReg,
          a.lImpSel,
          a.lIBSCBS,
          a.nIS_vBCIS,
          a.sIS_uTrib,
          a.nIS_qTrib,
          a.nIS_vIS,
          a.nIBSUF_vIBSUF,
          a.nIBSUF_vDif,
          a.nIBSUF_vDevTrib,
          a.nIBSMun_vDif,
          a.nIBSMun_vDevTrib,
          a.nIBSMun_vIBSMun,
          a.nCBS_vDif,
          a.nCBS_vCBS,
          a.nTribReg_vTribRegIBSUF,
          a.nTribReg_vTribRegIBSMun,
          a.nTribReg_vTribRegCBS,
          a.nIBSCP_vCredPres,
          a.nIBSCP_vCredPresCondSus,
          a.nIBSCBS_vIBSMono,
          a.nIBSCBS_vCBSMono,
          a.nIBSCBS_qBCMonoReten,
          a.nIBSCBS_vIBSMonoReten,
          a.nIBSCBS_vCBSMonoReten,
          a.nIBSCBS_qBCMonoRet,
          a.nIBSCBS_vCBSMonoRet,
          a.nIBSCBS_vIBSMonoDif,
          a.nIBSCBS_vCBSMonoDif,
          a.nIBSCBS_vTotIBSMonItem,
          a.nIBSCBS_vTotCBSMonItem,
          a.pRegFisIBS,     
          a.fRegFisIBS,  
          a.pRegFisIBSMun,  
          a.fRegFisIBSMun,
          a.pRegFisCBS,     
          a.fRegFisCBS,
          z.sCoringa
   from   Ordens_Itens   a left join Ordens        i   on a.pOrdem           = i.pPId and i.iVer = i.iVAt
                           left join Itens         c   on a.pItem            = c.pPId and c.iVer = a.fItem
                           left join UnidadeMedida e   on a.pUni             = e.pPId and ((i.tConf is null and e.iVer = e.iVAt) or (i.tConf is not null and e.iVer=a.fUni)) 
                           left join NCM           g   on a.pNCM             = g.pPId and ((i.tConf is null and g.iVer = g.iVAt) or (i.tConf is not null and g.iVer=a.fNCM))
                           left join CFO           h   on a.pCFO             = h.pPId and h.iVer = h.iVAt
                           left join NCM_CodCEST      n on c.pNCMCodCEST  = n.pPId  and  n.iVer =  n.iVAt
                           left join Moeda         k   on a.pMoe             = k.pPId and ((i.tConf is null and k.iVer = k.iVAt) or (i.tConf is not null and k.iVer=a.fMoe))
                           left join Cidades       j   on a.pISSQN_cMun      = j.pPId and ((i.tConf is null and j.iVer = j.iVAt) or (i.tConf is not null and j.iVer=a.fISSQN_cMun))
                           left join Paises        l   on a.pISSQN_cPais     = l.pPId and ((i.tConf is null and l.iVer = l.iVAt) or (i.tConf is not null and l.iVer=a.fISSQN_cPais))
                           left join TipoServico   m   on a.pISSQN_cServico  = m.pPId and ((i.tConf is null and m.iVer = m.iVAt) or (i.tConf is not null and m.iVer=a.fISSQN_cServico))
                           left join TabPrecos     r   on a.pTab             = r.pPId and ((i.tConf is null and r.iVer = r.iVAt) or (i.tConf is not null and r.iVer=a.fTab))
                           left join MotivoAltPedidosClientes     s   on a.pMotAltPed = s.pPId and s.iVer=s.iVAt 
                           left join Cambio        kk  on a.pCam    = kk.pPId  and ((i.tConf is null and kk.iVer = kk.iVAt) or (i.tConf is not null and kk.iVer=a.fCam))
                           left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and ((i.tConf is null and kk1.iVer = kk1.iVAt) or (i.tConf is not null and kk1.iVer=a.fCam))
                           left join LotesItens    ii  on a.pLote   =  ii.pPId and ((i.tConf is null and ii.iVer = ii.iVAt) or (i.tConf is not null and ii.iVer=a.fLote))
                           left join UF_CBenef      t on a.pCBenef  = t.pPId  and  t.iVer =  t.iVAt
                           left join EST_RegDepositos   b1 on a.pRegDepVen     = b1.pPId    and b1.iVer = b1.iVAt 
                           left join EST_Depositos      bb on b1.pDep          = bb.pPId    and bb.iVer = bb.iVAt
                           left join UFis               e1 on bb.pUFis         = e1.pPId    and e1.iVer = e1.iVAt
                           left join UFis               f1 on e1.pParent       = f1.pPId    and f1.iVer = f1.iVAt
                           left join UFis               g1 on f1.pParent       = g1.pPId    and g1.iVer = g1.iVAt
                           left join UFis               h1 on g1.pParent       = h1.pPId    and h1.iVer = h1.iVAt
                           left join UFis               i1 on h1.pParent       = i1.pPId    and i1.iVer = i1.iVAt
                           left join UFis               j1 on i1.pParent       = j1.pPId    and j1.iVer = j1.iVAt
                           left join UFis               k1 on j1.pParent       = k1.pPId    and k1.iVer = k1.iVAt
                           left join EST_Instancias     l1 on b1.pIns          = l1.pPId    and l1.iVer = l1.iVAt
                           left join UnidadeMedida      c1 on b1.pUni          = c1.pPId    and c1.iVer = c1.iVAt
                           left join EST_RegDepositos   b2  on a.pRegDepRFis    = b2.pPId    and b2.iVer = b2.iVAt 
                           left join EST_Depositos      bbb on b2.pDep          = bbb.pPId   and bbb.iVer = bbb.iVAt
                           left join UFis               e2  on bbb.pUFis        = e2.pPId    and e2.iVer = e2.iVAt
                           left join UFis               f2  on e2.pParent       = f2.pPId    and f2.iVer = f2.iVAt
                           left join UFis               g2  on f2.pParent       = g2.pPId    and g2.iVer = g2.iVAt
                           left join UFis               h2  on g2.pParent       = h2.pPId    and h2.iVer = h2.iVAt
                           left join UFis               i2  on h2.pParent       = i2.pPId    and i2.iVer = i2.iVAt
                           left join UFis               j2  on i2.pParent       = j2.pPId    and j2.iVer = j2.iVAt
                           left join UFis               k2  on j2.pParent       = k2.pPId    and k2.iVer = k2.iVAt
                           left join EST_Instancias     l2  on b2.pIns          = l2.pPId    and l2.iVer = l2.iVAt
                           left join UnidadeMedida      c2  on b2.pUni          = c2.pPId    and c2.iVer = c2.iVAt
                           left join EST_RegDepositos   b3  on a.pRegDepTransf  = b3.pPId     and b3.iVer = b3.iVAt 
                           left join EST_Depositos      bb3 on b3.pDep          = bb3.pPId    and bb3.iVer = bb3.iVAt
                           left join UFis                e3 on bb3.pUFis        =  e3.pPId    and  e3.iVer =  e3.iVAt
                           left join UFis                f3 on e3.pParent       =  f3.pPId    and  f3.iVer =  f3.iVAt
                           left join UFis                g3 on f3.pParent       =  g3.pPId    and  g3.iVer =  g3.iVAt
                           left join UFis                h3 on g3.pParent       =  h3.pPId    and  h3.iVer =  h3.iVAt
                           left join UFis                i3 on h3.pParent       =  i3.pPId    and  i3.iVer =  i3.iVAt
                           left join UFis                j3 on i3.pParent       =  j3.pPId    and  j3.iVer =  j3.iVAt
                           left join UFis                k3 on j3.pParent       =  k3.pPId    and  k3.iVer =  k3.iVAt
                           left join EST_Instancias      l3 on b3.pIns          =  l3.pPId    and  l3.iVer =  l3.iVAt
                           left join UnidadeMedida       m3 on b3.pUni          =  m3.pPId    and  m3.iVer =  m3.iVAt 
                           left join EST_Depositos       c4 on  a.pDepInsp      = c4.pPId     and  c4.iVer = c4.iVAt 
                           left join UFis                e4 on c4.pUFis         = e4.pPId     and  e4.iVer = e4.iVAt
                           left join UFis                f4 on e4.pParent       = f4.pPId     and  f4.iVer = f4.iVAt
                           left join UFis                g4 on f4.pParent       = g4.pPId     and  g4.iVer = g4.iVAt
                           left join UFis                h4 on g4.pParent       = h4.pPId     and  h4.iVer = h4.iVAt
                           left join UFis                i4 on h4.pParent       = i4.pPId     and  i4.iVer = i4.iVAt
                           left join UFis                j4 on i4.pParent       = j4.pPId     and  j4.iVer = j4.iVAt
                           left join UFis                k4 on j4.pParent       = k4.pPId     and  k4.iVer = k4.iVAt
                           left join EST_Depositos       c5 on  a.pDepReje      = c5.pPId     and  c5.iVer = c5.iVAt 
                           left join UFis                e5 on c5.pUFis         = e5.pPId     and  e5.iVer = e5.iVAt
                           left join UFis                f5 on e5.pParent       = f5.pPId     and  f5.iVer = f5.iVAt
                           left join UFis                g5 on f5.pParent       = g5.pPId     and  g5.iVer = g5.iVAt
                           left join UFis                h5 on g5.pParent       = h5.pPId     and  h5.iVer = h5.iVAt
                           left join UFis                i5 on h5.pParent       = i5.pPId     and  i5.iVer = i5.iVAt
                           left join UFis                j5 on i5.pParent       = j5.pPId     and  j5.iVer = j5.iVAt
                           left join UFis                k5 on j5.pParent       = k5.pPId     and  k5.iVer = k5.iVAt
                           left join EST_Depositos       c6 on  a.pDepEnt       = c6.pPId     and  c6.iVer = c6.iVAt 
                           left join UFis                e6 on c6.pUFis         = e6.pPId     and  e6.iVer = e6.iVAt
                           left join UFis                f6 on e6.pParent       = f6.pPId     and  f6.iVer = f6.iVAt
                           left join UFis                g6 on f6.pParent       = g6.pPId     and  g6.iVer = g6.iVAt
                           left join UFis                h6 on g6.pParent       = h6.pPId     and  h6.iVer = h6.iVAt
                           left join UFis                i6 on h6.pParent       = i6.pPId     and  i6.iVer = i6.iVAt
                           left join UFis                j6 on i6.pParent       = j6.pPId     and  j6.iVer = j6.iVAt
                           left join UFis                k6 on j6.pParent       = k6.pPId     and  k6.iVer = k6.iVAt
                           left join EST_Instancias      l6 on a.pInsEnt        = l6.pPId     and  l6.iVer = l6.iVAt,
          CUP            z
   where a.pPId = {pId}
     and a.iVer = {a.iVer}
     and a.pInc = z.pPId and z.iVer = z.iVAt
</DbToVars1>
<1>
   select a.pPId       pOrdens_Item_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,
          b.sCCUsto    sCCusto_i,
          a.nRatCCusto nRatCCusto_i
   from Ordens_Item_CCusto a,
        CCusto             b
   where a.iVer       = a.iVAt
     and a.lExc       = 0
     and a.pOrdemItem = {ChaveAtual_0}
     and a.pCCusto    = b.pPId
     and b.iVer       = b.iVAt
  order by b.sCCUsto
</1>
<2>
   select a.pPId           pOrdens_Item_CContCred_i,
          e.pPId           pCContCred_i,
          a.fCPla          fCContCred_i,
          e.sCodigo        sCodCredPla_i,
          e.sDescricao     sDesCredPla_i,
          a.nRatCredCCont  nRatCredCCont_i
   from Ordens_Item_CContabil  a left join PlaConta   e on a.pCPla = e.pPid and e.iVer = e.iVAt
   where a.iVer  = a.iVAt
     and a.lExc  = 0
     and a.pOrdemItem ={ChaveAtual_0}
     and a.lDeb  = 0
   order by e.sCodigo,e.sDescricao
</2>
<3>
   select a.pPId          pOrdens_Item_CContDeb_i,
          e.pPId          pCContDeb_i,
          a.fCPla         fCContDeb_i,
          e.sCodigo       sCodDebPla_i,
          e.sDescricao    sDesDebPla_i,
          a.nRatDebCCont  nRatDebCCont_i
   from Ordens_Item_CContabil  a left join PlaConta   e on a.pCPla = e.pPid and e.iVer = e.iVAt
   where a.iVer       = a.iVAt
     and a.lExc       = 0
     and a.pOrdemItem = {ChaveAtual_0}
     and a.lDeb  = 1
   order by e.sCodigo,e.sDescricao
</3>
<VarsDefault1>
   sVerVAt = {pPId+'-'+iVer+'/'+iVAt}
   sRastro = {sVerVAt+', '+sCoringa+', '+tInc}
   lRastro = 0
   lImpSel = 1
   lIBSCBS = 1
   pOrdem      = {ChaveAtual_1}
   pTOper      = {ChaveIrma_1_0}
   sMoeCapa    = {ChaveIrma_1_1}
   tEntPla     = {ChaveIrma_1_2}
   jEntSai     = {ChaveIrma_1_3}
   pEmi        = {ChaveIrma_1_4}
   pDest       = {ChaveIrma_1_5}
   pDestDefault = 36669 
   nDescFin    = {ChaveIrma_1_6} 
   nDFin       = {ChaveIrma_1_7} 
   pCapaMoe    = {ChaveIrma_1_8} 
   jBC_PIS     = {ChaveIrma_1_9};
   jBC_COFINS  = {ChaveIrma_1_10};
   jBC_ICMS    = {ChaveIrma_1_11};
   jBC_IPI     = {ChaveIrma_1_12};
   jBC_ICMSST  = {ChaveIrma_1_13};
   jBC_II      = {ChaveIrma_1_14};
   jBC_ISS     = {ChaveIrma_1_15};
   jVl_ICMSST  = {ChaveIrma_1_16};
   jVl_ICMS    = {ChaveIrma_1_17};
   lFinanc     = {ChaveIrma_1_18}
   lTransfRem  = {ChaveIrma_1_19}
   lTransfDep3o = {ChaveIrma_1_21}
   nPDescLog    = {ChaveIrma_1_22}
   aEntSai = Entrada (Compra),Sada (Venda),Entrada/Sada,Transferncia
   mInfAdProd = {sInfAdProd}
   aPriori = Muito Baixa,Baixa,Normal,Alta,Muito Alta
   aTipo   = Manual,Negociao,Tabela de Preo
   aTipoTQ = Manual,Negociao
   pMotAltPed    = 0  
   sCodMotAltPed =    
   sDesMotAltPed =    
   lImpSel = 0
   lIBSCBS = 0
   aProd_indTot      = 0-Valor item no compe valor total , 1-Valor item compe valor total
   aICMS_GrupoTrib   = 00-Tributada integralmente, 10-Tributada com cobrana ICMS substituio tributria ,20-Com reduo de base de clculo , 30-Isenta/no tributada com cobrana ICMS substituio tributria ,40-Isenta ,41-No Tributada, 50-Suspenso , 51-Diferimento , 60-ICMS cobrado anteriormente por substituio tributria , 70-Com reduo base clculo e cobrana do ICMS substituio tributria , 90-Outros
   aICMS_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMS_modBC       = 0-Margem Valor Agregado(%), 1-Pauta(Valor), 2-Preo Tabelado Mx(Valor), 3-Valor Operao  
   aICMS_modBCST     = 0-Preo Tabelado ou Mximo Sugerido, 1-Lista Negativa(Valor), 2-Lista Positiva(valor), 3-Lista Neutra(valor), 4-Margem Valor Agregado(%), 5-Pauta(valor)  
   aICMSPart_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSPart_CST     = 10-Tributada com cobrana ICMS por substituio, 90-Outros
   aICMSPart_modBC   = 0-Margem Valor Agregado (%), 1-Pauta (Valor), 2-Preo Tabelado Mx (valor) 
   aICMSPart_modBCST = 0 Preo tabelado ou mximo sugerido, 1-Lista Negativa (valor), 2-Lista Positiva (valor), 3-Lista Neutra (valor), 4-Margem Valor Agregado(%), 5-Pauta (valor) 
   aOrig             = 0-Nac exceto as indicadas nos cdigos 3 a 5,1-Est Importao direta- exceto a indicada no cdigo 6,2-Est Adquirida no mercado interno- exceto a indicada no cdigo 7,3-Nac mercadoria ou bem com Contedo de Importao superior a 40%,4-Nac c/ produo feita em conformidade com os processos produtivos bsicos,5-Nac mercadoria/bem c/ Contedo de Importao- inferior ou igual a 40%,6-Est Importao direta- sem similar nacional- constante na Camex,7-Est Adquirida no mercado interno - sem similar nacional-constante na Camex,8-Nacional - mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSST_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSST_CST   = 41=No Tributado,60=cobrado anteriormente por substituio tributria
   aGrupo_simples    = Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=101 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=102 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=103 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=201 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=202 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=203 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=300 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=400 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=500 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=900 
   aICMSSN_Orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSSN_CSOSN     = 101-Tributada com permisso de crdito , 102-Tributada sem permisso de crdito , 103-Iseno para faixa de receita bruta , 201-Tributada com permisso de crdito com cobrana do ICMS por Substituio Tributria , 202-Tributada sem permisso de crdito com cobrana do ICMS por Substituio Tributria , 203-Iseno para faixa de receita bruta com cobrana do ICMS por Substituio Tributria , 300-Imune , 400-No tributada , 500-ICMS cobrado anteriormente por substituio tributria ou por antecipao, 900-Outros
   aICMSSN_modBCST   = 0-Preo Tabelado ou Mximo Sugerido, 1-Lista Negativa(Valor), 2-Lista Positiva(valor), 3-Lista Neutra(valor),4 - Margem Valor Agregado (%),5 - Pauta (valor) (v.2.0)
   aICMSSN_modBC     = 0-Margem Valor Agregado(%), 1-Pauta(Valor), 2-Preo Tabelado Mx(Valor), 3-Valor Operao , 4-Margem Valor Agregado(%), 5-Pauta (valor)
   aIPINT_CST        = 00-Entrada com recuperao de crdito, 01-Entrada tributada com alquota zero, 02-Entrada isenta, 03-Entrada no-tributada, 04-Entrada imune, 05-Entrada com suspenso,49-Outras entradas, 50-Sada tributada, 51-Sada tributada com alquota zero, 52-Sada isenta, 53-Sada no-tributada, 54-Sada imune, 55-Sada com suspenso, 99-Outras sadas
   aPIS_CST          = 01=Oper Tribut (BC= valor da oper alq normal (cumulativo/no cumulativo)),02=Oper Tribut (BC= valor da oper (alq diferenciada)),03-Oper Tribut (BC= QT vendida x alq por unidade de produto,04=Oper Tribut (tributao monofsica (alquota zero)),06=Oper Tribut (alquota zero),07=Oper Isenta da Contribuio,08=Oper Sem Incidncia da Contribuio,09=Oper com Suspenso da Contribuio,99=Outras Operaes,05=Oper Tribut (Substituio Tributria),49=Outras Operaes de Sada,50=Oper com Direito a Crd - Vinculada Exc a Receita Trib no Mercado Interno,51=Oper com Direito a Crd - Vinculada Exc a Receita No Trib no Mercado Interno,52=Oper com Direito a Crd . Vinculada Exc a Receita de Exportao,53=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno,54=Oper com Direito a Crd - Vinculada a Rec Tribut no Mercado Interno e de Export,55=Oper com Direito a Crd - Vinculada a Rec NoTribut no Mercado Interno e de Export,56=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno- e de Export,60=Crd Presumido - Operao de Aq Vinculada Excl a Receita Tribut no Mercado Interno,61=Crd Presumido - Operao de Aq Vinculada Excl a Receita No-Tribut no Mercado Interno,62=Crd Presumido - Operao de Aq Vinculada Excl a Receita de Exportao,63=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno,64=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut no Mercado Interno e de Export,65=Crd Presumido - Operao de Aq Vinculada a Receitas No-Tribut no Mercado Interno e de Export,66=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno- e de Export,67=Crd Presumido - Outras Operaes,70=Operao de Aquisio sem Direito a Crdito,71=Operao de Aquisio com Iseno,72=Operao de Aquisio com Suspenso,73=Operao de Aquisio a Alquota Zero,74=Operao de Aquisio sem Incidncia da Contribuio,75=Operao de Aquisio por Substituio Tributria,98=Outras Operaes de Entrada
   aCOFINS_CST       = 01=Oper Tribut (BC= valor da oper alq normal (cumulativo/no cumulativo)),02=Oper Tribut (BC= valor da oper (alq diferenciada)),03-Oper Tribut (BC= QT vendida x alq por unidade de produto,04=Oper Tribut (tributao monofsica (alquota zero)),06=Oper Tribut (alquota zero),07=Oper Isenta da Contribuio,08=Oper Sem Incidncia da Contribuio,09=Oper com Suspenso da Contribuio,99=Outras Operaes,05=Oper Tribut (Substituio Tributria),49=Outras Operaes de Sada,50=Oper com Direito a Crd - Vinculada Exc a Receita Trib no Mercado Interno,51=Oper com Direito a Crd - Vinculada Exc a Receita No Trib no Mercado Interno,52=Oper com Direito a Crd . Vinculada Exc a Receita de Exportao,53=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno,54=Oper com Direito a Crd - Vinculada a Rec Tribut no Mercado Interno e de Export,55=Oper com Direito a Crd - Vinculada a Rec NoTribut no Mercado Interno e de Export,56=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno- e de Export,60=Crd Presumido - Operao de Aq Vinculada Excl a Receita Tribut no Mercado Interno,61=Crd Presumido - Operao de Aq Vinculada Excl a Receita No-Tribut no Mercado Interno,62=Crd Presumido - Operao de Aq Vinculada Excl a Receita de Exportao,63=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno,64=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut no Mercado Interno e de Export,65=Crd Presumido - Operao de Aq Vinculada a Receitas No-Tribut no Mercado Interno e de Export,66=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno- e de Export,67=Crd Presumido - Outras Operaes,70=Operao de Aquisio sem Direito a Crdito,71=Operao de Aquisio com Iseno,72=Operao de Aquisio com Suspenso,73=Operao de Aquisio a Alquota Zero,74=Operao de Aquisio sem Incidncia da Contribuio,75=Operao de Aquisio por Substituio Tributria,98=Outras Operaes de Entrada
   aISSQN_cSitTrib   = N=NORMAL, R=RETIDA, S=SUBSTITUTA, I=ISENTA         
   aFDiasEnt         = Calculado,Informado 
   jProd_indTot      = 1;
   iDesc1            = %
   iDesc2            = Valor
   iDesc3            = VL/UN
   aCam    = 1-Data Emissao da Ordem,2-Data Emisso da NFe,3-Data Emisso da NFe -1
   aBC        = Calculada, Informada
   aTempo  = Mensal,Bimestral,Semestral,Anual
   aFinalidade = Outros Fins,Uso e Consumo,Complemento de Impostos
   aDI_tpViaTransp    = 1=Martima,Nota Fiscal eletrnica,2=Fluvial,3=Lacustre,4=Area,5=Postal,6=Ferroviria,7=Rodoviria,8=Conduto / Rede Transmisso,9=Meios Prprios,10=Entrada / Sada ficta,11=Courier,12=Handcarry
   aDI_tpIntermedio   = 1=Importao por conta prpria,2=Importao por conta e ordem,3=Importao por encomenda
   aISSQN_indISS      = 1=Exigvel, 2=No incidncia, 3=Iseno, 4=Exportao, 5=Imunidade, 6=Exigibilidade Suspensa por Deciso Judicial, 7=Exigibilidade Suspensa por Processo Administrativo 
   aICMS_motDesICMS  = 1-Txi,2-Deficiente Fsico,3-Produtor Agropecurio,4-Frotista/Locadora,5-Diplomtico/Consular,6-Utilitrios/Motocicletas reas de Livre Comrcio CONTRAN suas alteraes,7-SUFRAMA, 8-Venda a rgo Pblico,9-Outros,10=Deficiente Condutor,11-Deficiente No Condutor,12-rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS20 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS30 = 6=Utilitrios e Motocicletas da Amaznia Ocidental e reas de Livre Comrcio, 7=SUFRAMA, 9=Outros
   aICMS_motDesICMS40 = 1=Txi, 2=Deficiente Fsico *** Eliminado***, 3=Produtor Agropecurio,4=Frotista/Locadora,5=Diplomtico/Consular,6=Utilitrios e Motocicletas da Amaznia Ocidental ereas de Livre Comrcio,7=SUFRAMA, 8=Venda a rgo Pblico, 9=Outros, 10=Deficiente Condutor, 11=Deficiente No Condutor
   aICMS_motDesICMS70 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS90 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aIBSCP_cCredPres = 1 - Aquisio de Produtor Rural no contribuinte,2 - Tomador de servio de transporte de TAC PF no contrib,3 - Aquisio de pessoa fsica com destino a reciclagem,4 - Aquisio de bens mveis de PF no contrib. para revenda (veculos / brech),5 - Regime opcional para cooperativa.
   aIBSCBS_tpCredPresIBSZFM = 0 - Sem Crdito Presumido, 1 - Bens de consumo final (55%), 2 - Bens de capital (75%), 3 - Bens intermedirios (90/25%), 4 - Bens de informtica e outros definidos em legislao (100%)
</VarsDefault1>
<VarsDefault3>
   sVerVAt = {pPId+'-'+iVer+'/'+iVAt}
   sRastro = {sVerVAt+', '+sCoringa+', '+tInc}
   lRastro = 0
   pOrdem      = {ChaveAtual_1}
   pTOper      = {ChaveIrma_1_0}
   sMoeCapa    = {ChaveIrma_1_1}
   tEntPla     = {ChaveIrma_1_2}
   jEntSai     = {ChaveIrma_1_3}
   pEmi        = {ChaveIrma_1_4}
   pDest       = {ChaveIrma_1_5}
   pDestDefault = 36669  
   nDescFin    = {ChaveIrma_1_6} 
   nDFin       = {ChaveIrma_1_7} 
   pCapaMoe    = {ChaveIrma_1_8} 
   jBC_PIS     = {ChaveIrma_1_9};
   jBC_COFINS  = {ChaveIrma_1_10};
   jBC_ICMS    = {ChaveIrma_1_11};
   jBC_IPI     = {ChaveIrma_1_12};
   jBC_ICMSST  = {ChaveIrma_1_13};
   jBC_II      = {ChaveIrma_1_14};
   jBC_ISS     = {ChaveIrma_1_15};
   jVl_ICMSST  = {ChaveIrma_1_16};
   jVl_ICMS    = {ChaveIrma_1_17};
   lFinanc     = {ChaveIrma_1_18}
   lTransfRem  = {ChaveIrma_1_19}
   lTransfDep3o = {ChaveIrma_1_21}
   nPDescLog    = {ChaveIrma_1_22}
   aEntSai = Entrada (Compra),Sada (Venda),Entrada/Sada,Transferncia
   mInfAdProd = {sInfAdProd}
   aPriori = Muito Baixa,Baixa,Normal,Alta,Muito Alta
   aTipo   = Manual,Negociao,Tabela de Preo
   aTipoTQ = Manual,Negociao
   aProd_indTot      = 0-Valor item no compe valor total , 1-Valor item compe valor total
   aICMS_GrupoTrib   = 00-Tributada integralmente, 10-Tributada com cobrana ICMS substituio tributria ,20-Com reduo de base de clculo , 30-Isenta/no tributada com cobrana ICMS substituio tributria ,40-Isenta ,41-No Tributada, 50-Suspenso , 51-Diferimento , 60-ICMS cobrado anteriormente por substituio tributria , 70-Com reduo base clculo e cobrana do ICMS substituio tributria , 90-Outros
   aICMS_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMS_modBC       = 0-Margem Valor Agregado(%), 1-Pauta(Valor), 2-Preo Tabelado Mx(Valor), 3-Valor Operao  
   aICMS_modBCST     = 0-Preo Tabelado ou Mximo Sugerido, 1-Lista Negativa(Valor), 2-Lista Positiva(valor), 3-Lista Neutra(valor), 4-Margem Valor Agregado(%), 5-Pauta(valor)  
   aICMSPart_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSPart_CST     = 10-Tributada com cobrana ICMS por substituio, 90-Outros
   aICMSPart_modBC   = 0-Margem Valor Agregado (%), 1-Pauta (Valor), 2-Preo Tabelado Mx (valor) 
   aICMSPart_modBCST = 0 Preo tabelado ou mximo sugerido, 1-Lista Negativa (valor), 2-Lista Positiva (valor), 3-Lista Neutra (valor), 4-Margem Valor Agregado(%), 5-Pauta (valor) 
   aOrig             = 0-Nac exceto as indicadas nos cdigos 3 a 5,1-Est Importao direta- exceto a indicada no cdigo 6,2-Est Adquirida no mercado interno- exceto a indicada no cdigo 7,3-Nac mercadoria ou bem com Contedo de Importao superior a 40%,4-Nac c/ produo feita em conformidade com os processos produtivos bsicos,5-Nac mercadoria/bem c/ Contedo de Importao- inferior ou igual a 40%,6-Est Importao direta- sem similar nacional- constante na Camex,7-Est Adquirida no mercado interno - sem similar nacional-constante na Camex,8-Nacional - mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSST_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSST_CST   = 41=No Tributado,60=cobrado anteriormente por substituio tributria
   aGrupo_simples    = Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=101 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=102 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=103 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=201 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=202 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=203 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=300 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=400 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=500 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=900 
   aICMSSN_Orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSSN_CSOSN     = 101-Tributada com permisso de crdito , 102-Tributada sem permisso de crdito , 103-Iseno para faixa de receita bruta , 201-Tributada com permisso de crdito com cobrana do ICMS por Substituio Tributria , 202-Tributada sem permisso de crdito com cobrana do ICMS por Substituio Tributria , 203-Iseno para faixa de receita bruta com cobrana do ICMS por Substituio Tributria , 300-Imune , 400-No tributada , 500-ICMS cobrado anteriormente por substituio tributria ou por antecipao, 900-Outros
   aICMSSN_modBCST   = 0-Preo Tabelado ou Mximo Sugerido, 1-Lista Negativa(Valor), 2-Lista Positiva(valor), 3-Lista Neutra(valor),4 - Margem Valor Agregado (%),5 - Pauta (valor) (v.2.0)
   aICMSSN_modBC     = 0-Margem Valor Agregado(%), 1-Pauta(Valor), 2-Preo Tabelado Mx(Valor), 3-Valor Operao , 4-Margem Valor Agregado(%), 5-Pauta (valor)
   aIPINT_CST        = 00-Entrada com recuperao de crdito, 01-Entrada tributada com alquota zero, 02-Entrada isenta, 03-Entrada no-tributada, 04-Entrada imune, 05-Entrada com suspenso,49-Outras entradas, 50-Sada tributada, 51-Sada tributada com alquota zero, 52-Sada isenta, 53-Sada no-tributada, 54-Sada imune, 55-Sada com suspenso, 99-Outras sadas
   aPIS_CST          = 01=Oper Tribut (BC= valor da oper alq normal (cumulativo/no cumulativo)),02=Oper Tribut (BC= valor da oper (alq diferenciada)),03-Oper Tribut (BC= QT vendida x alq por unidade de produto,04=Oper Tribut (tributao monofsica (alquota zero)),06=Oper Tribut (alquota zero),07=Oper Isenta da Contribuio,08=Oper Sem Incidncia da Contribuio,09=Oper com Suspenso da Contribuio,99=Outras Operaes,05=Oper Tribut (Substituio Tributria),49=Outras Operaes de Sada,50=Oper com Direito a Crd - Vinculada Exc a Receita Trib no Mercado Interno,51=Oper com Direito a Crd - Vinculada Exc a Receita No Trib no Mercado Interno,52=Oper com Direito a Crd . Vinculada Exc a Receita de Exportao,53=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno,54=Oper com Direito a Crd - Vinculada a Rec Tribut no Mercado Interno e de Export,55=Oper com Direito a Crd - Vinculada a Rec NoTribut no Mercado Interno e de Export,56=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno- e de Export,60=Crd Presumido - Operao de Aq Vinculada Excl a Receita Tribut no Mercado Interno,61=Crd Presumido - Operao de Aq Vinculada Excl a Receita No-Tribut no Mercado Interno,62=Crd Presumido - Operao de Aq Vinculada Excl a Receita de Exportao,63=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno,64=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut no Mercado Interno e de Export,65=Crd Presumido - Operao de Aq Vinculada a Receitas No-Tribut no Mercado Interno e de Export,66=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno- e de Export,67=Crd Presumido - Outras Operaes,70=Operao de Aquisio sem Direito a Crdito,71=Operao de Aquisio com Iseno,72=Operao de Aquisio com Suspenso,73=Operao de Aquisio a Alquota Zero,74=Operao de Aquisio sem Incidncia da Contribuio,75=Operao de Aquisio por Substituio Tributria,98=Outras Operaes de Entrada
   aCOFINS_CST       = 01=Oper Tribut (BC= valor da oper alq normal (cumulativo/no cumulativo)),02=Oper Tribut (BC= valor da oper (alq diferenciada)),03-Oper Tribut (BC= QT vendida x alq por unidade de produto,04=Oper Tribut (tributao monofsica (alquota zero)),06=Oper Tribut (alquota zero),07=Oper Isenta da Contribuio,08=Oper Sem Incidncia da Contribuio,09=Oper com Suspenso da Contribuio,99=Outras Operaes,05=Oper Tribut (Substituio Tributria),49=Outras Operaes de Sada,50=Oper com Direito a Crd - Vinculada Exc a Receita Trib no Mercado Interno,51=Oper com Direito a Crd - Vinculada Exc a Receita No Trib no Mercado Interno,52=Oper com Direito a Crd . Vinculada Exc a Receita de Exportao,53=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno,54=Oper com Direito a Crd - Vinculada a Rec Tribut no Mercado Interno e de Export,55=Oper com Direito a Crd - Vinculada a Rec NoTribut no Mercado Interno e de Export,56=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno- e de Export,60=Crd Presumido - Operao de Aq Vinculada Excl a Receita Tribut no Mercado Interno,61=Crd Presumido - Operao de Aq Vinculada Excl a Receita No-Tribut no Mercado Interno,62=Crd Presumido - Operao de Aq Vinculada Excl a Receita de Exportao,63=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno,64=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut no Mercado Interno e de Export,65=Crd Presumido - Operao de Aq Vinculada a Receitas No-Tribut no Mercado Interno e de Export,66=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno- e de Export,67=Crd Presumido - Outras Operaes,70=Operao de Aquisio sem Direito a Crdito,71=Operao de Aquisio com Iseno,72=Operao de Aquisio com Suspenso,73=Operao de Aquisio a Alquota Zero,74=Operao de Aquisio sem Incidncia da Contribuio,75=Operao de Aquisio por Substituio Tributria,98=Outras Operaes de Entrada
   aISSQN_cSitTrib   = N=NORMAL, R=RETIDA, S=SUBSTITUTA, I=ISENTA         
   aFDiasEnt         = Calculado,Informado 
   jProd_indTot      = 1;
   iDesc1            = %
   iDesc2            = Valor
   iDesc3            = VL/UN
   aCam    = 1-Data Emissao da Ordem,2-Data Emisso da NFe,3-Data Emisso da NFe -1
   aBC        = Calculada, Informada
   aTempo  = Mensal,Bimestral,Semestral,Anual
   aFinalidade = Outros Fins,Uso e Consumo,Complemento de Impostos
   jTipo = 0
   aDI_tpViaTransp    = 1=Martima,Nota Fiscal eletrnica,2=Fluvial,3=Lacustre,4=Area,5=Postal,6=Ferroviria,7=Rodoviria,8=Conduto / Rede Transmisso,9=Meios Prprios,10=Entrada / Sada ficta,11=Courier,12=Handcarry
   aDI_tpIntermedio   = 1=Importao por conta prpria,2=Importao por conta e ordem,3=Importao por encomenda
   aISSQN_indISS      = 1=Exigvel, 2=No incidncia, 3=Iseno, 4=Exportao, 5=Imunidade, 6=Exigibilidade Suspensa por Deciso Judicial, 7=Exigibilidade Suspensa por Processo Administrativo 
  aICMS_motDesICMS  = 1-Txi,2-Deficiente Fsico,3-Produtor Agropecurio,4-Frotista/Locadora,5-Diplomtico/Consular,6-Utilitrios/Motocicletas reas de Livre Comrcio CONTRAN suas alteraes,7-SUFRAMA, 8-Venda a rgo Pblico,9-Outros,10=Deficiente Condutor,11-Deficiente No Condutor,12-rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS20 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS30 = 6=Utilitrios e Motocicletas da Amaznia Ocidental e reas de Livre Comrcio, 7=SUFRAMA, 9=Outros
   aICMS_motDesICMS40 = 1=Txi, 2=Deficiente Fsico *** Eliminado***, 3=Produtor Agropecurio,4=Frotista/Locadora,5=Diplomtico/Consular,6=Utilitrios e Motocicletas da Amaznia Ocidental ereas de Livre Comrcio,7=SUFRAMA, 8=Venda a rgo Pblico, 9=Outros, 10=Deficiente Condutor, 11=Deficiente No Condutor
   aICMS_motDesICMS70 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS90 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aIBSCP_cCredPres = 1 - Aquisio de Produtor Rural no contribuinte,2 - Tomador de servio de transporte de TAC PF no contrib,3 - Aquisio de pessoa fsica com destino a reciclagem,4 - Aquisio de bens mveis de PF no contrib. para revenda (veculos / brech),5 - Regime opcional para cooperativa.
   aIBSCBS_tpCredPresIBSZFM = 0 - Sem Crdito Presumido, 1 - Bens de consumo final (55%), 2 - Bens de capital (75%), 3 - Bens intermedirios (90/25%), 4 - Bens de informtica e outros definidos em legislao (100%)
</VarsDefault3>
<ScriptForm1>
   Rastreabilidade                           ; lRastro-5                         ; fontweight='bold' ; edtzoom=true ;  visible=(sDDFTagApl!='Padrao_3')
   Verso                                    ; sRastro-60                        ; identlabel=5      ; editable=false ; visible=((iDDFChamada>0)&&(lRastro==1)&&(sDDFTagApl!='Padrao_3')) ; 
   Identificao                             ;                                   ; fontweight='bold' ; editable=false ; visible=(sDDFTagApl!='Padrao_3')
   ;   ; visible=(iDDFChamada>0)
   Origem do Preo                           ; aTipo[jTipo]                      ; identlabel=5      ; visible=((sDDFTagApl!='Padrao_3')&&((sDDFMnemProp=='MT')||(sDDFMnemProp=='Desenvolvimento'))) ; exec=(this.flSetVar('pItem',0)&& this.flSetVar('fItem',0)&& this.flSetVar('sRegCodItem','')&& this.flSetVar('sTabCodItem','')&& this.flSetVar('sNegCodItem','')&& this.flSetVar('sRegDesItem','')&& this.flSetVar('pTab','0')&& this.flSetVar('fTab','0')&& this.flSetVar('pTabI','0')&& this.flSetVar('fTabI','0')&& this.flSetVar('sCodTab','')&& this.flSetVar('sDesTab','')&& this.flSetVar('pLote',0)&& this.flSetVar('fLote',0)&& this.flSetVar('sLote','')&& this.flSetVar('jOrig',0)&& this.flSetVar('jICMS_Orig',0)&& this.flSetVar('pUni',0)&& this.flSetVar('sCodUni','')&& this.flSetVar('sUni','')&& this.flSetVar('pNCM',0)&& this.flSetVar('sCodNCM','')&& this.flSetVar('sDesNCM','')&& this.flSetVar('pNeg',0)&& this.flSetVar('fNeg',0)&& this.flSetVar('nPrBruto','0,00000')&& this.flSetVar('nVDescCP','0,00000')&& this.flSetVar('nVDescTpED','0,00000')&& this.flSetVar('nVEncFinTpED','0,00000')&& this.flSetVar('nVDescTpEDG','0,00000')&& this.flSetVar('nPEncFinTpED','0,00000')&& this.flSetVar('sMoe','')&& this.flSetVar('pMoe',0)&& this.flSetVar('fMoe',0)&& this.flSetVar('nQtMoe','0,00000')&& this.flSetVar('sMoeCambio','')&& this.flSetVar('pCam',0)&& this.flSetVar('fCam',0)&& this.flSetVar('nCam','0,00000')&& this.flSetVar('sCam','')&& this.flSetVar('jCam',0)&& this.flSetVar('nProd_vUnCom','0,00000')&& this.flSetVar('nProd_vFrete','0,00')&& this.flSetVar('nVMLE','0,00')&& this.flSetVar('nProd_vSeg','0,00')&& this.flSetVar('nProd_vDesc','0,00000')&& this.flSetVar('nProd_vProd','0,00')&& this.flSetVar('pCFO',0)&& this.flSetVar('sCodCFO','')&& this.flSetVar('sAbrev','')&& this.flSetVar('fCFO',0)&& this.flSetVar('pRegDepVen',0)&& this.flSetVar('pDepVen',0)&& this.flSetVar('pUFisVen',0)&& this.flSetVar('pUFisVen',0)&& this.flSetVar('sUn1Ven','')&& this.flSetVar('sUn2Ven','')&& this.flSetVar('sUn3Ven','')&& this.flSetVar('sUn4Ven','')&& this.flSetVar('sUn5Ven','')&& this.flSetVar('sUn6Ven','')&& this.flSetVar('sUn7Ven','')&& this.flSetVar('pRegDepRFis',0)&& this.flSetVar('pDepRFis',0)&& this.flSetVar('pUFisRFis',0)&& this.flSetVar('pUFisRFis',0)&& this.flSetVar('sUn1RFis','')&& this.flSetVar('sUn2RFis','')&& this.flSetVar('sUn3RFis','')&& this.flSetVar('sUn4RFis','')&& this.flSetVar('sUn5RFis','')&& this.flSetVar('sUn6RFis','')&& this.flSetVar('sUn7RFis','')&& this.flSetVar('tEntPla','')&& this.flSetVar('tEmissao','')&& this.flSetVar('tSaida ','')&& this.flSetVar('sDI_nDI','')&& this.flSetVar('dDI_dDI','')&& this.flSetVar('sDI_xLocDesemb','')&& this.flSetVar('sDI_UFDesemb','')&& this.flSetVar('dDI_dDesemb','')&& this.flSetVar('sDI_cExportador','')&& this.flSetVar('nII_vBC','0,00')&& this.flSetVar('nII_vDespAdu','0,00')&& this.flSetVar('nII_vII','0,00')&& this.flSetVar('nII_vIOF','0,00')&& this.flSetVar('iAdi_nAdicao',0)&& this.flSetVar('iAdi_nSeqAdic',0)&& this.flSetVar('sAdi_cFabricante','')&& this.flSetVar('nAdi_vDescDI','0,00000')&& this.flSetVar('sAdi_xPed','')&& this.flSetVar('iAdi_nItemPed',0)&& this.flSetVar('nCIDE_qBCprod','0,00')&& this.flSetVar('nCIDE_vAliqProd','0,00')&& this.flSetVar('nCIDE_vCIDE','0,00')&& this.flSetVar('jICMS_GrupoTrib',0)&& this.flSetVar('jICMS_orig',0)&& this.flSetVar('jICMS_modBC',0)&& this.flSetVar('nICMS_pRedBC','0,00')&& this.flSetVar('nICMS_vBC','0,00')&& this.flSetVar('nICMS_pICMS','0,00')&& this.flSetVar('nICMS_vICMS','0,00')&& this.flSetVar('jICMS_modBCST',0)&& this.flSetVar('nICMS_pMVAST','0,00')&& this.flSetVar('nICMS_pRedBCST','0,00')&& this.flSetVar('nICMS_vBCST','0,00')&& this.flSetVar('nICMS_pICMSST','0,00')&& this.flSetVar('nICMS_vICMSST','0,00')&& this.flSetVar('nICMS_vBCSTRet','0,00')&& this.flSetVar('nICMS_vICMSSTRet','0,00')&& this.flSetVar('jICMS_motDesICMS',0)&& this.flSetVar('jICMSPart_orig',0)&& this.flSetVar('jICMSPart_CST',0)&& this.flSetVar('jICMSPart_modBC',0)&& this.flSetVar('nICMSPart_vBC','0,00')&& this.flSetVar('nICMSPart_pRedBC','0,00')&& this.flSetVar('nICMSPart_pICMS','0,00')&& this.flSetVar('nICMSPart_vICMS','0,00')&& this.flSetVar('jICMSPart_modBCST',0)&& this.flSetVar('nICMSPart_pMVAST','0,00')&& this.flSetVar('nICMSPart_pRedBCT','0,00')&& this.flSetVar('nICMSPart_vBCST','0,00')&& this.flSetVar('nICMSPart_pICMSST','0,00')&& this.flSetVar('nICMSPart_vICMSST','0,00')&& this.flSetVar('nICMSPart_pBCOp','0,00')&& this.flSetVar('sICMSPart_UFST','')&& this.flSetVar('jICMSST_orig',0)&& this.flSetVar('jICMSST_CST',0)&& this.flSetVar('nICMSST_vBCSTRet','0,00')&& this.flSetVar('nICMSST_vICMSSTRe','0,00')&& this.flSetVar('nICMSST_vBCSTDest','0,00')&& this.flSetVar('nICMSST_vICMSSTDes','0,00')&& this.flSetVar('jGrupo_simples',0)&& this.flSetVar('jICMSSN_Orig',0)&& this.flSetVar('jICMSSN_CSOSN',0)&& this.flSetVar('jICMSSN_modBC',0)&& this.flSetVar('nICMSSN_vBC','0,00')&& this.flSetVar('nICMSSN_pRedBC','0,00')&& this.flSetVar('nICMSSN_pICMS','0,00')&& this.flSetVar('nICMSSN_vICMS','0,00')&& this.flSetVar('jICMSSN_modBCST',0)&& this.flSetVar('nICMSSN_pMVAST','0,00')&& this.flSetVar('nICMSSN_pRedBCST','0,00')&& this.flSetVar('nICMSSN_vBCST','0,00')&& this.flSetVar('nICMSSN_pICMSST','0,00')&& this.flSetVar('nICMSSN_vICMSST','0,00')&& this.flSetVar('nICMSSN_pCredSN','0,00')&& this.flSetVar('nICMSSN_vCredICMSSN','0,00')&& this.flSetVar('nICMSSN_vBCSTRet','0,00')&& this.flSetVar('nICMSSN_vICMSSTRet','0,00')&& this.flSetVar('sIPI_clEnq','')&& this.flSetVar('sIPI_CNPJProd','')&& this.flSetVar('sIPI_cSelo','')&& this.flSetVar('nIPI_qSelo','0,00')&& this.flSetVar('sIPI_cEnq','')&& this.flSetVar('jIPINT_CST',0)&& this.flSetVar('nIPITrib_vBC','0,00')&& this.flSetVar('nIPITrib_pIPI','0,00')&& this.flSetVar('nIPITrib_qUnid','0,00')&& this.flSetVar('nIPITrib_vUnid','0,00')&& this.flSetVar('nIPITrib_vIPI','0,00')&& this.flSetVar('jPIS_CST',0)&& this.flSetVar('nPIS_vBC','0,00')&& this.flSetVar('nPIS_pPIS','0,00')&& this.flSetVar('nPIS_qBCProd','0,00')&& this.flSetVar('nPIS_vAliqProd','0,00')&& this.flSetVar('nPIS_vPIS','0,00')&& this.flSetVar('nPISST_vBC','0,00')&& this.flSetVar('nPISST_pPIS','0,00')&& this.flSetVar('nPISST_qBCProd','0,00')&& this.flSetVar('nPISST_vAliqProd','0,00')&& this.flSetVar('nPISST_vPIS','0,00')&& this.flSetVar('jCOFINS_CST',0)&& this.flSetVar('nCOFINS_vBC','0,00')&& this.flSetVar('nCOFINS_pCOFINS','0,00')&& this.flSetVar('nCOFINS_qBCProd','0,00')&& this.flSetVar('nCOFINS_vAliqProd','0,00')&& this.flSetVar('nCOFINS_vCOFINS','0,00')&& this.flSetVar('nCOFINSST_vBC','0,00')&& this.flSetVar('nCOFINSST_pCOFINS','0,00')&& this.flSetVar('nCOFINSST_qBCProd','0,00')&& this.flSetVar('nCOFINSST_vAliqProd','0,00')&& this.flSetVar('nCOFINSST_vCOFINS','0,00')&& this.flSetVar('nISSQN_vBC','0,00')&& this.flSetVar('nISSQN_vAliq','0,00')&& this.flSetVar('nISSQN_vISSQN','0,00')&& this.flSetVar('nISSQN_cMunFG','0,00')&& this.flSetVar('nISSQN_cListServ','0,00')&& this.flSetVar('jISSQN_cSitTrib',0)&& this.flSetVar('mInfAdProd','')&& this.flSetVar('nQtMin','0,00')&& this.flSetVar('nQtMax','0,00')&& this.flSetVar('nPrecoMin','0,00')&& this.flSetVar('nPrecoMax','0,00')&& this.flSetVar('lContQua',0)&& this.flSetVar('lContPreco',0)&& this.flSetVar('iCiclo',0)&& this.flSetVar('iCicloAtual',0)&& this.flSetVar('jTempo',0)&& this.flSetVar('lSkipLote',0))
   Origem do Preo                           ; aTipoTQ[jTipo]                    ; identlabel=5      ; visible=((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')) ; exec=(this.flSetVar('pItem',0)&& this.flSetVar('fItem',0)&& this.flSetVar('sRegCodItem','')&& this.flSetVar('sTabCodItem','')&& this.flSetVar('sNegCodItem','')&& this.flSetVar('sRegDesItem','')&& this.flSetVar('pTab','0')&& this.flSetVar('fTab','0')&& this.flSetVar('pTabI','0')&& this.flSetVar('fTabI','0')&& this.flSetVar('sCodTab','')&& this.flSetVar('sDesTab','')&& this.flSetVar('pLote',0)&& this.flSetVar('fLote',0)&& this.flSetVar('sLote','')&& this.flSetVar('jOrig',0)&& this.flSetVar('jICMS_Orig',0)&& this.flSetVar('pUni',0)&& this.flSetVar('sCodUni','')&& this.flSetVar('sUni','')&& this.flSetVar('pNCM',0)&& this.flSetVar('sCodNCM','')&& this.flSetVar('sDesNCM','')&& this.flSetVar('pNeg',0)&& this.flSetVar('fNeg',0)&& this.flSetVar('nPrBruto','0,00000')&& this.flSetVar('nVDescCP','0,00000')&& this.flSetVar('nVDescTpED','0,00000')&& this.flSetVar('nVEncFinTpED','0,00000')&& this.flSetVar('nVDescTpEDG','0,00000')&& this.flSetVar('nPEncFinTpED','0,00000')&& this.flSetVar('sMoe','')&& this.flSetVar('pMoe',0)&& this.flSetVar('fMoe',0)&& this.flSetVar('nQtMoe','0,00000')&& this.flSetVar('sMoeCambio','')&& this.flSetVar('pCam',0)&& this.flSetVar('fCam',0)&& this.flSetVar('nCam','0,00000')&& this.flSetVar('sCam','')&& this.flSetVar('jCam',0)&& this.flSetVar('nProd_vUnCom','0,00000')&& this.flSetVar('nProd_vFrete','0,00')&& this.flSetVar('nVMLE','0,00')&& this.flSetVar('nProd_vSeg','0,00')&& this.flSetVar('nProd_vDesc','0,00000')&& this.flSetVar('nProd_vProd','0,00')&& this.flSetVar('pCFO',0)&& this.flSetVar('sCodCFO','')&& this.flSetVar('sAbrev','')&& this.flSetVar('fCFO',0)&& this.flSetVar('pRegDepVen',0)&& this.flSetVar('pDepVen',0)&& this.flSetVar('pUFisVen',0)&& this.flSetVar('pUFisVen',0)&& this.flSetVar('sUn1Ven','')&& this.flSetVar('sUn2Ven','')&& this.flSetVar('sUn3Ven','')&& this.flSetVar('sUn4Ven','')&& this.flSetVar('sUn5Ven','')&& this.flSetVar('sUn6Ven','')&& this.flSetVar('sUn7Ven','')&& this.flSetVar('pRegDepRFis',0)&& this.flSetVar('pDepRFis',0)&& this.flSetVar('pUFisRFis',0)&& this.flSetVar('pUFisRFis',0)&& this.flSetVar('sUn1RFis','')&& this.flSetVar('sUn2RFis','')&& this.flSetVar('sUn3RFis','')&& this.flSetVar('sUn4RFis','')&& this.flSetVar('sUn5RFis','')&& this.flSetVar('sUn6RFis','')&& this.flSetVar('sUn7RFis','')&& this.flSetVar('tEntPla','')&& this.flSetVar('tEmissao','')&& this.flSetVar('tSaida ','')&& this.flSetVar('sDI_nDI','')&& this.flSetVar('dDI_dDI','')&& this.flSetVar('sDI_xLocDesemb','')&& this.flSetVar('sDI_UFDesemb','')&& this.flSetVar('dDI_dDesemb','')&& this.flSetVar('sDI_cExportador','')&& this.flSetVar('nII_vBC','0,00')&& this.flSetVar('nII_vDespAdu','0,00')&& this.flSetVar('nII_vII','0,00')&& this.flSetVar('nII_vIOF','0,00')&& this.flSetVar('iAdi_nAdicao',0)&& this.flSetVar('iAdi_nSeqAdic',0)&& this.flSetVar('sAdi_cFabricante','')&& this.flSetVar('nAdi_vDescDI','0,00000')&& this.flSetVar('sAdi_xPed','')&& this.flSetVar('iAdi_nItemPed',0)&& this.flSetVar('nCIDE_qBCprod','0,00')&& this.flSetVar('nCIDE_vAliqProd','0,00')&& this.flSetVar('nCIDE_vCIDE','0,00')&& this.flSetVar('jICMS_GrupoTrib',0)&& this.flSetVar('jICMS_orig',0)&& this.flSetVar('jICMS_modBC',0)&& this.flSetVar('nICMS_pRedBC','0,00')&& this.flSetVar('nICMS_vBC','0,00')&& this.flSetVar('nICMS_pICMS','0,00')&& this.flSetVar('nICMS_vICMS','0,00')&& this.flSetVar('jICMS_modBCST',0)&& this.flSetVar('nICMS_pMVAST','0,00')&& this.flSetVar('nICMS_pRedBCST','0,00')&& this.flSetVar('nICMS_vBCST','0,00')&& this.flSetVar('nICMS_pICMSST','0,00')&& this.flSetVar('nICMS_vICMSST','0,00')&& this.flSetVar('nICMS_vBCSTRet','0,00')&& this.flSetVar('nICMS_vICMSSTRet','0,00')&& this.flSetVar('jICMS_motDesICMS',0)&& this.flSetVar('jICMSPart_orig',0)&& this.flSetVar('jICMSPart_CST',0)&& this.flSetVar('jICMSPart_modBC',0)&& this.flSetVar('nICMSPart_vBC','0,00')&& this.flSetVar('nICMSPart_pRedBC','0,00')&& this.flSetVar('nICMSPart_pICMS','0,00')&& this.flSetVar('nICMSPart_vICMS','0,00')&& this.flSetVar('jICMSPart_modBCST',0)&& this.flSetVar('nICMSPart_pMVAST','0,00')&& this.flSetVar('nICMSPart_pRedBCT','0,00')&& this.flSetVar('nICMSPart_vBCST','0,00')&& this.flSetVar('nICMSPart_pICMSST','0,00')&& this.flSetVar('nICMSPart_vICMSST','0,00')&& this.flSetVar('nICMSPart_pBCOp','0,00')&& this.flSetVar('sICMSPart_UFST','')&& this.flSetVar('jICMSST_orig',0)&& this.flSetVar('jICMSST_CST',0)&& this.flSetVar('nICMSST_vBCSTRet','0,00')&& this.flSetVar('nICMSST_vICMSSTRe','0,00')&& this.flSetVar('nICMSST_vBCSTDest','0,00')&& this.flSetVar('nICMSST_vICMSSTDes','0,00')&& this.flSetVar('jGrupo_simples',0)&& this.flSetVar('jICMSSN_Orig',0)&& this.flSetVar('jICMSSN_CSOSN',0)&& this.flSetVar('jICMSSN_modBC',0)&& this.flSetVar('nICMSSN_vBC','0,00')&& this.flSetVar('nICMSSN_pRedBC','0,00')&& this.flSetVar('nICMSSN_pICMS','0,00')&& this.flSetVar('nICMSSN_vICMS','0,00')&& this.flSetVar('jICMSSN_modBCST',0)&& this.flSetVar('nICMSSN_pMVAST','0,00')&& this.flSetVar('nICMSSN_pRedBCST','0,00')&& this.flSetVar('nICMSSN_vBCST','0,00')&& this.flSetVar('nICMSSN_pICMSST','0,00')&& this.flSetVar('nICMSSN_vICMSST','0,00')&& this.flSetVar('nICMSSN_pCredSN','0,00')&& this.flSetVar('nICMSSN_vCredICMSSN','0,00')&& this.flSetVar('nICMSSN_vBCSTRet','0,00')&& this.flSetVar('nICMSSN_vICMSSTRet','0,00')&& this.flSetVar('sIPI_clEnq','')&& this.flSetVar('sIPI_CNPJProd','')&& this.flSetVar('sIPI_cSelo','')&& this.flSetVar('nIPI_qSelo','0,00')&& this.flSetVar('sIPI_cEnq','')&& this.flSetVar('jIPINT_CST',0)&& this.flSetVar('nIPITrib_vBC','0,00')&& this.flSetVar('nIPITrib_pIPI','0,00')&& this.flSetVar('nIPITrib_qUnid','0,00')&& this.flSetVar('nIPITrib_vUnid','0,00')&& this.flSetVar('nIPITrib_vIPI','0,00')&& this.flSetVar('jPIS_CST',0)&& this.flSetVar('nPIS_vBC','0,00')&& this.flSetVar('nPIS_pPIS','0,00')&& this.flSetVar('nPIS_qBCProd','0,00')&& this.flSetVar('nPIS_vAliqProd','0,00')&& this.flSetVar('nPIS_vPIS','0,00')&& this.flSetVar('nPISST_vBC','0,00')&& this.flSetVar('nPISST_pPIS','0,00')&& this.flSetVar('nPISST_qBCProd','0,00')&& this.flSetVar('nPISST_vAliqProd','0,00')&& this.flSetVar('nPISST_vPIS','0,00')&& this.flSetVar('jCOFINS_CST',0)&& this.flSetVar('nCOFINS_vBC','0,00')&& this.flSetVar('nCOFINS_pCOFINS','0,00')&& this.flSetVar('nCOFINS_qBCProd','0,00')&& this.flSetVar('nCOFINS_vAliqProd','0,00')&& this.flSetVar('nCOFINS_vCOFINS','0,00')&& this.flSetVar('nCOFINSST_vBC','0,00')&& this.flSetVar('nCOFINSST_pCOFINS','0,00')&& this.flSetVar('nCOFINSST_qBCProd','0,00')&& this.flSetVar('nCOFINSST_vAliqProd','0,00')&& this.flSetVar('nCOFINSST_vCOFINS','0,00')&& this.flSetVar('nISSQN_vBC','0,00')&& this.flSetVar('nISSQN_vAliq','0,00')&& this.flSetVar('nISSQN_vISSQN','0,00')&& this.flSetVar('nISSQN_cMunFG','0,00')&& this.flSetVar('nISSQN_cListServ','0,00')&& this.flSetVar('jISSQN_cSitTrib',0)&& this.flSetVar('mInfAdProd','')&& this.flSetVar('nQtMin','0,00')&& this.flSetVar('nQtMax','0,00')&& this.flSetVar('nPrecoMin','0,00')&& this.flSetVar('nPrecoMax','0,00')&& this.flSetVar('lContQua',0)&& this.flSetVar('lContPreco',0)&& this.flSetVar('iCiclo',0)&& this.flSetVar('iCicloAtual',0)&& this.flSetVar('jTempo',0)&& this.flSetVar('lSkipLote',0))
   Indicador Valor Item                      ; aProd_indTot[jProd_indTot]        ; identlabel=5      ; visible=(sDDFTagApl!='Padrao_3')
   Origem Mercadoria                         ; aOrig[jOrig]-30                   ; identlabel=5      ; visible=(sDDFTagApl!='Padrao_3')
   <i>(para realizar uma Ordem de importao vc dever ter em mos a DANFE e o DI - Documento de Importao)</i> ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; fontcolor='00AA00' ; identlabel=5 ; fontlen=-1
   ; 
   Item                                      ; sRegCodItem-20                    ; identlabel=5      ; visible=((jTipo==0)||(jTipo==3)||(jTipo==4)) ; esc=('dd_files/erp_PTOpED_Item.dda','Esc_Padrao_1','sRegCodItem,pTOper,pEmi,pDest,pOrdem,pDestDefault','pPTOpEDItem,fPTOpEDItem,pItem,fItem,sRegCodItem,sRegDesItem,sEAN,sGTIN,jICMS_Orig,pUni,fUni,sCodUni,sUni,pNCM,fNCM,sCodNCM,sDesNCM,jFDiasEnt,iDiasInf,iDiasCalc,lInspecao,nPDescTpEDG,jCam,sMoe,pMoe,fMoe,lCCusto,lCrtlItem,stmp,nPEncFinTpED,lContQua,nQtMin,nQtMax,lContPreco,nPrecoMin,nPrecoMax,iCiclo,iCicloAtual,lSkipLote,stmp,pRegDepVen,fRegDepVen,pDep,pUFis,sUn1,sUn2,sUn3,sUn4,sUn5,sUn6,sUn7,sIns,pRegDepRFis,fRegDepRFis,pDepRFis,pUFisRFis,sUn1RFis,sUn2RFis,sUn3RFis,sUn4RFis,sUn5RFis,sUn6RFis,sUn7RFis,sInsRFis,jFinalidade,nAliqTranspImport,nAliqTranspNac,sCEST,pRegDepTransf,fRegDepTransf,pDepTransf,pUFisTransf,sUnTransf1,sUnTransf2,sUnTransf3,sUnTransf4,sUnTransf5,sUnTransf6,sUnTransf7,sInsTransf,iLote,jTempo,pDepInsp,fDepInsp,sUn1Insp,sUn2Insp,sUn3Insp,sUn4Insp,sUn5Insp,sUn6Insp,sUn7Insp,pDepReje,fDepReje,sUn1Reje,sUn2Reje,sUn3Reje,sUn4Reje,sUn5Reje,sUn6Reje,sUn7Reje,dUltInsp,pInsp,fInsp,lInt,pTmp1_{1},pCCusto_{1},fCCusto_{1},sCCusto_{1},nRatCCusto_{1},pTmp2_{2},pCContCred_{2},fCContCred_{2},sCodCredPla_{2},sDesCredPla_{2},nRatCredCCont_{2},pTmp3_{3},pCContDeb_{3},fCContDeb_{3},sCodDebPla_{3},sDesDebPla_{3},nRatDebCCont_{3}') ; exec=(this.flSetVar('nPrBruto','0,00000')&& this.flSetVar('nVDescCP','0,00000')&& this.flSetVar('nVDescTpED','0,00000')&& this.flSetVar('nVEncFinED','0,00000')&& this.flSetVar('nVEncFinTpED','0,00000')&& this.flSetVar('nVDescTpEDG','0,00000')&& this.flSetVar('nQtMoe','0,00000')&& this.flSetVar('sMoeCambio','')&& this.flSetVar('pCam',0)&& this.flSetVar('fCam',0)&& this.flSetVar('nCam','0,00000')&& this.flSetVar('sCam','')&& this.flSetVar('nProd_vUnCom','0,00000')&& this.flSetVar('nProd_vFrete','0,00')&& this.flSetVar('nVMLE','0,00')&& this.flSetVar('nProd_vSeg','0,00')&& this.flSetVar('nProd_vDesc','0,00000')&& this.flSetVar('nProd_vProd','0,00')&& this.flSetVar('pCFO',0)&& this.flSetVar('sCodCFO','')&& this.flSetVar('sAbrev','')&& this.flSetVar('fCFO',0)&& this.flSetVar('tEntPla','')&& this.flSetVar('tEmissao','')&& this.flSetVar('tSaida ','')&& this.flSetVar('sDI_nDI','')&& this.flSetVar('dDI_dDI','')&& this.flSetVar('sDI_xLocDesemb','')&& this.flSetVar('sDI_UFDesemb','')&& this.flSetVar('dDI_dDesemb','')&& this.flSetVar('sDI_cExportador','')&& this.flSetVar('nII_vBC','0,00')&& this.flSetVar('nII_vDespAdu','0,00')&& this.flSetVar('nII_vII','0,00')&& this.flSetVar('nII_vIOF','0,00')&& this.flSetVar('iAdi_nAdicao',0)&& this.flSetVar('iAdi_nSeqAdic',0)&& this.flSetVar('sAdi_cFabricante','')&& this.flSetVar('nAdi_vDescDI','0,00000')&& this.flSetVar('sAdi_xPed','')&& this.flSetVar('iAdi_nItemPed',0)&& this.flSetVar('nCIDE_qBCprod','0,00')&& this.flSetVar('nCIDE_vAliqProd','0,00')&& this.flSetVar('nCIDE_vCIDE','0,00')&& this.flSetVar('jICMS_GrupoTrib',0)&& this.flSetVar('jICMS_orig',0)&& this.flSetVar('jICMS_modBC',0)&& this.flSetVar('nICMS_pRedBC','0,00')&& this.flSetVar('nICMS_vBC','0,00')&& this.flSetVar('nICMS_pICMS','0,00')&& this.flSetVar('nICMS_vICMS','0,00')&& this.flSetVar('jICMS_modBCST',0)&& this.flSetVar('nICMS_pMVAST','0,00')&& this.flSetVar('nICMS_pRedBCST','0,00')&& this.flSetVar('nICMS_vBCST','0,00')&& this.flSetVar('nICMS_pICMSST','0,00')&& this.flSetVar('nICMS_vICMSST','0,00')&& this.flSetVar('nICMS_vBCSTRet','0,00')&& this.flSetVar('nICMS_vICMSSTRet','0,00')&& this.flSetVar('jICMS_motDesICMS',0)&& this.flSetVar('jICMSPart_orig',0)&& this.flSetVar('jICMSPart_CST',0)&& this.flSetVar('jICMSPart_modBC',0)&& this.flSetVar('nICMSPart_vBC','0,00')&& this.flSetVar('nICMSPart_pRedBC','0,00')&& this.flSetVar('nICMSPart_pICMS','0,00')&& this.flSetVar('nICMSPart_vICMS','0,00')&& this.flSetVar('jICMSPart_modBCST',0)&& this.flSetVar('nICMSPart_pMVAST','0,00')&& this.flSetVar('nICMSPart_pRedBCT','0,00')&& this.flSetVar('nICMSPart_vBCST','0,00')&& this.flSetVar('nICMSPart_pICMSST','0,00')&& this.flSetVar('nICMSPart_vICMSST','0,00')&& this.flSetVar('nICMSPart_pBCOp','0,00')&& this.flSetVar('sICMSPart_UFST','')&& this.flSetVar('jICMSST_orig',0)&& this.flSetVar('jICMSST_CST',0)&& this.flSetVar('nICMSST_vBCSTRet','0,00')&& this.flSetVar('nICMSST_vICMSSTRe','0,00')&& this.flSetVar('nICMSST_vBCSTDest','0,00')&& this.flSetVar('nICMSST_vICMSSTDes','0,00')&& this.flSetVar('jGrupo_simples',0)&& this.flSetVar('jICMSSN_Orig',0)&& this.flSetVar('jICMSSN_CSOSN',0)&& this.flSetVar('jICMSSN_modBC',0)&& this.flSetVar('nICMSSN_vBC','0,00')&& this.flSetVar('nICMSSN_pRedBC','0,00')&& this.flSetVar('nICMSSN_pICMS','0,00')&& this.flSetVar('nICMSSN_vICMS','0,00')&& this.flSetVar('jICMSSN_modBCST',0)&& this.flSetVar('nICMSSN_pMVAST','0,00')&& this.flSetVar('nICMSSN_pRedBCST','0,00')&& this.flSetVar('nICMSSN_vBCST','0,00')&& this.flSetVar('nICMSSN_pICMSST','0,00')&& this.flSetVar('nICMSSN_vICMSST','0,00')&& this.flSetVar('nICMSSN_pCredSN','0,00')&& this.flSetVar('nICMSSN_vCredICMSSN','0,00')&& this.flSetVar('nICMSSN_vBCSTRet','0,00')&& this.flSetVar('nICMSSN_vICMSSTRet','0,00')&& this.flSetVar('sIPI_clEnq','')&& this.flSetVar('sIPI_CNPJProd','')&& this.flSetVar('sIPI_cSelo','')&& this.flSetVar('nIPI_qSelo','0,00')&& this.flSetVar('sIPI_cEnq','')&& this.flSetVar('jIPINT_CST',0)&& this.flSetVar('nIPITrib_vBC','0,00')&& this.flSetVar('nIPITrib_pIPI','0,00')&& this.flSetVar('nIPITrib_qUnid','0,00')&& this.flSetVar('nIPITrib_vUnid','0,00')&& this.flSetVar('nIPITrib_vIPI','0,00')&& this.flSetVar('jPIS_CST',0)&& this.flSetVar('nPIS_vBC','0,00')&& this.flSetVar('nPIS_pPIS','0,00')&& this.flSetVar('nPIS_qBCProd','0,00')&& this.flSetVar('nPIS_vAliqProd','0,00')&& this.flSetVar('nPIS_vPIS','0,00')&& this.flSetVar('nPISST_vBC','0,00')&& this.flSetVar('nPISST_pPIS','0,00')&& this.flSetVar('nPISST_qBCProd','0,00')&& this.flSetVar('nPISST_vAliqProd','0,00')&& this.flSetVar('nPISST_vPIS','0,00')&& this.flSetVar('jCOFINS_CST',0)&& this.flSetVar('nCOFINS_vBC','0,00')&& this.flSetVar('nCOFINS_pCOFINS','0,00')&& this.flSetVar('nCOFINS_qBCProd','0,00')&& this.flSetVar('nCOFINS_vAliqProd','0,00')&& this.flSetVar('nCOFINS_vCOFINS','0,00')&& this.flSetVar('nCOFINSST_vBC','0,00')&& this.flSetVar('nCOFINSST_pCOFINS','0,00')&& this.flSetVar('nCOFINSST_qBCProd','0,00')&& this.flSetVar('nCOFINSST_vAliqProd','0,00')&& this.flSetVar('nCOFINSST_vCOFINS','0,00')&& this.flSetVar('nISSQN_vBC','0,00')&& this.flSetVar('nISSQN_vAliq','0,00')&& this.flSetVar('nISSQN_vISSQN','0,00')&& this.flSetVar('nISSQN_cMunFG','0,00')&& this.flSetVar('nISSQN_cListServ','0,00')&& this.flSetVar('jISSQN_cSitTrib',0)&& this.flSetVar('mInfAdProd','')&& this.flSetVar('nVDescInc','0,00')&& this.flSetVar('pLote',0)&& this.flSetVar('fLote',0)&& this.flSetVar('sLote',''))
   Item                                      ; sNegCodItem-20                    ; identlabel=5      ; visible=(jTipo==1) ; esc=('dd_files/erp_PTOpED_Item.dda','Esc_Padrao_2','sNegCodItem,pTOper,pEmi,pDest,pOrdem','pPTOpEDItem,fPTOpEDItem,pItem,fItem,sNegCodItem,sRegDesItem,sEAN,sGTIN,jICMS_Orig,pUni,fUni,sCodUni,sUni,pNCM,fNCM,sCodNCM,sDesNCM,jFDiasEnt,iDiasInf,iDiasCalc,lInspecao,nPDescTpEDG,sTmp,nPrBruto,jCam,sMoe,pMoe,fMoe,lCCusto,lCrtlItem,nPEncFinTpED,lContQua,nQtMin,nQtMax,lContPreco,nPrecoMin,nPrecoMax,iCiclo,iCicloAtual,lSkipLote,stmp,pRegDepVen,fRegDepVen,pDep,pUFis,sUn1,sUn2,sUn3,sUn4,sUn5,sUn6,sUn7,sIns,pRegDepRFis,fRegDepRFis,pDepRFis,pUFisRFis,sUn1RFis,sUn2RFis,sUn3RFis,sUn4RFis,sUn5RFis,sUn6RFis,sUn7RFis,sInsRFis,jFinalidade,nAliqTranspImport,nAliqTranspNac,sCEST,pRegDepTransf,fRegDepTransf,pDepTransf,pUFisTransf,sUnTransf1,sUnTransf2,sUnTransf3,sUnTransf4,sUnTransf5,sUnTransf6,sUnTransf7,sInsTransf,iLote,jTempo,pDepInsp,fDepInsp,sUn1Insp,sUn2Insp,sUn3Insp,sUn4Insp,sUn5Insp,sUn6Insp,sUn7Insp,pDepReje,fDepReje,sUn1Reje,sUn2Reje,sUn3Reje,sUn4Reje,sUn5Reje,sUn6Reje,sUn7Reje,dUltInsp,pInsp,fInsp,lInt,pTmp1_{1},pCCusto_{1},fCCusto_{1},sCCusto_{1},nRatCCusto_{1},pTmp2_{2},pCContCred_{2},fCContCred_{2},sCodCredPla_{2},sDesCredPla_{2},nRatCredCCont_{2},pTmp3_{3},pCContDeb_{3},fCContDeb_{3},sCodDebPla_{3},sDesDebPla_{3},nRatDebCCont_{3}') ; exec=(( (pCapaMoe!=pMoe)?(this.flSetVar('nQtMoe',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nPrBruto','0,00000')):(this.flSetVar('nPrBruto',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nQtMoe','0,00000')))&& this.flSetVar('nVDescCP','0,00000')&& this.flSetVar('nVDescTpED','0,00000')&& this.flSetVar('nVEncFinTpED','0,00000')&& this.flSetVar('nVDescTpEDG','0,00000')&& this.flSetVar('sMoeCambio','')&& this.flSetVar('pCam',0)&& this.flSetVar('fCam',0)&& this.flSetVar('nCam','0,00000')&& this.flSetVar('sCam','')&& this.flSetVar('nProd_vUnCom','0,00000')&& this.flSetVar('nProd_vFrete','0,00')&& this.flSetVar('nVMLE','0,00')&& this.flSetVar('nProd_vSeg','0,00')&& this.flSetVar('nProd_vDesc','0,00000')&& this.flSetVar('nProd_vProd','0,00')&& this.flSetVar('pCFO',0)&& this.flSetVar('sCodCFO','')&& this.flSetVar('sAbrev','')&& this.flSetVar('fCFO',0)&& this.flSetVar('tEntPla','')&& this.flSetVar('tEmissao','')&& this.flSetVar('tSaida ','')&& this.flSetVar('sDI_nDI','')&& this.flSetVar('dDI_dDI','')&& this.flSetVar('sDI_xLocDesemb','')&& this.flSetVar('sDI_UFDesemb','')&& this.flSetVar('dDI_dDesemb','')&& this.flSetVar('sDI_cExportador','')&& this.flSetVar('nII_vBC','0,00')&& this.flSetVar('nII_vDespAdu','0,00')&& this.flSetVar('nII_vII','0,00')&& this.flSetVar('nII_vIOF','0,00')&& this.flSetVar('iAdi_nAdicao',0)&& this.flSetVar('iAdi_nSeqAdic',0)&& this.flSetVar('sAdi_cFabricante','')&& this.flSetVar('nAdi_vDescDI','0,00000')&& this.flSetVar('sAdi_xPed','')&& this.flSetVar('iAdi_nItemPed',0)&& this.flSetVar('nCIDE_qBCprod','0,00')&& this.flSetVar('nCIDE_vAliqProd','0,00')&& this.flSetVar('nCIDE_vCIDE','0,00')&& this.flSetVar('jICMS_GrupoTrib',0)&& this.flSetVar('jICMS_orig',0)&& this.flSetVar('jICMS_modBC',0)&& this.flSetVar('nICMS_pRedBC','0,00')&& this.flSetVar('nICMS_vBC','0,00')&& this.flSetVar('nICMS_pICMS','0,00')&& this.flSetVar('nICMS_vICMS','0,00')&& this.flSetVar('jICMS_modBCST',0)&& this.flSetVar('nICMS_pMVAST','0,00')&& this.flSetVar('nICMS_pRedBCST','0,00')&& this.flSetVar('nICMS_vBCST','0,00')&& this.flSetVar('nICMS_pICMSST','0,00')&& this.flSetVar('nICMS_vICMSST','0,00')&& this.flSetVar('nICMS_vBCSTRet','0,00')&& this.flSetVar('nICMS_vICMSSTRet','0,00')&& this.flSetVar('jICMS_motDesICMS',0)&& this.flSetVar('jICMSPart_orig',0)&& this.flSetVar('jICMSPart_CST',0)&& this.flSetVar('jICMSPart_modBC',0)&& this.flSetVar('nICMSPart_vBC','0,00')&& this.flSetVar('nICMSPart_pRedBC','0,00')&& this.flSetVar('nICMSPart_pICMS','0,00')&& this.flSetVar('nICMSPart_vICMS','0,00')&& this.flSetVar('jICMSPart_modBCST',0)&& this.flSetVar('nICMSPart_pMVAST','0,00')&& this.flSetVar('nICMSPart_pRedBCT','0,00')&& this.flSetVar('nICMSPart_vBCST','0,00')&& this.flSetVar('nICMSPart_pICMSST','0,00')&& this.flSetVar('nICMSPart_vICMSST','0,00')&& this.flSetVar('nICMSPart_pBCOp','0,00')&& this.flSetVar('sICMSPart_UFST','')&& this.flSetVar('jICMSST_orig',0)&& this.flSetVar('jICMSST_CST',0)&& this.flSetVar('nICMSST_vBCSTRet','0,00')&& this.flSetVar('nICMSST_vICMSSTRe','0,00')&& this.flSetVar('nICMSST_vBCSTDest','0,00')&& this.flSetVar('nICMSST_vICMSSTDes','0,00')&& this.flSetVar('jGrupo_simples',0)&& this.flSetVar('jICMSSN_Orig',0)&& this.flSetVar('jICMSSN_CSOSN',0)&& this.flSetVar('jICMSSN_modBC',0)&& this.flSetVar('nICMSSN_vBC','0,00')&& this.flSetVar('nICMSSN_pRedBC','0,00')&& this.flSetVar('nICMSSN_pICMS','0,00')&& this.flSetVar('nICMSSN_vICMS','0,00')&& this.flSetVar('jICMSSN_modBCST',0)&& this.flSetVar('nICMSSN_pMVAST','0,00')&& this.flSetVar('nICMSSN_pRedBCST','0,00')&& this.flSetVar('nICMSSN_vBCST','0,00')&& this.flSetVar('nICMSSN_pICMSST','0,00')&& this.flSetVar('nICMSSN_vICMSST','0,00')&& this.flSetVar('nICMSSN_pCredSN','0,00')&& this.flSetVar('nICMSSN_vCredICMSSN','0,00')&& this.flSetVar('nICMSSN_vBCSTRet','0,00')&& this.flSetVar('nICMSSN_vICMSSTRet','0,00')&& this.flSetVar('sIPI_clEnq','')&& this.flSetVar('sIPI_CNPJProd','')&& this.flSetVar('sIPI_cSelo','')&& this.flSetVar('nIPI_qSelo','0,00')&& this.flSetVar('sIPI_cEnq','')&& this.flSetVar('jIPINT_CST',0)&& this.flSetVar('nIPITrib_vBC','0,00')&& this.flSetVar('nIPITrib_pIPI','0,00')&& this.flSetVar('nIPITrib_qUnid','0,00')&& this.flSetVar('nIPITrib_vUnid','0,00')&& this.flSetVar('nIPITrib_vIPI','0,00')&& this.flSetVar('jPIS_CST',0)&& this.flSetVar('nPIS_vBC','0,00')&& this.flSetVar('nPIS_pPIS','0,00')&& this.flSetVar('nPIS_qBCProd','0,00')&& this.flSetVar('nPIS_vAliqProd','0,00')&& this.flSetVar('nPIS_vPIS','0,00')&& this.flSetVar('nPISST_vBC','0,00')&& this.flSetVar('nPISST_pPIS','0,00')&& this.flSetVar('nPISST_qBCProd','0,00')&& this.flSetVar('nPISST_vAliqProd','0,00')&& this.flSetVar('nPISST_vPIS','0,00')&& this.flSetVar('jCOFINS_CST',0)&& this.flSetVar('nCOFINS_vBC','0,00')&& this.flSetVar('nCOFINS_pCOFINS','0,00')&& this.flSetVar('nCOFINS_qBCProd','0,00')&& this.flSetVar('nCOFINS_vAliqProd','0,00')&& this.flSetVar('nCOFINS_vCOFINS','0,00')&& this.flSetVar('nCOFINSST_vBC','0,00')&& this.flSetVar('nCOFINSST_pCOFINS','0,00')&& this.flSetVar('nCOFINSST_qBCProd','0,00')&& this.flSetVar('nCOFINSST_vAliqProd','0,00')&& this.flSetVar('nCOFINSST_vCOFINS','0,00')&& this.flSetVar('nISSQN_vBC','0,00')&& this.flSetVar('nISSQN_vAliq','0,00')&& this.flSetVar('nISSQN_vISSQN','0,00')&& this.flSetVar('nISSQN_cMunFG','0,00')&& this.flSetVar('nISSQN_cListServ','0,00')&& this.flSetVar('jISSQN_cSitTrib',0)&& this.flSetVar('mInfAdProd','')&& this.flSetVar('pLote',0)&& this.flSetVar('fLote',0)&& this.flSetVar('sLote','')&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5)))  
   Item                                      ; sTabCodItem-20                    ; identlabel=5      ; visible=(jTipo==2) ; esc=('dd_files/erp_PTOpED_Item.dda','Esc_Padrao_3','sTabCodItem,pTOper,pEmi,pDest,pOrdem','pPTOpEDItem,fPTOpEDItem,pTab,fTab,pTabI,fTabI,pItem,fItem,sTabCodItem,sRegDesItem,sCodTab,sDesTab,sEAN,sGTIN,jICMS_Orig,pUni,fUni,sCodUni,sUni,pNCM,fNCM,sCodNCM,sDesNCM,jFDiasEnt,iDiasInf,iDiasCalc,lInspecao,nPDescTpEDG,sTmp,nPrBruto,jCam,sMoe,pMoe,fMoe,lCCusto,lCrtlItem,nPEncFinTpED,lContQua,nQtMin,nQtMax,lContPreco,nPrecoMin,nPrecoMax,iCiclo,iCicloAtual,lSkiLote,stmp,pRegDepVen,fRegDepVen,pDep,pUFis,sUn1,sUn2,sUn3,sUn4,sUn5,sUn6,sUn7,sIns,pRegDepRFis,fRegDepRFis,pDepRFis,pUFisRFis,sUn1RFis,sUn2RFis,sUn3RFis,sUn4RFis,sUn5RFis,sUn6RFis,sUn7RFis,sInsRFis,jFinalidade,nAliqTranspImport,nAliqTranspNac,sCEST,pRegDepTransf,fRegDepTransf,pDepTransf,pUFisTransf,sUnTransf1,sUnTransf2,sUnTransf3,sUnTransf4,sUnTransf5,sUnTransf6,sUnTransf7,sInsTransf,iLote,jTempo,pDepInsp,fDepInsp,sUn1Insp,sUn2Insp,sUn3Insp,sUn4Insp,sUn5Insp,sUn6Insp,sUn7Insp,pDepReje,fDepReje,sUn1Reje,sUn2Reje,sUn3Reje,sUn4Reje,sUn5Reje,sUn6Reje,sUn7Reje,dUltInsp,pInsp,fInsp,lInt,pTmp1_{1},pCCusto_{1},fCCusto_{1},sCCusto_{1},nRatCCusto_{1},pTmp2_{2},pCContCred_{2},fCContCred_{2},sCodCredPla_{2},sDesCredPla_{2},nRatCredCCont_{2},pTmp3_{3},pCContDeb_{3},fCContDeb_{3},sCodDebPla_{3},sDesDebPla_{3},nRatDebCCont_{3}') ; exec=(((pCapaMoe!=pMoe)?(this.flSetVar('nQtMoe',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nPrBruto','0,00000')):(this.flSetVar('nPrBruto',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nQtMoe','0,00000')))&& this.flSetVar('nVDescCP','0,00000')&& this.flSetVar('nVDescTpED','0,00000')&& this.flSetVar('nVEncFinTpED','0,00000')&& this.flSetVar('nVDescTpEDG','0,00000')&& this.flSetVar('sMoeCambio','')&& this.flSetVar('pCam',0)&& this.flSetVar('fCam',0)&& this.flSetVar('nCam','0,00000')&& this.flSetVar('sCam','')&& this.flSetVar('nProd_vUnCom','0,00000')&& this.flSetVar('nProd_vFrete','0,00')&& this.flSetVar('nVMLE','0,00')&& this.flSetVar('nProd_vSeg','0,00')&& this.flSetVar('nProd_vDesc','0,00000')&& this.flSetVar('nProd_vProd','0,00')&& this.flSetVar('pCFO',0)&& this.flSetVar('sCodCFO','')&& this.flSetVar('sAbrev','')&& this.flSetVar('fCFO',0)&& this.flSetVar('tEntPla','')&& this.flSetVar('tEmissao','')&& this.flSetVar('tSaida ','')&& this.flSetVar('sDI_nDI','')&& this.flSetVar('dDI_dDI','')&& this.flSetVar('sDI_xLocDesemb','')&& this.flSetVar('sDI_UFDesemb','')&& this.flSetVar('dDI_dDesemb','')&& this.flSetVar('sDI_cExportador','')&& this.flSetVar('nII_vBC','0,00')&& this.flSetVar('nII_vDespAdu','0,00')&& this.flSetVar('nII_vII','0,00')&& this.flSetVar('nII_vIOF','0,00')&& this.flSetVar('iAdi_nAdicao',0)&& this.flSetVar('iAdi_nSeqAdic',0)&& this.flSetVar('sAdi_cFabricante','')&& this.flSetVar('nAdi_vDescDI','0,00000')&& this.flSetVar('sAdi_xPed','')&& this.flSetVar('iAdi_nItemPed',0)&& this.flSetVar('nCIDE_qBCprod','0,00')&& this.flSetVar('nCIDE_vAliqProd','0,00')&& this.flSetVar('nCIDE_vCIDE','0,00')&& this.flSetVar('jICMS_GrupoTrib',0)&& this.flSetVar('jICMS_orig',0)&& this.flSetVar('jICMS_modBC',0)&& this.flSetVar('nICMS_pRedBC','0,00')&& this.flSetVar('nICMS_vBC','0,00')&& this.flSetVar('nICMS_pICMS','0,00')&& this.flSetVar('nICMS_vICMS','0,00')&& this.flSetVar('jICMS_modBCST',0)&& this.flSetVar('nICMS_pMVAST','0,00')&& this.flSetVar('nICMS_pRedBCST','0,00')&& this.flSetVar('nICMS_vBCST','0,00')&& this.flSetVar('nICMS_pICMSST','0,00')&& this.flSetVar('nICMS_vICMSST','0,00')&& this.flSetVar('nICMS_vBCSTRet','0,00')&& this.flSetVar('nICMS_vICMSSTRet','0,00')&& this.flSetVar('jICMS_motDesICMS',0)&& this.flSetVar('jICMSPart_orig',0)&& this.flSetVar('jICMSPart_CST',0)&& this.flSetVar('jICMSPart_modBC',0)&& this.flSetVar('nICMSPart_vBC','0,00')&& this.flSetVar('nICMSPart_pRedBC','0,00')&& this.flSetVar('nICMSPart_pICMS','0,00')&& this.flSetVar('nICMSPart_vICMS','0,00')&& this.flSetVar('jICMSPart_modBCST',0)&& this.flSetVar('nICMSPart_pMVAST','0,00')&& this.flSetVar('nICMSPart_pRedBCT','0,00')&& this.flSetVar('nICMSPart_vBCST','0,00')&& this.flSetVar('nICMSPart_pICMSST','0,00')&& this.flSetVar('nICMSPart_vICMSST','0,00')&& this.flSetVar('nICMSPart_pBCOp','0,00')&& this.flSetVar('sICMSPart_UFST','')&& this.flSetVar('jICMSST_orig',0)&& this.flSetVar('jICMSST_CST',0)&& this.flSetVar('nICMSST_vBCSTRet','0,00')&& this.flSetVar('nICMSST_vICMSSTRe','0,00')&& this.flSetVar('nICMSST_vBCSTDest','0,00')&& this.flSetVar('nICMSST_vICMSSTDes','0,00')&& this.flSetVar('jGrupo_simples',0)&& this.flSetVar('jICMSSN_Orig',0)&& this.flSetVar('jICMSSN_CSOSN',0)&& this.flSetVar('jICMSSN_modBC',0)&& this.flSetVar('nICMSSN_vBC','0,00')&& this.flSetVar('nICMSSN_pRedBC','0,00')&& this.flSetVar('nICMSSN_pICMS','0,00')&& this.flSetVar('nICMSSN_vICMS','0,00')&& this.flSetVar('jICMSSN_modBCST',0)&& this.flSetVar('nICMSSN_pMVAST','0,00')&& this.flSetVar('nICMSSN_pRedBCST','0,00')&& this.flSetVar('nICMSSN_vBCST','0,00')&& this.flSetVar('nICMSSN_pICMSST','0,00')&& this.flSetVar('nICMSSN_vICMSST','0,00')&& this.flSetVar('nICMSSN_pCredSN','0,00')&& this.flSetVar('nICMSSN_vCredICMSSN','0,00')&& this.flSetVar('nICMSSN_vBCSTRet','0,00')&& this.flSetVar('nICMSSN_vICMSSTRet','0,00')&& this.flSetVar('sIPI_clEnq','')&& this.flSetVar('sIPI_CNPJProd','')&& this.flSetVar('sIPI_cSelo','')&& this.flSetVar('nIPI_qSelo','0,00')&& this.flSetVar('sIPI_cEnq','')&& this.flSetVar('jIPINT_CST',0)&& this.flSetVar('nIPITrib_vBC','0,00')&& this.flSetVar('nIPITrib_pIPI','0,00')&& this.flSetVar('nIPITrib_qUnid','0,00')&& this.flSetVar('nIPITrib_vUnid','0,00')&& this.flSetVar('nIPITrib_vIPI','0,00')&& this.flSetVar('jPIS_CST',0)&& this.flSetVar('nPIS_vBC','0,00')&& this.flSetVar('nPIS_pPIS','0,00')&& this.flSetVar('nPIS_qBCProd','0,00')&& this.flSetVar('nPIS_vAliqProd','0,00')&& this.flSetVar('nPIS_vPIS','0,00')&& this.flSetVar('nPISST_vBC','0,00')&& this.flSetVar('nPISST_pPIS','0,00')&& this.flSetVar('nPISST_qBCProd','0,00')&& this.flSetVar('nPISST_vAliqProd','0,00')&& this.flSetVar('nPISST_vPIS','0,00')&& this.flSetVar('jCOFINS_CST',0)&& this.flSetVar('nCOFINS_vBC','0,00')&& this.flSetVar('nCOFINS_pCOFINS','0,00')&& this.flSetVar('nCOFINS_qBCProd','0,00')&& this.flSetVar('nCOFINS_vAliqProd','0,00')&& this.flSetVar('nCOFINS_vCOFINS','0,00')&& this.flSetVar('nCOFINSST_vBC','0,00')&& this.flSetVar('nCOFINSST_pCOFINS','0,00')&& this.flSetVar('nCOFINSST_qBCProd','0,00')&& this.flSetVar('nCOFINSST_vAliqProd','0,00')&& this.flSetVar('nCOFINSST_vCOFINS','0,00')&& this.flSetVar('nISSQN_vBC','0,00')&& this.flSetVar('nISSQN_vAliq','0,00')&& this.flSetVar('nISSQN_vISSQN','0,00')&& this.flSetVar('nISSQN_cMunFG','0,00')&& this.flSetVar('nISSQN_cListServ','0,00')&& this.flSetVar('jISSQN_cSitTrib',0)&& this.flSetVar('mInfAdProd','')&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))) 
                                             ; sRegDesItem-60                    ; identlabel=5      ; editable=false     ; 
   ;
   Tabela de Preo                           ; sCodTab-30                        ; identlabel=5      ; editable=false     ; visible=(jTipo==2)
                                             ; sDesTab-60                        ; identlabel=5      ; editable=false     ; visible=(jTipo==2)
   ; ; visible=(jTipo==2)
   Finalidade do Consumo                     ; aFinalidade[jFinalidade]    ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
   ; ; visible=(sDDFTagApl!='Padrao_3')
   Qt.Pedida                                 ; nQt-15-5                          ; identlabel=5      ; exec=(this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))) ; valid=(((lInt==0) || (nQt==parseInt(nQt))),'A quantidade deve ser um numero inteiro')
   Unidade Medida                            ; sCodUni-10                        ; identlabel=5      ; visible=(sDDFTagApl!='Padrao_3') ; esc=('dd_files/erp_UnidadeMedida.dda','Esc_Padrao_1','sCodUni','pUni,sCodUni,sUni,fUni,stmp,lInt') ; 
   ; ; visible=(sDDFTagApl!='Padrao_3')
   Valor [UN] em Moeda Estrangeira           ; nQtMoe-18-5                       ; identlabel=10     ; editable=(jTipo==0) ; visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3'))                  ; exec=(this.flSetVar('nPrBruto',fsReplaceDecimalPoint((nQtMoe*nCam),".",",",5))&& this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDFin),".",",",5))&& this.flSetVar('nVDescTpED',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDescFin),".",",",5))&& this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nPDescTpEDG),".",",",5))&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nQtMoe*nCam)-(nVDescInc+((nQtMoe*nCam)/100*(nDFin))+((nQtMoe*nCam)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nQtMoe*nCam)-(nVDescInc+((nQtMoe*nCam)/100*(nDFin))+((nQtMoe*nCam)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5)))
   <i>(na importao esse  o campo do Valor [UN] da Mercadoria no Local de Embarque em moeda estrangeira)</i>    ;; colspan=true ; visible=((jOrig==1)&&(pCapaMoe!=pMoe)&&(pMoe>0)&&(sDDFTagApl!='Padrao_3')) ; identlabel=10 ; fontlen=-1 ;  fontcolor='00AA00'
   ; ; visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3'))
   Cambio                                    ; aCam[jCam]                        ; identlabel=10     ; editable=(jTipo==0) ; visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3')) ; 
   Cotao                                   ; sMoeCambio-50                     ; identlabel=15     ;                       visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3')) ; esc=('dd_files/erp_Cambio.dda','Esc_Padrao_2','sMoeCambio,pMoe,pCapaMoe','pCam,nCam,fCam,sCam,sMoeCambio') ;  exec=(this.flSetVar('nPrBruto',fsReplaceDecimalPoint((nQtMoe*nCam),".",",",5) )&& this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDFin),".",",",5))&& this.flSetVar('nVDescTpED',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDescFin),".",",",5))&& this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nPDescTpEDG),".",",",5))&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint(((nQtMoe*nCam))-(nVDescInc+(((nQtMoe*nCam))/100*(nDFin))+(((nQtMoe*nCam))/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint(((((nQtMoe*nCam))-(nVDescInc+(((nQtMoe*nCam))/100*(nDFin))+(((nQtMoe*nCam))/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5)))
   Valor do Cambio                           ; nCam-15-5                         ; identlabel=15     ;                       visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false ;                   
   Data do Cambio                            ; sCam-20                           ; identlabel=15     ;                       visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false ;                   
   (*) Os valores abaixo esto expressos em moeda operao. ; ; fontcolor='00AA00' ; visible=(sDDFTagApl!='Padrao_3')
   <b>Valor [UN] Bruto</b>                      ; nPrBruto-15-9                     ;                   ; identlabel=5  ; editable=((jTipo==0) && (pCapaMoe==pMoe) && (pMoe>0)) ; exec=(this.flSetVar('nVDescInc',fsReplaceDecimalPoint(((nPrBruto)/100*nPDescInc),".",",",5))&& this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin),".",",",5))&& this.flSetVar('nVDescTpED',fsReplaceDecimalPoint((nPrBruto/100*nDescFin),".",",",5))&& this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint((nPrBruto/100*nPDescTpEDG),".",",",5))&& this.flSetVar('nVDescLog',fsReplaceDecimalPoint((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))) ; fontlen=-1
   <i>(esse  o campo do Valor [UN] da Mercadoria no Local de Embarque em moeda da operao)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
   ; ; visible=(sDDFTagApl!='Padrao_3')
   <b>Descontos sobre Valor [UN] Bruto</b>     ; iDesc2-15,iDesc1-15                   ; editable=false      ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
   [$][%]  Desconto Incondicional  [UN]        ; nVDescInc-15-5,nPDescInc-15-5         ; identlabel=10       ; exec=(this.flSetVar('nVDescInc',fsReplaceDecimalPoint(((nPrBruto)/100*nPDescInc),".",",",5))&& this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin),".",",",5))&& this.flSetVar('nVDescLog',fsReplaceDecimalPoint((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))) ; 1-editable=false
   Desconto em %                               ; nPDescTpEDG-15-5                      ; editable=(jTipo==2) ; identlabel=10 ; exec=(this.flSetVar('nVDescInc',fsReplaceDecimalPoint(((nPrBruto)/100*nPDescInc),".",",",5))&& this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin),".",",",5))&& this.flSetVar('nVDescTpED',fsReplaceDecimalPoint((nPrBruto/100*nDescFin),".",",",5))&& this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint((nPrBruto/100*nPDescTpEDG),".",",",5))&& this.flSetVar('nVDescLog',fsReplaceDecimalPoint((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))) ; visible=(sDDFTagApl!='Padrao_3') ; rightlabel=<span style='color: #00AA00_ font-size: 9px_'>[Tipo de Operao / Emissor / Destinatrio / Grupo de Itens]</span>
   Encargos Financeiros                        ; nVEncFinTpED-15-5,nPEncFinTpED-15-5   ; editable=false      ; identlabel=10 ;                            visible=(sDDFTagApl!='Padrao_3') ; rightlabel=<span style='color: #00AA00_ font-size: 9px_'>[Tipo de Operao / Emissor / Destinatrio] / Grupo de Itens]</span>
   Acrscimo de Contrato                       ; nVAcresCRTOsa-15-5,nPAcresCRTOsa-15-5 ; editable=false      ; identlabel=10 ;                            visible=(sDDFTagApl!='Padrao_3') ; rightlabel=<span style='color: #00AA00_ font-size: 9px_'>[Emissor / Destinatrio] / CTR]</span>
   Desconto Condio de Pagamento              ; nVDescCP-15-5,nDFin-15-5              ; editable=false      ; identlabel=10 ;                            visible=(sDDFTagApl!='Padrao_3') ; rightlabel=<span style='color: #00AA00_ font-size: 9px_'>[Emissor / Destinatrio / Condio de Pagamento]</span>
   Desconto Logistico                          ; nVDescLog-15-5,nPDescLog-15-5         ; editable=false      ; identlabel=10 ; exec=(this.flSetVar('nVDescLog',fsReplaceDecimalPoint(((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))) ; visible=(sDDFTagApl!='Padrao_3') ; rightlabel=<span style='color: #00AA00_ font-size: 9px_'>[Tipo de Operao / Emissor / Destinatrio]</span>
<b>Valor [UN] Comercial</b>                    ; nProd_vUnCom-15-5                 ; editable=false ; identlabel=5 ; fontlen=-1 ; visible=(sDDFTagApl!='Padrao_3')
   <i>(esse  o campo do Valor [UN] da Mercadoria no Local de Embarque em moeda da operao)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
; ; visible=(sDDFTagApl!='Padrao_3')
   Valor [Total] Frete                       ; nProd_vFrete-15-2                 ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
   Valor [Total] Seguro                      ; nProd_vSeg-15-2                   ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
   Valor [Total] Outras Despesas             ; nProd_vOutro-15-2                 ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
<i>(obter do DI quando importao - siscomex)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
   Valor [Total] Imposto Importao          ; nII_vII-15-2                      ; identlabel=5 ; editable=false ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3'))
<i>(o valor desse campo s  obtido aps salvar, ele no  atualizado durante a edio)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
<b>Valor [Total] Comercial</b>               ; nProd_vProd-15-5                  ; editable=false ; identlabel=5 ; fontlen=-1
<b>Valor [Total] Contrato</b>                ; nCTR_VlCalcI-15-5                 ; editable=false ; identlabel=5 ; fontlen=-1
<i>(esse  o campo do Valor [TOTAL] da Mercadoria no Local de Embarque em moeda da operao)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
<b>Valor [Total] Comercial da Importao</b> ; nVTCI-15-2                        ; identlabel=5 ; editable=false ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; fontlen=-1
 <i>(Valor [Total] Comercial + Frete + Seguro + Imposto Importao -> o valor desse campo s  obtido aps salvar, ele no  atualizado durante a edio)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
   ;; visible=(sDDFTagApl!='Padrao_3')
    Valor [Total] Desconto Condicional        ; nProd_vDesc-15-2                  ; exec=(this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))) ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
    ;
  ; btn_SalvarInc    ; onclick={this}.flOnSubmit(1) ; value=Salvar e Incluir Prximo
  ; btn_Salvar       ; onclick={this}.flOnSubmit()  ; value=Salvar
    ;
    Moeda                                     ; sMoe-50                           ; identlabel=5      ; editable=(jTipo==0) ; visible=(sDDFTagApl!='Padrao_3')                                                  ; esc=('dd_files/erp_Moeda.dda','Esc_Padrao_1','sMoe','pMoe,sCodMoe,sMoe,fMoe') ; exec=(this.flSetVar('sMoeCambio','')&& this.flSetVar('pCam','0')&& this.flSetVar('nCam','0,00000')&& this.flSetVar('fCam','0')&& this.flSetVar('sCam','')&& this.flSetVar('nVDescCP','0,00000')&& this.flSetVar('nVDescTpED','0,00000')&& this.flSetVar('nVEncFinTpED','0,00000')&& this.flSetVar('nVDescTpEDG','0,00000')&& this.flSetVar('nQtMoe','0,00000')&& this.flSetVar('nProd_vUnCom','0,00000'))
    ;
   Motivo dessa alterao                    ; sCodMotAltPed-30                  ; identlabel=5      ; visible=((jEntSai==1)&&(iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; esc=('dd_files/erp_MotivoAltPedidosClientes.dda','Esc_Padrao_1','sCodMotAltPed','pMotAltPed,sCodMotAltPed,sDesMotAltPed,fMotAltPed') ; 
                                             ; sDesMotAltPed-60                  ; identlabel=5      ; visible=((jEntSai==1)&&(iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false
   ; ; visible=((iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))
   ;
   Motivo da ltima alterao                ; sCodMotAltPe2-30                  ; identlabel=5      ; visible=((iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false
                                             ; sDesMotAltPe2-60                  ; identlabel=5      ; visible=((iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false
   ; ; visible=((iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))
   ; ; visible=(sDDFTagApl!='Padrao_3')
    Base Calculo PIS                            ; aBC[jBC_PIS]                          ; identlabel=5  ; rightlabel=[Informada quando importao] ; visible=(sDDFTagApl!='Padrao_3')
   Valor da Base Calculo PIS                   ; nBC_PIS-10-2                          ; identlabel=5  ; editable=(jBC_PIS==1)    ; visible=((jBC_PIS==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter do DI quando importao]
   Base Calculo COFINS                         ; aBC[jBC_COFINS]                       ; identlabel=5  ; rightlabel=[Informada quando importao] ; visible=(sDDFTagApl!='Padrao_3')
   Valor da Base Calculo COFINS                ; nBC_COFINS-10-2                       ; identlabel=5  ; editable=(jBC_COFINS==1) ; visible=((jBC_COFINS==1)&&(sDDFTagApl!='Padrao_3')) ; rightlabel=[obter do DI quando importao]
   Base Calculo ICMS                           ; aBC[jBC_ICMS]                         ; identlabel=5  ;  visible=(sDDFTagApl!='Padrao_3')
   <i>(deve ser informada apenas para conta de energia eletrica e telefonia)</i>       ;; colspan=true ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00' ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   Valor da Base Calculo ICMS                  ; nBC_ICMS-10-2                         ; identlabel=5  ; editable=(jBC_ICMS==1)    ; visible=((jBC_ICMS==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter da Nota Fiscal]
   Base Calculo IPI                            ; aBC[jBC_IPI]                          ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
   Valor da Base Calculo IPI                   ; nBC_IPI-10-2                          ; identlabel=5  ; editable=(jBC_IPI==1)    ; visible=((jBC_IPI==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter da Nota Fiscal]
    Base Calculo ICMS ST                       ; aBC[jBC_ICMSST]                       ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
    Valor da Base Calculo ICMS ST              ; nBC_ICMSST-10-2                       ; identlabel=5  ; editable=(jBC_ICMSST==1)    ; visible=((jBC_ICMSST==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter da Nota Fiscal]
    Valor do ICMS                              ; aBC[jVl_ICMS]                         ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
    Valor Informado do ICMS                    ; nVl_ICMS-10-2                         ; identlabel=5  ; editable=(jVl_ICMS==1)    ; visible=((jVl_ICMS==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter da Nota Fiscal]
    Valor do ICMS-ST                           ; aBC[jVl_ICMSST]                       ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
    Valor Informado do ICMS-ST                 ; nVl_ICMSST-10-2                       ; identlabel=5  ; editable=(jVl_ICMSST==1)    ; visible=((jVl_ICMSST==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter da Nota Fiscal]
   ;; visible=(sDDFTagApl!='Padrao_3')
   Atualiza Custo do Item                    ; lCCusto            ; identlabel=5 ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   ; ; visible=(sDDFTagApl!='Padrao_3')
   Nmero da FCI                             ; sFCI-36                           ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
; ; visible=(sDDFTagApl!='Padrao_3')
   Informaes Adicionais do Produto         ; mInfAdProd-40-5-500               ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
   ; ; visible=(sDDFTagApl!='Padrao_3')
   Cdigo NCM                                ; sCodNCM-8                         ; identlabel=5      ; editable=false ; visible=(sDDFTagApl!='Padrao_3') 
   Descrico                                 ; sDesNCM-60                        ; identlabel=5      ; editable=false ; visible=(sDDFTagApl!='Padrao_3')
   ;
   Cdigo CEST                               ; sCEST-s-7                         ; identlabel=5      ; editable=false     ; 
   ;
   CFOP                                      ; sCodCFO-20                        ; identlabel=5      ; editable=false ; visible=(sDDFTagApl!='Padrao_3')
   Abreviatura                               ; sAbrev-60                         ; identlabel=5      ; editable=false ; visible=(sDDFTagApl!='Padrao_3')
   ;
   ; ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   Emisso                                   ; tEmissao-20                       ; identlabel=5 ; editable=false ; visible=((iDDFChamada>0)&&(sDDFTagApl!='Padrao_3'))
   Sada                                     ; tSaida-20                         ; identlabel=5 ; editable=false ; visible=((iDDFChamada>0)&&(sDDFTagApl!='Padrao_3'))
   ;; visible=(sDDFTagApl!='Padrao_3')
   <b>Quantidades</b>                        ;                                   ; identlabel=5 ; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) 
   Pedida                                    ; nQtPed-18-5                       ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Reservada                                 ; nQtRes-18-5                       ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Liberada                                  ; nQtLib-18-5                       ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Carregada                                 ; nQtCarga-18-5                     ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Entregue                                  ; nQtEnt-18-5                       ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Faturada                                  ; nQtFat-18-5                       ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Cancelada                                 ; nQtCanc-18-5                      ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
;
Rateios ;; fontweight='bold'; visible=((lFinanc==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ;
; ; visible=((lFinanc==1)&&(sDDFTagApl!='Padrao_3'))
Centros de RECEBIMENTOS    ;; fontweight='bold'; identlabel=10 ; visible=((lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
Centros de CUSTOS/RECEITAS ;; fontweight='bold'; identlabel=10 ; visible=((lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   SubGrid-1 {
      (i))      ; sCCusto_i-50 ; identlabel=15 ; esc=('dd_files/erp_CCusto.dda','Esc_Padrao_1','sCCusto_i','pCCusto_i,sTmp,sCCusto_i,fCCusto_i') ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_3'))
      % Rateio Custos/Receitas ; nRatCCusto_i-18-2 ; identlabel=15 ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_3'))
   }
   <span style='color: #00AA00_ text-decoration: underline_ cursor: pointer_' onclick='oTelaDefault.flIncSubGrid(1,"pCCusto")_'>Incluir</span> ; ; identlabel=15; visible=((iDDFChamada<2)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_3'))
   ;;  visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(sDDFTagApl!='Padrao_3'))
; ; visible=((lFinanc==1)&&(sDDFTagApl!='Padrao_3'))
Contas Contbeis de CRDITO;; fontweight='bold'; identlabel=10 ; visible=((lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) ;
   SubGrid-2 {
     (i)) Plano de Contas CRDITO     ; sCodCredPla_i-10       ; identlabel=15 ; esc=('dd_files/erp_PlaConta.dda','Esc_Padrao_1','sCodCredPla_i','pCContCred_i,sCodCredPla_i,sDesCredPla_i,fCContCred_i') ;  visible=(((i))<=(iTotLinSubGridPreenchidos_2)&&(lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
     Descrio                        ; sDesCredPla_i-30       ; identlabel=19 ; editable=false ; visible=(((i))<=(iTotLinSubGridPreenchidos_2)&&(lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
     % Rateio de Crdito              ; nRatCredCCont_i-18-2   ; identlabel=15 ;  visible=(((i))<=(iTotLinSubGridPreenchidos_2)&&(lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
                                      ;                                      ; visible=(((i))<=(iTotLinSubGridPreenchidos_2)&&(lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   }
   <span style='color: #00AA00_ text-decoration: underline_ cursor: pointer_' onclick='oTelaDefault.flIncSubGrid(2,"pCContCred")_'>Incluir</span> ; ; identlabel=15; visible=((iDDFChamada<2)&&(lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
  ; ; visible=((lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
Contas Contbeis de DBITO;; fontweight='bold'; identlabel=10; visible=((lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   SubGrid-3 {
     (i)) Plano de Contas DBITO      ; sCodDebPla_i-10     ; identlabel=15 ; esc=('dd_files/erp_PlaConta.dda','Esc_Padrao_1','sCodDebPla_i','pCContDeb_i,sCodDebPla_i,sDesDebPla_i,fCContDeb_i') ;  visible=(((i))<=(iTotLinSubGridPreenchidos_3)&&(lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))	
     Descrio                        ; sDesDebPla_i-30     ; identlabel=19 ; editable=false ; visible=(((i))<=(iTotLinSubGridPreenchidos_3)&&(lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
     % Rateio de Dbito               ; nRatDebCCont_i-18-2   ;  identlabel=15 ; visible=(((i))<=(iTotLinSubGridPreenchidos_3)&&(lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
                                      ;                                     ; visible=(((i))<=(iTotLinSubGridPreenchidos_3)&&(lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   }
   <span style='color: #00AA00_ text-decoration: underline_ cursor: pointer_' onclick='oTelaDefault.flIncSubGrid(3,"pCContDeb")_'>Incluir</span> ; ; identlabel=15; visible=((iDDFChamada<2)&&(lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
;  ; visible=((lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
Logstica  ;; fontweight='bold'    ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5
     Depsito Entrada              ; sUn1RFis-50            ; identlabel=10  ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3')) ; esc=('dd_files/erp_EST_RegDepositos.dda','Esc_Padrao_1','sUn1RFis,pItem,pEmi','pRegDepRFis,sUn1RFis,sUn2RFis,sUn3RFis,sUn4RFis,sUn5RFis,sUn6RFis,sUn7RFis,sInsRFis,fRegDepRFis,sUnidade') 
                                   ; sUn2RFis-50            ; editable=false ; visible=((sUn2RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
                                   ; sUn3RFis-50            ; editable=false ; visible=((sUn3RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn4RFis-50            ; editable=false ; visible=((sUn4RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn5RFis-50            ; editable=false ; visible=((sUn5RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn6RFis-50            ; editable=false ; visible=((sUn6RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn7RFis-50            ; editable=false ; visible=((sUn7RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3')) 
  	  Instncia                     ; sInsRFis-50            ; editable=false ; identlabel=10 ; visible=((lCrtlItem==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
    ;; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
Logstica  ;; fontweight='bold'    ; visible=((jEntSai==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5
   Realiza Movimentao Fisica               ; lCrtlItem          ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3') ; exec=(this.flSetVar('pDepEnt',0)&& this.flSetVar('sUn1Ent','')&& this.flSetVar('sUn2Ent','')&& this.flSetVar('sUn3Ent','')&& this.flSetVar('sUn4Ent','')&& this.flSetVar('sUn5Ent','')&& this.flSetVar('sUn6Ent','')&& this.flSetVar('sUn7Ent','')&& this.flSetVar('pInsEnt',0)&& this.flSetVar('sInsEnt',''))
;
     Depsito Sada                ; sUn1-50            ; editable=lTransfDep3o==1 ; identlabel=5   ; visible=((lCrtlItem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) ; esc=('dd_files/erp_EST_RegDepositos.dda','Esc_Padrao_1','sUn1,pItem,pEmi','pRegDepVen,sUn1,sUn2,sUn3,sUn4,sUn5,sUn6,sUn7,sIns,fRegDepVen,sUnidade') 
                                   ; sUn2-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn2!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
                                   ; sUn3-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn3!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn4-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn4!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn5-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn5!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn6-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn6!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn7-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn7!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) 
     Instncia Sada               ; sIns-50            ; editable=false ; identlabel=5 ; visible=((lCrtlItem==1)&&(pRegDepVen>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
    ;; visible=((jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
                                      ; pDepEnt-5                      ; identlabel=5  ; editable=false ; visible=((lCrtlItem==1)&&(pDepEnt>0)&&(lTransfDep3o==1)&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false ; fieldborder=0 
    Depsito Entrada                  ; sUn1Ent-50                     ; identlabel=5  ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; esc=('dd_files/erp_EST_Depositos.dda','Esc_Padrao_1','sUn1Ent','pDepEnt,fDepEnt,sUn1Ent,sUn2Ent,sUn3Ent,sUn4Ent,sUn5Ent,sUn6Ent,sUn7Ent')
                                      ; sUn2Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn2Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn3Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn3Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn4Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn4Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn5Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn5Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn6Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn6Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn7Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn7Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                        ; editable=false ; fieldborder=0 ;
     Instncia Entrada                ; sInsEnt-50                     ; identlabel=5   ; esc=('dd_files/erp_EST_Instancias.dda','Esc_Padrao_1','sInsEnt','pInsEnt,fInsEnt,sInsEnt') ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; valid=(((pInsEnt>0) ||(pDepEnt==0)),'A Instncia do Depsito de Entrada deve ser informada')
     Depsito Entrada de Transferncia Id  ; pRegDepTransf-5          ; identlabel=5   ; editable=false ; visible=((lTransfRem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
     Depsito Entrada                      ; sUnTransf1-50            ; identlabel=5   ; visible=((jEntSai==1)&&(sDDFTagApl!='Padrao_3')&&(lTransfRem==1)) ; esc=('dd_files/erp_EST_RegDepositos.dda','Esc_Padrao_1','sUn1,pItem,pEmi','pRegDepTransf,sUnTransf1,sUnTransf2,sUnTransf3,sUnTransf4,sUnTransf5,sUnTransf6,sUnTransf7,sInsTransf,fRegDepTransf,sUnidadeTransf') 
                                           ; sUnTransf2-50            ; editable=false ; visible=((sUnTransf2!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
                                           ; sUnTransf3-50            ; editable=false ; visible=((sUnTransf3!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                           ; sUnTransf4-50            ; editable=false ; visible=((sUnTransf4!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                           ; sUnTransf5-50            ; editable=false ; visible=((sUnTransf5!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                           ; sUnTransf6-50            ; editable=false ; visible=((sUnTransf6!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                           ; sUnTransf7-50            ; editable=false ; visible=((sUnTransf7!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) 
     Instncia Entrada                     ; sInsTransf-50            ; editable=false ; visible=((lTransfRem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5
     ;; visible=((lTransfDep3o)||((lTransfRem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')))
     Lote Transferncia                    ; sDesLote-40              ; identlabel=5   ; esc=('dd_files/erp_LotesItens.dda','Esc_Padrao_2','sDesLote,pItem','pLote,sDesLote,stmp,fLote') ; visible=((lTransfDep3o==1)||((lTransfRem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')&&(iLote==1))) ; valid2=(((lTransfDep3o==true)&&(iLote==1)&&(pLote==0)) ,'O Lote deve ser informado.') 
     ;; visible=((lTransfRem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Tolerncia                                ;                                   ; identlabel=5    ; fontweight='bold' ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   Controle Quantitativo                     ; lContQua                          ; identlabel=10   ; visible=((jEntSai==0)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3')) 
   % Min Divergencia Qtde Comp/Rec/NF        ; nQtMin-18-5                       ; identlabel=15   ; visible=((lContQua==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3')) 
   % Max Divergencia Qtde Comp/Rec/NF        ; nQtMax-18-5                       ; identlabel=15   ; visible=((lContQua==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))    
   Controle Preo                            ; lContPreco                        ; identlabel=10   ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))  
   Preo Min.                                ; nPrecoMin-18-5                    ; identlabel=15   ; visible=((lContPreco==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))    
   Preo Max.                                ; nPrecoMax-18-5                    ; identlabel=15   ; visible=((lContPreco==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))   
; ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   Controle Inspeco                  ; lInspecao                       ; identlabel=5   ; fontweight='bold' ; visible=((jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; exec=(this.flSetVar('pDepInsp',0) && this.flSetVar('fDepInsp',0) && this.flSetVar('pDepReje',0) && this.flSetVar('fDepReje',0) && this.flSetVar('lSkipLote',0) && thi.flSetVar('jTempo',0) && this.flSetVar('dUltInsp','') && this.flSetVar('iCiclo',0) && this.flSetVar('iCicloAtual',0)&& this.flSetVar('sUn1Insp','')&& this.flSetVar('sUn2Insp','')&& this.flSetVar('sUn3Insp','')&& this.flSetVar('sUn4Insp','')&& this.flSetVar('sUn5Insp','')&& this.flSetVar('sUn6Insp','')&& this.flSetVar('sUn7Insp','')&& this.flSetVar('sUn1Reje','')&& this.flSetVar('sUn2Reje','')&& this.flSetVar('sUn3Reje','')&& this.flSetVar('sUn4Reje','')&& this.flSetVar('sUn5Reje','')&& this.flSetVar('sUn6Reje','')&& this.flSetVar('sUn7Reje','')) 
   Depsito Inspeo                  ; pDepInsp-5                      ; identlabel=10  ; editable=false ; visible=((lInspecao==1)&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false ; fieldborder=0 
                                      ; sUn1Insp-50                     ; identlabel=10  ; visible=((lInspecao==1)&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; esc=('dd_files/erp_EST_Depositos.dda','Esc_Padrao_1','sUn1Insp','pDepInsp,fDepInsp,sUn1Insp,sUn2Insp,sUn3Insp,sUn4Insp,sUn5Insp,sUn6Insp,sUn7Insp')
                                      ; sUn2Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn2Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn3Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn3Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                        ; editable=false ; fieldborder=0 ;
                                      ; sUn4Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn4Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                        ; editable=false ; fieldborder=0 ;
                                      ; sUn5Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn5Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn6Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn6Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn7Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn7Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                        ; editable=false ; fieldborder=0 ;
   ;                                                                                     ; editable=false ; visible=((lInspecao==1)&&(pDepInsp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))
   Depsito Rejeito                   ; pDepReje-5                      ; identlabel=10  ; editable=false ; visible=((lInspecao==1)&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false ; fieldborder=0 
                                      ; sUn1Reje-50                     ; identlabel=10  ; visible=((lInspecao==1)&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))  ; esc=('dd_files/erp_EST_Depositos.dda','Esc_Padrao_1','sUn1Reje','pDepReje,fDepReje,sUn1Reje,sUn2Reje,sUn3Reje,sUn4Reje,sUn5Reje,sUn6Reje,sUn7Reje')
                                      ; sUn2Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn2Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn3Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn3Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn4Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn4Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn5Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn5Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn6Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn6Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn7Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn7Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
   ;
   Declarao de Importao                                  ; lImport                                     ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; editalbe=(jOrig==1) ; visible=(sDDFTagApl!='Padrao_3')
      Nmero Documento Importao DI/DSI/DA                  ; sDI_nDI-10                                  ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Data Registro DI/DSI/DA                                ; dDI_dDI                                     ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Local Desembarao                                      ; sDI_xLocDesemb-60                           ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      UF Desembarao                                         ; sDI_UFDesemb-2                              ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Data Desembarao                                       ; dDI_dDesemb                                 ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Cdigo Exportador                                      ; sDI_cExportador-60                          ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Via de transporte internacional                        ; aDI_tpViaTransp[jDI_tpViaTransp]            ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Valor da AFRMM                                         ; nDI_vAFRMM-13-2                             ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Forma de importao quanto a intermediao             ; aDI_tpIntermedio[jDI_tpIntermedio]          ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      CNPJ do adquirente ou do encomendante                  ; sDI_CNPJ-14                                 ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Sigla da UF do adquirente ou do encomendante           ; sDI_UFTerceiro-2                            ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
   Situao Tributria do II                                 ; lImposImpor                                 ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pIIRegFis-6,fIIRegFis-3                     ; identlabel=5     ; editable=false ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3'))
      Valor BC Imposto Importao                            ; nII_vBC-16-2                                ; identlabel=5     ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false
      Valor Despesas Aduaneiras                              ; nII_vDespAdu-16-2                           ; identlabel=5     ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false
      Valor Imposto Importao                               ; nII_vII-16-2                                ; identlabel=5     ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false
      Valor Imposto sobre Operaes Financeiras              ; nII_vIOF-16-2                               ; identlabel=5     ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false
      Valor Total tributos federais, estaduais e municipais  ; nImp_vTotTrib-16-2                          ; identlabel=5     ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3')) ; 
   Adies                                                   ; lAdicoes                                    ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Nmero Adio                                          ; iAdi_nAdicao-3                              ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3'))          
      Nmero Sequencial Item                                 ; iAdi_nSeqAdic-3                             ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3')) 
      Cdigo Fabricante Estrangeiro                          ; sAdi_cFabricante-60                         ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3'))
      Valor Desconto                                         ; nAdi_vDescDI-16-2                           ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3')) 
      Nmero Pedido Compra                                   ; sAdi_xPed-15                                ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3'))
      Item Pedido Compra                                     ; iAdi_nItemPed-6                             ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3'))
   Informaes da CIDE                                       ; lCIDE                                       ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      BC CIDE                                                ; nCIDE_qBCprod-17-4                          ; identlabel=5     ; editable=false ;visible=((lCIDE>0)&&(sDDFTagApl!='Padrao_3')) ; 
      Valor aliquota CIDE                                    ; nCIDE_vAliqProd-16-4                        ; identlabel=5     ; editable=false ;visible=((lCIDE>0)&&(sDDFTagApl!='Padrao_3')) ; 
      Valor CIDE                                             ; nCIDE_vCIDE-16-2                            ; identlabel=5     ; editable=false ;visible=((lCIDE>0)&&(sDDFTagApl!='Padrao_3')) ; 
   ICMS Operao Prpria e ST                                ; lICMS_ST                                    ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pICMSRegFis-6,fICMSRegFis-3                 ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Regime Especial ICMS                                   ; lRE                                         ; identlabel=5     ; editable=false ;   visible=((jEntSai==1)&&(lICMS_ST>0)) ; identlabel=5
      Grupo de Tributao/CST                                ; aICMS_GrupoTrib[jICMS_GrupoTrib]-30         ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Modalidade Determinao BC/ICMS                        ; aICMS_modBC[jICMS_modBC]-30                 ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib!=3)&&(jICMS_GrupoTrib!=4)&&(jICMS_GrupoTrib!=5)&&(jICMS_GrupoTrib!=6)&&(jICMS_GrupoTrib!=8)&&(sDDFTagApl!='Padrao_3'))
      Percentual Reduo BC                                  ; nICMS_pRedBC-12-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==7)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS                                          ; nICMS_vBC-16-2                              ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib!=3)||(jICMS_GrupoTrib!=4)||(jICMS_GrupoTrib!=5)||(jICMS_GrupoTrib!=6)||(jICMS_GrupoTrib!=8))&&(sDDFTagApl!='Padrao_3'))
      Alquota Imposto                                       ; nICMS_pICMS-12-2                             ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib!=3)||(jICMS_GrupoTrib!=4)||(jICMS_GrupoTrib!=5)||(jICMS_GrupoTrib!=6)||(jICMS_GrupoTrib!=8))&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS                                             ; nICMS_vICMS-16-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib!=3)||(jICMS_GrupoTrib!=8))&&(sDDFTagApl!='Padrao_3'))
      Modalidade Determinao BC/ICMS ST                     ; aICMS_modBCST[jICMS_modBCST]-30             ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Percentual Margem Valor adicionado ICMS ST             ; nICMS_pMVAST-12-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Percentual Reduo BC/ICMS ST                          ; nICMS_pRedBCST-12-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS ST                                       ; nICMS_vBCST-16-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Alquota Imposto ICMS ST                               ; nICMS_pICMSST-12-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST                                          ; nICMS_vICMSST-16-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS ST Retido                                ; nICMS_vBCSTRet-16-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib==8)&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST Retido                                   ; nICMS_vICMSSTRet-16-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib==8)&&(sDDFTagApl!='Padrao_3'))
      Motivo desonerao ICMS                                ; aICMS_motDesICMS[jICMS_motDesICMS]-30       ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==4)||(jICMS_GrupoTrib==5)||(jICMS_GrupoTrib==6)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS desonerado                               ; nICMS_vICMSDeson-13-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==4)||(jICMS_GrupoTrib==5)||(jICMS_GrupoTrib==6)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      ;;visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==2)&&(sDDFTagApl!='Padrao_3')))
      Cdigo do Beneficirio                                 ; sCBenef-15                                  ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==2)&&(sDDFTagApl!='Padrao_3')))
      ; ; visible=(lICMS_ST>0)
      Valor BC ICMS na UF de destino                         ; nVBCUFDest-13-2                             ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor da BC FCP na UF de destino                       ; nVBCFCPUFDest-13-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Percentual ICMS relativo ao (FCP) na UF de destino     ; nPFCPUFDest-13-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota interna da UF de destino                      ; nPICMSUFDest-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota interestadual das UF envolvidas               ; nPICMSInter-13-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Percentual provisrio partilhado ICMS Interestadual    ; nPICMSInterPart-13-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS relativo ao (FCP) da UF de destino       ; nVFCPUFDest-13-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS Interestadual para a UF de destino       ; nVICMSUFDest-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS Interestadual para a UF do remetente     ; nVICMSUFRemet-13-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS prprio do Substituto                    ; nICMS_vICMSSubstituto-13-2                  ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor da BC do FCP                                     ; nICMS_vBCFCP-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)))                                          
      Percentual do FCP                                      ; nICMS_pFCP-13-2                             ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)))
      Valor do FCP                                           ; nICMS_vFCP-13-2                             ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)))
      Valor da BC do FCP retido por ST                       ; nICMS_vBCFCPST-13-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==7)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10)))
      Percentual do FCP retido por ST                        ; nICMS_pFCPST-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==7)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10)))
      Valor do FCP retido por ST                             ; nICMS_vFCPST-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==7)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10)))
      Valor da BC do FCP retido anteriormente por ST         ; nICMS_vBCFCPSTRet-13-2                      ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && (jICMS_GrupoTrib==8))
      Percentual do FCP retido anteriormente por ST          ; nICMS_pFCPSTRet-13-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && (jICMS_GrupoTrib==8))
      Valor do FCP retido por ST                             ; nICMS_vFCPSTRet-13-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && (jICMS_GrupoTrib==8))
      Valor do ICMS da Operao                              ; nICMS_vICMSOp-13-2                          ; identlabel=5     ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib==7)&&(sDDFTagApl!='Padrao_3'))
      Percentual do Diferimento                              ; nICMS_pDif-13-2                             ; identlabel=5     ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib==7)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS Diferido                                 ; nICMS_vICMSDif-13-2                         ; identlabel=5     ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib==7)&&(sDDFTagApl!='Padrao_3'))
    ICMS Partilhado                                          ; lICMS_P                                     ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pICMSPartRegFis-6,fICMSPartRegFis-3         ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3')) 
      Tributao  ICMS                                       ; aICMSPart_CST[jICMSPart_CST]-30             ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Modalidade determinao BC do ICMS                     ; aICMSPart_modBC[jICMSPart_modBC]-30         ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Valor da BC  ICMS                                      ; nICMSPart_vBC-16-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Percentual  Reduo de BC                              ; nICMSPart_pRedBC-6-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota  imposto                                      ; nICMSPart_pICMS-6-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS                                          ; nICMSPart_vICMS-16-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Modalidade determinao BC/ICMS ST                     ; aICMSPart_modBCST[jICMSPart_modBCST]-30     ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Percentual margem valor Adicionado ICMS ST             ; nICMSPart_pMVAST-6-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))                   
      Percentual Reduo BC/ICMS ST                          ; nICMSPart_pRedBCT-6-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS ST                                       ; nICMSPart_vBCST-16-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota imposto ICMS                                  ; nICMSPart_pICMSST-6-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST                                          ; nICMSPart_vICMSST-16-2                      ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Percentual BC operao prpria                         ; nICMSPart_pBCOp-6-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      UF para qual devido ICMS ST                            ; sICMSPart_UFST-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
   ICMS ST - Repasse de ICMS ST Retido                       ; lICMS_RR                                    ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pICMSSTRetRegFis-6,fICMSSTRetRegFis-3       ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
      Tributao do ICMS                                     ; aICMSST_CST[jICMSST_CST]-30                 ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS ST retido na UF remetente                ; nICMSST_vBCSTRet-16-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST retido UF remetente                      ; nICMSST_vICMSSTRe-16-2                      ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS ST UF destino                            ; nICMSST_vBCSTDest-16-2                      ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST UF destino                               ; nICMSST_vICMSSTDes-16-2                     ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
  ICMS Simples Nacional                                      ; lICMS_SN                                    ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pICMSSNRegFis-6,fICMSSNRegFis-3             ; identlabel=5     ; editable=false  ;visible=((lICMS_SN>0)&&(sDDFTagApl!='Padrao_3'))      
      Cdigo do Tipo do ICMS                                 ; aGrupo_simples[jGrupo_simples]              ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(sDDFTagApl!='Padrao_3'))
      Cdigo Situao Operao                               ; aICMSSN_CSOSN[jICMSSN_CSOSN]                ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(sDDFTagApl!='Padrao_3'))
      Modalidade determinao BC do ICMS                     ; aICMSSN_modBC[jICMSSN_modBC]                ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==9)&&(sDDFTagApl!='Padrao_3'))
      Valor BC ICMS                                          ; nICMSSN_vBC-16-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==9)&&(sDDFTagApl!='Padrao_3'))
      Percentual Reduo BC do ICMS                          ; nICMSSN_pRedBC-6-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==9)&&(sDDFTagApl!='Padrao_3'))
      Alquota Imposto                                       ; nICMSSN_pICMS-6-2                           ; identlabel=5     ; editable=false ; visible=(((jGrupo_simples==9)||(jGrupo_simples==4))&&(sDDFTagApl!='Padrao_3')&&(lICMS_SN>0))
      Valor ICMS                                             ; nICMSSN_vICMS-16-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==9)&&(sDDFTagApl!='Padrao_3'))
      Modalidade determinao BC ICMS ST                     ; aICMSSN_modBCST[jICMSSN_modBCST]            ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Percentual margem valor Adicionado  ICMS ST            ; nICMSSN_pMVAST-6-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Percentual Reduo BC ICMS ST                          ; nICMSSN_pRedBCST-6-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Valor BC ICMS ST                                       ; nICMSSN_vBCST-16-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Alquota imposto do ICMS ST                            ; nICMSSN_pICMSST-6-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST                                          ; nICMSSN_vICMSST-16-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Alquota aplicvel clculo do crdito                  ; nICMSSN_pCredSN-6-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==0)||(jGrupo_simples==3)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Valor crdito ICMS que pode ser aproveitado nos        ;                                             ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==0)||(jGrupo_simples==3)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      termos do art. 23 da LC 123                            ; nICMSSN_vCredICMSSN-16-2                    ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==0)||(jGrupo_simples==3)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Valor BC ICMS ST retido                                ; nICMSSN_vBCSTRet-16-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==8)&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST retido                                   ; nICMSSN_vICMSSTRet-16-2                     ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==8)&&(sDDFTagApl!='Padrao_3'))
      Valor da BC do FCP retido por ST                       ; nICMSSN_vBCFCPST-13-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& ((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9)))
      Percentual do FCP retido por ST                        ; nICMSSN_pFCPST-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& ((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9)))
      Valor do FCP retido por ST                             ; nICMSSN_vFCPST-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& ((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))) 
      Valor da BC do FCP retido anteriormente por ST         ; nICMSSN_vBCFCPSTRet-13-2                      ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& (jGrupo_simples==8))
      Percentual do FCP retido anteriormente por ST          ; nICMSSN_pFCPSTRet-13-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& (jGrupo_simples==8))
      Valor do FCP retido por ST                             ; nICMSSN_vFCPSTRet-13-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& (jGrupo_simples==8)) 
   IPI                                                       ; lIPI                                        ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pIPIRegFis-6,fIPIRegFis-3                   ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))                            
       Regime Especial IPI                                   ; lIPI_RE                                     ; identlabel=5     ; editable=false ;   visible=((jEntSai==1)&&(lIPI>0)) ; identlabel=5
      IPI por Unidade Tributvel                             ; lIPI_UT-5                                   ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))                            
      Classe enquadramento IPI Cigarros/Bebidas              ; sIPI_clEnq-5                                ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))                            
      CNPJ produtor mercadoria,                              ;                                             ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      diferente emitente Somente para os casos               ;                                             ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      exportao direta/indireta                             ; sIPI_CNPJProd-14                            ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Cdigo selo controle IPI                               ; sIPI_cSelo-60                               ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Quantidade selo controle                               ; nIPI_qSelo-12-0                             ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Cdigo Enquadramento Legal IPI                         ; sIPI_cEnq-3                                 ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Cdigo Situao Tributria IPI                         ; aIPINT_CST[jIPINT_CST]                      ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Valor BC IPI                                           ; nIPITrib_vBC-16-2                           ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota IPI                                           ; nIPITrib_pIPI-6-2                           ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Quantidade total na unidade padro para                ;                                             ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      tributao(produtos tributados por unidade)            ; nIPITrib_qUnid-17-4                         ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Valor por Unidade Tributvel                           ; nIPITrib_vUnid-16-4                         ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Valor IPI                                              ; nIPITrib_vIPI-16-2                          ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Cdigo Exceo Tabela IPI                              ; sProd_EX_TIPI-3                             ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
   PIS                                                       ; lPIS                                        ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pPISRegFis-6,fPISRegFis-3                   ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Cdigo Situao Tributria PIS                         ; aPIS_CST[jPIS_CST]                          ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Valor Base Clculo PIS                                 ; nPIS_vBC-16-2                               ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Alquota PIS (em percentual)                           ; nPIS_pPIS-6-2                               ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Quantidade Vendida                                     ; nPIS_qBCProd-17-4                           ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Alquota PIS (em reais)                                ; nPIS_vAliqProd-16-4                         ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Valor PIS                                              ; nPIS_vPIS-16-2                              ; identlabel=5     ; editable=false ; visible=(lPIS>0)
   PIS ST                                                    ; lPIS_ST                                     ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pPISSTRegFis-6,fPISSTRegFis-3               ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor Base Clculo PIS                                 ; nPISST_vBC-16-2                             ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota PIS (em percentual)                           ; nPISST_pPIS-6-2                             ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Quantidade Vendida                                     ; nPISST_qBCProd-17-4                         ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota PIS (em reais)                                ; nPISST_vAliqProd-16-4                       ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor PIS                                              ; nPISST_vPIS-16-2                            ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
   COFINS                                                    ; lCofins                                     ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pCofinsRegFis-6,fCofinsRegFis-3             ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Cdigo de Situao Tributria COFINS                   ; aCOFINS_CST[jCOFINS_CST]                    ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Valor Base Clculo COFINS                              ; nCOFINS_vBC-16-2                            ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Alquota COFINS (em percentual)                        ; nCOFINS_pCOFINS-6-2                         ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Quantidade Vendida                                     ; nCOFINS_qBCProd-17-4                        ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Alquota COFINS (em reais)                             ; nCOFINS_vAliqProd-16-4                      ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Valor COFINS                                           ; nCOFINS_vCOFINS-16-2                        ; identlabel=5     ; editable=false ; visible=(lCofins>0)
   COFINS ST                                                 ; lCofins_ST                                  ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pCofinsSTRegFis-6,fCofinsSTRegFis-3         ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor da Base de Clculo COFINS                        ; nCOFINSST_vBC-16-2                          ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))      
      Alquota COFINS (em percentual)                        ; nCOFINSST_pCOFINS-6-2                       ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))   
      Quantidade Vendida                                     ; nCOFINSST_qBCProd-17-4                      ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))   
      Alquota COFINS (em reais)                             ; nCOFINSST_vAliqProd-16-4                    ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor COFINS                                           ; nCOFINSST_vCOFINS-16-2                      ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))   
   ISSQN                                                     ; lISSQN                                      ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pISSQNRegFis-6,fISSQNRegFis-3               ; identlabel=5     ; editable=false   ;visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor Base Clculo ISSQN                               ; nISSQN_vBC-16-2                             ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Alquota ISSQN                                         ; nISSQN_vAliq-6-2                            ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor ISSQN                                            ; nISSQN_vISSQN-16-2                          ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor Deduo para Reduo da Base de Clculo          ; nISSQN_vDeducao-16-2                          ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor outras Retenes                                 ; nISSQN_vOutro-16-2                          ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor Desconto Incondicionado                          ; nISSQN_vDescIncond-16-2                     ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor Desconto Condicionado                            ; nISSQN_vDescCond-16-2                       ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor Reteno ISS                                     ; nISSQN_vISSRet-16-2                         ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Indicador da Exigibilidade do ISS                      ; aISSQN_indISS[jISSQN_indISS]-16-2           ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Nr.Processo Jud/Adm de suspenso da exigibilidade      ; sISSQN_nProcesso-30                         ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Indicador de incentivo Fiscal                          ; lISSQN_indIncentivo                         ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      ; ; visible=(lISSQN>0)
      Servio Prestado dentro do Municpio                   ; sISSQN_sServico-50                          ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; esc=('dd_files/erp_TipoServico.dda','Esc_Padrao_1','sISSQN_sServico','pISSQN_cServico,sISSQN_cServico,sISSQN_sServico,fISSQN_cServico')
      Cdigo do Servio Prestado dentro do Municpio         ; sISSQN_cServico-30                          ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; editable=false
      ; ; visible=(lISSQN>0)
      Municpio de Incidncia do Imposto                     ; sISSQN_sMun-50                              ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; esc=('dd_files/Cidades.dda','Esc_Padrao_1','sISSQN_cMun','sISSQN_sMun,stmp,pISSQN_cMun,stmp,pISSQN_cPais,sISSQN_sPais,fISSQN_cMun,fISSQN_cPais,sISSQN_cMun,sISSQN_cPais')
      Cdigo do Municpio de Incidncia do Imposto           ; sISSQN_cMun-10                              ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; editable=false
      ; ; visible=(lISSQN>0)
      Pas onde o Servio foi Prestado                       ; sISSQN_sPais-10                             ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; esc=('dd_files/erp_Paises.dda','Esc_Padrao_1','sISSQN_sPais','pISSQN_cPais,sISSQN_cPais,sISSQN_sPais,fISSQN_cPais')
      Cdigo do Pas onde o Servio foi Prestado             ; sISSQN_cPais-10                             ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; editable=false
      ; ; visible=(lISSQN>0)
      Cdigo municpio ocorrncia fato gerador ISSQN         ; nISSQN_cMunFG-8-0                           ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Item da Lista de Servios                              ; nISSQN_cListServ-5-0                        ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Cdigo Tributao ISSQN                                ; aISSQN_cSitTrib[jISSQN_cSitTrib]             ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
   Transparncia Fiscal                                      ; lTranspFiscal                               ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=((jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
     Alquota Nacional                                       ; nAliqTranspNac-6-2                          ; identlabel=10    ; editable=false  ; visible=((lTranspFiscal>0)&&((jOrig!=1)&&(jOrig!=6))&&(sDDFTagApl!='Padrao_3'))
     Alquota Importada                                      ; nAliqTranspImport-6-2                       ; identlabel=10    ; editable=false  ; visible=((lTranspFiscal>0)&&((jOrig==1)||(jOrig==6))&&(sDDFTagApl!='Padrao_3'))
     Valor Tributado Transparencia Fiscal                    ; nTot_vTrib-6-2                              ; identlabel=10    ; editable=false  ; visible=((lTranspFiscal>0)&&(sDDFTagApl!='Padrao_3'))
  ;
Dados Fiscais (Imposto Seletivo/IBS/CBS)   ;  ; fontweight='bold';  identlabel=5
   Imposto Seletivo                                                    ; lImpSel                         ; identlabel=5  ; fontweight='bold'; edtzoom=true
      Registro Fiscal Id/Verso                                        ; pISRegFis-6,fISRegFis-3         ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ; 
      Classificao Tributria do Imposto Seletivo                     ; sIS_ClassTribIS-20              ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      Situao Tributria do Imposto Seletivo                          ; sIS_CodCSTIS-20                 ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ; 
                                                                       ; sIS_CSTIS-60                    ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      Valor Base de Clculo Imposto Seletivo                           ; nIS_vBCIS-18-5                  ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      % Imposto Seletivo                                               ; nIS_pIS-18-5                    ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      % Especfica por Unidade Apropriada                              ; nIS_pISEspec-18-5               ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      Unidade de Medida Tributvel                                     ; sIS_uTrib-6                     ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      Quantidade Tributvel                                            ; nIS_qTrib-18-5                  ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      Valor Imposto Seletivo                                           ; nIS_vIS-18-5                    ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
   ; ; visible=(lImpSel==1)
   IBS / CBS                                                                ; lIBSCBS                         ; identlabel=5  ; fontweight='bold'; edtzoom=true
       Classificao Tributria do IBS e CBS                                ; sIBSCBS_ClassTrib-20            ; identlabel=10 ; visible=(lIBSCBS==1) ; editable=false ;
       Situao Tributria do IBS e CBS                                     ; sIBSCBS_CodCST-20               ; identlabel=10 ; visible=(lIBSCBS==1) ; editable=false ; 
                                                                            ; sIBSCBS_CST-60                  ; identlabel=10 ; visible=(lIBSCBS==1) ; editable=false ;
       ;
       Valor Base de Clculo IBS/CBS                                        ; nIBSCBS_vBC-18-5                  ; identlabel=10 ; visible=(lIBSCBS==1)  ; editable=false ;
       IBSUF                                                                ;                                 ; identlabel=10 ; fontweight='bold'; visible=(lIBSCBS==1)
         Registro Fiscal Id/Verso                                          ; pRegFisIBS-6,fRegFisIBS-3       ; identlabel=10 ; visible=(lIBSCBS==1)  ; editable=false ; 
         % IBS Competncia UF                                               ; nIBSUF_pIBSUF-18-5              ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ;
         % Diferimento                                                      ; nIBSUF_pDif-18-5                ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ;
         Valor Diferimento                                                  ; nIBSUF_vDif-18-5                ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ;
         Valor Tributo Devolvido                                            ; nIBSUF_vDevTrib-18-5            ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ;
         % Reduo alquota cClassTrib                                      ; nIBSUF_pRedAliq-18-5            ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % IBS Competncia das UF que ser aplicada a Base de Clculo       ; nIBSUF_pAliqEfet-18-5           ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor IBS Competncia UF                                           ; nIBSUF_vIBSUF-18-5              ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
      IBSMun                                                                ;                                 ; identlabel=10 ; fontweight='bold'; visible=(lIBSCBS==1)
         Registro Fiscal Id/Verso                                        ; pRegFisIBSMun-6,fRegFisIBSMun-3     ; identlabel=10 ; visible=(lIBSCBS==1)  ; editable=false ; 
         % IBS Competncia Municpio                                        ; nIBSMun_pIBSMun-18-5            ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % Diferimento                                                      ; nIBSMun_pDif-18-5               ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor Diferimento                                                  ; nIBSMun_vDif-18-5               ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor Tributo Devolvido                                            ; nIBSMun_vDevTrib-18-2           ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % Reduo alquota cClassTrib                                      ; nIBSMun_pRedAliq-18-5           ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % IBS Competncia do Municpio que ser aplicada a Base de Clculo ; nIBSMun_pAliqEfet-18-5          ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor IBS Competncia Municpio                                    ; nIBSMun_vIBSMun-18-2            ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
      Total IBS UF + IBS Municipio                                          ; nIBSCBS_vIBS-18-2           ; identlabel=10  ; fontweight='bold'; editable=false ; visible=(lIBSCBS==1)
      CBS                                                                   ;                                 ; identlabel=10 ; fontweight='bold'; visible=(lIBSCBS==1)
         Registro Fiscal Id/Verso                                        ; pRegFisCBS-6,fRegFisCBS-3         ; identlabel=10 ; visible=(lIBSCBS==1)  ; editable=false ; 
         % CBS                                                              ; nCBS_pCBS-18-5                  ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % Diferimento                                                      ; nCBS_pDif-18-5                  ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor Diferimento                                                  ; nCBS_vDif-18-2                  ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor Tributo Devolvido                                            ; nCBS_vDevTrib-18-2           ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % Reduo alquota cClassTrib                                      ; nCBS_pRedAliq-18-5              ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % CBS que ser aplicada a Base de Clculo                          ; nCBS_pAliqEfet-18-5             ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor da CBS                                                       ; nCBS_vCBS-18-2            ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
 ;
</ScriptForm1>
<VarsToServer1>
   pPId
   iVer
   pOrdem   = {ChaveAtual_1}
   nQtMoe
   pCam  
   fCam  
   pMoe  
   fMoe  
   nCam  
   sCam
   jCam
   lInspecao
   lRE
   lIPI_RE
   lIPI_UT
   nVBCUFDest
   nPFCPUFDest
   nPICMSUFDest
   nPICMSInter
   nPICMSInterPart
   nVFCPUFDest
   nVICMSUFDest
   nVICMSUFRemet
   nICMS_vBCFCP
   nICMS_pFCP
   nICMS_vFCP
   nICMS_vBCFCPST
   nICMS_pFCPST
   nICMS_vFCPST
   nICMS_vBCFCPSTRet
   nICMS_pFCPSTRet
   nICMS_vFCPSTRet
   nVBCFCPUFDest
   nICMSSN_pFCPST
   nICMSSN_vFCPST
   nICMSSN_vBCFCPST
   nICMSSN_pFCPSTRet
   nICMSSN_vFCPSTRet
   nICMSSN_vBCFCPSTRet
   pDepInsp
   pDepReje
   fDepInsp
   fDepReje
   tUltInsp = dUltInsp
   pInsp
   fInsp
   nVDescLog
   nVTCI = jOrig==1 ? nProd_vProd+nProd_vFrete+nProd_vSeg+nII_vII : 0 
   pDepEnt
   pInsEnt
   nPAcresCRTOsa
   nVAcresCRTOsa
   jDI_tpViaTransp    
   nDI_vAFRMM         
   jDI_tpIntermedio   
   sDI_CNPJ           
   sDI_UFTerceiro     
   nImp_vTotTrib      
   nICMS_vICMSDeson   
   nICMS_vICMSOp      
   nICMS_pDif         
   nICMS_vICMSDif     
   nISSQN_vDeducao    
   nISSQN_vOutro      
   nISSQN_vDescIncond 
   nISSQN_vDescCond   
   nISSQN_vISSRet     
   jISSQN_indISS      
   pISSQN_cServico    
   fISSQN_cServico    
   pISSQN_cMun        
   pISSQN_cPais       
   fISSQN_cMun        
   fISSQN_cPais       
   sISSQN_nProcesso   
   lISSQN_indIncentivo
   nCTR_VlCalcI
   jFinalidade
   sFCI
   pRegDepVen
   fRegDepVen
   pRegDepTransf
   fRegDepTransf
   pMotAltPed
   fMotAltPed
   lImport     
   lImposImpor 
   lAdicoes    
   lCIDE       
   lICMS_ST    
   lICMS_P     
   lICMS_RR    
   lICMS_SN    
   lIPI        
   lPIS        
   lPIS_ST     
   lCofins     
   lCofins_ST  
   lISSQN      
   lTranspFiscal
   nTot_vTrib 
   nAliqTranspImport
   nAliqTranspNac   
   pRegDepRFis
   fRegDepRFis
   jBC_PIS
   jBC_COFINS
   jBC_ICMS
   jBC_IPI
   jBC_ICMSST
   jBC_II
   jBC_ISS
   jVl_ICMSST
   jVl_ICMS
   nBC_ICMS
   nBC_COFINS
   nBC_PIS
   nBC_IPI
   nBC_ICMSST
   nBC_II
   nBC_ISS
   nVl_ICMSST
   nVl_ICMS
   nICMS_vICMSSubstituto
   nPEncFinTpED
   lCCusto  
   lCrtlItem
   jOrig
   iSerial
   jFDiasEnt
   iDiasInf
   iDiasCalc
   pItem 
   pUni         
   fUni
   pNeg          = jTipo==0 ? 1  : pNeg  
   fNeg          = jTipo==0 ? 1  : fNeg  
   pTab  = 0         
   fTab  = 0        
   pTabI = 0        
   fTabI = 0        
   pTabGrpP = 0 
   fTabGrpP = 0 
   pTabGrpPI= 0 
   fTabGrpPI= 0 
   pNCM    
   fNCM    
   pCFO    
   fCFO    
   jTipo
   nQt
   tEntPla 
   tEmissao
   tSaida
   pItem
   fItem
   nDesc
   nQtMin
   nQtMax
   nPrecoMin
   nPrecoMax
   lContQua
   lContPreco
   iCiclo
   iCicloAtual
   jTempo
   lSkipLote
   nPrBruto
   nPDescCP = nDFin
   nVDescCP
   nPDescTpED = nDescFin
   nVDescTpED
   nVEncFinTpED
   nPDescTpEDG
   nVDescTpEDG
   nPDescInc
   nVDescInc
   nProd_pDesc
   pPTOpEDItem
   fPTOpEDItem
   pPTOpEDGrpItem
   fPTOpEDGrpItem
   pLote
   fLote
   nProd_vUnCom
   nProd_vProd
   nProd_vFrete
   nVMLE
   nProd_vSeg
   nProd_vDesc
   nProd_vOutro
   jProd_indTot
   sDI_nDI               
   dDI_dDI               
   sDI_xLocDesemb        
   sDI_UFDesemb          
   dDI_dDesemb           
   sDI_cExportador  
   iAdi_nAdicao          
   iAdi_nSeqAdic         
   sAdi_cFabricante      
   nAdi_vDescDI          
   sAdi_xPed             
   iAdi_nItemPed
   nCIDE_qBCprod
   nCIDE_vAliqProd
   nCIDE_vCIDE
   jICMS_GrupoTrib    
   jICMS_orig
   jICMS_modBC
   nICMS_vBC
   nICMS_pICMS
   nICMS_vICMS
   jICMS_modBCST
   nICMS_pMVAST
   nICMS_pRedBCST
   nICMS_vBCST
   nICMS_pICMSST
   nICMS_vICMSST
   nICMS_pRedBC
   jICMS_motDesICMS
   nICMS_vBCSTRet
   nICMS_vICMSSTRet
   jICMSPart_orig
   jICMSPart_CST
   jICMSPart_modBC
   nICMSPart_vBC
   nICMSPart_pRedBC
   nICMSPart_pICMS
   nICMSPart_vICMS
   jICMSPart_modBCST
   nICMSPart_pMVAST
   nICMSPart_pRedBCT
   nICMSPart_vBCST
   nICMSPart_pICMSST
   nICMSPart_vICMSST
   nICMSPart_pBCOp
   sICMSPart_UFST
   jICMSST_orig
   jICMSST_CST
   nICMSST_vBCSTRet
   nICMSST_vICMSSTRe
   nICMSST_vBCSTDest
   nICMSST_vICMSSTDes
   jGrupo_simples
   jICMSSN_Orig
   jICMSSN_CSOSN
   nICMSSN_pCredSN
   nICMSSN_vCredICMSSN
   jICMSSN_modBCST
   nICMSSN_pMVAST
   nICMSSN_pRedBCST
   nICMSSN_vBCST
   nICMSSN_pICMSST
   nICMSSN_vICMSST
   nICMSSN_vBCSTRet
   nICMSSN_vICMSSTRet
   jICMSSN_modBC
   nICMSSN_vBC
   nICMSSN_pRedBC
   nICMSSN_pICMS
   nICMSSN_vICMS
   sIPI_clEnq
   sIPI_CNPJProd
   sIPI_cSelo   
   nIPI_qSelo   
   sIPI_cEnq    
   jIPINT_CST      
   nIPITrib_vBC 
   nIPITrib_pIPI
   nIPITrib_qUnid
   nIPITrib_vUnid
   nIPITrib_vIPI 
   nII_vBC 
   nII_vDespAdu
   nII_vII     
   nII_vIOF    
   jPIS_CST  
   nPIS_vBC 
   nPIS_pPIS 
   nPIS_vPIS 
   nPIS_qBCProd 
   nPIS_vAliqProd 
   nPISST_vBC 
   nPISST_pPIS
   nPISST_qBCProd 
   nPISST_vAliqProd
   nPISST_vPIS
   jCOFINS_CST  
   nCOFINS_vBC  
   nCOFINS_pCOFINS 
   nCOFINS_vCOFINS 
   nCOFINS_qBCProd
   nCOFINS_vAliqProd
   nCOFINSST_vBC
   nCOFINSST_pCOFINS
   nCOFINSST_qBCProd
   nCOFINSST_vAliqProd
   nCOFINSST_vCOFINS
   nISSQN_vBC
   nISSQN_vAliq
   nISSQN_vISSQN
   nISSQN_cMunFG
   nISSQN_cListServ
   jISSQN_cSitTrib
   sInfAdProd = mInfAdProd
   pOrdens_Item_CCusto_{i}
   pCCusto_{i}
   fCCusto_{i}
   nRatCCusto_{i}
   pOrdens_Item_CContCred_{i}
   pCContCred_{i}
   fCContCred_{i}
   nRatCredCCont_{i}
   pOrdens_Item_CContDeb_{i}
   pCContDeb_{i}
   fCContDeb_{i}
   nRatDebCCont_{i}
</VarsToServer1>
<VarsToDb1>  
   sDDFTabela = Ordens_Itens
   aSerial[]  = 'OSa_{ChaveAtual_1}'
   iSerial    = $aSerial[0]
   nQtMoe
   pCam  
   fCam 
   pMoe
   fMoe
   nCam
   sCam
   jCam
   nVBCUFDest
   nPFCPUFDest
   nPICMSUFDest
   nPICMSInter
   nPICMSInterPart
   nVFCPUFDest
   nVICMSUFDest
   nVICMSUFRemet
   nVBCFCPUFDest
   nICMS_vBCFCP
   nICMS_pFCP
   nICMS_vFCP
   nICMS_vBCFCPST
   nICMS_pFCPST
   nICMS_vFCPST
   nICMS_vBCFCPSTRet
   nICMS_pFCPSTRet
   nICMS_vFCPSTRet
   nICMSSN_pFCPST
   nICMSSN_vFCPST
   nICMSSN_vBCFCPST
   nICMSSN_pFCPSTRet
   nICMSSN_vFCPSTRet
   nICMSSN_vBCFCPSTRet
   pRegDepVen
   fRegDepVen
   sFCI
   nVDescLog
   pDepInsp
   pDepReje
   fDepInsp
   fDepReje
   tUltInsp
   pInsp
   fInsp
   nVTCI
   pDepEnt
   pInsEnt
   lRE
   lIPI_RE
   lIPI_UT
   lInspecao
   pRegDepRFis
   fRegDepRFis
   pRegDepTransf
   fRegDepTransf
   pMotAltPed
   fMotAltPed
   nPAcresCRTOsa
   nVAcresCRTOsa
   jDI_tpViaTransp    
   nDI_vAFRMM         
   jDI_tpIntermedio   
   sDI_CNPJ           
   sDI_UFTerceiro     
   nImp_vTotTrib      
   nICMS_vICMSDeson   
   nICMS_vICMSOp      
   nICMS_pDif         
   nICMS_vICMSDif     
   nISSQN_vDeducao    
   nISSQN_vOutro      
   nISSQN_vDescIncond 
   nISSQN_vDescCond   
   nISSQN_vISSRet     
   jISSQN_indISS      
   pISSQN_cServico    
   fISSQN_cServico    
   pISSQN_cMun        
   pISSQN_cPais       
   fISSQN_cMun        
   fISSQN_cPais       
   sISSQN_nProcesso   
   lISSQN_indIncentivo
   lImport     
   lImposImpor 
   lAdicoes    
   lCIDE       
   lICMS_ST    
   lICMS_P     
   lICMS_RR    
   lICMS_SN    
   lIPI        
   lPIS        
   lPIS_ST     
   lCofins     
   lCofins_ST  
   lISSQN      
   lTranspFiscal
   nCTR_VlCalcI
   jBC_PIS
   jBC_COFINS
   jBC_ICMS
   jBC_IPI
   jBC_ICMSST
   jBC_II
   jBC_ISS
   jVl_ICMSST
   jVl_ICMS
   nBC_ICMS
   nBC_COFINS
   nBC_PIS
   nBC_IPI
   nBC_ICMSST
   nBC_II
   nBC_ISS
   nVl_ICMSST
   nVl_ICMS
   nICMS_vICMSSubstituto
   nTot_vTrib 
   nAliqTranspImport
   nAliqTranspNac   
   nPEncFinTpED
   jOrig
   jFDiasEnt
   iDiasInf
   iDiasCalc
   pOrdem 
   pItem
   fItem
   pUni
   fUni
   pNeg
   fNeg
   pTab
   fTab
   pTabI
   fTabI
   pTabGrpP  
   fTabGrpP  
   pTabGrpPI 
   fTabGrpPI 
   pNCM
   fNCM
   pCFO
   fCFO
   jTipo
   nQt
   tEntPla
   tEmissao
   tSaida
   nDesc
   lCCusto  
   lCrtlItem
   pPTOpEDItem
   fPTOpEDItem
   pPTOpEDGrpItem
   fPTOpEDGrpItem
   nQtMin
   nQtMax
   nPrecoMin
   nPrecoMax
   lContQua
   lContPreco
   iCiclo
   iCicloAtual
   jTempo
   lSkipLote
   nPrBruto   
   nPDescCP   
   nVDescCP   
   nPDescTpED 
   nVDescTpED 
   nVEncFinTpED 
   nPDescTpEDG
   nVDescTpEDG
   nPDescInc  
   nVDescInc  
   nProd_pDesc
   pLote
   fLote
   jFinalidade
   nProd_vUnCom
   nProd_vProd
   nProd_vFrete
   nVMLE
   nProd_vSeg
   nProd_vDesc
   nProd_vOutro
   jProd_indTot
   sDI_nDI               
   dDI_dDI               
   sDI_xLocDesemb        
   sDI_UFDesemb          
   dDI_dDesemb           
   sDI_cExportador  
   iAdi_nAdicao          
   iAdi_nSeqAdic         
   sAdi_cFabricante      
   nAdi_vDescDI          
   sAdi_xPed             
   iAdi_nItemPed         
   nCIDE_qBCprod
   nCIDE_vAliqProd
   nCIDE_vCIDE
   jICMS_GrupoTrib
   jICMS_orig 
   jICMS_modBC
   nICMS_vBC
   nICMS_pICMS
   nICMS_vICMS
   jICMS_modBCST
   nICMS_pMVAST
   nICMS_pRedBCST
   nICMS_vBCST
   nICMS_pICMSST
   nICMS_vICMSST
   nICMS_pRedBC
   jICMS_motDesICMS
   nICMS_vBCSTRet
   nICMS_vICMSSTRet
   jICMSPart_orig
   jICMSPart_CST
   jICMSPart_modBC
   nICMSPart_vBC
   nICMSPart_pRedBC
   nICMSPart_pICMS
   nICMSPart_vICMS
   jICMSPart_modBCST
   nICMSPart_pMVAST
   nICMSPart_pRedBCT
   nICMSPart_vBCST
   nICMSPart_pICMSST
   nICMSPart_vICMSST
   nICMSPart_pBCOp
   sICMSPart_UFST
   jICMSST_orig
   jICMSST_CST
   nICMSST_vBCSTRet
   nICMSST_vICMSSTRe
   nICMSST_vBCSTDest
   nICMSST_vICMSSTDes
   jGrupo_simples
   jICMSSN_Orig
   jICMSSN_CSOSN
   nICMSSN_pCredSN
   nICMSSN_vCredICMSSN
   jICMSSN_modBCST
   nICMSSN_pMVAST
   nICMSSN_pRedBCST
   nICMSSN_vBCST
   nICMSSN_pICMSST
   nICMSSN_vICMSST
   nICMSSN_vBCSTRet
   nICMSSN_vICMSSTRet
   jICMSSN_modBC
   nICMSSN_vBC
   nICMSSN_pRedBC
   nICMSSN_pICMS
   nICMSSN_vICMS
   sIPI_clEnq
   sIPI_CNPJProd
   sIPI_cSelo
   nIPI_qSelo
   sIPI_cEnq
   jIPINT_CST
   nIPITrib_vBC
   nIPITrib_pIPI
   nIPITrib_qUnid
   nIPITrib_vUnid
   nIPITrib_vIPI
   nII_vBC
   nII_vDespAdu
   nII_vII
   nII_vIOF
   jPIS_CST  
   nPIS_vBC 
   nPIS_pPIS 
   nPIS_vPIS 
   nPIS_qBCProd 
   nPIS_vAliqProd 
   nPISST_vBC 
   nPISST_pPIS
   nPISST_qBCProd 
   nPISST_vAliqProd
   nPISST_vPIS   
   jCOFINS_CST
   nCOFINS_vBC
   nCOFINS_pCOFINS
   nCOFINS_vCOFINS
   nCOFINS_qBCProd
   nCOFINS_vAliqProd
   nCOFINSST_vBC
   nCOFINSST_pCOFINS
   nCOFINSST_qBCProd
   nCOFINSST_vAliqProd
   nCOFINSST_vCOFINS
   nISSQN_vBC 
   nISSQN_vAliq 
   nISSQN_vISSQN
   nISSQN_cMunFG    
   nISSQN_cListServ 
   jISSQN_cSitTrib
   sInfAdProd   
   sDDFSubTabela = Ordens_Item_CCusto
   pSubPId       = $_POST[pOrdens_Item_CCusto_{i}]
   pOrdemItem    = {ChaveAtual_0}
   fOrdemItem    = $_POST[iVer]
   pCCusto       = $_POST[pCCusto_{i}]
   fCCusto       = $_POST[fCCusto_{i}]
   nRatCCusto    = $_POST[nRatCCusto_{i}]
   lExc          = $_POST[pCCusto_{i}]==0 ? 1 : 0
   sDDFSubTabela = Ordens_Item_CContabil
   pSubPId       = $_POST[pOrdens_Item_CContCred_{i}]
   pOrdemItem    = {ChaveAtual_0}
   fOrdemItem    = $_POST[iVer]
   pCPla         = $_POST[pCContCred_{i}]
   fCPla         = $_POST[fCContCred_{i}]
   nRatCredCCont = $_POST[nRatCredCCont_{i}]
   lDeb          = 0
   lExc          = $_POST[pCContCred_{i}]==0 ? 1 : 0
   sDDFSubTabela = Ordens_Item_CContabil
   pSubPId       = $_POST[pOrdens_Item_CContDeb_{i}]
   pOrdemItem    = {ChaveAtual_0}
   fOrdemItem    = $_POST[iVer]
   pCPla         = $_POST[pCContDeb_{i}]
   fCPla         = $_POST[fCContDeb_{i}]
   nRatDebCCont  = $_POST[nRatDebCCont_{i}]
   lDeb          = 1
   lExc          = $_POST[pCContDeb_{i}]==0 ? 1 : 0
</VarsToDb1>
<ServerValids1>
   pItem        ; $_POST[.]>0 ;  O Item deve ser informado.
   pUni         ; $_POST[.]>0 ;  A unidade da transao deve ser informada.
   nQt          ; $_POST[.]>=0 ;  A Qt.Pedida deve ser Preenchida.
   pMoe         ; $_POST[.]>0 ;  A Moeda do Item deve ser informada.
   nProd_vUnCom ; $_POST[.]>=0 ;  O Valor [UN]  c/ (Pr) Descontos deve ser preenchido.
   pItem        ; flEhUnico("select count(*) from Ordens_Itens a, Ordens b, TOper c where a.pItem=$_POST[.] and a.pPId!=$_POST[pPId] and a.pOrdem=$_POST[pOrdem] and a.pOrdem=b.pPId and b.pTOper = c.pPId and b.lTransfDep3o=0 and c.lRejOrdemDupl=1  and a.iVer = a.iVAt and b.iVer = b.iVAt and c.iVer = c.iVAt") ; J existe esse Item cadastrado no Item da Ordem, se no encontrar verifique na lixeira.
</ServerValids1>
<PodeIncluir1>
     select count(*) from Ordens where pPId={ChaveAtual_1} and iVer=iVAt and tConf is null ; Esse Item no pode ser includo porque a Ordem j foi Confirmada
</PodeIncluir1>
<PodeExcluir1>
   select count(*) from Ordens where pPId={ChaveAtual_1} and iVer=iVAt and tConf is null ; Esse Item no pode ser excluido porque a Ordem j foi Confirmada
</PodeExcluir1>
<PodeAlterar1>
   select count(*) from Ordens where pPId={ChaveAtual_1} and iVer=iVAt and tConf is null ; Esse Item no pode ser alterado porque a Ordem j foi Confirmada
</PodeAlterar1>
<exec1>
(
      this.flSetVar('pItem',0) 
   && this.flSetVar('fItem',0) 
   && this.flSetVar('sRegCodItem','') 
   && this.flSetVar('sTabCodItem','') 
   && this.flSetVar('sNegCodItem','') 
   && this.flSetVar('sRegDesItem','') 
   && this.flSetVar('pTab','0') 
   && this.flSetVar('fTab','0') 
   && this.flSetVar('pTabI','0') 
   && this.flSetVar('fTabI','0') 
   && this.flSetVar('sCodTab','') 
   && this.flSetVar('sDesTab','') 
   && this.flSetVar('pLote',0) 
   && this.flSetVar('fLote',0) 
   && this.flSetVar('sLote','') 
   && this.flSetVar('jOrig',0)   
   && this.flSetVar('jICMS_Orig',0)   
   && this.flSetVar('pUni',0)         
   && this.flSetVar('sCodUni','')     
   && this.flSetVar('sUni','')        
   && this.flSetVar('pNCM',0)         
   && this.flSetVar('sCodNCM','')     
   && this.flSetVar('sDesNCM','')     
   && this.flSetVar('pNeg',0)         
   && this.flSetVar('fNeg',0)         
   && this.flSetVar('nPrBruto','0,00000') 
   && this.flSetVar('nVDescCP','0,00000') 
   && this.flSetVar('nVDescTpED','0,00000') 
   && this.flSetVar('nVEncFinTpED','0,00000') 
   && this.flSetVar('nVDescTpEDG','0,00000') 
   && this.flSetVar('nPEncFinTpED','0,00000') 
   && this.flSetVar('sMoe','') 
   && this.flSetVar('pMoe',0) 
   && this.flSetVar('fMoe',0) 
   && this.flSetVar('nQtMoe','0,00000') 
   && this.flSetVar('sMoeCambio','') 
   && this.flSetVar('pCam',0) 
   && this.flSetVar('fCam',0) 
   && this.flSetVar('nCam','0,00000') 
   && this.flSetVar('sCam','') 
   && this.flSetVar('jCam',0) 
   && this.flSetVar('nProd_vUnCom','0,00000') 
   && this.flSetVar('nProd_vFrete','0,00') 
   && this.flSetVar('nVMLE','0,00') 
   && this.flSetVar('nProd_vSeg','0,00') 
   && this.flSetVar('nProd_vDesc','0,00000') 
   && this.flSetVar('nProd_vProd','0,00') 
   && this.flSetVar('pCFO',0) 
   && this.flSetVar('sCodCFO','') 
   && this.flSetVar('sAbrev','') 
   && this.flSetVar('fCFO',0) 
   && this.flSetVar('pRegDepVen',0) 
   && this.flSetVar('pDepVen',0) 
   && this.flSetVar('pUFisVen',0) 
   && this.flSetVar('pUFisVen',0) 
   && this.flSetVar('sUn1Ven','') 
   && this.flSetVar('sUn2Ven','') 
   && this.flSetVar('sUn3Ven','') 
   && this.flSetVar('sUn4Ven','') 
   && this.flSetVar('sUn5Ven','') 
   && this.flSetVar('sUn6Ven','') 
   && this.flSetVar('sUn7Ven','') 
   && this.flSetVar('pRegDepRFis',0) 
   && this.flSetVar('pDepRFis',0) 
   && this.flSetVar('pUFisRFis',0) 
   && this.flSetVar('pUFisRFis',0) 
   && this.flSetVar('sUn1RFis','') 
   && this.flSetVar('sUn2RFis','') 
   && this.flSetVar('sUn3RFis','') 
   && this.flSetVar('sUn4RFis','') 
   && this.flSetVar('sUn5RFis','') 
   && this.flSetVar('sUn6RFis','') 
   && this.flSetVar('sUn7RFis','')  
   && this.flSetVar('tEntPla','') 
   && this.flSetVar('tEmissao','') 
   && this.flSetVar('tSaida ','') 
   && this.flSetVar('sDI_nDI','') 
   && this.flSetVar('dDI_dDI','') 
   && this.flSetVar('sDI_xLocDesemb','') 
   && this.flSetVar('sDI_UFDesemb','') 
   && this.flSetVar('dDI_dDesemb','') 
   && this.flSetVar('sDI_cExportador','') 
   && this.flSetVar('nII_vBC','0,00') 
   && this.flSetVar('nII_vDespAdu','0,00') 
   && this.flSetVar('nII_vII','0,00') 
   && this.flSetVar('nII_vIOF','0,00') 
   && this.flSetVar('iAdi_nAdicao',0) 
   && this.flSetVar('iAdi_nSeqAdic',0) 
   && this.flSetVar('sAdi_cFabricante','') 
   && this.flSetVar('nAdi_vDescDI','0,00000') 
   && this.flSetVar('sAdi_xPed','') 
   && this.flSetVar('iAdi_nItemPed',0) 
   && this.flSetVar('nCIDE_qBCprod','0,00') 
   && this.flSetVar('nCIDE_vAliqProd','0,00') 
   && this.flSetVar('nCIDE_vCIDE','0,00') 
   && this.flSetVar('jICMS_GrupoTrib',0) 
   && this.flSetVar('jICMS_orig',0) 
   && this.flSetVar('jICMS_modBC',0) 
   && this.flSetVar('nICMS_pRedBC','0,00') 
   && this.flSetVar('nICMS_vBC','0,00') 
   && this.flSetVar('nICMS_pICMS','0,00') 
   && this.flSetVar('nICMS_vICMS','0,00') 
   && this.flSetVar('jICMS_modBCST',0) 
   && this.flSetVar('nICMS_pMVAST','0,00') 
   && this.flSetVar('nICMS_pRedBCST','0,00') 
   && this.flSetVar('nICMS_vBCST','0,00') 
   && this.flSetVar('nICMS_pICMSST','0,00') 
   && this.flSetVar('nICMS_vICMSST','0,00') 
   && this.flSetVar('nICMS_vBCSTRet','0,00') 
   && this.flSetVar('nICMS_vICMSSTRet','0,00') 
   && this.flSetVar('jICMS_motDesICMS',0) 
   && this.flSetVar('jICMSPart_orig',0) 
   && this.flSetVar('jICMSPart_CST',0) 
   && this.flSetVar('jICMSPart_modBC',0) 
   && this.flSetVar('nICMSPart_vBC','0,00') 
   && this.flSetVar('nICMSPart_pRedBC','0,00') 
   && this.flSetVar('nICMSPart_pICMS','0,00') 
   && this.flSetVar('nICMSPart_vICMS','0,00') 
   && this.flSetVar('jICMSPart_modBCST',0) 
   && this.flSetVar('nICMSPart_pMVAST','0,00') 
   && this.flSetVar('nICMSPart_pRedBCT','0,00') 
   && this.flSetVar('nICMSPart_vBCST','0,00') 
   && this.flSetVar('nICMSPart_pICMSST','0,00') 
   && this.flSetVar('nICMSPart_vICMSST','0,00') 
   && this.flSetVar('nICMSPart_pBCOp','0,00') 
   && this.flSetVar('sICMSPart_UFST','') 
   && this.flSetVar('jICMSST_orig',0) 
   && this.flSetVar('jICMSST_CST',0) 
   && this.flSetVar('nICMSST_vBCSTRet','0,00') 
   && this.flSetVar('nICMSST_vICMSSTRe','0,00') 
   && this.flSetVar('nICMSST_vBCSTDest','0,00') 
   && this.flSetVar('nICMSST_vICMSSTDes','0,00') 
   && this.flSetVar('jGrupo_simples',0) 
   && this.flSetVar('jICMSSN_Orig',0) 
   && this.flSetVar('jICMSSN_CSOSN',0) 
   && this.flSetVar('jICMSSN_modBC',0) 
   && this.flSetVar('nICMSSN_vBC','0,00') 
   && this.flSetVar('nICMSSN_pRedBC','0,00') 
   && this.flSetVar('nICMSSN_pICMS','0,00') 
   && this.flSetVar('nICMSSN_vICMS','0,00') 
   && this.flSetVar('jICMSSN_modBCST',0) 
   && this.flSetVar('nICMSSN_pMVAST','0,00') 
   && this.flSetVar('nICMSSN_pRedBCST','0,00') 
   && this.flSetVar('nICMSSN_vBCST','0,00') 
   && this.flSetVar('nICMSSN_pICMSST','0,00') 
   && this.flSetVar('nICMSSN_vICMSST','0,00') 
   && this.flSetVar('nICMSSN_pCredSN','0,00') 
   && this.flSetVar('nICMSSN_vCredICMSSN','0,00') 
   && this.flSetVar('nICMSSN_vBCSTRet','0,00') 
   && this.flSetVar('nICMSSN_vICMSSTRet','0,00') 
   && this.flSetVar('sIPI_clEnq','') 
   && this.flSetVar('sIPI_CNPJProd','') 
   && this.flSetVar('sIPI_cSelo','') 
   && this.flSetVar('nIPI_qSelo','0,00') 
   && this.flSetVar('sIPI_cEnq','') 
   && this.flSetVar('jIPINT_CST',0) 
   && this.flSetVar('nIPITrib_vBC','0,00') 
   && this.flSetVar('nIPITrib_pIPI','0,00') 
   && this.flSetVar('nIPITrib_qUnid','0,00') 
   && this.flSetVar('nIPITrib_vUnid','0,00') 
   && this.flSetVar('nIPITrib_vIPI','0,00') 
   && this.flSetVar('jPIS_CST',0) 
   && this.flSetVar('nPIS_vBC','0,00') 
   && this.flSetVar('nPIS_pPIS','0,00') 
   && this.flSetVar('nPIS_qBCProd','0,00') 
   && this.flSetVar('nPIS_vAliqProd','0,00') 
   && this.flSetVar('nPIS_vPIS','0,00') 
   && this.flSetVar('nPISST_vBC','0,00') 
   && this.flSetVar('nPISST_pPIS','0,00') 
   && this.flSetVar('nPISST_qBCProd','0,00') 
   && this.flSetVar('nPISST_vAliqProd','0,00') 
   && this.flSetVar('nPISST_vPIS','0,00') 
   && this.flSetVar('jCOFINS_CST',0) 
   && this.flSetVar('nCOFINS_vBC','0,00') 
   && this.flSetVar('nCOFINS_pCOFINS','0,00') 
   && this.flSetVar('nCOFINS_qBCProd','0,00') 
   && this.flSetVar('nCOFINS_vAliqProd','0,00') 
   && this.flSetVar('nCOFINS_vCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_vBC','0,00') 
   && this.flSetVar('nCOFINSST_pCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_qBCProd','0,00') 
   && this.flSetVar('nCOFINSST_vAliqProd','0,00') 
   && this.flSetVar('nCOFINSST_vCOFINS','0,00') 
   && this.flSetVar('nISSQN_vBC','0,00') 
   && this.flSetVar('nISSQN_vAliq','0,00') 
   && this.flSetVar('nISSQN_vISSQN','0,00') 
   && this.flSetVar('nISSQN_cMunFG','0,00') 
   && this.flSetVar('nISSQN_cListServ','0,00') 
   && this.flSetVar('jISSQN_cSitTrib',0) 
   && this.flSetVar('mInfAdProd','')
   && this.flSetVar('nQtMin','0,00') 
   && this.flSetVar('nQtMax','0,00') 
   && this.flSetVar('nPrecoMin','0,00') 
   && this.flSetVar('nPrecoMax','0,00') 
   && this.flSetVar('lContQua',0) 
   && this.flSetVar('lContPreco',0) 
   && this.flSetVar('iCiclo',0) 
   && this.flSetVar('iCicloAtual',0) 
   && this.flSetVar('jTempo',0) 
   && this.flSetVar('lSkipLote',0) 
)
</exec1>
<exec2>
(
      this.flSetVar('nPrBruto','0,00000') 
   && this.flSetVar('nVDescCP','0,00000') 
   && this.flSetVar('nVDescTpED','0,00000') 
   && this.flSetVar('nVEncFinED','0,00000') 
   && this.flSetVar('nVEncFinTpED','0,00000') 
   && this.flSetVar('nVDescTpEDG','0,00000')                                                                                   
   && this.flSetVar('nQtMoe','0,00000') 
   && this.flSetVar('sMoeCambio','') 
   && this.flSetVar('pCam',0) 
   && this.flSetVar('fCam',0)
   && this.flSetVar('nCam','0,00000') 
   && this.flSetVar('sCam','')                             
   && this.flSetVar('nProd_vUnCom','0,00000') 
   && this.flSetVar('nProd_vFrete','0,00') 
   && this.flSetVar('nVMLE','0,00') 
   && this.flSetVar('nProd_vSeg','0,00') 
   && this.flSetVar('nProd_vDesc','0,00000') 
   && this.flSetVar('nProd_vProd','0,00') 
   && this.flSetVar('pCFO',0) 
   && this.flSetVar('sCodCFO','') 
   && this.flSetVar('sAbrev','') 
   && this.flSetVar('fCFO',0) 
   && this.flSetVar('tEntPla','') 
   && this.flSetVar('tEmissao','') 
   && this.flSetVar('tSaida ','') 
   && this.flSetVar('sDI_nDI','') 
   && this.flSetVar('dDI_dDI','') 
   && this.flSetVar('sDI_xLocDesemb','') 
   && this.flSetVar('sDI_UFDesemb','') 
   && this.flSetVar('dDI_dDesemb','') 
   && this.flSetVar('sDI_cExportador','') 
   && this.flSetVar('nII_vBC','0,00') 
   && this.flSetVar('nII_vDespAdu','0,00') 
   && this.flSetVar('nII_vII','0,00') 
   && this.flSetVar('nII_vIOF','0,00') 
   && this.flSetVar('iAdi_nAdicao',0) 
   && this.flSetVar('iAdi_nSeqAdic',0) 
   && this.flSetVar('sAdi_cFabricante','') 
   && this.flSetVar('nAdi_vDescDI','0,00000') 
   && this.flSetVar('sAdi_xPed','') 
   && this.flSetVar('iAdi_nItemPed',0) 
   && this.flSetVar('nCIDE_qBCprod','0,00') 
   && this.flSetVar('nCIDE_vAliqProd','0,00') 
   && this.flSetVar('nCIDE_vCIDE','0,00') 
   && this.flSetVar('jICMS_GrupoTrib',0) 
   && this.flSetVar('jICMS_orig',0) 
   && this.flSetVar('jICMS_modBC',0) 
   && this.flSetVar('nICMS_pRedBC','0,00') 
   && this.flSetVar('nICMS_vBC','0,00') 
   && this.flSetVar('nICMS_pICMS','0,00') 
   && this.flSetVar('nICMS_vICMS','0,00') 
   && this.flSetVar('jICMS_modBCST',0) 
   && this.flSetVar('nICMS_pMVAST','0,00') 
   && this.flSetVar('nICMS_pRedBCST','0,00') 
   && this.flSetVar('nICMS_vBCST','0,00') 
   && this.flSetVar('nICMS_pICMSST','0,00') 
   && this.flSetVar('nICMS_vICMSST','0,00') 
   && this.flSetVar('nICMS_vBCSTRet','0,00') 
   && this.flSetVar('nICMS_vICMSSTRet','0,00') 
   && this.flSetVar('jICMS_motDesICMS',0) 
   && this.flSetVar('jICMSPart_orig',0) 
   && this.flSetVar('jICMSPart_CST',0) 
   && this.flSetVar('jICMSPart_modBC',0) 
   && this.flSetVar('nICMSPart_vBC','0,00') 
   && this.flSetVar('nICMSPart_pRedBC','0,00') 
   && this.flSetVar('nICMSPart_pICMS','0,00') 
   && this.flSetVar('nICMSPart_vICMS','0,00') 
   && this.flSetVar('jICMSPart_modBCST',0) 
   && this.flSetVar('nICMSPart_pMVAST','0,00') 
   && this.flSetVar('nICMSPart_pRedBCT','0,00') 
   && this.flSetVar('nICMSPart_vBCST','0,00') 
   && this.flSetVar('nICMSPart_pICMSST','0,00') 
   && this.flSetVar('nICMSPart_vICMSST','0,00') 
   && this.flSetVar('nICMSPart_pBCOp','0,00') 
   && this.flSetVar('sICMSPart_UFST','') 
   && this.flSetVar('jICMSST_orig',0) 
   && this.flSetVar('jICMSST_CST',0) 
   && this.flSetVar('nICMSST_vBCSTRet','0,00') 
   && this.flSetVar('nICMSST_vICMSSTRe','0,00') 
   && this.flSetVar('nICMSST_vBCSTDest','0,00') 
   && this.flSetVar('nICMSST_vICMSSTDes','0,00') 
   && this.flSetVar('jGrupo_simples',0) 
   && this.flSetVar('jICMSSN_Orig',0) 
   && this.flSetVar('jICMSSN_CSOSN',0) 
   && this.flSetVar('jICMSSN_modBC',0) 
   && this.flSetVar('nICMSSN_vBC','0,00') 
   && this.flSetVar('nICMSSN_pRedBC','0,00') 
   && this.flSetVar('nICMSSN_pICMS','0,00') 
   && this.flSetVar('nICMSSN_vICMS','0,00') 
   && this.flSetVar('jICMSSN_modBCST',0) 
   && this.flSetVar('nICMSSN_pMVAST','0,00') 
   && this.flSetVar('nICMSSN_pRedBCST','0,00') 
   && this.flSetVar('nICMSSN_vBCST','0,00') 
   && this.flSetVar('nICMSSN_pICMSST','0,00') 
   && this.flSetVar('nICMSSN_vICMSST','0,00') 
   && this.flSetVar('nICMSSN_pCredSN','0,00') 
   && this.flSetVar('nICMSSN_vCredICMSSN','0,00') 
   && this.flSetVar('nICMSSN_vBCSTRet','0,00') 
   && this.flSetVar('nICMSSN_vICMSSTRet','0,00') 
   && this.flSetVar('sIPI_clEnq','') 
   && this.flSetVar('sIPI_CNPJProd','') 
   && this.flSetVar('sIPI_cSelo','') 
   && this.flSetVar('nIPI_qSelo','0,00') 
   && this.flSetVar('sIPI_cEnq','') 
   && this.flSetVar('jIPINT_CST',0) 
   && this.flSetVar('nIPITrib_vBC','0,00') 
   && this.flSetVar('nIPITrib_pIPI','0,00') 
   && this.flSetVar('nIPITrib_qUnid','0,00') 
   && this.flSetVar('nIPITrib_vUnid','0,00') 
   && this.flSetVar('nIPITrib_vIPI','0,00') 
   && this.flSetVar('jPIS_CST',0) 
   && this.flSetVar('nPIS_vBC','0,00') 
   && this.flSetVar('nPIS_pPIS','0,00') 
   && this.flSetVar('nPIS_qBCProd','0,00') 
   && this.flSetVar('nPIS_vAliqProd','0,00') 
   && this.flSetVar('nPIS_vPIS','0,00') 
   && this.flSetVar('nPISST_vBC','0,00') 
   && this.flSetVar('nPISST_pPIS','0,00') 
   && this.flSetVar('nPISST_qBCProd','0,00') 
   && this.flSetVar('nPISST_vAliqProd','0,00') 
   && this.flSetVar('nPISST_vPIS','0,00') 
   && this.flSetVar('jCOFINS_CST',0) 
   && this.flSetVar('nCOFINS_vBC','0,00') 
   && this.flSetVar('nCOFINS_pCOFINS','0,00') 
   && this.flSetVar('nCOFINS_qBCProd','0,00') 
   && this.flSetVar('nCOFINS_vAliqProd','0,00') 
   && this.flSetVar('nCOFINS_vCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_vBC','0,00') 
   && this.flSetVar('nCOFINSST_pCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_qBCProd','0,00') 
   && this.flSetVar('nCOFINSST_vAliqProd','0,00') 
   && this.flSetVar('nCOFINSST_vCOFINS','0,00') 
   && this.flSetVar('nISSQN_vBC','0,00') 
   && this.flSetVar('nISSQN_vAliq','0,00') 
   && this.flSetVar('nISSQN_vISSQN','0,00') 
   && this.flSetVar('nISSQN_cMunFG','0,00') 
   && this.flSetVar('nISSQN_cListServ','0,00') 
   && this.flSetVar('jISSQN_cSitTrib',0) 
   && this.flSetVar('mInfAdProd','') 
   && this.flSetVar('nVDescInc','0,00')
   && this.flSetVar('pLote',0) 
   && this.flSetVar('fLote',0) 
   && this.flSetVar('sLote','') 
)
</exec2>
<exec3>
( 
   ( (pCapaMoe!=pMoe) 
     ? 
     (this.flSetVar('nQtMoe',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nPrBruto','0,00000'))  
     : 
     (this.flSetVar('nPrBruto',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nQtMoe','0,00000')) 
   ) 
   && this.flSetVar('nVDescCP','0,00000') 
   && this.flSetVar('nVDescTpED','0,00000') 
   && this.flSetVar('nVEncFinTpED','0,00000') 
   && this.flSetVar('nVDescTpEDG','0,00000') 
   && this.flSetVar('sMoeCambio','') 
   && this.flSetVar('pCam',0) 
   && this.flSetVar('fCam',0)
   && this.flSetVar('nCam','0,00000') 
   && this.flSetVar('sCam','') 
   && this.flSetVar('nProd_vUnCom','0,00000') 
   && this.flSetVar('nProd_vFrete','0,00') 
   && this.flSetVar('nVMLE','0,00') 
   && this.flSetVar('nProd_vSeg','0,00') 
   && this.flSetVar('nProd_vDesc','0,00000') 
   && this.flSetVar('nProd_vProd','0,00') 
   && this.flSetVar('pCFO',0) 
   && this.flSetVar('sCodCFO','') 
   && this.flSetVar('sAbrev','') 
   && this.flSetVar('fCFO',0) 
   && this.flSetVar('tEntPla','') 
   && this.flSetVar('tEmissao','') 
   && this.flSetVar('tSaida ','') 
   && this.flSetVar('sDI_nDI','') 
   && this.flSetVar('dDI_dDI','') 
   && this.flSetVar('sDI_xLocDesemb','') 
   && this.flSetVar('sDI_UFDesemb','') 
   && this.flSetVar('dDI_dDesemb','') 
   && this.flSetVar('sDI_cExportador','') 
   && this.flSetVar('nII_vBC','0,00') 
   && this.flSetVar('nII_vDespAdu','0,00') 
   && this.flSetVar('nII_vII','0,00') 
   && this.flSetVar('nII_vIOF','0,00') 
   && this.flSetVar('iAdi_nAdicao',0) 
   && this.flSetVar('iAdi_nSeqAdic',0) 
   && this.flSetVar('sAdi_cFabricante','') 
   && this.flSetVar('nAdi_vDescDI','0,00000') 
   && this.flSetVar('sAdi_xPed','') 
   && this.flSetVar('iAdi_nItemPed',0) 
   && this.flSetVar('nCIDE_qBCprod','0,00') 
   && this.flSetVar('nCIDE_vAliqProd','0,00') 
   && this.flSetVar('nCIDE_vCIDE','0,00') 
   && this.flSetVar('jICMS_GrupoTrib',0) 
   && this.flSetVar('jICMS_orig',0) 
   && this.flSetVar('jICMS_modBC',0) 
   && this.flSetVar('nICMS_pRedBC','0,00') 
   && this.flSetVar('nICMS_vBC','0,00') 
   && this.flSetVar('nICMS_pICMS','0,00') 
   && this.flSetVar('nICMS_vICMS','0,00') 
   && this.flSetVar('jICMS_modBCST',0) 
   && this.flSetVar('nICMS_pMVAST','0,00') 
   && this.flSetVar('nICMS_pRedBCST','0,00') 
   && this.flSetVar('nICMS_vBCST','0,00') 
   && this.flSetVar('nICMS_pICMSST','0,00') 
   && this.flSetVar('nICMS_vICMSST','0,00') 
   && this.flSetVar('nICMS_vBCSTRet','0,00') 
   && this.flSetVar('nICMS_vICMSSTRet','0,00') 
   && this.flSetVar('jICMS_motDesICMS',0) 
   && this.flSetVar('jICMSPart_orig',0) 
   && this.flSetVar('jICMSPart_CST',0) 
   && this.flSetVar('jICMSPart_modBC',0) 
   && this.flSetVar('nICMSPart_vBC','0,00') 
   && this.flSetVar('nICMSPart_pRedBC','0,00') 
   && this.flSetVar('nICMSPart_pICMS','0,00') 
   && this.flSetVar('nICMSPart_vICMS','0,00') 
   && this.flSetVar('jICMSPart_modBCST',0) 
   && this.flSetVar('nICMSPart_pMVAST','0,00') 
   && this.flSetVar('nICMSPart_pRedBCT','0,00') 
   && this.flSetVar('nICMSPart_vBCST','0,00') 
   && this.flSetVar('nICMSPart_pICMSST','0,00') 
   && this.flSetVar('nICMSPart_vICMSST','0,00') 
   && this.flSetVar('nICMSPart_pBCOp','0,00') 
   && this.flSetVar('sICMSPart_UFST','') 
   && this.flSetVar('jICMSST_orig',0) 
   && this.flSetVar('jICMSST_CST',0) 
   && this.flSetVar('nICMSST_vBCSTRet','0,00') 
   && this.flSetVar('nICMSST_vICMSSTRe','0,00') 
   && this.flSetVar('nICMSST_vBCSTDest','0,00') 
   && this.flSetVar('nICMSST_vICMSSTDes','0,00') 
   && this.flSetVar('jGrupo_simples',0) 
   && this.flSetVar('jICMSSN_Orig',0) 
   && this.flSetVar('jICMSSN_CSOSN',0) 
   && this.flSetVar('jICMSSN_modBC',0) 
   && this.flSetVar('nICMSSN_vBC','0,00') 
   && this.flSetVar('nICMSSN_pRedBC','0,00') 
   && this.flSetVar('nICMSSN_pICMS','0,00') 
   && this.flSetVar('nICMSSN_vICMS','0,00') 
   && this.flSetVar('jICMSSN_modBCST',0) 
   && this.flSetVar('nICMSSN_pMVAST','0,00') 
   && this.flSetVar('nICMSSN_pRedBCST','0,00') 
   && this.flSetVar('nICMSSN_vBCST','0,00') 
   && this.flSetVar('nICMSSN_pICMSST','0,00') 
   && this.flSetVar('nICMSSN_vICMSST','0,00') 
   && this.flSetVar('nICMSSN_pCredSN','0,00') 
   && this.flSetVar('nICMSSN_vCredICMSSN','0,00') 
   && this.flSetVar('nICMSSN_vBCSTRet','0,00') 
   && this.flSetVar('nICMSSN_vICMSSTRet','0,00') 
   && this.flSetVar('sIPI_clEnq','') 
   && this.flSetVar('sIPI_CNPJProd','') 
   && this.flSetVar('sIPI_cSelo','') 
   && this.flSetVar('nIPI_qSelo','0,00') 
   && this.flSetVar('sIPI_cEnq','') 
   && this.flSetVar('jIPINT_CST',0) 
   && this.flSetVar('nIPITrib_vBC','0,00') 
   && this.flSetVar('nIPITrib_pIPI','0,00') 
   && this.flSetVar('nIPITrib_qUnid','0,00') 
   && this.flSetVar('nIPITrib_vUnid','0,00') 
   && this.flSetVar('nIPITrib_vIPI','0,00') 
   && this.flSetVar('jPIS_CST',0) 
   && this.flSetVar('nPIS_vBC','0,00') 
   && this.flSetVar('nPIS_pPIS','0,00') 
   && this.flSetVar('nPIS_qBCProd','0,00') 
   && this.flSetVar('nPIS_vAliqProd','0,00') 
   && this.flSetVar('nPIS_vPIS','0,00') 
   && this.flSetVar('nPISST_vBC','0,00') 
   && this.flSetVar('nPISST_pPIS','0,00') 
   && this.flSetVar('nPISST_qBCProd','0,00') 
   && this.flSetVar('nPISST_vAliqProd','0,00') 
   && this.flSetVar('nPISST_vPIS','0,00') 
   && this.flSetVar('jCOFINS_CST',0) 
   && this.flSetVar('nCOFINS_vBC','0,00') 
   && this.flSetVar('nCOFINS_pCOFINS','0,00') 
   && this.flSetVar('nCOFINS_qBCProd','0,00') 
   && this.flSetVar('nCOFINS_vAliqProd','0,00') 
   && this.flSetVar('nCOFINS_vCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_vBC','0,00') 
   && this.flSetVar('nCOFINSST_pCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_qBCProd','0,00') 
   && this.flSetVar('nCOFINSST_vAliqProd','0,00') 
   && this.flSetVar('nCOFINSST_vCOFINS','0,00') 
   && this.flSetVar('nISSQN_vBC','0,00') 
   && this.flSetVar('nISSQN_vAliq','0,00') 
   && this.flSetVar('nISSQN_vISSQN','0,00') 
   && this.flSetVar('nISSQN_cMunFG','0,00') 
   && this.flSetVar('nISSQN_cListServ','0,00') 
   && this.flSetVar('jISSQN_cSitTrib',0) 
   && this.flSetVar('mInfAdProd','') 
   && this.flSetVar('pLote',0) 
   && this.flSetVar('fLote',0) 
   && this.flSetVar('sLote','') 
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5)) 
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec3>
<exec4>
( 
   ( 
     (pCapaMoe!=pMoe) 
     ?  
     (this.flSetVar('nQtMoe',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nPrBruto','0,00000')) 
     : 
     (this.flSetVar('nPrBruto',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nQtMoe','0,00000'))  
   ) 
   && this.flSetVar('nVDescCP','0,00000') 
   && this.flSetVar('nVDescTpED','0,00000') 
   && this.flSetVar('nVEncFinTpED','0,00000') 
   && this.flSetVar('nVDescTpEDG','0,00000') 
   && this.flSetVar('sMoeCambio','') 
   && this.flSetVar('pCam',0) 
   && this.flSetVar('fCam',0)
   && this.flSetVar('nCam','0,00000')
   && this.flSetVar('sCam','')
   && this.flSetVar('nProd_vUnCom','0,00000') 
   && this.flSetVar('nProd_vFrete','0,00') 
   && this.flSetVar('nVMLE','0,00') 
   && this.flSetVar('nProd_vSeg','0,00') 
   && this.flSetVar('nProd_vDesc','0,00000') 
   && this.flSetVar('nProd_vProd','0,00') 
   && this.flSetVar('pCFO',0) 
   && this.flSetVar('sCodCFO','') 
   && this.flSetVar('sAbrev','') 
   && this.flSetVar('fCFO',0) 
   && this.flSetVar('tEntPla','') 
   && this.flSetVar('tEmissao','') 
   && this.flSetVar('tSaida ','') 
   && this.flSetVar('sDI_nDI','') 
   && this.flSetVar('dDI_dDI','') 
   && this.flSetVar('sDI_xLocDesemb','') 
   && this.flSetVar('sDI_UFDesemb','') 
   && this.flSetVar('dDI_dDesemb','') 
   && this.flSetVar('sDI_cExportador','') 
   && this.flSetVar('nII_vBC','0,00') 
   && this.flSetVar('nII_vDespAdu','0,00') 
   && this.flSetVar('nII_vII','0,00') 
   && this.flSetVar('nII_vIOF','0,00') 
   && this.flSetVar('iAdi_nAdicao',0) 
   && this.flSetVar('iAdi_nSeqAdic',0) 
   && this.flSetVar('sAdi_cFabricante','') 
   && this.flSetVar('nAdi_vDescDI','0,00000') 
   && this.flSetVar('sAdi_xPed','') 
   && this.flSetVar('iAdi_nItemPed',0) 
   && this.flSetVar('nCIDE_qBCprod','0,00') 
   && this.flSetVar('nCIDE_vAliqProd','0,00') 
   && this.flSetVar('nCIDE_vCIDE','0,00') 
   && this.flSetVar('jICMS_GrupoTrib',0) 
   && this.flSetVar('jICMS_orig',0) 
   && this.flSetVar('jICMS_modBC',0) 
   && this.flSetVar('nICMS_pRedBC','0,00') 
   && this.flSetVar('nICMS_vBC','0,00') 
   && this.flSetVar('nICMS_pICMS','0,00') 
   && this.flSetVar('nICMS_vICMS','0,00') 
   && this.flSetVar('jICMS_modBCST',0) 
   && this.flSetVar('nICMS_pMVAST','0,00') 
   && this.flSetVar('nICMS_pRedBCST','0,00') 
   && this.flSetVar('nICMS_vBCST','0,00') 
   && this.flSetVar('nICMS_pICMSST','0,00') 
   && this.flSetVar('nICMS_vICMSST','0,00') 
   && this.flSetVar('nICMS_vBCSTRet','0,00') 
   && this.flSetVar('nICMS_vICMSSTRet','0,00') 
   && this.flSetVar('jICMS_motDesICMS',0) 
   && this.flSetVar('jICMSPart_orig',0) 
   && this.flSetVar('jICMSPart_CST',0) 
   && this.flSetVar('jICMSPart_modBC',0) 
   && this.flSetVar('nICMSPart_vBC','0,00') 
   && this.flSetVar('nICMSPart_pRedBC','0,00') 
   && this.flSetVar('nICMSPart_pICMS','0,00') 
   && this.flSetVar('nICMSPart_vICMS','0,00') 
   && this.flSetVar('jICMSPart_modBCST',0) 
   && this.flSetVar('nICMSPart_pMVAST','0,00') 
   && this.flSetVar('nICMSPart_pRedBCT','0,00') 
   && this.flSetVar('nICMSPart_vBCST','0,00') 
   && this.flSetVar('nICMSPart_pICMSST','0,00') 
   && this.flSetVar('nICMSPart_vICMSST','0,00') 
   && this.flSetVar('nICMSPart_pBCOp','0,00') 
   && this.flSetVar('sICMSPart_UFST','') 
   && this.flSetVar('jICMSST_orig',0) 
   && this.flSetVar('jICMSST_CST',0) 
   && this.flSetVar('nICMSST_vBCSTRet','0,00') 
   && this.flSetVar('nICMSST_vICMSSTRe','0,00') 
   && this.flSetVar('nICMSST_vBCSTDest','0,00') 
   && this.flSetVar('nICMSST_vICMSSTDes','0,00') 
   && this.flSetVar('jGrupo_simples',0) 
   && this.flSetVar('jICMSSN_Orig',0) 
   && this.flSetVar('jICMSSN_CSOSN',0) 
   && this.flSetVar('jICMSSN_modBC',0) 
   && this.flSetVar('nICMSSN_vBC','0,00') 
   && this.flSetVar('nICMSSN_pRedBC','0,00') 
   && this.flSetVar('nICMSSN_pICMS','0,00') 
   && this.flSetVar('nICMSSN_vICMS','0,00') 
   && this.flSetVar('jICMSSN_modBCST',0) 
   && this.flSetVar('nICMSSN_pMVAST','0,00') 
   && this.flSetVar('nICMSSN_pRedBCST','0,00') 
   && this.flSetVar('nICMSSN_vBCST','0,00') 
   && this.flSetVar('nICMSSN_pICMSST','0,00') 
   && this.flSetVar('nICMSSN_vICMSST','0,00') 
   && this.flSetVar('nICMSSN_pCredSN','0,00') 
   && this.flSetVar('nICMSSN_vCredICMSSN','0,00') 
   && this.flSetVar('nICMSSN_vBCSTRet','0,00') 
   && this.flSetVar('nICMSSN_vICMSSTRet','0,00') 
   && this.flSetVar('sIPI_clEnq','') 
   && this.flSetVar('sIPI_CNPJProd','') 
   && this.flSetVar('sIPI_cSelo','') 
   && this.flSetVar('nIPI_qSelo','0,00') 
   && this.flSetVar('sIPI_cEnq','') 
   && this.flSetVar('jIPINT_CST',0) 
   && this.flSetVar('nIPITrib_vBC','0,00') 
   && this.flSetVar('nIPITrib_pIPI','0,00') 
   && this.flSetVar('nIPITrib_qUnid','0,00') 
   && this.flSetVar('nIPITrib_vUnid','0,00') 
   && this.flSetVar('nIPITrib_vIPI','0,00') 
   && this.flSetVar('jPIS_CST',0) 
   && this.flSetVar('nPIS_vBC','0,00') 
   && this.flSetVar('nPIS_pPIS','0,00') 
   && this.flSetVar('nPIS_qBCProd','0,00') 
   && this.flSetVar('nPIS_vAliqProd','0,00') 
   && this.flSetVar('nPIS_vPIS','0,00') 
   && this.flSetVar('nPISST_vBC','0,00') 
   && this.flSetVar('nPISST_pPIS','0,00') 
   && this.flSetVar('nPISST_qBCProd','0,00') 
   && this.flSetVar('nPISST_vAliqProd','0,00') 
   && this.flSetVar('nPISST_vPIS','0,00') 
   && this.flSetVar('jCOFINS_CST',0) 
   && this.flSetVar('nCOFINS_vBC','0,00') 
   && this.flSetVar('nCOFINS_pCOFINS','0,00') 
   && this.flSetVar('nCOFINS_qBCProd','0,00') 
   && this.flSetVar('nCOFINS_vAliqProd','0,00') 
   && this.flSetVar('nCOFINS_vCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_vBC','0,00') 
   && this.flSetVar('nCOFINSST_pCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_qBCProd','0,00') 
   && this.flSetVar('nCOFINSST_vAliqProd','0,00') 
   && this.flSetVar('nCOFINSST_vCOFINS','0,00') 
   && this.flSetVar('nISSQN_vBC','0,00') 
   && this.flSetVar('nISSQN_vAliq','0,00') 
   && this.flSetVar('nISSQN_vISSQN','0,00') 
   && this.flSetVar('nISSQN_cMunFG','0,00') 
   && this.flSetVar('nISSQN_cListServ','0,00') 
   && this.flSetVar('jISSQN_cSitTrib',0) 
   && this.flSetVar('mInfAdProd','') 
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5)) 
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec4>
<exec5>
( 
 this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec5>
<exec6>
( 
 this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec6>
<exec7>
(
      this.flSetVar('sMoeCambio','') 
   && this.flSetVar('pCam','0') 
   && this.flSetVar('nCam','0,00000') 
   && this.flSetVar('fCam','0') 
   && this.flSetVar('sCam','') 
   && this.flSetVar('nVDescCP','0,00000') 
   && this.flSetVar('nVDescTpED','0,00000') 
   && this.flSetVar('nVEncFinTpED','0,00000') 
   && this.flSetVar('nVDescTpEDG','0,00000') 
   && this.flSetVar('nQtMoe','0,00000') 
   && this.flSetVar('nProd_vUnCom','0,00000')
)
</exec7>
<exec8>
(
      this.flSetVar('nPrBruto',fsReplaceDecimalPoint((nQtMoe*nCam),".",",",5)) 
   && this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDFin),".",",",5)) 
   && this.flSetVar('nVDescTpED',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDescFin),".",",",5)) 
   && this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nPDescTpEDG),".",",",5)) 
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nQtMoe*nCam)-(nVDescInc+((nQtMoe*nCam)/100*(nDFin))+((nQtMoe*nCam)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5)) 
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nQtMoe*nCam)-(nVDescInc+((nQtMoe*nCam)/100*(nDFin))+((nQtMoe*nCam)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec8>
<exec9>
(
      this.flSetVar('nPrBruto',fsReplaceDecimalPoint((nQtMoe*nCam),".",",",5) ) 
   && this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDFin),".",",",5)) 
   && this.flSetVar('nVDescTpED',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDescFin),".",",",5))
   && this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nPDescTpEDG),".",",",5)) 
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint(((nQtMoe*nCam))-(nVDescInc+(((nQtMoe*nCam))/100*(nDFin))+(((nQtMoe*nCam))/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint(((((nQtMoe*nCam))-(nVDescInc+(((nQtMoe*nCam))/100*(nDFin))+(((nQtMoe*nCam))/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
   )
</exec9>
<exec10>
(
      this.flSetVar('nVDescInc',fsReplaceDecimalPoint(((nPrBruto)/100*nPDescInc),".",",",5))
   && this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin),".",",",5)) 
   && this.flSetVar('nVDescTpED',fsReplaceDecimalPoint((nPrBruto/100*nDescFin),".",",",5))
   && this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint((nPrBruto/100*nPDescTpEDG),".",",",5)) 
   && this.flSetVar('nVDescLog',fsReplaceDecimalPoint((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec10>
<exec11>
(
   this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec11>
<exec11a>
(
   this.flSetVar('nVDescInc',fsReplaceDecimalPoint(((nPrBruto)/100*nPDescInc),".",",",5))
   && this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin),".",",",5)) 
   && this.flSetVar('nVDescLog',fsReplaceDecimalPoint((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec11a>
<exec12>
(
      this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec12>
<exec13>
( 
 this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec13>
<exec14>
(
   this.flSetVar('nVDescLog',fsReplaceDecimalPoint(((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec14>
<esc1>
(
 'dd_files/erp_PTOpED_Item.dda',
 'Esc_Padrao_1',
 'sRegCodItem,pTOper,pEmi,pDest,pOrdem,pDestDefault',
 '
  pPTOpEDItem,
  fPTOpEDItem,
  pItem,
  fItem,
  sRegCodItem,
  sRegDesItem,
  sEAN,sGTIN,
  jICMS_Orig,
  pUni,
  fUni,
  sCodUni,
  sUni,
  pNCM,
  fNCM,
  sCodNCM,
  sDesNCM,
  jFDiasEnt,
  iDiasInf,
  iDiasCalc,
  lInspecao,
  nPDescTpEDG,
  jCam,
  sMoe,
  pMoe,
  fMoe,
  lCCusto,
  lCrtlItem,
  stmp,
  nPEncFinTpED,
  lContQua,
  nQtMin,
  nQtMax,
  lContPreco,
  nPrecoMin,
  nPrecoMax,
  iCiclo,
  iCicloAtual,
  lSkipLote,
  stmp,
  pRegDepVen,
  fRegDepVen,
  pDep,
  pUFis,
  sUn1,
  sUn2,
  sUn3,
  sUn4,
  sUn5,
  sUn6,
  sUn7,
  sIns,
  pRegDepRFis,
  fRegDepRFis,
  pDepRFis,
  pUFisRFis,
  sUn1RFis,
  sUn2RFis,
  sUn3RFis,
  sUn4RFis,
  sUn5RFis,
  sUn6RFis,
  sUn7RFis,
  sInsRFis,
  jFinalidade,
  nAliqTranspImport,
  nAliqTranspNac,
  sCEST,
  pRegDepTransf,
  fRegDepTransf,
  pDepTransf,
  pUFisTransf,
  sUnTransf1,
  sUnTransf2,
  sUnTransf3,
  sUnTransf4,
  sUnTransf5,
  sUnTransf6,
  sUnTransf7,
  sInsTransf,
  iLote,
  jTempo,
  pDepInsp,
  fDepInsp,
  sUn1Insp,
  sUn2Insp,
  sUn3Insp,
  sUn4Insp,
  sUn5Insp,
  sUn6Insp,
  sUn7Insp,
  pDepReje,
  fDepReje,
  sUn1Reje,
  sUn2Reje,
  sUn3Reje,
  sUn4Reje,
  sUn5Reje,
  sUn6Reje,
  sUn7Reje,
  dUltInsp,
  pInsp,
  fInsp,  
  lInt,
  pTmp1_{1},
  pCCusto_{1},
  fCCusto_{1},
  sCCusto_{1},
  nRatCCusto_{1},
  pTmp2_{2},
  pCContCred_{2},
  fCContCred_{2},
  sCodCredPla_{2},
  sDesCredPla_{2},
  nRatCredCCont_{2},
  pTmp3_{3},
  pCContDeb_{3},
  fCContDeb_{3},
  sCodDebPla_{3},
  sDesDebPla_{3},
  nRatDebCCont_{3}
 '
)
</esc1>
<esc2>
(
 'dd_files/erp_PTOpED_Item.dda',
 'Esc_Padrao_2',
 'sNegCodItem,pTOper,pEmi,pDest,pOrdem',
 '
  pPTOpEDItem,
  fPTOpEDItem,
  pItem,
  fItem,
  sNegCodItem,
  sRegDesItem,
  sEAN,
  sGTIN,
  jICMS_Orig,
  pUni,
  fUni,
  sCodUni,
  sUni,
  pNCM,
  fNCM,
  sCodNCM,
  sDesNCM,
  jFDiasEnt,
  iDiasInf,
  iDiasCalc,
  lInspecao,
  nPDescTpEDG,
  sTmp,
  nPrBruto,
  jCam,
  sMoe,
  pMoe,
  fMoe,
  lCCusto,
  lCrtlItem,
  nPEncFinTpED,
  lContQua,
  nQtMin,
  nQtMax,
  lContPreco,
  nPrecoMin,
  nPrecoMax,
  iCiclo,
  iCicloAtual,
  lSkipLote,
  stmp,
  pRegDepVen,
  fRegDepVen,
  pDep,
  pUFis,
  sUn1,
  sUn2,
  sUn3,
  sUn4,
  sUn5,
  sUn6,
  sUn7,
  sIns,
  pRegDepRFis,
  fRegDepRFis,
  pDepRFis,
  pUFisRFis,
  sUn1RFis,
  sUn2RFis,
  sUn3RFis,
  sUn4RFis,
  sUn5RFis,
  sUn6RFis,
  sUn7RFis,
  sInsRFis,
  jFinalidade,
  nAliqTranspImport,
  nAliqTranspNac,
  sCEST,
  pRegDepTransf,
  fRegDepTransf,
  pDepTransf,
  pUFisTransf,
  sUnTransf1,
  sUnTransf2,
  sUnTransf3,
  sUnTransf4,
  sUnTransf5,
  sUnTransf6,
  sUnTransf7,
  sInsTransf,
  iLote,
  jTempo,
  pDepInsp,
  fDepInsp,
  sUn1Insp,
  sUn2Insp,
  sUn3Insp,
  sUn4Insp,
  sUn5Insp,
  sUn6Insp,
  sUn7Insp,
  pDepReje,
  fDepReje,
  sUn1Reje,
  sUn2Reje,
  sUn3Reje,
  sUn4Reje,
  sUn5Reje,
  sUn6Reje,
  sUn7Reje,
  dUltInsp,
  pInsp,
  fInsp,  
  lInt,
  pTmp1_{1},
  pCCusto_{1},
  fCCusto_{1},
  sCCusto_{1},
  nRatCCusto_{1},
  pTmp2_{2},
  pCContCred_{2},
  fCContCred_{2},
  sCodCredPla_{2},
  sDesCredPla_{2},
  nRatCredCCont_{2},
  pTmp3_{3},
  pCContDeb_{3},
  fCContDeb_{3},
  sCodDebPla_{3},
  sDesDebPla_{3},
  nRatDebCCont_{3}
 '
)   
</esc2>
<esc3>
(
 'dd_files/erp_PTOpED_Item.dda',
 'Esc_Padrao_3',
 'sTabCodItem,pTOper,pEmi,pDest,pOrdem',
 '
  pPTOpEDItem,
  fPTOpEDItem,
  pTab,
  fTab,
  pTabI,
  fTabI,
  pItem,
  fItem,
  sTabCodItem,
  sRegDesItem,
  sCodTab,
  sDesTab,
  sEAN,
  sGTIN,
  jICMS_Orig,
  pUni,
  fUni,
  sCodUni,
  sUni,
  pNCM,
  fNCM,
  sCodNCM,
  sDesNCM,
  jFDiasEnt,
  iDiasInf,
  iDiasCalc,
  lInspecao,
  nPDescTpEDG,
  sTmp,
  nPrBruto,
  jCam,
  sMoe,
  pMoe,
  fMoe,
  lCCusto,
  lCrtlItem,
  nPEncFinTpED,
  lContQua,
  nQtMin,
  nQtMax,
  lContPreco,
  nPrecoMin,
  nPrecoMax,
  iCiclo,
  iCicloAtual,
  lSkiLote,
  stmp,
  pRegDepVen,
  fRegDepVen,
  pDep,
  pUFis,
  sUn1,
  sUn2,
  sUn3,
  sUn4,
  sUn5,
  sUn6,
  sUn7,
  sIns,
  pRegDepRFis,
  fRegDepRFis,
  pDepRFis,
  pUFisRFis,
  sUn1RFis,
  sUn2RFis,
  sUn3RFis,
  sUn4RFis,
  sUn5RFis,
  sUn6RFis,
  sUn7RFis,
  sInsRFis,
  jFinalidade,
  nAliqTranspImport,
  nAliqTranspNac,
  sCEST,
  pRegDepTransf,
  fRegDepTransf,
  pDepTransf,
  pUFisTransf,
  sUnTransf1,
  sUnTransf2,
  sUnTransf3,
  sUnTransf4,
  sUnTransf5,
  sUnTransf6,
  sUnTransf7,
  sInsTransf,
  iLote,
  jTempo,
  pDepInsp,
  fDepInsp,
  sUn1Insp,
  sUn2Insp,
  sUn3Insp,
  sUn4Insp,
  sUn5Insp,
  sUn6Insp,
  sUn7Insp,
  pDepReje,
  fDepReje,
  sUn1Reje,
  sUn2Reje,
  sUn3Reje,
  sUn4Reje,
  sUn5Reje,
  sUn6Reje,
  sUn7Reje,
  dUltInsp,
  pInsp,
  fInsp,  
  lInt,
  pTmp1_{1},
  pCCusto_{1},
  fCCusto_{1},
  sCCusto_{1},
  nRatCCusto_{1},
  pTmp2_{2},
  pCContCred_{2},
  fCContCred_{2},
  sCodCredPla_{2},
  sDesCredPla_{2},
  nRatCredCCont_{2},
  pTmp3_{3},
  pCContDeb_{3},
  fCContDeb_{3},
  sCodDebPla_{3},
  sDesDebPla_{3},
  nRatDebCCont_{3}
 '
)
</esc3>

--//--

Tempo 5-27/11/2025 17:32:14
psTagDDS=Padrao_1
fsTratarIncAltSeq-inicio
fsTratarIncAltSeq-fim
Tempo 6-27/11/2025 17:32:14
psVarTmp=
iTmp=0
Tempo 7-27/11/2025 17:32:14
psVarTmp no  um JSON
Tempo 8-27/11/2025 17:32:14
explode
sVarsDDA=$sTagTit = 'Tit1';
$sTagCpoTit = 'CpoTit1';
$sTagCpo = 'Cpo1';
$sTagSql = 'Sql1';
$sTagSqlSum = 'SqlSum1';
$sTagMainTable = 'Ordens_Itens';
$sTagMenu = 'Menu1';
$sTagNr0 = 'Nr02';
$sTagTipoNr0 = 'TipoNr02';
$sTagToolsBar = 'Incluir,Excluir,Alterar,Zoom,Pesquisar';
$sTagPesquisar = 'Pesquisar1';
$sTagMarcacao = 'true';
$sTagDbToVars = 'DbToVars1';
$sTagVarsDef = 'VarsDefault1';
$sTagScript = 'ScriptForm1';
$sTagVarsToServer = 'VarsToServer1';
$sTagVarsToDb = 'VarsToDb1';
$sTagServerVal = 'ServerValids1';
$sTagTitulo = 'TelaTit1';
$sLabelsAlign = 'Left';
$sTagPodeIncluir = 'PodeIncluir1';
$sTagPodeExcluir = 'PodeExcluir1';
$sTagPodeAlterar = 'PodeAlterar1';
$sTagOnSave = 'flOnSave(56,{ChaveAtual_1})';
$sTagSubGrid = '1,2,3';

sTagMainTable=Ordens_Itens
sTagSql=Sql1, psPesquisarFull=
psQry=
sSearch=
Tempo 9-27/11/2025 17:32:14
sTagTit=Tit1
1) sTitGrid=Itens da Ordem [{this.oPai.aGrid[this.oPai.iArray][1]}]
---dd_files/erp_ORDENS_Itens.dda / Padrao_1
Tempo 10-27/11/2025 17:32:14
sCpo='js.this.flMarcado('.$aLin["PPID"].')'
2)sAlias=
sCpo=$aLin["PPID"] .'/'. $aLin["ISERIAL"] . '<br> IS: ' . $aLin[strtoupper('pISRegFis')] . '<br> IBSUF: ' . $aLin[strtoupper('pRegFisIBS')] . '<br> IBSMun: ' . $aLin[strtoupper('pRegFisIBSMun')] . '<br> CBS: ' . $aLin[strtoupper('pRegFisCBS')]
2)sAlias=
sCpo='<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
2)sAlias=
sCpo='<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
2)sAlias=
sCpo=$aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
2)sAlias=
sCpo='<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
2)sAlias=
sCpo=number_format($aLin["NPRBRUTO"],2,",",".")
2)sAlias=
sCpo='<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
2)sAlias=
sCpo=number_format($aLin["NPROD_VUNCOM"],5,",",".")
2)sAlias=
sCpo='<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
2)sAlias=
sCpo=number_format($aLin["NPROD_VPROD"],2,",",".")
2)sAlias=
sCpo=$aLin["PPID"]
2)sAlias=
sAliasColunas=~~~~~~~~~~~
Tempo 11-27/11/2025 17:32:14
x) sTagSql=Sql1
sQry=  select a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = {ChaveAtual_1}   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial
sTxt=<Padrao_1>   
   sTagTit          = Tit1
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Incluir,Excluir,Alterar,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagMarcacao     = true
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1>
<Padrao_1a>   
   sTagTit          = Tit1a
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1a
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1a>
<Padrao_1b>   
   sTagTit          = Tit1b
   sTagCpoTit       = CpoTit1
   sTagCpo          = Cpo1b
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1b
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Alterar,Excluir,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1b>
<Padrao_1c>   
   sTagTit          = Tit1b
   sTagCpoTit       = CpoTit1c
   sTagCpo          = Cpo1c
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1b
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Alterar,Excluir,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1c>
<Padrao_1d>   
   sTagTit          = Tit1a
   sTagCpoTit       = CpoTit1d
   sTagCpo          = Cpo1d
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1d
   sTagNr0          = Nr01
   sTagTipoNr0      = TipoNr01
   sTagToolsBar     = Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1d>
<Padrao_1e>   
   sTagTit          = Tit1e
   sTagCpoTit       = CpoTit1e
   sTagCpo          = Cpo1e
   sTagSql          = Sql1e
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1a
   sTagNr0          = Nr01
   sTagTipoNr0      = TipoNr01
   sTagToolsBar     = Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_1e>
<Padrao_2>   
   sTagTit          = Tit2
   sTagCpoTit       = CpoTit2
   sTagCpo          = Cpo2
   sTagSql          = Sql2
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu2
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_2>
<Padrao_3>   
   sTagTit          = Tit3
   sTagCpoTit       = CpoTit3
   sTagCpo          = Cpo3
   sTagSql          = Sql3
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu1
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Incluir,Excluir,Alterar,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault3
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_3>
<Padrao_4>   
   sTagTit          = Tit1
   sTagCpoTit       = CpoTit2
   sTagCpo          = Cpo2
   sTagSql          = Sql1
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu4
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagMarcacao     = true
   sTagToolsBar     = Incluir,Excluir,Alterar,Zoom,Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_4>
<Padrao_5>   
   sTagTit          = Tit5
   sTagCpoTit       = CpoTit5
   sTagCpo          = Cpo5
   sTagSql          = Sql5
   sTagSqlSum       = SqlSum1
   sTagMainTable    = Ordens_Itens
   sTagMenu         = Menu5
   sTagNr0          = Nr02
   sTagTipoNr0      = TipoNr02
   sTagToolsBar     = Pesquisar
   sTagPesquisar    = Pesquisar1
   sTagDbToVars     = DbToVars1       
   sTagVarsDef      = VarsDefault1
   sTagScript       = ScriptForm1    
   sTagVarsToServer = VarsToServer1  
   sTagVarsToDb     = VarsToDb1      
   sTagServerVal    = ServerValids1  
   sTagTitulo       = TelaTit1
   sLabelsAlign     = Left
   sTagPodeIncluir  = PodeIncluir1
   sTagPodeExcluir  = PodeExcluir1
   sTagPodeAlterar  = PodeAlterar1
   sTagOnSave       = flOnSave(56,{ChaveAtual_1})
   sTagSubGrid      = 1,2,3
</Padrao_5>
<Esc_Padrao_1>
   sTagMnemTDoc     = Ordens_Itens
   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>
<Esc_Padrao_2>
   sTagMnemTDoc     = Ordens_Itens
   sTagTit          = Esc_Tit2
   sTagCpoTit       = Esc_CpoTit2
   sTagCpo          = Esc_Cpo2
   sTagSql          = Esc_Sql2
   sTagSqlEscVars   = Esc_SqlVars2
   sTagNr0          = Nr01
   sTagTipoNr0      = TipoNr01
   sTagCpoEscVars   = Esc_VarsServerToClient2
   sTagToolsBar     = Pesquisar
</Esc_Padrao_2>
<Tit1>Itens da Ordem [{this.oPai.aGrid[this.oPai.iArray][1]}]</Tit1>
<Tit1a>Itens da Ordem [{this.oPai.aGrid[this.oPai.iArray][0]}]</Tit1a>
<Tit2>Servios a Faturar da Ordem [{this.oPai.aGrid[this.oPai.iArray][2]}]</Tit2>
<Tit3>Itens do Pedido [{this.oPai.aGrid[this.oPai.iArray][2]}]</Tit3>
<Tit1b>Itens da Ordem [{this.oPai.aGrid[this.oPai.iArray][0]}]</Tit1b>
<Tit5>Detalhamentos</Tit5>
<Tit1e>Histrico de Quantidades Agendadas Parcialmente</Tit1e>
<CpoTit1>
   -l
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -s-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit1>
<Cpo1>
   'js.this.flMarcado('.$aLin["PPID"].')'
   $aLin["PPID"] .'/'. $aLin["ISERIAL"] . '<br> IS: ' . $aLin[strtoupper('pISRegFis')] . '<br> IBSUF: ' . $aLin[strtoupper('pRegFisIBS')] . '<br> IBSMun: ' . $aLin[strtoupper('pRegFisIBSMun')] . '<br> CBS: ' . $aLin[strtoupper('pRegFisCBS')]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
</Cpo1>
<CpoTit1c>
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -s-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit1c>
<Cpo1c>
   $aLin["PPID"] .'/'. $aLin["ISERIAL"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
</Cpo1c>
<Cpo1b>
   $aLin["PPID"] .'/'. $aLin["ISERIAL"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
   $aLin["PORDEM"]
   $aLin["SCODITEM"]
</Cpo1b>
<CpoTit2>
   -l-20
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-n-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-n-12-5
   -s-12-5       ; 
   Vl.Total-n-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit2>
<Cpo2>
   'js.this.flMarcado('.$aLin["PPID"].')'
   $aLin["PPID"]                                       
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   $aLin["NPRBRUTO"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   $aLin["NPROD_VPROD"]
   $aLin["PPID"]
   'js.this.flMarcadosIgualAoOriginal('.$aLin["PITEM"].')'
</Cpo2>
<CpoTit1d>
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -s-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit1d>
<Cpo1d>
   $aLin["PPID"] .'/'. $aLin["ISERIAL"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Origem</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQTAGE"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Saldo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr></table>' 
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
</Cpo1d>
<CpoTit1e>
   Pedido-s-10
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -s-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit1e>
<Cpo1e>
   $aLin["PORDEM"]
   $aLin["PPID"] .'/'. $aLin["ISERIAL"]
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>' 
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
</Cpo1e>
<expcpo1>
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>'
</expcpo1>
<expcpo2>
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
</expcpo2>
<expcpo3>
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_">
       <tr>
          <td style="text-align: left"><b>Qt Origem</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td>
          <td><b>' . number_format($aLin["NQTAGE"],5,",",".") . '</b></td>
       </tr>
       <tr>
          <td style="text-align: left"><b>Saldo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td>
          <td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td>
       </tr>
    </table>'
</expcpo3>
<Sql1>
   select a.iSerial,
          a.jTipo,
          a.pPId,
          a.pOrdem,
          a.nQt,
          a.nQtRes,
          a.nQtLib,
          a.nQtEnt,
          a.nQtOP,
          a.nQtCanc,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.jProd_indTot,
          a.jOrig,
          a.nPrBruto,
          b.sCodigo     sCodItem,
          b.sDescricao  sItem,
          c.sCodigo    sCodUni,
          c.sUnidade   sDesUni,
          c.jDec,
          a.nQtAge,
          a.nProd_vFrete,
          a.nProd_vSeg,
          a.nProd_vOutro,
          a.pMoe,
          k.sDescricao      sMoe,
          a.fMoe,
          a.nQtMoe,
          a.jCam,
          a.pCam,
          a.fCam,
          kk1.sDescricao  sMoeCambio,
          a.nCam,
          a.sCam,
          a.nVDescTpED,
          a.nVDescTpEDG,
          a.nVEncFinTpED,
          a.nVDescInc,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          d.jTipo jEntSai,
          a.pISRegFis,
          a.pRegFisIBS,
          a.pRegFisIBSMun,
          a.pRegFisCBS,
          a.pItem
   from Ordens_Itens  a    left join Moeda         k   on a.pMoe    = k.pPId   and k.iVer   = k.iVAt
                           left join Cambio        kk  on a.pCam    = kk.pPId  and kk.iVer  = kk.iVAt
                           left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and kk1.iVer = kk1.iVAt
                           left join NCM           g   on a.pNCM    = g.pPId   and g.iVer   = a.fNCM
                           left join UnidadeMedida c   on a.pUni   = c.pPId and c.iVer  = c.iVAt,
        Itens         b,
        Ordens        d
   where a.lExc   = 0  
     and a.iVer   = a.iVAt
     and a.pOrdem = {ChaveAtual_1}
     and a.pOrdem = d.pPId and d.iVer  = d.iVAt
     and a.pItem  = b.pPId and b.iVer  = a.fItem
   order by a.iSerial
</Sql1>
<Sql1e>
   select a.iSerial,
          a.jTipo,
          a.pPId,
          a.pOrdem,
          a.nQt,
          a.nQtRes,
          a.nQtLib,
          a.nQtEnt,
          a.nQtOP,
          a.nQtCanc,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.jProd_indTot,
          a.jOrig,
          a.nPrBruto,
          b.sCodigo     sCodItem,
          b.sDescricao  sItem,
          c.sCodigo    sCodUni,
          c.sUnidade   sDesUni,
          c.jDec,
          a.nQtAge,
          a.nProd_vFrete,
          a.nProd_vSeg,
          a.nProd_vOutro,
          a.pMoe,
          k.sDescricao      sMoe,
          a.fMoe,
          a.nQtMoe,
          a.jCam,
          a.pCam,
          a.fCam,
          kk1.sDescricao  sMoeCambio,
          a.nCam,
          a.sCam,
          a.nVDescTpED,
          a.nVDescTpEDG,
          a.nVEncFinTpED,
          a.nVDescInc,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          d.jTipo jEntSai,
          a.pItem
   from Ordens_Itens  a    left join Moeda         k   on a.pMoe    = k.pPId   and k.iVer   = k.iVAt
                           left join Cambio        kk  on a.pCam    = kk.pPId  and kk.iVer  = kk.iVAt
                           left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and kk1.iVer = kk1.iVAt
                           left join NCM           g   on a.pNCM    = g.pPId   and g.iVer   = a.fNCM
                           left join UnidadeMedida c   on a.pUni   = c.pPId and c.iVer  = c.iVAt,
        Itens         b,
        Ordens        d
   where a.lExc   = 0  
     and a.iVer   = a.iVAt
     and a.pOSaIAgePai = {ChaveAtual_1}
     and a.pOrdem = d.pPId and d.iVer  = d.iVAt
     and a.pItem  = b.pPId and b.iVer  = a.fItem
   order by a.iSerial
</Sql1e>
<CpoTit2>
   -l
   Codigo-s-30            ; b.sCodigo
   Servio-s-30           ; b.sDescricao
</CpoTit2>
<Cpo2>
   'js.this.flMarcado('.$aLin["PPID"].')'
   $aLin["SCODIGO"]
   $aLin["SDESCRICAO"]
   $aLin["PPID"]
</Cpo2>
<Sql2>
   select a.pPId,
          b.sCodigo,
          b.sDescricao,
          a.pItem
   from Ordens_Itens  a,
        Itens         b
   where a.lExc   = 0  
     and a.iVer   = a.iVAt
     and a.pOrdem = {ChaveIrma_1_12}
     and a.pItem  = b.pPId and b.iVer = a.fItem
   order by b.sCodigo
</Sql2>
<CpoTit3>
   -p-10
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   Vl.Total-n-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit3>
<Cpo3>
   $aLin["PPID"]                                       
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],5,",",".")
   $aLin["NPROD_VPROD"]
   $aLin["PPID"]
   $aLin["PITEM"]
</Cpo3>
<Sql3>
   select a.iSerial,
          a.jTipo,
          a.pPId,
          a.nQt,
          a.pItem,
          a.nQtEnt,
          a.nQtOP,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.jProd_indTot,
          a.jOrig,
          a.nPrBruto,
          b.sCodigo     sCodItem,
          b.sDescricao  sItem,
          c.sCodigo    sCodUni,
          c.sUnidade   sDesUni,
          c.jDec,
          a.nProd_vFrete,
          a.nProd_vSeg,
          a.nProd_vOutro,
          a.pMoe,
          k.sDescricao      sMoe,
          a.fMoe,
          a.nQtMoe,
          a.jCam,
          a.pCam,
          a.fCam,
          kk1.sDescricao  sMoeCambio,
          a.nCam,
          a.sCam,
          a.nVDescTpED,
          a.nVDescTpEDG,
          a.nVEncFinTpED,
          a.nVDescInc,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          d.jTipo jEntSai
   from Ordens_Itens  a    left join Moeda         k   on a.pMoe    = k.pPId   and k.iVer   = k.iVAt
                           left join Cambio        kk  on a.pCam    = kk.pPId  and kk.iVer  = kk.iVAt
                           left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and kk1.iVer = kk1.iVAt
                           left join NCM           g   on a.pNCM    = g.pPId   and g.iVer   = a.fNCM
                           left join UnidadeMedida c   on a.pUni     = c.pPId and c.iVer  = c.iVAt,
        Itens         b,
        Ordens        d
   where a.lExc   = 0  
     and a.iVer   = a.iVAt
     and a.pOrdem = {ChaveAtual_1}
     and a.pOrdem = d.pPId and d.iVer  = d.iVAt
     and a.pItem  = b.pPId and b.iVer  = a.fItem
     and a.pUni   = c.pPId and c.iVer  = c.iVAt
   order by a.iSerial
</Sql3>
<Sql4>
   select a.iSerial,
          a.jTipo,
          a.pPId,
          a.nQt,
          a.nQtRes,
          a.nQtLib,
          a.nQtEnt,
          a.nQtOP,
          a.nQtCanc,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.jProd_indTot,
          a.jOrig,
          a.nPrBruto,
          b.sCodigo     sCodItem,
          b.sDescricao  sItem,
          c.sCodigo    sCodUni,
          c.sUnidade   sDesUni,
          c.jDec,
          a.nProd_vFrete,
          a.nProd_vSeg,
          a.nProd_vOutro,
          a.pMoe,
          k.sDescricao      sMoe,
          a.fMoe,
          a.nQtMoe,
          a.jCam,
          a.pCam,
          a.fCam,
          kk1.sDescricao  sMoeCambio,
          a.nCam,
          a.sCam,
          a.nVDescTpED,
          a.nVDescTpEDG,
          a.nVEncFinTpED,
          a.nVDescInc,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          d.jTipo jEntSai,
          a.pItem
   from Ordens_Itens  a    left join Moeda         k   on a.pMoe    = k.pPId   and k.iVer   = k.iVAt
                           left join Cambio        kk  on a.pCam    = kk.pPId  and kk.iVer  = kk.iVAt
                           left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and kk1.iVer = kk1.iVAt
                           left join NCM           g   on a.pNCM    = g.pPId   and g.iVer   = a.fNCM
                           left join UnidadeMedida c   on a.pUni   = c.pPId and c.iVer  = c.iVAt,
        Itens         b,
        Ordens        d
   where a.lExc   = 0  
     and a.iVer   = a.iVAt
     and a.pOrdem = {ChaveAtual_1}
     and a.pOrdem = d.pPId and d.iVer  = d.iVAt
     and a.pItem  = b.pPId and b.iVer  = a.fItem
   order by a.iSerial
</Sql4>
<CpoTit5>
   Ordem-p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -n-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -n-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -n-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial
</CpoTit5>
<Cpo5>
   $aLin["PORDEM"] 
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>'
    $aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>'
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>'
   number_format($aLin["NPRBRUTO"],2,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>'
   number_format($aLin["NPROD_VUNCOM"],5,",",".")
   '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>'
   number_format($aLin["NPROD_VPROD"],2,",",".")
   $aLin["PPID"]
</Cpo5>
<Sql5>
   select a.iSerial,
          a.pOrdem,
          a.jTipo,
          a.pPId,
          a.nQt,
          a.nQtRes,
          a.nQtLib,
          a.nQtEnt,
          a.nQtOP,
          a.nQtCanc,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.jProd_indTot,
          a.jOrig,
          a.nPrBruto,
          b.sCodigo     sCodItem,
          b.sDescricao  sItem,
          c.sCodigo    sCodUni,
          c.sUnidade   sDesUni,
          c.jDec,
          a.nProd_vFrete,
          a.nProd_vSeg,
          a.nProd_vOutro,
          a.pMoe,
          k.sDescricao      sMoe,
          a.fMoe,
          a.nQtMoe,
          a.jCam,
          a.pCam,
          a.fCam,
          kk1.sDescricao  sMoeCambio,
          a.nCam,
          a.sCam,
          a.nVDescTpED,
          a.nVDescTpEDG,
          a.nVEncFinTpED,
          a.nVDescInc,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          d.jTipo jEntSai,
          a.pItem
   from  ORDENS_Consolidar_Detalhamentos   aa  join Ordens_Itens  a   on aa.pItem  = a.pItem  and a.iVer   = a.iVAt and a.lExc = 0 and a.pOrdem = aa.pOrdemDet
                                               join Itens         b   on a.pItem   = b.pPId   and b.iVer   = a.fItem
                                               join Ordens        d   on a.pOrdem  = d.pPId   and d.iVer   = d.iVAt
                                          left join Moeda         k   on a.pMoe    = k.pPId   and k.iVer   = k.iVAt
                                          left join Cambio        kk  on a.pCam    = kk.pPId  and kk.iVer  = kk.iVAt
                                          left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and kk1.iVer = kk1.iVAt
                                          left join NCM           g   on a.pNCM    = g.pPId   and g.iVer   = a.fNCM
                                          left join UnidadeMedida c   on a.pUni    = c.pPId and c.iVer     = c.iVAt
   where aa.lExc   = 0  
     and aa.iVer   = aa.iVAt
     and aa.pOrdemConsol = {ChaveIrma_1_0}
     and b.sCodigo = '{ChaveIrma_1_1}'
   order by a.iSerial
</Sql5>
<Pesquisar1>
   ((upper(b.sCodigo) like '%{p0}%') or (upper(b.sDescricao) like '%{p0}%') or (upper(g.sCodigo) like '%{p0}%') or (upper(g.sDescricao) like '%{p0}%'))
</Pesquisar1>
<Menu1>
   main1 ; Alterar Valor [UN] Bruto (marcados)   ; flRangeProcesso("dd_files/erp_ORDENS_Itens_AltPrecoMarcados.dda","Processo_1","processos/ORDENS_Itens_AltPrecoMarcados.php",this.oPai)
   main1 ; CTR                                   ; flGrid(this.oPai,'dd_files/erp_ORDENS_Itens_CTR.dda','Padrao_2')
   main1 ; Tabela de Preo                       ; flGrid(this.oPai,'dd_files/erp_POLITICAS_TabPrecos_Itens.dda','Padrao_3')
   main1 ; Tabela de Preo Promocional           ; flGrid(this.oPai,'dd_files/erp_POLITICAS_TabPrecos_ExcTQ_GrpPromo.dda','Padrao_2')
</Menu1>
<Menu1a>
</Menu1a>
<Menu1b>
   main1 ; Detalhamento dos Itens          ; flGrid(this.oPai,'dd_files/erp_ORDENS_Itens.dda','Padrao_5')
</Menu1b>
<Menu1d>
   main1 ; Histrico de Quantidades Agendadas Parcialmente  ; flGrid(this.oPai,'dd_files/erp_ORDENS_Itens.dda','Padrao_1e')
</Menu1d>
<Menu2>
   main1 ; Anexar Servios marcados ; flCallSysPOP(1219,this.oPai,'',this.oPai.fiChaveAtual())
</Menu2>
<Menu4>
   main1 ; Gerar Recebimento Fragmentado    ;  flCallSysPOP(1138,this.oPai,'Gerar Recebimento dos itens marcados?'   ,this.oPai.fiChaveAtual())
   main1 ; Excluir Itens Marcados           ;  flCallSysPOP(1014,this.oPai,'Excluir Itens Marcados?'   ,this.oPai.fiChaveAtual())
</Menu4>
<Menu5>
</Menu5>
<Nr01>alert("Qtux-Dialog\n\nNada a relacionar ...")</Nr01>
<Nr02>oGrid.flGridInc()</Nr02>
<TipoNr01>0</TipoNr01>
<TipoNr02>1</TipoNr02>
<Esc_Tit1>Item: [{p5}]  -  Qt: [{p4}]  -  Un: [{p3}] </Esc_Tit1>
<Esc_CpoTit1>
   Ordem Id-i-10
   Unidade da Ordem-s-30
   Saldo da Ordem-n-18-5
   Fator-n-18-5
   Saldo Convertido-n-18-5      
</Esc_CpoTit1>
<Esc_Cpo1>
   $aLin["PORDEM"]
   $aLin["SUNIORDEM"]
   $aLin["NQTPEND"]
   $aLin["PUNIORDEM"]==$aLin["PUNIPRENF"] ? 1  :($aLin["NFATOR"]==0 ? 'Sem Fator' : $aLin["NFATOR"])
   $aLin["PUNIORDEM"]==$aLin["PUNIPRENF"] ? $aLin["NQTPEND"] : $aLin["NQTPEND2"]
   $aLin["PPID"]
</Esc_Cpo1>
<Esc_Sql1>
   select  a.pPId,
           a.pOrdem,
           d.sCodigo    sCodItem,
           d.sDescricao sItem,
           e.pPId       pUniOrdem,
           e.sUnidade   sUniOrdem,
           f.pPId       pUniPreNF,
           f.sUnidade   sUniRFis,
           g.nFator,  
           g.nFator*(a.nQt-a.nQtEnt) nQtPend2,
          (a.nQt-a.nQtEnt) nQtPend
   from Ordens_Itens      a,
        Ordens            b,
        PreNF             c,
        Itens             d,
        UnidadeMedida     e  left join Conversao_UnidadeMedida g on  g.iver=g.ivat and ((g.pUni1 = e.pPId and g.pUni2 = {p2}) or (g.pUni1 = {p2} and g.pUni2 =  e.pPId)),
        UnidadeMedida     f
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pItem   = {p1}
     and a.pItem   = d.pPId and d.iVer = a.fItem
     and a.pUni    = e.pPId and e.iVer = e.iVAt
     and f.pPId    = {p2}   and f.iVer = f.iVAt
     and a.pOrdem  = b.pPId and b.iVer = b.iVAt
     and b.jTipo   = 0
     and b.tConf   is not null
     and c.pPId    = {ChaveAtual_2} and c.iVer = c.iVAt
     and b.pDest   = c.pDest
     and b.pEmi    = c.pEmi
     and (a.nQt-a.nQtEnt) > 0
     and a.lBaixa  = 0
   order by pOrdem
</Esc_Sql1>
<Esc_SqlVars1>
   select a.pPId,
          a.iVer,
          a.pOrdem
   from Ordens_Itens    a
   where a.pPId = {pEscId}
     and a.iVer = a.iVAt
</Esc_SqlVars1>
<Esc_VarsServerToClient1>
   $aLin["PPID"]
   $aLin["IVER"]
   $aLin["PORDEM"]
</Esc_VarsServerToClient1>
<Esc_Tit2>Itens da Ordem, resultado da busca por [{p0}]</Esc_Tit2>
<Esc_CpoTit2>
   Ordem Id-i-10
   No. Doc Origem-s-20
   Cdigo-s-20
   Item-s-50
   Saldo a Produzir-n-18-5
</Esc_CpoTit2>
<Esc_Cpo2>
   $aLin["PORDEM"]
   $aLin["SDOC"]
   $aLin["SCODITEM"]
   $aLin["SITEM"]
   $aLin["NSDOPROD"]
   $aLin["PPID"]
</Esc_Cpo2>
<Esc_Sql2>
   select  a.pPId,
           a.pOrdem,
           b.sDoc,
           d.sCodigo    sCodItem,
           d.sDescricao sItem,
           a.nQt-a.nQtOP nSdoProd
   from Ordens_Itens      a,
        Ordens            b,
        Itens             d
   where a.iVer    = a.iVAt
     and a.lExc    = 0
     and b.pDest   = {p1}
     and b.pEmi    = {p2}
     and a.pItem   = d.pPId and d.iVer = d.iVAt
     and a.pOrdem  = b.pPId and b.iVer = b.iVAt
     and b.jTipo   = 1
     and b.tConf is null
   order by pOrdem
</Esc_Sql2>
<Esc_SqlVars2>
   select  a.pPId,
           a.iVer,
           a.iVAt,
           b.sDoc,
           a.pOrdem,
           a.pItem,
           a.fItem,
           d.sCodigo    sCodItem,
           d.sDescricao sItem,
           c.sCodigo sUnProd,
           d.pRegDepProd,
           e3.sUFis sUn1Prod,
           f3.sUFis sUn2Prod,
           g3.sUFis sUn3Prod,
           h3.sUFis sUn4Prod,
           i3.sUFis sUn5Prod,
           j3.sUFis sUn6Prod,
           k3.sUFis sUn7Prod,
           l3.sDescricao sInsProd
   from Ordens_Itens      a,
        Ordens            b,
        Itens             d   left join EST_RegDepositos  o on d.pRegDepProd  = o.pPId  and  o.iVer =  o.iVAt
                              left join EST_Depositos     r on o.pDep         = r.pPId  and  r.iVer =  r.iVAt
                              left join UFis             e3 on r.pUFis        = e3.pPId and e3.iVer = e3.iVAt
                              left join UFis             f3 on e3.pParent     = f3.pPId and f3.iVer = f3.iVAt
                              left join UFis             g3 on f3.pParent     = g3.pPId and g3.iVer = g3.iVAt
                              left join UFis             h3 on g3.pParent     = h3.pPId and h3.iVer = h3.iVAt
                              left join UFis             i3 on h3.pParent     = i3.pPId and i3.iVer = i3.iVAt
                              left join UFis             j3 on i3.pParent     = j3.pPId and j3.iVer = j3.iVAt
                              left join UFis             k3 on j3.pParent     = k3.pPId and k3.iVer = k3.iVAt
                              left join EST_Instancias   l3 on  o.pIns        = l3.pPId and l3.iVer = l3.iVAt
                              left join UnidadeMedida     c on  d.pUnProd     = c.pPId  and c.iVer=c.iVAt
   where a.pPId = {pEscId}
     and a.iVer    = a.iVAt
     and a.lExc    = 0
     and a.pItem   = d.pPId and d.iVer = d.iVAt
     and a.pOrdem  = b.pPId and b.iVer = b.iVAt
     and b.jTipo   = 1
   order by pOrdem
</Esc_SqlVars2>
<Esc_VarsServerToClient2>
   $aLin["PPID"]
   $aLin["IVER"]
   $aLin["PITEM"]
   $aLin["FITEM"]
   $aLin["SCODITEM"]
   $aLin["SITEM"]
   $aLin["SUNPROD"]
   $aLin["PREGDEPPROD"]
   $aLin["SUN1PROD"]
   $aLin["SUN2PROD"]
   $aLin["SUN3PROD"]
   $aLin["SUN4PROD"]
   $aLin["SUN5PROD"]
   $aLin["SUN6PROD"]
   $aLin["SUN7PROD"]
   $aLin["SINSPROD"]
   $aLin["PORDEM"]
   $aLin["SDOC"]
</Esc_VarsServerToClient2>
<TelaTit1>
   Ficha da Linha da Ordem 
</TelaTit1>
<DbToVars1> 
   select a.tInc,
          a.iVer,
          a.iVAt,
          a.pPId,
          a.iSerial,
          a.nQt,
          a.nQt nQtPed,
          a.nQtRes,
          a.nQtEnt,
          a.nQtLib,
          a.nQtFat,
          a.nQtCanc,
          (a.nQt-a.nQtEnt-a.nQtCanc) nQtPend,
          a.nQtCarga,         
          a.lBaixa,
          a.pRegFis,
          a.fRegFis,
          a.pNeg,
          a.fNeg,
          a.pTab,
          r.sCodigo     sCodTab,
          r.sDescricao  sDesTab,
          a.fTab,
          a.pTabI,
          a.fTabI,
          a.nProd_vUnCom,
          a.nProd_vProd,
          a.nProd_vFrete,
          a.nVMLE,
          a.nProd_vSeg,
          a.nProd_vDesc,
          a.nProd_vOutro,
          a.jProd_indTot,
          a.sDI_nDI,               
          a.dDI_dDI,                
          a.sDI_xLocDesemb,        
          a.sDI_UFDesemb,           
          a.dDI_dDesemb,             
          a.sDI_cExportador,
          a.iAdi_nAdicao,          
          a.iAdi_nSeqAdic,         
          a.sAdi_cFabricante,      
          a.nAdi_vDescDI,          
          a.sAdi_xPed,             
          a.iAdi_nItemPed,
          a.nCIDE_qBCprod, 
          a.nCIDE_vAliqProd,
          a.nCIDE_vCIDE,
          a.jICMS_GrupoTrib,
          a.jICMS_orig,
          a.jICMS_modBC,
          a.nICMS_vBC,
          a.nICMS_pICMS,
          a.nICMS_vICMS,
          a.jICMS_modBCST,
          a.nICMS_pMVAST,
          a.nICMS_pRedBCST,
          a.nICMS_vBCST,
          a.nICMS_pICMSST,
          a.nICMS_vICMSST,
          a.nICMS_pRedBC,
          a.jICMS_motDesICMS,
          a.nICMS_vBCSTRet,
          a.nICMS_vICMSSTRet,
          a.jICMSPart_orig,
          a.jICMSPart_CST,
          a.jICMSPart_modBC,
          a.nICMSPart_vBC,
          a.nICMSPart_pRedBC,
          a.nICMSPart_pICMS,
          a.nICMSPart_vICMS,
          a.jICMSPart_modBCST,
          a.nICMSPart_pMVAST,
          a.nICMSPart_pRedBCT,
          a.nICMSPart_vBCST,
          a.nICMSPart_pICMSST,
          a.nICMSPart_vICMSST,
          a.nICMSPart_pBCOp,
          a.sICMSPart_UFST,
          a.jICMSST_orig,
          a.jICMSST_CST,
          a.nICMSST_vBCSTRet,
          a.nICMSST_vICMSSTRe,
          a.nICMSST_vBCSTDest,
          a.nICMSST_vICMSSTDes,
          a.jGrupo_simples,    
          a.jICMSSN_Orig,
          a.jICMSSN_CSOSN,
          a.nICMSSN_pCredSN,
          a.nICMSSN_vCredICMSSN,
          a.jICMSSN_modBCST,
          a.nICMSSN_pMVAST,
          a.nICMSSN_pRedBCST,
          a.nICMSSN_vBCST,
          a.nICMSSN_pICMSST,
          a.nICMSSN_vICMSST,
          a.nICMSSN_vBCSTRet,
          a.nICMSSN_vICMSSTRet,
          a.jICMSSN_modBC,
          a.nICMSSN_vBC,
          a.nICMSSN_pRedBC,
          a.nICMSSN_pICMS,
          a.nICMSSN_vICMS,
          a.sIPI_clEnq,
          a.sIPI_CNPJProd,
          a.sIPI_cSelo,
          a.nIPI_qSelo,
          a.sIPI_cEnq,
          a.jIPINT_CST,
          a.nIPITrib_vBC,
          a.nIPITrib_pIPI,
          a.nIPITrib_qUnid,
          a.nIPITrib_vUnid,
          a.nIPITrib_vIPI,
          a.nII_vBC,
          a.nII_vDespAdu,
          a.nII_vII,
          a.nII_vIOF,
          a.jPIS_CST,  
          a.nPIS_vBC,
          a.nPIS_pPIS,
          a.nPIS_vPIS,
          a.nPIS_qBCProd, 
          a.nPIS_vAliqProd, 
          a.nPISST_vBC,
          a.nPISST_pPIS,
          a.nPISST_qBCProd,
          a.nPISST_vAliqProd,
          a.nPISST_vPIS,
          a.jCOFINS_CST,
          a.nCOFINS_vBC,
          a.nCOFINS_pCOFINS,
          a.nCOFINS_vCOFINS,
          a.nCOFINS_qBCProd,
          a.nCOFINS_vAliqProd,
          a.nCOFINSST_vBC,
          a.nCOFINSST_pCOFINS,
          a.nCOFINSST_qBCProd,
          a.nCOFINSST_vAliqProd,
          a.nCOFINSST_vCOFINS,
          a.nISSQN_vBC,
          a.nISSQN_vAliq,
          a.nISSQN_vISSQN,
          a.nISSQN_cMunFG,
          a.nISSQN_cListServ,
          a.jISSQN_cSitTrib,
          a.sInfAdProd,
          a.jTipo,
          a.tEntPla,
          a.tEmissao,
          a.tSaida,
          a.pItem,
          a.fItem,
          c.sCodigo     sRegCodItem,
          c.sDescricao  sRegDesItem,
          c.sCodigo     sNegCodItem,
          c.sDescricao  sNegDesItem,
          c.sCodigo     sTabCodItem,
          c.sDescricao  sTabDesItem,
          n.sCEST,
          c.lLote  iLote,
          a.pUni,
          a.fUni,
          e.sCodigo      sCodUni,
          e.sUnidade    sUni,
          a.pNCM,   
          a.fNCM,
          g.sCodigo     sCodNCM,
          g.sDescricao  sDesNCM,
          a.pCFO,   
          a.fCFO,
          h.sCodigo     sCodCFO,
          h.sAbrev,
          a.pLote,
          ii.sDescricao  sDesLote,
          a.fLote,
          a.jFDiasEnt,
          a.iDiasInf,
          a.iDiasCalc,
          a.lInspecao,
          a.nDesc,
          a.pIPIRegFis,
          a.pICMSRegFis,        
          a.pICMSSNRegFis,        
          a.pICMSPartRegFis,        
          a.pICMSSTRetRegFis,
          a.pISSQNRegFis,       
          a.pIRPJRegFis,        
          a.pCofinsRegFis,      
          a.pPISRegFis,         
          a.pCofinsSTRegFis,    
          a.pPISSTRegFis,       
          a.pIIRegFis,
          a.fIIRegFis,
          a.fIPIRegFis,         
          a.fICMSRegFis,        
          a.fICMSSNRegFis,        
          a.fICMSPartRegFis,        
          a.fICMSSTRetRegFis,
          a.fISSQNRegFis,       
          a.fIRPJRegFis,        
          a.fCofinsRegFis,      
          a.fPISRegFis,         
          a.fCofinsSTRegFis,    
          a.fPISSTRegFis,       
          a.pPTOpEDItem,
          a.fPTOpEDItem,
          a.pPTOpEDGrpItem,
          a.fPTOpEDGrpItem,
          a.nPrBruto,
          a.nPDescCP,     
          a.nVDescCP,     
          a.nPDescTpED,   
          a.nVDescTpED,   
          a.nVEncFinTpED,   
          a.nPDescTpEDG,  
          a.nVDescTpEDG,  
          a.nPDescInc,    
          a.nVDescInc,    
          a.nProd_pDesc,  
          a.pMoe,    
          k.sDescricao      sMoe,
          a.fMoe,    
          a.nQtMoe,  
          a.jCam,
          a.pCam,
          a.fCam,    
          kk1.sDescricao  sMoeCambio,
          a.nCam,    
          a.sCam,    
          a.lCCusto,
          a.lCrtlItem,
          a.jOrig,
          a.jBC_II,
          a.jBC_IPI,
          a.jBC_ICMS,
          a.jBC_ICMSST,
          a.jBC_PIS,
          a.jBC_COFINS,
          a.jBC_ISS,
          a.jVl_ICMSST,
          a.jVl_ICMS,
          a.nBC_II,
          a.nBC_IPI,
          a.nBC_ICMS,
          a.nBC_ICMSST,
          a.nBC_PIS,
          a.nBC_COFINS,
          a.nBC_ISS,
          a.nVl_ICMSST,
          a.nVl_ICMS,
          a.nICMS_vICMSSubstituto,
          a.nICMS_pRedBCEfet,
          a.nICMS_vBCEfet,
          a.nICMS_pICMSEfet,
          a.nICMS_vICMSEfet,
          a.nICMS_vICMSSTRet,
          a.nPEncFinTpED,
          a.nQtMin,     
          a.nQtMax,      
          a.nPrecoMin,  
          a.nPrecoMax,   
          a.lContQua,    
          a.lContPreco,  
          a.iCiclo,      
          a.iCicloAtual, 
          a.jTempo,      
          a.lSkipLote,
          a.pRegDepVen,
          a.fRegDepVen,
          b1.pDep,
          bb.pUFis,
          e1.sUFis      sUn1,
          f1.sUFis      sUn2,
          g1.sUFis      sUn3,
          h1.sUFis      sUn4,
          i1.sUFis      sUn5,
          j1.sUFis      sUn6,
          k1.sUFis      sUn7,
          l1.sDescricao sIns,
          c1.sCodigo    sUnidade,
          a.pRegDepRFis,
          a.fRegDepRFis,
          b2.pDep       pDepRFis,
          bbb.pUFis      pUFisRFis,
          e2.sUFis      sUn1RFis,
          f2.sUFis      sUn2RFis,
          g2.sUFis      sUn3RFis,
          h2.sUFis      sUn4RFis,
          i2.sUFis      sUn5RFis,
          j2.sUFis      sUn6RFis,
          k2.sUFis      sUn7RFis,
          l2.sDescricao sInsRFis,
          c2.sCodigo    sUnidadeRFis,
          a.pRegDepTransf,
          a.fRegDepTransf,
          b3.pDep        pDepTransf,
          bb3.pUFis      pUFisTransf,
          e3.sUFis       sUnTransf1,
          f3.sUFis       sUnTransf2,
          g3.sUFis       sUnTransf3,
          h3.sUFis       sUnTransf4,
          i3.sUFis       sUnTransf5,
          j3.sUFis       sUnTransf6,
          k3.sUFis       sUnTransf7,
          l3.sDescricao  sInsTransf,
          m3.sCodigo     sUnidadeTransf,
          a.lImport,
          a.lImposImpor,
          a.lAdicoes,
          a.lCIDE,   
          a.lICMS_ST,    
          a.lICMS_P,   
          a.lICMS_RR,   
          a.lICMS_SN,
          a.lIPI,       
          a.lPIS,    
          a.lPIS_ST,    
          a.lCofins, 
          a.lCofins_ST,
          a.lISSQN,
          a.lTranspFiscal,
          a.sFCI,
          a.jFinalidade,
          a.nAliqTranspImport,
          a.nAliqTranspNac,
          a.nTot_vTrib,
          a.jDI_tpViaTransp,
          a.nDI_vAFRMM,
          a.jDI_tpIntermedio,
          a.sDI_CNPJ,
          a.sDI_UFTerceiro,
          a.nImp_vTotTrib,
          a.nICMS_vICMSDeson,
          a.nICMS_vICMSOp,
          a.nICMS_pDif,
          a.nICMS_vICMSDif,
          a.nISSQN_vDeducao,
          a.nISSQN_vOutro,
          a.nISSQN_vDescIncond,
          a.nISSQN_vDescCond,
          a.nISSQN_vISSRet,
          a.jISSQN_indISS,
          a.sISSQN_cServico,
          a.sISSQN_nProcesso,
          a.lISSQN_indIncentivo,
          a.pISSQN_cServico,
          m.sCodigo       sISSQN_cServico,
          m.sDescricao    sISSQN_sServico,
          a.fISSQN_cServico,
          a.pISSQN_cMun,
          j.sCidade   sISSQN_sMun,
          j.iIBGE     sISSQN_cMun,
          a.pISSQN_cPais,
          l.sDescricao  sISSQN_sPais,
          l.sCodigo     sISSQN_cPais,
          a.fISSQN_cMun,
          a.fISSQN_cPais,
          a.nVBCUFDest,
          a.nPFCPUFDest,
          a.nPICMSUFDest,
          a.nPICMSInter,
          a.nPICMSInterPart,
          a.nVFCPUFDest,
          a.nVICMSUFDest,
          a.nVICMSUFRemet,
          a.pMotAltPed,
          s.sCodigo     sCodMotAltPed,
          s.sDescricao  sDesMotAltPed,
          s.sCodigo     sCodMotAltPe2,
          s.sDescricao  sDesMotAltPe2,
          a.fMotAltPed,
          a.pTabGrpP,  
          a.fTabGrpP,  
          a.pTabGrpPI,
          a.fTabGrpPI,
          a.lRE,
          a.lIPI_RE,
          a.lIPI_UT,
          a.tUltInsp  dUltInsp,
          a.pInsp,
          a.fInsp,
          a.pDepInsp,
          a.fDepInsp,
          e4.sUFis sUn1Insp,
          f4.sUFis sUn2Insp,
          g4.sUFis sUn3Insp,
          h4.sUFis sUn4Insp,
          i4.sUFis sUn5Insp,
          j4.sUFis sUn6Insp,
          k4.sUFis sUn7Insp,
          a.pDepReje,
          a.fDepReje,
          e5.sUFis sUn1Reje,
          f5.sUFis sUn2Reje,
          g5.sUFis sUn3Reje,
          h5.sUFis sUn4Reje,
          i5.sUFis sUn5Reje,
          j5.sUFis sUn6Reje,
          k5.sUFis sUn7Reje,
          a.pDepEnt,
          e6.sUFis sUn1Ent,
          f6.sUFis sUn2Ent,
          g6.sUFis sUn3Ent,
          h6.sUFis sUn4Ent,
          i6.sUFis sUn5Ent,
          j6.sUFis sUn6Ent,
          k6.sUFis sUn7Ent,
          a.pInsEnt,
          l6.sDescricao sInsEnt,
          a.nCTR_VlCalcI,
          e.lInt,
          a.nVTCI,
          a.nICMS_vBCFCP,
          a.nICMS_pFCP,
          a.nICMS_vFCP,
          a.nICMS_vBCFCPST,
          a.nICMS_pFCPST,
          a.nICMS_vFCPST,
          a.nICMS_vBCFCPSTRet,
          a.nICMS_pFCPSTRet,
          a.nICMS_vFCPSTRet,
          a.nICMSSN_pFCPST,
          a.nICMSSN_vFCPST,
          a.nICMSSN_vBCFCPST,
          a.nICMSSN_pFCPSTRet,
          a.nICMSSN_vFCPSTRet,
          a.nICMSSN_vBCFCPSTRet,
          a.nVBCFCPUFDest,
          a.nVDescLog,
          a.pCBenef,
          t.sCBenef,
          a.nVAcresCRTOsa,
          a.nPAcresCRTOsa,
          a.sProd_EX_TIPI,
          a.nIS_pIS,
          a.nIS_pISEspec,
          a.nIBSCBS_vBC,
          a.nIBSUF_pIBSUF,
          a.nIBSUF_pDif,
          a.nIBSUF_pRedAliq,
          a.nIBSUF_pAliqEfet,
          a.nIBSMun_pIBSMun,
          a.nIBSMun_pDif,
          a.nIBSMun_pRedAliq,
          a.nIBSMun_pAliqEfet,
          a.nIBSCBS_vIBS,
          a.nCBS_pCBS,
          a.nCBS_pDif,
          a.nCBS_pRedAliq,
          a.nCBS_pAliqEfet,
          a.nCBS_vDevTrib,
          a.nTribReg_pAliqEfetRegIBSUF,
          a.nTribReg_pAliqEfetRegIBSMun,
          a.nTribReg_pAliqEfetRegCBS,
          a.jIBSCP_cCredPres,
          a.nIBSCP_pCredPres,
          a.jCBSCP_cCredPres,
          a.nCBSCP_pCredPres,
          a.nTribCG_pAliqIBSUF,
          a.nTribCG_pAliqIBSMun,
          a.nTribCG_pAliqCBS,
          a.nIBSCBS_adRemIBS,
          a.nIBSCBS_adRemCBS,
          a.nIBSCBS_adRemIBSReten,
          a.nIBSCBS_adRemCBSReten,
          a.nIBSCBS_adRemIBSRet,
          a.nIBSCBS_vIBSMonoRet,
          a.nIBSCBS_adRemCBSRet,
          a.nIBSCBS_pDifIBS,
          a.nIBSCBS_pDifCBS,
          a.nTransfCred_vIBS,
          a.nTransfCred_vCBS,
          a.jIBSCBS_tpCredPresIBSZFM,
          a.pISRegFis,
          a.fISRegFis,
          a.sIS_CSTIS,
          a.sIS_CodCSTIS,
          a.sIS_ClassTribIS,
          a.pIBSCBSRegFis,
          a.fIBSCBSRegFis,
          a.sIBSCBS_CST,
          a.sIBSCBS_CodCST,
          a.sIBSCBS_ClassTrib,
          a.sTribReg_CodCSTReg,
          a.sTribReg_cClassTribReg,
          a.lImpSel,
          a.lIBSCBS,
          a.nIS_vBCIS,
          a.sIS_uTrib,
          a.nIS_qTrib,
          a.nIS_vIS,
          a.nIBSUF_vIBSUF,
          a.nIBSUF_vDif,
          a.nIBSUF_vDevTrib,
          a.nIBSMun_vDif,
          a.nIBSMun_vDevTrib,
          a.nIBSMun_vIBSMun,
          a.nCBS_vDif,
          a.nCBS_vCBS,
          a.nTribReg_vTribRegIBSUF,
          a.nTribReg_vTribRegIBSMun,
          a.nTribReg_vTribRegCBS,
          a.nIBSCP_vCredPres,
          a.nIBSCP_vCredPresCondSus,
          a.nIBSCBS_vIBSMono,
          a.nIBSCBS_vCBSMono,
          a.nIBSCBS_qBCMonoReten,
          a.nIBSCBS_vIBSMonoReten,
          a.nIBSCBS_vCBSMonoReten,
          a.nIBSCBS_qBCMonoRet,
          a.nIBSCBS_vCBSMonoRet,
          a.nIBSCBS_vIBSMonoDif,
          a.nIBSCBS_vCBSMonoDif,
          a.nIBSCBS_vTotIBSMonItem,
          a.nIBSCBS_vTotCBSMonItem,
          a.pRegFisIBS,     
          a.fRegFisIBS,  
          a.pRegFisIBSMun,  
          a.fRegFisIBSMun,
          a.pRegFisCBS,     
          a.fRegFisCBS,
          z.sCoringa
   from   Ordens_Itens   a left join Ordens        i   on a.pOrdem           = i.pPId and i.iVer = i.iVAt
                           left join Itens         c   on a.pItem            = c.pPId and c.iVer = a.fItem
                           left join UnidadeMedida e   on a.pUni             = e.pPId and ((i.tConf is null and e.iVer = e.iVAt) or (i.tConf is not null and e.iVer=a.fUni)) 
                           left join NCM           g   on a.pNCM             = g.pPId and ((i.tConf is null and g.iVer = g.iVAt) or (i.tConf is not null and g.iVer=a.fNCM))
                           left join CFO           h   on a.pCFO             = h.pPId and h.iVer = h.iVAt
                           left join NCM_CodCEST      n on c.pNCMCodCEST  = n.pPId  and  n.iVer =  n.iVAt
                           left join Moeda         k   on a.pMoe             = k.pPId and ((i.tConf is null and k.iVer = k.iVAt) or (i.tConf is not null and k.iVer=a.fMoe))
                           left join Cidades       j   on a.pISSQN_cMun      = j.pPId and ((i.tConf is null and j.iVer = j.iVAt) or (i.tConf is not null and j.iVer=a.fISSQN_cMun))
                           left join Paises        l   on a.pISSQN_cPais     = l.pPId and ((i.tConf is null and l.iVer = l.iVAt) or (i.tConf is not null and l.iVer=a.fISSQN_cPais))
                           left join TipoServico   m   on a.pISSQN_cServico  = m.pPId and ((i.tConf is null and m.iVer = m.iVAt) or (i.tConf is not null and m.iVer=a.fISSQN_cServico))
                           left join TabPrecos     r   on a.pTab             = r.pPId and ((i.tConf is null and r.iVer = r.iVAt) or (i.tConf is not null and r.iVer=a.fTab))
                           left join MotivoAltPedidosClientes     s   on a.pMotAltPed = s.pPId and s.iVer=s.iVAt 
                           left join Cambio        kk  on a.pCam    = kk.pPId  and ((i.tConf is null and kk.iVer = kk.iVAt) or (i.tConf is not null and kk.iVer=a.fCam))
                           left join Moeda         kk1 on kk.pMoe2  = kk1.pPId and ((i.tConf is null and kk1.iVer = kk1.iVAt) or (i.tConf is not null and kk1.iVer=a.fCam))
                           left join LotesItens    ii  on a.pLote   =  ii.pPId and ((i.tConf is null and ii.iVer = ii.iVAt) or (i.tConf is not null and ii.iVer=a.fLote))
                           left join UF_CBenef      t on a.pCBenef  = t.pPId  and  t.iVer =  t.iVAt
                           left join EST_RegDepositos   b1 on a.pRegDepVen     = b1.pPId    and b1.iVer = b1.iVAt 
                           left join EST_Depositos      bb on b1.pDep          = bb.pPId    and bb.iVer = bb.iVAt
                           left join UFis               e1 on bb.pUFis         = e1.pPId    and e1.iVer = e1.iVAt
                           left join UFis               f1 on e1.pParent       = f1.pPId    and f1.iVer = f1.iVAt
                           left join UFis               g1 on f1.pParent       = g1.pPId    and g1.iVer = g1.iVAt
                           left join UFis               h1 on g1.pParent       = h1.pPId    and h1.iVer = h1.iVAt
                           left join UFis               i1 on h1.pParent       = i1.pPId    and i1.iVer = i1.iVAt
                           left join UFis               j1 on i1.pParent       = j1.pPId    and j1.iVer = j1.iVAt
                           left join UFis               k1 on j1.pParent       = k1.pPId    and k1.iVer = k1.iVAt
                           left join EST_Instancias     l1 on b1.pIns          = l1.pPId    and l1.iVer = l1.iVAt
                           left join UnidadeMedida      c1 on b1.pUni          = c1.pPId    and c1.iVer = c1.iVAt
                           left join EST_RegDepositos   b2  on a.pRegDepRFis    = b2.pPId    and b2.iVer = b2.iVAt 
                           left join EST_Depositos      bbb on b2.pDep          = bbb.pPId   and bbb.iVer = bbb.iVAt
                           left join UFis               e2  on bbb.pUFis        = e2.pPId    and e2.iVer = e2.iVAt
                           left join UFis               f2  on e2.pParent       = f2.pPId    and f2.iVer = f2.iVAt
                           left join UFis               g2  on f2.pParent       = g2.pPId    and g2.iVer = g2.iVAt
                           left join UFis               h2  on g2.pParent       = h2.pPId    and h2.iVer = h2.iVAt
                           left join UFis               i2  on h2.pParent       = i2.pPId    and i2.iVer = i2.iVAt
                           left join UFis               j2  on i2.pParent       = j2.pPId    and j2.iVer = j2.iVAt
                           left join UFis               k2  on j2.pParent       = k2.pPId    and k2.iVer = k2.iVAt
                           left join EST_Instancias     l2  on b2.pIns          = l2.pPId    and l2.iVer = l2.iVAt
                           left join UnidadeMedida      c2  on b2.pUni          = c2.pPId    and c2.iVer = c2.iVAt
                           left join EST_RegDepositos   b3  on a.pRegDepTransf  = b3.pPId     and b3.iVer = b3.iVAt 
                           left join EST_Depositos      bb3 on b3.pDep          = bb3.pPId    and bb3.iVer = bb3.iVAt
                           left join UFis                e3 on bb3.pUFis        =  e3.pPId    and  e3.iVer =  e3.iVAt
                           left join UFis                f3 on e3.pParent       =  f3.pPId    and  f3.iVer =  f3.iVAt
                           left join UFis                g3 on f3.pParent       =  g3.pPId    and  g3.iVer =  g3.iVAt
                           left join UFis                h3 on g3.pParent       =  h3.pPId    and  h3.iVer =  h3.iVAt
                           left join UFis                i3 on h3.pParent       =  i3.pPId    and  i3.iVer =  i3.iVAt
                           left join UFis                j3 on i3.pParent       =  j3.pPId    and  j3.iVer =  j3.iVAt
                           left join UFis                k3 on j3.pParent       =  k3.pPId    and  k3.iVer =  k3.iVAt
                           left join EST_Instancias      l3 on b3.pIns          =  l3.pPId    and  l3.iVer =  l3.iVAt
                           left join UnidadeMedida       m3 on b3.pUni          =  m3.pPId    and  m3.iVer =  m3.iVAt 
                           left join EST_Depositos       c4 on  a.pDepInsp      = c4.pPId     and  c4.iVer = c4.iVAt 
                           left join UFis                e4 on c4.pUFis         = e4.pPId     and  e4.iVer = e4.iVAt
                           left join UFis                f4 on e4.pParent       = f4.pPId     and  f4.iVer = f4.iVAt
                           left join UFis                g4 on f4.pParent       = g4.pPId     and  g4.iVer = g4.iVAt
                           left join UFis                h4 on g4.pParent       = h4.pPId     and  h4.iVer = h4.iVAt
                           left join UFis                i4 on h4.pParent       = i4.pPId     and  i4.iVer = i4.iVAt
                           left join UFis                j4 on i4.pParent       = j4.pPId     and  j4.iVer = j4.iVAt
                           left join UFis                k4 on j4.pParent       = k4.pPId     and  k4.iVer = k4.iVAt
                           left join EST_Depositos       c5 on  a.pDepReje      = c5.pPId     and  c5.iVer = c5.iVAt 
                           left join UFis                e5 on c5.pUFis         = e5.pPId     and  e5.iVer = e5.iVAt
                           left join UFis                f5 on e5.pParent       = f5.pPId     and  f5.iVer = f5.iVAt
                           left join UFis                g5 on f5.pParent       = g5.pPId     and  g5.iVer = g5.iVAt
                           left join UFis                h5 on g5.pParent       = h5.pPId     and  h5.iVer = h5.iVAt
                           left join UFis                i5 on h5.pParent       = i5.pPId     and  i5.iVer = i5.iVAt
                           left join UFis                j5 on i5.pParent       = j5.pPId     and  j5.iVer = j5.iVAt
                           left join UFis                k5 on j5.pParent       = k5.pPId     and  k5.iVer = k5.iVAt
                           left join EST_Depositos       c6 on  a.pDepEnt       = c6.pPId     and  c6.iVer = c6.iVAt 
                           left join UFis                e6 on c6.pUFis         = e6.pPId     and  e6.iVer = e6.iVAt
                           left join UFis                f6 on e6.pParent       = f6.pPId     and  f6.iVer = f6.iVAt
                           left join UFis                g6 on f6.pParent       = g6.pPId     and  g6.iVer = g6.iVAt
                           left join UFis                h6 on g6.pParent       = h6.pPId     and  h6.iVer = h6.iVAt
                           left join UFis                i6 on h6.pParent       = i6.pPId     and  i6.iVer = i6.iVAt
                           left join UFis                j6 on i6.pParent       = j6.pPId     and  j6.iVer = j6.iVAt
                           left join UFis                k6 on j6.pParent       = k6.pPId     and  k6.iVer = k6.iVAt
                           left join EST_Instancias      l6 on a.pInsEnt        = l6.pPId     and  l6.iVer = l6.iVAt,
          CUP            z
   where a.pPId = {pId}
     and a.iVer = {a.iVer}
     and a.pInc = z.pPId and z.iVer = z.iVAt
</DbToVars1>
<1>
   select a.pPId       pOrdens_Item_CCusto_i,
          b.pPId       pCCusto_i,
          a.fCCusto    fCCusto_i,
          b.sCCUsto    sCCusto_i,
          a.nRatCCusto nRatCCusto_i
   from Ordens_Item_CCusto a,
        CCusto             b
   where a.iVer       = a.iVAt
     and a.lExc       = 0
     and a.pOrdemItem = {ChaveAtual_0}
     and a.pCCusto    = b.pPId
     and b.iVer       = b.iVAt
  order by b.sCCUsto
</1>
<2>
   select a.pPId           pOrdens_Item_CContCred_i,
          e.pPId           pCContCred_i,
          a.fCPla          fCContCred_i,
          e.sCodigo        sCodCredPla_i,
          e.sDescricao     sDesCredPla_i,
          a.nRatCredCCont  nRatCredCCont_i
   from Ordens_Item_CContabil  a left join PlaConta   e on a.pCPla = e.pPid and e.iVer = e.iVAt
   where a.iVer  = a.iVAt
     and a.lExc  = 0
     and a.pOrdemItem ={ChaveAtual_0}
     and a.lDeb  = 0
   order by e.sCodigo,e.sDescricao
</2>
<3>
   select a.pPId          pOrdens_Item_CContDeb_i,
          e.pPId          pCContDeb_i,
          a.fCPla         fCContDeb_i,
          e.sCodigo       sCodDebPla_i,
          e.sDescricao    sDesDebPla_i,
          a.nRatDebCCont  nRatDebCCont_i
   from Ordens_Item_CContabil  a left join PlaConta   e on a.pCPla = e.pPid and e.iVer = e.iVAt
   where a.iVer       = a.iVAt
     and a.lExc       = 0
     and a.pOrdemItem = {ChaveAtual_0}
     and a.lDeb  = 1
   order by e.sCodigo,e.sDescricao
</3>
<VarsDefault1>
   sVerVAt = {pPId+'-'+iVer+'/'+iVAt}
   sRastro = {sVerVAt+', '+sCoringa+', '+tInc}
   lRastro = 0
   lImpSel = 1
   lIBSCBS = 1
   pOrdem      = {ChaveAtual_1}
   pTOper      = {ChaveIrma_1_0}
   sMoeCapa    = {ChaveIrma_1_1}
   tEntPla     = {ChaveIrma_1_2}
   jEntSai     = {ChaveIrma_1_3}
   pEmi        = {ChaveIrma_1_4}
   pDest       = {ChaveIrma_1_5}
   pDestDefault = 36669 
   nDescFin    = {ChaveIrma_1_6} 
   nDFin       = {ChaveIrma_1_7} 
   pCapaMoe    = {ChaveIrma_1_8} 
   jBC_PIS     = {ChaveIrma_1_9};
   jBC_COFINS  = {ChaveIrma_1_10};
   jBC_ICMS    = {ChaveIrma_1_11};
   jBC_IPI     = {ChaveIrma_1_12};
   jBC_ICMSST  = {ChaveIrma_1_13};
   jBC_II      = {ChaveIrma_1_14};
   jBC_ISS     = {ChaveIrma_1_15};
   jVl_ICMSST  = {ChaveIrma_1_16};
   jVl_ICMS    = {ChaveIrma_1_17};
   lFinanc     = {ChaveIrma_1_18}
   lTransfRem  = {ChaveIrma_1_19}
   lTransfDep3o = {ChaveIrma_1_21}
   nPDescLog    = {ChaveIrma_1_22}
   aEntSai = Entrada (Compra),Sada (Venda),Entrada/Sada,Transferncia
   mInfAdProd = {sInfAdProd}
   aPriori = Muito Baixa,Baixa,Normal,Alta,Muito Alta
   aTipo   = Manual,Negociao,Tabela de Preo
   aTipoTQ = Manual,Negociao
   pMotAltPed    = 0  
   sCodMotAltPed =    
   sDesMotAltPed =    
   lImpSel = 0
   lIBSCBS = 0
   aProd_indTot      = 0-Valor item no compe valor total , 1-Valor item compe valor total
   aICMS_GrupoTrib   = 00-Tributada integralmente, 10-Tributada com cobrana ICMS substituio tributria ,20-Com reduo de base de clculo , 30-Isenta/no tributada com cobrana ICMS substituio tributria ,40-Isenta ,41-No Tributada, 50-Suspenso , 51-Diferimento , 60-ICMS cobrado anteriormente por substituio tributria , 70-Com reduo base clculo e cobrana do ICMS substituio tributria , 90-Outros
   aICMS_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMS_modBC       = 0-Margem Valor Agregado(%), 1-Pauta(Valor), 2-Preo Tabelado Mx(Valor), 3-Valor Operao  
   aICMS_modBCST     = 0-Preo Tabelado ou Mximo Sugerido, 1-Lista Negativa(Valor), 2-Lista Positiva(valor), 3-Lista Neutra(valor), 4-Margem Valor Agregado(%), 5-Pauta(valor)  
   aICMSPart_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSPart_CST     = 10-Tributada com cobrana ICMS por substituio, 90-Outros
   aICMSPart_modBC   = 0-Margem Valor Agregado (%), 1-Pauta (Valor), 2-Preo Tabelado Mx (valor) 
   aICMSPart_modBCST = 0 Preo tabelado ou mximo sugerido, 1-Lista Negativa (valor), 2-Lista Positiva (valor), 3-Lista Neutra (valor), 4-Margem Valor Agregado(%), 5-Pauta (valor) 
   aOrig             = 0-Nac exceto as indicadas nos cdigos 3 a 5,1-Est Importao direta- exceto a indicada no cdigo 6,2-Est Adquirida no mercado interno- exceto a indicada no cdigo 7,3-Nac mercadoria ou bem com Contedo de Importao superior a 40%,4-Nac c/ produo feita em conformidade com os processos produtivos bsicos,5-Nac mercadoria/bem c/ Contedo de Importao- inferior ou igual a 40%,6-Est Importao direta- sem similar nacional- constante na Camex,7-Est Adquirida no mercado interno - sem similar nacional-constante na Camex,8-Nacional - mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSST_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSST_CST   = 41=No Tributado,60=cobrado anteriormente por substituio tributria
   aGrupo_simples    = Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=101 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=102 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=103 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=201 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=202 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=203 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=300 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=400 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=500 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=900 
   aICMSSN_Orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSSN_CSOSN     = 101-Tributada com permisso de crdito , 102-Tributada sem permisso de crdito , 103-Iseno para faixa de receita bruta , 201-Tributada com permisso de crdito com cobrana do ICMS por Substituio Tributria , 202-Tributada sem permisso de crdito com cobrana do ICMS por Substituio Tributria , 203-Iseno para faixa de receita bruta com cobrana do ICMS por Substituio Tributria , 300-Imune , 400-No tributada , 500-ICMS cobrado anteriormente por substituio tributria ou por antecipao, 900-Outros
   aICMSSN_modBCST   = 0-Preo Tabelado ou Mximo Sugerido, 1-Lista Negativa(Valor), 2-Lista Positiva(valor), 3-Lista Neutra(valor),4 - Margem Valor Agregado (%),5 - Pauta (valor) (v.2.0)
   aICMSSN_modBC     = 0-Margem Valor Agregado(%), 1-Pauta(Valor), 2-Preo Tabelado Mx(Valor), 3-Valor Operao , 4-Margem Valor Agregado(%), 5-Pauta (valor)
   aIPINT_CST        = 00-Entrada com recuperao de crdito, 01-Entrada tributada com alquota zero, 02-Entrada isenta, 03-Entrada no-tributada, 04-Entrada imune, 05-Entrada com suspenso,49-Outras entradas, 50-Sada tributada, 51-Sada tributada com alquota zero, 52-Sada isenta, 53-Sada no-tributada, 54-Sada imune, 55-Sada com suspenso, 99-Outras sadas
   aPIS_CST          = 01=Oper Tribut (BC= valor da oper alq normal (cumulativo/no cumulativo)),02=Oper Tribut (BC= valor da oper (alq diferenciada)),03-Oper Tribut (BC= QT vendida x alq por unidade de produto,04=Oper Tribut (tributao monofsica (alquota zero)),06=Oper Tribut (alquota zero),07=Oper Isenta da Contribuio,08=Oper Sem Incidncia da Contribuio,09=Oper com Suspenso da Contribuio,99=Outras Operaes,05=Oper Tribut (Substituio Tributria),49=Outras Operaes de Sada,50=Oper com Direito a Crd - Vinculada Exc a Receita Trib no Mercado Interno,51=Oper com Direito a Crd - Vinculada Exc a Receita No Trib no Mercado Interno,52=Oper com Direito a Crd . Vinculada Exc a Receita de Exportao,53=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno,54=Oper com Direito a Crd - Vinculada a Rec Tribut no Mercado Interno e de Export,55=Oper com Direito a Crd - Vinculada a Rec NoTribut no Mercado Interno e de Export,56=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno- e de Export,60=Crd Presumido - Operao de Aq Vinculada Excl a Receita Tribut no Mercado Interno,61=Crd Presumido - Operao de Aq Vinculada Excl a Receita No-Tribut no Mercado Interno,62=Crd Presumido - Operao de Aq Vinculada Excl a Receita de Exportao,63=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno,64=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut no Mercado Interno e de Export,65=Crd Presumido - Operao de Aq Vinculada a Receitas No-Tribut no Mercado Interno e de Export,66=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno- e de Export,67=Crd Presumido - Outras Operaes,70=Operao de Aquisio sem Direito a Crdito,71=Operao de Aquisio com Iseno,72=Operao de Aquisio com Suspenso,73=Operao de Aquisio a Alquota Zero,74=Operao de Aquisio sem Incidncia da Contribuio,75=Operao de Aquisio por Substituio Tributria,98=Outras Operaes de Entrada
   aCOFINS_CST       = 01=Oper Tribut (BC= valor da oper alq normal (cumulativo/no cumulativo)),02=Oper Tribut (BC= valor da oper (alq diferenciada)),03-Oper Tribut (BC= QT vendida x alq por unidade de produto,04=Oper Tribut (tributao monofsica (alquota zero)),06=Oper Tribut (alquota zero),07=Oper Isenta da Contribuio,08=Oper Sem Incidncia da Contribuio,09=Oper com Suspenso da Contribuio,99=Outras Operaes,05=Oper Tribut (Substituio Tributria),49=Outras Operaes de Sada,50=Oper com Direito a Crd - Vinculada Exc a Receita Trib no Mercado Interno,51=Oper com Direito a Crd - Vinculada Exc a Receita No Trib no Mercado Interno,52=Oper com Direito a Crd . Vinculada Exc a Receita de Exportao,53=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno,54=Oper com Direito a Crd - Vinculada a Rec Tribut no Mercado Interno e de Export,55=Oper com Direito a Crd - Vinculada a Rec NoTribut no Mercado Interno e de Export,56=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno- e de Export,60=Crd Presumido - Operao de Aq Vinculada Excl a Receita Tribut no Mercado Interno,61=Crd Presumido - Operao de Aq Vinculada Excl a Receita No-Tribut no Mercado Interno,62=Crd Presumido - Operao de Aq Vinculada Excl a Receita de Exportao,63=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno,64=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut no Mercado Interno e de Export,65=Crd Presumido - Operao de Aq Vinculada a Receitas No-Tribut no Mercado Interno e de Export,66=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno- e de Export,67=Crd Presumido - Outras Operaes,70=Operao de Aquisio sem Direito a Crdito,71=Operao de Aquisio com Iseno,72=Operao de Aquisio com Suspenso,73=Operao de Aquisio a Alquota Zero,74=Operao de Aquisio sem Incidncia da Contribuio,75=Operao de Aquisio por Substituio Tributria,98=Outras Operaes de Entrada
   aISSQN_cSitTrib   = N=NORMAL, R=RETIDA, S=SUBSTITUTA, I=ISENTA         
   aFDiasEnt         = Calculado,Informado 
   jProd_indTot      = 1;
   iDesc1            = %
   iDesc2            = Valor
   iDesc3            = VL/UN
   aCam    = 1-Data Emissao da Ordem,2-Data Emisso da NFe,3-Data Emisso da NFe -1
   aBC        = Calculada, Informada
   aTempo  = Mensal,Bimestral,Semestral,Anual
   aFinalidade = Outros Fins,Uso e Consumo,Complemento de Impostos
   aDI_tpViaTransp    = 1=Martima,Nota Fiscal eletrnica,2=Fluvial,3=Lacustre,4=Area,5=Postal,6=Ferroviria,7=Rodoviria,8=Conduto / Rede Transmisso,9=Meios Prprios,10=Entrada / Sada ficta,11=Courier,12=Handcarry
   aDI_tpIntermedio   = 1=Importao por conta prpria,2=Importao por conta e ordem,3=Importao por encomenda
   aISSQN_indISS      = 1=Exigvel, 2=No incidncia, 3=Iseno, 4=Exportao, 5=Imunidade, 6=Exigibilidade Suspensa por Deciso Judicial, 7=Exigibilidade Suspensa por Processo Administrativo 
   aICMS_motDesICMS  = 1-Txi,2-Deficiente Fsico,3-Produtor Agropecurio,4-Frotista/Locadora,5-Diplomtico/Consular,6-Utilitrios/Motocicletas reas de Livre Comrcio CONTRAN suas alteraes,7-SUFRAMA, 8-Venda a rgo Pblico,9-Outros,10=Deficiente Condutor,11-Deficiente No Condutor,12-rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS20 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS30 = 6=Utilitrios e Motocicletas da Amaznia Ocidental e reas de Livre Comrcio, 7=SUFRAMA, 9=Outros
   aICMS_motDesICMS40 = 1=Txi, 2=Deficiente Fsico *** Eliminado***, 3=Produtor Agropecurio,4=Frotista/Locadora,5=Diplomtico/Consular,6=Utilitrios e Motocicletas da Amaznia Ocidental ereas de Livre Comrcio,7=SUFRAMA, 8=Venda a rgo Pblico, 9=Outros, 10=Deficiente Condutor, 11=Deficiente No Condutor
   aICMS_motDesICMS70 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS90 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aIBSCP_cCredPres = 1 - Aquisio de Produtor Rural no contribuinte,2 - Tomador de servio de transporte de TAC PF no contrib,3 - Aquisio de pessoa fsica com destino a reciclagem,4 - Aquisio de bens mveis de PF no contrib. para revenda (veculos / brech),5 - Regime opcional para cooperativa.
   aIBSCBS_tpCredPresIBSZFM = 0 - Sem Crdito Presumido, 1 - Bens de consumo final (55%), 2 - Bens de capital (75%), 3 - Bens intermedirios (90/25%), 4 - Bens de informtica e outros definidos em legislao (100%)
</VarsDefault1>
<VarsDefault3>
   sVerVAt = {pPId+'-'+iVer+'/'+iVAt}
   sRastro = {sVerVAt+', '+sCoringa+', '+tInc}
   lRastro = 0
   pOrdem      = {ChaveAtual_1}
   pTOper      = {ChaveIrma_1_0}
   sMoeCapa    = {ChaveIrma_1_1}
   tEntPla     = {ChaveIrma_1_2}
   jEntSai     = {ChaveIrma_1_3}
   pEmi        = {ChaveIrma_1_4}
   pDest       = {ChaveIrma_1_5}
   pDestDefault = 36669  
   nDescFin    = {ChaveIrma_1_6} 
   nDFin       = {ChaveIrma_1_7} 
   pCapaMoe    = {ChaveIrma_1_8} 
   jBC_PIS     = {ChaveIrma_1_9};
   jBC_COFINS  = {ChaveIrma_1_10};
   jBC_ICMS    = {ChaveIrma_1_11};
   jBC_IPI     = {ChaveIrma_1_12};
   jBC_ICMSST  = {ChaveIrma_1_13};
   jBC_II      = {ChaveIrma_1_14};
   jBC_ISS     = {ChaveIrma_1_15};
   jVl_ICMSST  = {ChaveIrma_1_16};
   jVl_ICMS    = {ChaveIrma_1_17};
   lFinanc     = {ChaveIrma_1_18}
   lTransfRem  = {ChaveIrma_1_19}
   lTransfDep3o = {ChaveIrma_1_21}
   nPDescLog    = {ChaveIrma_1_22}
   aEntSai = Entrada (Compra),Sada (Venda),Entrada/Sada,Transferncia
   mInfAdProd = {sInfAdProd}
   aPriori = Muito Baixa,Baixa,Normal,Alta,Muito Alta
   aTipo   = Manual,Negociao,Tabela de Preo
   aTipoTQ = Manual,Negociao
   aProd_indTot      = 0-Valor item no compe valor total , 1-Valor item compe valor total
   aICMS_GrupoTrib   = 00-Tributada integralmente, 10-Tributada com cobrana ICMS substituio tributria ,20-Com reduo de base de clculo , 30-Isenta/no tributada com cobrana ICMS substituio tributria ,40-Isenta ,41-No Tributada, 50-Suspenso , 51-Diferimento , 60-ICMS cobrado anteriormente por substituio tributria , 70-Com reduo base clculo e cobrana do ICMS substituio tributria , 90-Outros
   aICMS_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMS_modBC       = 0-Margem Valor Agregado(%), 1-Pauta(Valor), 2-Preo Tabelado Mx(Valor), 3-Valor Operao  
   aICMS_modBCST     = 0-Preo Tabelado ou Mximo Sugerido, 1-Lista Negativa(Valor), 2-Lista Positiva(valor), 3-Lista Neutra(valor), 4-Margem Valor Agregado(%), 5-Pauta(valor)  
   aICMSPart_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSPart_CST     = 10-Tributada com cobrana ICMS por substituio, 90-Outros
   aICMSPart_modBC   = 0-Margem Valor Agregado (%), 1-Pauta (Valor), 2-Preo Tabelado Mx (valor) 
   aICMSPart_modBCST = 0 Preo tabelado ou mximo sugerido, 1-Lista Negativa (valor), 2-Lista Positiva (valor), 3-Lista Neutra (valor), 4-Margem Valor Agregado(%), 5-Pauta (valor) 
   aOrig             = 0-Nac exceto as indicadas nos cdigos 3 a 5,1-Est Importao direta- exceto a indicada no cdigo 6,2-Est Adquirida no mercado interno- exceto a indicada no cdigo 7,3-Nac mercadoria ou bem com Contedo de Importao superior a 40%,4-Nac c/ produo feita em conformidade com os processos produtivos bsicos,5-Nac mercadoria/bem c/ Contedo de Importao- inferior ou igual a 40%,6-Est Importao direta- sem similar nacional- constante na Camex,7-Est Adquirida no mercado interno - sem similar nacional-constante na Camex,8-Nacional - mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSST_orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSST_CST   = 41=No Tributado,60=cobrado anteriormente por substituio tributria
   aGrupo_simples    = Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=101 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=102 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=103 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=201 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=202 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=203 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=300 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=400 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=500 , Tributao do ICMS pelo SIMPLES NACIONAL e CSOSN=900 
   aICMSSN_Orig = 0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8,1-Estrangeira-Importao direta exceto a indicada no cdigo 6,2-Estrangeira-Adquirida mercado interno exceto a indicada no cdigo 7,3-Nacional-mercadoria ou bem com Contedo de Importao superior a 40% e inferior ou igual a 70%,4-Nacional-cuja produo tenha sido feita em conformidade com os processos produtivos bsicos de que tratam as legislaes citadas nos Ajustes,5-Nacional-mercadoria ou bem com Contedo de Importao inferior ou igual a 40%,6-Estrangeira-Importao direta sem similar nacional constante em lista da CAMEX e gs natural,7-Estrangeira-Adquirida no mercado interno sem similar nacional constante lista CAMEX e gs natural.,8-Nacional-mercadoria ou bem com Contedo de Importao superior a 70%
   aICMSSN_CSOSN     = 101-Tributada com permisso de crdito , 102-Tributada sem permisso de crdito , 103-Iseno para faixa de receita bruta , 201-Tributada com permisso de crdito com cobrana do ICMS por Substituio Tributria , 202-Tributada sem permisso de crdito com cobrana do ICMS por Substituio Tributria , 203-Iseno para faixa de receita bruta com cobrana do ICMS por Substituio Tributria , 300-Imune , 400-No tributada , 500-ICMS cobrado anteriormente por substituio tributria ou por antecipao, 900-Outros
   aICMSSN_modBCST   = 0-Preo Tabelado ou Mximo Sugerido, 1-Lista Negativa(Valor), 2-Lista Positiva(valor), 3-Lista Neutra(valor),4 - Margem Valor Agregado (%),5 - Pauta (valor) (v.2.0)
   aICMSSN_modBC     = 0-Margem Valor Agregado(%), 1-Pauta(Valor), 2-Preo Tabelado Mx(Valor), 3-Valor Operao , 4-Margem Valor Agregado(%), 5-Pauta (valor)
   aIPINT_CST        = 00-Entrada com recuperao de crdito, 01-Entrada tributada com alquota zero, 02-Entrada isenta, 03-Entrada no-tributada, 04-Entrada imune, 05-Entrada com suspenso,49-Outras entradas, 50-Sada tributada, 51-Sada tributada com alquota zero, 52-Sada isenta, 53-Sada no-tributada, 54-Sada imune, 55-Sada com suspenso, 99-Outras sadas
   aPIS_CST          = 01=Oper Tribut (BC= valor da oper alq normal (cumulativo/no cumulativo)),02=Oper Tribut (BC= valor da oper (alq diferenciada)),03-Oper Tribut (BC= QT vendida x alq por unidade de produto,04=Oper Tribut (tributao monofsica (alquota zero)),06=Oper Tribut (alquota zero),07=Oper Isenta da Contribuio,08=Oper Sem Incidncia da Contribuio,09=Oper com Suspenso da Contribuio,99=Outras Operaes,05=Oper Tribut (Substituio Tributria),49=Outras Operaes de Sada,50=Oper com Direito a Crd - Vinculada Exc a Receita Trib no Mercado Interno,51=Oper com Direito a Crd - Vinculada Exc a Receita No Trib no Mercado Interno,52=Oper com Direito a Crd . Vinculada Exc a Receita de Exportao,53=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno,54=Oper com Direito a Crd - Vinculada a Rec Tribut no Mercado Interno e de Export,55=Oper com Direito a Crd - Vinculada a Rec NoTribut no Mercado Interno e de Export,56=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno- e de Export,60=Crd Presumido - Operao de Aq Vinculada Excl a Receita Tribut no Mercado Interno,61=Crd Presumido - Operao de Aq Vinculada Excl a Receita No-Tribut no Mercado Interno,62=Crd Presumido - Operao de Aq Vinculada Excl a Receita de Exportao,63=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno,64=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut no Mercado Interno e de Export,65=Crd Presumido - Operao de Aq Vinculada a Receitas No-Tribut no Mercado Interno e de Export,66=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno- e de Export,67=Crd Presumido - Outras Operaes,70=Operao de Aquisio sem Direito a Crdito,71=Operao de Aquisio com Iseno,72=Operao de Aquisio com Suspenso,73=Operao de Aquisio a Alquota Zero,74=Operao de Aquisio sem Incidncia da Contribuio,75=Operao de Aquisio por Substituio Tributria,98=Outras Operaes de Entrada
   aCOFINS_CST       = 01=Oper Tribut (BC= valor da oper alq normal (cumulativo/no cumulativo)),02=Oper Tribut (BC= valor da oper (alq diferenciada)),03-Oper Tribut (BC= QT vendida x alq por unidade de produto,04=Oper Tribut (tributao monofsica (alquota zero)),06=Oper Tribut (alquota zero),07=Oper Isenta da Contribuio,08=Oper Sem Incidncia da Contribuio,09=Oper com Suspenso da Contribuio,99=Outras Operaes,05=Oper Tribut (Substituio Tributria),49=Outras Operaes de Sada,50=Oper com Direito a Crd - Vinculada Exc a Receita Trib no Mercado Interno,51=Oper com Direito a Crd - Vinculada Exc a Receita No Trib no Mercado Interno,52=Oper com Direito a Crd . Vinculada Exc a Receita de Exportao,53=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno,54=Oper com Direito a Crd - Vinculada a Rec Tribut no Mercado Interno e de Export,55=Oper com Direito a Crd - Vinculada a Rec NoTribut no Mercado Interno e de Export,56=Oper com Direito a Crd - Vinculada a Rec Tribut e No-Tribut no Mercado Interno- e de Export,60=Crd Presumido - Operao de Aq Vinculada Excl a Receita Tribut no Mercado Interno,61=Crd Presumido - Operao de Aq Vinculada Excl a Receita No-Tribut no Mercado Interno,62=Crd Presumido - Operao de Aq Vinculada Excl a Receita de Exportao,63=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno,64=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut no Mercado Interno e de Export,65=Crd Presumido - Operao de Aq Vinculada a Receitas No-Tribut no Mercado Interno e de Export,66=Crd Presumido - Operao de Aq Vinculada a Receitas Tribut e No-Tribut no Mercado Interno- e de Export,67=Crd Presumido - Outras Operaes,70=Operao de Aquisio sem Direito a Crdito,71=Operao de Aquisio com Iseno,72=Operao de Aquisio com Suspenso,73=Operao de Aquisio a Alquota Zero,74=Operao de Aquisio sem Incidncia da Contribuio,75=Operao de Aquisio por Substituio Tributria,98=Outras Operaes de Entrada
   aISSQN_cSitTrib   = N=NORMAL, R=RETIDA, S=SUBSTITUTA, I=ISENTA         
   aFDiasEnt         = Calculado,Informado 
   jProd_indTot      = 1;
   iDesc1            = %
   iDesc2            = Valor
   iDesc3            = VL/UN
   aCam    = 1-Data Emissao da Ordem,2-Data Emisso da NFe,3-Data Emisso da NFe -1
   aBC        = Calculada, Informada
   aTempo  = Mensal,Bimestral,Semestral,Anual
   aFinalidade = Outros Fins,Uso e Consumo,Complemento de Impostos
   jTipo = 0
   aDI_tpViaTransp    = 1=Martima,Nota Fiscal eletrnica,2=Fluvial,3=Lacustre,4=Area,5=Postal,6=Ferroviria,7=Rodoviria,8=Conduto / Rede Transmisso,9=Meios Prprios,10=Entrada / Sada ficta,11=Courier,12=Handcarry
   aDI_tpIntermedio   = 1=Importao por conta prpria,2=Importao por conta e ordem,3=Importao por encomenda
   aISSQN_indISS      = 1=Exigvel, 2=No incidncia, 3=Iseno, 4=Exportao, 5=Imunidade, 6=Exigibilidade Suspensa por Deciso Judicial, 7=Exigibilidade Suspensa por Processo Administrativo 
  aICMS_motDesICMS  = 1-Txi,2-Deficiente Fsico,3-Produtor Agropecurio,4-Frotista/Locadora,5-Diplomtico/Consular,6-Utilitrios/Motocicletas reas de Livre Comrcio CONTRAN suas alteraes,7-SUFRAMA, 8-Venda a rgo Pblico,9-Outros,10=Deficiente Condutor,11-Deficiente No Condutor,12-rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS20 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS30 = 6=Utilitrios e Motocicletas da Amaznia Ocidental e reas de Livre Comrcio, 7=SUFRAMA, 9=Outros
   aICMS_motDesICMS40 = 1=Txi, 2=Deficiente Fsico *** Eliminado***, 3=Produtor Agropecurio,4=Frotista/Locadora,5=Diplomtico/Consular,6=Utilitrios e Motocicletas da Amaznia Ocidental ereas de Livre Comrcio,7=SUFRAMA, 8=Venda a rgo Pblico, 9=Outros, 10=Deficiente Condutor, 11=Deficiente No Condutor
   aICMS_motDesICMS70 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aICMS_motDesICMS90 = 3=Uso na agropecuria, 9=Outros, 12=rgo de fomento e desenvolvimento agropecurio
   aIBSCP_cCredPres = 1 - Aquisio de Produtor Rural no contribuinte,2 - Tomador de servio de transporte de TAC PF no contrib,3 - Aquisio de pessoa fsica com destino a reciclagem,4 - Aquisio de bens mveis de PF no contrib. para revenda (veculos / brech),5 - Regime opcional para cooperativa.
   aIBSCBS_tpCredPresIBSZFM = 0 - Sem Crdito Presumido, 1 - Bens de consumo final (55%), 2 - Bens de capital (75%), 3 - Bens intermedirios (90/25%), 4 - Bens de informtica e outros definidos em legislao (100%)
</VarsDefault3>
<ScriptForm1>
   Rastreabilidade                           ; lRastro-5                         ; fontweight='bold' ; edtzoom=true ;  visible=(sDDFTagApl!='Padrao_3')
   Verso                                    ; sRastro-60                        ; identlabel=5      ; editable=false ; visible=((iDDFChamada>0)&&(lRastro==1)&&(sDDFTagApl!='Padrao_3')) ; 
   Identificao                             ;                                   ; fontweight='bold' ; editable=false ; visible=(sDDFTagApl!='Padrao_3')
   ;   ; visible=(iDDFChamada>0)
   Origem do Preo                           ; aTipo[jTipo]                      ; identlabel=5      ; visible=((sDDFTagApl!='Padrao_3')&&((sDDFMnemProp=='MT')||(sDDFMnemProp=='Desenvolvimento'))) ; exec=(this.flSetVar('pItem',0)&& this.flSetVar('fItem',0)&& this.flSetVar('sRegCodItem','')&& this.flSetVar('sTabCodItem','')&& this.flSetVar('sNegCodItem','')&& this.flSetVar('sRegDesItem','')&& this.flSetVar('pTab','0')&& this.flSetVar('fTab','0')&& this.flSetVar('pTabI','0')&& this.flSetVar('fTabI','0')&& this.flSetVar('sCodTab','')&& this.flSetVar('sDesTab','')&& this.flSetVar('pLote',0)&& this.flSetVar('fLote',0)&& this.flSetVar('sLote','')&& this.flSetVar('jOrig',0)&& this.flSetVar('jICMS_Orig',0)&& this.flSetVar('pUni',0)&& this.flSetVar('sCodUni','')&& this.flSetVar('sUni','')&& this.flSetVar('pNCM',0)&& this.flSetVar('sCodNCM','')&& this.flSetVar('sDesNCM','')&& this.flSetVar('pNeg',0)&& this.flSetVar('fNeg',0)&& this.flSetVar('nPrBruto','0,00000')&& this.flSetVar('nVDescCP','0,00000')&& this.flSetVar('nVDescTpED','0,00000')&& this.flSetVar('nVEncFinTpED','0,00000')&& this.flSetVar('nVDescTpEDG','0,00000')&& this.flSetVar('nPEncFinTpED','0,00000')&& this.flSetVar('sMoe','')&& this.flSetVar('pMoe',0)&& this.flSetVar('fMoe',0)&& this.flSetVar('nQtMoe','0,00000')&& this.flSetVar('sMoeCambio','')&& this.flSetVar('pCam',0)&& this.flSetVar('fCam',0)&& this.flSetVar('nCam','0,00000')&& this.flSetVar('sCam','')&& this.flSetVar('jCam',0)&& this.flSetVar('nProd_vUnCom','0,00000')&& this.flSetVar('nProd_vFrete','0,00')&& this.flSetVar('nVMLE','0,00')&& this.flSetVar('nProd_vSeg','0,00')&& this.flSetVar('nProd_vDesc','0,00000')&& this.flSetVar('nProd_vProd','0,00')&& this.flSetVar('pCFO',0)&& this.flSetVar('sCodCFO','')&& this.flSetVar('sAbrev','')&& this.flSetVar('fCFO',0)&& this.flSetVar('pRegDepVen',0)&& this.flSetVar('pDepVen',0)&& this.flSetVar('pUFisVen',0)&& this.flSetVar('pUFisVen',0)&& this.flSetVar('sUn1Ven','')&& this.flSetVar('sUn2Ven','')&& this.flSetVar('sUn3Ven','')&& this.flSetVar('sUn4Ven','')&& this.flSetVar('sUn5Ven','')&& this.flSetVar('sUn6Ven','')&& this.flSetVar('sUn7Ven','')&& this.flSetVar('pRegDepRFis',0)&& this.flSetVar('pDepRFis',0)&& this.flSetVar('pUFisRFis',0)&& this.flSetVar('pUFisRFis',0)&& this.flSetVar('sUn1RFis','')&& this.flSetVar('sUn2RFis','')&& this.flSetVar('sUn3RFis','')&& this.flSetVar('sUn4RFis','')&& this.flSetVar('sUn5RFis','')&& this.flSetVar('sUn6RFis','')&& this.flSetVar('sUn7RFis','')&& this.flSetVar('tEntPla','')&& this.flSetVar('tEmissao','')&& this.flSetVar('tSaida ','')&& this.flSetVar('sDI_nDI','')&& this.flSetVar('dDI_dDI','')&& this.flSetVar('sDI_xLocDesemb','')&& this.flSetVar('sDI_UFDesemb','')&& this.flSetVar('dDI_dDesemb','')&& this.flSetVar('sDI_cExportador','')&& this.flSetVar('nII_vBC','0,00')&& this.flSetVar('nII_vDespAdu','0,00')&& this.flSetVar('nII_vII','0,00')&& this.flSetVar('nII_vIOF','0,00')&& this.flSetVar('iAdi_nAdicao',0)&& this.flSetVar('iAdi_nSeqAdic',0)&& this.flSetVar('sAdi_cFabricante','')&& this.flSetVar('nAdi_vDescDI','0,00000')&& this.flSetVar('sAdi_xPed','')&& this.flSetVar('iAdi_nItemPed',0)&& this.flSetVar('nCIDE_qBCprod','0,00')&& this.flSetVar('nCIDE_vAliqProd','0,00')&& this.flSetVar('nCIDE_vCIDE','0,00')&& this.flSetVar('jICMS_GrupoTrib',0)&& this.flSetVar('jICMS_orig',0)&& this.flSetVar('jICMS_modBC',0)&& this.flSetVar('nICMS_pRedBC','0,00')&& this.flSetVar('nICMS_vBC','0,00')&& this.flSetVar('nICMS_pICMS','0,00')&& this.flSetVar('nICMS_vICMS','0,00')&& this.flSetVar('jICMS_modBCST',0)&& this.flSetVar('nICMS_pMVAST','0,00')&& this.flSetVar('nICMS_pRedBCST','0,00')&& this.flSetVar('nICMS_vBCST','0,00')&& this.flSetVar('nICMS_pICMSST','0,00')&& this.flSetVar('nICMS_vICMSST','0,00')&& this.flSetVar('nICMS_vBCSTRet','0,00')&& this.flSetVar('nICMS_vICMSSTRet','0,00')&& this.flSetVar('jICMS_motDesICMS',0)&& this.flSetVar('jICMSPart_orig',0)&& this.flSetVar('jICMSPart_CST',0)&& this.flSetVar('jICMSPart_modBC',0)&& this.flSetVar('nICMSPart_vBC','0,00')&& this.flSetVar('nICMSPart_pRedBC','0,00')&& this.flSetVar('nICMSPart_pICMS','0,00')&& this.flSetVar('nICMSPart_vICMS','0,00')&& this.flSetVar('jICMSPart_modBCST',0)&& this.flSetVar('nICMSPart_pMVAST','0,00')&& this.flSetVar('nICMSPart_pRedBCT','0,00')&& this.flSetVar('nICMSPart_vBCST','0,00')&& this.flSetVar('nICMSPart_pICMSST','0,00')&& this.flSetVar('nICMSPart_vICMSST','0,00')&& this.flSetVar('nICMSPart_pBCOp','0,00')&& this.flSetVar('sICMSPart_UFST','')&& this.flSetVar('jICMSST_orig',0)&& this.flSetVar('jICMSST_CST',0)&& this.flSetVar('nICMSST_vBCSTRet','0,00')&& this.flSetVar('nICMSST_vICMSSTRe','0,00')&& this.flSetVar('nICMSST_vBCSTDest','0,00')&& this.flSetVar('nICMSST_vICMSSTDes','0,00')&& this.flSetVar('jGrupo_simples',0)&& this.flSetVar('jICMSSN_Orig',0)&& this.flSetVar('jICMSSN_CSOSN',0)&& this.flSetVar('jICMSSN_modBC',0)&& this.flSetVar('nICMSSN_vBC','0,00')&& this.flSetVar('nICMSSN_pRedBC','0,00')&& this.flSetVar('nICMSSN_pICMS','0,00')&& this.flSetVar('nICMSSN_vICMS','0,00')&& this.flSetVar('jICMSSN_modBCST',0)&& this.flSetVar('nICMSSN_pMVAST','0,00')&& this.flSetVar('nICMSSN_pRedBCST','0,00')&& this.flSetVar('nICMSSN_vBCST','0,00')&& this.flSetVar('nICMSSN_pICMSST','0,00')&& this.flSetVar('nICMSSN_vICMSST','0,00')&& this.flSetVar('nICMSSN_pCredSN','0,00')&& this.flSetVar('nICMSSN_vCredICMSSN','0,00')&& this.flSetVar('nICMSSN_vBCSTRet','0,00')&& this.flSetVar('nICMSSN_vICMSSTRet','0,00')&& this.flSetVar('sIPI_clEnq','')&& this.flSetVar('sIPI_CNPJProd','')&& this.flSetVar('sIPI_cSelo','')&& this.flSetVar('nIPI_qSelo','0,00')&& this.flSetVar('sIPI_cEnq','')&& this.flSetVar('jIPINT_CST',0)&& this.flSetVar('nIPITrib_vBC','0,00')&& this.flSetVar('nIPITrib_pIPI','0,00')&& this.flSetVar('nIPITrib_qUnid','0,00')&& this.flSetVar('nIPITrib_vUnid','0,00')&& this.flSetVar('nIPITrib_vIPI','0,00')&& this.flSetVar('jPIS_CST',0)&& this.flSetVar('nPIS_vBC','0,00')&& this.flSetVar('nPIS_pPIS','0,00')&& this.flSetVar('nPIS_qBCProd','0,00')&& this.flSetVar('nPIS_vAliqProd','0,00')&& this.flSetVar('nPIS_vPIS','0,00')&& this.flSetVar('nPISST_vBC','0,00')&& this.flSetVar('nPISST_pPIS','0,00')&& this.flSetVar('nPISST_qBCProd','0,00')&& this.flSetVar('nPISST_vAliqProd','0,00')&& this.flSetVar('nPISST_vPIS','0,00')&& this.flSetVar('jCOFINS_CST',0)&& this.flSetVar('nCOFINS_vBC','0,00')&& this.flSetVar('nCOFINS_pCOFINS','0,00')&& this.flSetVar('nCOFINS_qBCProd','0,00')&& this.flSetVar('nCOFINS_vAliqProd','0,00')&& this.flSetVar('nCOFINS_vCOFINS','0,00')&& this.flSetVar('nCOFINSST_vBC','0,00')&& this.flSetVar('nCOFINSST_pCOFINS','0,00')&& this.flSetVar('nCOFINSST_qBCProd','0,00')&& this.flSetVar('nCOFINSST_vAliqProd','0,00')&& this.flSetVar('nCOFINSST_vCOFINS','0,00')&& this.flSetVar('nISSQN_vBC','0,00')&& this.flSetVar('nISSQN_vAliq','0,00')&& this.flSetVar('nISSQN_vISSQN','0,00')&& this.flSetVar('nISSQN_cMunFG','0,00')&& this.flSetVar('nISSQN_cListServ','0,00')&& this.flSetVar('jISSQN_cSitTrib',0)&& this.flSetVar('mInfAdProd','')&& this.flSetVar('nQtMin','0,00')&& this.flSetVar('nQtMax','0,00')&& this.flSetVar('nPrecoMin','0,00')&& this.flSetVar('nPrecoMax','0,00')&& this.flSetVar('lContQua',0)&& this.flSetVar('lContPreco',0)&& this.flSetVar('iCiclo',0)&& this.flSetVar('iCicloAtual',0)&& this.flSetVar('jTempo',0)&& this.flSetVar('lSkipLote',0))
   Origem do Preo                           ; aTipoTQ[jTipo]                    ; identlabel=5      ; visible=((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')) ; exec=(this.flSetVar('pItem',0)&& this.flSetVar('fItem',0)&& this.flSetVar('sRegCodItem','')&& this.flSetVar('sTabCodItem','')&& this.flSetVar('sNegCodItem','')&& this.flSetVar('sRegDesItem','')&& this.flSetVar('pTab','0')&& this.flSetVar('fTab','0')&& this.flSetVar('pTabI','0')&& this.flSetVar('fTabI','0')&& this.flSetVar('sCodTab','')&& this.flSetVar('sDesTab','')&& this.flSetVar('pLote',0)&& this.flSetVar('fLote',0)&& this.flSetVar('sLote','')&& this.flSetVar('jOrig',0)&& this.flSetVar('jICMS_Orig',0)&& this.flSetVar('pUni',0)&& this.flSetVar('sCodUni','')&& this.flSetVar('sUni','')&& this.flSetVar('pNCM',0)&& this.flSetVar('sCodNCM','')&& this.flSetVar('sDesNCM','')&& this.flSetVar('pNeg',0)&& this.flSetVar('fNeg',0)&& this.flSetVar('nPrBruto','0,00000')&& this.flSetVar('nVDescCP','0,00000')&& this.flSetVar('nVDescTpED','0,00000')&& this.flSetVar('nVEncFinTpED','0,00000')&& this.flSetVar('nVDescTpEDG','0,00000')&& this.flSetVar('nPEncFinTpED','0,00000')&& this.flSetVar('sMoe','')&& this.flSetVar('pMoe',0)&& this.flSetVar('fMoe',0)&& this.flSetVar('nQtMoe','0,00000')&& this.flSetVar('sMoeCambio','')&& this.flSetVar('pCam',0)&& this.flSetVar('fCam',0)&& this.flSetVar('nCam','0,00000')&& this.flSetVar('sCam','')&& this.flSetVar('jCam',0)&& this.flSetVar('nProd_vUnCom','0,00000')&& this.flSetVar('nProd_vFrete','0,00')&& this.flSetVar('nVMLE','0,00')&& this.flSetVar('nProd_vSeg','0,00')&& this.flSetVar('nProd_vDesc','0,00000')&& this.flSetVar('nProd_vProd','0,00')&& this.flSetVar('pCFO',0)&& this.flSetVar('sCodCFO','')&& this.flSetVar('sAbrev','')&& this.flSetVar('fCFO',0)&& this.flSetVar('pRegDepVen',0)&& this.flSetVar('pDepVen',0)&& this.flSetVar('pUFisVen',0)&& this.flSetVar('pUFisVen',0)&& this.flSetVar('sUn1Ven','')&& this.flSetVar('sUn2Ven','')&& this.flSetVar('sUn3Ven','')&& this.flSetVar('sUn4Ven','')&& this.flSetVar('sUn5Ven','')&& this.flSetVar('sUn6Ven','')&& this.flSetVar('sUn7Ven','')&& this.flSetVar('pRegDepRFis',0)&& this.flSetVar('pDepRFis',0)&& this.flSetVar('pUFisRFis',0)&& this.flSetVar('pUFisRFis',0)&& this.flSetVar('sUn1RFis','')&& this.flSetVar('sUn2RFis','')&& this.flSetVar('sUn3RFis','')&& this.flSetVar('sUn4RFis','')&& this.flSetVar('sUn5RFis','')&& this.flSetVar('sUn6RFis','')&& this.flSetVar('sUn7RFis','')&& this.flSetVar('tEntPla','')&& this.flSetVar('tEmissao','')&& this.flSetVar('tSaida ','')&& this.flSetVar('sDI_nDI','')&& this.flSetVar('dDI_dDI','')&& this.flSetVar('sDI_xLocDesemb','')&& this.flSetVar('sDI_UFDesemb','')&& this.flSetVar('dDI_dDesemb','')&& this.flSetVar('sDI_cExportador','')&& this.flSetVar('nII_vBC','0,00')&& this.flSetVar('nII_vDespAdu','0,00')&& this.flSetVar('nII_vII','0,00')&& this.flSetVar('nII_vIOF','0,00')&& this.flSetVar('iAdi_nAdicao',0)&& this.flSetVar('iAdi_nSeqAdic',0)&& this.flSetVar('sAdi_cFabricante','')&& this.flSetVar('nAdi_vDescDI','0,00000')&& this.flSetVar('sAdi_xPed','')&& this.flSetVar('iAdi_nItemPed',0)&& this.flSetVar('nCIDE_qBCprod','0,00')&& this.flSetVar('nCIDE_vAliqProd','0,00')&& this.flSetVar('nCIDE_vCIDE','0,00')&& this.flSetVar('jICMS_GrupoTrib',0)&& this.flSetVar('jICMS_orig',0)&& this.flSetVar('jICMS_modBC',0)&& this.flSetVar('nICMS_pRedBC','0,00')&& this.flSetVar('nICMS_vBC','0,00')&& this.flSetVar('nICMS_pICMS','0,00')&& this.flSetVar('nICMS_vICMS','0,00')&& this.flSetVar('jICMS_modBCST',0)&& this.flSetVar('nICMS_pMVAST','0,00')&& this.flSetVar('nICMS_pRedBCST','0,00')&& this.flSetVar('nICMS_vBCST','0,00')&& this.flSetVar('nICMS_pICMSST','0,00')&& this.flSetVar('nICMS_vICMSST','0,00')&& this.flSetVar('nICMS_vBCSTRet','0,00')&& this.flSetVar('nICMS_vICMSSTRet','0,00')&& this.flSetVar('jICMS_motDesICMS',0)&& this.flSetVar('jICMSPart_orig',0)&& this.flSetVar('jICMSPart_CST',0)&& this.flSetVar('jICMSPart_modBC',0)&& this.flSetVar('nICMSPart_vBC','0,00')&& this.flSetVar('nICMSPart_pRedBC','0,00')&& this.flSetVar('nICMSPart_pICMS','0,00')&& this.flSetVar('nICMSPart_vICMS','0,00')&& this.flSetVar('jICMSPart_modBCST',0)&& this.flSetVar('nICMSPart_pMVAST','0,00')&& this.flSetVar('nICMSPart_pRedBCT','0,00')&& this.flSetVar('nICMSPart_vBCST','0,00')&& this.flSetVar('nICMSPart_pICMSST','0,00')&& this.flSetVar('nICMSPart_vICMSST','0,00')&& this.flSetVar('nICMSPart_pBCOp','0,00')&& this.flSetVar('sICMSPart_UFST','')&& this.flSetVar('jICMSST_orig',0)&& this.flSetVar('jICMSST_CST',0)&& this.flSetVar('nICMSST_vBCSTRet','0,00')&& this.flSetVar('nICMSST_vICMSSTRe','0,00')&& this.flSetVar('nICMSST_vBCSTDest','0,00')&& this.flSetVar('nICMSST_vICMSSTDes','0,00')&& this.flSetVar('jGrupo_simples',0)&& this.flSetVar('jICMSSN_Orig',0)&& this.flSetVar('jICMSSN_CSOSN',0)&& this.flSetVar('jICMSSN_modBC',0)&& this.flSetVar('nICMSSN_vBC','0,00')&& this.flSetVar('nICMSSN_pRedBC','0,00')&& this.flSetVar('nICMSSN_pICMS','0,00')&& this.flSetVar('nICMSSN_vICMS','0,00')&& this.flSetVar('jICMSSN_modBCST',0)&& this.flSetVar('nICMSSN_pMVAST','0,00')&& this.flSetVar('nICMSSN_pRedBCST','0,00')&& this.flSetVar('nICMSSN_vBCST','0,00')&& this.flSetVar('nICMSSN_pICMSST','0,00')&& this.flSetVar('nICMSSN_vICMSST','0,00')&& this.flSetVar('nICMSSN_pCredSN','0,00')&& this.flSetVar('nICMSSN_vCredICMSSN','0,00')&& this.flSetVar('nICMSSN_vBCSTRet','0,00')&& this.flSetVar('nICMSSN_vICMSSTRet','0,00')&& this.flSetVar('sIPI_clEnq','')&& this.flSetVar('sIPI_CNPJProd','')&& this.flSetVar('sIPI_cSelo','')&& this.flSetVar('nIPI_qSelo','0,00')&& this.flSetVar('sIPI_cEnq','')&& this.flSetVar('jIPINT_CST',0)&& this.flSetVar('nIPITrib_vBC','0,00')&& this.flSetVar('nIPITrib_pIPI','0,00')&& this.flSetVar('nIPITrib_qUnid','0,00')&& this.flSetVar('nIPITrib_vUnid','0,00')&& this.flSetVar('nIPITrib_vIPI','0,00')&& this.flSetVar('jPIS_CST',0)&& this.flSetVar('nPIS_vBC','0,00')&& this.flSetVar('nPIS_pPIS','0,00')&& this.flSetVar('nPIS_qBCProd','0,00')&& this.flSetVar('nPIS_vAliqProd','0,00')&& this.flSetVar('nPIS_vPIS','0,00')&& this.flSetVar('nPISST_vBC','0,00')&& this.flSetVar('nPISST_pPIS','0,00')&& this.flSetVar('nPISST_qBCProd','0,00')&& this.flSetVar('nPISST_vAliqProd','0,00')&& this.flSetVar('nPISST_vPIS','0,00')&& this.flSetVar('jCOFINS_CST',0)&& this.flSetVar('nCOFINS_vBC','0,00')&& this.flSetVar('nCOFINS_pCOFINS','0,00')&& this.flSetVar('nCOFINS_qBCProd','0,00')&& this.flSetVar('nCOFINS_vAliqProd','0,00')&& this.flSetVar('nCOFINS_vCOFINS','0,00')&& this.flSetVar('nCOFINSST_vBC','0,00')&& this.flSetVar('nCOFINSST_pCOFINS','0,00')&& this.flSetVar('nCOFINSST_qBCProd','0,00')&& this.flSetVar('nCOFINSST_vAliqProd','0,00')&& this.flSetVar('nCOFINSST_vCOFINS','0,00')&& this.flSetVar('nISSQN_vBC','0,00')&& this.flSetVar('nISSQN_vAliq','0,00')&& this.flSetVar('nISSQN_vISSQN','0,00')&& this.flSetVar('nISSQN_cMunFG','0,00')&& this.flSetVar('nISSQN_cListServ','0,00')&& this.flSetVar('jISSQN_cSitTrib',0)&& this.flSetVar('mInfAdProd','')&& this.flSetVar('nQtMin','0,00')&& this.flSetVar('nQtMax','0,00')&& this.flSetVar('nPrecoMin','0,00')&& this.flSetVar('nPrecoMax','0,00')&& this.flSetVar('lContQua',0)&& this.flSetVar('lContPreco',0)&& this.flSetVar('iCiclo',0)&& this.flSetVar('iCicloAtual',0)&& this.flSetVar('jTempo',0)&& this.flSetVar('lSkipLote',0))
   Indicador Valor Item                      ; aProd_indTot[jProd_indTot]        ; identlabel=5      ; visible=(sDDFTagApl!='Padrao_3')
   Origem Mercadoria                         ; aOrig[jOrig]-30                   ; identlabel=5      ; visible=(sDDFTagApl!='Padrao_3')
   <i>(para realizar uma Ordem de importao vc dever ter em mos a DANFE e o DI - Documento de Importao)</i> ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; fontcolor='00AA00' ; identlabel=5 ; fontlen=-1
   ; 
   Item                                      ; sRegCodItem-20                    ; identlabel=5      ; visible=((jTipo==0)||(jTipo==3)||(jTipo==4)) ; esc=('dd_files/erp_PTOpED_Item.dda','Esc_Padrao_1','sRegCodItem,pTOper,pEmi,pDest,pOrdem,pDestDefault','pPTOpEDItem,fPTOpEDItem,pItem,fItem,sRegCodItem,sRegDesItem,sEAN,sGTIN,jICMS_Orig,pUni,fUni,sCodUni,sUni,pNCM,fNCM,sCodNCM,sDesNCM,jFDiasEnt,iDiasInf,iDiasCalc,lInspecao,nPDescTpEDG,jCam,sMoe,pMoe,fMoe,lCCusto,lCrtlItem,stmp,nPEncFinTpED,lContQua,nQtMin,nQtMax,lContPreco,nPrecoMin,nPrecoMax,iCiclo,iCicloAtual,lSkipLote,stmp,pRegDepVen,fRegDepVen,pDep,pUFis,sUn1,sUn2,sUn3,sUn4,sUn5,sUn6,sUn7,sIns,pRegDepRFis,fRegDepRFis,pDepRFis,pUFisRFis,sUn1RFis,sUn2RFis,sUn3RFis,sUn4RFis,sUn5RFis,sUn6RFis,sUn7RFis,sInsRFis,jFinalidade,nAliqTranspImport,nAliqTranspNac,sCEST,pRegDepTransf,fRegDepTransf,pDepTransf,pUFisTransf,sUnTransf1,sUnTransf2,sUnTransf3,sUnTransf4,sUnTransf5,sUnTransf6,sUnTransf7,sInsTransf,iLote,jTempo,pDepInsp,fDepInsp,sUn1Insp,sUn2Insp,sUn3Insp,sUn4Insp,sUn5Insp,sUn6Insp,sUn7Insp,pDepReje,fDepReje,sUn1Reje,sUn2Reje,sUn3Reje,sUn4Reje,sUn5Reje,sUn6Reje,sUn7Reje,dUltInsp,pInsp,fInsp,lInt,pTmp1_{1},pCCusto_{1},fCCusto_{1},sCCusto_{1},nRatCCusto_{1},pTmp2_{2},pCContCred_{2},fCContCred_{2},sCodCredPla_{2},sDesCredPla_{2},nRatCredCCont_{2},pTmp3_{3},pCContDeb_{3},fCContDeb_{3},sCodDebPla_{3},sDesDebPla_{3},nRatDebCCont_{3}') ; exec=(this.flSetVar('nPrBruto','0,00000')&& this.flSetVar('nVDescCP','0,00000')&& this.flSetVar('nVDescTpED','0,00000')&& this.flSetVar('nVEncFinED','0,00000')&& this.flSetVar('nVEncFinTpED','0,00000')&& this.flSetVar('nVDescTpEDG','0,00000')&& this.flSetVar('nQtMoe','0,00000')&& this.flSetVar('sMoeCambio','')&& this.flSetVar('pCam',0)&& this.flSetVar('fCam',0)&& this.flSetVar('nCam','0,00000')&& this.flSetVar('sCam','')&& this.flSetVar('nProd_vUnCom','0,00000')&& this.flSetVar('nProd_vFrete','0,00')&& this.flSetVar('nVMLE','0,00')&& this.flSetVar('nProd_vSeg','0,00')&& this.flSetVar('nProd_vDesc','0,00000')&& this.flSetVar('nProd_vProd','0,00')&& this.flSetVar('pCFO',0)&& this.flSetVar('sCodCFO','')&& this.flSetVar('sAbrev','')&& this.flSetVar('fCFO',0)&& this.flSetVar('tEntPla','')&& this.flSetVar('tEmissao','')&& this.flSetVar('tSaida ','')&& this.flSetVar('sDI_nDI','')&& this.flSetVar('dDI_dDI','')&& this.flSetVar('sDI_xLocDesemb','')&& this.flSetVar('sDI_UFDesemb','')&& this.flSetVar('dDI_dDesemb','')&& this.flSetVar('sDI_cExportador','')&& this.flSetVar('nII_vBC','0,00')&& this.flSetVar('nII_vDespAdu','0,00')&& this.flSetVar('nII_vII','0,00')&& this.flSetVar('nII_vIOF','0,00')&& this.flSetVar('iAdi_nAdicao',0)&& this.flSetVar('iAdi_nSeqAdic',0)&& this.flSetVar('sAdi_cFabricante','')&& this.flSetVar('nAdi_vDescDI','0,00000')&& this.flSetVar('sAdi_xPed','')&& this.flSetVar('iAdi_nItemPed',0)&& this.flSetVar('nCIDE_qBCprod','0,00')&& this.flSetVar('nCIDE_vAliqProd','0,00')&& this.flSetVar('nCIDE_vCIDE','0,00')&& this.flSetVar('jICMS_GrupoTrib',0)&& this.flSetVar('jICMS_orig',0)&& this.flSetVar('jICMS_modBC',0)&& this.flSetVar('nICMS_pRedBC','0,00')&& this.flSetVar('nICMS_vBC','0,00')&& this.flSetVar('nICMS_pICMS','0,00')&& this.flSetVar('nICMS_vICMS','0,00')&& this.flSetVar('jICMS_modBCST',0)&& this.flSetVar('nICMS_pMVAST','0,00')&& this.flSetVar('nICMS_pRedBCST','0,00')&& this.flSetVar('nICMS_vBCST','0,00')&& this.flSetVar('nICMS_pICMSST','0,00')&& this.flSetVar('nICMS_vICMSST','0,00')&& this.flSetVar('nICMS_vBCSTRet','0,00')&& this.flSetVar('nICMS_vICMSSTRet','0,00')&& this.flSetVar('jICMS_motDesICMS',0)&& this.flSetVar('jICMSPart_orig',0)&& this.flSetVar('jICMSPart_CST',0)&& this.flSetVar('jICMSPart_modBC',0)&& this.flSetVar('nICMSPart_vBC','0,00')&& this.flSetVar('nICMSPart_pRedBC','0,00')&& this.flSetVar('nICMSPart_pICMS','0,00')&& this.flSetVar('nICMSPart_vICMS','0,00')&& this.flSetVar('jICMSPart_modBCST',0)&& this.flSetVar('nICMSPart_pMVAST','0,00')&& this.flSetVar('nICMSPart_pRedBCT','0,00')&& this.flSetVar('nICMSPart_vBCST','0,00')&& this.flSetVar('nICMSPart_pICMSST','0,00')&& this.flSetVar('nICMSPart_vICMSST','0,00')&& this.flSetVar('nICMSPart_pBCOp','0,00')&& this.flSetVar('sICMSPart_UFST','')&& this.flSetVar('jICMSST_orig',0)&& this.flSetVar('jICMSST_CST',0)&& this.flSetVar('nICMSST_vBCSTRet','0,00')&& this.flSetVar('nICMSST_vICMSSTRe','0,00')&& this.flSetVar('nICMSST_vBCSTDest','0,00')&& this.flSetVar('nICMSST_vICMSSTDes','0,00')&& this.flSetVar('jGrupo_simples',0)&& this.flSetVar('jICMSSN_Orig',0)&& this.flSetVar('jICMSSN_CSOSN',0)&& this.flSetVar('jICMSSN_modBC',0)&& this.flSetVar('nICMSSN_vBC','0,00')&& this.flSetVar('nICMSSN_pRedBC','0,00')&& this.flSetVar('nICMSSN_pICMS','0,00')&& this.flSetVar('nICMSSN_vICMS','0,00')&& this.flSetVar('jICMSSN_modBCST',0)&& this.flSetVar('nICMSSN_pMVAST','0,00')&& this.flSetVar('nICMSSN_pRedBCST','0,00')&& this.flSetVar('nICMSSN_vBCST','0,00')&& this.flSetVar('nICMSSN_pICMSST','0,00')&& this.flSetVar('nICMSSN_vICMSST','0,00')&& this.flSetVar('nICMSSN_pCredSN','0,00')&& this.flSetVar('nICMSSN_vCredICMSSN','0,00')&& this.flSetVar('nICMSSN_vBCSTRet','0,00')&& this.flSetVar('nICMSSN_vICMSSTRet','0,00')&& this.flSetVar('sIPI_clEnq','')&& this.flSetVar('sIPI_CNPJProd','')&& this.flSetVar('sIPI_cSelo','')&& this.flSetVar('nIPI_qSelo','0,00')&& this.flSetVar('sIPI_cEnq','')&& this.flSetVar('jIPINT_CST',0)&& this.flSetVar('nIPITrib_vBC','0,00')&& this.flSetVar('nIPITrib_pIPI','0,00')&& this.flSetVar('nIPITrib_qUnid','0,00')&& this.flSetVar('nIPITrib_vUnid','0,00')&& this.flSetVar('nIPITrib_vIPI','0,00')&& this.flSetVar('jPIS_CST',0)&& this.flSetVar('nPIS_vBC','0,00')&& this.flSetVar('nPIS_pPIS','0,00')&& this.flSetVar('nPIS_qBCProd','0,00')&& this.flSetVar('nPIS_vAliqProd','0,00')&& this.flSetVar('nPIS_vPIS','0,00')&& this.flSetVar('nPISST_vBC','0,00')&& this.flSetVar('nPISST_pPIS','0,00')&& this.flSetVar('nPISST_qBCProd','0,00')&& this.flSetVar('nPISST_vAliqProd','0,00')&& this.flSetVar('nPISST_vPIS','0,00')&& this.flSetVar('jCOFINS_CST',0)&& this.flSetVar('nCOFINS_vBC','0,00')&& this.flSetVar('nCOFINS_pCOFINS','0,00')&& this.flSetVar('nCOFINS_qBCProd','0,00')&& this.flSetVar('nCOFINS_vAliqProd','0,00')&& this.flSetVar('nCOFINS_vCOFINS','0,00')&& this.flSetVar('nCOFINSST_vBC','0,00')&& this.flSetVar('nCOFINSST_pCOFINS','0,00')&& this.flSetVar('nCOFINSST_qBCProd','0,00')&& this.flSetVar('nCOFINSST_vAliqProd','0,00')&& this.flSetVar('nCOFINSST_vCOFINS','0,00')&& this.flSetVar('nISSQN_vBC','0,00')&& this.flSetVar('nISSQN_vAliq','0,00')&& this.flSetVar('nISSQN_vISSQN','0,00')&& this.flSetVar('nISSQN_cMunFG','0,00')&& this.flSetVar('nISSQN_cListServ','0,00')&& this.flSetVar('jISSQN_cSitTrib',0)&& this.flSetVar('mInfAdProd','')&& this.flSetVar('nVDescInc','0,00')&& this.flSetVar('pLote',0)&& this.flSetVar('fLote',0)&& this.flSetVar('sLote',''))
   Item                                      ; sNegCodItem-20                    ; identlabel=5      ; visible=(jTipo==1) ; esc=('dd_files/erp_PTOpED_Item.dda','Esc_Padrao_2','sNegCodItem,pTOper,pEmi,pDest,pOrdem','pPTOpEDItem,fPTOpEDItem,pItem,fItem,sNegCodItem,sRegDesItem,sEAN,sGTIN,jICMS_Orig,pUni,fUni,sCodUni,sUni,pNCM,fNCM,sCodNCM,sDesNCM,jFDiasEnt,iDiasInf,iDiasCalc,lInspecao,nPDescTpEDG,sTmp,nPrBruto,jCam,sMoe,pMoe,fMoe,lCCusto,lCrtlItem,nPEncFinTpED,lContQua,nQtMin,nQtMax,lContPreco,nPrecoMin,nPrecoMax,iCiclo,iCicloAtual,lSkipLote,stmp,pRegDepVen,fRegDepVen,pDep,pUFis,sUn1,sUn2,sUn3,sUn4,sUn5,sUn6,sUn7,sIns,pRegDepRFis,fRegDepRFis,pDepRFis,pUFisRFis,sUn1RFis,sUn2RFis,sUn3RFis,sUn4RFis,sUn5RFis,sUn6RFis,sUn7RFis,sInsRFis,jFinalidade,nAliqTranspImport,nAliqTranspNac,sCEST,pRegDepTransf,fRegDepTransf,pDepTransf,pUFisTransf,sUnTransf1,sUnTransf2,sUnTransf3,sUnTransf4,sUnTransf5,sUnTransf6,sUnTransf7,sInsTransf,iLote,jTempo,pDepInsp,fDepInsp,sUn1Insp,sUn2Insp,sUn3Insp,sUn4Insp,sUn5Insp,sUn6Insp,sUn7Insp,pDepReje,fDepReje,sUn1Reje,sUn2Reje,sUn3Reje,sUn4Reje,sUn5Reje,sUn6Reje,sUn7Reje,dUltInsp,pInsp,fInsp,lInt,pTmp1_{1},pCCusto_{1},fCCusto_{1},sCCusto_{1},nRatCCusto_{1},pTmp2_{2},pCContCred_{2},fCContCred_{2},sCodCredPla_{2},sDesCredPla_{2},nRatCredCCont_{2},pTmp3_{3},pCContDeb_{3},fCContDeb_{3},sCodDebPla_{3},sDesDebPla_{3},nRatDebCCont_{3}') ; exec=(( (pCapaMoe!=pMoe)?(this.flSetVar('nQtMoe',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nPrBruto','0,00000')):(this.flSetVar('nPrBruto',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nQtMoe','0,00000')))&& this.flSetVar('nVDescCP','0,00000')&& this.flSetVar('nVDescTpED','0,00000')&& this.flSetVar('nVEncFinTpED','0,00000')&& this.flSetVar('nVDescTpEDG','0,00000')&& this.flSetVar('sMoeCambio','')&& this.flSetVar('pCam',0)&& this.flSetVar('fCam',0)&& this.flSetVar('nCam','0,00000')&& this.flSetVar('sCam','')&& this.flSetVar('nProd_vUnCom','0,00000')&& this.flSetVar('nProd_vFrete','0,00')&& this.flSetVar('nVMLE','0,00')&& this.flSetVar('nProd_vSeg','0,00')&& this.flSetVar('nProd_vDesc','0,00000')&& this.flSetVar('nProd_vProd','0,00')&& this.flSetVar('pCFO',0)&& this.flSetVar('sCodCFO','')&& this.flSetVar('sAbrev','')&& this.flSetVar('fCFO',0)&& this.flSetVar('tEntPla','')&& this.flSetVar('tEmissao','')&& this.flSetVar('tSaida ','')&& this.flSetVar('sDI_nDI','')&& this.flSetVar('dDI_dDI','')&& this.flSetVar('sDI_xLocDesemb','')&& this.flSetVar('sDI_UFDesemb','')&& this.flSetVar('dDI_dDesemb','')&& this.flSetVar('sDI_cExportador','')&& this.flSetVar('nII_vBC','0,00')&& this.flSetVar('nII_vDespAdu','0,00')&& this.flSetVar('nII_vII','0,00')&& this.flSetVar('nII_vIOF','0,00')&& this.flSetVar('iAdi_nAdicao',0)&& this.flSetVar('iAdi_nSeqAdic',0)&& this.flSetVar('sAdi_cFabricante','')&& this.flSetVar('nAdi_vDescDI','0,00000')&& this.flSetVar('sAdi_xPed','')&& this.flSetVar('iAdi_nItemPed',0)&& this.flSetVar('nCIDE_qBCprod','0,00')&& this.flSetVar('nCIDE_vAliqProd','0,00')&& this.flSetVar('nCIDE_vCIDE','0,00')&& this.flSetVar('jICMS_GrupoTrib',0)&& this.flSetVar('jICMS_orig',0)&& this.flSetVar('jICMS_modBC',0)&& this.flSetVar('nICMS_pRedBC','0,00')&& this.flSetVar('nICMS_vBC','0,00')&& this.flSetVar('nICMS_pICMS','0,00')&& this.flSetVar('nICMS_vICMS','0,00')&& this.flSetVar('jICMS_modBCST',0)&& this.flSetVar('nICMS_pMVAST','0,00')&& this.flSetVar('nICMS_pRedBCST','0,00')&& this.flSetVar('nICMS_vBCST','0,00')&& this.flSetVar('nICMS_pICMSST','0,00')&& this.flSetVar('nICMS_vICMSST','0,00')&& this.flSetVar('nICMS_vBCSTRet','0,00')&& this.flSetVar('nICMS_vICMSSTRet','0,00')&& this.flSetVar('jICMS_motDesICMS',0)&& this.flSetVar('jICMSPart_orig',0)&& this.flSetVar('jICMSPart_CST',0)&& this.flSetVar('jICMSPart_modBC',0)&& this.flSetVar('nICMSPart_vBC','0,00')&& this.flSetVar('nICMSPart_pRedBC','0,00')&& this.flSetVar('nICMSPart_pICMS','0,00')&& this.flSetVar('nICMSPart_vICMS','0,00')&& this.flSetVar('jICMSPart_modBCST',0)&& this.flSetVar('nICMSPart_pMVAST','0,00')&& this.flSetVar('nICMSPart_pRedBCT','0,00')&& this.flSetVar('nICMSPart_vBCST','0,00')&& this.flSetVar('nICMSPart_pICMSST','0,00')&& this.flSetVar('nICMSPart_vICMSST','0,00')&& this.flSetVar('nICMSPart_pBCOp','0,00')&& this.flSetVar('sICMSPart_UFST','')&& this.flSetVar('jICMSST_orig',0)&& this.flSetVar('jICMSST_CST',0)&& this.flSetVar('nICMSST_vBCSTRet','0,00')&& this.flSetVar('nICMSST_vICMSSTRe','0,00')&& this.flSetVar('nICMSST_vBCSTDest','0,00')&& this.flSetVar('nICMSST_vICMSSTDes','0,00')&& this.flSetVar('jGrupo_simples',0)&& this.flSetVar('jICMSSN_Orig',0)&& this.flSetVar('jICMSSN_CSOSN',0)&& this.flSetVar('jICMSSN_modBC',0)&& this.flSetVar('nICMSSN_vBC','0,00')&& this.flSetVar('nICMSSN_pRedBC','0,00')&& this.flSetVar('nICMSSN_pICMS','0,00')&& this.flSetVar('nICMSSN_vICMS','0,00')&& this.flSetVar('jICMSSN_modBCST',0)&& this.flSetVar('nICMSSN_pMVAST','0,00')&& this.flSetVar('nICMSSN_pRedBCST','0,00')&& this.flSetVar('nICMSSN_vBCST','0,00')&& this.flSetVar('nICMSSN_pICMSST','0,00')&& this.flSetVar('nICMSSN_vICMSST','0,00')&& this.flSetVar('nICMSSN_pCredSN','0,00')&& this.flSetVar('nICMSSN_vCredICMSSN','0,00')&& this.flSetVar('nICMSSN_vBCSTRet','0,00')&& this.flSetVar('nICMSSN_vICMSSTRet','0,00')&& this.flSetVar('sIPI_clEnq','')&& this.flSetVar('sIPI_CNPJProd','')&& this.flSetVar('sIPI_cSelo','')&& this.flSetVar('nIPI_qSelo','0,00')&& this.flSetVar('sIPI_cEnq','')&& this.flSetVar('jIPINT_CST',0)&& this.flSetVar('nIPITrib_vBC','0,00')&& this.flSetVar('nIPITrib_pIPI','0,00')&& this.flSetVar('nIPITrib_qUnid','0,00')&& this.flSetVar('nIPITrib_vUnid','0,00')&& this.flSetVar('nIPITrib_vIPI','0,00')&& this.flSetVar('jPIS_CST',0)&& this.flSetVar('nPIS_vBC','0,00')&& this.flSetVar('nPIS_pPIS','0,00')&& this.flSetVar('nPIS_qBCProd','0,00')&& this.flSetVar('nPIS_vAliqProd','0,00')&& this.flSetVar('nPIS_vPIS','0,00')&& this.flSetVar('nPISST_vBC','0,00')&& this.flSetVar('nPISST_pPIS','0,00')&& this.flSetVar('nPISST_qBCProd','0,00')&& this.flSetVar('nPISST_vAliqProd','0,00')&& this.flSetVar('nPISST_vPIS','0,00')&& this.flSetVar('jCOFINS_CST',0)&& this.flSetVar('nCOFINS_vBC','0,00')&& this.flSetVar('nCOFINS_pCOFINS','0,00')&& this.flSetVar('nCOFINS_qBCProd','0,00')&& this.flSetVar('nCOFINS_vAliqProd','0,00')&& this.flSetVar('nCOFINS_vCOFINS','0,00')&& this.flSetVar('nCOFINSST_vBC','0,00')&& this.flSetVar('nCOFINSST_pCOFINS','0,00')&& this.flSetVar('nCOFINSST_qBCProd','0,00')&& this.flSetVar('nCOFINSST_vAliqProd','0,00')&& this.flSetVar('nCOFINSST_vCOFINS','0,00')&& this.flSetVar('nISSQN_vBC','0,00')&& this.flSetVar('nISSQN_vAliq','0,00')&& this.flSetVar('nISSQN_vISSQN','0,00')&& this.flSetVar('nISSQN_cMunFG','0,00')&& this.flSetVar('nISSQN_cListServ','0,00')&& this.flSetVar('jISSQN_cSitTrib',0)&& this.flSetVar('mInfAdProd','')&& this.flSetVar('pLote',0)&& this.flSetVar('fLote',0)&& this.flSetVar('sLote','')&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5)))  
   Item                                      ; sTabCodItem-20                    ; identlabel=5      ; visible=(jTipo==2) ; esc=('dd_files/erp_PTOpED_Item.dda','Esc_Padrao_3','sTabCodItem,pTOper,pEmi,pDest,pOrdem','pPTOpEDItem,fPTOpEDItem,pTab,fTab,pTabI,fTabI,pItem,fItem,sTabCodItem,sRegDesItem,sCodTab,sDesTab,sEAN,sGTIN,jICMS_Orig,pUni,fUni,sCodUni,sUni,pNCM,fNCM,sCodNCM,sDesNCM,jFDiasEnt,iDiasInf,iDiasCalc,lInspecao,nPDescTpEDG,sTmp,nPrBruto,jCam,sMoe,pMoe,fMoe,lCCusto,lCrtlItem,nPEncFinTpED,lContQua,nQtMin,nQtMax,lContPreco,nPrecoMin,nPrecoMax,iCiclo,iCicloAtual,lSkiLote,stmp,pRegDepVen,fRegDepVen,pDep,pUFis,sUn1,sUn2,sUn3,sUn4,sUn5,sUn6,sUn7,sIns,pRegDepRFis,fRegDepRFis,pDepRFis,pUFisRFis,sUn1RFis,sUn2RFis,sUn3RFis,sUn4RFis,sUn5RFis,sUn6RFis,sUn7RFis,sInsRFis,jFinalidade,nAliqTranspImport,nAliqTranspNac,sCEST,pRegDepTransf,fRegDepTransf,pDepTransf,pUFisTransf,sUnTransf1,sUnTransf2,sUnTransf3,sUnTransf4,sUnTransf5,sUnTransf6,sUnTransf7,sInsTransf,iLote,jTempo,pDepInsp,fDepInsp,sUn1Insp,sUn2Insp,sUn3Insp,sUn4Insp,sUn5Insp,sUn6Insp,sUn7Insp,pDepReje,fDepReje,sUn1Reje,sUn2Reje,sUn3Reje,sUn4Reje,sUn5Reje,sUn6Reje,sUn7Reje,dUltInsp,pInsp,fInsp,lInt,pTmp1_{1},pCCusto_{1},fCCusto_{1},sCCusto_{1},nRatCCusto_{1},pTmp2_{2},pCContCred_{2},fCContCred_{2},sCodCredPla_{2},sDesCredPla_{2},nRatCredCCont_{2},pTmp3_{3},pCContDeb_{3},fCContDeb_{3},sCodDebPla_{3},sDesDebPla_{3},nRatDebCCont_{3}') ; exec=(((pCapaMoe!=pMoe)?(this.flSetVar('nQtMoe',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nPrBruto','0,00000')):(this.flSetVar('nPrBruto',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nQtMoe','0,00000')))&& this.flSetVar('nVDescCP','0,00000')&& this.flSetVar('nVDescTpED','0,00000')&& this.flSetVar('nVEncFinTpED','0,00000')&& this.flSetVar('nVDescTpEDG','0,00000')&& this.flSetVar('sMoeCambio','')&& this.flSetVar('pCam',0)&& this.flSetVar('fCam',0)&& this.flSetVar('nCam','0,00000')&& this.flSetVar('sCam','')&& this.flSetVar('nProd_vUnCom','0,00000')&& this.flSetVar('nProd_vFrete','0,00')&& this.flSetVar('nVMLE','0,00')&& this.flSetVar('nProd_vSeg','0,00')&& this.flSetVar('nProd_vDesc','0,00000')&& this.flSetVar('nProd_vProd','0,00')&& this.flSetVar('pCFO',0)&& this.flSetVar('sCodCFO','')&& this.flSetVar('sAbrev','')&& this.flSetVar('fCFO',0)&& this.flSetVar('tEntPla','')&& this.flSetVar('tEmissao','')&& this.flSetVar('tSaida ','')&& this.flSetVar('sDI_nDI','')&& this.flSetVar('dDI_dDI','')&& this.flSetVar('sDI_xLocDesemb','')&& this.flSetVar('sDI_UFDesemb','')&& this.flSetVar('dDI_dDesemb','')&& this.flSetVar('sDI_cExportador','')&& this.flSetVar('nII_vBC','0,00')&& this.flSetVar('nII_vDespAdu','0,00')&& this.flSetVar('nII_vII','0,00')&& this.flSetVar('nII_vIOF','0,00')&& this.flSetVar('iAdi_nAdicao',0)&& this.flSetVar('iAdi_nSeqAdic',0)&& this.flSetVar('sAdi_cFabricante','')&& this.flSetVar('nAdi_vDescDI','0,00000')&& this.flSetVar('sAdi_xPed','')&& this.flSetVar('iAdi_nItemPed',0)&& this.flSetVar('nCIDE_qBCprod','0,00')&& this.flSetVar('nCIDE_vAliqProd','0,00')&& this.flSetVar('nCIDE_vCIDE','0,00')&& this.flSetVar('jICMS_GrupoTrib',0)&& this.flSetVar('jICMS_orig',0)&& this.flSetVar('jICMS_modBC',0)&& this.flSetVar('nICMS_pRedBC','0,00')&& this.flSetVar('nICMS_vBC','0,00')&& this.flSetVar('nICMS_pICMS','0,00')&& this.flSetVar('nICMS_vICMS','0,00')&& this.flSetVar('jICMS_modBCST',0)&& this.flSetVar('nICMS_pMVAST','0,00')&& this.flSetVar('nICMS_pRedBCST','0,00')&& this.flSetVar('nICMS_vBCST','0,00')&& this.flSetVar('nICMS_pICMSST','0,00')&& this.flSetVar('nICMS_vICMSST','0,00')&& this.flSetVar('nICMS_vBCSTRet','0,00')&& this.flSetVar('nICMS_vICMSSTRet','0,00')&& this.flSetVar('jICMS_motDesICMS',0)&& this.flSetVar('jICMSPart_orig',0)&& this.flSetVar('jICMSPart_CST',0)&& this.flSetVar('jICMSPart_modBC',0)&& this.flSetVar('nICMSPart_vBC','0,00')&& this.flSetVar('nICMSPart_pRedBC','0,00')&& this.flSetVar('nICMSPart_pICMS','0,00')&& this.flSetVar('nICMSPart_vICMS','0,00')&& this.flSetVar('jICMSPart_modBCST',0)&& this.flSetVar('nICMSPart_pMVAST','0,00')&& this.flSetVar('nICMSPart_pRedBCT','0,00')&& this.flSetVar('nICMSPart_vBCST','0,00')&& this.flSetVar('nICMSPart_pICMSST','0,00')&& this.flSetVar('nICMSPart_vICMSST','0,00')&& this.flSetVar('nICMSPart_pBCOp','0,00')&& this.flSetVar('sICMSPart_UFST','')&& this.flSetVar('jICMSST_orig',0)&& this.flSetVar('jICMSST_CST',0)&& this.flSetVar('nICMSST_vBCSTRet','0,00')&& this.flSetVar('nICMSST_vICMSSTRe','0,00')&& this.flSetVar('nICMSST_vBCSTDest','0,00')&& this.flSetVar('nICMSST_vICMSSTDes','0,00')&& this.flSetVar('jGrupo_simples',0)&& this.flSetVar('jICMSSN_Orig',0)&& this.flSetVar('jICMSSN_CSOSN',0)&& this.flSetVar('jICMSSN_modBC',0)&& this.flSetVar('nICMSSN_vBC','0,00')&& this.flSetVar('nICMSSN_pRedBC','0,00')&& this.flSetVar('nICMSSN_pICMS','0,00')&& this.flSetVar('nICMSSN_vICMS','0,00')&& this.flSetVar('jICMSSN_modBCST',0)&& this.flSetVar('nICMSSN_pMVAST','0,00')&& this.flSetVar('nICMSSN_pRedBCST','0,00')&& this.flSetVar('nICMSSN_vBCST','0,00')&& this.flSetVar('nICMSSN_pICMSST','0,00')&& this.flSetVar('nICMSSN_vICMSST','0,00')&& this.flSetVar('nICMSSN_pCredSN','0,00')&& this.flSetVar('nICMSSN_vCredICMSSN','0,00')&& this.flSetVar('nICMSSN_vBCSTRet','0,00')&& this.flSetVar('nICMSSN_vICMSSTRet','0,00')&& this.flSetVar('sIPI_clEnq','')&& this.flSetVar('sIPI_CNPJProd','')&& this.flSetVar('sIPI_cSelo','')&& this.flSetVar('nIPI_qSelo','0,00')&& this.flSetVar('sIPI_cEnq','')&& this.flSetVar('jIPINT_CST',0)&& this.flSetVar('nIPITrib_vBC','0,00')&& this.flSetVar('nIPITrib_pIPI','0,00')&& this.flSetVar('nIPITrib_qUnid','0,00')&& this.flSetVar('nIPITrib_vUnid','0,00')&& this.flSetVar('nIPITrib_vIPI','0,00')&& this.flSetVar('jPIS_CST',0)&& this.flSetVar('nPIS_vBC','0,00')&& this.flSetVar('nPIS_pPIS','0,00')&& this.flSetVar('nPIS_qBCProd','0,00')&& this.flSetVar('nPIS_vAliqProd','0,00')&& this.flSetVar('nPIS_vPIS','0,00')&& this.flSetVar('nPISST_vBC','0,00')&& this.flSetVar('nPISST_pPIS','0,00')&& this.flSetVar('nPISST_qBCProd','0,00')&& this.flSetVar('nPISST_vAliqProd','0,00')&& this.flSetVar('nPISST_vPIS','0,00')&& this.flSetVar('jCOFINS_CST',0)&& this.flSetVar('nCOFINS_vBC','0,00')&& this.flSetVar('nCOFINS_pCOFINS','0,00')&& this.flSetVar('nCOFINS_qBCProd','0,00')&& this.flSetVar('nCOFINS_vAliqProd','0,00')&& this.flSetVar('nCOFINS_vCOFINS','0,00')&& this.flSetVar('nCOFINSST_vBC','0,00')&& this.flSetVar('nCOFINSST_pCOFINS','0,00')&& this.flSetVar('nCOFINSST_qBCProd','0,00')&& this.flSetVar('nCOFINSST_vAliqProd','0,00')&& this.flSetVar('nCOFINSST_vCOFINS','0,00')&& this.flSetVar('nISSQN_vBC','0,00')&& this.flSetVar('nISSQN_vAliq','0,00')&& this.flSetVar('nISSQN_vISSQN','0,00')&& this.flSetVar('nISSQN_cMunFG','0,00')&& this.flSetVar('nISSQN_cListServ','0,00')&& this.flSetVar('jISSQN_cSitTrib',0)&& this.flSetVar('mInfAdProd','')&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))) 
                                             ; sRegDesItem-60                    ; identlabel=5      ; editable=false     ; 
   ;
   Tabela de Preo                           ; sCodTab-30                        ; identlabel=5      ; editable=false     ; visible=(jTipo==2)
                                             ; sDesTab-60                        ; identlabel=5      ; editable=false     ; visible=(jTipo==2)
   ; ; visible=(jTipo==2)
   Finalidade do Consumo                     ; aFinalidade[jFinalidade]    ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
   ; ; visible=(sDDFTagApl!='Padrao_3')
   Qt.Pedida                                 ; nQt-15-5                          ; identlabel=5      ; exec=(this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))) ; valid=(((lInt==0) || (nQt==parseInt(nQt))),'A quantidade deve ser um numero inteiro')
   Unidade Medida                            ; sCodUni-10                        ; identlabel=5      ; visible=(sDDFTagApl!='Padrao_3') ; esc=('dd_files/erp_UnidadeMedida.dda','Esc_Padrao_1','sCodUni','pUni,sCodUni,sUni,fUni,stmp,lInt') ; 
   ; ; visible=(sDDFTagApl!='Padrao_3')
   Valor [UN] em Moeda Estrangeira           ; nQtMoe-18-5                       ; identlabel=10     ; editable=(jTipo==0) ; visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3'))                  ; exec=(this.flSetVar('nPrBruto',fsReplaceDecimalPoint((nQtMoe*nCam),".",",",5))&& this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDFin),".",",",5))&& this.flSetVar('nVDescTpED',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDescFin),".",",",5))&& this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nPDescTpEDG),".",",",5))&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nQtMoe*nCam)-(nVDescInc+((nQtMoe*nCam)/100*(nDFin))+((nQtMoe*nCam)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nQtMoe*nCam)-(nVDescInc+((nQtMoe*nCam)/100*(nDFin))+((nQtMoe*nCam)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5)))
   <i>(na importao esse  o campo do Valor [UN] da Mercadoria no Local de Embarque em moeda estrangeira)</i>    ;; colspan=true ; visible=((jOrig==1)&&(pCapaMoe!=pMoe)&&(pMoe>0)&&(sDDFTagApl!='Padrao_3')) ; identlabel=10 ; fontlen=-1 ;  fontcolor='00AA00'
   ; ; visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3'))
   Cambio                                    ; aCam[jCam]                        ; identlabel=10     ; editable=(jTipo==0) ; visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3')) ; 
   Cotao                                   ; sMoeCambio-50                     ; identlabel=15     ;                       visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3')) ; esc=('dd_files/erp_Cambio.dda','Esc_Padrao_2','sMoeCambio,pMoe,pCapaMoe','pCam,nCam,fCam,sCam,sMoeCambio') ;  exec=(this.flSetVar('nPrBruto',fsReplaceDecimalPoint((nQtMoe*nCam),".",",",5) )&& this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDFin),".",",",5))&& this.flSetVar('nVDescTpED',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDescFin),".",",",5))&& this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nPDescTpEDG),".",",",5))&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint(((nQtMoe*nCam))-(nVDescInc+(((nQtMoe*nCam))/100*(nDFin))+(((nQtMoe*nCam))/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint(((((nQtMoe*nCam))-(nVDescInc+(((nQtMoe*nCam))/100*(nDFin))+(((nQtMoe*nCam))/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5)))
   Valor do Cambio                           ; nCam-15-5                         ; identlabel=15     ;                       visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false ;                   
   Data do Cambio                            ; sCam-20                           ; identlabel=15     ;                       visible=((pCapaMoe!=pMoe) && (pMoe>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false ;                   
   (*) Os valores abaixo esto expressos em moeda operao. ; ; fontcolor='00AA00' ; visible=(sDDFTagApl!='Padrao_3')
   <b>Valor [UN] Bruto</b>                      ; nPrBruto-15-9                     ;                   ; identlabel=5  ; editable=((jTipo==0) && (pCapaMoe==pMoe) && (pMoe>0)) ; exec=(this.flSetVar('nVDescInc',fsReplaceDecimalPoint(((nPrBruto)/100*nPDescInc),".",",",5))&& this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin),".",",",5))&& this.flSetVar('nVDescTpED',fsReplaceDecimalPoint((nPrBruto/100*nDescFin),".",",",5))&& this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint((nPrBruto/100*nPDescTpEDG),".",",",5))&& this.flSetVar('nVDescLog',fsReplaceDecimalPoint((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))) ; fontlen=-1
   <i>(esse  o campo do Valor [UN] da Mercadoria no Local de Embarque em moeda da operao)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
   ; ; visible=(sDDFTagApl!='Padrao_3')
   <b>Descontos sobre Valor [UN] Bruto</b>     ; iDesc2-15,iDesc1-15                   ; editable=false      ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
   [$][%]  Desconto Incondicional  [UN]        ; nVDescInc-15-5,nPDescInc-15-5         ; identlabel=10       ; exec=(this.flSetVar('nVDescInc',fsReplaceDecimalPoint(((nPrBruto)/100*nPDescInc),".",",",5))&& this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin),".",",",5))&& this.flSetVar('nVDescLog',fsReplaceDecimalPoint((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))) ; 1-editable=false
   Desconto em %                               ; nPDescTpEDG-15-5                      ; editable=(jTipo==2) ; identlabel=10 ; exec=(this.flSetVar('nVDescInc',fsReplaceDecimalPoint(((nPrBruto)/100*nPDescInc),".",",",5))&& this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin),".",",",5))&& this.flSetVar('nVDescTpED',fsReplaceDecimalPoint((nPrBruto/100*nDescFin),".",",",5))&& this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint((nPrBruto/100*nPDescTpEDG),".",",",5))&& this.flSetVar('nVDescLog',fsReplaceDecimalPoint((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))) ; visible=(sDDFTagApl!='Padrao_3') ; rightlabel=<span style='color: #00AA00_ font-size: 9px_'>[Tipo de Operao / Emissor / Destinatrio / Grupo de Itens]</span>
   Encargos Financeiros                        ; nVEncFinTpED-15-5,nPEncFinTpED-15-5   ; editable=false      ; identlabel=10 ;                            visible=(sDDFTagApl!='Padrao_3') ; rightlabel=<span style='color: #00AA00_ font-size: 9px_'>[Tipo de Operao / Emissor / Destinatrio] / Grupo de Itens]</span>
   Acrscimo de Contrato                       ; nVAcresCRTOsa-15-5,nPAcresCRTOsa-15-5 ; editable=false      ; identlabel=10 ;                            visible=(sDDFTagApl!='Padrao_3') ; rightlabel=<span style='color: #00AA00_ font-size: 9px_'>[Emissor / Destinatrio] / CTR]</span>
   Desconto Condio de Pagamento              ; nVDescCP-15-5,nDFin-15-5              ; editable=false      ; identlabel=10 ;                            visible=(sDDFTagApl!='Padrao_3') ; rightlabel=<span style='color: #00AA00_ font-size: 9px_'>[Emissor / Destinatrio / Condio de Pagamento]</span>
   Desconto Logistico                          ; nVDescLog-15-5,nPDescLog-15-5         ; editable=false      ; identlabel=10 ; exec=(this.flSetVar('nVDescLog',fsReplaceDecimalPoint(((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))&& this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))&& this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))) ; visible=(sDDFTagApl!='Padrao_3') ; rightlabel=<span style='color: #00AA00_ font-size: 9px_'>[Tipo de Operao / Emissor / Destinatrio]</span>
<b>Valor [UN] Comercial</b>                    ; nProd_vUnCom-15-5                 ; editable=false ; identlabel=5 ; fontlen=-1 ; visible=(sDDFTagApl!='Padrao_3')
   <i>(esse  o campo do Valor [UN] da Mercadoria no Local de Embarque em moeda da operao)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
; ; visible=(sDDFTagApl!='Padrao_3')
   Valor [Total] Frete                       ; nProd_vFrete-15-2                 ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
   Valor [Total] Seguro                      ; nProd_vSeg-15-2                   ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
   Valor [Total] Outras Despesas             ; nProd_vOutro-15-2                 ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
<i>(obter do DI quando importao - siscomex)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
   Valor [Total] Imposto Importao          ; nII_vII-15-2                      ; identlabel=5 ; editable=false ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3'))
<i>(o valor desse campo s  obtido aps salvar, ele no  atualizado durante a edio)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
<b>Valor [Total] Comercial</b>               ; nProd_vProd-15-5                  ; editable=false ; identlabel=5 ; fontlen=-1
<b>Valor [Total] Contrato</b>                ; nCTR_VlCalcI-15-5                 ; editable=false ; identlabel=5 ; fontlen=-1
<i>(esse  o campo do Valor [TOTAL] da Mercadoria no Local de Embarque em moeda da operao)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
<b>Valor [Total] Comercial da Importao</b> ; nVTCI-15-2                        ; identlabel=5 ; editable=false ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; fontlen=-1
 <i>(Valor [Total] Comercial + Frete + Seguro + Imposto Importao -> o valor desse campo s  obtido aps salvar, ele no  atualizado durante a edio)</i>    ;; colspan=true ; visible=((jOrig==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00'
   ;; visible=(sDDFTagApl!='Padrao_3')
    Valor [Total] Desconto Condicional        ; nProd_vDesc-15-2                  ; exec=(this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))) ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
    ;
  ; btn_SalvarInc    ; onclick={this}.flOnSubmit(1) ; value=Salvar e Incluir Prximo
  ; btn_Salvar       ; onclick={this}.flOnSubmit()  ; value=Salvar
    ;
    Moeda                                     ; sMoe-50                           ; identlabel=5      ; editable=(jTipo==0) ; visible=(sDDFTagApl!='Padrao_3')                                                  ; esc=('dd_files/erp_Moeda.dda','Esc_Padrao_1','sMoe','pMoe,sCodMoe,sMoe,fMoe') ; exec=(this.flSetVar('sMoeCambio','')&& this.flSetVar('pCam','0')&& this.flSetVar('nCam','0,00000')&& this.flSetVar('fCam','0')&& this.flSetVar('sCam','')&& this.flSetVar('nVDescCP','0,00000')&& this.flSetVar('nVDescTpED','0,00000')&& this.flSetVar('nVEncFinTpED','0,00000')&& this.flSetVar('nVDescTpEDG','0,00000')&& this.flSetVar('nQtMoe','0,00000')&& this.flSetVar('nProd_vUnCom','0,00000'))
    ;
   Motivo dessa alterao                    ; sCodMotAltPed-30                  ; identlabel=5      ; visible=((jEntSai==1)&&(iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; esc=('dd_files/erp_MotivoAltPedidosClientes.dda','Esc_Padrao_1','sCodMotAltPed','pMotAltPed,sCodMotAltPed,sDesMotAltPed,fMotAltPed') ; 
                                             ; sDesMotAltPed-60                  ; identlabel=5      ; visible=((jEntSai==1)&&(iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false
   ; ; visible=((iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))
   ;
   Motivo da ltima alterao                ; sCodMotAltPe2-30                  ; identlabel=5      ; visible=((iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false
                                             ; sDesMotAltPe2-60                  ; identlabel=5      ; visible=((iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false
   ; ; visible=((iDDFChamada>0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))
   ; ; visible=(sDDFTagApl!='Padrao_3')
    Base Calculo PIS                            ; aBC[jBC_PIS]                          ; identlabel=5  ; rightlabel=[Informada quando importao] ; visible=(sDDFTagApl!='Padrao_3')
   Valor da Base Calculo PIS                   ; nBC_PIS-10-2                          ; identlabel=5  ; editable=(jBC_PIS==1)    ; visible=((jBC_PIS==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter do DI quando importao]
   Base Calculo COFINS                         ; aBC[jBC_COFINS]                       ; identlabel=5  ; rightlabel=[Informada quando importao] ; visible=(sDDFTagApl!='Padrao_3')
   Valor da Base Calculo COFINS                ; nBC_COFINS-10-2                       ; identlabel=5  ; editable=(jBC_COFINS==1) ; visible=((jBC_COFINS==1)&&(sDDFTagApl!='Padrao_3')) ; rightlabel=[obter do DI quando importao]
   Base Calculo ICMS                           ; aBC[jBC_ICMS]                         ; identlabel=5  ;  visible=(sDDFTagApl!='Padrao_3')
   <i>(deve ser informada apenas para conta de energia eletrica e telefonia)</i>       ;; colspan=true ; identlabel=5 ; fontlen=-1 ;  fontcolor='00AA00' ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   Valor da Base Calculo ICMS                  ; nBC_ICMS-10-2                         ; identlabel=5  ; editable=(jBC_ICMS==1)    ; visible=((jBC_ICMS==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter da Nota Fiscal]
   Base Calculo IPI                            ; aBC[jBC_IPI]                          ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
   Valor da Base Calculo IPI                   ; nBC_IPI-10-2                          ; identlabel=5  ; editable=(jBC_IPI==1)    ; visible=((jBC_IPI==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter da Nota Fiscal]
    Base Calculo ICMS ST                       ; aBC[jBC_ICMSST]                       ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
    Valor da Base Calculo ICMS ST              ; nBC_ICMSST-10-2                       ; identlabel=5  ; editable=(jBC_ICMSST==1)    ; visible=((jBC_ICMSST==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter da Nota Fiscal]
    Valor do ICMS                              ; aBC[jVl_ICMS]                         ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
    Valor Informado do ICMS                    ; nVl_ICMS-10-2                         ; identlabel=5  ; editable=(jVl_ICMS==1)    ; visible=((jVl_ICMS==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter da Nota Fiscal]
    Valor do ICMS-ST                           ; aBC[jVl_ICMSST]                       ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
    Valor Informado do ICMS-ST                 ; nVl_ICMSST-10-2                       ; identlabel=5  ; editable=(jVl_ICMSST==1)    ; visible=((jVl_ICMSST==1)&&(sDDFTagApl!='Padrao_3'))   ; rightlabel=[obter da Nota Fiscal]
   ;; visible=(sDDFTagApl!='Padrao_3')
   Atualiza Custo do Item                    ; lCCusto            ; identlabel=5 ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   ; ; visible=(sDDFTagApl!='Padrao_3')
   Nmero da FCI                             ; sFCI-36                           ; identlabel=5  ; visible=(sDDFTagApl!='Padrao_3')
; ; visible=(sDDFTagApl!='Padrao_3')
   Informaes Adicionais do Produto         ; mInfAdProd-40-5-500               ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3')
   ; ; visible=(sDDFTagApl!='Padrao_3')
   Cdigo NCM                                ; sCodNCM-8                         ; identlabel=5      ; editable=false ; visible=(sDDFTagApl!='Padrao_3') 
   Descrico                                 ; sDesNCM-60                        ; identlabel=5      ; editable=false ; visible=(sDDFTagApl!='Padrao_3')
   ;
   Cdigo CEST                               ; sCEST-s-7                         ; identlabel=5      ; editable=false     ; 
   ;
   CFOP                                      ; sCodCFO-20                        ; identlabel=5      ; editable=false ; visible=(sDDFTagApl!='Padrao_3')
   Abreviatura                               ; sAbrev-60                         ; identlabel=5      ; editable=false ; visible=(sDDFTagApl!='Padrao_3')
   ;
   ; ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   Emisso                                   ; tEmissao-20                       ; identlabel=5 ; editable=false ; visible=((iDDFChamada>0)&&(sDDFTagApl!='Padrao_3'))
   Sada                                     ; tSaida-20                         ; identlabel=5 ; editable=false ; visible=((iDDFChamada>0)&&(sDDFTagApl!='Padrao_3'))
   ;; visible=(sDDFTagApl!='Padrao_3')
   <b>Quantidades</b>                        ;                                   ; identlabel=5 ; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) 
   Pedida                                    ; nQtPed-18-5                       ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Reservada                                 ; nQtRes-18-5                       ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Liberada                                  ; nQtLib-18-5                       ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Carregada                                 ; nQtCarga-18-5                     ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Entregue                                  ; nQtEnt-18-5                       ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Faturada                                  ; nQtFat-18-5                       ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Cancelada                                 ; nQtCanc-18-5                      ; identlabel=10; editable=false ; visible=((iDDFChamada>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
;
Rateios ;; fontweight='bold'; visible=((lFinanc==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5 ;
; ; visible=((lFinanc==1)&&(sDDFTagApl!='Padrao_3'))
Centros de RECEBIMENTOS    ;; fontweight='bold'; identlabel=10 ; visible=((lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
Centros de CUSTOS/RECEITAS ;; fontweight='bold'; identlabel=10 ; visible=((lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   SubGrid-1 {
      (i))      ; sCCusto_i-50 ; identlabel=15 ; esc=('dd_files/erp_CCusto.dda','Esc_Padrao_1','sCCusto_i','pCCusto_i,sTmp,sCCusto_i,fCCusto_i') ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_3'))
      % Rateio Custos/Receitas ; nRatCCusto_i-18-2 ; identlabel=15 ; visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_3'))
   }
   <span style='color: #00AA00_ text-decoration: underline_ cursor: pointer_' onclick='oTelaDefault.flIncSubGrid(1,"pCCusto")_'>Incluir</span> ; ; identlabel=15; visible=((iDDFChamada<2)&&(lFinanc==1)&&(sDDFTagApl!='Padrao_3'))
   ;;  visible=(((i))<=(iTotLinSubGridPreenchidos_1)&&(sDDFTagApl!='Padrao_3'))
; ; visible=((lFinanc==1)&&(sDDFTagApl!='Padrao_3'))
Contas Contbeis de CRDITO;; fontweight='bold'; identlabel=10 ; visible=((lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) ;
   SubGrid-2 {
     (i)) Plano de Contas CRDITO     ; sCodCredPla_i-10       ; identlabel=15 ; esc=('dd_files/erp_PlaConta.dda','Esc_Padrao_1','sCodCredPla_i','pCContCred_i,sCodCredPla_i,sDesCredPla_i,fCContCred_i') ;  visible=(((i))<=(iTotLinSubGridPreenchidos_2)&&(lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
     Descrio                        ; sDesCredPla_i-30       ; identlabel=19 ; editable=false ; visible=(((i))<=(iTotLinSubGridPreenchidos_2)&&(lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
     % Rateio de Crdito              ; nRatCredCCont_i-18-2   ; identlabel=15 ;  visible=(((i))<=(iTotLinSubGridPreenchidos_2)&&(lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
                                      ;                                      ; visible=(((i))<=(iTotLinSubGridPreenchidos_2)&&(lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   }
   <span style='color: #00AA00_ text-decoration: underline_ cursor: pointer_' onclick='oTelaDefault.flIncSubGrid(2,"pCContCred")_'>Incluir</span> ; ; identlabel=15; visible=((iDDFChamada<2)&&(lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
  ; ; visible=((lFinanc==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
Contas Contbeis de DBITO;; fontweight='bold'; identlabel=10; visible=((lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   SubGrid-3 {
     (i)) Plano de Contas DBITO      ; sCodDebPla_i-10     ; identlabel=15 ; esc=('dd_files/erp_PlaConta.dda','Esc_Padrao_1','sCodDebPla_i','pCContDeb_i,sCodDebPla_i,sDesDebPla_i,fCContDeb_i') ;  visible=(((i))<=(iTotLinSubGridPreenchidos_3)&&(lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))	
     Descrio                        ; sDesDebPla_i-30     ; identlabel=19 ; editable=false ; visible=(((i))<=(iTotLinSubGridPreenchidos_3)&&(lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
     % Rateio de Dbito               ; nRatDebCCont_i-18-2   ;  identlabel=15 ; visible=(((i))<=(iTotLinSubGridPreenchidos_3)&&(lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
                                      ;                                     ; visible=(((i))<=(iTotLinSubGridPreenchidos_3)&&(lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   }
   <span style='color: #00AA00_ text-decoration: underline_ cursor: pointer_' onclick='oTelaDefault.flIncSubGrid(3,"pCContDeb")_'>Incluir</span> ; ; identlabel=15; visible=((iDDFChamada<2)&&(lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
;  ; visible=((lFinanc==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
Logstica  ;; fontweight='bold'    ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5
     Depsito Entrada              ; sUn1RFis-50            ; identlabel=10  ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3')) ; esc=('dd_files/erp_EST_RegDepositos.dda','Esc_Padrao_1','sUn1RFis,pItem,pEmi','pRegDepRFis,sUn1RFis,sUn2RFis,sUn3RFis,sUn4RFis,sUn5RFis,sUn6RFis,sUn7RFis,sInsRFis,fRegDepRFis,sUnidade') 
                                   ; sUn2RFis-50            ; editable=false ; visible=((sUn2RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
                                   ; sUn3RFis-50            ; editable=false ; visible=((sUn3RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn4RFis-50            ; editable=false ; visible=((sUn4RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn5RFis-50            ; editable=false ; visible=((sUn5RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn6RFis-50            ; editable=false ; visible=((sUn6RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn7RFis-50            ; editable=false ; visible=((sUn7RFis!='')&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3')) 
  	  Instncia                     ; sInsRFis-50            ; editable=false ; identlabel=10 ; visible=((lCrtlItem==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
    ;; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
Logstica  ;; fontweight='bold'    ; visible=((jEntSai==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5
   Realiza Movimentao Fisica               ; lCrtlItem          ; identlabel=5 ; visible=(sDDFTagApl!='Padrao_3') ; exec=(this.flSetVar('pDepEnt',0)&& this.flSetVar('sUn1Ent','')&& this.flSetVar('sUn2Ent','')&& this.flSetVar('sUn3Ent','')&& this.flSetVar('sUn4Ent','')&& this.flSetVar('sUn5Ent','')&& this.flSetVar('sUn6Ent','')&& this.flSetVar('sUn7Ent','')&& this.flSetVar('pInsEnt',0)&& this.flSetVar('sInsEnt',''))
;
     Depsito Sada                ; sUn1-50            ; editable=lTransfDep3o==1 ; identlabel=5   ; visible=((lCrtlItem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) ; esc=('dd_files/erp_EST_RegDepositos.dda','Esc_Padrao_1','sUn1,pItem,pEmi','pRegDepVen,sUn1,sUn2,sUn3,sUn4,sUn5,sUn6,sUn7,sIns,fRegDepVen,sUnidade') 
                                   ; sUn2-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn2!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
                                   ; sUn3-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn3!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn4-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn4!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn5-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn5!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn6-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn6!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                   ; sUn7-50            ; editable=false ; visible=((lCrtlItem==1)&&(sUn7!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) 
     Instncia Sada               ; sIns-50            ; editable=false ; identlabel=5 ; visible=((lCrtlItem==1)&&(pRegDepVen>0)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
    ;; visible=((jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
                                      ; pDepEnt-5                      ; identlabel=5  ; editable=false ; visible=((lCrtlItem==1)&&(pDepEnt>0)&&(lTransfDep3o==1)&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false ; fieldborder=0 
    Depsito Entrada                  ; sUn1Ent-50                     ; identlabel=5  ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; esc=('dd_files/erp_EST_Depositos.dda','Esc_Padrao_1','sUn1Ent','pDepEnt,fDepEnt,sUn1Ent,sUn2Ent,sUn3Ent,sUn4Ent,sUn5Ent,sUn6Ent,sUn7Ent')
                                      ; sUn2Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn2Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn3Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn3Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn4Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn4Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn5Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn5Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn6Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn6Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn7Ent-50                     ; editable=false ; editable=false ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(sUn7Ent!='')&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                        ; editable=false ; fieldborder=0 ;
     Instncia Entrada                ; sInsEnt-50                     ; identlabel=5   ; esc=('dd_files/erp_EST_Instancias.dda','Esc_Padrao_1','sInsEnt','pInsEnt,fInsEnt,sInsEnt') ; visible=((lCrtlItem==1)&&(lTransfDep3o==1)&&(jEntSai==1)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; valid=(((pInsEnt>0) ||(pDepEnt==0)),'A Instncia do Depsito de Entrada deve ser informada')
     Depsito Entrada de Transferncia Id  ; pRegDepTransf-5          ; identlabel=5   ; editable=false ; visible=((lTransfRem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
     Depsito Entrada                      ; sUnTransf1-50            ; identlabel=5   ; visible=((jEntSai==1)&&(sDDFTagApl!='Padrao_3')&&(lTransfRem==1)) ; esc=('dd_files/erp_EST_RegDepositos.dda','Esc_Padrao_1','sUn1,pItem,pEmi','pRegDepTransf,sUnTransf1,sUnTransf2,sUnTransf3,sUnTransf4,sUnTransf5,sUnTransf6,sUnTransf7,sInsTransf,fRegDepTransf,sUnidadeTransf') 
                                           ; sUnTransf2-50            ; editable=false ; visible=((sUnTransf2!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
                                           ; sUnTransf3-50            ; editable=false ; visible=((sUnTransf3!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                           ; sUnTransf4-50            ; editable=false ; visible=((sUnTransf4!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                           ; sUnTransf5-50            ; editable=false ; visible=((sUnTransf5!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                           ; sUnTransf6-50            ; editable=false ; visible=((sUnTransf6!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))   
                                           ; sUnTransf7-50            ; editable=false ; visible=((sUnTransf7!='')&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) 
     Instncia Entrada                     ; sInsTransf-50            ; editable=false ; visible=((lTransfRem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')) ; identlabel=5
     ;; visible=((lTransfDep3o)||((lTransfRem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')))
     Lote Transferncia                    ; sDesLote-40              ; identlabel=5   ; esc=('dd_files/erp_LotesItens.dda','Esc_Padrao_2','sDesLote,pItem','pLote,sDesLote,stmp,fLote') ; visible=((lTransfDep3o==1)||((lTransfRem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3')&&(iLote==1))) ; valid2=(((lTransfDep3o==true)&&(iLote==1)&&(pLote==0)) ,'O Lote deve ser informado.') 
     ;; visible=((lTransfRem==1)&&(jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
   Tolerncia                                ;                                   ; identlabel=5    ; fontweight='bold' ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   Controle Quantitativo                     ; lContQua                          ; identlabel=10   ; visible=((jEntSai==0)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3')) 
   % Min Divergencia Qtde Comp/Rec/NF        ; nQtMin-18-5                       ; identlabel=15   ; visible=((lContQua==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3')) 
   % Max Divergencia Qtde Comp/Rec/NF        ; nQtMax-18-5                       ; identlabel=15   ; visible=((lContQua==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))    
   Controle Preo                            ; lContPreco                        ; identlabel=10   ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))  
   Preo Min.                                ; nPrecoMin-18-5                    ; identlabel=15   ; visible=((lContPreco==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))    
   Preo Max.                                ; nPrecoMax-18-5                    ; identlabel=15   ; visible=((lContPreco==1)&&(jEntSai==0)&&(sDDFTagApl!='Padrao_3'))   
; ; visible=((jEntSai==0)&&(sDDFTagApl!='Padrao_3'))
   Controle Inspeco                  ; lInspecao                       ; identlabel=5   ; fontweight='bold' ; visible=((jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; exec=(this.flSetVar('pDepInsp',0) && this.flSetVar('fDepInsp',0) && this.flSetVar('pDepReje',0) && this.flSetVar('fDepReje',0) && this.flSetVar('lSkipLote',0) && thi.flSetVar('jTempo',0) && this.flSetVar('dUltInsp','') && this.flSetVar('iCiclo',0) && this.flSetVar('iCicloAtual',0)&& this.flSetVar('sUn1Insp','')&& this.flSetVar('sUn2Insp','')&& this.flSetVar('sUn3Insp','')&& this.flSetVar('sUn4Insp','')&& this.flSetVar('sUn5Insp','')&& this.flSetVar('sUn6Insp','')&& this.flSetVar('sUn7Insp','')&& this.flSetVar('sUn1Reje','')&& this.flSetVar('sUn2Reje','')&& this.flSetVar('sUn3Reje','')&& this.flSetVar('sUn4Reje','')&& this.flSetVar('sUn5Reje','')&& this.flSetVar('sUn6Reje','')&& this.flSetVar('sUn7Reje','')) 
   Depsito Inspeo                  ; pDepInsp-5                      ; identlabel=10  ; editable=false ; visible=((lInspecao==1)&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false ; fieldborder=0 
                                      ; sUn1Insp-50                     ; identlabel=10  ; visible=((lInspecao==1)&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; esc=('dd_files/erp_EST_Depositos.dda','Esc_Padrao_1','sUn1Insp','pDepInsp,fDepInsp,sUn1Insp,sUn2Insp,sUn3Insp,sUn4Insp,sUn5Insp,sUn6Insp,sUn7Insp')
                                      ; sUn2Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn2Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn3Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn3Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                        ; editable=false ; fieldborder=0 ;
                                      ; sUn4Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn4Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                        ; editable=false ; fieldborder=0 ;
                                      ; sUn5Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn5Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn6Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn6Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn7Insp-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn7Insp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                        ; editable=false ; fieldborder=0 ;
   ;                                                                                     ; editable=false ; visible=((lInspecao==1)&&(pDepInsp!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))
   Depsito Rejeito                   ; pDepReje-5                      ; identlabel=10  ; editable=false ; visible=((lInspecao==1)&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento'))) ; editable=false ; fieldborder=0 
                                      ; sUn1Reje-50                     ; identlabel=10  ; visible=((lInspecao==1)&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))  ; esc=('dd_files/erp_EST_Depositos.dda','Esc_Padrao_1','sUn1Reje','pDepReje,fDepReje,sUn1Reje,sUn2Reje,sUn3Reje,sUn4Reje,sUn5Reje,sUn6Reje,sUn7Reje')
                                      ; sUn2Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn2Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn3Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn3Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn4Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn4Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn5Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn5Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn6Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn6Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
                                      ; sUn7Reje-50                     ; editable=false ; editable=false ; visible=((lInspecao==1)&&(sUn7Reje!='')&&(jEntSai==0)&&((sDDFMnemProp=='TQ')||(sDDFMnemProp=='Desenvolvimento')))                         ; editable=false ; fieldborder=0 ;
   ;
   Declarao de Importao                                  ; lImport                                     ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; editalbe=(jOrig==1) ; visible=(sDDFTagApl!='Padrao_3')
      Nmero Documento Importao DI/DSI/DA                  ; sDI_nDI-10                                  ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Data Registro DI/DSI/DA                                ; dDI_dDI                                     ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Local Desembarao                                      ; sDI_xLocDesemb-60                           ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      UF Desembarao                                         ; sDI_UFDesemb-2                              ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Data Desembarao                                       ; dDI_dDesemb                                 ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Cdigo Exportador                                      ; sDI_cExportador-60                          ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Via de transporte internacional                        ; aDI_tpViaTransp[jDI_tpViaTransp]            ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Valor da AFRMM                                         ; nDI_vAFRMM-13-2                             ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Forma de importao quanto a intermediao             ; aDI_tpIntermedio[jDI_tpIntermedio]          ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      CNPJ do adquirente ou do encomendante                  ; sDI_CNPJ-14                                 ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
      Sigla da UF do adquirente ou do encomendante           ; sDI_UFTerceiro-2                            ; identlabel=5     ; visible=((lImport>0)&&(sDDFTagApl!='Padrao_3'))  ; editalbe=(jOrig==1)
   Situao Tributria do II                                 ; lImposImpor                                 ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pIIRegFis-6,fIIRegFis-3                     ; identlabel=5     ; editable=false ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3'))
      Valor BC Imposto Importao                            ; nII_vBC-16-2                                ; identlabel=5     ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false
      Valor Despesas Aduaneiras                              ; nII_vDespAdu-16-2                           ; identlabel=5     ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false
      Valor Imposto Importao                               ; nII_vII-16-2                                ; identlabel=5     ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false
      Valor Imposto sobre Operaes Financeiras              ; nII_vIOF-16-2                               ; identlabel=5     ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3')) ; editable=false
      Valor Total tributos federais, estaduais e municipais  ; nImp_vTotTrib-16-2                          ; identlabel=5     ; visible=((lImposImpor>0)&&(sDDFTagApl!='Padrao_3')) ; 
   Adies                                                   ; lAdicoes                                    ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Nmero Adio                                          ; iAdi_nAdicao-3                              ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3'))          
      Nmero Sequencial Item                                 ; iAdi_nSeqAdic-3                             ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3')) 
      Cdigo Fabricante Estrangeiro                          ; sAdi_cFabricante-60                         ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3'))
      Valor Desconto                                         ; nAdi_vDescDI-16-2                           ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3')) 
      Nmero Pedido Compra                                   ; sAdi_xPed-15                                ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3'))
      Item Pedido Compra                                     ; iAdi_nItemPed-6                             ; identlabel=5     ; visible=((lAdicoes>0)&&(sDDFTagApl!='Padrao_3'))
   Informaes da CIDE                                       ; lCIDE                                       ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      BC CIDE                                                ; nCIDE_qBCprod-17-4                          ; identlabel=5     ; editable=false ;visible=((lCIDE>0)&&(sDDFTagApl!='Padrao_3')) ; 
      Valor aliquota CIDE                                    ; nCIDE_vAliqProd-16-4                        ; identlabel=5     ; editable=false ;visible=((lCIDE>0)&&(sDDFTagApl!='Padrao_3')) ; 
      Valor CIDE                                             ; nCIDE_vCIDE-16-2                            ; identlabel=5     ; editable=false ;visible=((lCIDE>0)&&(sDDFTagApl!='Padrao_3')) ; 
   ICMS Operao Prpria e ST                                ; lICMS_ST                                    ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pICMSRegFis-6,fICMSRegFis-3                 ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Regime Especial ICMS                                   ; lRE                                         ; identlabel=5     ; editable=false ;   visible=((jEntSai==1)&&(lICMS_ST>0)) ; identlabel=5
      Grupo de Tributao/CST                                ; aICMS_GrupoTrib[jICMS_GrupoTrib]-30         ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Modalidade Determinao BC/ICMS                        ; aICMS_modBC[jICMS_modBC]-30                 ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib!=3)&&(jICMS_GrupoTrib!=4)&&(jICMS_GrupoTrib!=5)&&(jICMS_GrupoTrib!=6)&&(jICMS_GrupoTrib!=8)&&(sDDFTagApl!='Padrao_3'))
      Percentual Reduo BC                                  ; nICMS_pRedBC-12-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==7)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS                                          ; nICMS_vBC-16-2                              ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib!=3)||(jICMS_GrupoTrib!=4)||(jICMS_GrupoTrib!=5)||(jICMS_GrupoTrib!=6)||(jICMS_GrupoTrib!=8))&&(sDDFTagApl!='Padrao_3'))
      Alquota Imposto                                       ; nICMS_pICMS-12-2                             ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib!=3)||(jICMS_GrupoTrib!=4)||(jICMS_GrupoTrib!=5)||(jICMS_GrupoTrib!=6)||(jICMS_GrupoTrib!=8))&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS                                             ; nICMS_vICMS-16-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib!=3)||(jICMS_GrupoTrib!=8))&&(sDDFTagApl!='Padrao_3'))
      Modalidade Determinao BC/ICMS ST                     ; aICMS_modBCST[jICMS_modBCST]-30             ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Percentual Margem Valor adicionado ICMS ST             ; nICMS_pMVAST-12-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Percentual Reduo BC/ICMS ST                          ; nICMS_pRedBCST-12-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS ST                                       ; nICMS_vBCST-16-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Alquota Imposto ICMS ST                               ; nICMS_pICMSST-12-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST                                          ; nICMS_vICMSST-16-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS ST Retido                                ; nICMS_vBCSTRet-16-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib==8)&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST Retido                                   ; nICMS_vICMSSTRet-16-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib==8)&&(sDDFTagApl!='Padrao_3'))
      Motivo desonerao ICMS                                ; aICMS_motDesICMS[jICMS_motDesICMS]-30       ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==4)||(jICMS_GrupoTrib==5)||(jICMS_GrupoTrib==6)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS desonerado                               ; nICMS_vICMSDeson-13-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==3)||(jICMS_GrupoTrib==4)||(jICMS_GrupoTrib==5)||(jICMS_GrupoTrib==6)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10))&&(sDDFTagApl!='Padrao_3'))
      ;;visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==2)&&(sDDFTagApl!='Padrao_3')))
      Cdigo do Beneficirio                                 ; sCBenef-15                                  ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&((jICMS_GrupoTrib==2)&&(sDDFTagApl!='Padrao_3')))
      ; ; visible=(lICMS_ST>0)
      Valor BC ICMS na UF de destino                         ; nVBCUFDest-13-2                             ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor da BC FCP na UF de destino                       ; nVBCFCPUFDest-13-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Percentual ICMS relativo ao (FCP) na UF de destino     ; nPFCPUFDest-13-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota interna da UF de destino                      ; nPICMSUFDest-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota interestadual das UF envolvidas               ; nPICMSInter-13-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Percentual provisrio partilhado ICMS Interestadual    ; nPICMSInterPart-13-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS relativo ao (FCP) da UF de destino       ; nVFCPUFDest-13-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS Interestadual para a UF de destino       ; nVICMSUFDest-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS Interestadual para a UF do remetente     ; nVICMSUFRemet-13-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS prprio do Substituto                    ; nICMS_vICMSSubstituto-13-2                  ; identlabel=5     ; editable=false ; visible=((lICMS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor da BC do FCP                                     ; nICMS_vBCFCP-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)))                                          
      Percentual do FCP                                      ; nICMS_pFCP-13-2                             ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)))
      Valor do FCP                                           ; nICMS_vFCP-13-2                             ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)))
      Valor da BC do FCP retido por ST                       ; nICMS_vBCFCPST-13-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==7)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10)))
      Percentual do FCP retido por ST                        ; nICMS_pFCPST-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==7)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10)))
      Valor do FCP retido por ST                             ; nICMS_vFCPST-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && ((jICMS_GrupoTrib==0)||(jICMS_GrupoTrib==1)||(jICMS_GrupoTrib==2)||(jICMS_GrupoTrib==7)||(jICMS_GrupoTrib==9)||(jICMS_GrupoTrib==10)))
      Valor da BC do FCP retido anteriormente por ST         ; nICMS_vBCFCPSTRet-13-2                      ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && (jICMS_GrupoTrib==8))
      Percentual do FCP retido anteriormente por ST          ; nICMS_pFCPSTRet-13-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && (jICMS_GrupoTrib==8))
      Valor do FCP retido por ST                             ; nICMS_vFCPSTRet-13-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_ST==1) && (jICMS_GrupoTrib==8))
      Valor do ICMS da Operao                              ; nICMS_vICMSOp-13-2                          ; identlabel=5     ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib==7)&&(sDDFTagApl!='Padrao_3'))
      Percentual do Diferimento                              ; nICMS_pDif-13-2                             ; identlabel=5     ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib==7)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS Diferido                                 ; nICMS_vICMSDif-13-2                         ; identlabel=5     ; visible=((lICMS_ST>0)&&(jICMS_GrupoTrib==7)&&(sDDFTagApl!='Padrao_3'))
    ICMS Partilhado                                          ; lICMS_P                                     ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pICMSPartRegFis-6,fICMSPartRegFis-3         ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3')) 
      Tributao  ICMS                                       ; aICMSPart_CST[jICMSPart_CST]-30             ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Modalidade determinao BC do ICMS                     ; aICMSPart_modBC[jICMSPart_modBC]-30         ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Valor da BC  ICMS                                      ; nICMSPart_vBC-16-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Percentual  Reduo de BC                              ; nICMSPart_pRedBC-6-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota  imposto                                      ; nICMSPart_pICMS-6-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Valor do ICMS                                          ; nICMSPart_vICMS-16-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Modalidade determinao BC/ICMS ST                     ; aICMSPart_modBCST[jICMSPart_modBCST]-30     ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Percentual margem valor Adicionado ICMS ST             ; nICMSPart_pMVAST-6-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))                   
      Percentual Reduo BC/ICMS ST                          ; nICMSPart_pRedBCT-6-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS ST                                       ; nICMSPart_vBCST-16-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota imposto ICMS                                  ; nICMSPart_pICMSST-6-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST                                          ; nICMSPart_vICMSST-16-2                      ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      Percentual BC operao prpria                         ; nICMSPart_pBCOp-6-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
      UF para qual devido ICMS ST                            ; sICMSPart_UFST-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_P>0)&&(sDDFTagApl!='Padrao_3'))
   ICMS ST - Repasse de ICMS ST Retido                       ; lICMS_RR                                    ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pICMSSTRetRegFis-6,fICMSSTRetRegFis-3       ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
      Tributao do ICMS                                     ; aICMSST_CST[jICMSST_CST]-30                 ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS ST retido na UF remetente                ; nICMSST_vBCSTRet-16-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST retido UF remetente                      ; nICMSST_vICMSSTRe-16-2                      ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
      Valor BC/ICMS ST UF destino                            ; nICMSST_vBCSTDest-16-2                      ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST UF destino                               ; nICMSST_vICMSSTDes-16-2                     ; identlabel=5     ; editable=false ; visible=((lICMS_RR>0)&&(sDDFTagApl!='Padrao_3'))
  ICMS Simples Nacional                                      ; lICMS_SN                                    ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pICMSSNRegFis-6,fICMSSNRegFis-3             ; identlabel=5     ; editable=false  ;visible=((lICMS_SN>0)&&(sDDFTagApl!='Padrao_3'))      
      Cdigo do Tipo do ICMS                                 ; aGrupo_simples[jGrupo_simples]              ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(sDDFTagApl!='Padrao_3'))
      Cdigo Situao Operao                               ; aICMSSN_CSOSN[jICMSSN_CSOSN]                ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(sDDFTagApl!='Padrao_3'))
      Modalidade determinao BC do ICMS                     ; aICMSSN_modBC[jICMSSN_modBC]                ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==9)&&(sDDFTagApl!='Padrao_3'))
      Valor BC ICMS                                          ; nICMSSN_vBC-16-2                            ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==9)&&(sDDFTagApl!='Padrao_3'))
      Percentual Reduo BC do ICMS                          ; nICMSSN_pRedBC-6-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==9)&&(sDDFTagApl!='Padrao_3'))
      Alquota Imposto                                       ; nICMSSN_pICMS-6-2                           ; identlabel=5     ; editable=false ; visible=(((jGrupo_simples==9)||(jGrupo_simples==4))&&(sDDFTagApl!='Padrao_3')&&(lICMS_SN>0))
      Valor ICMS                                             ; nICMSSN_vICMS-16-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==9)&&(sDDFTagApl!='Padrao_3'))
      Modalidade determinao BC ICMS ST                     ; aICMSSN_modBCST[jICMSSN_modBCST]            ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Percentual margem valor Adicionado  ICMS ST            ; nICMSSN_pMVAST-6-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Percentual Reduo BC ICMS ST                          ; nICMSSN_pRedBCST-6-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Valor BC ICMS ST                                       ; nICMSSN_vBCST-16-2                          ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Alquota imposto do ICMS ST                            ; nICMSSN_pICMSST-6-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST                                          ; nICMSSN_vICMSST-16-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Alquota aplicvel clculo do crdito                  ; nICMSSN_pCredSN-6-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==0)||(jGrupo_simples==3)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Valor crdito ICMS que pode ser aproveitado nos        ;                                             ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==0)||(jGrupo_simples==3)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      termos do art. 23 da LC 123                            ; nICMSSN_vCredICMSSN-16-2                    ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&((jGrupo_simples==0)||(jGrupo_simples==3)||(jGrupo_simples==9))&&(sDDFTagApl!='Padrao_3'))
      Valor BC ICMS ST retido                                ; nICMSSN_vBCSTRet-16-2                       ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==8)&&(sDDFTagApl!='Padrao_3'))
      Valor ICMS ST retido                                   ; nICMSSN_vICMSSTRet-16-2                     ; identlabel=5     ; editable=false ; visible=((lICMS_SN>0)&&(jGrupo_simples==8)&&(sDDFTagApl!='Padrao_3'))
      Valor da BC do FCP retido por ST                       ; nICMSSN_vBCFCPST-13-2                         ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& ((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9)))
      Percentual do FCP retido por ST                        ; nICMSSN_pFCPST-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& ((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9)))
      Valor do FCP retido por ST                             ; nICMSSN_vFCPST-13-2                           ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& ((jGrupo_simples==3)||(jGrupo_simples==4)||(jGrupo_simples==5)||(jGrupo_simples==9))) 
      Valor da BC do FCP retido anteriormente por ST         ; nICMSSN_vBCFCPSTRet-13-2                      ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& (jGrupo_simples==8))
      Percentual do FCP retido anteriormente por ST          ; nICMSSN_pFCPSTRet-13-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& (jGrupo_simples==8))
      Valor do FCP retido por ST                             ; nICMSSN_vFCPSTRet-13-2                        ; identlabel=5     ; editable=false ; visible=((lICMS_SN==1)&& (jGrupo_simples==8)) 
   IPI                                                       ; lIPI                                        ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pIPIRegFis-6,fIPIRegFis-3                   ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))                            
       Regime Especial IPI                                   ; lIPI_RE                                     ; identlabel=5     ; editable=false ;   visible=((jEntSai==1)&&(lIPI>0)) ; identlabel=5
      IPI por Unidade Tributvel                             ; lIPI_UT-5                                   ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))                            
      Classe enquadramento IPI Cigarros/Bebidas              ; sIPI_clEnq-5                                ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))                            
      CNPJ produtor mercadoria,                              ;                                             ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      diferente emitente Somente para os casos               ;                                             ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      exportao direta/indireta                             ; sIPI_CNPJProd-14                            ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Cdigo selo controle IPI                               ; sIPI_cSelo-60                               ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Quantidade selo controle                               ; nIPI_qSelo-12-0                             ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Cdigo Enquadramento Legal IPI                         ; sIPI_cEnq-3                                 ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Cdigo Situao Tributria IPI                         ; aIPINT_CST[jIPINT_CST]                      ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Valor BC IPI                                           ; nIPITrib_vBC-16-2                           ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota IPI                                           ; nIPITrib_pIPI-6-2                           ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Quantidade total na unidade padro para                ;                                             ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      tributao(produtos tributados por unidade)            ; nIPITrib_qUnid-17-4                         ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Valor por Unidade Tributvel                           ; nIPITrib_vUnid-16-4                         ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Valor IPI                                              ; nIPITrib_vIPI-16-2                          ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
      Cdigo Exceo Tabela IPI                              ; sProd_EX_TIPI-3                             ; identlabel=5     ; editable=false ; visible=((lIPI>0)&&(sDDFTagApl!='Padrao_3'))
   PIS                                                       ; lPIS                                        ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pPISRegFis-6,fPISRegFis-3                   ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Cdigo Situao Tributria PIS                         ; aPIS_CST[jPIS_CST]                          ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Valor Base Clculo PIS                                 ; nPIS_vBC-16-2                               ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Alquota PIS (em percentual)                           ; nPIS_pPIS-6-2                               ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Quantidade Vendida                                     ; nPIS_qBCProd-17-4                           ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Alquota PIS (em reais)                                ; nPIS_vAliqProd-16-4                         ; identlabel=5     ; editable=false ; visible=(lPIS>0)
      Valor PIS                                              ; nPIS_vPIS-16-2                              ; identlabel=5     ; editable=false ; visible=(lPIS>0)
   PIS ST                                                    ; lPIS_ST                                     ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pPISSTRegFis-6,fPISSTRegFis-3               ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor Base Clculo PIS                                 ; nPISST_vBC-16-2                             ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota PIS (em percentual)                           ; nPISST_pPIS-6-2                             ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Quantidade Vendida                                     ; nPISST_qBCProd-17-4                         ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Alquota PIS (em reais)                                ; nPISST_vAliqProd-16-4                       ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
      Valor PIS                                              ; nPISST_vPIS-16-2                            ; identlabel=5     ; editable=false ; visible=((lPIS_ST>0)&&(sDDFTagApl!='Padrao_3'))
   COFINS                                                    ; lCofins                                     ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pCofinsRegFis-6,fCofinsRegFis-3             ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Cdigo de Situao Tributria COFINS                   ; aCOFINS_CST[jCOFINS_CST]                    ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Valor Base Clculo COFINS                              ; nCOFINS_vBC-16-2                            ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Alquota COFINS (em percentual)                        ; nCOFINS_pCOFINS-6-2                         ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Quantidade Vendida                                     ; nCOFINS_qBCProd-17-4                        ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Alquota COFINS (em reais)                             ; nCOFINS_vAliqProd-16-4                      ; identlabel=5     ; editable=false ; visible=(lCofins>0)
      Valor COFINS                                           ; nCOFINS_vCOFINS-16-2                        ; identlabel=5     ; editable=false ; visible=(lCofins>0)
   COFINS ST                                                 ; lCofins_ST                                  ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pCofinsSTRegFis-6,fCofinsSTRegFis-3         ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor da Base de Clculo COFINS                        ; nCOFINSST_vBC-16-2                          ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))      
      Alquota COFINS (em percentual)                        ; nCOFINSST_pCOFINS-6-2                       ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))   
      Quantidade Vendida                                     ; nCOFINSST_qBCProd-17-4                      ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))   
      Alquota COFINS (em reais)                             ; nCOFINSST_vAliqProd-16-4                    ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor COFINS                                           ; nCOFINSST_vCOFINS-16-2                      ; identlabel=5     ; editable=false ; visible=((lCofins_ST>0)&&(sDDFTagApl!='Padrao_3'))   
   ISSQN                                                     ; lISSQN                                      ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=(sDDFTagApl!='Padrao_3')
      Registro Fiscal Id/Verso                              ; pISSQNRegFis-6,fISSQNRegFis-3               ; identlabel=5     ; editable=false   ;visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor Base Clculo ISSQN                               ; nISSQN_vBC-16-2                             ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Alquota ISSQN                                         ; nISSQN_vAliq-6-2                            ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor ISSQN                                            ; nISSQN_vISSQN-16-2                          ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor Deduo para Reduo da Base de Clculo          ; nISSQN_vDeducao-16-2                          ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor outras Retenes                                 ; nISSQN_vOutro-16-2                          ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor Desconto Incondicionado                          ; nISSQN_vDescIncond-16-2                     ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor Desconto Condicionado                            ; nISSQN_vDescCond-16-2                       ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Valor Reteno ISS                                     ; nISSQN_vISSRet-16-2                         ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Indicador da Exigibilidade do ISS                      ; aISSQN_indISS[jISSQN_indISS]-16-2           ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Nr.Processo Jud/Adm de suspenso da exigibilidade      ; sISSQN_nProcesso-30                         ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Indicador de incentivo Fiscal                          ; lISSQN_indIncentivo                         ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      ; ; visible=(lISSQN>0)
      Servio Prestado dentro do Municpio                   ; sISSQN_sServico-50                          ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; esc=('dd_files/erp_TipoServico.dda','Esc_Padrao_1','sISSQN_sServico','pISSQN_cServico,sISSQN_cServico,sISSQN_sServico,fISSQN_cServico')
      Cdigo do Servio Prestado dentro do Municpio         ; sISSQN_cServico-30                          ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; editable=false
      ; ; visible=(lISSQN>0)
      Municpio de Incidncia do Imposto                     ; sISSQN_sMun-50                              ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; esc=('dd_files/Cidades.dda','Esc_Padrao_1','sISSQN_cMun','sISSQN_sMun,stmp,pISSQN_cMun,stmp,pISSQN_cPais,sISSQN_sPais,fISSQN_cMun,fISSQN_cPais,sISSQN_cMun,sISSQN_cPais')
      Cdigo do Municpio de Incidncia do Imposto           ; sISSQN_cMun-10                              ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; editable=false
      ; ; visible=(lISSQN>0)
      Pas onde o Servio foi Prestado                       ; sISSQN_sPais-10                             ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; esc=('dd_files/erp_Paises.dda','Esc_Padrao_1','sISSQN_sPais','pISSQN_cPais,sISSQN_cPais,sISSQN_sPais,fISSQN_cPais')
      Cdigo do Pas onde o Servio foi Prestado             ; sISSQN_cPais-10                             ; identlabel=5     ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))  ; editable=false
      ; ; visible=(lISSQN>0)
      Cdigo municpio ocorrncia fato gerador ISSQN         ; nISSQN_cMunFG-8-0                           ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Item da Lista de Servios                              ; nISSQN_cListServ-5-0                        ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
      Cdigo Tributao ISSQN                                ; aISSQN_cSitTrib[jISSQN_cSitTrib]             ; identlabel=5     ; editable=false  ; visible=((lISSQN>0)&&(sDDFTagApl!='Padrao_3'))   
   Transparncia Fiscal                                      ; lTranspFiscal                               ; fontweight='bold' ; identlabel=3 ; edtzoom=true ; visible=((jEntSai==1)&&(sDDFTagApl!='Padrao_3'))
     Alquota Nacional                                       ; nAliqTranspNac-6-2                          ; identlabel=10    ; editable=false  ; visible=((lTranspFiscal>0)&&((jOrig!=1)&&(jOrig!=6))&&(sDDFTagApl!='Padrao_3'))
     Alquota Importada                                      ; nAliqTranspImport-6-2                       ; identlabel=10    ; editable=false  ; visible=((lTranspFiscal>0)&&((jOrig==1)||(jOrig==6))&&(sDDFTagApl!='Padrao_3'))
     Valor Tributado Transparencia Fiscal                    ; nTot_vTrib-6-2                              ; identlabel=10    ; editable=false  ; visible=((lTranspFiscal>0)&&(sDDFTagApl!='Padrao_3'))
  ;
Dados Fiscais (Imposto Seletivo/IBS/CBS)   ;  ; fontweight='bold';  identlabel=5
   Imposto Seletivo                                                    ; lImpSel                         ; identlabel=5  ; fontweight='bold'; edtzoom=true
      Registro Fiscal Id/Verso                                        ; pISRegFis-6,fISRegFis-3         ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ; 
      Classificao Tributria do Imposto Seletivo                     ; sIS_ClassTribIS-20              ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      Situao Tributria do Imposto Seletivo                          ; sIS_CodCSTIS-20                 ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ; 
                                                                       ; sIS_CSTIS-60                    ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      Valor Base de Clculo Imposto Seletivo                           ; nIS_vBCIS-18-5                  ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      % Imposto Seletivo                                               ; nIS_pIS-18-5                    ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      % Especfica por Unidade Apropriada                              ; nIS_pISEspec-18-5               ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      Unidade de Medida Tributvel                                     ; sIS_uTrib-6                     ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      Quantidade Tributvel                                            ; nIS_qTrib-18-5                  ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
      Valor Imposto Seletivo                                           ; nIS_vIS-18-5                    ; identlabel=10 ; visible=(lImpSel==1)  ; editable=false ;
   ; ; visible=(lImpSel==1)
   IBS / CBS                                                                ; lIBSCBS                         ; identlabel=5  ; fontweight='bold'; edtzoom=true
       Classificao Tributria do IBS e CBS                                ; sIBSCBS_ClassTrib-20            ; identlabel=10 ; visible=(lIBSCBS==1) ; editable=false ;
       Situao Tributria do IBS e CBS                                     ; sIBSCBS_CodCST-20               ; identlabel=10 ; visible=(lIBSCBS==1) ; editable=false ; 
                                                                            ; sIBSCBS_CST-60                  ; identlabel=10 ; visible=(lIBSCBS==1) ; editable=false ;
       ;
       Valor Base de Clculo IBS/CBS                                        ; nIBSCBS_vBC-18-5                  ; identlabel=10 ; visible=(lIBSCBS==1)  ; editable=false ;
       IBSUF                                                                ;                                 ; identlabel=10 ; fontweight='bold'; visible=(lIBSCBS==1)
         Registro Fiscal Id/Verso                                          ; pRegFisIBS-6,fRegFisIBS-3       ; identlabel=10 ; visible=(lIBSCBS==1)  ; editable=false ; 
         % IBS Competncia UF                                               ; nIBSUF_pIBSUF-18-5              ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ;
         % Diferimento                                                      ; nIBSUF_pDif-18-5                ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ;
         Valor Diferimento                                                  ; nIBSUF_vDif-18-5                ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ;
         Valor Tributo Devolvido                                            ; nIBSUF_vDevTrib-18-5            ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ;
         % Reduo alquota cClassTrib                                      ; nIBSUF_pRedAliq-18-5            ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % IBS Competncia das UF que ser aplicada a Base de Clculo       ; nIBSUF_pAliqEfet-18-5           ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor IBS Competncia UF                                           ; nIBSUF_vIBSUF-18-5              ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
      IBSMun                                                                ;                                 ; identlabel=10 ; fontweight='bold'; visible=(lIBSCBS==1)
         Registro Fiscal Id/Verso                                        ; pRegFisIBSMun-6,fRegFisIBSMun-3     ; identlabel=10 ; visible=(lIBSCBS==1)  ; editable=false ; 
         % IBS Competncia Municpio                                        ; nIBSMun_pIBSMun-18-5            ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % Diferimento                                                      ; nIBSMun_pDif-18-5               ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor Diferimento                                                  ; nIBSMun_vDif-18-5               ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor Tributo Devolvido                                            ; nIBSMun_vDevTrib-18-2           ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % Reduo alquota cClassTrib                                      ; nIBSMun_pRedAliq-18-5           ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % IBS Competncia do Municpio que ser aplicada a Base de Clculo ; nIBSMun_pAliqEfet-18-5          ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor IBS Competncia Municpio                                    ; nIBSMun_vIBSMun-18-2            ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
      Total IBS UF + IBS Municipio                                          ; nIBSCBS_vIBS-18-2           ; identlabel=10  ; fontweight='bold'; editable=false ; visible=(lIBSCBS==1)
      CBS                                                                   ;                                 ; identlabel=10 ; fontweight='bold'; visible=(lIBSCBS==1)
         Registro Fiscal Id/Verso                                        ; pRegFisCBS-6,fRegFisCBS-3         ; identlabel=10 ; visible=(lIBSCBS==1)  ; editable=false ; 
         % CBS                                                              ; nCBS_pCBS-18-5                  ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % Diferimento                                                      ; nCBS_pDif-18-5                  ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor Diferimento                                                  ; nCBS_vDif-18-2                  ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor Tributo Devolvido                                            ; nCBS_vDevTrib-18-2           ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % Reduo alquota cClassTrib                                      ; nCBS_pRedAliq-18-5              ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         % CBS que ser aplicada a Base de Clculo                          ; nCBS_pAliqEfet-18-5             ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
         Valor da CBS                                                       ; nCBS_vCBS-18-2            ; identlabel=15 ; visible=(lIBSCBS==1) ; editable=false ; 
 ;
</ScriptForm1>
<VarsToServer1>
   pPId
   iVer
   pOrdem   = {ChaveAtual_1}
   nQtMoe
   pCam  
   fCam  
   pMoe  
   fMoe  
   nCam  
   sCam
   jCam
   lInspecao
   lRE
   lIPI_RE
   lIPI_UT
   nVBCUFDest
   nPFCPUFDest
   nPICMSUFDest
   nPICMSInter
   nPICMSInterPart
   nVFCPUFDest
   nVICMSUFDest
   nVICMSUFRemet
   nICMS_vBCFCP
   nICMS_pFCP
   nICMS_vFCP
   nICMS_vBCFCPST
   nICMS_pFCPST
   nICMS_vFCPST
   nICMS_vBCFCPSTRet
   nICMS_pFCPSTRet
   nICMS_vFCPSTRet
   nVBCFCPUFDest
   nICMSSN_pFCPST
   nICMSSN_vFCPST
   nICMSSN_vBCFCPST
   nICMSSN_pFCPSTRet
   nICMSSN_vFCPSTRet
   nICMSSN_vBCFCPSTRet
   pDepInsp
   pDepReje
   fDepInsp
   fDepReje
   tUltInsp = dUltInsp
   pInsp
   fInsp
   nVDescLog
   nVTCI = jOrig==1 ? nProd_vProd+nProd_vFrete+nProd_vSeg+nII_vII : 0 
   pDepEnt
   pInsEnt
   nPAcresCRTOsa
   nVAcresCRTOsa
   jDI_tpViaTransp    
   nDI_vAFRMM         
   jDI_tpIntermedio   
   sDI_CNPJ           
   sDI_UFTerceiro     
   nImp_vTotTrib      
   nICMS_vICMSDeson   
   nICMS_vICMSOp      
   nICMS_pDif         
   nICMS_vICMSDif     
   nISSQN_vDeducao    
   nISSQN_vOutro      
   nISSQN_vDescIncond 
   nISSQN_vDescCond   
   nISSQN_vISSRet     
   jISSQN_indISS      
   pISSQN_cServico    
   fISSQN_cServico    
   pISSQN_cMun        
   pISSQN_cPais       
   fISSQN_cMun        
   fISSQN_cPais       
   sISSQN_nProcesso   
   lISSQN_indIncentivo
   nCTR_VlCalcI
   jFinalidade
   sFCI
   pRegDepVen
   fRegDepVen
   pRegDepTransf
   fRegDepTransf
   pMotAltPed
   fMotAltPed
   lImport     
   lImposImpor 
   lAdicoes    
   lCIDE       
   lICMS_ST    
   lICMS_P     
   lICMS_RR    
   lICMS_SN    
   lIPI        
   lPIS        
   lPIS_ST     
   lCofins     
   lCofins_ST  
   lISSQN      
   lTranspFiscal
   nTot_vTrib 
   nAliqTranspImport
   nAliqTranspNac   
   pRegDepRFis
   fRegDepRFis
   jBC_PIS
   jBC_COFINS
   jBC_ICMS
   jBC_IPI
   jBC_ICMSST
   jBC_II
   jBC_ISS
   jVl_ICMSST
   jVl_ICMS
   nBC_ICMS
   nBC_COFINS
   nBC_PIS
   nBC_IPI
   nBC_ICMSST
   nBC_II
   nBC_ISS
   nVl_ICMSST
   nVl_ICMS
   nICMS_vICMSSubstituto
   nPEncFinTpED
   lCCusto  
   lCrtlItem
   jOrig
   iSerial
   jFDiasEnt
   iDiasInf
   iDiasCalc
   pItem 
   pUni         
   fUni
   pNeg          = jTipo==0 ? 1  : pNeg  
   fNeg          = jTipo==0 ? 1  : fNeg  
   pTab  = 0         
   fTab  = 0        
   pTabI = 0        
   fTabI = 0        
   pTabGrpP = 0 
   fTabGrpP = 0 
   pTabGrpPI= 0 
   fTabGrpPI= 0 
   pNCM    
   fNCM    
   pCFO    
   fCFO    
   jTipo
   nQt
   tEntPla 
   tEmissao
   tSaida
   pItem
   fItem
   nDesc
   nQtMin
   nQtMax
   nPrecoMin
   nPrecoMax
   lContQua
   lContPreco
   iCiclo
   iCicloAtual
   jTempo
   lSkipLote
   nPrBruto
   nPDescCP = nDFin
   nVDescCP
   nPDescTpED = nDescFin
   nVDescTpED
   nVEncFinTpED
   nPDescTpEDG
   nVDescTpEDG
   nPDescInc
   nVDescInc
   nProd_pDesc
   pPTOpEDItem
   fPTOpEDItem
   pPTOpEDGrpItem
   fPTOpEDGrpItem
   pLote
   fLote
   nProd_vUnCom
   nProd_vProd
   nProd_vFrete
   nVMLE
   nProd_vSeg
   nProd_vDesc
   nProd_vOutro
   jProd_indTot
   sDI_nDI               
   dDI_dDI               
   sDI_xLocDesemb        
   sDI_UFDesemb          
   dDI_dDesemb           
   sDI_cExportador  
   iAdi_nAdicao          
   iAdi_nSeqAdic         
   sAdi_cFabricante      
   nAdi_vDescDI          
   sAdi_xPed             
   iAdi_nItemPed
   nCIDE_qBCprod
   nCIDE_vAliqProd
   nCIDE_vCIDE
   jICMS_GrupoTrib    
   jICMS_orig
   jICMS_modBC
   nICMS_vBC
   nICMS_pICMS
   nICMS_vICMS
   jICMS_modBCST
   nICMS_pMVAST
   nICMS_pRedBCST
   nICMS_vBCST
   nICMS_pICMSST
   nICMS_vICMSST
   nICMS_pRedBC
   jICMS_motDesICMS
   nICMS_vBCSTRet
   nICMS_vICMSSTRet
   jICMSPart_orig
   jICMSPart_CST
   jICMSPart_modBC
   nICMSPart_vBC
   nICMSPart_pRedBC
   nICMSPart_pICMS
   nICMSPart_vICMS
   jICMSPart_modBCST
   nICMSPart_pMVAST
   nICMSPart_pRedBCT
   nICMSPart_vBCST
   nICMSPart_pICMSST
   nICMSPart_vICMSST
   nICMSPart_pBCOp
   sICMSPart_UFST
   jICMSST_orig
   jICMSST_CST
   nICMSST_vBCSTRet
   nICMSST_vICMSSTRe
   nICMSST_vBCSTDest
   nICMSST_vICMSSTDes
   jGrupo_simples
   jICMSSN_Orig
   jICMSSN_CSOSN
   nICMSSN_pCredSN
   nICMSSN_vCredICMSSN
   jICMSSN_modBCST
   nICMSSN_pMVAST
   nICMSSN_pRedBCST
   nICMSSN_vBCST
   nICMSSN_pICMSST
   nICMSSN_vICMSST
   nICMSSN_vBCSTRet
   nICMSSN_vICMSSTRet
   jICMSSN_modBC
   nICMSSN_vBC
   nICMSSN_pRedBC
   nICMSSN_pICMS
   nICMSSN_vICMS
   sIPI_clEnq
   sIPI_CNPJProd
   sIPI_cSelo   
   nIPI_qSelo   
   sIPI_cEnq    
   jIPINT_CST      
   nIPITrib_vBC 
   nIPITrib_pIPI
   nIPITrib_qUnid
   nIPITrib_vUnid
   nIPITrib_vIPI 
   nII_vBC 
   nII_vDespAdu
   nII_vII     
   nII_vIOF    
   jPIS_CST  
   nPIS_vBC 
   nPIS_pPIS 
   nPIS_vPIS 
   nPIS_qBCProd 
   nPIS_vAliqProd 
   nPISST_vBC 
   nPISST_pPIS
   nPISST_qBCProd 
   nPISST_vAliqProd
   nPISST_vPIS
   jCOFINS_CST  
   nCOFINS_vBC  
   nCOFINS_pCOFINS 
   nCOFINS_vCOFINS 
   nCOFINS_qBCProd
   nCOFINS_vAliqProd
   nCOFINSST_vBC
   nCOFINSST_pCOFINS
   nCOFINSST_qBCProd
   nCOFINSST_vAliqProd
   nCOFINSST_vCOFINS
   nISSQN_vBC
   nISSQN_vAliq
   nISSQN_vISSQN
   nISSQN_cMunFG
   nISSQN_cListServ
   jISSQN_cSitTrib
   sInfAdProd = mInfAdProd
   pOrdens_Item_CCusto_{i}
   pCCusto_{i}
   fCCusto_{i}
   nRatCCusto_{i}
   pOrdens_Item_CContCred_{i}
   pCContCred_{i}
   fCContCred_{i}
   nRatCredCCont_{i}
   pOrdens_Item_CContDeb_{i}
   pCContDeb_{i}
   fCContDeb_{i}
   nRatDebCCont_{i}
</VarsToServer1>
<VarsToDb1>  
   sDDFTabela = Ordens_Itens
   aSerial[]  = 'OSa_{ChaveAtual_1}'
   iSerial    = $aSerial[0]
   nQtMoe
   pCam  
   fCam 
   pMoe
   fMoe
   nCam
   sCam
   jCam
   nVBCUFDest
   nPFCPUFDest
   nPICMSUFDest
   nPICMSInter
   nPICMSInterPart
   nVFCPUFDest
   nVICMSUFDest
   nVICMSUFRemet
   nVBCFCPUFDest
   nICMS_vBCFCP
   nICMS_pFCP
   nICMS_vFCP
   nICMS_vBCFCPST
   nICMS_pFCPST
   nICMS_vFCPST
   nICMS_vBCFCPSTRet
   nICMS_pFCPSTRet
   nICMS_vFCPSTRet
   nICMSSN_pFCPST
   nICMSSN_vFCPST
   nICMSSN_vBCFCPST
   nICMSSN_pFCPSTRet
   nICMSSN_vFCPSTRet
   nICMSSN_vBCFCPSTRet
   pRegDepVen
   fRegDepVen
   sFCI
   nVDescLog
   pDepInsp
   pDepReje
   fDepInsp
   fDepReje
   tUltInsp
   pInsp
   fInsp
   nVTCI
   pDepEnt
   pInsEnt
   lRE
   lIPI_RE
   lIPI_UT
   lInspecao
   pRegDepRFis
   fRegDepRFis
   pRegDepTransf
   fRegDepTransf
   pMotAltPed
   fMotAltPed
   nPAcresCRTOsa
   nVAcresCRTOsa
   jDI_tpViaTransp    
   nDI_vAFRMM         
   jDI_tpIntermedio   
   sDI_CNPJ           
   sDI_UFTerceiro     
   nImp_vTotTrib      
   nICMS_vICMSDeson   
   nICMS_vICMSOp      
   nICMS_pDif         
   nICMS_vICMSDif     
   nISSQN_vDeducao    
   nISSQN_vOutro      
   nISSQN_vDescIncond 
   nISSQN_vDescCond   
   nISSQN_vISSRet     
   jISSQN_indISS      
   pISSQN_cServico    
   fISSQN_cServico    
   pISSQN_cMun        
   pISSQN_cPais       
   fISSQN_cMun        
   fISSQN_cPais       
   sISSQN_nProcesso   
   lISSQN_indIncentivo
   lImport     
   lImposImpor 
   lAdicoes    
   lCIDE       
   lICMS_ST    
   lICMS_P     
   lICMS_RR    
   lICMS_SN    
   lIPI        
   lPIS        
   lPIS_ST     
   lCofins     
   lCofins_ST  
   lISSQN      
   lTranspFiscal
   nCTR_VlCalcI
   jBC_PIS
   jBC_COFINS
   jBC_ICMS
   jBC_IPI
   jBC_ICMSST
   jBC_II
   jBC_ISS
   jVl_ICMSST
   jVl_ICMS
   nBC_ICMS
   nBC_COFINS
   nBC_PIS
   nBC_IPI
   nBC_ICMSST
   nBC_II
   nBC_ISS
   nVl_ICMSST
   nVl_ICMS
   nICMS_vICMSSubstituto
   nTot_vTrib 
   nAliqTranspImport
   nAliqTranspNac   
   nPEncFinTpED
   jOrig
   jFDiasEnt
   iDiasInf
   iDiasCalc
   pOrdem 
   pItem
   fItem
   pUni
   fUni
   pNeg
   fNeg
   pTab
   fTab
   pTabI
   fTabI
   pTabGrpP  
   fTabGrpP  
   pTabGrpPI 
   fTabGrpPI 
   pNCM
   fNCM
   pCFO
   fCFO
   jTipo
   nQt
   tEntPla
   tEmissao
   tSaida
   nDesc
   lCCusto  
   lCrtlItem
   pPTOpEDItem
   fPTOpEDItem
   pPTOpEDGrpItem
   fPTOpEDGrpItem
   nQtMin
   nQtMax
   nPrecoMin
   nPrecoMax
   lContQua
   lContPreco
   iCiclo
   iCicloAtual
   jTempo
   lSkipLote
   nPrBruto   
   nPDescCP   
   nVDescCP   
   nPDescTpED 
   nVDescTpED 
   nVEncFinTpED 
   nPDescTpEDG
   nVDescTpEDG
   nPDescInc  
   nVDescInc  
   nProd_pDesc
   pLote
   fLote
   jFinalidade
   nProd_vUnCom
   nProd_vProd
   nProd_vFrete
   nVMLE
   nProd_vSeg
   nProd_vDesc
   nProd_vOutro
   jProd_indTot
   sDI_nDI               
   dDI_dDI               
   sDI_xLocDesemb        
   sDI_UFDesemb          
   dDI_dDesemb           
   sDI_cExportador  
   iAdi_nAdicao          
   iAdi_nSeqAdic         
   sAdi_cFabricante      
   nAdi_vDescDI          
   sAdi_xPed             
   iAdi_nItemPed         
   nCIDE_qBCprod
   nCIDE_vAliqProd
   nCIDE_vCIDE
   jICMS_GrupoTrib
   jICMS_orig 
   jICMS_modBC
   nICMS_vBC
   nICMS_pICMS
   nICMS_vICMS
   jICMS_modBCST
   nICMS_pMVAST
   nICMS_pRedBCST
   nICMS_vBCST
   nICMS_pICMSST
   nICMS_vICMSST
   nICMS_pRedBC
   jICMS_motDesICMS
   nICMS_vBCSTRet
   nICMS_vICMSSTRet
   jICMSPart_orig
   jICMSPart_CST
   jICMSPart_modBC
   nICMSPart_vBC
   nICMSPart_pRedBC
   nICMSPart_pICMS
   nICMSPart_vICMS
   jICMSPart_modBCST
   nICMSPart_pMVAST
   nICMSPart_pRedBCT
   nICMSPart_vBCST
   nICMSPart_pICMSST
   nICMSPart_vICMSST
   nICMSPart_pBCOp
   sICMSPart_UFST
   jICMSST_orig
   jICMSST_CST
   nICMSST_vBCSTRet
   nICMSST_vICMSSTRe
   nICMSST_vBCSTDest
   nICMSST_vICMSSTDes
   jGrupo_simples
   jICMSSN_Orig
   jICMSSN_CSOSN
   nICMSSN_pCredSN
   nICMSSN_vCredICMSSN
   jICMSSN_modBCST
   nICMSSN_pMVAST
   nICMSSN_pRedBCST
   nICMSSN_vBCST
   nICMSSN_pICMSST
   nICMSSN_vICMSST
   nICMSSN_vBCSTRet
   nICMSSN_vICMSSTRet
   jICMSSN_modBC
   nICMSSN_vBC
   nICMSSN_pRedBC
   nICMSSN_pICMS
   nICMSSN_vICMS
   sIPI_clEnq
   sIPI_CNPJProd
   sIPI_cSelo
   nIPI_qSelo
   sIPI_cEnq
   jIPINT_CST
   nIPITrib_vBC
   nIPITrib_pIPI
   nIPITrib_qUnid
   nIPITrib_vUnid
   nIPITrib_vIPI
   nII_vBC
   nII_vDespAdu
   nII_vII
   nII_vIOF
   jPIS_CST  
   nPIS_vBC 
   nPIS_pPIS 
   nPIS_vPIS 
   nPIS_qBCProd 
   nPIS_vAliqProd 
   nPISST_vBC 
   nPISST_pPIS
   nPISST_qBCProd 
   nPISST_vAliqProd
   nPISST_vPIS   
   jCOFINS_CST
   nCOFINS_vBC
   nCOFINS_pCOFINS
   nCOFINS_vCOFINS
   nCOFINS_qBCProd
   nCOFINS_vAliqProd
   nCOFINSST_vBC
   nCOFINSST_pCOFINS
   nCOFINSST_qBCProd
   nCOFINSST_vAliqProd
   nCOFINSST_vCOFINS
   nISSQN_vBC 
   nISSQN_vAliq 
   nISSQN_vISSQN
   nISSQN_cMunFG    
   nISSQN_cListServ 
   jISSQN_cSitTrib
   sInfAdProd   
   sDDFSubTabela = Ordens_Item_CCusto
   pSubPId       = $_POST[pOrdens_Item_CCusto_{i}]
   pOrdemItem    = {ChaveAtual_0}
   fOrdemItem    = $_POST[iVer]
   pCCusto       = $_POST[pCCusto_{i}]
   fCCusto       = $_POST[fCCusto_{i}]
   nRatCCusto    = $_POST[nRatCCusto_{i}]
   lExc          = $_POST[pCCusto_{i}]==0 ? 1 : 0
   sDDFSubTabela = Ordens_Item_CContabil
   pSubPId       = $_POST[pOrdens_Item_CContCred_{i}]
   pOrdemItem    = {ChaveAtual_0}
   fOrdemItem    = $_POST[iVer]
   pCPla         = $_POST[pCContCred_{i}]
   fCPla         = $_POST[fCContCred_{i}]
   nRatCredCCont = $_POST[nRatCredCCont_{i}]
   lDeb          = 0
   lExc          = $_POST[pCContCred_{i}]==0 ? 1 : 0
   sDDFSubTabela = Ordens_Item_CContabil
   pSubPId       = $_POST[pOrdens_Item_CContDeb_{i}]
   pOrdemItem    = {ChaveAtual_0}
   fOrdemItem    = $_POST[iVer]
   pCPla         = $_POST[pCContDeb_{i}]
   fCPla         = $_POST[fCContDeb_{i}]
   nRatDebCCont  = $_POST[nRatDebCCont_{i}]
   lDeb          = 1
   lExc          = $_POST[pCContDeb_{i}]==0 ? 1 : 0
</VarsToDb1>
<ServerValids1>
   pItem        ; $_POST[.]>0 ;  O Item deve ser informado.
   pUni         ; $_POST[.]>0 ;  A unidade da transao deve ser informada.
   nQt          ; $_POST[.]>=0 ;  A Qt.Pedida deve ser Preenchida.
   pMoe         ; $_POST[.]>0 ;  A Moeda do Item deve ser informada.
   nProd_vUnCom ; $_POST[.]>=0 ;  O Valor [UN]  c/ (Pr) Descontos deve ser preenchido.
   pItem        ; flEhUnico("select count(*) from Ordens_Itens a, Ordens b, TOper c where a.pItem=$_POST[.] and a.pPId!=$_POST[pPId] and a.pOrdem=$_POST[pOrdem] and a.pOrdem=b.pPId and b.pTOper = c.pPId and b.lTransfDep3o=0 and c.lRejOrdemDupl=1  and a.iVer = a.iVAt and b.iVer = b.iVAt and c.iVer = c.iVAt") ; J existe esse Item cadastrado no Item da Ordem, se no encontrar verifique na lixeira.
</ServerValids1>
<PodeIncluir1>
     select count(*) from Ordens where pPId={ChaveAtual_1} and iVer=iVAt and tConf is null ; Esse Item no pode ser includo porque a Ordem j foi Confirmada
</PodeIncluir1>
<PodeExcluir1>
   select count(*) from Ordens where pPId={ChaveAtual_1} and iVer=iVAt and tConf is null ; Esse Item no pode ser excluido porque a Ordem j foi Confirmada
</PodeExcluir1>
<PodeAlterar1>
   select count(*) from Ordens where pPId={ChaveAtual_1} and iVer=iVAt and tConf is null ; Esse Item no pode ser alterado porque a Ordem j foi Confirmada
</PodeAlterar1>
<exec1>
(
      this.flSetVar('pItem',0) 
   && this.flSetVar('fItem',0) 
   && this.flSetVar('sRegCodItem','') 
   && this.flSetVar('sTabCodItem','') 
   && this.flSetVar('sNegCodItem','') 
   && this.flSetVar('sRegDesItem','') 
   && this.flSetVar('pTab','0') 
   && this.flSetVar('fTab','0') 
   && this.flSetVar('pTabI','0') 
   && this.flSetVar('fTabI','0') 
   && this.flSetVar('sCodTab','') 
   && this.flSetVar('sDesTab','') 
   && this.flSetVar('pLote',0) 
   && this.flSetVar('fLote',0) 
   && this.flSetVar('sLote','') 
   && this.flSetVar('jOrig',0)   
   && this.flSetVar('jICMS_Orig',0)   
   && this.flSetVar('pUni',0)         
   && this.flSetVar('sCodUni','')     
   && this.flSetVar('sUni','')        
   && this.flSetVar('pNCM',0)         
   && this.flSetVar('sCodNCM','')     
   && this.flSetVar('sDesNCM','')     
   && this.flSetVar('pNeg',0)         
   && this.flSetVar('fNeg',0)         
   && this.flSetVar('nPrBruto','0,00000') 
   && this.flSetVar('nVDescCP','0,00000') 
   && this.flSetVar('nVDescTpED','0,00000') 
   && this.flSetVar('nVEncFinTpED','0,00000') 
   && this.flSetVar('nVDescTpEDG','0,00000') 
   && this.flSetVar('nPEncFinTpED','0,00000') 
   && this.flSetVar('sMoe','') 
   && this.flSetVar('pMoe',0) 
   && this.flSetVar('fMoe',0) 
   && this.flSetVar('nQtMoe','0,00000') 
   && this.flSetVar('sMoeCambio','') 
   && this.flSetVar('pCam',0) 
   && this.flSetVar('fCam',0) 
   && this.flSetVar('nCam','0,00000') 
   && this.flSetVar('sCam','') 
   && this.flSetVar('jCam',0) 
   && this.flSetVar('nProd_vUnCom','0,00000') 
   && this.flSetVar('nProd_vFrete','0,00') 
   && this.flSetVar('nVMLE','0,00') 
   && this.flSetVar('nProd_vSeg','0,00') 
   && this.flSetVar('nProd_vDesc','0,00000') 
   && this.flSetVar('nProd_vProd','0,00') 
   && this.flSetVar('pCFO',0) 
   && this.flSetVar('sCodCFO','') 
   && this.flSetVar('sAbrev','') 
   && this.flSetVar('fCFO',0) 
   && this.flSetVar('pRegDepVen',0) 
   && this.flSetVar('pDepVen',0) 
   && this.flSetVar('pUFisVen',0) 
   && this.flSetVar('pUFisVen',0) 
   && this.flSetVar('sUn1Ven','') 
   && this.flSetVar('sUn2Ven','') 
   && this.flSetVar('sUn3Ven','') 
   && this.flSetVar('sUn4Ven','') 
   && this.flSetVar('sUn5Ven','') 
   && this.flSetVar('sUn6Ven','') 
   && this.flSetVar('sUn7Ven','') 
   && this.flSetVar('pRegDepRFis',0) 
   && this.flSetVar('pDepRFis',0) 
   && this.flSetVar('pUFisRFis',0) 
   && this.flSetVar('pUFisRFis',0) 
   && this.flSetVar('sUn1RFis','') 
   && this.flSetVar('sUn2RFis','') 
   && this.flSetVar('sUn3RFis','') 
   && this.flSetVar('sUn4RFis','') 
   && this.flSetVar('sUn5RFis','') 
   && this.flSetVar('sUn6RFis','') 
   && this.flSetVar('sUn7RFis','')  
   && this.flSetVar('tEntPla','') 
   && this.flSetVar('tEmissao','') 
   && this.flSetVar('tSaida ','') 
   && this.flSetVar('sDI_nDI','') 
   && this.flSetVar('dDI_dDI','') 
   && this.flSetVar('sDI_xLocDesemb','') 
   && this.flSetVar('sDI_UFDesemb','') 
   && this.flSetVar('dDI_dDesemb','') 
   && this.flSetVar('sDI_cExportador','') 
   && this.flSetVar('nII_vBC','0,00') 
   && this.flSetVar('nII_vDespAdu','0,00') 
   && this.flSetVar('nII_vII','0,00') 
   && this.flSetVar('nII_vIOF','0,00') 
   && this.flSetVar('iAdi_nAdicao',0) 
   && this.flSetVar('iAdi_nSeqAdic',0) 
   && this.flSetVar('sAdi_cFabricante','') 
   && this.flSetVar('nAdi_vDescDI','0,00000') 
   && this.flSetVar('sAdi_xPed','') 
   && this.flSetVar('iAdi_nItemPed',0) 
   && this.flSetVar('nCIDE_qBCprod','0,00') 
   && this.flSetVar('nCIDE_vAliqProd','0,00') 
   && this.flSetVar('nCIDE_vCIDE','0,00') 
   && this.flSetVar('jICMS_GrupoTrib',0) 
   && this.flSetVar('jICMS_orig',0) 
   && this.flSetVar('jICMS_modBC',0) 
   && this.flSetVar('nICMS_pRedBC','0,00') 
   && this.flSetVar('nICMS_vBC','0,00') 
   && this.flSetVar('nICMS_pICMS','0,00') 
   && this.flSetVar('nICMS_vICMS','0,00') 
   && this.flSetVar('jICMS_modBCST',0) 
   && this.flSetVar('nICMS_pMVAST','0,00') 
   && this.flSetVar('nICMS_pRedBCST','0,00') 
   && this.flSetVar('nICMS_vBCST','0,00') 
   && this.flSetVar('nICMS_pICMSST','0,00') 
   && this.flSetVar('nICMS_vICMSST','0,00') 
   && this.flSetVar('nICMS_vBCSTRet','0,00') 
   && this.flSetVar('nICMS_vICMSSTRet','0,00') 
   && this.flSetVar('jICMS_motDesICMS',0) 
   && this.flSetVar('jICMSPart_orig',0) 
   && this.flSetVar('jICMSPart_CST',0) 
   && this.flSetVar('jICMSPart_modBC',0) 
   && this.flSetVar('nICMSPart_vBC','0,00') 
   && this.flSetVar('nICMSPart_pRedBC','0,00') 
   && this.flSetVar('nICMSPart_pICMS','0,00') 
   && this.flSetVar('nICMSPart_vICMS','0,00') 
   && this.flSetVar('jICMSPart_modBCST',0) 
   && this.flSetVar('nICMSPart_pMVAST','0,00') 
   && this.flSetVar('nICMSPart_pRedBCT','0,00') 
   && this.flSetVar('nICMSPart_vBCST','0,00') 
   && this.flSetVar('nICMSPart_pICMSST','0,00') 
   && this.flSetVar('nICMSPart_vICMSST','0,00') 
   && this.flSetVar('nICMSPart_pBCOp','0,00') 
   && this.flSetVar('sICMSPart_UFST','') 
   && this.flSetVar('jICMSST_orig',0) 
   && this.flSetVar('jICMSST_CST',0) 
   && this.flSetVar('nICMSST_vBCSTRet','0,00') 
   && this.flSetVar('nICMSST_vICMSSTRe','0,00') 
   && this.flSetVar('nICMSST_vBCSTDest','0,00') 
   && this.flSetVar('nICMSST_vICMSSTDes','0,00') 
   && this.flSetVar('jGrupo_simples',0) 
   && this.flSetVar('jICMSSN_Orig',0) 
   && this.flSetVar('jICMSSN_CSOSN',0) 
   && this.flSetVar('jICMSSN_modBC',0) 
   && this.flSetVar('nICMSSN_vBC','0,00') 
   && this.flSetVar('nICMSSN_pRedBC','0,00') 
   && this.flSetVar('nICMSSN_pICMS','0,00') 
   && this.flSetVar('nICMSSN_vICMS','0,00') 
   && this.flSetVar('jICMSSN_modBCST',0) 
   && this.flSetVar('nICMSSN_pMVAST','0,00') 
   && this.flSetVar('nICMSSN_pRedBCST','0,00') 
   && this.flSetVar('nICMSSN_vBCST','0,00') 
   && this.flSetVar('nICMSSN_pICMSST','0,00') 
   && this.flSetVar('nICMSSN_vICMSST','0,00') 
   && this.flSetVar('nICMSSN_pCredSN','0,00') 
   && this.flSetVar('nICMSSN_vCredICMSSN','0,00') 
   && this.flSetVar('nICMSSN_vBCSTRet','0,00') 
   && this.flSetVar('nICMSSN_vICMSSTRet','0,00') 
   && this.flSetVar('sIPI_clEnq','') 
   && this.flSetVar('sIPI_CNPJProd','') 
   && this.flSetVar('sIPI_cSelo','') 
   && this.flSetVar('nIPI_qSelo','0,00') 
   && this.flSetVar('sIPI_cEnq','') 
   && this.flSetVar('jIPINT_CST',0) 
   && this.flSetVar('nIPITrib_vBC','0,00') 
   && this.flSetVar('nIPITrib_pIPI','0,00') 
   && this.flSetVar('nIPITrib_qUnid','0,00') 
   && this.flSetVar('nIPITrib_vUnid','0,00') 
   && this.flSetVar('nIPITrib_vIPI','0,00') 
   && this.flSetVar('jPIS_CST',0) 
   && this.flSetVar('nPIS_vBC','0,00') 
   && this.flSetVar('nPIS_pPIS','0,00') 
   && this.flSetVar('nPIS_qBCProd','0,00') 
   && this.flSetVar('nPIS_vAliqProd','0,00') 
   && this.flSetVar('nPIS_vPIS','0,00') 
   && this.flSetVar('nPISST_vBC','0,00') 
   && this.flSetVar('nPISST_pPIS','0,00') 
   && this.flSetVar('nPISST_qBCProd','0,00') 
   && this.flSetVar('nPISST_vAliqProd','0,00') 
   && this.flSetVar('nPISST_vPIS','0,00') 
   && this.flSetVar('jCOFINS_CST',0) 
   && this.flSetVar('nCOFINS_vBC','0,00') 
   && this.flSetVar('nCOFINS_pCOFINS','0,00') 
   && this.flSetVar('nCOFINS_qBCProd','0,00') 
   && this.flSetVar('nCOFINS_vAliqProd','0,00') 
   && this.flSetVar('nCOFINS_vCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_vBC','0,00') 
   && this.flSetVar('nCOFINSST_pCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_qBCProd','0,00') 
   && this.flSetVar('nCOFINSST_vAliqProd','0,00') 
   && this.flSetVar('nCOFINSST_vCOFINS','0,00') 
   && this.flSetVar('nISSQN_vBC','0,00') 
   && this.flSetVar('nISSQN_vAliq','0,00') 
   && this.flSetVar('nISSQN_vISSQN','0,00') 
   && this.flSetVar('nISSQN_cMunFG','0,00') 
   && this.flSetVar('nISSQN_cListServ','0,00') 
   && this.flSetVar('jISSQN_cSitTrib',0) 
   && this.flSetVar('mInfAdProd','')
   && this.flSetVar('nQtMin','0,00') 
   && this.flSetVar('nQtMax','0,00') 
   && this.flSetVar('nPrecoMin','0,00') 
   && this.flSetVar('nPrecoMax','0,00') 
   && this.flSetVar('lContQua',0) 
   && this.flSetVar('lContPreco',0) 
   && this.flSetVar('iCiclo',0) 
   && this.flSetVar('iCicloAtual',0) 
   && this.flSetVar('jTempo',0) 
   && this.flSetVar('lSkipLote',0) 
)
</exec1>
<exec2>
(
      this.flSetVar('nPrBruto','0,00000') 
   && this.flSetVar('nVDescCP','0,00000') 
   && this.flSetVar('nVDescTpED','0,00000') 
   && this.flSetVar('nVEncFinED','0,00000') 
   && this.flSetVar('nVEncFinTpED','0,00000') 
   && this.flSetVar('nVDescTpEDG','0,00000')                                                                                   
   && this.flSetVar('nQtMoe','0,00000') 
   && this.flSetVar('sMoeCambio','') 
   && this.flSetVar('pCam',0) 
   && this.flSetVar('fCam',0)
   && this.flSetVar('nCam','0,00000') 
   && this.flSetVar('sCam','')                             
   && this.flSetVar('nProd_vUnCom','0,00000') 
   && this.flSetVar('nProd_vFrete','0,00') 
   && this.flSetVar('nVMLE','0,00') 
   && this.flSetVar('nProd_vSeg','0,00') 
   && this.flSetVar('nProd_vDesc','0,00000') 
   && this.flSetVar('nProd_vProd','0,00') 
   && this.flSetVar('pCFO',0) 
   && this.flSetVar('sCodCFO','') 
   && this.flSetVar('sAbrev','') 
   && this.flSetVar('fCFO',0) 
   && this.flSetVar('tEntPla','') 
   && this.flSetVar('tEmissao','') 
   && this.flSetVar('tSaida ','') 
   && this.flSetVar('sDI_nDI','') 
   && this.flSetVar('dDI_dDI','') 
   && this.flSetVar('sDI_xLocDesemb','') 
   && this.flSetVar('sDI_UFDesemb','') 
   && this.flSetVar('dDI_dDesemb','') 
   && this.flSetVar('sDI_cExportador','') 
   && this.flSetVar('nII_vBC','0,00') 
   && this.flSetVar('nII_vDespAdu','0,00') 
   && this.flSetVar('nII_vII','0,00') 
   && this.flSetVar('nII_vIOF','0,00') 
   && this.flSetVar('iAdi_nAdicao',0) 
   && this.flSetVar('iAdi_nSeqAdic',0) 
   && this.flSetVar('sAdi_cFabricante','') 
   && this.flSetVar('nAdi_vDescDI','0,00000') 
   && this.flSetVar('sAdi_xPed','') 
   && this.flSetVar('iAdi_nItemPed',0) 
   && this.flSetVar('nCIDE_qBCprod','0,00') 
   && this.flSetVar('nCIDE_vAliqProd','0,00') 
   && this.flSetVar('nCIDE_vCIDE','0,00') 
   && this.flSetVar('jICMS_GrupoTrib',0) 
   && this.flSetVar('jICMS_orig',0) 
   && this.flSetVar('jICMS_modBC',0) 
   && this.flSetVar('nICMS_pRedBC','0,00') 
   && this.flSetVar('nICMS_vBC','0,00') 
   && this.flSetVar('nICMS_pICMS','0,00') 
   && this.flSetVar('nICMS_vICMS','0,00') 
   && this.flSetVar('jICMS_modBCST',0) 
   && this.flSetVar('nICMS_pMVAST','0,00') 
   && this.flSetVar('nICMS_pRedBCST','0,00') 
   && this.flSetVar('nICMS_vBCST','0,00') 
   && this.flSetVar('nICMS_pICMSST','0,00') 
   && this.flSetVar('nICMS_vICMSST','0,00') 
   && this.flSetVar('nICMS_vBCSTRet','0,00') 
   && this.flSetVar('nICMS_vICMSSTRet','0,00') 
   && this.flSetVar('jICMS_motDesICMS',0) 
   && this.flSetVar('jICMSPart_orig',0) 
   && this.flSetVar('jICMSPart_CST',0) 
   && this.flSetVar('jICMSPart_modBC',0) 
   && this.flSetVar('nICMSPart_vBC','0,00') 
   && this.flSetVar('nICMSPart_pRedBC','0,00') 
   && this.flSetVar('nICMSPart_pICMS','0,00') 
   && this.flSetVar('nICMSPart_vICMS','0,00') 
   && this.flSetVar('jICMSPart_modBCST',0) 
   && this.flSetVar('nICMSPart_pMVAST','0,00') 
   && this.flSetVar('nICMSPart_pRedBCT','0,00') 
   && this.flSetVar('nICMSPart_vBCST','0,00') 
   && this.flSetVar('nICMSPart_pICMSST','0,00') 
   && this.flSetVar('nICMSPart_vICMSST','0,00') 
   && this.flSetVar('nICMSPart_pBCOp','0,00') 
   && this.flSetVar('sICMSPart_UFST','') 
   && this.flSetVar('jICMSST_orig',0) 
   && this.flSetVar('jICMSST_CST',0) 
   && this.flSetVar('nICMSST_vBCSTRet','0,00') 
   && this.flSetVar('nICMSST_vICMSSTRe','0,00') 
   && this.flSetVar('nICMSST_vBCSTDest','0,00') 
   && this.flSetVar('nICMSST_vICMSSTDes','0,00') 
   && this.flSetVar('jGrupo_simples',0) 
   && this.flSetVar('jICMSSN_Orig',0) 
   && this.flSetVar('jICMSSN_CSOSN',0) 
   && this.flSetVar('jICMSSN_modBC',0) 
   && this.flSetVar('nICMSSN_vBC','0,00') 
   && this.flSetVar('nICMSSN_pRedBC','0,00') 
   && this.flSetVar('nICMSSN_pICMS','0,00') 
   && this.flSetVar('nICMSSN_vICMS','0,00') 
   && this.flSetVar('jICMSSN_modBCST',0) 
   && this.flSetVar('nICMSSN_pMVAST','0,00') 
   && this.flSetVar('nICMSSN_pRedBCST','0,00') 
   && this.flSetVar('nICMSSN_vBCST','0,00') 
   && this.flSetVar('nICMSSN_pICMSST','0,00') 
   && this.flSetVar('nICMSSN_vICMSST','0,00') 
   && this.flSetVar('nICMSSN_pCredSN','0,00') 
   && this.flSetVar('nICMSSN_vCredICMSSN','0,00') 
   && this.flSetVar('nICMSSN_vBCSTRet','0,00') 
   && this.flSetVar('nICMSSN_vICMSSTRet','0,00') 
   && this.flSetVar('sIPI_clEnq','') 
   && this.flSetVar('sIPI_CNPJProd','') 
   && this.flSetVar('sIPI_cSelo','') 
   && this.flSetVar('nIPI_qSelo','0,00') 
   && this.flSetVar('sIPI_cEnq','') 
   && this.flSetVar('jIPINT_CST',0) 
   && this.flSetVar('nIPITrib_vBC','0,00') 
   && this.flSetVar('nIPITrib_pIPI','0,00') 
   && this.flSetVar('nIPITrib_qUnid','0,00') 
   && this.flSetVar('nIPITrib_vUnid','0,00') 
   && this.flSetVar('nIPITrib_vIPI','0,00') 
   && this.flSetVar('jPIS_CST',0) 
   && this.flSetVar('nPIS_vBC','0,00') 
   && this.flSetVar('nPIS_pPIS','0,00') 
   && this.flSetVar('nPIS_qBCProd','0,00') 
   && this.flSetVar('nPIS_vAliqProd','0,00') 
   && this.flSetVar('nPIS_vPIS','0,00') 
   && this.flSetVar('nPISST_vBC','0,00') 
   && this.flSetVar('nPISST_pPIS','0,00') 
   && this.flSetVar('nPISST_qBCProd','0,00') 
   && this.flSetVar('nPISST_vAliqProd','0,00') 
   && this.flSetVar('nPISST_vPIS','0,00') 
   && this.flSetVar('jCOFINS_CST',0) 
   && this.flSetVar('nCOFINS_vBC','0,00') 
   && this.flSetVar('nCOFINS_pCOFINS','0,00') 
   && this.flSetVar('nCOFINS_qBCProd','0,00') 
   && this.flSetVar('nCOFINS_vAliqProd','0,00') 
   && this.flSetVar('nCOFINS_vCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_vBC','0,00') 
   && this.flSetVar('nCOFINSST_pCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_qBCProd','0,00') 
   && this.flSetVar('nCOFINSST_vAliqProd','0,00') 
   && this.flSetVar('nCOFINSST_vCOFINS','0,00') 
   && this.flSetVar('nISSQN_vBC','0,00') 
   && this.flSetVar('nISSQN_vAliq','0,00') 
   && this.flSetVar('nISSQN_vISSQN','0,00') 
   && this.flSetVar('nISSQN_cMunFG','0,00') 
   && this.flSetVar('nISSQN_cListServ','0,00') 
   && this.flSetVar('jISSQN_cSitTrib',0) 
   && this.flSetVar('mInfAdProd','') 
   && this.flSetVar('nVDescInc','0,00')
   && this.flSetVar('pLote',0) 
   && this.flSetVar('fLote',0) 
   && this.flSetVar('sLote','') 
)
</exec2>
<exec3>
( 
   ( (pCapaMoe!=pMoe) 
     ? 
     (this.flSetVar('nQtMoe',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nPrBruto','0,00000'))  
     : 
     (this.flSetVar('nPrBruto',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nQtMoe','0,00000')) 
   ) 
   && this.flSetVar('nVDescCP','0,00000') 
   && this.flSetVar('nVDescTpED','0,00000') 
   && this.flSetVar('nVEncFinTpED','0,00000') 
   && this.flSetVar('nVDescTpEDG','0,00000') 
   && this.flSetVar('sMoeCambio','') 
   && this.flSetVar('pCam',0) 
   && this.flSetVar('fCam',0)
   && this.flSetVar('nCam','0,00000') 
   && this.flSetVar('sCam','') 
   && this.flSetVar('nProd_vUnCom','0,00000') 
   && this.flSetVar('nProd_vFrete','0,00') 
   && this.flSetVar('nVMLE','0,00') 
   && this.flSetVar('nProd_vSeg','0,00') 
   && this.flSetVar('nProd_vDesc','0,00000') 
   && this.flSetVar('nProd_vProd','0,00') 
   && this.flSetVar('pCFO',0) 
   && this.flSetVar('sCodCFO','') 
   && this.flSetVar('sAbrev','') 
   && this.flSetVar('fCFO',0) 
   && this.flSetVar('tEntPla','') 
   && this.flSetVar('tEmissao','') 
   && this.flSetVar('tSaida ','') 
   && this.flSetVar('sDI_nDI','') 
   && this.flSetVar('dDI_dDI','') 
   && this.flSetVar('sDI_xLocDesemb','') 
   && this.flSetVar('sDI_UFDesemb','') 
   && this.flSetVar('dDI_dDesemb','') 
   && this.flSetVar('sDI_cExportador','') 
   && this.flSetVar('nII_vBC','0,00') 
   && this.flSetVar('nII_vDespAdu','0,00') 
   && this.flSetVar('nII_vII','0,00') 
   && this.flSetVar('nII_vIOF','0,00') 
   && this.flSetVar('iAdi_nAdicao',0) 
   && this.flSetVar('iAdi_nSeqAdic',0) 
   && this.flSetVar('sAdi_cFabricante','') 
   && this.flSetVar('nAdi_vDescDI','0,00000') 
   && this.flSetVar('sAdi_xPed','') 
   && this.flSetVar('iAdi_nItemPed',0) 
   && this.flSetVar('nCIDE_qBCprod','0,00') 
   && this.flSetVar('nCIDE_vAliqProd','0,00') 
   && this.flSetVar('nCIDE_vCIDE','0,00') 
   && this.flSetVar('jICMS_GrupoTrib',0) 
   && this.flSetVar('jICMS_orig',0) 
   && this.flSetVar('jICMS_modBC',0) 
   && this.flSetVar('nICMS_pRedBC','0,00') 
   && this.flSetVar('nICMS_vBC','0,00') 
   && this.flSetVar('nICMS_pICMS','0,00') 
   && this.flSetVar('nICMS_vICMS','0,00') 
   && this.flSetVar('jICMS_modBCST',0) 
   && this.flSetVar('nICMS_pMVAST','0,00') 
   && this.flSetVar('nICMS_pRedBCST','0,00') 
   && this.flSetVar('nICMS_vBCST','0,00') 
   && this.flSetVar('nICMS_pICMSST','0,00') 
   && this.flSetVar('nICMS_vICMSST','0,00') 
   && this.flSetVar('nICMS_vBCSTRet','0,00') 
   && this.flSetVar('nICMS_vICMSSTRet','0,00') 
   && this.flSetVar('jICMS_motDesICMS',0) 
   && this.flSetVar('jICMSPart_orig',0) 
   && this.flSetVar('jICMSPart_CST',0) 
   && this.flSetVar('jICMSPart_modBC',0) 
   && this.flSetVar('nICMSPart_vBC','0,00') 
   && this.flSetVar('nICMSPart_pRedBC','0,00') 
   && this.flSetVar('nICMSPart_pICMS','0,00') 
   && this.flSetVar('nICMSPart_vICMS','0,00') 
   && this.flSetVar('jICMSPart_modBCST',0) 
   && this.flSetVar('nICMSPart_pMVAST','0,00') 
   && this.flSetVar('nICMSPart_pRedBCT','0,00') 
   && this.flSetVar('nICMSPart_vBCST','0,00') 
   && this.flSetVar('nICMSPart_pICMSST','0,00') 
   && this.flSetVar('nICMSPart_vICMSST','0,00') 
   && this.flSetVar('nICMSPart_pBCOp','0,00') 
   && this.flSetVar('sICMSPart_UFST','') 
   && this.flSetVar('jICMSST_orig',0) 
   && this.flSetVar('jICMSST_CST',0) 
   && this.flSetVar('nICMSST_vBCSTRet','0,00') 
   && this.flSetVar('nICMSST_vICMSSTRe','0,00') 
   && this.flSetVar('nICMSST_vBCSTDest','0,00') 
   && this.flSetVar('nICMSST_vICMSSTDes','0,00') 
   && this.flSetVar('jGrupo_simples',0) 
   && this.flSetVar('jICMSSN_Orig',0) 
   && this.flSetVar('jICMSSN_CSOSN',0) 
   && this.flSetVar('jICMSSN_modBC',0) 
   && this.flSetVar('nICMSSN_vBC','0,00') 
   && this.flSetVar('nICMSSN_pRedBC','0,00') 
   && this.flSetVar('nICMSSN_pICMS','0,00') 
   && this.flSetVar('nICMSSN_vICMS','0,00') 
   && this.flSetVar('jICMSSN_modBCST',0) 
   && this.flSetVar('nICMSSN_pMVAST','0,00') 
   && this.flSetVar('nICMSSN_pRedBCST','0,00') 
   && this.flSetVar('nICMSSN_vBCST','0,00') 
   && this.flSetVar('nICMSSN_pICMSST','0,00') 
   && this.flSetVar('nICMSSN_vICMSST','0,00') 
   && this.flSetVar('nICMSSN_pCredSN','0,00') 
   && this.flSetVar('nICMSSN_vCredICMSSN','0,00') 
   && this.flSetVar('nICMSSN_vBCSTRet','0,00') 
   && this.flSetVar('nICMSSN_vICMSSTRet','0,00') 
   && this.flSetVar('sIPI_clEnq','') 
   && this.flSetVar('sIPI_CNPJProd','') 
   && this.flSetVar('sIPI_cSelo','') 
   && this.flSetVar('nIPI_qSelo','0,00') 
   && this.flSetVar('sIPI_cEnq','') 
   && this.flSetVar('jIPINT_CST',0) 
   && this.flSetVar('nIPITrib_vBC','0,00') 
   && this.flSetVar('nIPITrib_pIPI','0,00') 
   && this.flSetVar('nIPITrib_qUnid','0,00') 
   && this.flSetVar('nIPITrib_vUnid','0,00') 
   && this.flSetVar('nIPITrib_vIPI','0,00') 
   && this.flSetVar('jPIS_CST',0) 
   && this.flSetVar('nPIS_vBC','0,00') 
   && this.flSetVar('nPIS_pPIS','0,00') 
   && this.flSetVar('nPIS_qBCProd','0,00') 
   && this.flSetVar('nPIS_vAliqProd','0,00') 
   && this.flSetVar('nPIS_vPIS','0,00') 
   && this.flSetVar('nPISST_vBC','0,00') 
   && this.flSetVar('nPISST_pPIS','0,00') 
   && this.flSetVar('nPISST_qBCProd','0,00') 
   && this.flSetVar('nPISST_vAliqProd','0,00') 
   && this.flSetVar('nPISST_vPIS','0,00') 
   && this.flSetVar('jCOFINS_CST',0) 
   && this.flSetVar('nCOFINS_vBC','0,00') 
   && this.flSetVar('nCOFINS_pCOFINS','0,00') 
   && this.flSetVar('nCOFINS_qBCProd','0,00') 
   && this.flSetVar('nCOFINS_vAliqProd','0,00') 
   && this.flSetVar('nCOFINS_vCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_vBC','0,00') 
   && this.flSetVar('nCOFINSST_pCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_qBCProd','0,00') 
   && this.flSetVar('nCOFINSST_vAliqProd','0,00') 
   && this.flSetVar('nCOFINSST_vCOFINS','0,00') 
   && this.flSetVar('nISSQN_vBC','0,00') 
   && this.flSetVar('nISSQN_vAliq','0,00') 
   && this.flSetVar('nISSQN_vISSQN','0,00') 
   && this.flSetVar('nISSQN_cMunFG','0,00') 
   && this.flSetVar('nISSQN_cListServ','0,00') 
   && this.flSetVar('jISSQN_cSitTrib',0) 
   && this.flSetVar('mInfAdProd','') 
   && this.flSetVar('pLote',0) 
   && this.flSetVar('fLote',0) 
   && this.flSetVar('sLote','') 
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5)) 
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec3>
<exec4>
( 
   ( 
     (pCapaMoe!=pMoe) 
     ?  
     (this.flSetVar('nQtMoe',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nPrBruto','0,00000')) 
     : 
     (this.flSetVar('nPrBruto',fsReplaceDecimalPoint(nPrBruto,".",",",5)) && this.flSetVar('nQtMoe','0,00000'))  
   ) 
   && this.flSetVar('nVDescCP','0,00000') 
   && this.flSetVar('nVDescTpED','0,00000') 
   && this.flSetVar('nVEncFinTpED','0,00000') 
   && this.flSetVar('nVDescTpEDG','0,00000') 
   && this.flSetVar('sMoeCambio','') 
   && this.flSetVar('pCam',0) 
   && this.flSetVar('fCam',0)
   && this.flSetVar('nCam','0,00000')
   && this.flSetVar('sCam','')
   && this.flSetVar('nProd_vUnCom','0,00000') 
   && this.flSetVar('nProd_vFrete','0,00') 
   && this.flSetVar('nVMLE','0,00') 
   && this.flSetVar('nProd_vSeg','0,00') 
   && this.flSetVar('nProd_vDesc','0,00000') 
   && this.flSetVar('nProd_vProd','0,00') 
   && this.flSetVar('pCFO',0) 
   && this.flSetVar('sCodCFO','') 
   && this.flSetVar('sAbrev','') 
   && this.flSetVar('fCFO',0) 
   && this.flSetVar('tEntPla','') 
   && this.flSetVar('tEmissao','') 
   && this.flSetVar('tSaida ','') 
   && this.flSetVar('sDI_nDI','') 
   && this.flSetVar('dDI_dDI','') 
   && this.flSetVar('sDI_xLocDesemb','') 
   && this.flSetVar('sDI_UFDesemb','') 
   && this.flSetVar('dDI_dDesemb','') 
   && this.flSetVar('sDI_cExportador','') 
   && this.flSetVar('nII_vBC','0,00') 
   && this.flSetVar('nII_vDespAdu','0,00') 
   && this.flSetVar('nII_vII','0,00') 
   && this.flSetVar('nII_vIOF','0,00') 
   && this.flSetVar('iAdi_nAdicao',0) 
   && this.flSetVar('iAdi_nSeqAdic',0) 
   && this.flSetVar('sAdi_cFabricante','') 
   && this.flSetVar('nAdi_vDescDI','0,00000') 
   && this.flSetVar('sAdi_xPed','') 
   && this.flSetVar('iAdi_nItemPed',0) 
   && this.flSetVar('nCIDE_qBCprod','0,00') 
   && this.flSetVar('nCIDE_vAliqProd','0,00') 
   && this.flSetVar('nCIDE_vCIDE','0,00') 
   && this.flSetVar('jICMS_GrupoTrib',0) 
   && this.flSetVar('jICMS_orig',0) 
   && this.flSetVar('jICMS_modBC',0) 
   && this.flSetVar('nICMS_pRedBC','0,00') 
   && this.flSetVar('nICMS_vBC','0,00') 
   && this.flSetVar('nICMS_pICMS','0,00') 
   && this.flSetVar('nICMS_vICMS','0,00') 
   && this.flSetVar('jICMS_modBCST',0) 
   && this.flSetVar('nICMS_pMVAST','0,00') 
   && this.flSetVar('nICMS_pRedBCST','0,00') 
   && this.flSetVar('nICMS_vBCST','0,00') 
   && this.flSetVar('nICMS_pICMSST','0,00') 
   && this.flSetVar('nICMS_vICMSST','0,00') 
   && this.flSetVar('nICMS_vBCSTRet','0,00') 
   && this.flSetVar('nICMS_vICMSSTRet','0,00') 
   && this.flSetVar('jICMS_motDesICMS',0) 
   && this.flSetVar('jICMSPart_orig',0) 
   && this.flSetVar('jICMSPart_CST',0) 
   && this.flSetVar('jICMSPart_modBC',0) 
   && this.flSetVar('nICMSPart_vBC','0,00') 
   && this.flSetVar('nICMSPart_pRedBC','0,00') 
   && this.flSetVar('nICMSPart_pICMS','0,00') 
   && this.flSetVar('nICMSPart_vICMS','0,00') 
   && this.flSetVar('jICMSPart_modBCST',0) 
   && this.flSetVar('nICMSPart_pMVAST','0,00') 
   && this.flSetVar('nICMSPart_pRedBCT','0,00') 
   && this.flSetVar('nICMSPart_vBCST','0,00') 
   && this.flSetVar('nICMSPart_pICMSST','0,00') 
   && this.flSetVar('nICMSPart_vICMSST','0,00') 
   && this.flSetVar('nICMSPart_pBCOp','0,00') 
   && this.flSetVar('sICMSPart_UFST','') 
   && this.flSetVar('jICMSST_orig',0) 
   && this.flSetVar('jICMSST_CST',0) 
   && this.flSetVar('nICMSST_vBCSTRet','0,00') 
   && this.flSetVar('nICMSST_vICMSSTRe','0,00') 
   && this.flSetVar('nICMSST_vBCSTDest','0,00') 
   && this.flSetVar('nICMSST_vICMSSTDes','0,00') 
   && this.flSetVar('jGrupo_simples',0) 
   && this.flSetVar('jICMSSN_Orig',0) 
   && this.flSetVar('jICMSSN_CSOSN',0) 
   && this.flSetVar('jICMSSN_modBC',0) 
   && this.flSetVar('nICMSSN_vBC','0,00') 
   && this.flSetVar('nICMSSN_pRedBC','0,00') 
   && this.flSetVar('nICMSSN_pICMS','0,00') 
   && this.flSetVar('nICMSSN_vICMS','0,00') 
   && this.flSetVar('jICMSSN_modBCST',0) 
   && this.flSetVar('nICMSSN_pMVAST','0,00') 
   && this.flSetVar('nICMSSN_pRedBCST','0,00') 
   && this.flSetVar('nICMSSN_vBCST','0,00') 
   && this.flSetVar('nICMSSN_pICMSST','0,00') 
   && this.flSetVar('nICMSSN_vICMSST','0,00') 
   && this.flSetVar('nICMSSN_pCredSN','0,00') 
   && this.flSetVar('nICMSSN_vCredICMSSN','0,00') 
   && this.flSetVar('nICMSSN_vBCSTRet','0,00') 
   && this.flSetVar('nICMSSN_vICMSSTRet','0,00') 
   && this.flSetVar('sIPI_clEnq','') 
   && this.flSetVar('sIPI_CNPJProd','') 
   && this.flSetVar('sIPI_cSelo','') 
   && this.flSetVar('nIPI_qSelo','0,00') 
   && this.flSetVar('sIPI_cEnq','') 
   && this.flSetVar('jIPINT_CST',0) 
   && this.flSetVar('nIPITrib_vBC','0,00') 
   && this.flSetVar('nIPITrib_pIPI','0,00') 
   && this.flSetVar('nIPITrib_qUnid','0,00') 
   && this.flSetVar('nIPITrib_vUnid','0,00') 
   && this.flSetVar('nIPITrib_vIPI','0,00') 
   && this.flSetVar('jPIS_CST',0) 
   && this.flSetVar('nPIS_vBC','0,00') 
   && this.flSetVar('nPIS_pPIS','0,00') 
   && this.flSetVar('nPIS_qBCProd','0,00') 
   && this.flSetVar('nPIS_vAliqProd','0,00') 
   && this.flSetVar('nPIS_vPIS','0,00') 
   && this.flSetVar('nPISST_vBC','0,00') 
   && this.flSetVar('nPISST_pPIS','0,00') 
   && this.flSetVar('nPISST_qBCProd','0,00') 
   && this.flSetVar('nPISST_vAliqProd','0,00') 
   && this.flSetVar('nPISST_vPIS','0,00') 
   && this.flSetVar('jCOFINS_CST',0) 
   && this.flSetVar('nCOFINS_vBC','0,00') 
   && this.flSetVar('nCOFINS_pCOFINS','0,00') 
   && this.flSetVar('nCOFINS_qBCProd','0,00') 
   && this.flSetVar('nCOFINS_vAliqProd','0,00') 
   && this.flSetVar('nCOFINS_vCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_vBC','0,00') 
   && this.flSetVar('nCOFINSST_pCOFINS','0,00') 
   && this.flSetVar('nCOFINSST_qBCProd','0,00') 
   && this.flSetVar('nCOFINSST_vAliqProd','0,00') 
   && this.flSetVar('nCOFINSST_vCOFINS','0,00') 
   && this.flSetVar('nISSQN_vBC','0,00') 
   && this.flSetVar('nISSQN_vAliq','0,00') 
   && this.flSetVar('nISSQN_vISSQN','0,00') 
   && this.flSetVar('nISSQN_cMunFG','0,00') 
   && this.flSetVar('nISSQN_cListServ','0,00') 
   && this.flSetVar('jISSQN_cSitTrib',0) 
   && this.flSetVar('mInfAdProd','') 
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5)) 
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec4>
<exec5>
( 
 this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec5>
<exec6>
( 
 this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec6>
<exec7>
(
      this.flSetVar('sMoeCambio','') 
   && this.flSetVar('pCam','0') 
   && this.flSetVar('nCam','0,00000') 
   && this.flSetVar('fCam','0') 
   && this.flSetVar('sCam','') 
   && this.flSetVar('nVDescCP','0,00000') 
   && this.flSetVar('nVDescTpED','0,00000') 
   && this.flSetVar('nVEncFinTpED','0,00000') 
   && this.flSetVar('nVDescTpEDG','0,00000') 
   && this.flSetVar('nQtMoe','0,00000') 
   && this.flSetVar('nProd_vUnCom','0,00000')
)
</exec7>
<exec8>
(
      this.flSetVar('nPrBruto',fsReplaceDecimalPoint((nQtMoe*nCam),".",",",5)) 
   && this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDFin),".",",",5)) 
   && this.flSetVar('nVDescTpED',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDescFin),".",",",5)) 
   && this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nPDescTpEDG),".",",",5)) 
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nQtMoe*nCam)-(nVDescInc+((nQtMoe*nCam)/100*(nDFin))+((nQtMoe*nCam)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5)) 
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nQtMoe*nCam)-(nVDescInc+((nQtMoe*nCam)/100*(nDFin))+((nQtMoe*nCam)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec8>
<exec9>
(
      this.flSetVar('nPrBruto',fsReplaceDecimalPoint((nQtMoe*nCam),".",",",5) ) 
   && this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDFin),".",",",5)) 
   && this.flSetVar('nVDescTpED',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nDescFin),".",",",5))
   && this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint(((nQtMoe*nCam)/100*nPDescTpEDG),".",",",5)) 
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint(((nQtMoe*nCam))-(nVDescInc+(((nQtMoe*nCam))/100*(nDFin))+(((nQtMoe*nCam))/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint(((((nQtMoe*nCam))-(nVDescInc+(((nQtMoe*nCam))/100*(nDFin))+(((nQtMoe*nCam))/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
   )
</exec9>
<exec10>
(
      this.flSetVar('nVDescInc',fsReplaceDecimalPoint(((nPrBruto)/100*nPDescInc),".",",",5))
   && this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin),".",",",5)) 
   && this.flSetVar('nVDescTpED',fsReplaceDecimalPoint((nPrBruto/100*nDescFin),".",",",5))
   && this.flSetVar('nVDescTpEDG',fsReplaceDecimalPoint((nPrBruto/100*nPDescTpEDG),".",",",5)) 
   && this.flSetVar('nVDescLog',fsReplaceDecimalPoint((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec10>
<exec11>
(
   this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec11>
<exec11a>
(
   this.flSetVar('nVDescInc',fsReplaceDecimalPoint(((nPrBruto)/100*nPDescInc),".",",",5))
   && this.flSetVar('nVDescCP',fsReplaceDecimalPoint(((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin),".",",",5)) 
   && this.flSetVar('nVDescLog',fsReplaceDecimalPoint((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)/100*nPDescInc)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec11a>
<exec12>
(
      this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec12>
<exec13>
( 
 this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(nVDescInc+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec13>
<exec14>
(
   this.flSetVar('nVDescLog',fsReplaceDecimalPoint(((((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog),".",",",5))
   && this.flSetVar('nProd_vUnCom',fsReplaceDecimalPoint((nPrBruto)-(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))),".",",",5))
   && this.flSetVar('nProd_vProd',fsReplaceDecimalPoint((((nPrBruto)-(((nPrBruto)-((nPrBruto)/100*nPDescInc)-((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin))/100*nPDescLog)+((nPrBruto-((nPrBruto)/100*(nPDescInc)))/100*nDFin)+((nPrBruto)/100*(nPDescTpEDG))-((nPrBruto)/100*(nPEncFinTpED))))*nQt),".",",",5))
)
</exec14>
<esc1>
(
 'dd_files/erp_PTOpED_Item.dda',
 'Esc_Padrao_1',
 'sRegCodItem,pTOper,pEmi,pDest,pOrdem,pDestDefault',
 '
  pPTOpEDItem,
  fPTOpEDItem,
  pItem,
  fItem,
  sRegCodItem,
  sRegDesItem,
  sEAN,sGTIN,
  jICMS_Orig,
  pUni,
  fUni,
  sCodUni,
  sUni,
  pNCM,
  fNCM,
  sCodNCM,
  sDesNCM,
  jFDiasEnt,
  iDiasInf,
  iDiasCalc,
  lInspecao,
  nPDescTpEDG,
  jCam,
  sMoe,
  pMoe,
  fMoe,
  lCCusto,
  lCrtlItem,
  stmp,
  nPEncFinTpED,
  lContQua,
  nQtMin,
  nQtMax,
  lContPreco,
  nPrecoMin,
  nPrecoMax,
  iCiclo,
  iCicloAtual,
  lSkipLote,
  stmp,
  pRegDepVen,
  fRegDepVen,
  pDep,
  pUFis,
  sUn1,
  sUn2,
  sUn3,
  sUn4,
  sUn5,
  sUn6,
  sUn7,
  sIns,
  pRegDepRFis,
  fRegDepRFis,
  pDepRFis,
  pUFisRFis,
  sUn1RFis,
  sUn2RFis,
  sUn3RFis,
  sUn4RFis,
  sUn5RFis,
  sUn6RFis,
  sUn7RFis,
  sInsRFis,
  jFinalidade,
  nAliqTranspImport,
  nAliqTranspNac,
  sCEST,
  pRegDepTransf,
  fRegDepTransf,
  pDepTransf,
  pUFisTransf,
  sUnTransf1,
  sUnTransf2,
  sUnTransf3,
  sUnTransf4,
  sUnTransf5,
  sUnTransf6,
  sUnTransf7,
  sInsTransf,
  iLote,
  jTempo,
  pDepInsp,
  fDepInsp,
  sUn1Insp,
  sUn2Insp,
  sUn3Insp,
  sUn4Insp,
  sUn5Insp,
  sUn6Insp,
  sUn7Insp,
  pDepReje,
  fDepReje,
  sUn1Reje,
  sUn2Reje,
  sUn3Reje,
  sUn4Reje,
  sUn5Reje,
  sUn6Reje,
  sUn7Reje,
  dUltInsp,
  pInsp,
  fInsp,  
  lInt,
  pTmp1_{1},
  pCCusto_{1},
  fCCusto_{1},
  sCCusto_{1},
  nRatCCusto_{1},
  pTmp2_{2},
  pCContCred_{2},
  fCContCred_{2},
  sCodCredPla_{2},
  sDesCredPla_{2},
  nRatCredCCont_{2},
  pTmp3_{3},
  pCContDeb_{3},
  fCContDeb_{3},
  sCodDebPla_{3},
  sDesDebPla_{3},
  nRatDebCCont_{3}
 '
)
</esc1>
<esc2>
(
 'dd_files/erp_PTOpED_Item.dda',
 'Esc_Padrao_2',
 'sNegCodItem,pTOper,pEmi,pDest,pOrdem',
 '
  pPTOpEDItem,
  fPTOpEDItem,
  pItem,
  fItem,
  sNegCodItem,
  sRegDesItem,
  sEAN,
  sGTIN,
  jICMS_Orig,
  pUni,
  fUni,
  sCodUni,
  sUni,
  pNCM,
  fNCM,
  sCodNCM,
  sDesNCM,
  jFDiasEnt,
  iDiasInf,
  iDiasCalc,
  lInspecao,
  nPDescTpEDG,
  sTmp,
  nPrBruto,
  jCam,
  sMoe,
  pMoe,
  fMoe,
  lCCusto,
  lCrtlItem,
  nPEncFinTpED,
  lContQua,
  nQtMin,
  nQtMax,
  lContPreco,
  nPrecoMin,
  nPrecoMax,
  iCiclo,
  iCicloAtual,
  lSkipLote,
  stmp,
  pRegDepVen,
  fRegDepVen,
  pDep,
  pUFis,
  sUn1,
  sUn2,
  sUn3,
  sUn4,
  sUn5,
  sUn6,
  sUn7,
  sIns,
  pRegDepRFis,
  fRegDepRFis,
  pDepRFis,
  pUFisRFis,
  sUn1RFis,
  sUn2RFis,
  sUn3RFis,
  sUn4RFis,
  sUn5RFis,
  sUn6RFis,
  sUn7RFis,
  sInsRFis,
  jFinalidade,
  nAliqTranspImport,
  nAliqTranspNac,
  sCEST,
  pRegDepTransf,
  fRegDepTransf,
  pDepTransf,
  pUFisTransf,
  sUnTransf1,
  sUnTransf2,
  sUnTransf3,
  sUnTransf4,
  sUnTransf5,
  sUnTransf6,
  sUnTransf7,
  sInsTransf,
  iLote,
  jTempo,
  pDepInsp,
  fDepInsp,
  sUn1Insp,
  sUn2Insp,
  sUn3Insp,
  sUn4Insp,
  sUn5Insp,
  sUn6Insp,
  sUn7Insp,
  pDepReje,
  fDepReje,
  sUn1Reje,
  sUn2Reje,
  sUn3Reje,
  sUn4Reje,
  sUn5Reje,
  sUn6Reje,
  sUn7Reje,
  dUltInsp,
  pInsp,
  fInsp,  
  lInt,
  pTmp1_{1},
  pCCusto_{1},
  fCCusto_{1},
  sCCusto_{1},
  nRatCCusto_{1},
  pTmp2_{2},
  pCContCred_{2},
  fCContCred_{2},
  sCodCredPla_{2},
  sDesCredPla_{2},
  nRatCredCCont_{2},
  pTmp3_{3},
  pCContDeb_{3},
  fCContDeb_{3},
  sCodDebPla_{3},
  sDesDebPla_{3},
  nRatDebCCont_{3}
 '
)   
</esc2>
<esc3>
(
 'dd_files/erp_PTOpED_Item.dda',
 'Esc_Padrao_3',
 'sTabCodItem,pTOper,pEmi,pDest,pOrdem',
 '
  pPTOpEDItem,
  fPTOpEDItem,
  pTab,
  fTab,
  pTabI,
  fTabI,
  pItem,
  fItem,
  sTabCodItem,
  sRegDesItem,
  sCodTab,
  sDesTab,
  sEAN,
  sGTIN,
  jICMS_Orig,
  pUni,
  fUni,
  sCodUni,
  sUni,
  pNCM,
  fNCM,
  sCodNCM,
  sDesNCM,
  jFDiasEnt,
  iDiasInf,
  iDiasCalc,
  lInspecao,
  nPDescTpEDG,
  sTmp,
  nPrBruto,
  jCam,
  sMoe,
  pMoe,
  fMoe,
  lCCusto,
  lCrtlItem,
  nPEncFinTpED,
  lContQua,
  nQtMin,
  nQtMax,
  lContPreco,
  nPrecoMin,
  nPrecoMax,
  iCiclo,
  iCicloAtual,
  lSkiLote,
  stmp,
  pRegDepVen,
  fRegDepVen,
  pDep,
  pUFis,
  sUn1,
  sUn2,
  sUn3,
  sUn4,
  sUn5,
  sUn6,
  sUn7,
  sIns,
  pRegDepRFis,
  fRegDepRFis,
  pDepRFis,
  pUFisRFis,
  sUn1RFis,
  sUn2RFis,
  sUn3RFis,
  sUn4RFis,
  sUn5RFis,
  sUn6RFis,
  sUn7RFis,
  sInsRFis,
  jFinalidade,
  nAliqTranspImport,
  nAliqTranspNac,
  sCEST,
  pRegDepTransf,
  fRegDepTransf,
  pDepTransf,
  pUFisTransf,
  sUnTransf1,
  sUnTransf2,
  sUnTransf3,
  sUnTransf4,
  sUnTransf5,
  sUnTransf6,
  sUnTransf7,
  sInsTransf,
  iLote,
  jTempo,
  pDepInsp,
  fDepInsp,
  sUn1Insp,
  sUn2Insp,
  sUn3Insp,
  sUn4Insp,
  sUn5Insp,
  sUn6Insp,
  sUn7Insp,
  pDepReje,
  fDepReje,
  sUn1Reje,
  sUn2Reje,
  sUn3Reje,
  sUn4Reje,
  sUn5Reje,
  sUn6Reje,
  sUn7Reje,
  dUltInsp,
  pInsp,
  fInsp,  
  lInt,
  pTmp1_{1},
  pCCusto_{1},
  fCCusto_{1},
  sCCusto_{1},
  nRatCCusto_{1},
  pTmp2_{2},
  pCContCred_{2},
  fCContCred_{2},
  sCodCredPla_{2},
  sDesCredPla_{2},
  nRatCredCCont_{2},
  pTmp3_{3},
  pCContDeb_{3},
  fCContDeb_{3},
  sCodDebPla_{3},
  sDesDebPla_{3},
  nRatDebCCont_{3}
 '
)
</esc3>
a) sQry=  select a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = {ChaveAtual_1}   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial
Tempo 12-27/11/2025 17:32:14
A) psVarTmp=
Tempo 13-27/11/2025 17:32:14
Tempo 14-27/11/2025 17:32:14
pChaveAtual_1=1383722, pChaveAtual_2=0, pChaveAtual_3=0, pPaizao=1383722, iCountAncestrais=1, iCountIrmasTias=1
psIrmasTias=254//2025-11-27 17:30:53/1/5/31217/0//1/0/0/0/0/0/0/0/0/0/0/0/0/0/0.00000/0.00000
antes da troca da ChaveIrma 0 , sQry=  select a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = 1383722   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial
antes da troca da ChaveIrma 1 , sQrySum=
antes da troca da ChaveIrma 2 , sQrySum2=
iCountTmp=24
depois da troca da ChaveIrma 0 , sQry=  select a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = 1383722   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial
depois da troca da ChaveIrma 1 , sQrySum=
depois da troca da ChaveIrma 2 , sQrySum2=
Tempo 15-27/11/2025 17:32:14
sQryEscSemLikeP0=  select a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = 1383722   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial
psVars=
---
Tempo 16-27/11/2025 17:32:14
Tempo 17-27/11/2025 17:32:14
psEscId=, psEscIdIrma1=
Tempo 18-27/11/2025 17:32:14
No entrou no sTagToolsBar
iPagAtrasado = 0, sToolsBar = Incluir,Excluir,Alterar,Zoom,Pesquisar
sSqlMarcados=
Tempo 18-27/11/2025 17:32:14
sEntrarIncluindo=
psTipo=0, sSearch=
Tempo 19-27/11/2025 17:32:14
Tempo 20-27/11/2025 17:32:14
colocando o sSearch na qry
sQryOriginal=  select a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = 1383722   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial
sQry=  select a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = 1383722   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial
iCountTmp=1, sSearch=, len=0
sQry=  select a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = 1383722   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial
psPesquisarFull=
Tempo 21-27/11/2025 17:32:14
sOnLoadExe=
psQry=select current_transaction from rdb$database
durao 0, iDb=1
fhDBConnect - sUser=sysdba, Transaction ID=4303736 , hBase=Resource id #135, hTr=Resource id #136, ghBase=Resource id #135
conexo -> hBase=Resource id #136
0) pChaveDinamica=0
sTagIncludeOnLoadGrid=
Tempo 22-27/11/2025 17:32:14
sTagIncludeOnLoadGridNoRefresh=
Tempo 23-27/11/2025 17:32:14
Tempo 24-27/11/2025 17:32:14
Tempo 25-27/11/2025 17:32:14
sSqlMarcados=
Tempo 26-27/11/2025 17:32:14
Tempo 27-27/11/2025 17:32:14
Tempo 28-27/11/2025 17:32:14
Tempo 29-27/11/2025 17:32:14
psTipo=0
Tempo 30-27/11/2025 17:32:14
nao eh um group by
Tempo 35-27/11/2025 17:32:14
sGlobal_pUNeg=, sTagMainTable=Ordens_Itens
1XXX) sQryCount_UNeg=select count(*) from Ordens_Itens  a left join Moeda k on a.pMoe = k.pPId and k.iVer = k.iVAt left join Cambio kk on a.pCam = kk.pPId and kk.iVer = kk.iVAt left join Moeda kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt left join NCM g on a.pNCM = g.pPId and g.iVer = a.fNCM left join UnidadeMedida c on a.pUni = c.pPId and c.iVer = c.iVAt, Itens b, Ordens d where a.lExc = 0 and a.iVer = a.iVAt and a.pOrdem = 1383722 and a.pOrdem = d.pPId and d.iVer = d.iVAt and a.pItem = b.pPId and b.iVer = a.fItem
Tempo 36-27/11/2025 17:32:14
sQryCount_UNeg=select count(*) from Ordens_Itens  a left join Moeda k on a.pMoe = k.pPId and k.iVer = k.iVAt left join Cambio kk on a.pCam = kk.pPId and kk.iVer = kk.iVAt left join Moeda kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt left join NCM g on a.pNCM = g.pPId and g.iVer = a.fNCM left join UnidadeMedida c on a.pUni = c.pPId and c.iVer = c.iVAt, Itens b, Ordens d where a.lExc = 0 and a.iVer = a.iVAt and a.pOrdem = 1383722 and a.pOrdem = d.pPId and d.iVer = d.iVAt and a.pItem = b.pPId and b.iVer = a.fItem
Tempo 37-27/11/2025 17:32:14
Tempo 38-27/11/2025 17:32:14
sGlobal_pUNeg=, sTagMainTable=Ordens_Itens
2XXX) sQry=select first 100 skip 0 a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = 1383722   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial
sQry_UNeg=select first 100 skip 0 a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = 1383722   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial
Tempo 39-27/11/2025 17:32:14
Tempo 40-27/11/2025 17:32:14
iLinAtual=1, k=1, i=0
sCpo='js.this.flMarcado('.$aLin["PPID"].')', iLinAtual=1
exp eval -> $sExp = trim('js.this.flMarcado('.$aLin["PPID"].')');
1)sExp=js.this.flMarcado(16667698)
sCpo=$aLin["PPID"] .'/'. $aLin["ISERIAL"] . '<br> IS: ' . $aLin[strtoupper('pISRegFis')] . '<br> IBSUF: ' . $aLin[strtoupper('pRegFisIBS')] . '<br> IBSMun: ' . $aLin[strtoupper('pRegFisIBSMun')] . '<br> CBS: ' . $aLin[strtoupper('pRegFisCBS')], iLinAtual=1
exp eval -> $sExp = trim($aLin["PPID"] .'/'. $aLin["ISERIAL"] . '<br> IS: ' . $aLin[strtoupper('pISRegFis')] . '<br> IBSUF: ' . $aLin[strtoupper('pRegFisIBS')] . '<br> IBSMun: ' . $aLin[strtoupper('pRegFisIBSMun')] . '<br> CBS: ' . $aLin[strtoupper('pRegFisCBS')]);
1)sExp=16667698/0<br> IS: 0<br> IBSUF: 0<br> IBSMun: 0<br> CBS: 0
sCpo='<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>', iLinAtual=1
exp eval -> $sExp = trim('<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>');
1)sExp=<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>0000X</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>Carga tributaria de Juros</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>
sCpo='<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>', iLinAtual=1
exp eval -> $sExp = trim('<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>');
1)sExp=<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>Manual</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>1-Valor item compe valor total</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8</td></tr></table>
sCpo=$aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>', iLinAtual=1
exp eval -> $sExp = trim($aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>');
1)sExp=<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>0,00000</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>
sCpo='<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>', iLinAtual=1
exp eval -> $sExp = trim('<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>');
1)sExp=<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b></b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>
sCpo=number_format($aLin["NPRBRUTO"],2,",","."), iLinAtual=1
exp eval -> $sExp = trim(number_format($aLin["NPRBRUTO"],2,",","."));
1)sExp=50,00
sCpo='<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>', iLinAtual=1
exp eval -> $sExp = trim('<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>');
1)sExp=<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr></table>
sCpo=number_format($aLin["NPROD_VUNCOM"],5,",","."), iLinAtual=1
exp eval -> $sExp = trim(number_format($aLin["NPROD_VUNCOM"],5,",","."));
1)sExp=50,00000
sCpo='<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>', iLinAtual=1
exp eval -> $sExp = trim('<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>');
1)sExp=<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr></table>
sCpo=number_format($aLin["NPROD_VPROD"],2,",","."), iLinAtual=1
exp eval -> $sExp = trim(number_format($aLin["NPROD_VPROD"],2,",","."));
1)sExp=50,00
sCpo=$aLin["PPID"], iLinAtual=1
exp eval -> $sExp = trim($aLin["PPID"]);
1)sExp=16667698
iLinAtual=2, k=2, i=0
sCpo='js.this.flMarcado('.$aLin["PPID"].')', iLinAtual=2
exp eval -> $sExp = trim('js.this.flMarcado('.$aLin["PPID"].')');
1)sExp=js.this.flMarcado(16667697)
sCpo=$aLin["PPID"] .'/'. $aLin["ISERIAL"] . '<br> IS: ' . $aLin[strtoupper('pISRegFis')] . '<br> IBSUF: ' . $aLin[strtoupper('pRegFisIBS')] . '<br> IBSMun: ' . $aLin[strtoupper('pRegFisIBSMun')] . '<br> CBS: ' . $aLin[strtoupper('pRegFisCBS')], iLinAtual=2
exp eval -> $sExp = trim($aLin["PPID"] .'/'. $aLin["ISERIAL"] . '<br> IS: ' . $aLin[strtoupper('pISRegFis')] . '<br> IBSUF: ' . $aLin[strtoupper('pRegFisIBS')] . '<br> IBSMun: ' . $aLin[strtoupper('pRegFisIBSMun')] . '<br> CBS: ' . $aLin[strtoupper('pRegFisCBS')]);
1)sExp=16667697/0<br> IS: 0<br> IBSUF: 0<br> IBSMun: 0<br> CBS: 0
sCpo='<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>', iLinAtual=2
exp eval -> $sExp = trim('<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODITEM"]         . '</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SITEM"]  . '</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SCODNCM"]  . '</td></tr></table>');
1)sExp=<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>0000W</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>Carga tributaria de Multa</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>
sCpo='<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>', iLinAtual=2
exp eval -> $sExp = trim('<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aOrdemItemOrigPreco[$aLin["JTIPO"]]          . '</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aProd_indTot[$aLin["JPROD_INDTOT"]]  . '</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aICMS_orig[$aLin["JORIG"]]  . '</td></tr></table>');
1)sExp=<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>Manual</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>1-Valor item compe valor total</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8</td></tr></table>
sCpo=$aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>', iLinAtual=2
exp eval -> $sExp = trim($aLin["JENTSAI"]==0 ? '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr></table>' : '<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . number_format($aLin["NQT"],5,",",".") . '</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTENT"] ==0 ? '' : number_format($aLin["NQTENT"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTOP"] ==0 ? '' : number_format($aLin["NQTOP"],5,",","."))  . '</td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . ($aLin["NQTCANC"] ==0 ? '' : number_format($aLin["NQTCANC"],5,",","."))  . '</td></tr></table>');
1)sExp=<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>0,00000</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>
sCpo='<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>', iLinAtual=2
exp eval -> $sExp = trim('<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>' . $aLin["SCODUNI"]         . '</b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . $aLin["SDESUNI"]  . '</td></tr></table>');
1)sExp=<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b></b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>
sCpo=number_format($aLin["NPRBRUTO"],2,",","."), iLinAtual=2
exp eval -> $sExp = trim(number_format($aLin["NPRBRUTO"],2,",","."));
1)sExp=50,00
sCpo='<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>', iLinAtual=2
exp eval -> $sExp = trim('<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPED"],5,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCTPEDG"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVENCFINTPED"],5,",","."). '</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NVDESCINC"],5,",","."). '</td></tr></table>');
1)sExp=<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr></table>
sCpo=number_format($aLin["NPROD_VUNCOM"],5,",","."), iLinAtual=2
exp eval -> $sExp = trim(number_format($aLin["NPROD_VUNCOM"],5,",","."));
1)sExp=50,00000
sCpo='<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>', iLinAtual=2
exp eval -> $sExp = trim('<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VFRETE"],2,",",".")         . '</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VSEG"],2,",",".")  . '</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>' . number_format($aLin["NPROD_VOUTRO"],2,",",".")  . '</td></tr></table>');
1)sExp=<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr></table>
sCpo=number_format($aLin["NPROD_VPROD"],2,",","."), iLinAtual=2
exp eval -> $sExp = trim(number_format($aLin["NPROD_VPROD"],2,",","."));
1)sExp=50,00
sCpo=$aLin["PPID"], iLinAtual=2
exp eval -> $sExp = trim($aLin["PPID"]);
1)sExp=16667697
Tempo 41-27/11/2025 17:32:14
h4=27-11-2025 17:32:14
Tempo 46-27/11/2025 17:32:14
4) sTitGrid=Itens da Ordem [{this.oPai.aGrid[this.oPai.iArray][1]}] - 2
5) sTitGrid=Itens da Ordem [{this.oPai.aGrid[this.oPai.iArray][1]}] - 2 [dd&#95_files/erp&#95_ORDENS&#95_Itens.dda/Padrao&#95_1]
Tempo 47-27/11/2025 17:32:14
Tempo 48-27/11/2025 17:32:14
Tempo 51-27/11/2025 17:32:14
Tempo 55-27/11/2025 17:32:14
Tempo 56-27/11/2025 17:32:14
RAcs ERP - Inicio - iDesenvolvedor=1, iGlobalKeyUser=1
RAcs ERP - Fim
Tempo 57-27/11/2025 17:32:14
commit
hBase=Resource id #136, ghBase=Resource id #135
flDBDisconnect - phBase=Resource id #136, ghBase=Resource id #135
0 -iInd_aGrid             = 52             
1 -psFileDDS              = dd_files/erp_ORDENS_Itens.dda              
2 -psTagDDS               = Padrao_1               
3 -sQry                   = select first 100 skip 0 a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = 1383722   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial                   
4 -sQryOriginal           =   select a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = 1383722   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial           
5 -sQrySum                =                 
6 -sQrySum2Original       =        
7 -sTitGrid               = Itens da Ordem [{this.oPai.aGrid[this.oPai.iArray][1]}] - 2 [dd&#95_files/erp&#95_ORDENS&#95_Itens.dda/Padrao&#95_1]               
8 -sCpoTit                =    -l
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -s-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial                
9 -sMenu                  =    main1 ; Alterar Valor [UN] Bruto (marcados)   ; flRangeProcesso("dd_files/erp_ORDENS_Itens_AltPrecoMarcados.dda","Processo_1","processos/ORDENS_Itens_AltPrecoMarcados.php",this.oPai)~   main1 ; CTR                                   ; flGrid(this.oPai,'dd_files/erp_ORDENS_Itens_CTR.dda','Padrao_2')~   main1 ; Tabela de Preo                       ; flGrid(this.oPai,'dd_files/erp_POLITICAS_TabPrecos_Itens.dda','Padrao_3')~   main1 ; Tabela de Preo Promocional           ; flGrid(this.oPai,'dd_files/erp_POLITICAS_TabPrecos_ExcTQ_GrpPromo.dda','Padrao_2')                  
10-sNr0                   = oGrid.flGridInc()                   
11-sTipoNr0               = 1               
12-sCursor0               =                
13-sToolsBar              = Incluir,Excluir,Alterar,Zoom,Pesquisar              
14-sAutoRefr              =               
15-sMarcacao              = true              
16-sDbMarcados            = /            
17-sTagMnemTDoc           =            
18-pTDocAtual             =              
19-iRegs                  = 2                  
20-lInc                   = 1                   
21-sEntrarIncluindo       =        
22-sEntrarAlterando       =        
23-sEntrarNaFicha         =          
24-sPesquisar             =    ((upper(b.sCodigo) like '%{pPesquisar0}%') or (upper(b.sDescricao) like '%{pPesquisar0}%') or (upper(g.sCodigo) like '%{pPesquisar0}%') or (upper(g.sDescricao) like '%{pPesquisar0}%'))             
25-sOnLoadExe             =              
26-iPages                 = 1                 
27-sIncMsg                =                 
28-sAltMsg                =                 
29-sZooMsg                =                 
30-sExcMsg                =                 
31-sCursorOn              = 1              
32-sTagRefreshGridAoSalvar= 
33-sAliasColunas          = ~~~~~~~~~~~          
34-psRecsPage             = 100             
35-sTagNoDblClick         =          
36-sSumFormatSinal        =         
37-pChaveDinamica         = 0         
38-sFuncaoInc             =              
39-sFuncaoAlt             =              
40-sFuncaoZoo             =              
41-sFuncaoExc             =              
42-sNaoPerguntarDesejaIncluirNr0=
43-sTagSetColunas         =          
44-sTagFiltros            =             
45-sTagZebraGrid          =                
46-sTagAlignGrid          =                
47-sTagTitColVisible      =            
48-sTagGrid2D             =                   
49-sTagGrid2DHeight       =             
50-sTagGrid2DWidth        =              
51-sTagRefresh            = true                 
Tempo 58-27/11/2025 17:32:14
sRet=52^dd_files/erp_ORDENS_Itens.dda^Padrao_1^select first 100 skip 0 a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = 1383722   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial^  select a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = 1383722   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial^^^Itens da Ordem [{this.oPai.aGrid[this.oPai.iArray][1]}] - 2 [dd&#95_files/erp&#95_ORDENS&#95_Itens.dda/Padrao&#95_1]^   -l
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -s-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial^   main1 ; Alterar Valor [UN] Bruto (marcados)   ; flRangeProcesso("dd_files/erp_ORDENS_Itens_AltPrecoMarcados.dda","Processo_1","processos/ORDENS_Itens_AltPrecoMarcados.php",this.oPai)~   main1 ; CTR                                   ; flGrid(this.oPai,'dd_files/erp_ORDENS_Itens_CTR.dda','Padrao_2')~   main1 ; Tabela de Preo                       ; flGrid(this.oPai,'dd_files/erp_POLITICAS_TabPrecos_Itens.dda','Padrao_3')~   main1 ; Tabela de Preo Promocional           ; flGrid(this.oPai,'dd_files/erp_POLITICAS_TabPrecos_ExcTQ_GrpPromo.dda','Padrao_2')^oGrid.flGridInc()^1^^Incluir,Excluir,Alterar,Zoom,Pesquisar^^true^/^^^2^1^^^^   ((upper(b.sCodigo) like '%{pPesquisar0}%') or (upper(b.sDescricao) like '%{pPesquisar0}%') or (upper(g.sCodigo) like '%{pPesquisar0}%') or (upper(g.sDescricao) like '%{pPesquisar0}%'))^^1^^^^^1^^~~~~~~~~~~~^100^^^0^^^^^^^^^^^^^^true^
sRes=js.this.flMarcado(16667698)~16667698/0<br> IS: 0<br> IBSUF: 0<br> IBSMun: 0<br> CBS: 0~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>0000X</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>Carga tributaria de Juros</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>Manual</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>1-Valor item compe valor total</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8</td></tr></table>~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>0,00000</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b></b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>~50,00~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr></table>~50,00000~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr></table>~50,00~16667698^js.this.flMarcado(16667697)~16667697/0<br> IS: 0<br> IBSUF: 0<br> IBSMun: 0<br> CBS: 0~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>0000W</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>Carga tributaria de Multa</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>Manual</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>1-Valor item compe valor total</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8</td></tr></table>~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>0,00000</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b></b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>~50,00~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr></table>~50,00000~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr></table>~50,00~16667697
sEcho=52^dd_files/erp_ORDENS_Itens.dda^Padrao_1^select first 100 skip 0 a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = 1383722   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial^  select a.iSerial,     a.jTipo,     a.pPId,     a.pOrdem,     a.nQt,     a.nQtRes,     a.nQtLib,     a.nQtEnt,     a.nQtOP,     a.nQtCanc,     a.nProd_vUnCom,     a.nProd_vProd,     a.jProd_indTot,     a.jOrig,     a.nPrBruto,     b.sCodigo   sCodItem,     b.sDescricao sItem,     c.sCodigo  sCodUni,     c.sUnidade  sDesUni,     c.jDec,     a.nQtAge,     a.nProd_vFrete,     a.nProd_vSeg,     a.nProd_vOutro,     a.pMoe,     k.sDescricao   sMoe,     a.fMoe,     a.nQtMoe,     a.jCam,     a.pCam,     a.fCam,     kk1.sDescricao sMoeCambio,     a.nCam,     a.sCam,     a.nVDescTpED,     a.nVDescTpEDG,     a.nVEncFinTpED,     a.nVDescInc,     g.sCodigo   sCodNCM,     g.sDescricao sDesNCM,     d.jTipo jEntSai,     a.pISRegFis,     a.pRegFisIBS,     a.pRegFisIBSMun,     a.pRegFisCBS,     a.pItem  from Ordens_Itens a  left join Moeda     k  on a.pMoe  = k.pPId  and k.iVer  = k.iVAt              left join Cambio    kk on a.pCam  = kk.pPId and kk.iVer = kk.iVAt              left join Moeda     kk1 on kk.pMoe2 = kk1.pPId and kk1.iVer = kk1.iVAt              left join NCM      g  on a.pNCM  = g.pPId  and g.iVer  = a.fNCM              left join UnidadeMedida c  on a.pUni  = c.pPId and c.iVer = c.iVAt,    Itens     b,    Ordens    d  where a.lExc  = 0    and a.iVer  = a.iVAt   and a.pOrdem = 1383722   and a.pOrdem = d.pPId and d.iVer = d.iVAt   and a.pItem = b.pPId and b.iVer = a.fItem  order by a.iSerial^^^Itens da Ordem [{this.oPai.aGrid[this.oPai.iArray][1]}] - 2 [dd&#95_files/erp&#95_ORDENS&#95_Itens.dda/Padrao&#95_1]^   -l
   -p-10
   -s-30            ; b.sCodigo
   -s-30            ; b.sCodigo
   -s-12-2       ; a.nQt,a.iSerial
   -s-50            ; 
   Valor [UN] Bruto-sn-12-5
   -s-12-5       ; 
   Valor [UN] Comercial-sn-12-5
   -s-12-5       ; 
   Vl.Total-sn-12-5        ; a.nProd_vProd,a.iSerial^   main1 ; Alterar Valor [UN] Bruto (marcados)   ; flRangeProcesso("dd_files/erp_ORDENS_Itens_AltPrecoMarcados.dda","Processo_1","processos/ORDENS_Itens_AltPrecoMarcados.php",this.oPai)~   main1 ; CTR                                   ; flGrid(this.oPai,'dd_files/erp_ORDENS_Itens_CTR.dda','Padrao_2')~   main1 ; Tabela de Preo                       ; flGrid(this.oPai,'dd_files/erp_POLITICAS_TabPrecos_Itens.dda','Padrao_3')~   main1 ; Tabela de Preo Promocional           ; flGrid(this.oPai,'dd_files/erp_POLITICAS_TabPrecos_ExcTQ_GrpPromo.dda','Padrao_2')^oGrid.flGridInc()^1^^Incluir,Excluir,Alterar,Zoom,Pesquisar^^true^/^^^2^1^^^^   ((upper(b.sCodigo) like '%{pPesquisar0}%') or (upper(b.sDescricao) like '%{pPesquisar0}%') or (upper(g.sCodigo) like '%{pPesquisar0}%') or (upper(g.sDescricao) like '%{pPesquisar0}%'))^^1^^^^^1^^~~~~~~~~~~~^100^^^0^^^^^^^^^^^^^^true^js.this.flMarcado(16667698)~16667698/0<br> IS: 0<br> IBSUF: 0<br> IBSMun: 0<br> CBS: 0~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>0000X</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>Carga tributaria de Juros</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>Manual</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>1-Valor item compe valor total</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8</td></tr></table>~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>0,00000</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b></b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>~50,00~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr></table>~50,00000~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr></table>~50,00~16667698^js.this.flMarcado(16667697)~16667697/0<br> IS: 0<br> IBSUF: 0<br> IBSMun: 0<br> CBS: 0~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:250px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>0000W</b></td></tr><tr><td style="text-align: left"><b>Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>Carga tributaria de Multa</td></tr><tr><td style="text-align: left"><b>NCM</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:290px_"><tr><td style="text-align: left"><b>Orig Preo</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>Manual</td></tr><tr><td style="text-align: left"><b>Ind Valor Item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>1-Valor item compe valor total</td></tr><tr><td style="text-align: left"><b>Orig Mercadoria</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0-Nacional exceto as indicadas nos cdigos 3 4 5 e 8</td></tr></table>~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:160px_"><tr><td style="text-align: left"><b>Qt Pedida</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b>0,00000</b></td></tr><tr><td style="text-align: left"><b>Qt Entregue</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr><tr><td style="text-align: left"><b>Qt Prod</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr><tr><td style="text-align: left"><b>Qt Canc</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:100px_"><tr><td style="text-align: left"><b>Cd</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td><b></b></td></tr><tr><td style="text-align: left"><b>Unidade</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td></td></tr></table>~50,00~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width:190px_"><tr><td style="text-align: left"><b>Desc Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Desc do item</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Encargos Financ</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr><tr><td style="text-align: left"><b>Desc Incondicional</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00000</td></tr></table>~50,00000~<table cellspacing="0" cellpadding="0" cellmargin="0" style="margin:5pt; font-family: verdana_ font-size: 10px_ color: inherit_ width: 50px_"><tr><td style="text-align: left"><b>Frete</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr><tr><td style="text-align: left"><b>Seguro</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr><tr><td style="text-align: left"><b>Despesas</b></td><td>&nbsp_&nbsp_&nbsp_:&nbsp_&nbsp_&nbsp_</td><td>0,00</td></tr></table>~50,00~16667697
Tempo 59-27/11/2025 17:32:14
fim