capital, emergency po issue fix
This commit is contained in:
parent
81191e9970
commit
20697fcddd
@ -108,7 +108,26 @@ class servicepurchaseorder extends BaseController
|
||||
if($WorkStatus== SERVICE_COMPLETED ){
|
||||
$POStatus=PO_SERVICE_COMPLETED;
|
||||
$POList = array('UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'ServiceWorkStatusRemarks'=>$Remarks,'ServiceWorkStatus'=>$WorkStatus,'Status'=>$POStatus);
|
||||
$ReqList = $this->purchaseorder_model->updateReqDetail($PONO,$POStatus);
|
||||
|
||||
|
||||
|
||||
|
||||
$PO=$PONO;
|
||||
$result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
||||
|
||||
|
||||
for ($i = 0; $i < count($result); $i++)
|
||||
{
|
||||
|
||||
$MaterialCode = $result[$i]['MaterialCode'];
|
||||
|
||||
$ReqList = $this->purchaseorder_model->updateReqDetail($PONO,$POStatus,$MaterialCode);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// $ReqList = $this->purchaseorder_model->updateReqDetail($PONO,$POStatus);
|
||||
$this->purchaseorder_model->UpdateReceivedQtyforServicePO($PONO,$updateddt,$updatedBy);
|
||||
}
|
||||
else{
|
||||
|
||||
@ -661,12 +661,14 @@ function GetPOType($ReqNo)
|
||||
function GetServicePurchaseOrderDetails($PONO = '')
|
||||
{
|
||||
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,LineItem.Per,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,Quantity,ReceivedQuantity,Rate,LineItem.Status,(Quantity *Rate) as BasicValue ,(After_CGST + After_SGST + After_IGST) as Taxamount
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,LineItem.Per,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,Quantity,ReceivedQuantity,Rate,LineItem.Status,(Quantity *Rate) as BasicValue ,(After_CGST + After_SGST + After_IGST) as Taxamount,Dept.DepartmentName
|
||||
,TotalValue,CGST,After_CGST,SGST,After_SGST,IGST,After_IGST,otherallowance,LineItem.CostCenterCode,LineItem.ServiceFrequency,LineItem.ServiceMaterialDescription,Req.Schedule_Type,Req.NumberOfService,Req.Service_Period
|
||||
FROM T_PurchaseOrder_LineItem LineItem
|
||||
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
join T_Service_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo
|
||||
join T_Requestion_Master Req on Req.ReqNo = LineItem.ReqNo
|
||||
join T_Requestion_Master Req on Req.ReqNo = LineItem.ReqNo
|
||||
join T_Employee_Details emp on Req.Requestedby = emp.EmpID
|
||||
join T_DepartmentDetails Dept on emp.Departmentcode = Dept.DEPCode
|
||||
where LineItem.PONO =?';
|
||||
|
||||
$query = $this->db->query($subQuery,array($PONO));
|
||||
@ -1566,11 +1568,12 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
|
||||
// update req deatail if work status is completed
|
||||
|
||||
function updateReqDetail($PONO,$POStatus)
|
||||
function updateReqDetail($PONO,$POStatus,$MaterialCode)
|
||||
{
|
||||
|
||||
$this->db->set('Req.Status',$POStatus);
|
||||
$this->db->where('Item.PONO',$PONO);
|
||||
$this->db->where('Req.MaterialCode',$MaterialCode);
|
||||
$this->db->update('T_PurchaseOrder_LineItem Item JOIN T_Requestion_Details Req ON Item.ReqNo= Req.ReqNo');
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1944,7 +1944,7 @@ $(document).ready(function () {
|
||||
<td align="right"><?php echo $record->ReceivedQuantity ?></td>
|
||||
<td align="right"><?php echo number_format($record->Quantity - $record->ReceivedQuantity, 2, '.', ''); ?></td>
|
||||
<input type="hidden" name="<?php echo 'Reqnumber'.$index ?>" id="<?php echo 'Reqnumber'.$index ?>" value="<?php echo $record->ReqNo ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'departmentName'.$index ?>" id="<?php echo 'departmentName'.$index ?>" value="<?php echo $record->ReqNo ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'departmentName'.$index ?>" id="<?php echo 'departmentName'.$index ?>" value="<?php echo $record->DepartmentName ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'AvilBudget'.$index ?>" id="<?php echo 'AvilBudget'.$index ?>" value="<?php echo $AvlAmount ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'LineItemNo'.$index ?>" id="<?php echo 'LineItemNo'.$index ?>" value="<?php echo $record->LineItemNo ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'costCode'.$index ?>" id="<?php echo 'costCode'.$index ?>" value="<?php echo $record->CostCenterCode ; ?>" />
|
||||
|
||||
@ -6908,7 +6908,7 @@ $('#content').loader('hide');
|
||||
$('#txtStatus').val(stat);
|
||||
var TextRowCount = $('#txtRowCount').val();
|
||||
var TextDeletedRowCount = $('#txtDeletedRow').val();
|
||||
var TextTotalOrderValueSummaryService = $('#txtTotBasicAmount').val();
|
||||
var TextTotalOrderValueSummaryService = $('#txtTotalOrderValueSummaryService').val();
|
||||
var TextSpcialInstruction = $('#ScopeOfWork').val();
|
||||
var TextStatus = stat;
|
||||
var PaymentMethod = $('#PaymentMethod').val();
|
||||
|
||||
@ -1386,7 +1386,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditCPQuantity','value' => set_value('EditCPQuantity'),'id'=>'EditCPQuantity', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();calculateFreight(3);');
|
||||
$data = array('name' => 'EditCPQuantity','value' => set_value('EditCPQuantity'),'id'=>'EditCPQuantity', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();calculateFreight(3);calculateFreightloceditper()');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -1395,7 +1395,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
||||
<label id="EditRateIn">Rate(in INR/UOM)</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditCPRate','value' => set_value('EditCPRate'),'id'=>'EditCPRate', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();calculateFreight(3);' );
|
||||
$data = array('name' => 'EditCPRate','value' => set_value('EditCPRate'),'id'=>'EditCPRate', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();calculateFreight(3);calculateFreightloceditper()' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
@ -2171,7 +2171,7 @@ $("#PaymentMethod").select2();
|
||||
<label>Quantity<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditCPQuantity','value' => set_value('EditCPQuantity'),'id'=>'EditCPQuantity', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();calculateFreight(4)');
|
||||
$data = array('name' => 'EditCPQuantity','value' => set_value('EditCPQuantity'),'id'=>'EditCPQuantity', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();calculateFreight(4);calculateFreightloceditper()');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user