Subject trigger trouble
Author James
I have a trigger which I made, here is the code.

CREATE TRIGGER "counter_AI0" FOR "counter"
ACTIVE AFTER INSERT POSITION 0
AS
begin
/* if the payment is an advance then add a credit */
if (new."Mode" = 'ADV') then
insert into "suppliercredit"(ID, "PaymentID", "Amount", "Status",
"Type")
values (gen_id("gen_suppliercredit",1), new.ID, new."Amount", 'ACT',
'ADV');

end

The problem is that on the suppliercredit table, the amount field has no
value at all. I don't the amount field is always null. The amount field
of both table are both numeric(15,2). I also check the value of the
amount field in counter table there is no problem at all, but I just
can't figure it out why the Amount on suppliercredit is always null.

James