delete from forcffisfat where codimp = 26674 and codigo = 95 
go
delete from forcffisfat where codimp = 26674 and codigo = 180 and ordem = 1
go
delete from forcffisfat where codimp = 26674 and codigo = 96
go
INSERT INTO FORCFFISFAT (Codimp, Codigo, Ordem, String, Somar) VALUES (26674, '095', 1, '''"'' + ''03'' + ''"'' + "," + ''"'' + StrZero(Left(Str(nValorOP,16,2),13) + Right(Str(nValorOP,16,2),2),14) + ''"'' + '',''', 1)
go
INSERT INTO FORCFFISFAT (Codimp, Codigo, Ordem, String, Somar) VALUES (26674, '095', 2, '''"'' + Left(TrataPagto(cDoc,.t.),16) + ''"''', 1)
go
INSERT INTO FORCFFISFAT (Codimp, Codigo, Ordem, String, Somar) VALUES (26674, '095', 3, 'ImpCmd(''Bematech_FI_RecebimentoNaoFiscal(&cCmdAux)'')', 0)
go
INSERT INTO FORCFFISFAT (Codimp, Codigo, Ordem, String, Somar) VALUES (26674, '180', 1, '''"'' + Left(TrataPagto(cDoc,.t.),16) + ''"'' + '','' + ''"'' + StrZero(Left(Str(nValParc,15,2),12) + Right(Str(nValParc,15,2),2),14) + ''"''', 1)
go
INSERT INTO FORCFFISFAT (Codimp, Codigo, Ordem, String, Somar) VALUES (26674, '096', 1, '''"'' + TrataPagtoEstorno(pnOIDDocumento,.t.) + ''"'' + "," + ''"'' + StrZero(pnValParc*100,14) + ''"'' + '','' + ''"Estorno"''', 1)
go
delete from forcffisfat where codimp = 21308 and codigo = 95
go
delete from forcffisfat where codimp = 21308 and codigo = 180 and ordem = 1
go
delete from forcffisfat where codimp = 21308 and codigo = 96
go
INSERT INTO FORCFFISFAT (Codimp, Codigo, Ordem, String, Somar) VALUES (21308, '095', 1, 'ImpCmd(''25'',''03'' + ''|'' + StrZero(Left(Str(nValorOP,16,2),13) + Right(Str(nValorOP,16,2),2),14) + ''|'' + Left(TrataPagto(cDoc,.t.),16))', 0)
go
INSERT INTO FORCFFISFAT (Codimp, Codigo, Ordem, String, Somar) VALUES (21308, '180', 1, '''"'' + Left(TrataPagto(cDoc,.t.),16) + ''"''', 1)
go
INSERT INTO FORCFFISFAT (Codimp, Codigo, Ordem, String, Somar) VALUES (21308, '096', 1, 'ImpCmd(''25'', TrataPagtoEstorno(pnOIDDocumento,.t.) + ''|'' + PADL(INT(pnValParc*100), 12, ''0'') + ''|Estorno'')', 0)
go