revenue po zero rate accept, dash board

This commit is contained in:
venbatechnologies@gmail.com 2017-11-28 10:46:55 +05:30
parent 51a8396928
commit 93cd7cd232
6 changed files with 973 additions and 934 deletions

View File

@ -69,6 +69,17 @@ class user extends BaseController
$data['getTotalrevenuePoCount'] = $this->dahsboard_Model->getTotalrevenuePoCount();
//dashboard pie chart
$data['importbudgt'] = $this->dahsboard_Model->importbudgt();
$data['importbal'] = $this->dahsboard_Model->importbal();
$data['servicebudgt'] = $this->dahsboard_Model->servicebudgt();
$data['servicebal'] = $this->dahsboard_Model->servicebal();
$data['revenuebudgt'] = $this->dahsboard_Model->revenuebudgt();
$data['revenuebal'] = $this->dahsboard_Model->revenuebal();
$data['capitalbud'] = $this->dahsboard_Model->capitalbud();
$data['capitalbal'] = $this->dahsboard_Model->capitalbal();
$this->loadViews("dashboard", $this->global, $data , NULL);
}

View File

@ -853,6 +853,24 @@ group by supplier_name,material_name";
$query = $this->db->query($sql);
return $query->result();
}
function totalcapitalpo ()
{
$sql="SELECT count(cmast.PONO) as totalcapitalpo FROM T_PurchaseOrder_Master cmast
join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
join T_Requestion_Master req on req.ReqNo=line.ReqNo
join T_Status sta on sta.statusCode=req.status
where ReqType='CAPITAL'";
$query = $this->db->query($sql);
return $query->result();
}
function report_cum_day($sup=null,$mat=null){
$sql="SELECT sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,ifnull(mm.MaterialName,'-') as material_name,IF(pl.Quantity IS NULL or pl.Quantity = '', 0, sum(pl.Quantity)) as tquantity,ifnull(sum(pl.Quantity * pl.Rate),0) as ttotal
@ -868,4 +886,6 @@ group by supplier_name,material_name";
}
}
?>

View File

@ -7950,12 +7950,12 @@ $('.EditRevenue').click(function(){
$('#EditRevenueRate').focus();
return false;
}
else if($('#EditRevenueRate').val() == 0)
{
alert('Please Enter the Valid Rate of the Item');
$('#EditRevenueRate').focus();
return false;
}
// else if($('#EditRevenueRate').val() == 0)
// {
// alert('Please Enter the Valid Rate of the Item');
// $('#EditRevenueRate').focus();
// return false;
// }
else
{
return true;

72
application/views/dashboard.php Executable file → Normal file
View File

@ -46,7 +46,13 @@ if(!empty($EmpCount))
</div>
</div>
</center>
</section>
<div>
<marquee direction="up" scrollamount="2" height="150px;"> <font color="Brown"> <h1><b>Guidelines:</b></h1><h3> # PaySlip menu in header has two sub menu ( 1.Upload Salary , 2.PaySlip Generator)<br/><br/>
# Upload salary menu is used to upload the Salary Excel file into the database<br/><br/>
# Payslip generator menu is to generate the salary slip for individual Employess or All Employees</h3>
</center> </font></marquee>
</div>
</section>
</div>
<?php
@ -123,7 +129,7 @@ if(!empty($EmpCount))
</div>
</center>
<div>
<marquee direction="up" scrollamount="2" height="150px;">Hi This Is Manager Login </marquee>
</div>
</section>
</div>
@ -445,18 +451,19 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<!-- /.row -->
<div class="box-footer">
<div class="box-body">
<div class="row">
<div class="row">
<div class="col-xs-6 col-md-3 text-center">
<div class="description-block border-right">
<?php foreach($totalservicepo as $servicepo)
if(!empty($serviceprogress))
<?php foreach($servicebudgt as $service)
if(!empty($servicebal))
{
foreach($serviceprogress as $serviceprog)
foreach($servicebal as $serviceb)
{
?>
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php echo $serviceprog->serviceprogress;?> data-min="0" data-max=<?php echo $servicepo->totalservicepo;?> data-width="90" data-height="90" data-fgColor="#00c0ef "> <br>
<div class="knob-label"><strong>TOTAL SERVICE PURCHASE ORDER : <?php echo $servicepo->totalservicepo;?></strong></div>
<div class="knob-label"><strong>PROGRESS PURCHASE ORDER : <?php echo $serviceprog->serviceprogress;?></strong></div>
<div class="knob-label"><strong style="color:#00c0ef">SERVICE BUDGET</strong></div>
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php echo $serviceb->balservicebudget;?> data-min="20" data-max=<?php echo $service->totalservicebudget;?> data-width="" data-height="" data-fgColor="#00c0ef "> <br>
<div class="knob-label"><strong>TOTAL &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : <?php echo $service->totalservicebudget;?></strong></div>
<div class="knob-label"><strong>BALANCE : <?php echo $serviceb->balservicebudget;?></strong></div>
</div>
<?php
}
@ -468,19 +475,19 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<div class="description-block border-right">
<?php // if(!empty($totalrevenuepo))
// {
foreach($totalrevenuepo as $revenuepo)
if(!empty($revenueprogress))
foreach($revenuebudgt as $revenue)
if(!empty($revenuebal))
{
foreach($revenueprogress as $revenueprog)
foreach($revenuebal as $revenueb)
{
?>
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php echo $revenueprog->revenueprogress;?> data-min="0" data-max=<?php echo $revenuepo->totalrevenuepo;?> data-width="90" data-height="90" data-fgColor="#dd4b39 "> <br>
<div class="knob-label"><strong>TOTAL REVENUE PURCHASE ORDER : <?php echo $revenuepo->totalrevenuepo;?>
<div class="knob-label"><strong>PROGRESS PURCHASE ORDER : <?php echo $revenueprog->revenueprogress;?>
</strong></div>
</div>
<div class="knob-label"><strong style="color:#dd4b39">REVENUE BUDGET</strong></div>
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value="<?php echo $revenueb->balrevenuebudget;?> " data-min="0" data-max=<?php echo $revenue->totalrevenuebudget;?> data-width="" data-height="" data-fgColor="#dd4b39 "> <br>
<div class="knob-label"><strong>TOTAL &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : <?php echo $revenue->totalrevenuebudget;?> </strong> </div>
<div class="knob-label"><strong>BALANCE : <?php echo $revenueb->balrevenuebudget;?></strong> </div>
<?php
}
}
@ -490,35 +497,35 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<!-- ./col -->
<div class="col-xs-6 col-md-3 text-center">
<div class="description-block border-right">
<?php foreach($totalimportpo as $importpo)
if(!empty($importprogress)){
foreach($importprogress as $importprog)
<?php foreach($importbudgt as $import)
if(!empty($importbal)){
foreach($importbal as $importb)
{
?>
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php echo $importprog->importprogress;?> data-min="0" data-max=<?php echo $importpo->totalimportpo;?> data-width="90" data-height="90" data-fgColor="#00a65a "> <br>
<div class="knob-label"><strong>TOTAL IMPORT PURCHASE ORDER : <?php echo $importpo->totalimportpo;?> </strong></div>
<div class="knob-label"><strong>PROGRESS PURCHASE ORDER : <?php echo $importprog->importprogress;?> </strong></div>
<div class="knob-label"><strong style="color:#00a65a">IMPORT BUDGET</strong></div>
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php echo $importb->balimportbudget;?> data-min="0" data-max=<?php echo $import->totalimportbudget;?> data-width="" data-height="" data-fgColor="#00a65a "> <br>
<div class="knob-label"><strong>TOTAL &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : <?php echo $import->totalimportbudget;?> </strong></div>
<div class="knob-label"><strong>BALANCE : <?php echo $importb->balimportbudget;?> </strong></div>
</div>
<?php
}
}
?>
</div>
<!-- ./col -->
<div class="col-xs-6 col-md-3 text-center">
<div class="description-block border-right">
<?php foreach($totalcapitalpo as $capitalpo)
if(!empty($capitalprogress)){
foreach($capitalprogress as $capitalprog)
<?php foreach($capitalbud as $capital)
if(!empty($capitalbal)){
foreach($capitalbal as $capitalb)
{
?>
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php echo $capitalprog->capitalprogress;?> data-min="0" data-max=<?php echo $capitalpo->totalcapitalpo;?> data-width="90" data-height="90" data-fgColor="#f39c12 "><br>
<div class="knob-label"><strong>TOTAL CAPITAL PURCHASE ORDER : <?php echo $capitalpo->totalcapitalpo;?></strong></div>
<div class="knob-label"><strong>PROGRESS PURCHASE ORDER : <?php echo $capitalprog->capitalprogress;?>
</div>
<div class="knob-label"><strong style="color:#f39c12">CAPITAL BUDGET</strong></div>
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php echo $capitalb->balcapitalbudget;?> data-min="0" data-max=<?php echo $capital->totalcapitalbudget;?> data-fgColor="#f39c12 "><br>
<div class="knob-label"><strong>TOTAL &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : <?php echo $capital->totalcapitalbudget;?></strong></div>
<div class="knob-label"><strong>BALANCE : <?php echo $capitalb->balcapitalbudget;?></strong> </div>
<?php
}
}
@ -560,7 +567,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
element: 'bar-chart',
resize: true,
data: [
{y: 'January', a: <?php echo $revenuepo->totalrevenuepo;?> , b: 90, c: 50, d: 40},
{y: 'January', a: 100 , b: 90, c: 50, d: 40},
{y: 'February', a: 50, b: 40, c: 50, d: 40},
{y: 'March', a: 50, b: 40, c: 50, d: 40},
{y: 'April', a: 75, b: 65, c: 50, d: 40},
@ -589,6 +596,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
/* jQueryKnob */ $(".knob").knob({
/*change : function (value) {
//console.log("change : " + value);

View File

@ -2529,7 +2529,7 @@ function validateEditRevenueTax()
$('#EditQuantity').focus();
return false;
}
else if($('#EditRate').val() == '' || $('#EditRate').val() == 0)
else if($('#EditRate').val() == '')
{
alert('Please Enter the Rate of the Item');
$('#EditRate').focus();

View File

@ -143,12 +143,12 @@ function validateRevenueTax()
$('#Rate').focus();
return false;
}
else if($('#Rate').val() == "0")
{
alert('Please Enter the Valid Rate of the Item');
$('#Rate').focus();
return false;
}
// else if($('#Rate').val() == "0")
// {
// alert('Please Enter the Valid Rate of the Item');
// $('#Rate').focus();
// return false;
// }
else
{
return true;