CalculationRegisterRecordSet.<Calculation register name>.GetAddition
Syntax:
Returned value:
Description:
An addition is the data that the system provides to add to the current record set. This allows you to increase the actual action period of the current records by saving due to previous registration period records reversing (if necessary). The provided additional reversing entries are generated based on the action periods of the calculation register records and action period competition rules which are set by excluding the calculation type lists in the register's chart of calculation types.
It is necessary to get an addition if you try to enter an accounting record with the action period that is occupied by another record which has a registration period that is smaller than by yours.
Fields of the obtained values table are filled with records being reversed, data and additional data: reversing entry registration period (period that is recommended for reversing entry registration), reversing period start and end dates (period that is recommended to set as the reversing entry action period).
Availability:
Example:
// code is located in the document module RegisterOfCharge = "MainChargesForEmployess"; Query = New Query; // set query parameters Query.SetParameter("DocumentRef" , Ref); Query.Text = " |SELECT | Date, | RegistrationPeriod, | Organization, | Ref |FROM | Document." + Metadata().Description + " |WHERE | Ref = &DocumentRef |"; SelectionByDocHeader = Query.Execute().Choose(); Selection = GenerateQueryUnderTaxes().Choose(); While Selection.Next() Do // check next tabular section row CheckFilling (SelectionByDocHeader, Selection, Cancel); If NOT Cancel Then // register it in the information register Movement = Movements.EstimatedTax13.Add(); // generate properties // ... // generate dimensions // ... EndIf; EndDo; If NOT Cancel Then // Receive addtirional records with a flag of reversed entry, // which need to be added into current set in order // to get maximum actual action period // in a result of saving ReversingEntryRecords = Movements[RegisterOfCharge].GetAddition(); For each NLine In ReversingEntryRecords Do Movement = Movements[RegisterName].Add(); // generate properties Movement.Recorder = SelectionByDocHeader.Ref; // ... // generate dimensions // ... // generate resources // ... // generate attributes Movement.Line = NLine.Line; Movement.Size = NLine.Size; // ... EndDo; EndIf; // write generated register records MovementsOfRegisterSet = Movements[RegisterOfCharge]; MovementsOfRegisterSet.Write(); |
See also: