<!DOCTYPE html>
< html >
< head >
< meta charset = "utf-8" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
< title > AdminKW | Stock In< / title >
<!-- Tell the browser to be responsive to screen width -->
< meta content = "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name = "viewport" >
<!-- Bootstrap 3.3.5 -->
< link rel = "stylesheet" href = "adminlte/bootstrap/css/bootstrap.min.css" >
<!-- Font Awesome -->
< link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" >
<!-- Ionicons -->
< link rel = "stylesheet" href = "https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" >
<!-- bootstrap datepicker -->
< link rel = "stylesheet" href = "adminlte/plugins/datepicker/datepicker3.css" >
<!-- Select2 -->
< link rel = "stylesheet" href = "adminlte/plugins/select2/select2.min.css" >
<!-- DataTables -->
< link rel = "stylesheet" href = "adminlte/plugins/datatables/dataTables.bootstrap.css" >
<!-- Theme style -->
< link rel = "stylesheet" href = "adminlte/dist/css/AdminLTE.min.css" >
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
< link rel = "stylesheet" href = "adminlte/dist/css/skins/_all-skins.min.css" >
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!-- [if lt IE 9]>
< script src = "https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js" > < / script >
< script src = "https://oss.maxcdn.com/respond/1.4.2/respond.min.js" > < / script >
<![endif]-->
< / head >
< body class = "hold-transition skin-blue sidebar-mini" >
<!-- Modal Stock In From Delivery -->
< div id = "mdlStockInFromDelivery" class = "modal fade" role = "dialog" aria-hidden = "true" >
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-header" >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" >
< span aria-hidden = "true" > × < / span > < / button >
< h4 class = "modal-title" > Add New Stock from Delivery< / h4 >
< / div >
<!-- form start -->
<?php echo form_open ( 'addStockInNewFromDelivery?transDate=' . $selectedDate . '&drNo=' . $drNo ); ?>
< div class = "modal-body" >
< div class = "row" >
< div class = "col-xs-12" >
< div class = "table-responsive" >
< table id = "dtStockInListFromDelivery" class = "table table-bordered table-striped" >
< thead > < th > Itemcode< / th > < th > Model No< / th > < th > Category< / th > < th > SRP< / th > < th > Qty< / th > < / thead >
< tbody > <?php echo $htmlBrDeliveryList ; ?> </ tbody >
< / table >
< / div >
< / div >
< / div >
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-default" data-dismiss = "modal" > Close< / button >
< button type = "submit" class = "btn btn-primary" <?php if ( $drNo == 0 ) echo "disabled" ; ?> > Save Delivery Info as Stock In</ button >
< / div >
< / form >
< / div >
<!-- /.modal - content -->
< / div >
<!-- /.modal - dialog -->
< / div >
<!-- /.modal -->
<!-- /.Modal Stock In From Delivery -->
<!-- Modal Stock In -->
< div id = "mdlStockIn" class = "modal fade" role = "dialog" aria-hidden = "true" >
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-header" >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" >
< span aria-hidden = "true" > × < / span > < / button >
< h4 class = "modal-title" > Add New Stock< / h4 >
< / div >
<!-- form start -->
<?php echo form_open ( 'addStockInNew?transDate=' . $selectedDate . '&drNo=' . $drNo ); ?>
< div class = "modal-body" >
< div class = "row" >
< div class = "col-lg-5 col-xs-12" >
< div class = "form-group" >
< label > Delivery Receipt< / label >
< input type = "text" class = "form-control" id = "txtDRNo" name = "txtDRNo" value = " <?php echo $drNo ; ?> " disabled >
< / div >
< / div >
< div class = "col-lg-7 col-xs-12" >
< div class = "form-group" >
< label > Select Category< / label >
< select id = "cmbCategory" name = "cmbCategory" class = "form-control select2" style = "width: 100%;" onchange = "onCategoryChange()" >
<?php if ( isset ( $htmlCategoryList )) echo $htmlCategoryList ; else echo "<option>none</option>" ?>
< / select >
< / div >
< / div >
< / div >
< div class = "row" >
< div class = "col-lg-7 col-xs-12" >
< div class = "form-group" >
< label > Model Number< / label >
< input type = "text" class = "form-control" id = "txtModelNo" name = "txtModelNo" >
< / div >
< / div >
< div class = "col-lg-5 col-xs-12" >
< div class = "form-group" >
< label > Quantity< / label >
< input type = "number" class = "form-control" id = "txtQty" name = "txtQty" value = "1" min = "0" step = "1" >
< / div >
< / div >
< / div >
<?php if ( $drNo == 0 ) echo '<p class="text-red">Cannot add an item without assigning Transaction Date and Delivery Reciept Number. Please set initial data.</p>' ; ?>
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-default" data-dismiss = "modal" > Close< / button >
< button type = "submit" class = "btn btn-primary" <?php if ( $drNo == 0 ) echo "disabled" ; ?> > Save changes</ button >
< / div >
< / form >
< / div >
<!-- /.modal - content -->
< / div >
<!-- /.modal - dialog -->
< / div >
<!-- /.modal -->
<!-- /.Modal Member Enrolment -->
<!-- Place top bar here -->
<!-- Site wrapper -->
< div class = "wrapper" >
< header class = "main-header" >
<!-- Logo -->
< a href = " <?php site_url (); ?> " class = "logo" >
<!-- mini logo for sidebar mini 50x50 pixels -->
< span class = "logo-mini" > < b > A< / b > KW< / span >
<!-- logo for regular state and mobile devices -->
< span class = "logo-lg" >< b > <?php echo $this -> session -> user [ "branch" ]; ?> </ b > Branch</ span >
< / a >
<?php $this -> load -> view ( 'pages/topnav' ); ?>
< / header >
<!-- Left navigation -->
<?php $this -> load -> view ( 'pages/leftnav' ); ?>
<!-- Content Wrapper. Contains page content -->
< div class = "content-wrapper" >
<!-- Content Header (Page header) -->
< section class = "content-header" >
< h1 >
Stock In
< small > it all starts here< / small >
< / h1 >
< ol class = "breadcrumb" >
< li >< a href = " <?php echo site_url (); ?> " >< i class = "fa fa-dashboard" ></ i > Home</ a ></ li >
< li > < a href = "#" > Examples< / a > < / li >
< li class = "active" > Blank page< / li >
< / ol >
< / section >
<!-- Main content -->
< section class = "content" >
<?php
if(validation_errors() != "")
{
?>
< div class = "alert alert-danger alert-dismissable" >
< button type = "button" class = "close" data-dismiss = "alert" aria-hidden = "true" > × < / button >
< h4 > < i class = "icon fa fa-ban" > < / i > Opppppps!< / h4 >
<?php echo validation_errors (); ?>
< / div >
<?php } ?>
< form action = "/stockinnew?transDate=" <? = $selectedDate ; ?> method = "get" >
< div class = "box box-info" >
< div class = "box-header with-broder" >
< h3 class = "box-title" > Setting Iinitial Information< / h3 >
< / div >
< div class = "box-body" >
< div class = "row" >
< div class = "col-lg-12" >
< p > Set initial data for transaction date and the delivery receipt number that you are about to enter for this specific date.< / p >
< / div >
< / div >
< div class = "row" >
< div class = "col-lg-6 col-xs-12" >
< div class = "form-group" >
< label for = "transDate" > Transaction Date< / label >
< div class = "input-group" >
< div class = "input-group-addon" >
< i class = "fa fa-calendar" > < / i >
< / div >
< input id = "transDate" name = "transDate" type = "text" class = "form-control datepicker" data-inputmask = "'alias': 'mm/dd/yyyy'" data-mask value = " <?php echo $selectedDate ; ?> " >
< / div >
< / div >
< / div >
< div class = "col-lg-6 col-xs-12" >
< label for = "transDate" > Delivery Receipt< / label >
< input type = "text" class = "form-control" id = "drNo" name = "drNo" value = " <?php echo $drNo ; ?> " >
< / div >
< / div >
< / div >
< div class = "box-footer with-border" >
< button class = "btn btn-info btn-flat" type = "submit" > Set Initial Data< / button >
< / div >
< / div >
< / form >
<!-- Default box -->
< div class = "box" >
< div class = "box-header with-border" >
< h3 class = "box-title" > Transasction Result for date <?php echo $selectedDate ; ?> </ h3 >
< / div >
< div class = "box-body" >
< div class = "row" >
< div class = "col-xs-12" >
< div class = "table-responsive" >
< table id = "dtStockInList" class = "table table-bordered table-striped" >
< thead > < th > DR No.< / th > < th > Cat Code< / th > < th > Model No< / th > < th > Qty< / th > < th > Date< / th > < th > Validated< / th > < / thead >
< tbody > <?php echo $htmlTableList ; ?> </ tbody >
< / table >
< / div >
< / div >
< / div >
< / div > <!-- /.box - body -->
< div class = "box-footer" >
< button type = "button" class = "btn btn-primary" data-dismiss = "modal" data-toggle = "modal" data-target = "#mdlStockIn" > Add New Stock< / button >
< button type = "button" class = "btn btn-primary" data-dismiss = "modal" data-toggle = "modal" data-target = "#mdlStockInFromDelivery" > Add New Stock From Delivery< / button >
< / div > <!-- /.box - footer -->
< / div > <!-- /.box -->
< / section > <!-- /.content -->
< / div > <!-- /.content - wrapper -->
< footer class = "main-footer" >
< div class = "pull-right hidden-xs" >
< b > Version< / b > 2.3.0
< / div >
< strong > Copyright © 2014-2015 < a href = "http://almsaeedstudio.com" > Almsaeed Studio< / a > .< / strong > All rights reserved.
< / footer >
< / div > <!-- ./wrapper -->
<!-- jQuery 2.1.4 -->
< script src = "adminlte/plugins/jQuery/jQuery-2.1.4.min.js" > < / script >
<!-- Bootstrap 3.3.5 -->
< script src = "adminlte/bootstrap/js/bootstrap.min.js" > < / script >
<!-- InputMask -->
< script src = "adminlte/plugins/input-mask/jquery.inputmask.js" > < / script >
< script src = "adminlte/plugins/input-mask/jquery.inputmask.date.extensions.js" > < / script >
< script src = "adminlte/plugins/input-mask/jquery.inputmask.extensions.js" > < / script >
<!-- datepicker -->
< script src = "adminlte/plugins/datepicker/bootstrap-datepicker.js" > < / script >
<!-- DataTables -->
< script src = "adminlte/plugins/datatables/jquery.dataTables.min.js" > < / script >
< script src = "adminlte/plugins/datatables/dataTables.bootstrap.min.js" > < / script >
<!-- SlimScroll -->
< script src = "adminlte/plugins/slimScroll/jquery.slimscroll.min.js" > < / script >
<!-- FastClick -->
< script src = "adminlte/plugins/fastclick/fastclick.min.js" > < / script >
<!-- AdminLTE App -->
< script src = "adminlte/dist/js/app.min.js" > < / script >
<!-- Select2 -->
< script src = "adminlte/plugins/select2/select2.full.min.js" > < / script >
< script >
$(function () {
//Initialize Select2 Elements
$(".select2").select2();
//Datemask dd/mm/yyyy
//$("#dtTransDate").inputmask("mm/dd/yyyy", {"placeholder": "mm/dd/yyyy"});
$('.datepicker').datepicker({
format: 'mm/dd/yyyy'
});
//Money Euro
$("[data-mask]").inputmask();
$('#dtStockInList').DataTable({
"paging": true,
"lengthChange": false,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": false
});
});
function onCategoryChange()
{
$("#txtModelNo").val($('#cmbCategory').find(":selected").val() + "-");
}
< / script >
< / body >
< / html >