capital and import issues fixes

This commit is contained in:
venbatechnologies@gmail.com 2017-10-24 18:29:48 +05:30
parent 0b46c09e96
commit 1540e6b40a
5 changed files with 32 additions and 8 deletions

View File

@ -1627,7 +1627,7 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
function GetCapitalTaxListDetails($PONO = '',$CapitalRange=''){ function GetCapitalTaxListDetails($PONO = '',$CapitalRange=''){
if($CapitalRange==1){ if($CapitalRange==1){
$taxQuery ='SELECT group_concat(pl.MaterialCode ORDER BY pl.MaterialCode ASC) as Itemcode,SUM(st.`After_CGST`) AS TotalCGST,SUM(st.`After_SGST`) AS TotalSGST,SUM(st.`After_IGST`) AS TotalIGST,SUM(st.`otherallowance`) AS TotalOtherAllowance,SUM(st.`Afterdiscountval`) AS TotalDiscount,st.discountval,st.Afterdiscountval,st.CGST,st.SGST,st.IGST,st.otherallowance FROM T_Service_Tax st $taxQuery ='SELECT group_concat(pl.MaterialCode ORDER BY pl.MaterialCode ASC) as Itemcode,SUM(st.`After_CGST`) AS TotalCGST,SUM(st.`After_SGST`) AS TotalSGST,SUM(st.`After_IGST`) AS TotalIGST,SUM(st.`otherallowance`) AS TotalOtherAllowance,SUM(st.`Afterdiscountval`) AS TotalDiscount,st.discountval,st.Afterdiscountval,st.CGST,st.SGST,st.IGST,st.otherallowance,SUM(st.`AfterFreightValue`) AS TotalFreight,st.FreightValue FROM T_Service_Tax st
join T_PurchaseOrder_LineItem pl on pl.LineItemNo=st.LineItemNo join T_PurchaseOrder_LineItem pl on pl.LineItemNo=st.LineItemNo
join T_PurchaseOrder_Master pm on pm.PONO=pl.PONO join T_PurchaseOrder_Master pm on pm.PONO=pl.PONO
where pm.POType=? and pm.PONO=? where pm.POType=? and pm.PONO=?
@ -1637,7 +1637,9 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
return $query->result(); return $query->result();
} }
else if($CapitalRange==0){ else if($CapitalRange==0){
$taxQuery ='SELECT group_concat(pl.MaterialCode ORDER BY pl.MaterialCode ASC) as Itemcode,SUM(it.`AfterFreightValue`) AS TotalFreight,it.FreightValue,it.AfterFreightValue FROM T_Import_Tax it $taxQuery ='SELECT group_concat(pl.MaterialCode ORDER BY pl.MaterialCode ASC) as Itemcode,
SUM(it.`AfterFreightValue`) AS TotalFreight,it.FreightValue,it.AfterFreightValue,
SUM(it.`AfterIGST`) AS TotalIGST FROM T_Import_Tax it
join T_PurchaseOrder_LineItem pl on pl.LineItemNo=it.LineItemNo join T_PurchaseOrder_LineItem pl on pl.LineItemNo=it.LineItemNo
join T_PurchaseOrder_Master pm on pm.PONO=pl.PONO join T_PurchaseOrder_Master pm on pm.PONO=pl.PONO
where pm.POType=? and pm.PONO=? where pm.POType=? and pm.PONO=?

View File

@ -544,7 +544,8 @@
$TotalIgst=$TotalIgst+$st->TotalIGST; $TotalIgst=$TotalIgst+$st->TotalIGST;
$TotalDiscount=$TotalDiscount+$st->TotalDiscount; $TotalDiscount=$TotalDiscount+$st->TotalDiscount;
$TotalOtherAllowance=$TotalOtherAllowance+$st->TotalOtherAllowance; $TotalOtherAllowance=$TotalOtherAllowance+$st->TotalOtherAllowance;
$TotalFreight='-'; $TotalFreight=$TotalFreight+$st->TotalFreight;
// $TotalFreight='-';
?> ?>
<?php if($st->TotalDiscount>0 && $st->TotalDiscount!='') { ?> <?php if($st->TotalDiscount>0 && $st->TotalDiscount!='') { ?>
@ -577,11 +578,18 @@
<td> <?php echo '-'; ?> </td> <td> <?php echo '-'; ?> </td>
<?php } ?> <?php } ?>
<!-- <td><?php echo $st->TotalOtherAllowance;?></td> --> <!-- <td><?php echo $st->TotalOtherAllowance;?></td> -->
<td><?php echo '-';?></td> <!-- <td><?php echo '-';?></td> -->
<?php if($st->TotalFreight>0 && $st->TotalFreight!='') { ?>
<td> <?php echo number_format($st->TotalFreight,2); ?> </td>
<?php } else { ?>
<td> <?php echo '-'; ?> </td>
<?php } ?>
<?php } else if($CapitalRange==0) { <?php } else if($CapitalRange==0) {
$TotalCgst='-'; $TotalCgst='-';
$TotalSgst='-'; $TotalSgst='-';
$TotalIgst='-'; // $TotalIgst='-';
$TotalIgst=$TotalIgst+$st->TotalIGST;
$TotalDiscount='-'; $TotalDiscount='-';
$TotalOtherAllowance='-'; $TotalOtherAllowance='-';
$TotalFreight=$TotalFreight+$st->TotalFreight; $TotalFreight=$TotalFreight+$st->TotalFreight;
@ -589,7 +597,12 @@
<td><?php echo '-';?></td> <td><?php echo '-';?></td>
<td><?php echo '-';?></td> <td><?php echo '-';?></td>
<td><?php echo '-';?></td> <td><?php echo '-';?></td>
<td><?php echo '-';?></td> <?php if($st->TotalIGST>0 && $st->TotalIGST!='') { ?>
<td> <?php echo $st->TotalIGST; ?> </td>
<?php } else { ?>
<td> <?php echo '-'; ?> </td>
<?php } ?>
<!-- <td><?php echo '-';?></td> -->
<td><?php echo '-';?></td> <td><?php echo '-';?></td>
<?php if($st->TotalFreight>0 && $st->TotalFreight!='') { ?> <?php if($st->TotalFreight>0 && $st->TotalFreight!='') { ?>
<td> <?php echo number_format($st->TotalFreight,2); ?> </td> <td> <?php echo number_format($st->TotalFreight,2); ?> </td>
@ -610,11 +623,14 @@
$TotalIgst1=$TotalIgst; $TotalIgst1=$TotalIgst;
$TotalDiscount1=$TotalDiscount; $TotalDiscount1=$TotalDiscount;
$TotalOtherAllowance1=$TotalOtherAllowance; $TotalOtherAllowance1=$TotalOtherAllowance;
$TotalFreight1=$TotalFreight;
} }
else if($CapitalRange==0){ else if($CapitalRange==0){
$TotalIgst1=$TotalIgst;
$TotalFreight1=$TotalFreight; $TotalFreight1=$TotalFreight;
} }
?> ?>
&nbsp; &nbsp;

View File

@ -65,7 +65,7 @@ if(!empty($ReqPOType))
} }
else else
{ {
document.getElementById('DisplayScheduleDiv').style.display = 'block'; document.getElementById('DisplayScheduleDiv').style.display = 'none';
document.getElementById('ServicePeriodOption').style.display = 'none'; document.getElementById('ServicePeriodOption').style.display = 'none';
document.getElementById('NoServices').style.display = 'none'; document.getElementById('NoServices').style.display = 'none';

View File

@ -2083,6 +2083,9 @@ $(document).ready(function () {
$('#Schedulediv').show(); $('#Schedulediv').show();
}); });
}); });
</script>
<script type="text/javascript">
$(document).on('change',".changetodecimal", function(){ $(document).on('change',".changetodecimal", function(){
@ -2114,11 +2117,13 @@ var insure=$('#Insurance').val();
if(insure=='1') if(insure=='1')
{ {
$('#insurancenum').show(); $('#insurancenum').show();
$('#insurancenumber').val('Yes');
} }
else else
{ {
$('#insurancenum').hide(); $('#insurancenum').hide();
('#insurancenumber').val('');
} }
}); });

View File

@ -3560,7 +3560,8 @@ $("#insurance").change(function(){
$("#insuranceno").val(""); $("#insuranceno").val("");
} }
else { else {
$("#insurancenodiv").show();} $("#insurancenodiv").show();
$("#insuranceno").val('Yes');}
}); });
$("#EDITREVENUE").on("shown.bs.modal", function(e) { $("#EDITREVENUE").on("shown.bs.modal", function(e) {