Ver Mensaje Individual
  #5  
Antiguo 28-11-2007
lgarcia lgarcia is offline
Miembro
 
Registrado: jul 2004
Posts: 479
Reputación: 20
lgarcia Va por buen camino
Formulario

Aqui va una parte del codigo
Código:
procedure TFormRemesasCadeca.ButtonTraspasoClick(Sender: TObject);
var
  texto: String;
  IdTransito: integer;
  total: Currency;
begin
  if LabelTotal.Caption = '0.00' then
  begin
    ShowMessage('Debe al menos tener alguna denominación' + chr(13) +  'para poder realizar Usted la remesa a Cadeca');
    edBolsom.SetFocus;
  end
  else
  begin
    total:= StrToCurr(LabelTotal.Caption);
    cifra:= numLetra(total, 1, 2);
    with QuickReportRemesasCadeca do
    begin
      LabelCasilla.Caption:= nomcadeca;
      Labelmoneda.Caption:= nombremoneda;
      LabelCasillaa.Caption:= nomcadeca;
      Labelmonedaa.Caption:= nombremoneda;
      LabelCasillab.Caption:= nomcadeca;
      Labelmonedab.Caption:= nombremoneda;
      Preview;
    end;
    texto:= ' Esta operación que va a realizar es irreversible' + chr(13) +
            '¿Esta seguro que desea hacer una Remesa a Cadeca?';
    if MessageDlg(texto, mtConfirmation, [mbYes, mbNo], 0) = mrYes then
    begin
      with Guardar do
      begin
        Close;
        Parameters.ParamByName('@numero_').Value:= EditBolso.Text;
        Parameters.ParamByName('@cartaporte_').Value:= EditCartaporte.Text;
        Parameters.ParamByName('@usuario_').Value:= IdUsuario;
        Parameters.ParamByName('@importe_').Value:= LabelTotal.Caption;
        if moneda = 1 then Parameters.ParamByName('@tipo_').Value:= 1
        else Parameters.ParamByName('@tipo_').Value:= 2;
        Parameters.ParamByName('@clasificacion_').Value:= 9;
        Parameters.ParamByName('@sobres_').Value:= 0;
        Parameters.ParamByName('@fecha_').Value:= Int(Date);
        Parameters.ParamByName('@cajero_').Value:= IdPersonal;
        Parameters.ParamByName('@status_').Value:= 0;
        Parameters.ParamByName('@tipo_remesa_').Value:= moneda;
        Parameters.ParamByName('@bolsos_').Value:= StrToInt(EditBolsos.Text);
        Parameters.ParamByName('@valijas_').Value:= StrToInt(EditValijas.Text);
        Parameters.ParamByName('@idtransito_').Value;
        Prepared:= True;
        ExecProc;
        IdTransito:= Parameters.ParamByName('@idtransito_').Value;
      end;
      with Remesa do
      begin
        Close;
        Parameters.ParamByName('@reserva_').Value:= IdPersonal;
        Parameters.ParamByName('@moneda_').Value:= moneda;
        Parameters.ParamByName('@cb1_').Value:= -StrToInt(Edit1.Text);
        Parameters.ParamByName('@cb2_').Value:= -StrToInt(Edit2.Text);
        Parameters.ParamByName('@cb3_').Value:= -StrToInt(Edit3.Text);
        Parameters.ParamByName('@cb5_').Value:= -StrToInt(Edit5.Text);
        Parameters.ParamByName('@cb10_').Value:= -StrToInt(Edit10.Text);
        Parameters.ParamByName('@cb20_').Value:= -StrToInt(Edit20.Text);
        Parameters.ParamByName('@cb50_').Value:= -StrToInt(Edit50.Text);
        Parameters.ParamByName('@cb100_').Value:= -StrToInt(Edit100.Text);
        Parameters.ParamByName('@cf1_').Value:= -StrToInt(Edit1c.Text);
        Parameters.ParamByName('@cf2_').Value:= -StrToInt(Edit2c.Text);
        Parameters.ParamByName('@cf5_').Value:= -StrToInt(Edit5c.Text);
        Parameters.ParamByName('@cf10_').Value:= -StrToInt(Edit10c.Text);
        Parameters.ParamByName('@cf20_').Value:= -StrToInt(Edit20c.Text);
        Parameters.ParamByName('@cf25_').Value:= -StrToInt(Edit25c.Text);
        Parameters.ParamByName('@cf50_').Value:= -StrToInt(Edit50c.Text);
        Parameters.ParamByName('@cf1p_').Value:= -StrToInt(Edit1p.Text);
        Parameters.ParamByName('@cf3p_').Value:= -StrToInt(Edit3p.Text);
        Parameters.ParamByName('@cb1cuc_').Value:= -StrToInt(Edit1cuc.Text);
        Parameters.ParamByName('@cb3cuc_').Value:= -StrToInt(Edit3cuc.Text);
        Parameters.ParamByName('@cb5cuc_').Value:= -StrToInt(Edit5cuc.Text);
        Parameters.ParamByName('@cb10cuc_').Value:= -StrToInt(Edit10cuc.Text);
        Parameters.ParamByName('@cb20cuc_').Value:= -StrToInt(Edit20cuc.Text);
        Parameters.ParamByName('@cb50cuc_').Value:= -StrToInt(Edit50cuc.Text);
        Parameters.ParamByName('@cb100cuc_').Value:= -StrToInt(Edit100cuc.Text);
        Parameters.ParamByName('@status_').Value:= 0;
        Parameters.ParamByName('@fecha_').Value:= Int(Date);
        Parameters.ParamByName('@tipo_').Value:= 3;
        Parameters.ParamByName('@usuario_').Value:= IdUsuario;
        Parameters.ParamByName('@idtransito_').Value:= IdTransito;
        Parameters.ParamByName('@numero_').Value:= EditNumero.Text;
        Parameters.ParamByName('@bolso_').Value:= EditBolsos.Text;
        Parameters.ParamByName('@valija_').Value:= EditValijas.Text;
        Parameters.ParamByName('@bolsom_').Value:= StrToInt(edBolsom.Text);
        if chbOperacion.Checked then Parameters.ParamByName('@operacion_').Value:= 1
        else Parameters.ParamByName('@operacion_').Value:= 0;
        Prepared:= True;
        ExecProc;
      end;
    end;
  end
end;
y gracias por la atencion.

Saludos

Luis Garcia
Responder Con Cita