<?php
namespace App\Apollo\LineParser\Types;

class Data_A02 extends \App\Galileo\LineParser\Types\Data_A02 {
	/**
	 * PASSENGER DATA SECTION
	 */

	/**
	 * Children elements
	 */
	protected $children = [
		[ 'key'=>'A02SEC',       'type'=>'Constant', 'len'=>3, 'val'=>'A02',  'label'=>'SECTION LABEL "A02"' ],
		[ 'key'=>'A02NME',       'type'=>'StringTrim',  'len'=>33,            'label'=>'PASSENGER NAME' ],                                     // For airline document issuance, each passenger is issued an individual ticket. If this is a multiple passenger PNR/Booking File and all tickets are issued in one entry, there is a separate line of data for each passenger. Electronic ticketing only: if ET fails and a spoiled MIR is generated, then this field is blank filled. APO: In an Amtrak ticket, more than one name may appear in the Passenger Name Section, because only one Amtrak ticket is issued for the entire party.
		[ 'key'=>'A02TRN',       'type'=>'StringTrim',  'len'=>11,            'label'=>'TRANSACTION NUMBER' ],                                 // This is an assigned number which is unique to this transaction. If the agency uses OPTAT Ticket Stock, the TCN number also appears on the extreme lower left hand corner of the ticket. Zero or blank filled when data not available for Refund/Void MIR. TCN does not appear in MIR generated using TKPDAD.
		[ 'key'=>'A02TIN',                                                    'label'=>'TICKET/INVOICE NUMBERS', 'children' => [
			[ 'key'=>'A02YIN',   'type'=>'Integer',       'len'=>1,           'label'=>'YEAR INDICATOR' ],                                     // Last digit of the year that the ticket was issued. (i.e. "6")
			[ 'key'=>'A02TKT',   'type'=>'StringRTrim',   'len'=>10,          'label'=>'TICKET NUMBER' ],                                      // Where there is more than one ticket number, this field shows the first ticket number. GCS: if filed fare is already ticketed, using TKPDAD will include ticket number. Electronic ticketing only: if an ET fails in a multi-ticket situation, then only one spoiled MIR is sent with the first ticket number. Zero filed for spoiled MIR.
			[ 'key'=>'A02NBK',   'type'=>'Integer',       'len'=>2,           'label'=>'NUMBER OF TICKET BOOKS' ],                             // Zero filled unless it’s a Non-Air PNR/BOOKING FILE, then it is blank filled. Electronic ticketing only: if an ET fails in a multi-ticket situation, then this field shows the number of books spoiled.
			[ 'key'=>'A02INV',   'type'=>'StringRaw',     'len'=>9,           'label'=>'INVOICE NUMBER' ],                                     // The invoice number is assigned by the APO/GCS TINS package or system generated. If missing (not linked to Itinerary Device or issued using one of the “D” modifiers, i.e. DAD, DBD, DND, or DJD), field is blank. GCS: As above, but the SG ticket modifier will assign a system generated number to an itinerary/invoice, (not from TINs).
		]],
		[ 'key'=>'A02PIC',       'type'=>'StringRaw',   'len'=>6,             'label'=>'PASSENGER IDENTIFICATION CODE/DESCRIPTION - * PIC' ],  // These codes are used to store special fare information applicable to each individual passenger. The * PIC/*PD codes may vary from time to time. A current list can be displayed in the HELP MOD* Profile found in APO, or H/P in GCS help. A copy of a previous list is also included as Appendix B in this document.
		[ 'key'=>'A02FIN',       'type'=>'Integer',     'len'=>2,             'label'=>'ASSOCIATED FARE ITEM NUMBER FOR PASSENGER' ],          // This number identifies which fare is associated with which passenger. The same number will also appear in the following sections as the Fare Section Indicator: A07 - FARE VALUE SECTION as the Fare Section Indicator A08 - FARE BASIS SECTION as the Fare Section ID A09 - FARE CONSTRUCTION SECTION as the Fare Section ID When one fare basis and one fare exists for all passengers, this number may be “01” for all passengers. Blanks are sent in this field if fare data does not exist.
		[ 'key'=>'A02EIN',       'type'=>'Integer',     'len'=>2,             'label'=>'ASSOCIATED EXCHANGE ITEM NUMBER FOR PASSENGER' ],      // If a Ticket Exchange is performed in this transaction “HBFEX/TKPFEX”, the Ticket Exchange Section (A10) item for this passenger is contained in this field and is associated to the related Exchange item in section A10. If Exchange data does not exist, this field is left blank.
	];
}
