Hi,
We have imported Sales Head and Sale Lines from other system by using Dataport.
When we stay in Sales Order form and try to post this, some lines gets error message “There is nothing to post” even if there are some lines with amount . With some sales orders that posting goes well but with another it doesn’t.
Also all works fine with "Post and Print" option…
If I try to set one more line to Sales order and doesn’t really make it just put a new line to the order so again posting goes well.
I have checked Sales lines tabel they are identical and seem looks right.
When I trace in debugger CU-80 I saw that in code
SalesLine.RESET;
SalesLine.SETRANGE("Document Type","Document Type");
SalesLine.SETRANGE("Document No.","No.");
SalesLine.SETFILTER(SalesLine."Qty. to Ship",'<>0');
IF SalesLine.FIND('-') THEN …
Programm finds some lines but with some lines that were imported in that FIND doesn’t return any Salesline. I wrote out filter from that debug and tried it in table Sales Line. I have got some lines but in codeunit it just couldn’t find exact the same lines.
Looks strange Navison behaviour.
Thanks in advance.
0
Comments
This message is due to these Base fields not being populated.
5415 Quantity (Base)
5416 Outstanding Qty. (Base)
5417 Qty. to Invoice (Base)
5418 Qty. to Ship (Base)
5458 Qty. Shipped Not Invd. (Base)
5460 Qty. Shipped (Base)
5461 Qty. Invoiced (Base)
5404 Qty. per Unit of Measure
You will have to Open the Orders and Validate the unit of Measure and the Quantity Fields to correct this, or create a report to populate these fields above.
The posting codeunit filters on the Quantities but posts the base values, that is why you are confused by the trace! :?
If you are unsure how to do this let us know!
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
I have validated both the Quantity and the unit of Measure in dataport. I have checked in the Sales Line table the record all parameters such Quntity (base) etc.. are validated.
I have wrote before that I have cheked to lines one witch was created with dataport and one that I have creted in the Sales Order form. They are identical.
But as I know with validating Quntity fires other triggers.
If I create a new line without Quantity so I can post after that both lines.
Here is example of the two line they are identical :
Document Type Order Order
Sell-to Customer No. 103764 103764
Document No. 2048171 2048171
Line No. 20000 10000
Type G/L Account G/L Account
No. 3120 3120
Location Code LAGER LAGER
Posting Group
Shipment Date 28.06.2006 28.06.2006
Description Foto Handsfree Pla
Description 2
Unit of Measure Stykk Stykk
Quantity 1 1
Outstanding Quantity 1 1
Qty. to Invoice 1 1
Qty. to Ship 1 1
Unit Price Excl. VAT 990 990
Unit Cost (LCY) 0 0
VAT % 25 25
Line Discount % 0 0
Line Discount Amount 0 0
Amount 0 0
Amount Including VAT 0 0
Allow Invoice Disc. No No
Gross Weight 0 0
Net Weight 0 0
Units per Parcel 0 0
Unit Volume 0 0
Appl.-to Item Entry 0 0
Avdelings - kode
Produkt - kode
Customer Price Group
Job No.
Appl.-to Job Entry 0 0
Phase Code
Job Applies-to ID
Apply and Close (Job) No No
Work Type Code
Outstanding Amount 1 237,5 1 237,5
Qty. Shipped Not Invoiced 0 0
Shipped Not Invoiced 0 0
Quantity Shipped 0 0
Quantity Invoiced 0 0
Shipment No.
Shipment Line No. 0 0
Profit % 0 0
Bill-to Customer No. 103764 103764
Inv. Discount Amount 0 0
Purchase Order No.
Purch. Order Line No. 0 0
Drop Shipment No No
Gen. Bus. Posting Group INNLAND INNLAND
Gen. Prod. Posting Group FOTO FOTO
VAT Calculation Type Normal VAT Normal VAT
Transaction Type
Transport Method
Attached to Line No. 0 0
Exit Point
Area
Tax Area Code
Tax Liable No No
Tax Group Code
VAT Bus. Posting Group INNLAND INNLAND
VAT Prod. Posting Group VARE 25 VARE 25
Currency Code
Outstanding Amount (LCY) 1 237,5 1 237,5
Shipped Not Invoiced (LCY) 0 0
Reserved Quantity 0 0
Reserve Never Never
Blanket Order No.
Blanket Order Line No. 0 0
VAT Base Amount 0 0
Unit Cost 0 0
System-Created Entry No No
Line Amount Excl. VAT 990 990
VAT Difference 0 0
Inv. Disc. Amount to Invoice 0 0
VAT Identifier VARE 25 VARE 25
IC Partner Ref. Type
IC Partner Reference
Variant Code
Bin Code
Qty. per Unit of Measure 1 1
Planned No No
Unit of Measure Code STK STK
Quantity (Base) 1 1
Outstanding Qty. (Base) 1 1
Qty. to Invoice (Base) 1 1
Qty. to Ship (Base) 1 1
Qty. Shipped Not Invd. (Base) 0 0
Qty. Shipped (Base) 0 0
Qty. Invoiced (Base) 0 0
Reserved Qty. (Base) 0 0
FA Posting Date
Depreciation Book Code
Depr. until FA Posting Date No No
Duplicate in Depreciation Book
Use Duplication List No No
Responsibility Center
Out-of-Stock Substitution No No
Substitution Available No No
Originally Ordered No.
Originally Ordered Var. Code
Cross-Reference No.
Unit of Measure (Cross Ref.)
Cross-Reference Type
Cross-Reference Type No.
Item Category Code
Nonstock No No
Purchasing Code
Product Group Code
Special Order No No
Special Order Purchase No.
Special Order Purch. Line No. 0 0
Whse. Outstanding Qty. (Base) 0 0
Completely Shipped No No
Requested Delivery Date
Promised Delivery Date
Shipping Time
Outbound Whse. Handling Time
Planned Delivery Date 28.06.2006
Planned Shipment Date 28.06.2006
Shipping Agent Code
Shipping Agent Service Code
Allow Item Charge Assignment No No
Qty. to Assign 0 0
Qty. Assigned 0 0
Return Qty. to Receive 0 0
Return Qty. to Receive (Base) 0 0
Return Qty. Rcd. Not Invd. 0 0
Ret. Qty. Rcd. Not Invd.(Base) 0 0
Return Rcd. Not Invd. 0 0
Return Rcd. Not Invd. (LCY) 0 0
Return Qty. Received 0 0
Return Qty. Received (Base) 0 0
Appl.-from Item Entry 0 0
Service Contract No.
Service Order No.
Service Item No.
Appl.-to Service Entry 0 0
Service Item Line No. 0 0
Serv. Price Adjmt. Gr. Code
BOM Item No.
Return Receipt No.
Return Receipt Line No. 0 0
Return Reason Code
Allow Line Disc. No No
Customer Disc. Group
VAT Code
Sorry for so logn list
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
This is kode form Codeunit 80 OnRun() trigger:
And this is standart code.
I guess problem in my dataport but why standard codeunit 80 sometimes posts lines and sometimes doesn’t
I have doubled checked filters and value and variables.
In dataport I just put/modify record and validate fileds.