mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-04 02:04:53 +02:00
fix print
This commit is contained in:
parent
12cdef4f66
commit
1857c145d1
2 changed files with 12 additions and 2 deletions
|
@ -112,7 +112,17 @@ class Lang
|
|||
if($config['printer_cols']){
|
||||
$cols = $config['printer_cols'];
|
||||
}
|
||||
return str_pad($text, $cols, $pad_string, $pad_type);
|
||||
$text = trim($text);
|
||||
$texts = explode("\n", $text);
|
||||
if(count($texts)>1){
|
||||
$text = '';
|
||||
foreach($texts as $t){
|
||||
$text.= self::pad(trim($t), $pad_string, $pad_type)."\n";
|
||||
}
|
||||
return $text;
|
||||
}else{
|
||||
return str_pad(trim($text), $cols, $pad_string, $pad_type);
|
||||
}
|
||||
}
|
||||
|
||||
public static function pads($textLeft, $textRight, $pad_string = ' '){
|
||||
|
|
|
@ -159,7 +159,7 @@ switch ($action) {
|
|||
case 'print':
|
||||
$id = _post('id');
|
||||
$d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
|
||||
$ui->assign('d', $d);
|
||||
$ui->assign('in', $d);
|
||||
|
||||
$ui->assign('date', Lang::dateAndTimeFormat($d['recharged_on'], $d['recharged_time']));
|
||||
run_hook('print_invoice'); #HOOK
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue