add kulcsok, add tartós beszedés, add ticket type with intallments

This commit is contained in:
2016-01-20 14:48:34 +01:00
parent d1638a19de
commit d7cc84e78f
111 changed files with 4077 additions and 12 deletions

View File

@@ -0,0 +1,43 @@
<?php
namespace common\components\giro;
use backend\models\GiroKotegForm;
class GiroBase {
public function mezoKitolt($input, $hossz, $pad_string = "") {
return str_pad($input, $hossz, $pad_string, STR_PAD_LEFT);
}
public function szamKitolt($input, $hossz, $pad_string = "0") {
return str_pad($input, $hossz, $pad_string, STR_PAD_LEFT);
}
public function szamKitoltJobb($input, $hossz, $pad_string = "0") {
return str_pad($input, $hossz, $pad_string, STR_PAD_RIGHT);
}
public function szovegKitolt($input, $hossz, $pad_string = " ") {
$data = $input;
$data = GiroKotegForm::transliterate($data);
if ( strlen($data) > $hossz){
$data = substr($data, 0, $hossz );
}
$data = str_pad($data, $hossz, $pad_string, STR_PAD_RIGHT);
echo $data;
// echo strlen($data);
return $data;
}
public function szovegOlvas($row,$start,$length, $padchar = " "){
return rtrim(substr($row, $start,$length),$padchar);
}
public function szamOlvas($row,$start,$length, $padchar = "0"){
return ltrim(substr($row, $start,$length),$padchar);
}
public function rekordVege(){
return "\r\n";
}
}