Skip to end of banner
Go to start of banner

Accounting Summary (current 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 6 Current »

Summary

The view is used for accounting purposes. It gives an overview of the current period payments 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 current period payments split by accounts debit and credit.

Main Data Selection

All the crew members have some payments this month. Only calculatedamount1 is considered by this view.

Setup and Configuration

SQL statement

 SQL statement
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',
       pay.CALCULATEDAMOUNT1      AS 'Amount',
       pay.periodeused            AS Period,
       CONVERT(VARCHAR, PAY.ENTRYCODE) + ' ' + EC.TEXT AS 'Entry Code',
       CASE 
            WHEN pay.ACCOUNTNOOFCALCAMOUNT1 <> '' THEN pay.ACCOUNTNOOFCALCAMOUNT1 + ' - ' + acc.ACCOUNTTEXT
            WHEN pay.ACCOUNTNOOFCALCAMOUNTCREDIT1 <> '' THEN pay.ACCOUNTNOOFCALCAMOUNTCREDIT1 + ' - ' + acc.ACCOUNTTEXT
       END 'Account No',
       CASE 
            WHEN pay.ACCOUNTNOOFCALCAMOUNT1 <> '0' THEN 'DEBIT'
            WHEN pay.ACCOUNTNOOFCALCAMOUNTCREDIT1 <> '0' THEN 'CREDIT'
            ELSE                     'N/A'
       END 'Account type',
       pay.rank                   AS RANK,
       pay.currencyforpayment     AS 'Payment Currency ',
       p01.client                    numorgid,
       p01.employmentstartdate,
       p01.employmentenddate
FROM   pw001pay pay
       LEFT JOIN pw001p01 p01
            ON  p01.pin = pay.pin
            AND CALCULATEDAMOUNT1 <> 0
       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 PY001ACC ACC
            ON  (ACC.ACCOUNTNO = pay.ACCOUNTNOOFCALCAMOUNT1) OR (acc.ACCOUNTNO = pay.ACCOUNTNOOFCALCAMOUNTCREDIT1)
WHERE  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.

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

  • No labels