...
Text13611@13611 : TextConst 'ENU=The posting has been interrupted to respect the warning.';
Text13612@1101100009 : TextConst 'ENU=The %1 %2 contains lines in which the %3 is empty. This is not allowed for an OIOUBL document which might be created from the posted document.';
// Delete the following line.
Text000@1101100010 : TextConst 'ENU=The total amount cannot be negative. To post a refund, create a credit memo.';
LOCAL PROCEDURE ReadCompanyInfo@1101100003();
...
...
Text13611@13611 : TextConst 'ENU=The posting has been interrupted to respect the warning.';
Text13612@1101100009 : TextConst 'ENU=The %1 %2 contains lines in which the %3 is empty. This is not allowed for an OIOUBL document which might be created from the posted document.';
// Add the following line.
Text000@1101100010 : TextConst 'ENU=cannot be negative';
LOCAL PROCEDURE ReadCompanyInfo@1101100003();
...
...
SalesLine@1060001 : Record 37;
EmptyLineFound@1060002 : Boolean;
// Delete the following line.
LineAmount@1060003 : Decimal;
BEGIN
...
...
SalesLine@1060001 : Record 37;
EmptyLineFound@1060002 : Boolean;
// Add the following lines.
TotalLineAmount@1060003 : Decimal;
TotalLineDiscountAmount@1060004 : Decimal;
// End of the lines.
BEGIN
...
...
EmptyLineFound := FALSE;
// Delete the following line.
CLEAR(LineAmount);
WITH SalesLine DO BEGIN
RESET;
...
...
EmptyLineFound := FALSE;
// Add the following lines.
TotalLineDiscountAmount := 0;
TotalLineAmount := 0;
// End of the lines.
WITH SalesLine DO BEGIN
RESET;
...
...
SETRANGE("Document Type",SalesHeader."Document Type");
SETRANGE("Document No.",SalesHeader."No.");
IF FIND('-') THEN
REPEAT
IF (Type <> Type::" ") AND ("No." <> '') AND ("Unit of Measure" = '') THEN
ERROR(Text13612,"Document Type","Document No.",FIELDCAPTION("Unit of Measure"));
IF Description = '' THEN
IF (Type <> Type::" ") AND ("No." <> '') THEN
ERROR(Text13608,"Document Type","Document No.",
FIELDCAPTION(Type),FIELDCAPTION("No."),FIELDCAPTION(Description));
// Delete the following lines.
LineAmount += "Line Amount";
IF (Type = Type::" ") OR ("No." = '')
THEN EmptyLineFound := TRUE;
UNTIL (NEXT = 0);
IF LineAmount < 0 THEN
ERROR(Text000);
// End of the lines.
...
...
SETRANGE("Document Type",SalesHeader."Document Type");
SETRANGE("Document No.",SalesHeader."No.");
IF FIND('-') THEN
REPEAT
IF (Type <> Type::" ") AND ("No." <> '') AND ("Unit of Measure" = '') THEN
ERROR(Text13612,"Document Type","Document No.",FIELDCAPTION("Unit of Measure"));
IF Description = '' THEN
IF (Type <> Type::" ") AND ("No." <> '') THEN
ERROR(Text13608,"Document Type","Document No.",
FIELDCAPTION(Type),FIELDCAPTION("No."),FIELDCAPTION(Description));
// Add the following lines.
TotalLineAmount += "Line Amount";
TotalLineDiscountAmount += "Line Discount Amount";
IF (Type = Type::" ") OR ("No." = '')
THEN EmptyLineFound := TRUE;
IF "Line Discount %" < 0 THEN
FIELDERROR("Line Discount %",Text000);
UNTIL (NEXT = 0);
IF TotalLineAmount < 0 THEN
ERROR(Text001);
IF TotalLineDiscountAmount < 0 THEN
ERROR(Text002);
// End of the lines.
...