24. Juli 2014 16:28
24. Juli 2014 19:11
24. Juli 2014 22:28
25. Juli 2014 13:02
Microsoft Dynamics NAV
---------------------------
Die angegebene Spalten-ID '50001' wurde in der Abfrage nicht gefunden.
Die Seite 'Katalogartikel' muss geschlossen werden.
---------------------------
OK
---------------------------
2. August 2014 17:39
4. August 2014 12:32
4. August 2014 15:56
4. August 2014 16:02
5. August 2014 15:01
OBJECT Table 5718 Nonstock Item
{
OBJECT-PROPERTIES
{
Date=07.09.12;
Time=12:00:00;
Version List=NAVW17.00,042;
}
PROPERTIES
{
OnInsert=BEGIN
NonStockItem.LOCKTABLE;
IF "Entry No." = '' THEN BEGIN
GetInvtSetup;
InvtSetup.TESTFIELD("Nonstock Item Nos.");
NoSeriesMgt.InitSeries(InvtSetup."Nonstock Item Nos.",xRec."No. Series",0D,"Entry No.","No. Series");
END;
END;
OnModify=BEGIN
"Last Date Modified" := TODAY;
MfrLength := STRLEN("Manufacturer Code");
VenLength := STRLEN("Vendor Item No.");
NonStockItemSetup.GET;
CASE NonStockItemSetup."No. Format" OF
NonStockItemSetup."No. Format"::"Entry No.":
ItemNo := "Entry No.";
NonStockItemSetup."No. Format"::"Vendor Item No.":
ItemNo := "Vendor Item No.";
NonStockItemSetup."No. Format"::"Mfr. + Vendor Item No.":
IF NonStockItemSetup."No. Format Separator" = '' THEN BEGIN
IF MfrLength + VenLength <= 20 THEN
ItemNo := INSSTR("Manufacturer Code","Vendor Item No.",6)
ELSE
ItemNo := INSSTR("Manufacturer Code","Entry No.",6);
END ELSE BEGIN
TempItemNo :=
INSSTR("Manufacturer Code",NonStockItemSetup."No. Format Separator",6);
IF MfrLength + VenLength < 20 THEN
ItemNo := INSSTR(TempItemNo,"Vendor Item No.",7)
ELSE
ItemNo := INSSTR(TempItemNo,"Entry No.",7);
END;
NonStockItemSetup."No. Format"::"Vendor Item No. + Mfr.":
IF NonStockItemSetup."No. Format Separator" = '' THEN BEGIN
IF VenLength + MfrLength <= 20 THEN
ItemNo := INSSTR("Vendor Item No.","Manufacturer Code",11)
ELSE
ItemNo := INSSTR("Entry No.","Manufacturer Code",11);
END ELSE BEGIN
TempItemNo :=
INSSTR("Vendor Item No.",NonStockItemSetup."No. Format Separator",10);
IF VenLength + MfrLength < 20 THEN
ItemNo := INSSTR(TempItemNo,"Manufacturer Code",11);
END;
END;
Item.SETRANGE("No.",ItemNo);
// Start 001.MH
IF NOT NoCheckItem THEN
// Stop 001.MH
IF Item.FINDFIRST THEN
ERROR(Text001);
END;
CaptionML=[DEU=Katalogartikel;
ENU=Nonstock Item;
DEA=Katalogartikel];
LookupPageID=Page5726;
DrillDownPageID=Page5726;
}
FIELDS
{
{ 1 ; ;Entry No. ;Code20 ;OnValidate=BEGIN
IF "Entry No." <> xRec."Entry No." THEN BEGIN
GetInvtSetup;
NoSeriesMgt.TestManual(InvtSetup."Nonstock Item Nos.");
"No. Series" := '';
END;
END;
CaptionML=[DEU=Lfd. Nr.;
ENU=Entry No.;
DEA=Lfd. Nr.];
Editable=Yes }
{ 2 ; ;Manufacturer Code ;Code10 ;TableRelation=Manufacturer.Code;
OnValidate=BEGIN
// Start 001.MH
IF NOT NoCheckItem THEN
// Stop 001.MH
IF ("Manufacturer Code" <> xRec."Manufacturer Code") AND
("Item No." <> '')
THEN
ERROR(Text001);
END;
CaptionML=[DEU=Herstellercode;
ENU=Manufacturer Code;
DEA=Herstellercode] }
{ 3 ; ;Vendor No. ;Code20 ;TableRelation=Vendor.No.;
OnValidate=BEGIN
// Start 001.MH
IF NOT NoCheckItem THEN
// Stop 001.MH
IF ("Vendor No." <> xRec."Vendor No.") AND
("Item No." <> '')
THEN
ERROR(Text001);
IF "Vendor No." <> xRec."Vendor No." THEN
IF CheckVendorItemNo("Vendor No.","Vendor Item No.") THEN
ERROR(Text002,"Vendor No.","Vendor Item No.");
END;
CaptionML=[DEU=Kreditorennr.;
ENU=Vendor No.;
DEA=Kreditorennr.] }
{ 4 ; ;Vendor Item No. ;Code20 ;OnValidate=BEGIN
// Start 001.MH
IF NOT NoCheckItem THEN
// Stop 001.MH
IF ("Vendor Item No." <> xRec."Vendor Item No.") AND
("Item No." <> '')
THEN
ERROR(Text001);
IF "Vendor Item No." <> xRec."Vendor Item No." THEN
IF CheckVendorItemNo("Vendor No.","Vendor Item No.") THEN
ERROR(Text002,"Vendor No.","Vendor Item No.");
END;
CaptionML=[DEU=Kred.-Artikelnr.;
ENU=Vendor Item No.;
DEA=Kred.-Artikelnr.] }
{ 5 ; ;Description ;Text50 ;OnValidate=BEGIN
// Start 001.MH
IF NOT NoCheckItem THEN
// Stop 001.MH
IF (Description <> xRec.Description) AND
("Item No." <> '')
THEN
ERROR(Text001);
END;
CaptionML=[DEU=Beschreibung;
ENU=Description;
DEA=Beschreibung];
Editable=Yes }
{ 6 ; ;Unit of Measure ;Code10 ;TableRelation="Unit of Measure";
OnValidate=BEGIN
// Start 001.MH
IF NOT NoCheckItem THEN
// Stop 001.MH
IF ("Unit of Measure" <> xRec."Unit of Measure") AND
("Item No." <> '')
THEN
ERROR(Text001);
END;
CaptionML=[DEU=Einheit;
ENU=Unit of Measure;
DEA=Einheit] }
{ 7 ; ;Published Cost ;Decimal ;OnValidate=BEGIN
// Start 001.MH
IF NOT NoCheckItem THEN
// Stop 001.MH
IF ("Published Cost" <> xRec."Published Cost") AND
("Item No." <> '')
THEN
ERROR(Text001);
END;
CaptionML=[DEU=Listen-EK-Preis;
ENU=Published Cost;
DEA=Listen-EK-Preis];
AutoFormatType=1 }
{ 8 ; ;Negotiated Cost ;Decimal ;OnValidate=BEGIN
// Start 001.MH
IF NOT NoCheckItem THEN
// Stop 001.MH
IF ("Negotiated Cost" <> xRec."Negotiated Cost") AND
("Item No." <> '')
THEN
ERROR(Text001);
END;
CaptionML=[DEU=Vereinbarter EK-Preis;
ENU=Negotiated Cost;
DEA=Vereinbarter EK-Preis];
AutoFormatType=1 }
{ 9 ; ;Unit Price ;Decimal ;OnValidate=BEGIN
// Start 001.MH
IF NOT NoCheckItem THEN
// Stop 001.MH
IF ("Unit Price" <> xRec."Unit Price") AND
("Item No." <> '')
THEN
ERROR(Text001);
END;
CaptionML=[DEU=VK-Preis;
ENU=Unit Price;
DEA=VK-Preis];
AutoFormatType=1 }
{ 10 ; ;Gross Weight ;Decimal ;OnValidate=BEGIN
// Start 001.MH
IF NOT NoCheckItem THEN
// Stop 001.MH
IF ("Gross Weight" <> xRec."Gross Weight") AND
("Item No." <> '')
THEN
ERROR(Text001);
END;
CaptionML=[DEU=Bruttogewicht;
ENU=Gross Weight;
DEA=Bruttogewicht];
DecimalPlaces=0:5 }
{ 11 ; ;Net Weight ;Decimal ;OnValidate=BEGIN
// Start 001.MH
IF NOT NoCheckItem THEN
// Stop 001.MH
IF ("Net Weight" <> xRec."Net Weight") AND
("Item No." <> '')
THEN
ERROR(Text001);
END;
CaptionML=[DEU=Nettogewicht;
ENU=Net Weight;
DEA=Nettogewicht];
DecimalPlaces=0:5 }
{ 12 ; ;Item Category Code ;Code10 ;TableRelation="Item Category";
OnValidate=BEGIN
// Start 001.MH
IF NOT NoCheckItem THEN
// Stop 001.MH
IF ("Item Category Code" <> xRec."Item Category Code") AND
("Item No." <> '')
THEN
ERROR(Text001);
"Product Group Code" := '';
END;
CaptionML=[DEU=Artikelkategoriencode;
ENU=Item Category Code;
DEA=Artikelkategoriencode] }
{ 13 ; ;Product Group Code ;Code10 ;TableRelation="Product Group".Code WHERE (Item Category Code=FIELD(Item Category Code));
OnValidate=BEGIN
// Start 001.MH
IF NOT NoCheckItem THEN
// Stop 001.MH
IF ("Product Group Code" <> xRec."Product Group Code") AND
("Item No." <> '')
THEN
ERROR(Text001);
END;
CaptionML=[DEU=Produktgruppencode;
ENU=Product Group Code;
DEA=Produktgruppencode] }
{ 14 ; ;Last Date Modified ;Date ;CaptionML=[DEU=Korrigiert am;
ENU=Last Date Modified;
DEA=Korrigiert am];
Editable=No }
{ 15 ; ;Bar Code ;Code20 ;OnValidate=BEGIN
// Start 001.MH
IF NOT NoCheckItem THEN
// Stop 001.MH
IF ("Bar Code" <> xRec."Bar Code") AND
("Item No." <> '')
THEN
ERROR(Text001);
END;
CaptionML=[DEU=Barcode;
ENU=Bar Code;
DEA=Barcode] }
{ 16 ; ;Item No. ;Code20 ;TableRelation=Item.No.;
OnValidate=BEGIN
// Start 001.MH
IF NOT NoCheckItem THEN
// Stop 001.MH
IF ("Item No." <> xRec."Item No.") AND
("Item No." <> '')
THEN
ERROR(Text001);
END;
CaptionML=[DEU=Artikelnr.;
ENU=Item No.;
DEA=Artikelnr.];
Editable=No }
{ 53 ; ;Comment ;Boolean ;FieldClass=FlowField;
CalcFormula=Exist("Comment Line" WHERE (Table Name=CONST(Nonstock Item),
No.=FIELD(Entry No.)));
CaptionML=[DEU=Bemerkung;
ENU=Comment;
DEA=Bemerkung];
Editable=No }
{ 97 ; ;No. Series ;Code10 ;TableRelation="No. Series";
CaptionML=[DEU=Nummernserie;
ENU=No. Series;
DEA=Nummernserie];
Editable=No }
{ 50000; ;Prefix ;Text1 ;CaptionML=[ENU=Prefix;
DEA=Pr„fix] }
{ 50001; ;Item Count ;Integer ;FieldClass=FlowField;
CalcFormula=Count(Item WHERE (Vendor No.=FIELD(Vendor No.),
Vendor Item No.=FIELD(Vendor Item No.)));
CaptionML=[ENU=Item Count;
DEA=Anzahl Artikel] }
{ 50002; ;Vendor Item Count ;Integer ;FieldClass=FlowField;
CalcFormula=Count("Item Vendor" WHERE (Vendor No.=FIELD(Vendor No.),
Vendor Item No.=FIELD(Vendor Item No.)));
CaptionML=[ENU=Number of Vendor Item Count;
DEA=Anzahl Lieferantenartikel] }
}
KEYS
{
{ ;Entry No. ;Clustered=Yes }
{ ;Vendor Item No.,Manufacturer Code }
{ ;Item No. }
{ ;Vendor No.,Vendor Item No. }
}
FIELDGROUPS
{
}
CODE
{
VAR
Text001@1001 : TextConst 'DEU=Bearbeitung nicht zul„ssig, da der Artikel bereits vorhanden ist.;ENU=Modification not allowed, item record already exists.;DEA=Bearbeitung nicht zul„ssig, da der Artikel bereits vorhanden ist.';
NonStockItem@1002 : Record 5718;
NonStockItemSetup@1003 : Record 5719;
Item@1004 : Record 27;
InvtSetup@1013 : Record 313;
NoSeriesMgt@1011 : Codeunit 396;
ItemNo@1005 : Code[20];
TempItemNo@1006 : Code[20];
MfrLength@1008 : Integer;
VenLength@1009 : Integer;
Text002@1010 : TextConst 'DEU="Nr.=<%1> und Kred.-Artikelnr.=<%2> sind bereits vorhanden.";ENU="No.=<%1> and Vendor Item No.=<%2> already exists.";DEA="Nr.=<%1> und Kred.-Artikelnr.=<%2> sind bereits vorhanden."';
HasInvtSetup@1012 : Boolean;
__@1000000000 : Integer;
NoCheckItem@1000000001 : Boolean;
PROCEDURE AssistEdit@2() : Boolean;
BEGIN
GetInvtSetup;
InvtSetup.TESTFIELD("Nonstock Item Nos.");
IF NoSeriesMgt.SelectSeries(InvtSetup."Nonstock Item Nos.",xRec."No. Series","No. Series") THEN BEGIN
NoSeriesMgt.SetSeries("Entry No.");
EXIT(TRUE);
END;
END;
PROCEDURE CheckVendorItemNo@1(VendorNo@1000 : Code[20];VendorItemNo@1001 : Code[20]) : Boolean;
BEGIN
NonStockItem.RESET;
NonStockItem.SETCURRENTKEY("Vendor No.","Vendor Item No.");
NonStockItem.SETRANGE("Vendor No.",VendorNo);
NonStockItem.SETRANGE("Vendor Item No.",VendorItemNo);
EXIT(NonStockItem.FINDFIRST);
END;
PROCEDURE GetInvtSetup@14();
BEGIN
IF NOT HasInvtSetup THEN BEGIN
InvtSetup.GET;
HasInvtSetup := TRUE;
END;
END;
PROCEDURE _F_@1000000001();
BEGIN
END;
PROCEDURE SetNoCheckItem@1000000000(noCheckItemPar@1000000000 : Boolean);
BEGIN
// Start 001.MH
NoCheckItem := noCheckItemPar;
// Stop 001.MH
END;
PROCEDURE UpdatePrice@1000000002(startDatePar@1000000003 : Date;endDatePar@1000000004 : Date) : Boolean;
VAR
itemLoc@1000000002 : Record 27;
purchPriceLoc@1000000001 : Record 7012;
purchPrice2Loc@1000000000 : Record 7012;
itemVendorLoc@1000000005 : Record 99;
BEGIN
// Start 001.MH
IF "Item No." = '' THEN BEGIN
IF ("Vendor No." <> '') AND
("Vendor Item No." <> '') THEN BEGIN
CALCFIELDS("Item Count","Vendor Item Count");
IF "Item Count" = 1 THEN BEGIN
itemLoc.RESET;
itemLoc.SETRANGE("Vendor No.","Vendor No.");
itemLoc.SETRANGE("Vendor Item No.","Vendor Item No.");
IF itemLoc.FINDFIRST THEN BEGIN
"Item No." := itemLoc."No.";
MODIFY;
END;
END;
IF "Item Count" = 0 THEN BEGIN
IF "Vendor Item Count" = 1 THEN
BEGIN
itemVendorLoc.RESET;
itemVendorLoc.SETRANGE("Vendor No.","Vendor No.");
itemVendorLoc.SETRANGE("Vendor Item No.","Vendor Item No.");
IF itemVendorLoc.FINDFIRST THEN BEGIN
"Item No." := itemVendorLoc."Item No.";
MODIFY;
END;
END;
END;
END;
END;
IF "Item No." <> '' THEN BEGIN
IF itemLoc.GET("Item No.") THEN BEGIN
IF itemLoc."Vendor No." = "Vendor No." THEN
BEGIN
itemLoc.VALIDATE("Unit Price","Unit Price");
itemLoc.MODIFY(TRUE);
END;
purchPriceLoc.RESET;
purchPriceLoc.SETRANGE("Item No.","Item No.");
purchPriceLoc.SETRANGE("Vendor No.","Vendor No.");
purchPriceLoc.SETRANGE("Starting Date",startDatePar);
purchPriceLoc.SETRANGE("Ending Date",endDatePar);
IF purchPriceLoc.FINDFIRST THEN BEGIN
purchPriceLoc.VALIDATE("Direct Unit Cost","Negotiated Cost");
purchPriceLoc.MODIFY(TRUE);
END ELSE BEGIN
purchPriceLoc.RESET;
purchPriceLoc.SETRANGE("Item No.","Item No.");
purchPriceLoc.SETRANGE("Vendor No.","Vendor No.");
purchPriceLoc.SETFILTER("Ending Date",'%1|>=%2',0D,startDatePar);
IF purchPriceLoc.FINDSET(TRUE,TRUE) THEN BEGIN
REPEAT
IF purchPriceLoc."Starting Date" > startDatePar-1 THEN BEGIN
IF (endDatePar = 0D) OR
(purchPriceLoc."Ending Date" <= endDatePar) THEN BEGIN
purchPriceLoc.DELETE(TRUE);
END ELSE BEGIN
purchPrice2Loc.INIT;
purchPrice2Loc := purchPriceLoc;
purchPrice2Loc."Starting Date" := endDatePar + 1;
purchPriceLoc.DELETE(TRUE);
purchPrice2Loc.INSERT(TRUE);
END;
END ELSE BEGIN
purchPriceLoc.VALIDATE("Ending Date",startDatePar-1);
purchPriceLoc.MODIFY(TRUE);
END;
UNTIL purchPriceLoc.NEXT = 0;
END;
purchPriceLoc.INIT;
purchPriceLoc.VALIDATE("Item No.","Item No.");
purchPriceLoc.VALIDATE("Vendor No.","Vendor No.");
purchPriceLoc.VALIDATE("Starting Date",startDatePar);
purchPriceLoc.VALIDATE("Unit of Measure Code",itemLoc."Base Unit of Measure");
purchPriceLoc.VALIDATE("Direct Unit Cost","Negotiated Cost");
purchPriceLoc.VALIDATE("Ending Date",endDatePar);
IF NOT purchPriceLoc.INSERT(TRUE) THEN BEGIN
purchPriceLoc.MODIFY(TRUE);
END;
END;
EXIT(TRUE);
END;
END;
EXIT(FALSE);
// Stop 001.MH
END;
BEGIN
{
}
END.
}
}
OBJECT Page 90000 Test
{
OBJECT-PROPERTIES
{
Date=05.08.14;
Time=14:54:20;
Modified=Yes;
Version List=;
}
PROPERTIES
{
SourceTable=Table5718;
PageType=List;
}
CONTROLS
{
{ 1000000000;0;Container;
ContainerType=ContentArea }
{ 1000000001;1;Group ;
Name=Group;
GroupType=Repeater }
{ 1000000002;2;Field ;
SourceExpr="Entry No." }
{ 1000000003;2;Field ;
SourceExpr="Manufacturer Code" }
{ 1000000004;2;Field ;
SourceExpr="Vendor No." }
{ 1000000005;2;Field ;
SourceExpr="Item Count" }
}
CODE
{
BEGIN
END.
}
}
6. August 2014 10:43
Count("Reservation Entry" WHERE (Item No.=FIELD(Item No.)))
6. August 2014 10:47
8. August 2014 19:14
11. August 2014 15:30
11. August 2014 15:34