Estimado Brandolin:
He podido solucionar mi problema y aqui te pego el codigo
Código Delphi
[-]
function Imprimir_fiscal(sender:Tfmenu):Boolean;
var
nom,dni,cuit,fs,comando:WideString;
tipodoc,tipoiva:TOleEnum;
Descuento,TOTAL:currency;
begin
WITH SENDER do
begin
HASAR1.TratarDeCancelarTodo;
fs:=#28;
nom:=uppercase(trim(SP_VentaConsulcliente.AsString));
nom:=ansireplacestr(nom,'Ñ','N');
dni:=trim(SP_VentaConsuldni.AsString);
cuit:=AnsiReplaceStr(TRIM(SP_VentaConsulcuit.AsString),'-','');
if (lowercase(trim(SP_VentaConsulTipoForma.AsString))='a') then
begin
tipoiva:=RESPONSABLE_INSCRIPTO;
if (lowercase(trim(SP_VentaConsulsit_impositiva.AsString))='inscripto') then
tipoiva:=RESPONSABLE_INSCRIPTO
else
if (lowercase(trim(SP_VentaConsulsit_impositiva.AsString))='exento') then
tipoiva:=RESPONSABLE_EXENTO;
comando := #98 + FS + 'Cliente: '+ nom + FS + cuit + FS + 'I' + FS + 'C' + FS + 'Domicilio...';
HASAR1.Enviar(comando);
HASAR1.AbrirComprobanteFiscal(TICKET_FACTURA_A);
hasar1.PrecioBase:=TRUE;
end
SP_DetalleVtas_Consul.First;
TOTAL:=0;
while not SP_DetalleVtas_Consul.Eof do
begin
hasar1.ImprimirItem(SP_DetalleVtas_Consulconcepto.AsString,
SP_DetalleVtas_Consulpre_unitario.AsFloat,
SP_DetalleVtas_Consulcant.AsFloat,
SP_DetalleVtas_Consulporciva.AsFloat,0);
TOTAL:=total+SP_DetalleVtas_Consulmonto.AsCurrency ;
SP_DetalleVtas_Consul.Next;
end;
descuento:=0;
if SP_VentaConsuldescuento.AsCurrency>0 then
begin
descuento:=(SP_VentaConsuldescuento.AsCurrency*total)/100;
descuento:=roundto(descuento,-2);
HASAR1.DescuentoGeneral( 'DESCUENTO',descuento,TRUE); end;
if SP_VentaConsulmontocontado.AsCurrency>0 then
HASAR1.ImprimirPago('EFECTIVO',strtocurr(formatfloat('#.00',SP_VentaConsulmontocontado.AsCurrency))) ;
hasar1.CerrarComprobanteFiscal;
result:=hasar1.HuboErrorFiscal;
end;
end;
Lo que dice SP es un Store procedure , por los nombres de los campos, esta bastante claro..
Aqui te pegue el codigo para los ticket factura A, usando la ocx provista por hasar.
Muchas gracias por ayudarme, espero alguna vez devolverte el favor..
Saludos..
Fabián