GPC_TYPE_REPORT, 'AccountNumber' => mb_substr($Line, 4, 16), 'AccountName' => trim(mb_substr($Line, 20, 20)), 'OldBalanceDate' => mktime(0, 0, 0, mb_substr($Line, 42, 2), mb_substr($Line, 40, 2), '20'.mb_substr($Line, 44, 2)), 'OldBalanceValue' => (mb_substr($Line, 60, 1).mb_substr($Line, 46, 14)) / 100, 'NewBalanceValue' => (mb_substr($Line, 75, 1).mb_substr($Line, 61, 14)) / 100, 'DebitValue' => (mb_substr($Line, 90, 1).mb_substr($Line, 76, 14)) / 100, 'CreditValue' => (mb_substr($Line, 105, 1).mb_substr($Line, 91, 14)) / 100, 'SequenceNumber' => intval(mb_substr($Line, 106, 3)), 'Date' => mktime(0, 0, 0, mb_substr($Line, 111, 2), mb_substr($Line, 109, 2), '20'.mb_substr($Line, 113, 2)), //'DataAlignment' => substr($Line, 115, 14), 'CheckSum' => sha1(md5($Line).$Line), ); } else if ($Type == GPC_TYPE_ITEM) { $GPCLine = array ( 'Type' => GPC_TYPE_ITEM, 'AccountNumber' => mb_substr($Line, 4, 16), 'OffsetAccount' => mb_substr($Line, 20, 16), 'RecordNumber' => mb_substr($Line, 36, 13), 'Value' => mb_substr($Line, 49, 12) / 100, 'Code' => mb_substr($Line, 61, 1), 'VariableSymbol' => intval(mb_substr($Line, 62, 10)), 'BankCode' => mb_substr($Line, 74, 4), 'ConstantSymbol' => intval(mb_substr($Line, 78, 4)), 'SpecificSymbol' => intval(mb_substr($Line, 82, 10)), 'Valut' => mb_substr($Line, 92, 6), 'ClientName' => mb_substr($Line, 98, 20), //'Zero' => substr($Line, 118, 1), 'CurrencyCode' => mb_substr($Line, 119, 4), 'DueDate' => mktime(0, 0, 0, mb_substr($Line, 125, 2), mb_substr($Line, 123, 2), mb_substr($Line, 127, 2)), 'CheckSum' => sha1(md5($Line).$Line), ); } else $GPCLine = NULL; return $GPCLine; } }