Ver Mensaje Individual
  #1  
Antiguo 23-01-2007
Avatar de pborges36
pborges36 pborges36 is offline
Miembro
 
Registrado: oct 2004
Ubicación: Argentina
Posts: 192
Reputación: 20
pborges36 Va por buen camino
Question Facturas B >$1000 en Hasar 320

Hola a todos. Tengo un problema. Estoy programando en Delphi6 y utilizo el ocx para acceder a la impresora Hasar 320. Tengo un procedure con el cual imprimo tanto factura A como B. Todo sale bien excepto las B superiores a $1000. Solo imprime los items hasta que el total de la factura llega a 1000.
Aqui le dejo el codigo, espero puedan ayudarme. Saludos.

Código Delphi [-]
procedure TImpresoraFiscal.ImprimeFiscal;
var
tc:longint;
Descri:string;
cant,monto,iva,impint:real;
imprime:boolean;
tpodoc,resiva:longint;
nombre,numdoc,domi:string;
begin
//Abrir Puerto
   hasar1.Modelo:=8;
   hasar1.Puerto:=1;
    if tipoiva='Consumidor Final' then resiva:=CONSUMIDOR_FINAL;
    if tipoiva='Monotributo' then resiva:=MONOTRIBUTO;
    if tipoiva='Responsable inscripto' then resiva:=RESPONSABLE_INSCRIPTO;
    if tipoiva='Responsable No Inscripto' then resiva:=RESPONSABLE_NO_INSCRIPTO;
    if tipoiva='No Responsable' then resiva:=NO_RESPONSABLE;
    if tipoiva='Bienes de Uso' then resiva:=BIENES_DE_USO;
    if tipoiva='Exento' then resiva:=RESPONSABLE_EXENTO;
    tc:=0;
    hasar1.Comenzar;
    hasar1.ConfigurarControlador(REIMPRESION_CANCELADOS,'false');
    hasar1.ConfigurarControlador(IMPRESION_LEYENDAS,'true');
    hasar1.Enviar(chr(93)+chr(28)+'12'+chr(28)+chr(46));
    hasar1.Enviar(chr(93)+chr(28)+'12'+chr(28)+'Vendedor: '+ven_nomb);
    if facven_tipo='A' then
        begin
           tc:=FACTURA_A;
            nombre:=cli_codi+' '+cli_nomb;
            numdoc:=cli_cuit;
            domi:=cli_domi;
            tpodoc:=TIPO_CUIT;
        end;
    if facven_tipo<>'A' then
        begin
            tc:=FACTURA_B;
            nombre:=cli_nomb;
            domi:=cli_domi;
             tpodoc:=TIPO_NINGUNO;
        end;
    hasar1.PrecioBase:=true;
   hasar1.DatosCliente(nombre,numdoc,tpodoc,resiva,domi);
 
   self.hasar1.AbrirComprobanteFiscal(tc);
 
   if not hasar1.HuboErrorFiscal then
     begin
          Query1.First;
         while not Query1.Eof do
             begin
                 descri:=Query1.FieldByName('descri').AsString;
                 cant:=Query1.FieldByName('cant').AsFloat;
                 monto:=Query1.FieldByName('monto').AsFloat;
                 iva:=Query1.FieldByName('iva').AsFloat;
                 impint:=Query1.FieldByName('impint').AsFloat;
                 hasar1.ImprimirItem(descri,cant,monto,iva,impint);
        
                 MQuery1.Next;
             end;

         imprime:=true;
         hasar1.Subtotal(imprime);
         if precingrbrut<>0 then
           hasar1.EspecificarPercepcionGlobal('Percepcion Ingr. Brutos',precingrbrut);
         if not MQPagos.Active then
           hasar1.ImprimirPago(condicionventa,totalfactura)
         else
           begin
               QPagos.First;
               while not QPagos.Eof do
                   begin
                       hasar1.ImprimirPago(QPagos.fieldbyname('mediodepago').AsString,QPagos.fieldbyname('importe').AsFloat  );
                       QPagos.Next;
                   end;
           end;
        QPagos.Active:=false;
         hasar1.CerrarComprobanteFiscal;
         facven_nume:=inttostr(strtoint(hasar1.Respuesta[3]));
         facven_fech:=hasar1.FechaHoraFiscal;
     end
   else
     begin
         MessageDlg('Verifique los Datos del Cliente', mtError, [mbOK], 0);

     end;

   hasar1.Enviar(chr(93)+chr(28)+'12'+chr(28)+chr(46));
   hasar1.Finalizar;
end;
Responder Con Cita