Skip to end of banner
Go to start of banner

Payroll Summary (historical period)

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

Summary

The view provides an overview of payments for the historical payroll periods.

Keywords

Payroll, Payments

Category

Analytical View

Description

The view provides an overview of payments for the historical payroll periods.

Main Data Selection

All the crew members have payments within the historical payroll periods. Only calculatedamount1 is considered by this view.

Setup and Configuration

SQL statement

 SQL statement
select 
	pyh.PIN,
	p01.Name,
	persorg.name as Organization,
	pyh.accountdim2 as VesOrgID,
	isnull(ves.name, 'N/A') as 'Vessel Name',
	case when pyh.ACCOUNTDIM3 is NULL or pyh.ACCOUNTDIM3='' then 'N/A'
		else pyh.ACCOUNTDIM3
	end 'Department',
	isnull(CAT.NAME, 'Other') as 'Category',
	Cast(Replace(Case when pyh.ENTRYFIELD2 = '' Then '0' Else pyh.ENTRYFIELD2 End,',','.') as float) as Days,
	Case When pyh.entryfield3 = '' Then 0
		Else Round((dbo.ad_StrToFloat(RIGHT(pyh.entryfield3, LEN(pyh.entryfield3) - PATINDEX('%[0-9]%', pyh.entryfield3) + 1))),2)
	End as 'Daily Rate',
	pyh.periodeused as Period,
	CONVERT(VARCHAR,pyh.ENTRYCODE) + ' ' + EC.TEXT AS 'Entry Code',
	pyh.calculatedamount1 'Amount' ,
	pyh.payscaletable as 'Pay Scale Table',
	pyh.payscalecode as 'Pay Scale Code',
	pyh.rank as Rank,
	pyh.currencyforpayment as 'Currency for Payment',
	pyh.currencyrateforpayment 'Currency Rate for Payment',
	p01.client numorgid,
	p01.employmentstartdate,
	p01.employmentenddate
from 
pw001pyh pyh
left join pw001p01 p01 on p01.pin=pyh.pin
left join pworg ves on ves.numorgid=pyh.accountdim2
left join pyety001 ec on ec.entrycode=pyh.entrycode
left join pworg persorg on persorg.numorgid=p01.client
left join PW001C117 CAT on ec.CATEGORY=CAT.SEQUENCENO and pyh.ENTRYCODE=ec.ENTRYCODE
--left join pw001p03 p03 on p03.SEQUENCENO=pyh.ACTIVITYSEQ
--left join pw001c12 c12 on c12.CODE=p03.CODE
--LEFT JOIN dbo.PWORG DEP ON DEP.NUMORGID = dbo.ad_scanorgtree(P03.NUMORGID, 4)
--LEFT JOIN dbo.PWORG POS ON POS.NUMORGID = dbo.ad_scanorgtree(P03.NUMORGID, 5)

Fields Definition

View Configuration (Column/Raw/Data Fields)

Rows/ Columns Specification

Row/Column

Description/ Location in APM

PIN

The PIN from the Personal Details.

Name

The Full Name from the Personal Details.

Organization

The Employment Organization from the Personal Details.

VesOrgID

The ID of the vessel linked to the payment entry in Account Dim 2.

Vessel Name

The Name of the vessel linked to the payment entry Account Dim 2.

Department

The Code of the department linked to the payment entry Account Dim 3.

Category

The category of the payment entry.

Days/Quantity

The days (Entry Field 2) of the payment entry.

Rate

The rate (Entry Field 3) of the payment entry.

Period

The period of the payment entry.

Entry Code

The Code of the payment entry.

Amount

The Amount (Entry Field 1) value of the payment entry.

Payscale Table

The payscale table of the payment entry.

Payscale Code

The payscale code of the payment entry.

Rank

The Name of the rank linked to the payment entry.

Payment Currency

The payment currency of the payment entry.

Payment Currency Rate

The exchange rate of the payment entry.

numorgid

The emplyment organization ID from the Personal Details.

employmentstratdate

The emplyment start date from the Personal Details.

employmentenddate

The emplyment end date from the Personal Details.

Other

  • No labels