It is possible to load various types of information and data to Fourth's Purchase to Pay product (formerly known as Trade Simple). Both customers and suppliers can use this functionality to import documents that largely correspond with paper-based equivalents, for example - Product Catalogues, Purchase Orders, Delivery Notes or Invoices. These documents are in CSV format.
This guide defines the contents and rules governing the sending of Credit Notes via Purchase to Pay where the basic Fourth flat file format has been selected.
This article is aimed at the UK-based technical reader, and a working familiarity with CSV files is essential.
Please follow this link to see a full list of articles covering the creation of other CSV files that can be loaded to Purchase to Pay - P2P&I - Purchase to Pay CSV Specification - Contents Page
General Notes on all CSV Documents
Each record is one line. A record separator should consist of a line feed (ASCII/LF=0x0A), or a carriage return and line feed pair (ASCII/CRLF=0x0D 0x0A).
Fields are separated with commas.
Restrictions on the Fields Data
- Fields with embedded commas must be delimited with double-quote characters. Ex: Field,Data should be sent across within double quotes as “Field,Data”
- Fields containing double-quote characters must be surrounded by double-quotes, and the embedded double-quotes must each be represented by a pair of consecutive double quotes. Ex: Field”Data should be sent across as “Field””Data”
- Fields with leading or trailing spaces must be delimited with double-quote characters Ex: FieldData should be sent across within double quotes as “ FieldData ”
- Fields containing any special characters (characters other than alphabets (a-z or A-Z) and numerals (0-9)) should be embedded within double quotes
- Fields may always be delimited with double quotes and the delimiters will always be discarded. Please note: The system will not use the quotes to impart type information to fields imported
- The first record in a CSV file should be data and not a header record containing column (field) names
- Optional elements at the end of any line and their delimiters can be omitted but delimiters are necessary when optional elements are omitted “within” a line.
Tables in this article use the following fields to indicate whether a field is mandatory, optional, or otherwise.
- M – Mandatory, must be provided
- O – Optional, should be provided if appropriate
- C – Conditional, should be provided under certain circumstances. The notes next to the field will describe exactly when the field should be provided
- D – The system requires this field, but will derive it if not provided
Numeric Data Elements
All numeric data elements must have any decimal point explicitly stated. A negative value may be sent by placing a minus sign before the number, e.g. –1250.02. A decimal point is not needed where the decimal part is equal to zero, e.g. 15.00 may be formatted as 15.
Text Data Elements
The appropriate separator should terminate all variable-length text data elements without trailing spaces or any other “padding” character. Double-quotes may be used to define and enclose single text data elements. Please refer “Restrictions on the fields data” section above for more details.
The date field format in these documents must always be YYYYMMDD unless otherwise stated.
Credit Notes (sent to Purchase to Pay)
Purchase to Pay allows the sending of Credit Note batches - files containing many Credit Notes, each relating to a different delivery location. Please note that Invoices must not be included in these files. Lines in the file must conform to the following pattern.
Each file must contain:
- Exactly one Batch Header Line
- One or more Credit note Documents
Each Credit note document MUST contain:
- Exactly one Credit note Header Line
- 1 or more Credit note Detail Lines
- 1 or more Credit note VAT sub-total Lines for each VAT Rate/code used in the Credit note (these can be derived by trade simple if you do not provide them)
Batch Header Line
Each file must contain only a single batch header line as the first row in the file.
Credit Note Header Line
Each file must contain a single credit note header line – for each credit note – as the first row in the credit note.
Credit Note Detail Line
Each credit note must contain one or more credit note detail lines – one for each credit note line.
Credit note VAT Sub-total Line
Each credit note may contain one or more credit note VAT sub-total lines - one for each VAT rate and code used in that credit note. Purchase to Pay can can derive these on your behalf.
Example Credit Note Batch
H,UNIT1,The Beer Company,3 Des Roches Square,,,,OX28 4LQ,GB123456789,The Dog and Duck,86 Ock Street,,,,OX14 5DH,CRD0001,20041004,,,,GBP,,,,,,,3,7,100,,10,1.75,101.75,101.75
H,UNIT2,The Beer Company,3 Des Roches Square,,,,OX28 4LQ,GB123456789,The Eagle and Child,Beaumont Road,,,,OX16 1RB,CRD0002,20041004,,INV0002,20041004,GBP,,,,,,,1,4,60,,60,0,60,60
Please sign in to leave a comment.