1

(34 replies, posted in General)

Ok, it's clear. Thank to all.

2

(34 replies, posted in General)

Hi sparrows,
I meant all textboxes where only numbers should be entered. for example "edIvaAcquisto" of "frmInserimentoArticolo" which in any case is read-only, there should be only numbers but you didn't include it in your suggestion.

3

(34 replies, posted in General)

Thanks sparrow for this clarification. Tell me if I'm wrong, in the forms you mentioned wouldn't it be better to also set all the other editboxes with the numberonly property?

4

(34 replies, posted in General)

Grande Domenico! Infatti per fare la prova avevo inserito solo descrizione e prezzo.
Complimenti per il sito, molto carino anche quello.
Grazie!

5

(34 replies, posted in General)

sparrow wrote:

An error can occur if the Quantita field of the frmInserimentoArticolo form is incorrectly specified
or not specified (empty) when colorizing a table.
Several solutions:
set default value
do validation of the entered value in the Edit field,
modify the calculated field to return 0 instead of empty.


p.s. Fabio in this case, commenting one line will not help in finding the error. You need to comment out 957 - 960.
These lines contain the condition check.

Exactly. I commented out the lines you said and the error doesn't come out.

6

(34 replies, posted in General)

domebil wrote:

ciao Fabio il mio non da questo errore, rimetti il progetto con l'errore cosi riesco a vedere che è successo

Ciao Domenico,
ho riscaricato il programma e non da l'errore. Poi ho inserito un articolo e a questo punto da l'errore che ti dicevo.
Carico il progetto con l'articolo inserito nel database. All'interno c'è anche uno screen shot.

7

(34 replies, posted in General)

derek wrote:

Hi Fabio,
A couple of suggestions in addition to the advice you have already received about not saving a record if there is not enough stock.
In Option 1, you can show the available stock in the combobox (Product X  (100) etc etc).  You can also filter out those products where there is no stock so they do not even appear in the combobox.
In Option 2, when you select a product in the combobox, the available stock is shown as a text hint in the field where you enter the quantity.
As I said, it won't prevent the user from entering an incorrect quantity but at least it gives extra information about the available stock.
Derek.

Thank you so much tireless derek smile Check it out now.

8

(34 replies, posted in General)

domebil wrote:

Grazie mille fabio! se qualcosa non ti è chiara siamo qui

Ciao Domenico, il tuo programma funziona come volevo e su questo non avevo dubbi, la grafica come ho detto è stupenda e lo riconfermo anzi sono un po' invidioso perchè oltre a bloccarmi spesso sul codice non riesco a fare cose belle così.
Sto cercando di capire il funzionamento e penso di esserci arrivato, ora proverò ad applicare quello che ho capito sul mio.
Non l'ho ancora fatto perchè, provando il tuo programma, ho trovato un problema che da ore mi assilla, in quanto non riesco a capirne la motivazione e quando non capisco qualcosa non trovo pace finchè non l'ho capita.
Cliccando su "Elenco articoli" della finestra principale mi da questo errore ""20.0" is not a valid integer value. Script position, 957:7" e mi va alla riga "incriminata". Guardo e riguardo ma mi pare tutto corretto. Allora commento questa riga, rilancio il programma e non si avvia evidenziandomi una riga nella zona dei colori. Commento la riga e mi evidenzia la linea successiva. Nuovo commento ed errore nella linea successiva. Finchè non ne commento 3-4 e alla fine parte. Però non ho capito niente sul perchè questi errori.

9

(34 replies, posted in General)

Grazie Domenico, ora lo guardo e cerco di capirci qualcosa. Poi vi faccio sapere. Per il momento ti posso dire che la grafica mi piace molto.
Thanks to you too sparrow.

10

(34 replies, posted in General)

Ciao Domenico, "elencopro" esattamente a quale identificatore corrisponderebbe?

11

(34 replies, posted in General)

Sorry Sparrow, I can't always convey what I think I probably expressed myself badly.
I'll try to make you understand with an example.
In the warehouse I loaded ten pieces of an item which I paid ten for each piece.
I make a receipt and put in eleven pieces, so one more than what I have in stock. The project doesn't stop me from putting in eleven pieces even though I only have ten pieces in my warehouse.
Going to make the inventory and being that I have finished all the pieces, in the general inventory I should have, at least for that item, a value equal to zero.
Instead, in the general value which also includes other items, it subtracts the value of that piece from the total.
Let's assume the general value of the entire inventory is one hundred, so it becomes ninety and it's not real because it should be one hundred.
I would like to try to do something that prevents me from adding more pieces of an item than I have in stock or at least warns me that I am exceeding the quantity I actually have.

12

(34 replies, posted in General)

Hi everyone, I'm here again. I always come up with new ideas but I can not develop, damn!
We always talk about this project.
I just realized that by creating a receipt (frmscontrinidetails) the project as it is also allows you to enter the quantity of an item even if the availability is lower. That is, I can put 3 pieces of an article even if I have 2.
This has a negative impact on the inventory because it inserts the article with equal quantity, in the case of the example, -1 and consequently subtracts the cost of the article.
If a user inserts that item by mistake or on purpose in the receipt, then in the inventory the cost is subtracted and therefore the inventory is untruthful.
How could I do to prevent entering quantities of a product that are lower than availability or at least not being notified of what is being done?
I've tried various ways including this creepy thing I post at the bottom but besides being crap it tells me that "function OnSQLException" already exists.
Thank you all.


function OnSQLException(Sender: TObject; Msg: string; SQL: string): boolean;
begin
  if Sender = frmScontrinidetail.button1 then
    begin
      if articoli.quantia < 0 then  
    begin      
      result := True; //*** blocca il messaggio originale di MVD ***
      MessageBox('ATTENZIONE stai inserendo una quantià inferiore alla disponibilità','', MB_ICONWARNING + 0); //*** messaggio personalizzato ***
    end;
end;

13

(34 replies, posted in General)

Well, I get it. Thank you very much for the corrections and especially for the explanations. I decided to leave "All Seasons" because it is also a term used in Italian. Thanks again.

14

(34 replies, posted in General)

But one thing is still not clear to me: I have seen that with this modification there is no longer any code in the events of "MasterData1". In memo9 there is no longer any reference to the variation of "combobox1" except only if it is different from empty. So how does he choose the right season?

15

(34 replies, posted in General)

Hi sparrows,
Thanks for the hint, that was something I didn't know.
I've tried various attempts, including the ones below but I just can't find the solution.

procedure MasterData1OnAfterPrint(Sender: TfrxComponent);
begin
  // if <"Stagione.Stagione.value"> = 0 then memo9.text := '' else
     if <"frmInventario.combobox1.index"> = 0 then memo9.text := '' else                                                                                                                                          
       memo9.text := <Report."Stagione.Stagione">;
end;

begin

end.

EDIT:
Ah OK. While I was writing you posted the change report, I hadn't noticed. So beyond that I didn't write the code well, my approach was also wrong.

16

(34 replies, posted in General)

Hi sparrows,
thanks a lot for the report. Could you kindly tell me what did you do please? Because apart from adding an empty memo I didn't understand how this memo should be configured. Then I noticed a small problem: if I don't choose any season, i.e. it gives me the total inventory of all seasons, it still writes me "Primavera". If, on the other hand, I select a season that does not have any articles, then it does not write anything next to the "Inventario" item
Thank you very much.

17

(34 replies, posted in General)

Hi everyone,
I pulled out an old project of mine that was completed with the much-needed help of derek and domebil a few years ago. I've made some changes and I've hit a dead end with the inventory print.
Starting from the first form "frmPrincipale" you can see that there is an "Inventario" button, inventory in English. This opens a form that allows you to choose seasons and filters the results based on the selected season, no total inventory choices.
In the print report I would like to put the name of the season next to the writing "INVENTARIO", INVENTARIO "INVERNO", INVENTARIO "PRIMAVERA" etc. according to the choice made. I've made several attempts but I can't bring this change to term.
Thanks and greetings to all.

18

(5 replies, posted in General)

Hi Nikomax, Hi Derek,
read this thread of mine, derek also explains very well how to translate user forms and how to customize the original MVD menu, so well that I understood it too big_smile
http://myvisualdatabase.com/forum/viewtopic.php?id=8471

19

(25 replies, posted in General)

Hi Derek,
sorry for the delay but I have been away from home for a few days. As always I don't know how to thank you especially for the explanations.
I've seen your corrected project that you attached just didn't quite understand it. That is, in the window for creating a "Ricevuta" (receipt) you have entered the fields of the "Clienti" table and selecting a customer from the combobox automatically fills the "Ragione Sociale" field (RagSoc in the "Clienti" table). I don't know if the purpose was to automate the other customer-related fields as well, in this case they don't fill.
Basically, what I would like to do is select a customer from the combobox and all the "Receipts" relating to him are associated with this customer, which can then be listed in the search for the initial form.
Then there is a "Azienda" table but that in practice I only need to enter the data of my company in order to create a heading in a print report that I haven't developed yet.
I think that as you say, having focused on the example downloaded from the site only brought me confusion.

20

(25 replies, posted in General)

Hi Derek,
when using the program, when you click either on the "Salva" button (frmRicevuta.bSalva) or on the "Aggiungi prodotto" button (frmRicevuta.bNuovo) it gives me the error of the screen shot that I insert in the attachment).If at the "Salva" (frmReceipt.bSalva) I remove the property to save the record then the "Aggiungi prodotto" button (frmReceipt.bNew) works.

21

(25 replies, posted in General)

Hi Derek, hi everyone,
thanks for the suggestions always welcome. Your project is very nice and corresponds to what I wanted.
The thing is, when I don't understand something, I stubbornly stick with it until I understand it.
Sometimes, then, it seems to me that in some projects something doesn't work for me that worked for me in others and then I get stubborn even more. Certainly it is a feeling, if they are the same they must both work.
For example in this case I tried to make the project along the lines of the "Invoice" example downloadable from the site. That works, mine has this problem. The only difference is that in the example there are two textboxes for the customer's name and surname, while I had placed a combobox.

22

(25 replies, posted in General)

Eppure è quasi uguale, almeno in struttura, all'esempio "Invoice" e che funziona. Ero curioso di capire perchè non funzioni.

23

(25 replies, posted in General)

Ciao Domenico,
ho visto le correzioni e più o meno ho capito. Quello che però non mi spiego è perchè non funziona come l'ho impostato io che l'ho fatto sulla falsa riga dell'esempio scaricabile dal sito.
Hai cliccato sul tasto OK all'avvio del programma?

24

(25 replies, posted in General)

Hi Derek,
I've been studying this project night and day for 3 days, I've completely lost my mind, I've even managed to create a button that opens the same form.
Obviously, as you always guessed the purpose, he had to open the form 'frmNuovoProdotto' and not himself and you got it right: I would like to insert more products in the invoice.
To make this project I first studied the example project "Invoice" which is downloaded from the site of which I tried to follow in its footsteps.
As you suggested, I moved the relation field from the 'Fatture' table to 'Prodotti', which was also the system used in the example I followed. I had tried to do a little by myself without just copying.
In the example, Dimitri has put the "Date" field in the Customers table, so I did too even if it seems a little logical to me since this field relates to the invoice. But if it has to be done this way to work well, then it's done this way.
So I went a little further: I set up a calculated field (Totale) in the 'Ricevuta' table to do the calculation of the item for the quantity. And here I would say that it works: he inserts the item in the invoice and makes the correct calculations.
Now the problem that arises is in saving the invoice (frmRicevuta) and more precisely in the save button 'bSalva', I get an error.
I support your idea of making things as easy as possible, so if you have any other suggestions to improve this project, please let me know.
Thanks for everything derek

25

(25 replies, posted in General)

Hello all, thanks derek for the clarifications, I understood very well the question of the type of field and when to use them and I changed the text as you suggested.
In the meantime, I went a little further in the structure of the program that I am attaching.
As you can see, I added a 'frmRicevuta' form in which I put the 'bNuovo' button with "New Record" action but the button doesn't open the 'frmProdotti' form as it should.
Maybe for the same opening speech that you can't put two "Save" controls on the same form?
In this case I set the "NewRecord" property to the 'lbCliente' Label via script when it is clicked.