Get SalesShipment from the SalesInvoice g/l accounts

gonzy1981
Member Posts: 156
Hi there,
I've been trying to sort out this issue, but it's been impossible to find out with my little experience in Nav. ;(
Firstly, I've created a Sales shipment with this posting date 01/01/2012, in this sales shipment there is just a line of a g/l account.
Secondly, I've create the invoice (of the previous sales shipment) but with different posting date 01/02/2012.
From the Posting Sales Invoice how can i get Sales Shipment?? Because i haven't find out any relation betwean them when there are g/l accounts in the lines.
I've got it just when i'm posting lines with items, of this way:
ValueEntry.RESET;
ValueEntry.SETRANGE("Item No.",InvLine."No.");
ValueEntry.SETRANGE("Document Line No.",InvLine."Line No.");
ValueEntry.SETRANGE("Document No.",InvLine."Document No.");
ValueEntry.SETRANGE("Document Type",ValueEntry."Document Type"::"Sales Invoice");
IF ValueEntry.FINDFIRST THEN
IF ItemLedgEntry.GET(ValueEntry."Item Ledger Entry No.") THEN BEGIN
SalesShipNo := ItemLedgEntry."Document No.";
SalesShiPostDate := ItemLedgEntry."Posting Date"; //This date is what a need for my client!!
END
Do you know how to help me with this issue???
Thank you.
Bye
I've been trying to sort out this issue, but it's been impossible to find out with my little experience in Nav. ;(
Firstly, I've created a Sales shipment with this posting date 01/01/2012, in this sales shipment there is just a line of a g/l account.
Secondly, I've create the invoice (of the previous sales shipment) but with different posting date 01/02/2012.
From the Posting Sales Invoice how can i get Sales Shipment?? Because i haven't find out any relation betwean them when there are g/l accounts in the lines.
I've got it just when i'm posting lines with items, of this way:
ValueEntry.RESET;
ValueEntry.SETRANGE("Item No.",InvLine."No.");
ValueEntry.SETRANGE("Document Line No.",InvLine."Line No.");
ValueEntry.SETRANGE("Document No.",InvLine."Document No.");
ValueEntry.SETRANGE("Document Type",ValueEntry."Document Type"::"Sales Invoice");
IF ValueEntry.FINDFIRST THEN
IF ItemLedgEntry.GET(ValueEntry."Item Ledger Entry No.") THEN BEGIN
SalesShipNo := ItemLedgEntry."Document No.";
SalesShiPostDate := ItemLedgEntry."Posting Date"; //This date is what a need for my client!!
END
Do you know how to help me with this issue???
Thank you.
Bye
0
Comments
-
Why don't you use order no. field that will meet same(should not be partial shipment and invoice) in both posted shipment and posted invoice header?0
-
I see what you mean, but in my case "Order No." is empty because my client is using the funcionality in the invoices of "Get Shipment Lines". And when we do of that way "Order No." isn't filled up.
Please more advices #-o #-o #-o #-o0 -
Check "Shipment no." and "Shipment line no." fields in invoice line.0
-
Yeahhh, that's it!!!! =D> =D> =D>0
-
I did it in the Sales, but not in the purchases, do you know, why in the "Purch. Inv Lines" there aren't those two fields???
I can't get the Posted Purchase Receipt from the Posted purchase invoice, when i'm posting g/l account.
](*,) ](*,) ](*,) ](*,)0 -
gonzy1981 wrote:I did it in the Sales, but not in the purchases, do you know, why in the "Purch. Inv Lines" there aren't those two fields???
I can't get the Posted Purchase Receipt from the Posted purchase invoice, when i'm posting g/l account.
](*,) ](*,) ](*,) ](*,)
Because the relation between Receipt and Invoice is not one to one (in case of partial). Usually Order No. (or additional field) is used to link them both.Microsoft Certified IT Professional for Microsoft Dynamics NAV
Just a happy frood who knows where his towel is0 -
May be you can use this "Receipt Document No." field in Posted purchase invoices lines...0
-
I think it'll be the best to create two new fields in the posted invoice lines: "Receipt No." and "Receipt Line No.".
And in the codeunit 90 in the transferfields, these fields automatically will be fill up, if i use the same numeration for this new fields than in the "Purchase line", because these two fields exist in the "Purchase line".
\:D/ \:D/ \:D/0 -
I wonder that why MS has not created these two fields in posted invoice line. even when we do get receipt line while creating invoice the invoice line contain value for both field.0
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