revenue bug fixed

This commit is contained in:
venbatechnologies@gmail.com 2017-07-28 16:28:13 +05:30
parent 48b910051d
commit da49512857
7 changed files with 66 additions and 38 deletions

View File

@ -2412,7 +2412,7 @@ function populateValueMainFormForDeleteItem(rowid)
</div>
<div class="col-md-8">
<label>Service Description</label> <?php
$data = array('name' => 'EdittxtSpcialInstructionSingle','value' => set_value('EdittxtSpcialInstructionSingle'),'id'=>'EdittxtSpcialInstructionSingle', 'class' => 'form-control num' );
$data = array('name' => 'EdittxtSpcialInstructionSingle','value' => set_value('EdittxtSpcialInstructionSingle'),'id'=>'EdittxtSpcialInstructionSingle', 'class' => 'form-control' );
echo form_input($data); ?>
</div>
</div>
@ -3384,7 +3384,7 @@ function populateValueMainFormForDeleteItem(rowid)
</div>
<div class="col-md-8">
<label>Service Description</label> <?php
$data = array('name' => 'txtSpcialInstructionSingle','value' => set_value('txtSpcialInstructionSingle'),'id'=>'txtSpcialInstructionSingle', 'class' => 'form-control num' );
$data = array('name' => 'txtSpcialInstructionSingle','value' => set_value('txtSpcialInstructionSingle'),'id'=>'txtSpcialInstructionSingle', 'class' => 'form-control' );
echo form_input($data); ?>
</div>
</div>
@ -4781,7 +4781,7 @@ function populateValueMainFormForDeleteItem(rowid)
<div class="col-md-12">
<div class="col-md-12">
<label>Scope Of Work</label> <?php
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction'),'id'=>'txtSpcialInstruction', 'class' => 'form-control num' ,'rows' => '4', 'cols' => '40' );
$data = array('name' => 'ScopeOfWork','value' => set_value('ScopeOfWork'),'id'=>'ScopeOfWork', 'class' => 'form-control num' ,'rows' => '4', 'cols' => '40' );
echo form_textarea($data); ?>
</div>
</div>
@ -5868,7 +5868,7 @@ function populateValueMainFormForDeleteItem(rowid)
$('#EditTotalOrderValue').val(cellval[9].innerHTML);
$('#EditOtherAllowances').val($('#OtherAmt'+userid).val());
$('#EdittxtSpcialInstructionSingle').val($('#ItemServiceDescription'+userid).val());
if($('#Frequency'+userid).val()!='Recurring'){
if($('#FrequencySchedule'+userid).val()!='Recurring'){
$('#EditFrequencyChange').val('One time');
@ -6207,7 +6207,7 @@ $('#content').loader('hide');
stat = '<?php echo REQITEM_Emergency_PO_CREATED; ?>';
}
tinyMCE.triggerSave();
var splinstr = $('#ScopeOfWork').val();
$('#ScopeOfWork').val(splinstr);
var deladd = $('#DeliveryAddr').val();
@ -6217,7 +6217,7 @@ $('#content').loader('hide');
var TextRowCount = $('#txtRowCount').val();
var TextDeletedRowCount = $('#txtDeletedRow').val();
var TextTotalOrderValueSummaryService = $('#txtTotalOrderValueSummaryService').val();
var TextSpcialInstruction = $('#txtSpcialInstruction').val();
var TextSpcialInstruction = $('#ScopeOfWork').val();
var TextStatus = stat;
var PaymentMethod = $('#PaymentMethod').val();
@ -6934,5 +6934,4 @@ function calculateRevenueEditTaxValue()
return tot;
}
</script>
</script>

View File

@ -231,8 +231,8 @@
<td><?php echo $record->MaterialName ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo $record->UOM ; ?></td>
<td align="right"><?php echo number_format(($record->Rate),2) ; ?></td>
<td align="right"><?php echo number_format(($record->Quantity * $record->Rate),2);?></td>
<td align="right"><?php echo number_format(($record->Rate),2, '.', '') ; ?></td>
<td align="right"><?php echo number_format(($record->Quantity * $record->Rate),2, '.', '');?></td>
</tr>
@ -258,7 +258,7 @@
<td style="text-align: center;" ><strong>Total Amount In Words</strong><br /><br /><em><?php echo $TotalAmountInWords." "."Only.";?></em></td>
<td style="text-align: center;" ><?php if($currencyName!='INR'){ ?>
Total Order Amount in <?php echo "$currencyName"."("."$currencyCode".")" ?><?php } else { ?><b>Total Order Amount in <?php echo "$currencyName"; ?><?php } ?> </b> <br/><?php if($currencyName!='INR'){ ?><?php echo number_format($OrderValue,2); } else {?> <?php echo number_format($OrderValue,2);}?></td>
Total Order Amount in <?php echo "$currencyName"."("."$currencyCode".")" ?><?php } else { ?><b>Total Order Amount in <?php echo "$currencyName"; ?><?php } ?> </b> <br/><?php if($currencyName!='INR'){ ?><?php echo number_format($OrderValue,2); } else {?> <?php echo number_format($OrderValue,2, '.', '');}?></td>
</tr>
<tr>

View File

@ -166,10 +166,10 @@ function vaildateBeforeOpenModal()
$('#currencytype').focus();
return false;
}
else if($('#ExchangeRate').val() == '')
else if($('#ExchangeRt').val() == '')
{
alert('Please Enter the Exchange Rate');
$('#ExchangeRate').focus();
$('#ExchangeRt').focus();
return false;
}
@ -1144,6 +1144,15 @@ function vaildateBeforeOpenModal()
?>
</div>
</div>
<div class="col-md-6">
<label>Avail Bud Amount</label>
<div class="form-group">
<?php
$data = array('name' => 'EditCapitalbudAmt','value' => set_value('EditCapitalbudAmt'),'id'=>'EditCapitalbudAmt', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-2" id="hideModalExchangeEdit">
@ -1835,7 +1844,7 @@ function vaildateBeforeOpenModal()
<label >Total Order Value<?php echo "($INR)"?> </label>
<?php
$data = array('name' => 'CapitalToatlOrder','value' => set_value('CapitalToatlOrder'),'id'=>'CapitalToatlOrder', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
$data = array('name' => 'CapitalToatlOrder','value' => set_value('CapitalToatlOrder'),'id'=>'CapitalToatlOrder', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:left;');
echo form_input($data);
?>
</div>

View File

@ -2705,7 +2705,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
<label >Total Order Value<?php echo "($INR)"?> </label>
<?php
$data = array('name' => 'CapitalToatlOrder','value' => set_value('CapitalToatlOrder',number_format($totalCapitalOrder, 2, '.', '')),'id'=>'CapitalToatlOrder', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
$data = array('name' => 'CapitalToatlOrder','value' => set_value('CapitalToatlOrder',number_format($totalCapitalOrder, 2, '.', '')),'id'=>'CapitalToatlOrder', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:left;');
echo form_input($data);
?>
</div>

View File

@ -1756,7 +1756,7 @@ return true;
var txtQuantity = parseFloat( $('#EditQuantity').val());
var txtUnitPrice = parseFloat($('#EditRate').val());
var Tot = txtQuantity * txtUnitPrice
$('#txtEditBasicValue').val(Tot);
$('#txtEditBasicValue').val(parseFloat(Tot).toFixed(2));
if($("#EditCgst").val()!=''){
@ -1771,10 +1771,16 @@ return true;
$('#EditAfterIgst').val(calculateIgstTax($('#txtEditBasicValue').val(),$('#EditIgst').val()));
}
calculateDiscount(1);
calculatePackaging(1);
calculateFreight(1);
if ($("#DiscountType").val()!=0) {
calculateDiscount(1);
}
if ($("#PackagingType").val()!=0) {
calculatePackaging(1);
}
if($("#drpFreight").val()!=0){
calculateFreight(1);
}
calculateEditTotalValue($('#isEdit').val());
}
@ -3177,7 +3183,8 @@ $('.AddRevenue').click(function(){
var AfterFreightVal = $("#txtAfterFreight").val();
var basicval = $("#txtBasicValue").val();
var Insval = parseFloat($("#txtInsurance").val()).toFixed(2);
var Insval = parseFloat($('#txtInsurance').val() == '' ? '0.00' : $('#txtInsurance').val()).toFixed(2);
var TotalOrderValue = $("#txtTotalOrderValue").val();
var Cgst = $("#Cgst").val();
var AfterCgst = $("#AfterCgst").val();
@ -3722,11 +3729,18 @@ function change(){
$('#AfterIgst').val(calculateIgstTax($('#txtBasicValue').val(),$('#Igst').val()));
}
calculateDiscount(0);
calculatePackaging(0);
if ($("#DiscountType").val()!=0) {
calculateDiscount(0);
}
if ($("#PackagingType").val()!=0) {
calculatePackaging(0);
}
if($("#drpFreight").val()!=0){
calculateFreight(0);
}
calculateFreight(0);
calculateTotalValue();

View File

@ -204,7 +204,7 @@
<td align="right"><?php echo $record->AfterPackagingValue;?></td>
<td align="right"><?php echo $record->AfterFreightValue;?></td>
<td align="right"><?php echo $record->Insurance;?></td>
<td align="right"><?php echo number_format($TotalAmount,2) ; ?></td>
<td align="right"><?php echo number_format($TotalAmount, 2, '.', '') ; ?></td>
</tr>
<?php
@ -245,19 +245,19 @@
</td>
<td style="text-align: right;"><strong>Total Amount Before Tax In INR <?php echo number_format($SubTotalAmount,2);?></strong></td>
<td style="text-align: right;"><strong>Total Amount Before Tax In INR <?php echo number_format($SubTotalAmount, 2, '.', '');?></strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Tax Amount In INR <?php echo number_format($TotalTax,2);?></strong></td>
<td style="text-align: right;"><strong>Total Tax Amount In INR <?php echo number_format($TotalTax, 2, '.', '');?></strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Amount After Tax In INR <?php echo number_format($OrderValue,2);?></strong></td>
<td style="text-align: right;"><strong>Total Amount After Tax In INR <?php echo number_format($OrderValue, 2, '.', '');?></strong></td>
</tr>
@ -284,6 +284,8 @@
</tr>
</tbody>
</table>
<br/>
<br/>
<p><strong>Special Instruction:</strong></p>
<p><?php echo $ServiceDescription;?></p>
<?php
@ -310,6 +312,7 @@
</tr>
</tbody>
</table> -->
<br/>
<p>&nbsp;</p>
<div align="Left"> <b>Released By : </b><?php echo $detail->FirstName;?></div>
<div align="Left"> <b>Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>

View File

@ -186,7 +186,7 @@
<td>#</td>
<td>Item Name</td>
<td>Item Code</td>
<td>Service Description</td>
@ -227,19 +227,19 @@
?>
<tr style="line-height: 1.5em;">
<td><?php echo $index ; ?></td>
<td><?php echo $record->MaterialName ; ?></td>
<td><?php echo $record->MaterialCode ; ?></td>
<td><?php echo $record->ServiceMaterialDescription ; ?></td>
<td align="right"><?php echo $record->UOM ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php echo number_format($record->Rate, 2, '.', ''); ?></td>
<td align="right"><?php if($record->NumberOfService==0 || $record->NumberOfService==''){
echo $record->BasicValue;
echo number_format($record->BasicValue, 2, '.', '');
$TotalAmount = $record->BasicValue + $record->Taxamount + $record->otherallowance;
$SubTotalAmount = $SubTotalAmount + $record->BasicValue + $record->otherallowance;
}
else{
echo $record->BasicValue * $record->NumberOfService;
echo number_format($record->BasicValue * $record->NumberOfService, 2, '.', '');
$TotalAmount = $record->BasicValue * $record->NumberOfService + $record->Taxamount + $record->otherallowance;
$SubTotalAmount = $SubTotalAmount + $record->BasicValue * $record->NumberOfService + $record->otherallowance;
}
@ -248,7 +248,7 @@
<td align="right"><?php echo $record->After_CGST ; ?></td>
<td align="right"><?php echo $record->After_IGST ; ?></td>
<td align="right"><?php echo $record->otherallowance ; ?></td>
<td align="right"><?php echo number_format($TotalAmount,2) ; ?></td>
<td align="right"><?php echo number_format($TotalAmount, 2, '.', ''); ?></td>
</tr>
<?php
@ -306,7 +306,7 @@
<td style="text-align: right;"><strong>Total Amount Before Tax In INR - <?php echo number_format($SubTotalAmount,2);?></strong></td>
<td style="text-align: right;"><strong>Total Amount Before Tax In INR - <?php echo number_format($SubTotalAmount, 2, '.', '');?></strong></td>
@ -318,7 +318,7 @@
<td style="text-align: right;"><strong>Total Tax Amount In INR - <?php echo number_format($TotalTax,2);?></strong></td>
<td style="text-align: right;"><strong>Total Tax Amount In INR - <?php echo number_format($TotalTax, 2, '.', '');?></strong></td>
@ -330,7 +330,7 @@
<td style="text-align: right;"><strong>Total Amount After Tax In INR - <?php echo number_format($OrderValue,2);?></strong></td>
<td style="text-align: right;"><strong>Total Amount After Tax In INR - <?php echo number_format($OrderValue, 2, '.', '');?></strong></td>
@ -384,6 +384,8 @@
</tbody>
</table>
<br/>
<br/>
<p><strong>Scope Of Work:</strong></p>
@ -413,6 +415,7 @@
</tr>
</tbody>
</table> -->
<br/>
<p>&nbsp;</p>
<div align="Left"> <b>Released By : </b><?php echo $detail->FirstName;?></div>
<div align="Left"> <b>Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>