Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Nav2013r2 comparison for GL account numbers in CA/L

(0) ShareShare
ReportReport
Posted on by

I know I am coding something wrong but I am so tired I can figure it out I am turning to mush.  Can someone help? Does not like looking for var....


IF "Job WIP G/L Entry".Type = "Job WIP G/L Entry".Type::"3" then begin
//**SALES
IF("Job WIP G/L Entry"."G/L Account No." >= '19900') and ("Job WIP G/L Entry"."G/L Account No." < '23001') then
INVOICED += "Job WIP G/L Entry"."WIP Entry Amount";
//**RETURNS AND ALLOWANCES
IF ("Job WIP G/L Entry"."G/L Account No." >= '24000') AND ("Job WIP G/L Entry"."G/L Account No." =< '26000') THEN
INVOICED += "Job WIP G/L Entry"."WIP Entry Amount";
end;
if "Job WIP G/L Entry".Type = "Job WIP G/L Entry".Type::"2" then begin
//**RETURNS AND ALLOWANCES
IF ("Job WIP G/L Entry"."G/L Account No." >= '24000') AND ("Job WIP G/L Entry"."G/L Account No." < '26000') THEN
INVOICED += "Job WIP G/L Entry"."WIP Entry Amount";
//**MATERIALS
IF ("Job WIP G/L Entry"."G/L Account No." >= '30000') AND ("Job WIP G/L Entry"."G/L Account No." < '32001') THEN
MATERIAL += "Job WIP G/L Entry"."WIP Entry Amount";
//**LABOR
IF ("Job WIP G/L Entry"."G/L Account No." >= '35000') AND ("Job WIP G/L Entry"."G/L Account No." < '36001') THEN
LABOR += "Job WIP G/L Entry"."WIP Entry Amount";
END;

*This post is locked for comments

  • Community Member Profile Picture
    on at
    RE: Nav2013r2 comparison for GL account numbers in CA/L

    WooooHooooo thank you very much!

  • Verified answer
    Suresh Kulla Profile Picture
    47,688 on at
    RE: Nav2013r2 comparison for GL account numbers in CA/L

    Kim,

    I am not sure what is the issue you are facing but i recommend to use IN function instead of <= or >=, which is very neat to understand and small chances of errors

    so for example for your highlighted line the code looks like this

    IF "Job WIP G/L Entry"."G/L Account No." IN ['19900'..'23000'] THEN

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics NAV (Archived)

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans