I send you the project, it includes CSV
If you delete 1 and 2 product it will work otherwise

the following script does not read the € ° symbols even if inserted in the text

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;

thank you Dmitrij.

to export products to CSV?

I'll send you an image too

Import product CSV files into an invoice (see image)

233

(3 replies, posted in Script)

try now

Thanks so much!!

I already have a 3.6 license, I want to upgrade to 4.4 / 4.5.
when it costs me?

I need a license
Send me an email for an offer for the license, please

237

(2 replies, posted in Script)

remove the symbol €

how to duplicate an invoice with all products?
an example please

239

(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

I would like to add the products to the invoice by importing them from a CSV file

Import product CSV files into an invoice (see image)

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

(13 replies, posted in General)

Hello!  AD1408
See this example of a password generator.
You can change the encryption

244

(16 replies, posted in General)

procedure Form1_Button22_OnClick (Sender: string; var Cancel: boolean);
begin
    OpenFile('C:\Windows\system32\charmap.exe');
end;

245

(5 replies, posted in General)

see this test

246

(2 replies, posted in General)

Ok Dmitrij., I will buy the license for V 4.0 because the cost is affordable.

247

(2 replies, posted in General)

I got an email from here: r00t3d777@gmail.com è una mail di My Visual database?

248

(11 replies, posted in General)

try with this

249

(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

(4 replies, posted in General)

thank you so much!
ehwagner