Topic: Please guide me step by step

hi everyone,

how do you do in MVD update a table...

I have a stock out where i have current qtty and i have a quantity out. once i clicked the button it will deduct my current quantity depend on the number qtty out and will update product table (current qtty).

i searched in this forum regarding on this topic.... i found several topics ( i can't follow due to many codes)...

hope you can guide me...

thanks in advance.

Post's attachments

Attachment icon qtty_stockOut.PNG 105.41 kb, 64 downloads since 2022-05-27 

-lemodizon

Re: Please guide me step by step

Here is my project file

Post's attachments

Attachment icon ims_ver1_05_27_2022.7z 288 kb, 160 downloads since 2022-05-27 

-lemodizon

Re: Please guide me step by step

Hi Lemodizon,
I had a quick look at your project and with all respect, I think, at this initial stage, you are over-complicating things by trying to add some quite advanced features (users, encrypted passwords, duplicate checking etc) before you have resolved some more fundamental issues - some are to do with your business process, some are to do with your database design (neither of which are specific to MVD) and some that relate to your use of MVD.
In no particular order,
*  You have a basic process for taking products out of stock (stock-out) but nowhere in your project do you explain how stock is bought in (stock-in) in the first place.
*  How do you plan to value your stock?  I presume the price will change over time so what price should get applied to the stock that you already have.
*  How does the 'expiry date' work bearing in mind that you hold the price on the 'products' table?  Surely each new delivery of goods will have a different expiry date from previous deliveries?
*  In your 'products' table, you have a relationship to suppliers;  this means that a particular product will only ever be bought from one supplier - is that true?
*  You hold the price on the 'products' table - this means that you can only ever hold one price for a product.  What happens when the price changes?
*  You have relationships to other tables ('suppliers', 'categories' etc) but you also hold this information as text fields on the 'products' table which is redundant.
*  You don't need to hold things like current quantity on the 'products' table - it is just the sum of all the 'stock-in' and 'stock-out;  you should consider the option of using 'calculated fields' for things like this.
*  Think about using forms with editable grids for data that is relatively static (categories, units of measure etc);  it makes development much quicker.
It is a good idea to get familiar with MVD and then try to design your application in such a way that it takes advantage of MVD's strengths.
Please have a look at the attachment;  it is an old project that I've quickly changed to make more relevant to your example.  It's not intended as a solution in any way and there are things that your project wants that haven't been included.  But perhaps you can study it, see how certain things have been done and then try to apply them to your own project.  Not everything in the script is necessary for the functionality you require - in some places it is just to make it a bit more user-friendly
Regards,
Derek.

Post's attachments

Attachment icon inventory management.zip 1.46 mb, 156 downloads since 2022-05-27