on 03-28-2017 1:21 PM
Hi All ,
I need to create a user defined field in OINV which will automatically generate Invoice No. Just like 'oinv.docnum' field.How can i do this ? Also we need to reset the value of this field every year.This field will be used as Invoice no. instead of oinv.docnum field.Every financial year we need to reset the value to zero and start again.
Hi,
Better use standard document numbering for every year instead of UDF.
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nabil,
Create a UDF with Numeric type
Use the below Fms to fetch the Document number
SELECT $[Ordr.Docnum]
Regards:
Balaji.S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Interesting question. Please try this:
SELECT DISTINCT CASE
WHEN YEAR((select DocDate
from OINV
where DocNum = (select max(DocNum)
from OINV))) = YEAR(GETDATE()) THEN MAX(U_YourUDF) + 1
ELSE 1
END
FROM OINV
WHERE YEAR(DocDate) = YEAR(GETDATE())
Please note that you can really only test this on the morning of 1st of January 2018, unless you have a separate test system which date you can set manually.
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nabil,
Then use FMS to fetch the invoice number and display at the UDF field where you required.
Regards:
Balaji.S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Balaji ,
I need continuous numbers for Invoice .It should start like 1,2,3 etc.Also need to rest the value of this udf when the financial period ends.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nabil Rashid,
Are you going to have same number as in Document Number or you going to have different number in the UDF.
Regards:
Balaji.S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.