Changeset 550 for trunk/Modules/FinanceBankAPI/GPC.php
- Timestamp:
- Jul 7, 2013, 7:37:48 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/FinanceBankAPI/GPC.php
r548 r550 9 9 { 10 10 $Line = ' '.$Line; 11 $Type = substr($Line, 1, 3);11 $Type = mb_substr($Line, 1, 3); 12 12 13 13 if($Type == GPC_TYPE_REPORT) … … 16 16 ( 17 17 'Type' => GPC_TYPE_REPORT, 18 'AccountNumber' => substr($Line, 4, 16),19 'AccountName' => trim( substr($Line, 20, 20)),20 'OldBalanceDate' => mktime(0, 0, 0, substr($Line, 42, 2), substr($Line, 40, 2), '20'.substr($Line, 44, 2)),21 'OldBalanceValue' => ( substr($Line, 60, 1).substr($Line, 46, 14)) / 100,22 'NewBalanceValue' => ( substr($Line, 75, 1).substr($Line, 61, 14)) / 100,23 'DebitValue' => ( substr($Line, 90, 1).substr($Line, 76, 14)) / 100,24 'CreditValue' => ( substr($Line, 105, 1).substr($Line, 91, 14)) / 100,25 'SequenceNumber' => intval( substr($Line, 106, 3)),26 'Date' => mktime(0, 0, 0, substr($Line, 111, 2), substr($Line, 109, 2), '20'.substr($Line, 113, 2)),18 'AccountNumber' => mb_substr($Line, 4, 16), 19 'AccountName' => trim(mb_substr($Line, 20, 20)), 20 'OldBalanceDate' => mktime(0, 0, 0, mb_substr($Line, 42, 2), mb_substr($Line, 40, 2), '20'.mb_substr($Line, 44, 2)), 21 'OldBalanceValue' => (mb_substr($Line, 60, 1).mb_substr($Line, 46, 14)) / 100, 22 'NewBalanceValue' => (mb_substr($Line, 75, 1).mb_substr($Line, 61, 14)) / 100, 23 'DebitValue' => (mb_substr($Line, 90, 1).mb_substr($Line, 76, 14)) / 100, 24 'CreditValue' => (mb_substr($Line, 105, 1).mb_substr($Line, 91, 14)) / 100, 25 'SequenceNumber' => intval(mb_substr($Line, 106, 3)), 26 'Date' => mktime(0, 0, 0, mb_substr($Line, 111, 2), mb_substr($Line, 109, 2), '20'.mb_substr($Line, 113, 2)), 27 27 //'DataAlignment' => substr($Line, 115, 14), 28 28 'CheckSum' => sha1(md5($Line).$Line), … … 34 34 ( 35 35 'Type' => GPC_TYPE_ITEM, 36 'AccountNumber' => substr($Line, 4, 16),37 'OffsetAccount' => substr($Line, 20, 16),38 'RecordNumber' => substr($Line, 36, 13),39 'Value' => substr($Line, 49, 12) / 100,40 'Code' => substr($Line, 61, 1),41 'VariableSymbol' => intval( substr($Line, 62, 10)),42 'BankCode' => substr($Line, 74, 4),43 'ConstantSymbol' => intval( substr($Line, 78, 4)),44 'SpecificSymbol' => intval( substr($Line, 82, 10)),45 'Valut' => substr($Line, 92, 6),46 'ClientName' => substr($Line, 98, 20),36 'AccountNumber' => mb_substr($Line, 4, 16), 37 'OffsetAccount' => mb_substr($Line, 20, 16), 38 'RecordNumber' => mb_substr($Line, 36, 13), 39 'Value' => mb_substr($Line, 49, 12) / 100, 40 'Code' => mb_substr($Line, 61, 1), 41 'VariableSymbol' => intval(mb_substr($Line, 62, 10)), 42 'BankCode' => mb_substr($Line, 74, 4), 43 'ConstantSymbol' => intval(mb_substr($Line, 78, 4)), 44 'SpecificSymbol' => intval(mb_substr($Line, 82, 10)), 45 'Valut' => mb_substr($Line, 92, 6), 46 'ClientName' => mb_substr($Line, 98, 20), 47 47 //'Zero' => substr($Line, 118, 1), 48 'CurrencyCode' => substr($Line, 119, 4),49 'DueDate' => mktime(0, 0, 0, substr($Line, 125, 2), substr($Line, 123, 2),substr($Line, 127, 2)),48 'CurrencyCode' => mb_substr($Line, 119, 4), 49 'DueDate' => mktime(0, 0, 0, mb_substr($Line, 125, 2), mb_substr($Line, 123, 2), mb_substr($Line, 127, 2)), 50 50 'CheckSum' => sha1(md5($Line).$Line), 51 51 );
Note:
See TracChangeset
for help on using the changeset viewer.