29. Juni 2011 15:11
29. Juni 2011 15:34
18. Juli 2011 11:01
...
//Code.Remove.Begin
CALCFIELDS("Qty. Assigned");
IF "Quantity Invoiced" > "Qty. Assigned" THEN
ERROR(Text032,FIELDCAPTION("Quantity Invoiced"),FIELDCAPTION("Qty. Assigned"));
//Code.Remove.End
ItemChargeAssgntPurch.RESET;
...
...
//Code.Add.Begin
CALCFIELDS("Qty. Assigned","Qty. to Assign");
IF ABS("Quantity Invoiced") > ABS(("Qty. Assigned" + "Qty. to Assign")) THEN
ERROR(Text032,FIELDCAPTION("Quantity Invoiced"),FIELDCAPTION("Qty. Assigned") + ' + ' + FIELDCAPTION("Qty. to Assign"));
//Code.Add.End
ItemChargeAssgntPurch.RESET;
...
...
PurchLine2.SETRANGE(Type,PurchLine2.Type::"Charge (Item)");
//Code.Remove.begin
PurchLine2.SETFILTER("Qty. to Invoice",'<>0');
//Code.Remove.end
IF PurchLine2.ISEMPTY THEN
...
UNTIL ItemChargeAssgntPurch.NEXT = 0;
//Code.Remove.begin
PurchLine2.TESTFIELD("Job No.",'');
//Code.Remove.end
...
//Code.Remove.begin
IF QtyNeeded > 0 THEN
ERROR(Text060,PurchLine2."No.");
//Code.Remove.end
UNTIL PurchLine2.NEXT = 0;
...
...
PurchLine2.SETRANGE(Type,PurchLine2.Type::"Charge (Item)");
IF PurchLine2.ISEMPTY THEN
...
UNTIL ItemChargeAssgntPurch.NEXT = 0;
//Code.Add.Begin
IF PurchLine2."Qty. to Invoice" <> 0 THEN BEGIN
PurchLine2.TESTFIELD("Job No.",'');
//Code.Add.end
...
//Code.Add.begin
IF QtyNeeded > 0 THEN
ERROR(Text060,PurchLine2."No.");
END;
//Code.Add.end
UNTIL PurchLine2.NEXT = 0;
...
...
SalesLine2.SETRANGE(Type,SalesLine2.Type::"Charge (Item)");
//Code.Remove.begin
SalesLine2.SETFILTER("Qty. to Invoice",'<>0');
//Code.Remove.end
IF SalesLine2.ISEMPTY THEN
...
UNTIL ItemChargeAssgntSales.NEXT = 0;
//Code.Remove.begin
SalesLine.TESTFIELD("Job No.",'');
//Code.Remove.end
...
//Code.Remove.begin
IF QtyNeeded > 0 THEN
ERROR(Text053,SalesLine2."No.");
//Code.Remove.end
UNTIL SalesLine2.NEXT = 0;
...
...
SalesLine2.SETRANGE(Type,SalesLine2.Type::"Charge (Item)");
IF SalesLine2.ISEMPTY THEN
...
UNTIL ItemChargeAssgntSales.NEXT = 0;
//Code.Add.begin
IF SalesLine2."Qty. to Invoice" <> 0 THEN BEGIN
SalesLine.TESTFIELD("Job No.",'');
//Code.Add.end
...
//Code.Add.begin
IF QtyNeeded > 0 THEN
ERROR(Text053,SalesLine2."No.");
END;
//Code.Add.end
UNTIL SalesLine2.NEXT = 0;
...
18. Juli 2011 11:56
juelicher hat geschrieben:Folgende Antwort habe ich von MS erhalten:
"...
im erwähnten Fall 110110542314606, liegt folgende Lösung vor.
Wichtig: Prüfen Sie den Korrekturvorschlag in einer Testdatenbank.
Error
Error "“Quantity Invoiced must not be greater than Qty. Assigned.” when using Item Charge Assignments on a Purch Order.
Symptom
The Purchase Order activities cannot continue because of the above message
Cause
Code Change required
Resolution
The following Code suggestion resolves this:-
Table 39, UpdateItemChargeAssgnt function
Old code:
- Code:
...
//Code.Remove.Begin
CALCFIELDS("Qty. Assigned");
IF "Quantity Invoiced" > "Qty. Assigned" THEN
ERROR(Text032,FIELDCAPTION("Quantity Invoiced"),FIELDCAPTION("Qty. Assigned"));
//Code.Remove.End
ItemChargeAssgntPurch.RESET;
...
New code:
- Code:
...
//Code.Add.Begin
CALCFIELDS("Qty. Assigned","Qty. to Assign");
IF ABS("Quantity Invoiced") > ABS(("Qty. Assigned" + "Qty. to Assign")) THEN
ERROR(Text032,FIELDCAPTION("Quantity Invoiced"),FIELDCAPTION("Qty. Assigned") + ' + ' + FIELDCAPTION("Qty. to Assign"));
//Code.Add.End
ItemChargeAssgntPurch.RESET;
...
OBJECT: Codeunit 90 (Purch.-Post)
PROCEDURE: CopyAndCheckItemCharge
Before:
- Code:
...
PurchLine2.SETRANGE(Type,PurchLine2.Type::"Charge (Item)");
//Code.Remove.begin
PurchLine2.SETFILTER("Qty. to Invoice",'<>0');
//Code.Remove.end
IF PurchLine2.ISEMPTY THEN
...
UNTIL ItemChargeAssgntPurch.NEXT = 0;
//Code.Remove.begin
PurchLine2.TESTFIELD("Job No.",'');
//Code.Remove.end
...
//Code.Remove.begin
IF QtyNeeded > 0 THEN
ERROR(Text060,PurchLine2."No.");
//Code.Remove.end
UNTIL PurchLine2.NEXT = 0;
...
After:
- Code:
...
PurchLine2.SETRANGE(Type,PurchLine2.Type::"Charge (Item)");
IF PurchLine2.ISEMPTY THEN
...
UNTIL ItemChargeAssgntPurch.NEXT = 0;
//Code.Add.Begin
IF PurchLine2."Qty. to Invoice" <> 0 THEN BEGIN
PurchLine2.TESTFIELD("Job No.",'');
//Code.Add.end
...
//Code.Add.begin
IF QtyNeeded > 0 THEN
ERROR(Text060,PurchLine2."No.");
END;
//Code.Add.end
UNTIL PurchLine2.NEXT = 0;
...
OBJECT: Codeunit 80 (Sales-Post)
PROCEDURE: CopyAndCheckItemCharge
Before:
- Code:
...
SalesLine2.SETRANGE(Type,SalesLine2.Type::"Charge (Item)");
//Code.Remove.begin
SalesLine2.SETFILTER("Qty. to Invoice",'<>0');
//Code.Remove.end
IF SalesLine2.ISEMPTY THEN
...
UNTIL ItemChargeAssgntSales.NEXT = 0;
//Code.Remove.begin
SalesLine.TESTFIELD("Job No.",'');
//Code.Remove.end
...
//Code.Remove.begin
IF QtyNeeded > 0 THEN
ERROR(Text053,SalesLine2."No.");
//Code.Remove.end
UNTIL SalesLine2.NEXT = 0;
...
After:
- Code:
...
SalesLine2.SETRANGE(Type,SalesLine2.Type::"Charge (Item)");
IF SalesLine2.ISEMPTY THEN
...
UNTIL ItemChargeAssgntSales.NEXT = 0;
//Code.Add.begin
IF SalesLine2."Qty. to Invoice" <> 0 THEN BEGIN
SalesLine.TESTFIELD("Job No.",'');
//Code.Add.end
...
//Code.Add.begin
IF QtyNeeded > 0 THEN
ERROR(Text053,SalesLine2."No.");
END;
//Code.Add.end
UNTIL SalesLine2.NEXT = 0;
...
Testen konnte ich die Lösung aus Zeitgründen noch nicht, aber ich werden Bescheid geben welche Erfahrungen ich damit gemacht habe.
Viele Grüße
Lars
15. März 2013 09:47
15. März 2013 09:52
Mahi hat geschrieben:Gibt es dazu inzwischen einen KB-Artikel?
15. März 2013 10:37