...
ELSE
InvoicedQty := ValueEntry."Valued Quantity";
END ELSE
InvoicedQty := ValueEntry."Invoiced Quantity";
CalcExpectedCost(
ItemLedgEntry."Entry No.",
InvoicedQty,
ItemLedgEntry.Quantity,
ValueEntry."Cost Amount (Expected)",
ValueEntry."Cost Amount (Expected) (ACY)",
ValueEntry."Sales Amount (Expected)",
ValueEntry."Purchase Amount (Expected)",
ItemLedgEntry.Quantity = ItemLedgEntry."Invoiced Quantity");
// Delete the following lines.
IF (InvdValueEntry."Cost Amount (Expected)" <>0) AND (ValueEntry."Cost Amount (Expected)" <> 0) THEN
ValueEntry."Cost Amount (Expected)" :=
ValueEntry."Cost Amount (Expected)" - InvdValueEntry."Cost Amount (Expected)";
IF (InvdValueEntry."Cost Amount (Expected) (ACY)" <> 0) AND (ValueEntry."Cost Amount (Expected) (ACY)"<>0) THEN
ValueEntry."Cost Amount (Expected) (ACY)" :=
ValueEntry."Cost Amount (Expected) (ACY)" - InvdValueEntry."Cost Amount (Expected) (ACY)";
// End of the deleted lines.
END;
IF ValueEntry.Inventoriable THEN
PostInventoryToGL(ValueEntry);
IF ItemLedgEntry."Job No." <> '' THEN BEGIN
...
...
ELSE
InvoicedQty := ValueEntry."Valued Quantity";
END ELSE
InvoicedQty := ValueEntry."Invoiced Quantity";
CalcExpectedCost(
// Add the following line.
ValueEntry,
// End of the added line.
ItemLedgEntry."Entry No.",
InvoicedQty,
ItemLedgEntry.Quantity,
ValueEntry."Cost Amount (Expected)",
ValueEntry."Cost Amount (Expected) (ACY)",
ValueEntry."Sales Amount (Expected)",
ValueEntry."Purchase Amount (Expected)",
ItemLedgEntry.Quantity = ItemLedgEntry."Invoiced Quantity");
END;
IF ValueEntry.Inventoriable THEN
PostInventoryToGL(ValueEntry);
IF ItemLedgEntry."Job No." <> '' THEN BEGIN
...
...
ELSE
InvoicedQty := ValueEntry."Valued Quantity";
END ELSE
InvoicedQty := ValueEntry."Invoiced Quantity";
IF NOT Kitting THEN BEGIN
CalcExpectedCost(
ItemLedgEntry."Entry No.",
InvoicedQty,
ItemLedgEntry.Quantity,
ValueEntry."Cost Amount (Expected)",
ValueEntry."Cost Amount (Expected) (ACY)",
ValueEntry."Sales Amount (Expected)",
ValueEntry."Purchase Amount (Expected)",
ItemLedgEntry.Quantity = ItemLedgEntry."Invoiced Quantity");
// Delete the following lines.
IF (InvdValueEntry."Cost Amount (Expected)" <>0) AND (ValueEntry."Cost Amount (Expected)" <>0) THEN
ValueEntry."Cost Amount (Expected)" :=
ValueEntry."Cost Amount (Expected)" - InvdValueEntry."Cost Amount (Expected)";
IF (InvdValueEntry."Cost Amount (Expected) (ACY)" <> 0) AND (ValueEntry."Cost Amount (Expected) (ACY)" <> 0) THEN
ValueEntry."Cost Amount (Expected) (ACY)" :=
ValueEntry."Cost Amount (Expected) (ACY)" - InvdValueEntry."Cost Amount (Expected) (ACY)";
// End of the deleted lines.
END;
END;
IF ValueEntry.Inventoriable THEN
PostInventoryToGL(ValueEntry);
IF ItemLedgEntry."Job No." <>'' THEN BEGIN
...
...
ELSE
InvoicedQty := ValueEntry."Valued Quantity";
END ELSE
InvoicedQty := ValueEntry."Invoiced Quantity";
IF NOT Kitting THEN BEGIN
CalcExpectedCost(
// Add the following line.
ValueEntry,
// End of the added line.
ItemLedgEntry."Entry No.",
InvoicedQty,
ItemLedgEntry.Quantity,
ValueEntry."Cost Amount (Expected)",
ValueEntry."Cost Amount (Expected) (ACY)",
ValueEntry."Sales Amount (Expected)",
ValueEntry."Purchase Amount (Expected)",
ItemLedgEntry.Quantity = ItemLedgEntry."Invoiced Quantity");
END;
END;
IF ValueEntry.Inventoriable THEN
PostInventoryToGL(ValueEntry);
IF ItemLedgEntry."Job No."<>'' THEN BEGIN
...