/*ALIAS>prop_db*/

/*SQLStart>1680*/
ALTER TABLE INVOICES
ADD IN_ABSOLUTE_DATE DATE
/*SQLStop>1680*/


/*SQLStart>1681*/
CREATE OR ALTER trigger invoices_bi for invoices
active before insert position 0
as
begin
  NEW.IN_ClearPayDate = AStripTime(NEW.IN_PAYDATE);
  NEW.in_absolute_date = "NOW";
end
/*SQLStop>1681*/


/*SQLStart>1682*/
update invoices set in_absolute_date = in_paydate
/*SQLStop>1682*/