Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Page Properties

Summary

The view provides an overview of payments for the current payroll period.

Keywords

Payroll, Payments

Category

Analytical View

Description

The view provides an overview of payments for the current payroll period.

Main Data Selection

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

Setup and Configuration

SQL statement

Expand
titleSQL statement
Code Block
select 
	pay.PIN,
	p01.Name,
	persorg.name as Organization,
	pay.accountdim2 as VesOrgID,
	isnull(ves.name, 'N/A') as 'Vessel Name',
	case when pay.ACCOUNTDIM3 is NULL or pay.ACCOUNTDIM3='' then 'N/A'
		else pay.ACCOUNTDIM3
	end 'Department',
	isnull(CAT.NAME, 'Other') as 'Category',
	Cast(Replace(Case when pay.ENTRYFIELD2 = '' Then '0' Else pay.ENTRYFIELD2 End,',','.') as float) as 'Days/Quantity',
	Case When pay.entryfield3 = '' Then 0
		Else Round((dbo.ad_StrToFloat(RIGHT(pay.entryfield3, LEN(pay.entryfield3) - PATINDEX('%[0-9]%', pay.entryfield3) + 1))),2)
	End as 'Rate',
	pay.periodeused as Period,
	CONVERT(VARCHAR,PAY.ENTRYCODE) + ' ' + EC.TEXT AS 'Entry Code',
	pay.calculatedamount1 'Amount' ,
	pay.payscaletable as 'PayScale Table',
	pay.payscalecode as 'PayScale Code',
	pay.rank as Rank,
	pay.currencyforpayment as 'Payment Currency ',
	pay.currencyrateforpayment 'Payment Currency Rate',
	p01.client numorgid,
	p01.employmentstartdate,
	p01.employmentenddate
from 
pw001pay pay
left join pw001p01 p01 on p01.pin=pay.pin
left join pworg ves on ves.numorgid=pay.accountdim2
left join pyety001 ec on ec.entrycode=pay.entrycode
left join pworg persorg on persorg.numorgid=p01.client 
left join PW001C117 CAT on ec.CATEGORY=CAT.SEQUENCENO and pay.ENTRYCODE=ec.ENTRYCODE
--left join pw001p03 p03 on p03.SEQUENCENO=pay.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.

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