Payslip Object

Manages the maintenance of a Payslip, and calculates a pay.
Property Description
CalculateCash (Property, Value, Priority, Property2, Value2) Currency - calculates the total cash of all pay items in the current payslip that have the specified property and value and have a priority less than that specified. If Property2 and Value2 are specified, the pay items include must also have the second property value.
CalculateMethodCash (CalcMethod) Currency - calculates the total cash of all pay items in the current payslip that have the specified calc method.
CalculateMethodUnits (CalcMethod) Currency - calculates the total units of all pay items in the current payslip that have the specified calc method.
CalculateUnits (Property, Value, Priority) Currency - calculates the total units of all pay items in the current payslip that have the specified property and value and have a priority less than that specified.
CostCodeId Long - database identifier for the cost code associated with this item
Deductions Currency - the total cash value of deductions within this payslip.
DepartmentId Long - database identifier for the department associated with this item
EEInd (NZ) Boolean - true if this payslip has extra emolument calculated at the higher rate
FirstName String - payee's first name (read only)
FullName String - payee's ful name (lastname, first names)
Gross Currency - the total cash value of all non benefit and non deduction pay items within this payslip.
Id Long - database identifier for this item (read only)
IsDeleted True/False - item has been flagged for deletion
IsDirty True/False - item has been modified but not saved yet
IsEditing True/false - item is in the process of being edited
IsNew True/false - item is new and has not been saved
IsValid True/false - indicates if the item has any errors
LastName String - payee's last name (read only)
Message String - message to payee to be printed on pay advice
NumPer Currency - number of tax periods that this pay covers. Used to average tax calculated.
Benefit Currency - the total cash value of all benefit pay items within this payslip.
PaidTo Variant date - date to which payee has been paid by this payslip.
PayDate Variant date - date this pay paid. Effective date for pay rate and tax calculations.
Payee Payee object - reference to payee object. Required by pay calculations.
PayeeId Long - database record identifier of payee.
PayGroupId Long - database record identifier of pay group.
PayMethod Long - payment method for this payslip (defaults to payee pay method).
PayMethods Textlist object - containing a list of valid pay methods.
Payroll Payroll object - reference to payroll object. Required by pay calculations.
PaySeq Integer - sequence number of this pay within pay period.
PayslipItems Collection - of pay items that make up this pay.
PayType Long - this payslip's type (normal, adjustment, supplementary).
PayTypes textlist object - containing a list of valid pay types.
PeriodEnd Variant date - last day of pay period which is being paid by this payslip.
WksWorked Currency - number of weeks worked for this pay.

In order to apply any changes to an object, the BeginEdit method must be called setting any property values. To save the changes, call the ApplyEdit method, and to undo the changes call the CancelEdit method.

Method Description
AddCash (Property, Value, Cash) Adds the specified cash amount to any pay item in this payslip that has the specified property with the value.
ApplyEdit(Server, Connection) Saves the item in the database. Server is a string containing the name of the network server to provide the data, and Connection is the ADO connection string to establish a connection with the database on that server.
BeginEdit Prepares the item for updating.
CalculateTotals Recalculates the total gross, benefit and deductions of all pay items in the current payslip.
CancelEdit Reverses the changes in the current edit session and restores the state of the item to that preceding the last BeginEdit.
Delete Flags the item for deletion. The item will be deleted from the database when the next ApplyEdit is called. A Delete must be preceded by a BeginEdit.
FinaliseCalculation Adds any required statutory deductions to the payslip, recalculates all pay items, any net pay rounding and payslip totals of Gross, Benefit and Deductions .
Find (Server, Connection, PayeeId, PayDate, PayType, PaySeq) Loads into this object the data from the database for the payslip idendified by PayeeId, PayDate, PayType and PaySeq.
Load (Server, Connection, Id) Loads into this object the data from the database for the specified payslip database record id.
LoadLastNormal (Server, Connection, PayeeId, PeriodEnd) Loads into this object the data from the database for the specified payee and period end date.
LoadNormal (Server, Connection, PayeeId, PeriodEnd, PayslipId) Loads into this object the data from the database for the specified payee and period end date, where the payslip database record identifier is differnet fromthe specified id.
SetTemplate (Server, Connection, PayItemTemplate) Sets the properties of this pay item to those of the specified pay item template object
Totals (Server, Connection, TotalBy, Id, FromDate, ToDate) Calculates the payslip totals (gross, benefit, deductions) where TotalBy is Company, PayGroup or Payee and the Id is the databas record identifier for a specific Company, PayGroup or Payee.