Phpnuxbill android printer support
This commit is contained in:
parent
4f3e5972b0
commit
9d379b3fbd
@ -163,6 +163,10 @@ switch ($action) {
|
||||
case 'print':
|
||||
$content = $_POST['content'];
|
||||
if (!empty($content)) {
|
||||
if($_POST['nux']=='print'){
|
||||
//header("Location: nux://print?text=".urlencode($content));
|
||||
$ui->assign('nuxprint', "nux://print?text=".urlencode($content));
|
||||
}
|
||||
$ui->assign('content', $content);
|
||||
} else {
|
||||
$id = _post('id');
|
||||
|
@ -15,47 +15,49 @@
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body topmargin="0" leftmargin="0" onload="printpage()">
|
||||
<body topmargin="0" leftmargin="0" {if !$nuxprint} onload="printpage()" {/if}>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table width="200">
|
||||
<tr>
|
||||
<td>
|
||||
{if $content}<pre style="border-style: none; background-color: white;">{$content}</pre>{else}
|
||||
<pre style="border-style: none; background-color: white;"><b>{Lang::pad($_c['CompanyName'],' ', 2)}</b>
|
||||
{Lang::pad($_c['address'],' ', 2)}
|
||||
{Lang::pad($_c['phone'],' ', 2)}
|
||||
{Lang::pad("", '=')}
|
||||
{Lang::pads("Invoice", $in['invoice'], ' ')}
|
||||
{Lang::pads(Lang::T('Date'), $date, ' ')}
|
||||
{Lang::pads(Lang::T('Sales'), $_admin['fullname'], ' ')}
|
||||
{Lang::pad("", '=')}
|
||||
{Lang::pads(Lang::T('Type'), $in['type'], ' ')}
|
||||
{Lang::pads(Lang::T('Plan Name'), $in['plan_name'], ' ')}
|
||||
{Lang::pads(Lang::T('Plan Price'), Lang::moneyFormat($in['price']), ' ')}
|
||||
{Lang::pad($in['method'], ' ', 2)}
|
||||
{if $content}
|
||||
<pre style="border-style: none; background-color: white;">{$content}</pre>{else}
|
||||
<pre style="border-style: none; background-color: white;"><b>{Lang::pad($_c['CompanyName'],' ', 2)}</b>
|
||||
{Lang::pad($_c['address'],' ', 2)}
|
||||
{Lang::pad($_c['phone'],' ', 2)}
|
||||
{Lang::pad("", '=')}
|
||||
{Lang::pads("Invoice", $in['invoice'], ' ')}
|
||||
{Lang::pads(Lang::T('Date'), $date, ' ')}
|
||||
{Lang::pads(Lang::T('Sales'), $_admin['fullname'], ' ')}
|
||||
{Lang::pad("", '=')}
|
||||
{Lang::pads(Lang::T('Type'), $in['type'], ' ')}
|
||||
{Lang::pads(Lang::T('Plan Name'), $in['plan_name'], ' ')}
|
||||
{Lang::pads(Lang::T('Plan Price'), Lang::moneyFormat($in['price']), ' ')}
|
||||
{Lang::pad($in['method'], ' ', 2)}
|
||||
|
||||
{Lang::pads(Lang::T('Username'), $in['username'], ' ')}
|
||||
{Lang::pads(Lang::T('Password'), '**********', ' ')}
|
||||
{if $in['type'] != 'Balance'}
|
||||
{Lang::pads(Lang::T('Created On'), Lang::dateAndTimeFormat($in['recharged_on'],$in['recharged_time']), ' ')}
|
||||
{Lang::pads(Lang::T('Expires On'), Lang::dateAndTimeFormat($in['expiration'],$in['time']), ' ')}
|
||||
{/if}
|
||||
{Lang::pad("", '=')}
|
||||
{Lang::pad($_c['note'],' ', 2)}</pre>
|
||||
{/if}
|
||||
{Lang::pads(Lang::T('Username'), $in['username'], ' ')}
|
||||
{Lang::pads(Lang::T('Password'), '**********', ' ')}
|
||||
{if $in['type'] != 'Balance'}
|
||||
{Lang::pads(Lang::T('Created On'), Lang::dateAndTimeFormat($in['recharged_on'],$in['recharged_time']), ' ')}
|
||||
{Lang::pads(Lang::T('Expires On'), Lang::dateAndTimeFormat($in['expiration'],$in['time']), ' ')}
|
||||
{/if}
|
||||
{Lang::pad("", '=')}
|
||||
{Lang::pad($_c['note'],' ', 2)}</pre>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="ui/ui/scripts/jquery-1.10.2.js"></script>
|
||||
<script src="ui/ui/scripts/jquery.min.js"></script>
|
||||
<script src="ui/ui/scripts/bootstrap.min.js"></script>
|
||||
{if isset($xfooter)}
|
||||
{$xfooter}
|
||||
{/if}
|
||||
|
||||
{if $nuxprint} <iframe src="{$nuxprint}" style="display: none;" ><iframe> {/if}
|
||||
</body>
|
||||
|
||||
</html>
|
@ -33,6 +33,11 @@
|
||||
class="ion-reply-all"></i>{Lang::T('Finish')}</a>
|
||||
<a href="{$_url}prepaid/view/{$in['id']}/send" class="btn btn-info text-black btn-sm"><i
|
||||
class="glyphicon glyphicon-envelope"></i> {Lang::T("Resend To Customer")}</a>
|
||||
<button type="submit" class="btn btn-success text-black btn-sm" name="nux" value="print">
|
||||
<i class="glyphicon glyphicon-print"></i>
|
||||
Nux Print
|
||||
<i class="glyphicon glyphicon-phone"></i>
|
||||
</button>
|
||||
<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-print"></i>
|
||||
{Lang::T('Click Here to Print')}</button>
|
||||
</form>
|
||||
|
@ -10,8 +10,14 @@
|
||||
<input type="hidden" name="id" value="{$in['id']}">
|
||||
<a href="{$_url}prepaid/voucher" class="btn btn-primary btn-sm"><i
|
||||
class="ion-reply-all"></i>{Lang::T('Finish')}</a>
|
||||
<a href="https://api.whatsapp.com/send/?text={$wa}" target="_blank" class="btn btn-info text-black btn-sm"><i
|
||||
class="glyphicon glyphicon-envelope"></i> {Lang::T("Send To Customer")}</a>
|
||||
<a href="https://api.whatsapp.com/send/?text={$wa}" target="_blank"
|
||||
class="btn btn-info text-black btn-sm">
|
||||
{Lang::T("Send To Customer")}</a>
|
||||
<button type="submit" class="btn btn-success text-black btn-sm" name="nux" value="print">
|
||||
<i class="glyphicon glyphicon-print"></i>
|
||||
Nux Print
|
||||
<i class="glyphicon glyphicon-phone"></i>
|
||||
</button>
|
||||
<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-print"></i>
|
||||
{Lang::T('Click Here to Print')}</button>
|
||||
</form>
|
||||
|
Loading…
x
Reference in New Issue
Block a user