unit factura;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Buttons, jpeg;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Label7: TLabel;
Label8: TLabel;
Edit4: TEdit;
Label9: TLabel;
Image1: TImage;
botonsalir: TBitBtn;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Timer1: TTimer;
Label13: TLabel;
Label17: TLabel;
Label18: TLabel;
BitBtn1: TBitBtn;
ComboBox1: TComboBox;
ComboBox2: TComboBox;
Edit5: TEdit;
Label14: TLabel;
Edit6: TEdit;
Button1: TButton;
Button2: TButton;
procedure botonsalirClick(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure ComboBox1Change(Sender: TObject);
procedure ComboBox2Change(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
public
end;
var
Form1: TForm1;
cont1: integer;
fecha: Tdate;
clientes : record
nombre: string;
direccion: string;
telefono: integer;
rfc: string;
ciudad: string;
end;
facturas : record
numfactura: integer;
rfc: string;
end;
Acliente:array[1..5] of string;
Afactura: array[1..3] of string;
const
Alcatel560=499;
Benq100=450;
Nokia6101=1049;
Nokia6131=2199;
Nokia5300=2190;
Nokia5200=1799;
Nokia3250=3700;
MotorolaF3=299;
MotorolaV3e=2500;
MotorolaZ3=3500;
implementation
{$R *.dfm}
procedure TForm1.botonsalirClick(Sender: TObject);
begin
close;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
label9.Caption:=datetostr(date);
end;
procedure TForm1.CheckBox1Click(Sender: TObject);
var
costo: string;
begin
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
if combobox1.Text = 'Alcatel560' then
label13.Caption:=inttostr(Alcatel560);
if combobox1.Text = 'Benq100' then
label13.Caption:=inttostr(Benq100);
if combobox1.Text = 'Nokia6101' then
label13.Caption:=inttostr(Nokia6101);
if combobox1.Text = 'Nokia6131' then
label13.Caption:=inttostr(Nokia6131);
if combobox1.Text = 'Nokia5300' then
label13.Caption:=inttostr(Nokia5300);
if combobox1.Text = 'Nokia5200' then
label13.Caption:=inttostr(Nokia5200);
if combobox1.Text = 'Nokia3250' then
label13.Caption:=inttostr(Nokia3250);
if combobox1.Text = 'MotorolaF3' then
label13.Caption:=inttostr(MotorolaF3);
if combobox1.Text = 'MotorolaV3e' then
label13.Caption:=inttostr(MotorolaV3e);
if combobox1.Text = 'MotorolaZ3' then
label13.Caption:=inttostr(MotorolaZ3);
end;
procedure TForm1.ComboBox2Change(Sender: TObject);
begin
if combobox2.Text = '1' then
edit5.Text:= label13.Caption;
if combobox2.Text = '2' then
edit5.Text:= inttostr(strtoint(label13.Caption)*2);
if combobox2.Text = '3' then
edit5.Text:= inttostr(strtoint(label13.Caption)*3);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Acliente[1]:= edit1.text;
Acliente[2]:= edit2.text;
Acliente[3]:= edit3.text;
Acliente[4]:= edit6.text;
Acliente[5]:= edit4.text;
Afactura[1]:= edit4.text;
Afactura[2]:= label9.Caption;
Afactura[3]:= edit3.text;
cont1:=cont1+1;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
cont1 := 0;
end;
end.