Subject IBO detect a wrong numerics field
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.

While waiting for answer Iam still trying to work on this. I see the in IBO, it say that my "Amount" field is numerics(18,2), but actually it is numeric(15,2). Could this be the problem why my trigger doesn't work? Why is it that the IBO detect wrong way?

Thanks


James