NAV 2009 R2 Job module, disable usage requirement

alvi99
Member Posts: 71
Hi All,
If you worked with the Job Module you probably know this message:
"You should consume Item in Job before you post sales Invoice/Sales Credit Memo"
This error message is shown if you try to post a sales invoice / credit memo generated from the Job Module with Items, but did not post usage first.
When creating a Sales Credit Memo, due to a wrongly posted Sales Invoice, and create a new Sales Invoice, the process is quite circum: you first need to create negative journal lines for the Sales Credit Memo and positive journal lines for the new corrected Sales invoice. Setting Line Type to Contract you can have NAV create new contract lines. After that you create a Sales Credit Memo and a new Sales Invoice and post them. In NAV 2015 this process has changed and it is not necessary to consume an item before posting invoices / credit memos.
My question regarding NAV 2009:
If I out-comment this code in Codeunit 1001 Job Post-Line:
IF JobPlanningLine.Type = JobPlanningLine.Type::Item THEN
CheckItemQuantity(JobPlanningLine,SalesHeader,SalesLine);
the consume check is not performed and I can manually create a new contract line, create a sales credit memo and post it without first posting consumption.
See attached images for result with and without the code change.
Can anybody tell me if this code change would have any bad consequences?
Thanks
If you worked with the Job Module you probably know this message:
"You should consume Item in Job before you post sales Invoice/Sales Credit Memo"
This error message is shown if you try to post a sales invoice / credit memo generated from the Job Module with Items, but did not post usage first.
When creating a Sales Credit Memo, due to a wrongly posted Sales Invoice, and create a new Sales Invoice, the process is quite circum: you first need to create negative journal lines for the Sales Credit Memo and positive journal lines for the new corrected Sales invoice. Setting Line Type to Contract you can have NAV create new contract lines. After that you create a Sales Credit Memo and a new Sales Invoice and post them. In NAV 2015 this process has changed and it is not necessary to consume an item before posting invoices / credit memos.
My question regarding NAV 2009:
If I out-comment this code in Codeunit 1001 Job Post-Line:
IF JobPlanningLine.Type = JobPlanningLine.Type::Item THEN
CheckItemQuantity(JobPlanningLine,SalesHeader,SalesLine);
the consume check is not performed and I can manually create a new contract line, create a sales credit memo and post it without first posting consumption.
See attached images for result with and without the code change.
Can anybody tell me if this code change would have any bad consequences?
Thanks
0
Comments
-
Well.. your main issue is that you open now the chance to wrongly try invoicing without the usage. If you are going to allow skipping the check, instead of just commenting out do something as follows:
1) On the user setup create a new boolean field to setup the users that are allowed to skip the check (so a manager can be required to allow this to be done).
2) in the code add something in this format (so you can at least get a warning so they can't prevent unwanted actions):--- before --- if (not testperformed) then error('You should... blah blah blah'); --- after ---- vbooleanvarPopError := TRUE; if (not testperformed) then BEGIN IF (user_allowed_to_bypass(USERID)) THEN BEGIN IF (CONFIRM('Message warning he is going to bypass the error. continue or not.',FALSE)) THEN vbooleanvarPopError := FALSE; END; IF (VBooleanVarPopError) THEN error('you should... blah blah blah'); END;
0 -
Hi apertierra,
Thanks for your reply. I dont think you answered my question? :-)
Br,
Alvi0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions