Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
Kannte ich bisher noch gar nicht.Wenn sie den Belegmatchcode in den Belegen noch nicht anderweitig verwenden, können sie diesen aber für diesen Zweck heranziehen. Dieser wird nämlich in das ziemlich unterschätze Feld "Kundeninformation" des OP's bei Übergabe an die Fibu hineinkopiert.
Create OR Alter Trigger [dbo].[TRU_OPH_Kundeninformationen]
On [dbo].[KHKVKBelege] for Update
As
SET NOCOUNT ON
If Update(FibuTan)
Begin
Declare
@Tan as int,
@Matchcode varchar(50),
@Mandant as int
Set @Tan=(Select Top 1 [FibuTan] From inserted)
Set @Mandant=(Select Top 1 [Mandant] From inserted)
Set @Matchcode=(Select Top 1 Matchcode From inserted)
If @Tan > 0 And @Matchcode Is Not Null
Begin
Update KHKOpHauptsatz Set Kundeninformation = @Matchcode
Where [Mandant] = @Mandant And
[Tan] = @Tan And
[Kundeninformation] is Null
End
End
GO