project QadFinancials > class BEmployee > method InitialValues

Description

Add code here to initialize the calculated fields of a 'new' record (= a record that must be created in the application database) in a class temp-table.


Parameters


icTableNameinputcharacterName of the database table of which a record is created in the class temp-table.
oiReturnStatusoutputinteger


Internal usage


unused


program code (program/bemployee.p)

<ANCESTOR-CODE>

/* Employee */
if icTableName = "Employee":U
then do:         
    assign tEmployee.Company_ID                  = viCompanyId
           tEmployee.EmployeeIsActive            = true
           /* hide project functionality : give it false as initial value iso true */
           tEmployee.EmployeeIsActiveExpNotes    = false
           tEmployee.EmployeeIsActiveTimeReg     = false
           tEmployee.EmployeeIsExternal          = false
           tEmployee.Currency_ID                 = viCompanyLCId
           tEmployee.EmployeeIsUser              = false
           tEmployee.EmployeeStartDate           = today
           tEmployee.tlBusinessRelationIsInterco = no.
end.
/* HPF
/* Employee Regulation */
else if icTableName = "EmployeeRegulation":U
then do:
    find bEmployee where
         bEmployee.tc_Rowid = tEmployeeRegulation.tc_ParentRowid no-error.
    if available bEmployee
    then assign tEmployeeRegulation.EmployeeRegulationValFrom = bEmployee.EmployeeStartDate.
end.
*/