pending purchase report changes
This commit is contained in:
parent
e17cd072fc
commit
e4fa30bf52
@ -693,24 +693,36 @@ group by Dept_Name";
|
|||||||
$sql="SELECT Cost_Center_Budget.CostCenterCode as Cost_Center_Code, CostCenterName as Cost_Center_Name,group_concat(distinct Dept_Details.DepartmentName) as Dept_Name,Cost_Center_Budget.BudgetType as BudgetType,Cost_Center_Budget.BudgetYear as BudgetYear,
|
$sql="SELECT Cost_Center_Budget.CostCenterCode as Cost_Center_Code, CostCenterName as Cost_Center_Name,group_concat(distinct Dept_Details.DepartmentName) as Dept_Name,Cost_Center_Budget.BudgetType as BudgetType,Cost_Center_Budget.BudgetYear as BudgetYear,
|
||||||
case Cost_Center_Budget.BudgetType
|
case Cost_Center_Budget.BudgetType
|
||||||
when 'IMPORT'
|
when 'IMPORT'
|
||||||
then ifnull((sum(distinct(PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0)
|
then
|
||||||
|
sum(distinct if(Cost_Center_Budget.BudgetType='IMPORT',
|
||||||
|
(PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate,0))
|
||||||
when 'CAPITAL'
|
when 'CAPITAL'
|
||||||
then ifnull(sum(distinct if(CapitalRange=0,(( PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate),( PO_Line_Item.Quantity * PO_Line_Item.Rate) - st.Afterdiscountval)),0)
|
then
|
||||||
when 'SERVICE'
|
sum(distinct if(Cost_Center_Budget.BudgetType='CAPITAL',
|
||||||
then ifnull((sum(distinct PO_Line_Item.Quantity * PO_Line_Item.Rate)),0)
|
if(CapitalRange=0,(( PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate),( PO_Line_Item.Quantity * PO_Line_Item.Rate) - st.Afterdiscountval),0))
|
||||||
when 'REVENUE'
|
when 'SERVICE'
|
||||||
then ifnull((sum(distinct PO_Line_Item.Quantity * PO_Line_Item.Rate) - sum(distinct T_Rev_Tax.AfterDiscount)),0)
|
then
|
||||||
|
sum(distinct if(Cost_Center_Budget.BudgetType='SERVICE',
|
||||||
|
PO_Line_Item.Quantity * PO_Line_Item.Rate,0))
|
||||||
|
when 'REVENUE'
|
||||||
|
then
|
||||||
|
sum(distinct if(Cost_Center_Budget.BudgetType='REVENUE',
|
||||||
|
(PO_Line_Item.Quantity * PO_Line_Item.Rate)-T_Rev_Tax.AfterDiscount,0))
|
||||||
end
|
end
|
||||||
as Util_Amount,
|
as Util_Amount,
|
||||||
case Cost_Center_Budget.BudgetType
|
case Cost_Center_Budget.BudgetType
|
||||||
when 'IMPORT'
|
when 'IMPORT'
|
||||||
then (Cost_Center_Budget.BudgetAmount - ifnull((sum(distinct(PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0))
|
then (Cost_Center_Budget.BudgetAmount - ifnull((sum(distinct if(Cost_Center_Budget.BudgetType='IMPORT',
|
||||||
|
(PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate,0))),0))
|
||||||
when 'CAPITAL'
|
when 'CAPITAL'
|
||||||
then (Cost_Center_Budget.BudgetAmount - ifnull(sum(distinct if(CapitalRange=0,(( PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate),( PO_Line_Item.Quantity * PO_Line_Item.Rate) - st.Afterdiscountval)),0))
|
then (Cost_Center_Budget.BudgetAmount - ifnull(sum(distinct if(Cost_Center_Budget.BudgetType='CAPITAL',
|
||||||
|
if(CapitalRange=0,(( PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate),( PO_Line_Item.Quantity * PO_Line_Item.Rate) - st.Afterdiscountval),0)),0))
|
||||||
when 'SERVICE'
|
when 'SERVICE'
|
||||||
then (Cost_Center_Budget.BudgetAmount - ifnull((sum(distinct PO_Line_Item.Quantity * PO_Line_Item.Rate)),0))
|
then (Cost_Center_Budget.BudgetAmount - ifnull((sum(distinct if(Cost_Center_Budget.BudgetType='SERVICE',
|
||||||
|
PO_Line_Item.Quantity * PO_Line_Item.Rate,0))),0))
|
||||||
when 'REVENUE'
|
when 'REVENUE'
|
||||||
then (Cost_Center_Budget.BudgetAmount - ifnull((sum(distinct PO_Line_Item.Quantity * PO_Line_Item.Rate) - sum(distinct T_Rev_Tax.AfterDiscount)),0))
|
then (Cost_Center_Budget.BudgetAmount - ifnull((sum(distinct if(Cost_Center_Budget.BudgetType='REVENUE',
|
||||||
|
(PO_Line_Item.Quantity * PO_Line_Item.Rate)-T_Rev_Tax.AfterDiscount,0))),0))
|
||||||
end
|
end
|
||||||
as Avlbl_Amt
|
as Avlbl_Amt
|
||||||
from T_CostCenter_Budget Cost_Center_Budget
|
from T_CostCenter_Budget Cost_Center_Budget
|
||||||
@ -1998,7 +2010,7 @@ from T_PurchaseOrder_LineItem pl
|
|||||||
join T_PurchaseOrder_Master po on po.PONO = pl.PONO
|
join T_PurchaseOrder_Master po on po.PONO = pl.PONO
|
||||||
join T_SupplierDetailsN sup on sup.SupplierID=po.SupplierID
|
join T_SupplierDetailsN sup on sup.SupplierID=po.SupplierID
|
||||||
join T_MaterialMaster mm on mm.MaterialCode=pl.MaterialCode
|
join T_MaterialMaster mm on mm.MaterialCode=pl.MaterialCode
|
||||||
where po.Status != 'ST030'
|
where po.Status != 'ST030' and po.Status = 'ST026'
|
||||||
";
|
";
|
||||||
if ($cname!= ''){
|
if ($cname!= ''){
|
||||||
|
|
||||||
|
|||||||
@ -29,13 +29,13 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-3">
|
<div class="col-xs-3">
|
||||||
<h4><span class="fa fa-superpowers"> Material Master </span></h4>
|
<h4><span class="fa fa-codepen"> Material Master </span></h4>
|
||||||
<a href="<?php echo base_url(); ?>Report_Material_Supplier" target="_blank" ><p class="uk-text uk-margin-remove">Material Master - supplier wise</p></a>
|
<a href="<?php echo base_url(); ?>Report_Material_Supplier" target="_blank" ><p class="uk-text uk-margin-remove">Material Master - supplier wise</p></a>
|
||||||
<a href="<?php echo base_url(); ?>Report_Material_Item" target="_blank" ><p class="uk-text uk-margin-remove">Material Master - Item wise</p></a>
|
<a href="<?php echo base_url(); ?>Report_Material_Item" target="_blank" ><p class="uk-text uk-margin-remove">Material Master - Item wise</p></a>
|
||||||
<a href="<?php echo base_url(); ?>Report_Material_ReceiptValue" target="_blank" ><p class="uk-text uk-margin-remove">Material Master - Receipt Value</p></a>
|
<a href="<?php echo base_url(); ?>Report_Material_ReceiptValue" target="_blank" ><p class="uk-text uk-margin-remove">Material Master - Receipt Value</p></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-3">
|
<div class="col-xs-3">
|
||||||
<h4><span class="fa fa-cart-arrow-down"> Inward</span></h4>
|
<h4><span class="fa fa-truck"> Inward</span></h4>
|
||||||
<a href="<?php echo base_url(); ?>Report_purchase_inward" target="_blank" >Purchase<p class="uk-text uk-margin-remove"></p></a>
|
<a href="<?php echo base_url(); ?>Report_purchase_inward" target="_blank" >Purchase<p class="uk-text uk-margin-remove"></p></a>
|
||||||
<a href="<?php echo base_url(); ?>Report_year_wise_inward" target="_blank" >Year Wise<p class="uk-text-meta uk-margin-remove"></p></a>
|
<a href="<?php echo base_url(); ?>Report_year_wise_inward" target="_blank" >Year Wise<p class="uk-text-meta uk-margin-remove"></p></a>
|
||||||
<a href="<?php echo base_url(); ?>Report_supplier_inward" target="_blank" >Purchase Supplier - Wise<p class="uk-text uk-margin-remove"></p></a>
|
<a href="<?php echo base_url(); ?>Report_supplier_inward" target="_blank" >Purchase Supplier - Wise<p class="uk-text uk-margin-remove"></p></a>
|
||||||
|
|||||||
@ -363,7 +363,7 @@ if(!empty($Emp))
|
|||||||
<a class="btn btn-primary Save" ID="Save" onclick="Save()" > <span class="bold">Save</span></a>
|
<a class="btn btn-primary Save" ID="Save" onclick="Save()" > <span class="bold">Save</span></a>
|
||||||
|
|
||||||
<input type="submit" value="submit" class="btn btn-primary" >
|
<input type="submit" value="submit" class="btn btn-primary" >
|
||||||
<input type="reset" class="btn btn-primary">
|
<input type="reset" value="Reset" class="btn btn-primary" onclick="window.location.reload();">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user