<?php
namespace App\Amadeus\FileParser;

class Line_RIA extends \App\Amadeus\FileParser\LineAbstract
{
	/**
	 * 4.164. RIA Invoice Adjustment Remark
	 * see page 393(435)
	 *
	 * The RIA Adjustment Remark Amount is used to adjust an air segment amount,
	 * or to add/include auxiliary segment amounts to an invoice.
	 */
	protected $structure = [
		['name'=> 'MSGTAG',  'val' => 'RIA',   'type' => 'AN',      'req' => 'M',  'len' => 3,],                          // 1 : Message Tag (RIA)
		['name'=> 'CURCODE',                   'type' => 'AN',                     'len' => 3,],                          // 2 : Currency Code
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',      'req' => 'M',  'len' => 1,],                          // 3 : Delimiter (Constant value of ';')
		['name'=> 'MINUS',                     'type' => 'AN',      'req' => 'M',  'len' => 1,],                          // 4 : Minus indicator "-" for negative amount or blank for positive amount.
		['name'=> 'ADAMT',                     'type' => 'N',       'req' => 'M',],                                       // 5 : Adjustment amount.
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',      'req' => 'M',  'len' => 1,],                          // 6 : Delimiter (Constant value of ';')
		['name'=> 'TAXA',                      'type' => 'N',],                                                           // 7 : Tax amount.
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',      'req' => 'M',  'len' => 1,],                          // 8 : Delimiter (Constant value of ';')
		['name'=> 'TAXC',                      'type' => 'AN',],                                                          // 9 : Tax code.
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',      'req' => 'M',  'len' => 1,],                          // 10 : Delimiter (Constant value of ';')
		['name'=> 'SVCCODE',                   'type' => 'AN',      'req' => 'M',  'len' => 1,],                          // 11 : Service Type Code (Value of 'F' 'C' 'H' or 'M')
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',      'req' => 'M',  'len' => 1,],                          // 12 : Delimiter (Constant value of ';')
		['name'=> 'FREE',                      'type' => 'AN',                     'len_min' => 1,   'len_max' => 52,],   // 13 : Free Flow.
		['name'=> 'SEGASS',  'val' => ';S',    'type' => 'ASSOC',],
		['name'=> 'PSGASS',  'val' => ';P',    'type' => 'ASSOC',],
	];
}
