DO NOT USE - ROS



[pic]

|Revenue Online Services |

Schema Notes

P45 (3) & P46 – version 2

|Last Updated |03/10/2016 |

|Document Version |0.6 |

Contents

Contents 2

0 Document Information 3

0.1 Synopsis 3

0.2 Change History 3

1 Schema Overview 5

2 Elements 6

2.1 P45P3File 6

2.2 Employer 6

2.3 P45P3 7

2.4 Employee 7

2.5 NewEmployment 8

2.6 PrevEmployment 9

2.7 USC 10

2.8 LPT 12

3 Appendix 1 – Sample xml file 13

Document Information

2.1 Synopsis

This document contains all the validation rules, which must be passed to enable a successful upload onto ROS for the New Employee Forms P45(3) and P46 conforming to version 2 of the schema.

This is a draft version and may be subject to further changes.

2.2 Change History

Table 1: Change History

|Version Number |Section Affected|Change Description |Date |

|0.1 (Draft) |ALL |Document created as a copy of the v1 schema notes document for P45(3) and P46 returns. |23/08/2011 |

| | | | |

| | |The following changes have been made: | |

| | |P45P3File/@formversion - updated the ‘fixed’ field to the value ‘2’ | |

| | |NewEmployment element | |

| | |[Updated] | |

| | |@unit to @works. This attribute stores the Payroll Works No so it has been renamed for | |

| | |clarity. | |

| | |P45P3File/@product - updated the ‘type’ field to ‘ros:string20’ | |

| | |P45P3File element | |

| | |[Added] | |

| | |+ USC element and its attributes | |

| | |Updated validation rules for the following attributes (these changes have been made in | |

| | |italics): | |

| | |+ Employee/@ppsn | |

| | |+ Employee/@surname | |

| | |+ Employee/@firstname | |

| | |+ Employee/@addressline1 | |

| | |+ Employee/@addressline2 | |

| | |+ Employee/@addressline3 | |

| | |+ Employee/@addressline4 | |

| | |+ NewEmployee/@datecommencement | |

| | |+ PrevEmployment/@datecommencement | |

| | |+ PrevEmployment/@taxa | |

| | |+ PrevEmployment/@payb | |

| | |+ PrevEmployment/@taxb | |

| | |Updated the following line relating to the P45P3File element: “It then consists of one | |

| | |Employer element and one or more P45P3 elements, up to a maximum of 300.” This maximum | |

| | |value has still to be finalised. | |

|0.2 |2.5 |Updated the following attribute: |22/09/2011 |

| | |@works | |

| | |Updated the Type to a Text String and removed the validation rule that this field must be | |

| | |an alpha-numeric. | |

| |2.3 | | |

| | |Added section ‘2.3 P45P3’ to document the attribute and elements of the P45P3 element. | |

|0.3 |2.6 |Updated the validation rules being applied to the following attributes in section 2.6: |12/10/2011 |

| | |@paya | |

| | |@taxa | |

| | |@payb | |

| | |@taxb | |

| | | | |

| | |Updated the validation rules being applied to the following attributes in section 2.7: | |

| | |@totalpaytodate | |

| |2.7 |@totalusctodate | |

| | |@totalpaythisemp | |

| | |@totaluscthisemp | |

|0.4 |ALL |Updated the following fields to allow them to support the new format registration numbers.| |

| | |The update involves a change to the regular expression used to determine if a number is | |

| | |valid. | |

| | | | |

| | |Change Details: | |

| | |Before: “[0-9]{7,8}[A-Wa-w][TWXtwx ]?” | |

| | |After: “[0-9]{7,8}[A-Wa-w][A-ITWXZa-itwxz ]?” | |

| | | | |

| | |Sample Numbers: | |

| | |Existing Format: 1234567T | |

| | |New Format: 1234567FA | |

| | | | |

| | |Section | |

| | |Field | |

| | | | |

| | |2.2 – Employer | |

| | |number | |

| | | | |

| | |2.4 – Employee | |

| | |ppsn | |

| | | | |

| | |3 – Sample File | |

| | |Updated to include some of the new format numbers | |

| | | | |

| | | | |

|0.5 |2.8 |Added LPT element and associated field “amount”. |19/03/2013 |

| | | | |

| |2.3 |Added LPT element to Table 5 – P45P3 elements. | |

| | | | |

| |3 |Added LPT element to sample xml. | |

|0.6 |2.5 |Increased options for pay frequencies i.e. fortnightly, four-weekly and other has been |03/10/2016 |

| | |included in list. | |

Schema Overview

This document contains all the validation rules, which must be passed to enable a successful upload onto ROS for version 2 of the New Employee Forms P45(3) and P46.

These include for each attribute or element:

- Correct data formats.

- Maximum and minimum values where applicable.

- Dependent attributes or elements – other elements that must not be null or other attributes for which values must be returned in certain circumstances.

All completed files must have the .p453 extension in the filename to upload successfully into ROS.

The file will consist of a root P45P3File element.

Please note:

• For P45(3) returns, the PPSN provided must previously exist on the Revenue system.

• The XML message must be encoded using UTF-8. The first line within the XML message must indicate this. Please see the Sample File in section Appendix 1 – Sample xml file.

• Revenue will use the JAXB API to marshal XML documents submitted to Revenue that conform to this schema. Therefore your XML submissions must strictly conform to the schema definition outlined in the XSD and it must not break any of the validation rules stated in this document in order for your submission to be successfully uploaded.

Elements

4.1 P45P3File

The P45P3File element has the following attributes:

Table 2 - P45P3File attributes

|Name |Type |Minimum Value/ |Maximum Value/ |Required (Y/N) |Description / Validation |

| | |Length |Length | | |

|product |Alpha Numeric |1 |20 |Y |Third party software product identifier. |

|formversion |Numeric |1 |1 |Y |Must be equal to ‘2’ for this version of |

| | | | | |the file format. Will change with each new |

| | | | | |edition of the form. |

|language |Text Character |1 |1 |Y |Must be E or G. E for English, G for Irish|

It then consists of one Employer element and one or more P45P3 elements, up to a maximum of 300.

4.2 Employer

The Employer element has the following attributes:

Table 3 - Employer attributes

|Name |Type |Minimum Value/ |Maximum Value/ |Required (Y/N) |Description / Validation |

| | |Length |Length | | |

|name |Alpha |1 |30 |Y |Name of Employer, up to 30 chars |

|tradename |Alpha |0 |30 |N |Trade name of employer, up to 30 chars |

|address1 |Alpha |0 |30 |N |Address field 1, up to 30 chars |

|address2 |Alpha |0 |30 |N |Address field 2, up to 30 chars |

|address3 |Alpha |0 |30 |N |Address field 3, up to 30 chars |

|contact |Alpha |0 |20 |N |Employer contact name, up to 20 chars |

|phone |Numeric |0 |12 |N |Employer contact telephone, up to 12 |

| | | | | |digits. Parentheses, spaces or hyphens are |

| | | | | |not accepted; e.g. 06733533 |

|fax |Numeric |0 |12 |N |Employer contact telephone, up to 12 |

| | | | | |digits. Parentheses, spaces or hyphens are |

| | | | | |not accepted; e.g. 06733533 |

4.3 P45P3

The P45P3 element has the following attribute:

Table 4 - P45P3 attribute

|Name |Type |Minimum Value/ |Maximum Value/ |Required (Y/N) |Description / Validation |

| | |Length |Length | | |

The P45P3 element has the following elements:

Table 5 - P45P3 elements

|Element |Required |Max Occurrence |

|Employee |Y |1 |

|NewEmployment |Y |1 |

|PrevEmployment |N |1 |

|USC |N |1 |

|LPT |N |1 |

4.4 Employee

The Employee element is a required element on P45P3.

It consists of the following attributes:

Table 6 - Employee attributes

|Name |Type |Minimum Value/ |Maximum Value/ |Required (Y/N) |Description / Validation |

| | |Length |Length | | |

|surname |Alpha |1 |20 |Y |Employee Surname, up to 20 chars. |

| | | | | |Value(s) entered must be alphabetic or be part of the |

| | | | | |following list of ‘special’ characters: |

| | | | | |-&/áéíóúÁÉÍÓÚ.;', |

|firstname |Alpha |1 |20 |Y |Employee first names, up to 20 chars. |

| | | | | |Value(s) entered must be alphabetic or be part of the |

| | | | | |following list of ‘special’ characters: |

| | | | | |-&/áéíóúÁÉÍÓÚ.;', |

|addressline1 |Alpha |0 |35 |N |If formtype=”P46” then this is a required address line, |

| | | | | |up to 35 chars. If formtype=”P45P3” then this attribute |

| | | | | |should not have a value. |

| | | | | |Value(s) entered must be alphanumeric or be part of the |

| | | | | |following list of ‘special’ characters: |

| | | | | |-&/áéíóúÁÉÍÓÚ.;', |

|addressline2 |Alpha |0 |35 |N |If formtype=”P46” then this is a required address line, |

| | | | | |up to 35 chars. If formtype=”P45P3” then this attribute |

| | | | | |should not have a value. |

| | | | | |Value(s) entered must be alphanumeric or be part of the |

| | | | | |following list of ‘special’ characters: |

| | | | | |-&/áéíóúÁÉÍÓÚ.;', |

|addressline3 |Alpha |0 |35 |N |If formtype=”P46” then this is an optional address line,|

| | | | | |up to 35 chars. If formtype=”P45P3” then this attribute |

| | | | | |should not have a value. |

| | | | | |Value(s) entered must be alphanumeric or be part of the |

| | | | | |following list of ‘special’ characters: |

| | | | | |-&/áéíóúÁÉÍÓÚ.;', |

|addressline4 |Alpha |0 |35 |N |If formtype=”P46” then this is an optional address line,|

| | | | | |up to 35 chars. If formtype=”P45P3” then this attribute |

| | | | | |should not have a value. |

| | | | | |Value(s) entered must be alphanumeric or be part of the |

| | | | | |following list of ‘special’ characters: |

| | | | | |-&/áéíóúÁÉÍÓÚ.;', |

4.5 NewEmployment

The NewEmployment element has the following attributes:

Table 7 - NewEmployment attributes

|Name |Type |Minimum Value/ |Maximum Value/ |Required (Y/N) |Description / Validation |

| | |Length |Length | | |

|works |Text String |0 |12 |N |Works/Payroll number, up to 12 chars. |

|freq |Text Character |0 |1 |N |Frequency of payment. It can be any one of the |

| | | | | |following weekly (w), fortnightly (b), monthly (m), |

| | | | | |four-weekly (f) or other (o). |

| | | | | | |

| | | | | |Note: Values in the brackets for the pay frequency |

| | | | | |mentioned above should be used. If it is not populated|

| | | | | |default value of weekly (w) will be updated. |

4.6 PrevEmployment

The PrevEmployment element is a required element if the formtype=”P45P3”. If the formtype=”P46” then this element should not exist. The PrevEmployment element consists of the following attributes:

Table 8 - PrevEmployment attributes

|Name |Type |Minimum Value/ |Maximum Value/ |Required (Y/N) |Description / Validation |

| | |Length |Length | | |

|datecessation |Date (DD/MM/ YYYY) |10 |10 |Y |Employment end date, (DD/MM/YYYY) |

|paya |Numeric |0 |999999999.99 |N |Employees total pay for the year (must be Euro and |

| | | | | |Cent amount, up to 11 numerics with two decimal |

| | | | | |places). |

| | | | | |Required if @taxa is populated. |

| | | | | |Required if @payb is not populated. |

|taxa |Numeric |0 |999999999.99 |N |Amount of tax deducted in total this year (must be |

| | | | | |Euro and Cent amount, up to 11 numerics with two |

| | | | | |decimal places). |

| | | | | |Required if @paya is populated. |

| | | | | |Cannot be greater than @paya. |

|payb |Numeric |0 |999999999.99 |N |Payment to employee in this employment (must be Euro |

| | | | | |and Cent amount, up to 11 numerics with two decimal |

| | | | | |places). |

| | | | | | |

| | | | | |Required if @datecommencement is populated. |

| | | | | |Required if @taxb is populated. |

| | | | | |Required if @refunded is true. |

| | | | | |Cannot be greater than the @paya field if the @paya |

| | | | | |field has been populated. |

|taxb |Numeric |0 |999999999.99 |N |Amount of tax deducted or refunded in this employment |

| | | | | |(must be Euro and Cent amount, up to 11 numerics with |

| | | | | |two decimal places). |

| | | | | |If the ‘refunded’ attribute is true, then the value |

| | | | | |must be greater than zero. |

| | | | | |Required if @payb is populated |

| | | | | |Required if @refunded is true. |

| | | | | |Cannot be greater than @payb if @refunded is not true.|

| | | | | |Cannot be greater than @taxa if @refunded is not true.|

|refunded |Boolean |0 |5 |N |True if the amount entered in ‘taxb’ attribute is a |

| | | | | |refunded amount. |

| | | | | |“true” or “false” |

|payeregistered |Alpha |8 |9 |Y |The PAYE Registration number of the previous employer.|

| | | | | |Must be valid Employer Registered number. |

4.7 USC

The USC element can only be provided if the formtype=”P45P3”. If the formtype=”P46” then this element should not exist. The USC element cannot not be provided where the Date of Cessation (PrevEmployment@datecessation) is before 01/01/2012. The USC element consists of the following attributes:

Table 9 - USC attributes

|Name |Type |Minimum Value/ |Maximum Value/ |Required (Y/N) |Description / Validation |

| | |Length |Length | | |

|totalusctodate |Numeric |0 |999999999.99 |N |Total USC Deducted from 1 January to Date of Cessation|

| | | | | |(must be Euro and Cent amount, up to 11 numerics with |

| | | | | |two decimal places). |

| | | | | | |

| | | | | |Where the PrevEmployment/@datecessation field is on or|

| | | | | |after 01/01/2012 and the @totalpaytodate is populated |

| | | | | |this becomes a mandatory field. |

| | | | | |Where the PrevEmployment/@datecessation field is on or|

| | | | | |after 01/01/2012 the amount entered in this field |

| | | | | |cannot be greater than the @totalpaytodate field. |

|totalpaythisemp |Numeric |0 |999999999.99 |N |If employment started since 1 January enter Gross Pay |

| | | | | |for USC purposes for this period of employment only |

| | | | | |(must be Euro and Cent amount, up to 11 numerics with |

| | | | | |two decimal places). |

| | | | | | |

| | | | | |This field becomes mandatory where |

| | | | | |PrevEmployment/@datecessation field is on or after |

| | | | | |01/01/2012 and one of the following scenarios is met: |

| | | | | |- PrevEmployment/@datecommencement is provided |

| | | | | |- @uscrefunded is true |

| | | | | |- @totaluscthisemp is provided |

| | | | | |Where the PrevEmployment/@datecessation field is on or|

| | | | | |after 01/01/2012 the amount entered in this field |

| | | | | |cannot be greater than the @totalpaytodate field. |

|totaluscthisemp |Numeric |0 |999999999.99 |N |If employment started since 1 January enter USC |

| | | | | |Deducted or USC Refunded for this period of employment|

| | | | | |only |

| | | | | |(must be Euro and Cent amount, up to 11 numerics with |

| | | | | |two decimal places). |

| | | | | | |

| | | | | |This field becomes mandatory where |

| | | | | |PrevEmployment/@datecessation field is on or after |

| | | | | |01/01/2012 and one of the following scenarios is met: |

| | | | | |- @uscrefunded is true |

| | | | | |- @totalpaythisemp is provided |

| | | | | |Where PrevEmployment/@datecessation field is on or |

| | | | | |after 01/01/2012 and @uscrefunded is true this field |

| | | | | |must have a value greater than or equal to 0.01 |

| | | | | |Where the PrevEmployment/@datecessation field is on or|

| | | | | |after 01/01/2012 the amount entered in this field |

| | | | | |cannot be greater than the @totalpaythisemp field if |

| | | | | |the @uscrefunded field is not true |

| | | | | |Where the PrevEmployment/@datecessation field is on or|

| | | | | |after 01/01/2012 the amount entered in this field |

| | | | | |cannot be greater than the @totalusctodate field if |

| | | | | |the @uscrefunded field is not true |

|uscrefunded |Boolean |0 |5 |N |Please check this box if USC figure above is a refund |

| | | | | |True if the amount entered in ‘totaluscthisemp’ |

| | | | | |attribute is a refunded amount. |

| | | | | |“true” or “false” |

4.8 LPT

The LPT element can only be provided if the formtype=”P45P3”. If the formtype=”P46” then this element should not exist. The LPT element should not be provided where the Date of Cessation (PrevEmployment@datecessation) is before 01/07/2013. The LPT element should not be populated unless both the previous employer registration (PrevEmployment@payeregistered) and the Date of Cessation (PrevEmployment@datecessation) are populated.

The LPT element has the following attributes:

Note: the ‘Required’ heading in the table below relates to the attribute of the element only, and not the element itself.

|Name |Type |Minimum Value/ |Maximum Value/ |Required (Y/N) |Description / Validation |

| | |Length |Length | | |

Appendix 1 – Sample xml file

Below is a sample XML P45(3)/P46 file, please note that the namespace (xmlns attribute) must be provided as outlined below;

| |

| |

| |

| |

| |

| |

| |

| |

| |

| |

| |

| |

| |

| |

| |

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download