
/*------ ATD 292361 ------*/
DELETE FROM FORCFFISFAT WHERE codimp=26674 AND CODIGO=170

INSERT INTO FORCFFISFAT (Codimp, Codigo, Ordem, String, Somar) VALUES (26674, '170', 1, '''"'' + IIF(nValAcrescimo<>0,IIF(nValDesconto<>0,''X'',''A''),''D'') + ''"'' + "," + ''"$"'' + ","', 1)
INSERT INTO FORCFFISFAT (Codimp, Codigo, Ordem, String, Somar) VALUES (26674, '170', 2, '''"'' + StrZero(Left(Str(nValAcrescimo,15,2),12) + Right(Str(nValAcrescimo,15,2),2),14) + ''"'' + ","', 1)
INSERT INTO FORCFFISFAT (Codimp, Codigo, Ordem, String, Somar) VALUES (26674, '170', 3, '''"'' + StrZero(Left(Str(nValDesconto,15,2),12) + Right(Str(nValDesconto,15,2),2),14) + ''"''', 1)
INSERT INTO FORCFFISFAT (Codimp, Codigo, Ordem, String, Somar) VALUES (26674, '170', 4, 'ImpCmd(''Bematech_FI_IniciaFechamentoCupomMFD(&cCmdAux)'')', 0)
GO