add kulcsok, add tartós beszedés, add ticket type with intallments
This commit is contained in:
43
common/components/giro/GiroBase.php
Normal file
43
common/components/giro/GiroBase.php
Normal 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";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user