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