Hello
I have problem with the following table
For example i have two tables Stock,Income
stock table columns
Date,itemid,ite mName,ItemType, Tons.
Income table columns.
Date,ITemid,ite mtype,tons.
Now i want minus income.tons from stock.tons
by when-button-press trigger.
------------------------
Declare
Begin
UPDATE Stock set stock.tons=:sto ck.tons-:income.tons
where itemid=:income. itemid;
commit_form;
go_block('Stock ');
execute_query;
go_block('incom e');
execute_query;
end;
----------------------------
the problem is when i click the button it minus income.tons from stock.tons, But when i click the button again It minus The same value and so on.
So how to provent to minus the same Record value from the same Record again and again,it should minus it once per record.
Send me the proper and complete CODE,
I really need it.
Thanks in advance.
I have problem with the following table
For example i have two tables Stock,Income
stock table columns
Date,itemid,ite mName,ItemType, Tons.
Income table columns.
Date,ITemid,ite mtype,tons.
Now i want minus income.tons from stock.tons
by when-button-press trigger.
------------------------
Declare
Begin
UPDATE Stock set stock.tons=:sto ck.tons-:income.tons
where itemid=:income. itemid;
commit_form;
go_block('Stock ');
execute_query;
go_block('incom e');
execute_query;
end;
----------------------------
the problem is when i click the button it minus income.tons from stock.tons, But when i click the button again It minus The same value and so on.
So how to provent to minus the same Record value from the same Record again and again,it should minus it once per record.
Send me the proper and complete CODE,
I really need it.
Thanks in advance.
Comment