...
Page Properties |
---|
Summary | The view is used for accounting purposes. It gives an overview of the payments for historical periods split by accounts debit and credit. |
---|
Keywords | Payroll, Accounting |
---|
Category | Analytical View |
---|
|
Description
The view is used for accounting purposes. It gives an overview of the payments for historical periods split by accounts debit and credit.
Main Data Selection
All the crew members have some payments in history. Only calculatedamount1 is considered by this view.
Setup and Configuration
SQL statement
Expand |
---|
|
Code Block |
---|
selectSELECT
pyh.PIN,
p01.Name,
persorg.name as AS Organization,
pyh.accountdim2 as AS VesOrgID,
isnull ISNULL(ves.name, 'N/A') as AS 'Vessel Name',
case when
CASE
WHEN pyh.ACCOUNTDIM3 isIS NULL orOR pyh.ACCOUNTDIM3 = '' thenTHEN 'N/A'
else
ELSE pyh.ACCOUNTDIM3
end
END 'Department',
isnull
ISNULL(CAT.NAME, 'Other') asAS 'Category',
pyh.calculatedamount1 'Amount' ,
,
pyh.periodeused as AS Period,
CONVERT(VARCHAR, pyh.ENTRYCODE) + ' ' + EC.TEXT AS 'Entry Code',
case when pyh.ACCOUNTNOOFCALCAMOUNT1<>
CASE
WHEN pyh.ACCOUNTNOOFCALCAMOUNT1 <> '' THEN pyh.ACCOUNTNOOFCALCAMOUNT1 + ' - ' + acc.ACCOUNTTEXT
when WHEN pyh.ACCOUNTNOOFCALCAMOUNTCREDIT1<>ACCOUNTNOOFCALCAMOUNTCREDIT1 <> '' THEN pyh.ACCOUNTNOOFCALCAMOUNTCREDIT1 + ' - ' + acc.ACCOUNTTEXT
end END 'Account No',
case when pyh.ACCOUNTNOOFCALCAMOUNT1<>0
CASE
WHEN pyh.ACCOUNTNOOFCALCAMOUNT1 <> '' THEN 'DEBIT'
when
WHEN pyh.ACCOUNTNOOFCALCAMOUNTCREDIT1<>0ACCOUNTNOOFCALCAMOUNTCREDIT1 <> '' THEN 'CREDIT'
else
ELSE 'N/A'
end END 'Account type',
pyh.rank as Rank,
AS RANK,
pyh.currencyforpayment as AS 'Currency for Payment',
p01.client numorgid,
p01.employmentstartdate,
p01.employmentenddate
fromFROM pw001pyh pyh
left join
LEFT JOIN pw001p01 p01 on
ON p01.pin = pyh.pin
left join
LEFT JOIN pworg ves on
ON ves.numorgid = pyh.accountdim2
left join
LEFT JOIN pyety001 ec on
ON ec.entrycode = pyh.entrycode
left join
LEFT JOIN pworg persorg on
ON persorg.numorgid = p01.client
left join LEFT JOIN PW001C117 CAT on
ON ec.CATEGORY = CAT.SEQUENCENO
and AND pyh.ENTRYCODE = ec.ENTRYCODE
left join
LEFT JOIN PY001ACC ACC on
ON (ACC.ACCOUNTNO = pyh.ACCOUNTNOOFCALCAMOUNT1) orOR (acc.ACCOUNTNO = pyh.ACCOUNTNOOFCALCAMOUNTCREDIT1)
where CALCULATEDAMOUNT1<>0WHERE CALCULATEDAMOUNT1 <> 0 |
|
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. |
Amount | The Amount (Entry Field 1) value of the payment entry. |
Period | The Period of the payment entry. |
Entry Code | The Code of payment entry. |
Account No | The account number of calculatedamount1 on the payment entry. |
Account Type | The account type of calculatedamount1 on the - either debit or credit. |
Rank | The Name of the rank linked to the payment entry. |
Payment Currency | The payment currency 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
N/A