0
Good morning, I had the need to create a stock control but I had never used Rigger.
I have 3 tables COMPRA
ABASTECIMENTO
and MOVIMENTO_ESTOQUE
Table MOVIMENTO_ESTOQUE
:
I would like when I make a purchase to record all data except the COD_ABASTECIMENTO
and in the TIPO
were recorded a C
credit and when I make a supply be recorded all data less COD_COMPRA
and COD_ITEMCOMPRA
and in the TIPO
were recorded a D
debit, as I would create this Trigger for stock control ?
I’ll answer your question soon, but I’ll give you a warning: this would be better done with a view, so that it always sees the current state of the two tables.
– DH.