pegaga1979
13th December 2018, 10:30
Hi,

After went through the thread, i'm still not really understand how to do.

I tried to put the script like below and have error "function within function. decode.amount not expected"


domain tcmcs.s130m amount.desc
domain tcmcs.st65m amount.desc1
domain tcmcs.st65m amount.desc2
domain tcmcs.st20m amount.desc3
domain tcmcs.st65m amount.desc4
domain tcmcs.st65m amount.desc5

after.tfcmg403.btno.1:
before.layout:

decode.amount()



functions:

function decode.amount()
{
domain tfgld.serl lnga
domain tfgld.serl lngb
domain tfgld.serl lngc
domain tfgld.serl lngd
domain tfgld.serl lnge
long digitp, oflag, fstrlen
string fullstr(200)

|#117237-1.so

tcmcs.dll0006.decode(
tfcmg403.amth(el.no),
true,
amount.desc,
amount.desc1,
amount.desc2,
amount.desc3)



Does anyone can help me?

pegaga1979
13th December 2018, 11:27
then i write the script like this and still have error "unresolved tcmcs.dll0006.decode"


domain tcmcs.s130m amount.desc
domain tcmcs.st65m amount.desc1
domain tcmcs.st65m amount.desc2
domain tcmcs.st20m amount.desc3
domain tcmcs.st65m amount.desc4
domain tcmcs.st65m amount.desc5

domain tfgld.amnt total

after.tfcmg403.btno.1:
before.layout:
total = tfcmg403.amth(el.no)
decode.amount()



functions:

function decode.amount()
{
domain tfgld.serl lnga
domain tfgld.serl lngb
domain tfgld.serl lngc
domain tfgld.serl lngd
domain tfgld.serl lnge

tcmcs.dll0006.decode(total, true, amount.desc, amount.desc1,
amount.desc2, amount.desc3)

lnga = len(amount.desc1)
lngb = len(amount.desc2)
lngc = len(amount.desc3)
lngd = lnga + lngc
lnge = lngb + lngc

if isspace(amount.desc2) then
if lngd > 65 then
amount.desc1 = "*" & shiftr$(amount.desc1) & "*"
amount.desc2 = "*" & shiftl$(amount.desc3) & "*"
amount.desc3 = ""
else
amount.desc1 = "*" & concat$(" ",amount.desc1,
amount.desc3) & "*"
amount.desc3 = ""
endif
else
if lnge > 65 then
amount.desc1 = "*" & shiftr$(amount.desc1) & "*"
amount.desc2 = "*" & shiftr$(amount.desc2) & "*"
amount.desc3 = "*" & shiftl$(amount.desc3) & "*"
else
amount.desc1 = "*" & shiftr$(amount.desc1) & "*"
amount.desc2 = "*" & concat$(" ",amount.desc2,
amount.desc3) & "*"
amount.desc3 = ""
endif
endif

amount.desc1 = toupper$(amount.desc1)
amount.desc2 = toupper$(amount.desc2)
amount.desc3 = toupper$(amount.desc3)
}

Sarath
13th December 2018, 13:50
Hi,

Please use the tccomdll9003.l has a library for the report script and the code as
#include "itdvel0003"

tt = total.amount + total.freight + total.other + round(total.cgst,0,1) + round(total.sgst,0,1) + round(total.igst,0,1) + round(total.tcs,0,1)

itdvel0003.decode(tt,true, amount.desc, amount.desc1,
amount.desc2, amount.desc3)
amount.in.words = "RUPEES "&strip$(shiftl$(amount.desc))&" "&strip$(shiftl$(amount.desc3))
amount.in.words = concat$(" ",strip$(shiftl$(amount.in.words)),"ONLY")
amount.in.words = toupper$(amount.in.words)

Sarath
14th December 2018, 05:45
Hi,

In after.tfcmg403.btno.1: layout directly write the code don't use the fucction.

Regards,
Sarath

pegaga1979
19th December 2018, 03:20
Hi Sarath,
It gives me error: Fatal Error: Can't open input file 'itdvel0003'