Credit note->job task lines: 'Quantity has been changed'

imurphy
Member Posts: 308
While trying to register a Credit Note with a single line with a job number assigned I'm getting this error:
The first lines of this function are
I've been digging through the kbs but haven't noticed anything related to this problem. Cronus Sp1 has exactly the same code.
Anyone understand the logic ?
Ian
I wasn't sure of the cause so I stepped into the code causing this error which is in CU 1001, Job Post line, function PostInvoiceContractLineQuantity has been changed (initial a Job Task: Job No.= OT100, Job Task No.= 998) in Sales Line Document Type='Credit Memo',Document No.='VAB+000016',Line No.='10000'.
The first lines of this function are
Factor := 1; IF SalesLine."Document Type" = SalesLine."Document Type"::"Credit Memo" THEN Factor := -1;but then a little further down there is a check
IF SalesLine.Quantity <> Factor * JobPlanningLine.Quantity THEN SalesLine.FIELDERROR(Quantity,Txt);The Sales line in question has a quantity of 1 as does the JobPlanningLine - however the logic of the code means that a credit note with a line assigned to a job task will *always* fail - am I missing something here?
I've been digging through the kbs but haven't noticed anything related to this problem. Cronus Sp1 has exactly the same code.
Anyone understand the logic ?
Ian
0
Comments
-
I should also add that the planning line which is causing the problem is created in CU 80, funcion PostJobContractLine.
The sales line is passed to CU 80::PostJobContractLine which then calls CU 1001::PostPlanningLine but a no point does the quantity get inversed by a 'factor' of -1 before posting the planning line.
In my case the quantity of 1 in the Credit Memo is posted as 1 in the planning line. This is then checked in CU 1001::PostInvoiceContractLine but using the following logicSalesLine.Quantity <> Factor * JobPlanningLine.Quantity
is this a bug? I can't believe billing and issuing credit notes against a project is so unusual that I've found a bug. There have got to be loads of people out there doing the same.
Ian0 -
Well, noone seems to have picked up on my posting so it looks as if I'm exploring new territory here.
I did find a KB with a similar problem: 941514 - "A planning line for a job that has a purchase credit memo posted contains an positive quantity incorrectly in the "Job Planning List" dialog box in Microsoft Dynamics NAV 5.0" - While my problem afects sales credit memos, the problem seems to be almost identical and I suspect I'm going to have to make up a patch.
This is occuring on a credit memo with no associated invoice, the (one) line in the credit memo is for a G/L account and not an item.
I should also have mentioned that this is NAv 5.0 spanish version.
Ian0
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