I send you the project, it includes CSV
If you delete 1 and 2 product it will work otherwise
226 2018-08-17 14:47:46
Re: the following script does not read the € ° symbols even if inserted in (5 replies, posted in General)
227 2018-08-17 07:08:15
Re: the following script does not read the € ° symbols even if inserted in (5 replies, posted in General)
the following script does not read the € ° symbols even if inserted in the text
228 2018-08-16 19:22:05
Topic: the following script does not read the € ° symbols even if inserted in (5 replies, posted in General)
procedure Prodotto_Button6_OnClick (Sender: string; var Cancel: boolean);
var
OpenDialog: TOpenDialog;
sl: TStringList;
arrStr: array of string;
i,c: integer;
CategoriaID: string;
FornitoreID: string;
sval: string;
begin
OpenDialog := TOpenDialog.Create(Prodotto);
if OpenDialog.Execute then
begin
sl := TStringList.Create;
sl.LoadFromFile (OpenDialog.FileName);
c := sl.Count - 1;
for i := 0 to c do
begin
arrStr := SplitString(sl[i], ';');
// Codice
if arrStr[0] <> '' then arrStr[0] := ''''+ ReplaceStr(arrStr[0], '''', '''''') + ''''
else arrStr[0] := 'NULL';
//prodotto
if arrStr[1] <> '' then arrStr[1] := ''''+ ReplaceStr(arrStr[1], '''', '''''') + ''''
else arrStr[1] := 'NULL';
// costo
arrStr[2] := ReplaceStr(arrStr[2], ',', '');
if arrStr[2] = '' then arrStr[2] := 'NULL';
//U.M:
if arrStr[3] <> '' then arrStr[3] := ''''+ ReplaceStr(arrStr[3], '''', '''''') + ''''
else arrStr[3] := 'NULL';
//imballaggio
if arrStr[4] <> '' then arrStr[4] := ''''+ ReplaceStr(arrStr[4], '''', '''''') + ''''
else arrStr[4] := 'NULL';
//IVA
if arrStr[5] <> '' then arrStr[5] := ''''+ ReplaceStr(arrStr[5], '''', '''''') + ''''
else arrStr[5] := 'NULL';
// Fornitore
FornitoreID := SQLExecute ('SELECT id FROM fornitore WHERE nomef LIKE "' + arrStr[6] +'"');
if FornitoreID = '' then FornitoreID:= 'NULL';
// categoria
CategoriaID := SQLExecute ('SELECT id FROM categoria WHERE categorie LIKE "' + arrStr[7] +'"');
if CategoriaID = '' then CategoriaID := 'NULL';
//disponibilita
if arrStr[8] <> '' then arrStr[8] := ''''+ ReplaceStr(arrStr[8], '''', '''''') + ''''
else arrStr[8] := 'NULL';
// check for dublicate
sval := SQLExecute('SELECT id FROM prodotti WHERE (cod = ' + arrStr[0] +') AND (prodotto = ' + arrStr[1] +') AND (prezzo = ' + arrStr[2]+ ')AND (unitadimisura = ' + arrStr[3]+ ') AND (imballo = ' + arrStr[4]+ ')AND (iva = ' + arrStr[5]+ ')AND (id_fornitore = ' + FornitoreID + ') AND (id_categoria = ' + CategoriaID + ')AND (stato = ' + arrStr[8]+ ') ;');
if sval = '' then SQLExecute ('INSERT INTO prodotti (cod, prodotto, prezzo, unitadimisura, imballo, iva, id_fornitore, id_categoria, stato ) VALUES (' + arrStr[0] +','+ arrStr[1] +','+arrStr[2]+','+arrStr[3]+','+arrStr[4]+','+arrStr[5]+','+ FornitoreID +','+ CategoriaID +','+arrStr[8]+');');
Prodotto.Button6.Caption := IntToStr(i+1) + ' di ' + IntToStr(c+1);
Application.ProcessMessages;
end;
sl.Free;
Prodotto.TableGrid1.dbUpdate;
ShowMessage(' Importati '+ IntToStr (c+1) + ' records.');
end;
OpenDialog.Free;
end;
229 2018-07-27 15:48:27
Re: Import product CSV files into an invoice (see image) (5 replies, posted in General)
thank you Dmitrij.
230 2018-07-27 07:39:46
Re: Import product CSV files into an invoice (see image) (5 replies, posted in General)
to export products to CSV?
231 2018-07-25 15:15:38
Re: Import product CSV files into an invoice (see image) (5 replies, posted in General)
I'll send you an image too
232 2018-07-25 15:14:32
Topic: Import product CSV files into an invoice (see image) (5 replies, posted in General)
Import product CSV files into an invoice (see image)
233 2018-07-14 15:35:07
Re: CSV and several data type conversion errors (3 replies, posted in Script)
try now
234 2018-07-10 06:02:51
Re: how to duplicate an invoice with all products? (6 replies, posted in General)
Thanks so much!!
235 2018-07-09 16:53:16
Re: how to duplicate an invoice with all products? (6 replies, posted in General)
I already have a 3.6 license, I want to upgrade to 4.4 / 4.5.
when it costs me?
236 2018-07-09 06:55:35
Re: how to duplicate an invoice with all products? (6 replies, posted in General)
I need a license
Send me an email for an offer for the license, please
238 2018-07-07 06:45:44
Topic: how to duplicate an invoice with all products? (6 replies, posted in General)
how to duplicate an invoice with all products?
an example please
239 2018-07-05 19:02:24
Re: Share the same database (2 replies, posted in General)
you need to create a shared folder on a server
in the shared folder you will put the database
https://www.aranzulla.it/come-condivide … 26260.html
240 2018-06-29 19:00:05
Re: Import product CSV files into an invoice (see image) (3 replies, posted in General)
I would like to add the products to the invoice by importing them from a CSV file
241 2018-06-29 13:56:17
Topic: Import product CSV files into an invoice (see image) (3 replies, posted in General)
Import product CSV files into an invoice (see image)
242 2018-04-04 09:26:48
Topic: shipping costs on the invoice not working properly (1 replies, posted in General)
I'm evaluating the version 4.3 to buy it, but I noticed that when I print with FastReport the invoice calculates the shipment for each product added,
instead he has to calculate a shipment for all the products.
I attach the project to you
243 2018-03-29 06:56:43
Re: Password strength meter 2 (13 replies, posted in General)
Hello! AD1408
See this example of a password generator.
You can change the encryption
244 2017-12-30 08:49:51
Re: Font Change for Grid and Memo (16 replies, posted in General)
procedure Form1_Button22_OnClick (Sender: string; var Cancel: boolean);
begin
OpenFile('C:\Windows\system32\charmap.exe');
end;
246 2017-11-16 17:15:16
Re: mail suspect (2 replies, posted in General)
Ok Dmitrij., I will buy the license for V 4.0 because the cost is affordable.
247 2017-11-16 09:20:21
Topic: mail suspect (2 replies, posted in General)
I got an email from here: r00t3d777@gmail.com è una mail di My Visual database?
249 2017-11-06 19:03:48
Re: pass a procedure on event (11 replies, posted in General)
procedure TableGrid_OnChange (Sender: TdbStringGridEx);
var
i,k,r,c: integer;
begin
r := Sender.RowCount - 1;
c := Sender.Columns.Count - 1;
for i := 0 to r do
begin
if i mod 2 = 0 then
begin
for k := 0 to c do
begin
Sender.Cell[k,i].Color := $00FBFBFB;
end;
end;
end;
end;
250 2017-10-20 15:13:52
Re: backup not working from settings (4 replies, posted in General)
thank you so much!
ehwagner