print voucher, update dashboard, hide messages
This commit is contained in:
parent
b6c55ff5a9
commit
ab563e5005
10
README.md
10
README.md
@ -7,7 +7,7 @@
|
||||
> maybe the dev busy,
|
||||
> and nobody donate to him,
|
||||
> i will try to update as far as i can,
|
||||
> any Modification will be update in here.
|
||||
> any Modification will be update in here.
|
||||
|
||||
### iBNuX Todos
|
||||
|
||||
@ -38,10 +38,10 @@ STEPS: Installation
|
||||
----
|
||||
Auto Installer:
|
||||
1. Unzip the contents of the zip file to a folder on your computer.
|
||||
2. Upload the Entire phpmixbill_v5.0 folder to your website / server
|
||||
2. Upload the Entire phpmixbill folder to your website / server
|
||||
3. Next you can rename the folder to whatever you like (billing, finance, manage etc..)
|
||||
4. Now visit the uploaded location using your web browser to run the installer process.
|
||||
5. Follow the instructions on screen to install PHPMixBill v5.0.
|
||||
5. Follow the instructions on screen to install PHPMixBill
|
||||
6. For security, Delete the install directory inside system folder.
|
||||
7. If you see blank page after installation, it might be your compiled folder permissoon is not writable. Please make permission 755 compiled directory inside ui folder to store the generated contents from theme.
|
||||
|
||||
@ -49,11 +49,11 @@ Manual Install:
|
||||
To install manually, follow this steps-
|
||||
|
||||
1. Unzip the contents of the zip file to a folder on your computer.
|
||||
2. Upload the Entire phpmixbill_v5.0 folder to your website / server
|
||||
2. Upload the Entire phpmixbill folder to your website / server
|
||||
3. Next you can rename the folder to whatever you like (billing, finance, manage etc..)
|
||||
4. Sample config file is available here- system/config.sample.php . Rename it to config.php & put it in same location (/system/config.php) Open config file using a text editor & Put the database info and url.
|
||||
5. Import database. Database file is located here- system/install/phpmixbill.sql
|
||||
6. For security, Delete the install directory inside sysfrm folder.
|
||||
6. For security, Delete the install directory inside system folder.
|
||||
|
||||
CRON JOBS
|
||||
----
|
||||
|
@ -7,6 +7,8 @@
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @donate PayPal: iesien22@yahoo.com / Bank Mandiri: 130.00.1024957.4
|
||||
**/
|
||||
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
require ('system/boot.php');
|
||||
App::_run();
|
||||
|
@ -56,4 +56,25 @@ $ui->assign('dlog',$dlog);
|
||||
$log = ORM::for_table('tbl_logs')->count();
|
||||
$ui->assign('log',$log);
|
||||
|
||||
// Count stock
|
||||
$tmp = $v = ORM::for_table('tbl_plans')->select('id')->select('name_plan')->find_many();
|
||||
$plans = array();
|
||||
$stocks = array("used"=>0,"unused"=>0);
|
||||
$n = 0;
|
||||
foreach($tmp as $plan){
|
||||
$plans[$n]['name_plan'] = $plan['name_plan'];
|
||||
$plans[$n]['unused'] = ORM::for_table('tbl_voucher')
|
||||
->where('id_plan',$plan['id'])
|
||||
->where('status',0)->count();;
|
||||
$stocks["unused"] += $plans[$n]['unused'];
|
||||
$plans[$n]['used'] = ORM::for_table('tbl_voucher')
|
||||
->where('id_plan',$plan['id'])
|
||||
->where('status',1)->count();;
|
||||
$stocks["used"] += $plans[$n]['used'];
|
||||
$n++;
|
||||
}
|
||||
|
||||
$ui->assign('stocks',$stocks);
|
||||
$ui->assign('plans',$plans);
|
||||
|
||||
$ui->display('dashboard.tpl');
|
@ -392,11 +392,20 @@ switch ($action) {
|
||||
|
||||
$code = _post('code');
|
||||
if ($code != ''){
|
||||
$ui->assign('code',$code);
|
||||
$paginator = Paginator::bootstrap('tbl_voucher','code','%'.$code.'%');
|
||||
$d = ORM::for_table('tbl_plans')->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))->where_like('tbl_plans.code','%'.$code.'%')->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many();
|
||||
$d = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where_like('tbl_plans.code','%'.$code.'%')
|
||||
->offset($paginator['startpoint'])
|
||||
->limit($paginator['limit'])
|
||||
->find_many();
|
||||
}else{
|
||||
$paginator = Paginator::bootstrap('tbl_voucher');
|
||||
$d = ORM::for_table('tbl_plans')->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many();
|
||||
$d = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->offset($paginator['startpoint'])
|
||||
->limit($paginator['limit'])->find_many();
|
||||
}
|
||||
|
||||
$ui->assign('d',$d);
|
||||
@ -416,6 +425,32 @@ switch ($action) {
|
||||
$ui->display('voucher-add.tpl');
|
||||
break;
|
||||
|
||||
case 'print-voucher':
|
||||
$from_id = _post('from_id')*1;
|
||||
$pagebreak = _post('pagebreak');
|
||||
if ($from_id != ''){
|
||||
$v = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status','0')
|
||||
->where_gt('tbl_voucher.id',$from_id)
|
||||
->find_many();
|
||||
}else{
|
||||
$v = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status','0')
|
||||
->find_many();
|
||||
}
|
||||
|
||||
$ui->assign('_title', $_L['Voucher_Hotspot'].' - '. $config['CompanyName']);
|
||||
$ui->assign('from_id',$from_id);
|
||||
if($pagebreak<1) $pagebreak = 6;
|
||||
$ui->assign('pagebreak',$pagebreak);
|
||||
|
||||
$ui->assign('v',$v);
|
||||
//for counting pagebreak
|
||||
$ui->assign('jml',0);
|
||||
$ui->display('print-voucher.tpl');
|
||||
break;
|
||||
case 'voucher-post':
|
||||
$type = _post('type');
|
||||
$plan = _post('plan');
|
||||
|
@ -175,10 +175,12 @@ $_L['Number_of_Vouchers'] = 'Number of Vouchers';
|
||||
$_L['Length_Code'] = 'Length Code';
|
||||
$_L['Code_Voucher'] = 'Code Voucher';
|
||||
$_L['Voucher'] = 'Voucher';
|
||||
$_L['Voucher_Hotspot'] = 'Hotspot Voucher';
|
||||
$_L['Status_Voucher'] = 'Status Voucher';
|
||||
$_L['Add_Voucher'] = 'Add Vouchers';
|
||||
$_L['Voucher_Successfully'] = 'Create Vouchers Successfully';
|
||||
$_L['Generate'] = 'Generate';
|
||||
$_L['Print_Info'] = 'Print side by side, it will easy to cut';
|
||||
|
||||
$_L['From_Date'] = 'From Date';
|
||||
$_L['To_Date'] = 'To Date';
|
||||
|
@ -174,10 +174,12 @@ $_L['Number_of_Vouchers'] = 'Jumlah Voucher';
|
||||
$_L['Length_Code'] = 'Panjang Kode';
|
||||
$_L['Code_Voucher'] = 'Kode Voucher';
|
||||
$_L['Voucher'] = 'Voucher';
|
||||
$_L['Voucher_Hotspot'] = 'Voucher Hotspot';
|
||||
$_L['Status_Voucher'] = 'Status Voucher';
|
||||
$_L['Add_Voucher'] = 'Tambah Voucher';
|
||||
$_L['Add_Voucher'] = 'Tambah';
|
||||
$_L['Voucher_Successfully'] = 'Berhasil membuat Voucher baru';
|
||||
$_L['Generate'] = 'Generate';
|
||||
$_L['Print_Info'] = 'Print bolak balik, biar mudah dipotong dan hemat kertas';
|
||||
|
||||
$_L['From_Date'] = 'Dari Tanggal';
|
||||
$_L['To_Date'] = 'Hingga Tanggal';
|
||||
|
@ -1,12 +1,12 @@
|
||||
{include file="sections/header.tpl"}
|
||||
|
||||
{if ($_admin['user_type']) eq 'Admin' || ($_admin['user_type']) eq 'Sales'}
|
||||
<div class="row">
|
||||
<div class="row hidden">
|
||||
<div class="col-md-12">
|
||||
<div class="dash-head clearfix mt15 mb20">
|
||||
<div class="left">
|
||||
<h4 class="mb5 text-light">Welcome to PHPMixBill v5.0</h4>
|
||||
<p class="small">{$_L['Welcome_Text_Admin']}</p>
|
||||
<h4 class="mb5 text-light">Dashboard</h4>
|
||||
<p class="small"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -83,8 +83,36 @@
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<div class="panel panel-default mb20 panel-hovered project-stats table-responsive">
|
||||
<div class="panel-heading">{$_L['User_Expired_Today']}</div>
|
||||
<div class="panel-heading">Vouchers Stock</div>
|
||||
<div class="panel-body">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$_L['Plan_Name']}</th>
|
||||
<th>unused</th>
|
||||
<th>used</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $plans as $stok}
|
||||
<tr>
|
||||
<td>{$stok['name_plan']}</td>
|
||||
<td>{$stok['unused']}</td>
|
||||
<td>{$stok['used']}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{/foreach}
|
||||
<tr>
|
||||
<td>Total</td>
|
||||
<td>{$stocks['unused']}</td>
|
||||
<td>{$stocks['used']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default mb20 panel-hovered project-stats table-responsive">
|
||||
<div class="panel-heading">{$_L['User_Expired_Today']}</div>
|
||||
<div class="panel-body">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -125,6 +153,12 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default panel-hovered mb20 activities">
|
||||
<div class="panel-heading">PHPMIXBILL</div>
|
||||
<div class="panel-body">
|
||||
{$_L['Welcome_Text_Admin']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
151
ui/theme/default/print-voucher.tpl
Normal file
151
ui/theme/default/print-voucher.tpl
Normal file
@ -0,0 +1,151 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{$_title}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{$_theme}/images/favicon.ico">
|
||||
<style>
|
||||
.ukuran {
|
||||
size:A4;
|
||||
}
|
||||
|
||||
body,td,th {
|
||||
font-size: 12px;
|
||||
font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
|
||||
}
|
||||
page[size="A4"] {
|
||||
background: white;
|
||||
width: 21cm;
|
||||
height: 29.7cm;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 0.5cm;
|
||||
html, body {
|
||||
width: 210mm;
|
||||
height: 297mm;
|
||||
}
|
||||
}
|
||||
@media print {
|
||||
body {
|
||||
margin: 0;
|
||||
box-shadow: 0;
|
||||
}
|
||||
page[size="A4"] {
|
||||
margin: 0;
|
||||
box-shadow: 0;
|
||||
}
|
||||
.page-break { display: block; page-break-before: always; }
|
||||
.no-print, .no-print *
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<page size="A4">
|
||||
<form method="post" action="{$_url}prepaid/print-voucher/" class="no-print">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="btn btn-default btn-sm">
|
||||
<tr>
|
||||
<td>ID more than <input type="text" name="from_id" width="4" value="{$from_id}"></td>
|
||||
<td>PageBreak after <input type="text" name="pagebreak" width="2" value="{$pagebreak}"> vouchers</td>
|
||||
<td><button type="submit">submit</button></td>
|
||||
</tr>
|
||||
</table><hr>
|
||||
<center><button type="button" id="actprint" class="btn btn-default btn-sm no-print">{$_L['Click_Here_to_Print']}</button><br>
|
||||
{$_L['Print_Info']}</center>
|
||||
</form>
|
||||
<div id="printable">
|
||||
<hr>
|
||||
{foreach $v as $vs}
|
||||
{$jml = $jml + 1}
|
||||
<table width="100%" height="200" border="0" cellspacing="0" cellpadding="1" style="margin-bottom:5px">
|
||||
<tbody>
|
||||
<tr><td align="center" valign="middle"></td></tr>
|
||||
<tr>
|
||||
<td align="center" valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td width="50%" valign="middle" style="padding-right:10px">
|
||||
<center><strong style="font-size:38px">{$_L['Voucher_Hotspot']}</strong><span class="no-print"> ID {$vs['id']}</span></center>
|
||||
<table width="100%" border="1" cellspacing="0" cellpadding="4" bordercolor="#757575">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:25px">{$_c['currency_code']} {number_format($vs['price'],2,$_c['dec_point'],$_c['thousands_sep'])}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:20px">{$_L['Code_Voucher']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:25px">{$vs['code']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:15px">{$vs['name_plan']}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" style="padding-left:10px">
|
||||
<center><strong style="font-size:38px">{$_c['CompanyName']}</strong></center>
|
||||
<table width="100%" border="1" cellspacing="0" cellpadding="4" bordercolor="#757575">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" align="left">Pendaftaran dan Informasi Billing buka <b>billing.ibnux.net</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" align="left">Wireless Hotspot:
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td>iBNuXnet</td>
|
||||
<td>iBNuXnet-P</td>
|
||||
<td>iBNuXnet-Q</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CitraGadingBlokP 3/4</td>
|
||||
<td>CitraGadingBlokQ 2/3/4/5/6</td>
|
||||
<td>iBNuXnet 5Ghz</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" align="left">Voucher yang sudah dibeli tidak dapat dikembalikan</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" align="center"><b>hotspot.ibnux.net</b></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
{if $jml == $pagebreak}
|
||||
{$jml = 0}
|
||||
<!-- pageBreak -->
|
||||
<div class="page-break"><div class="no-print" style="background-color: #E91E63; color:#FFF;" align="center">-- pageBreak --<hr></div></div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
</page>
|
||||
<script src="{$_theme}/scripts/jquery-1.10.2.js"></script>
|
||||
{if isset($xfooter)}
|
||||
{$xfooter}
|
||||
{/if}
|
||||
<script>
|
||||
jQuery(document).ready(function() {
|
||||
// initiate layout and plugins
|
||||
$("#actprint").click(function() {
|
||||
window.print();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -24,7 +24,7 @@
|
||||
<a href="{$_url}routers/add" class="btn btn-primary btn-block waves-effect"><i class="ion ion-android-add"> </i> {$_L['New_Router']}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -52,6 +52,7 @@
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{$paginator['contents']}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -60,8 +60,8 @@
|
||||
<li class="fullscreen hidden-xs">
|
||||
<a href="#"><i class="ion ion-qr-scanner"></i></a>
|
||||
</li>
|
||||
|
||||
<li class="notify-drop hidden-xs dropdown">
|
||||
<!-- Notification on progress, hide it -->
|
||||
<li class="notify-drop hidden-xs dropdown hidden">
|
||||
<a href="#" data-toggle="dropdown">
|
||||
<i class="ion ion-chatboxes"></i>
|
||||
<span class="badge badge-danger badge-xs circle">3</span>
|
||||
@ -135,7 +135,8 @@
|
||||
<span class="text">{$_L['Dashboard']}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li {if $_system_menu eq 'message'}class="open"{/if}>
|
||||
<!-- Message on progress, hide it -->
|
||||
<li class="hidden" {if $_system_menu eq 'message'}class="open"{/if}>
|
||||
<a href="#">
|
||||
<i class="ion ion-email"></i>
|
||||
<span class="text">{$_L['Private_Message']}</span>
|
||||
|
@ -23,7 +23,7 @@
|
||||
<a href="{$_url}settings/users-add" class="btn btn-primary btn-block waves-effect"><i class="ion ion-android-add"> </i> {$_L['Add_New_Administrator']}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -51,6 +51,7 @@
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{$paginator['contents']}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -20,13 +20,21 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<a href="{$_url}prepaid/add-voucher" class="btn btn-primary btn-block waves-effect"><i class="ion ion-android-add"> </i> {$_L['Add_Voucher']}</a>
|
||||
<div class="btn-group btn-group-justified" role="group">
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{$_url}prepaid/add-voucher" class="btn btn-primary btn-block waves-effect"><i class="ion ion-android-add"> </i> {$_L['Add_Voucher']}</a>
|
||||
</div>
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{$_url}prepaid/print-voucher" target="print_voucher" class="btn btn-info"><i class="ion ion-android-print"> </i> Print</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table id="datatable" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{$_L['Type']}</th>
|
||||
<th>{$_L['Routers']}</th>
|
||||
<th>{$_L['Plan_Name']}</th>
|
||||
@ -39,6 +47,7 @@
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr>
|
||||
<td>{$ds['id']}</td>
|
||||
<td>{$ds['type']}</td>
|
||||
<td>{$ds['routers']}</td>
|
||||
<td>{$ds['name_plan']}</td>
|
||||
@ -52,6 +61,7 @@
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{$paginator['contents']}
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user