quinta-feira, 5 de janeiro de 2017

Matwin -Calculo Imposto

ErpMatos

Nfe/Nfc-e/Cte/Nota Servico

Procure Nossos Representantes

Rj Sistemas          51 35662115
Unimatos              51 35874330
Matos Informatica 51 35821451

http://www.matosinformatica.com.br/
https://www.facebook.com/MatosInformaticaLtda/
amarildo@matosinformatica.com.br

Sistemas ErpMatos,Site,www.matosinformatica.com.br


Em 2017 será o fim da emissão Gratuida de Nf-e e Ct-e
Nos procure 
IBPT 

https://www.youtube.com/watch?v=2bpEo-74RAw



Calculo

Tabelas_numero_nota=Nfi:Numero
Tabelas_sequencia_nota=Nfi:Sequencia
loc:Valor_Total=Nfi:Total_Nota

EST:uf=empresa.UF !cliente.uf
get(estado,EST:EST_POR_ESTADO)
if errorcode()
    message('estado nao encontrado')
    loc:aliquota_interna_pICMSUFDest=0
ELSE
    loc:aliquota_interna_pICMSUFDest=estado.ALIQUOTA_ICM
END

!loc:aliquota_interna_pICMSUFDest=estado.Aliquota_Icm_Interna

EST:uf=cliente.uf
get(estado,EST:EST_POR_ESTADO)
if errorcode()
    message('estado nao encontrado')
    loc:aliquota_cliente=0
ELSE
    loc:aliquota_cliente=estado.ALIQUOTA_ICM
END


==========================

notin:ICMSUFDest_tem=TRUE
notin:ICMSUFDest_vBCUFDest=loc:Valor_Total
notin:ICMSUFDest_pICMSUFDest=loc:aliquota_interna_pICMSUFDest
notin:ICMSUFDest_pICMSInter=loc:aliquota_cliente

loc:ano_imposto=year(today())
if loc:ano_imposto>2018
    notin:ICMSUFDest_pICMSInterPart=100
ELSE
    if loc:ano_imposto=2018
        notin:ICMSUFDest_pICMSInterPart=80
    ELSE
        notin:ICMSUFDest_pICMSInterPart=60
    END   
END

notin:ICMSUFDest_vFCPUFDest=(notin:ICMSUFDest_vBCUFDest*notin:ICMSUFDest_pFCPUFDest)/100



!loc:valor_difal=(notin:ICMSUFDest_vBCUFDest*notin:ICMSUFDest_pICMSInter)/100
loc:diferenca_aliquota=notin:ICMSUFDest_pICMSUFDest-notin:ICMSUFDest_pICMSInter
loc:valor_difal=(notin:ICMSUFDest_vBCUFDest*loc:diferenca_aliquota)/100
loc:percentual_origem=100-notin:ICMSUFDest_pICMSInterPart
notin:ICMSUFDest_vICMSUFDest=(loc:valor_difal*notin:ICMSUFDest_pICMSInterPart)/100
notin:ICMSUFDest_vICMSUFRemet=loc:valor_difal-notin:ICMSUFDest_vICMSUFDest

DISPLAY()