Procedura-UpdateDocRef

Popis:
Aktualizuje interní referenci na doklady

Parametry:

NázevPopisDatový typ
IN_OldDocumentTypeVarChar(2)
IN_NewDocumentTypeVarChar(2)
IN_OldIDChar(10)
IN_NewIDChar(10)

Závislosti:

NázevPopisTřída
DecDocRefSníží interní referenci na použitý dokladProcedures
IncDocRefZvýší interní referenci na použitý dokladProcedures

Tělo:

BEGIN
  if ((IN_NewID <> IN_OldID) or (IN_OldDocumentType <> IN_NewDocumentType) or
    (IN_NewID is null and IN_OldID is not null) or
    (IN_NewID is not null and IN_OldID is null)) then begin
    execute procedure DecDocRef(IN_OldDocumentType, IN_OldID);
    execute procedure IncDocRef(IN_NewDocumentType, IN_NewID);
  end
END;

Generated by ABRA Software a.s. 27.10.2021 16:34:18