Skip to content

zatwierdzenie dokumentów

Są 3 scenariusze

  1. zatweirdzenie zwyklego dokumentu - mozna za pomocą sql
  2. zatwierdzenie przesuniecia mm - tylk przez system (nowa wersja sql)
  3. zatweirdzenie korekty - tylko przez system
SQL
1
2
3
4
5
6
Begin transaction tran

EXEC [document].[document_udpateDocumentStatus] @username = 'sys',
 @documentId = @documentId, @newStatus = 1, @skipInventoryValidation = @skipInventoryValidation

Rollback transaction tran

Zgłoszenia przykładowe

Zgłoszenie: Komunikat: NIE MOŻNA SKORYGOWAĆ Z POWODU ROZCHODÓW -55.93 1.000 -55.93 DOCUMENT.DOCUMENTLINE_INSERTUPDATE #error.documentLine.cannotCorrectDocumentOverItsQuantityOutcomes

algorytm

Korekta ilościowa algorytm

1.Przykład: Zmiana pozycji z 1 na 0

SQL
exec document.documentLine_InsertUpdate @inputxml=N'<root><item remoteid="05e83aff-ed13-ee11-959f-d89d6719e0cb" remotesource="documentLine"><col name="Id">9c363414-2114-ee11-959f-d89d6719e0cb</col><col name="documentLineID">9c363414-2114-ee11-959f-d89d6719e0cb</col><col name="documentID">05e83aff-ed13-ee11-959f-d89d6719e0cb</col><col name="sourceDocumentLineID">602166a0-75ea-ed11-959c-d89d6719e0c9</col><col name="isCorrectiveLine">True</col><col name="documentNR">0</col><col name="documentMonth">0</col><col name="itemID">29e96a88-36e3-ed11-959b-d89d6719e0cb</col><col name="itemQuantity">0</col><col name="itemQuantityLeft">0</col><col name="itemPrice">55.9300</col><col name="itemValueLeft">0</col><col name="dontRecalculateItemValue">False</col><col name="locationId">2d9b6f5e-3259-419a-82a5-38f5fc77a0bc</col><col name="sign">0</col><col name="status">0</col><col name="documentOrdinalNumber">1</col><col name="commisionLineSelectionMode">0</col><col name="value">0</col><col name="itemConvertQuantity">0</col><col name="itemConvertPrice">0</col><col name="documentDate">0001-01-01 00:00:00</col><col name="edited">True</col><col name="itemSelectionMode">0</col><col name="initialSourceDocumentLineId">d9ee11ae-37e3-ed11-959b-d89d6719e0cb</col><col name="correctedItemQuantity">0</col><col name="correctedItemPrice">0</col><col name="correctedItemValue">0</col><col name="manualMode">False</col><col name="isManuallyRealized">False</col><col name="skipQuantityDraftCheck">False</col></item></root>',@username=N'm.kotynia'