I am developing POS in ruby on rails.My database contains tables(Models) stock and sale.when user sell a product that must be debited from stock table and credited in the sale table (i dont know that whether it is correct way).So how to access the stock model in sale model and what is the association between Stock and sale Model? Or is there anyother way to achieve this action?
Aucun commentaire:
Enregistrer un commentaire