Have you been looking for a way to tame the invoices in your small business? In this article, the first of two parts, we are going to create a fully functioning invoicing system that can be used in almost any environment and situation. Interested? Keep reading.
procedure TForm1.CreateNewInvoice1Click(Sender: TObject); begin form2.Show; end;
procedure TForm1.BitBtn2Click(Sender: TObject); begin close; end;
procedure TForm1.db1DblClick(Sender: TObject); begin //num:=db1.Fields[0].AsInteger; num:=ado1.RecNo; ado1.recno:=num; with TForm5.Create(Application) do begin ShowModal; Free; end;
//form5.show; end;
procedure TForm1.Exit1Click(Sender: TObject); begin close; end;
procedure TForm1.FormCreate(Sender: TObject);
var settings : TINIFile;
begin settings := TINIFile.Create(ExtractFilePath(Application.EXEName) + 'settings.ini'); try con:=settings.ReadString('Settings', 'con',''); //showmessage(con); vat:=settings.ReadFloat('Settings', 'vat',8.5); // showmessage(floattostr(vat)); rav:=settings.ReadString('Settings', 'rav',''); showmessage(rav); finally settings.Free; end; {if (ip= 'Empty') or (port<1) then begin messagedlg('Your connection details are not set. Click ok to continue.', mtInformation,[mbOk], 0); } end;
procedure TForm1.db1CellClick(Column: TColumn); begin //a:='clicked'; end;
procedure TForm1.btndeleteClick(Sender: TObject); begin if ado1.RecordCount > 0 then begin ado1.Delete; end else showmessage('No invoices to delete'); end;
procedure TForm1.btnAddInvClick(Sender: TObject); begin ado1.Active:=false; //form1.ado1.TableName:=''; form2.show; end;