virajindika
24th February 2004, 05:10
hi everyone,
we are using BaaNIVc3 and when invoicing we used custom developped invoice report in sesion tdsls4404m000

i'll explain my problem using an example

table - tcmcs032
taxcode(cvat) - 'ABC'
effective from(edat) & rate(pvat)
line 1 - 01-01-2004 / 20%
line 2 - 01-02-2004 / 15%

when i take reports it only picks the firstline not the correct line relevant to DATE, but it goes to finance correctly ( in standard report also it prints correctly ) i think it's only a error which i'm not filtering the correct recerd. how do i do it in report script ( i'm a tools guy and i can understand codings ) please give me a solution

viraj indika
viraj@clipsal.lk

Hitesh Shah
24th February 2004, 07:49
select tcmcs032.*
from tcmcs032
where tcmcs032._index1 = {:ccty,:cvat}
and tcmcs032.edat >= :efdt
order by tcmcs032.edat desc
as set with 1 rows
selectdo
|tcmcs032.pvat is the tax rate
selectemty
|no tax rate found
endselect

|ccty ,cvat and efdt may be variables in your report script.