Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 26-02-2012
Avatar de Delphius
[Delphius] Delphius is offline
Miembro Premium
 
Registrado: jul 2004
Ubicación: Salta, Argentina
Posts: 5.582
Poder: 28
Delphius Va camino a la fama
Cita:
Empezado por Caral Ver Mensaje
Hola
Demasiado sencillo para ponerle interes.
Me parece que deberias complicarlo algo mas para que fuera interesante y poder aprender.
Por ejemplo:
1- tener los precios y la descripcion de los articulos en una BD
2- buscar el articulo y colocarlo en el primer edit. asi sucesivamente.
3- Calcular el monto fina.
Asi si merece la pena trabajar.
Parecería ser que el ya cuenta en el negocio con una aplicación, sea propia o no, y busca algo que le ayude a sacar algunas cuentas que dicha aplicación no le hace.
O bien no tiene una base de datos, ni aplicación alguna y hace las cosas con la "libreta de almacenero" y quiere algo simple y rápido.

Saludos,
__________________
Delphius
[Guia de estilo][Buscar]
Responder Con Cita
  #2  
Antiguo 26-02-2012
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Poder: 27
Caral Va por buen camino
Hola
Es que la idea es ponerlo dificil para aprender, si no, que gusto tiene .
Saludos
__________________
Siempre Novato
Responder Con Cita
  #3  
Antiguo 26-02-2012
chelo_lpa chelo_lpa is offline
Registrado
NULL
 
Registrado: abr 2011
Posts: 4
Poder: 0
chelo_lpa Va por buen camino
es qe solamente necesito algo para cuando hago una nueva venta. la idea es hacer una calculadora, pero facil de usar, para no tener qe anotar los subtotales, y despues sumarlos. solo qiuero la aplicacion qe sume es decir 2 cosas de $34, 123 cosas de $12.45 y 132 cosas de $1.30, y tener el total de la venta, y tmb los resultados parciales para mostrar ante cualquier duda. es simple. pero me tira errores por todos lados
Responder Con Cita
  #4  
Antiguo 26-02-2012
Avatar de Casimiro Noteví
Casimiro Noteví Casimiro Noteví is offline
Merodeador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.679
Poder: 10
Casimiro Noteví Tiene un aura espectacularCasimiro Noteví Tiene un aura espectacular
Bienvenido a clubdelphi, ¿ya leiste nuestra guía de estilo?, gracias por tu colaboración.


No somos adivinos para saber los errores que te salen
Responder Con Cita
  #5  
Antiguo 27-02-2012
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Poder: 27
Caral Va por buen camino
Hola
Un realito adjunto.
Colocas el Precio y con solo cambiar el dato de la cantidad te cambia el subTotal y el Total.
Saludos
PD: Ahora te toca mejorarlo.
__________________
Siempre Novato

Última edición por Caral fecha: 17-09-2012 a las 01:19:12.
Responder Con Cita
  #6  
Antiguo 27-02-2012
chelo_lpa chelo_lpa is offline
Registrado
NULL
 
Registrado: abr 2011
Posts: 4
Poder: 0
chelo_lpa Va por buen camino
Código:
unit Calculadora1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, RpDefine, RpRender, RpRenderPDF, Grids, Calendar, ExtCtrls, DBGrids,
  DB, DBTables, ComCtrls, StdCtrls, jpeg, OleCtrls, SHDocVw, IdBaseComponent,
  IdComponent, IdIPWatch;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    Edit4: TEdit;
    Edit5: TEdit;
    Edit6: TEdit;
    Edit7: TEdit;
    Edit8: TEdit;
    Edit9: TEdit;
    Edit10: TEdit;
    Edit11: TEdit;
    Edit12: TEdit;
    Edit13: TEdit;
    Edit14: TEdit;
    Edit15: TEdit;
    Edit16: TEdit;
    Edit17: TEdit;
    Edit18: TEdit;
    Edit19: TEdit;
    Edit20: TEdit;
    Edit21: TEdit;
    Edit22: TEdit;
    Edit23: TEdit;
    Edit24: TEdit;
    Edit25: TEdit;
    Edit26: TEdit;
    Edit27: TEdit;
    Edit28: TEdit;
    Edit29: TEdit;
    Edit30: TEdit;
    Edit31: TEdit;
    Button1: TButton;
    Calculadora: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    Label1: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    Label15: TLabel;
    Label16: TLabel;
    Label17: TLabel;
    Label18: TLabel;
    Label19: TLabel;
    Label20: TLabel;
    Recordatorio: TMemo;
    DateTimePicker1: TDateTimePicker;
    Memo1: TMemo;
    Label21: TLabel;
    enREDados: TLabel;
    Label22: TLabel;
    Label23: TLabel;
    procedure Edit1KeyPress(Sender: TObject; var Key: Char);
    procedure Edit30Change(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure Edit2Change(Sender: TObject);
    procedure Edit3Change(Sender: TObject);
    procedure Edit6Change(Sender: TObject);
    procedure Edit7Change(Sender: TObject);
    procedure Edit9Change(Sender: TObject);
    procedure Edit12Change(Sender: TObject);
    procedure Edit14Change(Sender: TObject);
    procedure Edit15Change(Sender: TObject);
    procedure Edit17Change(Sender: TObject);
    procedure Edit19Change(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var

  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Edit12Change(Sender: TObject);
begin
    if((Edit11.Text <> ('')) and (Edit12.Text <> ('')))then
        Edit26.Text := IntToStr((StrToInt(Edit12.Text)*(StrToInt(Edit11.Text))))
    else
        Edit26.Text := IntToStr(0);
end;

procedure TForm1.Edit14Change(Sender: TObject);
begin
    if((Edit13.Text <> ('')) and (Edit14.Text <> ('')))then
        Edit27.Text := IntToStr((StrToInt(Edit13.Text)*(StrToInt(Edit14.Text))))
    else
        Edit27.Text := IntToStr(0);
end;

procedure TForm1.Edit15Change(Sender: TObject);
begin
    if((Edit15.Text <> ('')) and (Edit16.Text <> ('')))then
        Edit28.Text := IntToStr((StrToInt(Edit15.Text)*(StrToInt(Edit16.Text))))
    else
        Edit28.Text := IntToStr(0);
end;

procedure TForm1.Edit17Change(Sender: TObject);
begin
    if((Edit17.Text <> ('')) and (Edit18.Text <> ('')))then
        Edit29.Text := IntToStr((StrToInt(Edit17.Text)*(StrToInt(Edit18.Text))))
    else
        Edit29.Text := IntToStr(0);
end;

procedure TForm1.Edit19Change(Sender: TObject);
begin
    if((Edit19.Text <> ('')) and (Edit20.Text <> ('')))then
        Edit30.Text := IntToStr((StrToInt(Edit19.Text)*(StrToInt(Edit20.Text))))
    else
        Edit30.Text := IntToStr(0);
end;

procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
  if not ((Key in ['0'..'9'] )or (Key = #08)) then
    begin
      Key:= #0;
      Beep;
    end;

end;

procedure TForm1.Edit2Change(Sender: TObject);
begin
    if((Edit1.Text <> ('')) and (Edit2.Text <> ('')))then
        Edit21.Text := IntToStr((StrToInt(Edit2.Text)*(StrToInt(Edit1.Text))))
    else
        Edit21.Text := IntToStr(0);
end;

procedure TForm1.Edit30Change(Sender: TObject);
var
  a , I: integer;
begin
  a:=0;
  for I := 21 to 30 do
     if(((FindComponent('Edit' + IntToStr(i)) as TEdit).Text))<>('')then
        begin
            a:=a + (  StrToInt((FindComponent('Edit' + IntToStr(i)) as TEdit).Text));
        end
     else
        a:=a+0;
  Edit31.Text := IntToStr(a);
end;

procedure TForm1.Edit3Change(Sender: TObject);
begin
    if((Edit3.Text <> ('')) and (Edit4.Text <> ('')))then
        Edit22.Text := IntToStr((StrToInt(Edit3.Text)*(StrToInt(Edit4.Text))))
    else
        Edit22.Text := IntToStr(0);
end;

procedure TForm1.Edit6Change(Sender: TObject);
begin
    if((Edit5.Text <> ('')) and (Edit6.Text <> ('')))then
        Edit23.Text := IntToStr((StrToInt(Edit5.Text)*(StrToInt(Edit6.Text))))
    else
        Edit23.Text := IntToStr(0);

end;

procedure TForm1.Edit7Change(Sender: TObject);
begin
    if((Edit7.Text <> ('')) and (Edit8.Text <> ('')))then
        Edit24.Text := IntToStr((StrToInt(Edit7.Text)*(StrToInt(Edit8.Text))))
    else
        Edit24.Text := IntToStr(0);

end;

procedure TForm1.Edit9Change(Sender: TObject);
begin
    if((Edit9.Text <> ('')) and (Edit10.Text <> ('')))then
        Edit25.Text := IntToStr((StrToInt(Edit9.Text)*(StrToInt(Edit10.Text))))
    else
        Edit25.Text := IntToStr(0);

end;

procedure TForm1.FormActivate(Sender: TObject);
var
  i, a: Integer;
begin
 for i := 1 to 20 do
  begin
    if ((i mod 2)= 0) then
      begin
        (FindComponent('Edit' + IntToStr(i)) as TEdit).text := '1';
      end
    else
      begin
       (FindComponent('Edit' + IntToStr(i)) as TEdit).text := '0';
      end;
  end;
  for a := 21 to 30  do
   (FindComponent('Edit' + IntToStr(a)) as TEdit).text := '0';
end;





end.
asi me qedo el codigo. anda todo de diez hace lo que quiero. ahora es el tema donde tengo una duda...
$1
eso es un peso, pero yo quiero mostrarlo asi
1.00
y asi con tengo qe encontrar lamanera de acceder a los ultimos dos caracteres de mi string, correrlos un lugar para la derecha y agregar la coma donde estaba el anteultimo. bien se qe un string es un array of caracteres. tendria qe acceder por array size. existe una funcion asi? y hay alguna manera de aumentar el array en ese momento? sigo probando y leyendo.
Responder Con Cita
  #7  
Antiguo 27-02-2012
Avatar de Casimiro Noteví
Casimiro Noteví Casimiro Noteví is offline
Merodeador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.679
Poder: 10
Casimiro Noteví Tiene un aura espectacularCasimiro Noteví Tiene un aura espectacular
Bienvenido a clubdelphi, ¿ya leiste nuestra guía de estilo?, gracias por tu colaboración.

Una de las normas, lógica, es: preguntas distintas en temas distintos. No vamos a mezclar las cosas, se convertirían los foros en algo imposible de controlar.
Además puedes hacer una búsqueda, las máscaras de presentación de números es un tema que se ha tratado multitud de veces, recuerda que tenemos cerca de 78000 temas en nuestra base de datos, ahí está 'casi' todo lo que necesites.
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
ayuda calculadora basica!! ciberTron Varios 7 08-02-2011 13:58:35
Calculadora en sistema capo979 Varios 2 07-12-2007 02:20:12
Calculadora sebaguillen Varios 17 28-08-2007 15:27:23
Calculadora Epunamun OOP 3 19-12-2005 22:33:11
Calculadora licencia GNU bismarck_sierra Varios 0 05-04-2005 06:56:33


La franja horaria es GMT +2. Ahora son las 14:58:35.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi