Codeblock Onlinehilfe

TBeFinancialAccountingTransferBC

TBeFinancialAccountingTransferBC

Die Klasse TBeFinancialAccountingTransferBC kapselt Methoden und Eigenschaften um Fibu-Buchungen zu erstellen.

Eigenschaften

Eigenschaften

Beschreibung

CbBeFinancialAccountingTO:O

Transferobjekt für die Fibuübergabe

Methoden

Methode

Parameter

Beschreibung

CbInitializeFinancialAccountingTO

Methode zur Initialisierung eines Fibu-Transferobjektes.



CbNew

Die Methode löst das Event "bei Aufbereitung der FiBu-Übergabe-Information" aus und konsolidiert ggf. das Konto-Array. Danach wird das aBeFinancialAccountingTransferBO in den Einfügemodus versetzt

aBeFinancialAccountingTransferBO:O

Objekt vom Typ TBeFinancialAccountingTransferBO

CbPost

Die Eigentschaften des TBeFinancialAccountingTO werden validiert und es wird das Event "vor dem Speichern durch den BC" ausgelöst. Danach wird das aBeFinancialAccountingTransferBO gespeichert.

aBeFinancialAccountingTransferBO:O

Objekt vom Typ TBeFinancialAccountingTransferBO

Verfügbare Ereignisse

Ereignis

Beschreibung

bei Aufbereitung der FiBu-Übergabe-Information

Aufruf erfolgt bei der Übertragung der Daten vom Fibu-Transfer-Objekt in das Fibu-Bussines-Objekt. Über das Info-Objekt kann auf das Transfer-Objekt (oInfo.CbFinancialAccountingTO) zugegriffen werden. Über die Eigenschaft CbFinancialAccountingTO.CbAccountingArrayConsolidationNeeded kann gesteuer werden, ob das Konto-Array konsolidiert wird. Außerdem kann mit der Eigenschaft CbFinancialAccountingTO.CbIndividualBookingInformation eine beliebige Information verwahrt werden, die vor dem Speichern zur Verfügung steht.

vor dem Speichern

Aufruf erfolgt vor dem Speichern durch den Fibu-Übergabe-Business-Controller. Über das Info-Objekt kann lesend auf ein Fibu-Transfer-Objekt (oInfo.CbFinancialAccountingTO) zugegriffen werden. In diesem Event dürfen keine Eigenschaften des CbFinancialAccountingTO gesetzt werden. Über die Eigenschaft CbFinancialAccoutingTO.CbIndividualBookingInformation kann auf die zusätzlichen Informationen die in dem Event "bei Aufbereitung der FiBu-Übergabe-Information" festgelegt wurden, zugegriffen werden.

Beispiel

| oDataModule, oBeFinancialAccountingBC, oBeFinancialAccountingBO, oBeFinancialAccountingTO |

oDataModule := CreateObject('TBeDBGet', 'FIBU_DM'),
startseq
   oBeFinancialAccountingBC := CreateObject('TBeFinancialAccountingTransferBC', 'FIBU_BC'),
   startseq
      oBeFinancialAccountingBO := CreateObject('TBeFinancialAccountingTransferBO', 'FIBU_BO'),
      startseq
         // Der BusinessController und das BusinessObject müssen das gleichen
         // Datenmodul haben
         oBeFinancialAccountingBC.CbDataModule := oDataModule,
         oBeFinancialAccountingBO.CbDataModule := oDataModule,

         // Das TransferObjekt initialsieren und zuweisen
         oBeFinancialAccountingBC.CbInitializeFinancialAccountingTO(),
         oBeFinancialAccountingTO := oBeFinancialAccountingBC.CbBeFinancialAccountingTO,

         // Buchungsdaten zuweisen
         oBeFinancialAccountingTO.CbDate              := Date(),
         oBeFinancialAccountingTO.CbVoucherNo         := 123456,
         oBeFinancialAccountingTO.CbInternalVoucherNo := 999999,
         oBeFinancialAccountingTO.CbAccountingText    := 'INDIVIDUELLE CB-BUCHUNG',
         oBeFinancialAccountingTO.CbAccountArray      := ArrToStr({{'E', 4711, 2, 0, 35,   {364}, 2, 'Verkauf Halteträger'},
                                                                   {'W', 4711, 1, 0, 0.99, {364}, 2, ''}}),
         // keine Konsoldierung notwendig, da nur ein Eintrag in dem Array vorhanden ist
         oBeFinancialAccountingTO.CbAccountingArrayConsolidationNeeded := False,

         // Fibu-Buchung durchführen
         oBeFinancialAccountingBC.CbNew(oBeFinancialAccountingBO),  // Event "bei Aufbereitung der FiBu-Übergabe-Information" wird ausgelöst
         oBeFinancialAccountingBC.CbPost(oBeFinancialAccountingBO), // Event "vor dem Speichern" wird ausgelöst
      always
         DestroyObject(oBeFinancialAccountingBO),
      stopseq,
   always
      DestroyObject(oBeFinancialAccountingBC),
   stopseq,
always
   DestroyObject(oDataModule),
stopseq,