...
PROCEDURE UpdateItemChargeAssgnt@5807();
VAR
ShareOfVAT@1000 : Decimal;
BEGIN
// Delete the following lines.
CALCFIELDS("Qty. Assigned");
IF "Quantity Invoiced" > "Qty. Assigned" THEN
ERROR(Text032,FIELDCAPTION("Quantity Invoiced"),FIELDCAPTION("Qty. Assigned"));
// End of the deleted lines.
ItemChargeAssgntPurch.RESET;
ItemChargeAssgntPurch.SETRANGE("Document Type","Document Type");
ItemChargeAssgntPurch.SETRANGE("Document No.","Document No.");
ItemChargeAssgntPurch.SETRANGE("Document Line No.","Line No.");
IF (CurrFieldNo <> 0) AND ("Unit Cost" <> xRec."Unit Cost") THEN BEGIN
...
...
PROCEDURE UpdateItemChargeAssgnt@5807();
VAR
ShareOfVAT@1000 : Decimal;
BEGIN
// Add the following lines.
IF "Document Type" <> "Document Type"::"Blanket Order" THEN BEGIN
CALCFIELDS("Qty. Assigned","Qty. to Assign");
IF ABS("Quantity Invoiced") > ABS(("Qty. Assigned" + "Qty. to Assign")) THEN
ERROR(Text054,FIELDCAPTION("Quantity Invoiced"),FIELDCAPTION("Qty. Assigned"),FIELDCAPTION("Qty. to Assign"));
END;
// End of the added lines.
ItemChargeAssgntPurch.RESET;
ItemChargeAssgntPurch.SETRANGE("Document Type","Document Type");
ItemChargeAssgntPurch.SETRANGE("Document No.","Document No.");
ItemChargeAssgntPurch.SETRANGE("Document Line No.","Line No.");
IF (CurrFieldNo <> 0) AND ("Unit Cost" <> xRec."Unit Cost") THEN BEGIN
...