76 (edited by derek 2021-08-25 22:42:49)

Re: Inserting item in a receipt from a list of items

Ciao Fabio,
Spero che tu stia bene.
You are correct.  The reason you cannot delete certain products is because they have been referenced in one or many invoices.
If you want to remove those products, you would first need to delete all the invoices in which they appear.  Once they are no longer referred to anywhere else, you will be able to proceed.
However, I would not be in favour of such an approach because:
1.  you would lose visibility of what you have historically sold
2.  there would be no audit trail.
However, I know that your system is already 'live'  and you'll want to avoid changing your data structure and also keep program changes to a minimum.
One option might be to not remove the products at all but to do something like this.
1.  in your program, wherever there is a combobox that show a list of products, change the combobox filter to exclude, for example, any product that contains the phrase 'now discontinued'  (see screenshot1 in the attachment). 
2.  change the description of the product you want to delete;  as an example, change 'hats' to 'hats (now discontinued)' or change 'trousers' to 'trousers (now discontinued)' - see screenshot2 and screenshot3.
This means you will still be able to see your old invoices but the description for the product will now read 'xxxxxxx (now discontinued)' (see screenshot4) but when you come to add new invoices, you will not see or be able to see or select those products that are 'now discontinued' (see screenshot5).
All of the above can be seen working in the attached example - just try changing a product description and you'll see how it works.
Maybe this is a possible solution for you?

Post's attachments

Attachment icon fabio.zip 951.53 kb, 46 downloads since 2021-08-26 

77 (edited by domebil 2021-08-26 06:03:06)

Re: Inserting item in a receipt from a list of items

Io o fatto cosi

Post's attachments

Attachment icon disponibile.jpg 103 kb, 7 downloads since 2021-08-26 

Domebil

Re: Inserting item in a receipt from a list of items

Hi Derek and as always a thousand thanks!
I understand that it is not the best practice what I had asked, my friend to whom I did the program says it's not important to keep the historian but what you say is all right and the best thing.
I understand your housing and the example and I thought, not to reopen every product that went to zero in stock and will no longer be resorted, to apply your indication to the Tablegrid of the "Articles List" form (frmListaarticoli) That products are hidden with quasque equal to zero. But I can't find the "Filter" property in the Tablegrid. Is there a way to do it?
Thanks!

For domebill: Hi Domenico, thanks to you for your interest. But I didn't understand what you wanted to tell me.
Ciao Domenico, grazie anche a te per l'interessamento. Non ho capito però che cosa volevi dirmi.

Re: Inserting item in a receipt from a list of items

Sotto alla scheda articolo o messo un bottone disponibile o spostandolo a non disponibile l'articolo non viene più visualizzato

Domebil

Re: Inserting item in a receipt from a list of items

domebil wrote:

Sotto alla scheda articolo o messo un bottone disponibile o spostandolo a non disponibile l'articolo non viene più visualizzato

Non ho trovato quel controllo da poter inserire.

81 (edited by domebil 2021-08-27 06:35:08)

Re: Inserting item in a receipt from a list of items

Lo devi creare tu con un po di script e grafica.
Ti allego icone

Post's attachments

Attachment icon icone oneoff.zip 4.76 kb, 36 downloads since 2021-08-27 

Domebil

Re: Inserting item in a receipt from a list of items

Here I am. Sorry for the wait but I was also on vacation. Thank you Domil for icons. Now how do I solve my problem?

Eccomi. Scusate per l'attesa ma sono stato anche io in vacanza. Grazie domebil per le icone. Adesso come faccio a risolvere il mio problema?

Re: Inserting item in a receipt from a list of items

ridicci quale è il problema cosi da poterti aiutare

Domebil

84 (edited by reteinformatica 2021-09-23 19:58:53)

Re: Inserting item in a receipt from a list of items

Faccio un riassunto: la mia amica a cui è stato destinato il programma mi ha chiesto di poter eliminare i prodotti di cui non c'è più la giacenza e che sicuramente (questa è una mia deduzione) non verranno riassortiti. Ha un negozio di abbigliamento e credo che i modelli vadano presto fuori produzione. Essendo che tali prodotti sono presenti negli scontrini chiaramente non si possono eliminare. Come ha detto poi giustamente derek verrebbe a mancare lo storico, anche se lei ha detto che non gli interessa.
Allora la mia idea sarebbe quella di non mostrare nella tablegrid i prodotti con quantità zero, una cosa tipo "se 'campo giacenza' è uguale a zero allora non mostrare il prodotto nella tablegrid" ma non saprei come è il codice. Grazie!
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I have a summary: my friend to whom the program was destined asked me to be able to eliminate the products that there is no longer the stock and that surely (this is my deduction) will not be resorted. She has a clothing store and I think the models will soon be out of production. Being that these products are present in the receipts clearly cannot be eliminated. As you said then Derek rightly would be missing the historian, even if she said you are not interested.
Then my idea would be to not show the products with zero quantities in the Tablegrid, such a thing "if 'quantity field' is equal to zero then do not show the product in the Tablegrid "but I don't know how the code is. Thanks!

85 (edited by domebil 2021-09-24 06:06:04)

Re: Inserting item in a receipt from a list of items

Tipo questo?

Post's attachments

Attachment icon articoli.jpg 137.31 kb, 5 downloads since 2021-09-24 

Domebil

86 (edited by derek 2021-09-24 20:24:00)

Re: Inserting item in a receipt from a list of items

Ciao Fabio,
I'm not sure that using zero quantities as the filter is the best idea - do you not have items that are still in production but are just temporarily out of stock?  I imagine you would still want to see these items.
Anyway, whatever you choose as a filter, you can specify it as a tablegrid filter like this (see screenshot6.jpg in the attachment as an example).
Regards,
Derek.

Post's attachments

Attachment icon fabio2.zip 1.15 mb, 23 downloads since 2021-09-24 

Re: Inserting item in a receipt from a list of items

domebil wrote:

Tipo questo?

Grazie Domenico, in questo esempio le quantità sono a zero, viste come non disponibili ma si vedono. Io adesso non ho ben capito quello che la mia amica voglia di preciso anche perchè sono passati 2 mesi. Cioè quello che mi ha chiesto è se si possono eliminare i prodotti non più disponibili e tutti insieme perchè sono troppi per farlo uno per volta, almeno questo è quello che mi ricordo. Magari domani glielo chiedo meglio e sento che alternative le possano star bene.

Re: Inserting item in a receipt from a list of items

derek wrote:

Ciao Fabio,
I'm not sure that using zero quantities as the filter is the best idea - do you not have items that are still in production but are just temporarily out of stock?  I imagine you would still want to see these items.
Anyway, whatever you choose as a filter, you can specify it as a tablegrid filter like this (see screenshot6.jpg in the attachment as an example).
Regards,
Derek.

Hi Derek and thanks for the reply. Tomorrow I ask my friend, I do not know if the products that are at zero will no longer be there. In any case, mine are just ideas, any good advice is always welcome.

89 (edited by domebil 2021-09-27 05:55:38)

Re: Inserting item in a receipt from a list of items

Devi cancella re gli scontrini e poi gli articoli non ce altro modo che io sappia.
Pero puoi fare un Backup del intero database e poi cancellare, così se ti serve qualcosa dal vecchi lo puoi andare a consultare, come faccio io con i miei, ti mando una schermata di come ho fatto io il backup

Post's attachments

Attachment icon backup.jpg 103.37 kb, 4 downloads since 2021-09-27 

Domebil