po edit changes
This commit is contained in:
parent
d3153c4971
commit
8743ebea83
@ -115,7 +115,7 @@ class purchaseorder extends BaseController
|
|||||||
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
|
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
|
||||||
$data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
|
$data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
|
||||||
$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
|
$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
|
||||||
$data['Payment']=$this->purchaseorder_model->getSupplierPayment();
|
$data['Payment']=$this->purchaseorder_model->getSupplierPayment('C009');
|
||||||
$data['WorkStatus']=$this->purchaseorder_model->GetWorkStatus('C019');
|
$data['WorkStatus']=$this->purchaseorder_model->GetWorkStatus('C019');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -600,15 +600,26 @@ function GetImportPurchaseOrderDetailsForPDF($PONO = '')
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function getSupplierPayment($Currency='')
|
// function getSupplierPayment($Currency='')
|
||||||
{
|
// {
|
||||||
|
|
||||||
$subQuery='select distinct PaymentTerms from T_SupplierDetailsN';
|
// $subQuery='select distinct PaymentTerms from T_SupplierDetailsN';
|
||||||
$query=$this->db->query($subQuery,array($Currency));
|
// $query=$this->db->query($subQuery,array($Currency));
|
||||||
//print_r($this->db->last_query());
|
// //print_r($this->db->last_query());
|
||||||
return $query->result();
|
// return $query->result();
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
function getSupplierPayment($Config_ID='')
|
||||||
|
{
|
||||||
|
|
||||||
|
// $subQuery='select distinct PaymentTerms from T_SupplierDetailsN';
|
||||||
|
$subQuery='select ConfigValue from T_ConfigDetails where Config_ID=?';
|
||||||
|
$query=$this->db->query($subQuery,array($Config_ID));
|
||||||
|
//print_r($this->db->last_query());
|
||||||
|
return $query->result();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function GetWorkStatus($Config_ID='')
|
function GetWorkStatus($Config_ID='')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -7,7 +7,7 @@ $DeliverOption='';
|
|||||||
$PODate = '';
|
$PODate = '';
|
||||||
|
|
||||||
$DeliveryAddress ='';
|
$DeliveryAddress ='';
|
||||||
$POStatus = '';
|
$PONOStatus = '';
|
||||||
$PONO = '';
|
$PONO = '';
|
||||||
$TotalServiceTax = 0;
|
$TotalServiceTax = 0;
|
||||||
$TotalEducessTax = 0.0;
|
$TotalEducessTax = 0.0;
|
||||||
@ -47,7 +47,7 @@ if(!empty($POMaster))
|
|||||||
$Deliverydt = $Ddt->format('Y-m-d');
|
$Deliverydt = $Ddt->format('Y-m-d');
|
||||||
|
|
||||||
$DeliveryAddress =$Req->DeliveryAddress;
|
$DeliveryAddress =$Req->DeliveryAddress;
|
||||||
$POStatus = $Req->StatusCode;
|
$PONOStatus = $Req->StatusCode;
|
||||||
$PONO = $Req->PONO;
|
$PONO = $Req->PONO;
|
||||||
$ServiceDescription = $Req->ServiceDescription;
|
$ServiceDescription = $Req->ServiceDescription;
|
||||||
//$PaymentTerms=$Req->PaymentTerms;
|
//$PaymentTerms=$Req->PaymentTerms;
|
||||||
@ -86,10 +86,10 @@ foreach ($PaymentTerms as $TER)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach ($POSTATUS as $PST )
|
// foreach ($POSTATUS as $PST )
|
||||||
{
|
// {
|
||||||
$POStatus=$PST->StatusName;
|
// $POStatus=$PST->StatusName;
|
||||||
}
|
// }
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script src="<?php echo base_url(); ?>assets/js/CreatePOValidation.js" type="text/javascript"></script>
|
<script src="<?php echo base_url(); ?>assets/js/CreatePOValidation.js" type="text/javascript"></script>
|
||||||
@ -1385,7 +1385,7 @@ $(document).ready(function () {
|
|||||||
<input type="hidden" name="<?php echo 'ServiceFrequency'.$index ?>" id="<?php echo 'ServiceFrequency'.$index ?>" value="<?php echo $record->ServiceFrequency ; ?>" />
|
<input type="hidden" name="<?php echo 'ServiceFrequency'.$index ?>" id="<?php echo 'ServiceFrequency'.$index ?>" value="<?php echo $record->ServiceFrequency ; ?>" />
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if($POStatus == PO_DRAFT)
|
if($PONOStatus == PO_DRAFT)
|
||||||
{?>
|
{?>
|
||||||
<td> <a data-target='#EDITSERVICE' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#EDITSERVICE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> <a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
|
<td> <a data-target='#EDITSERVICE' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#EDITSERVICE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> <a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
|
||||||
<?php
|
<?php
|
||||||
@ -1488,7 +1488,7 @@ $(document).ready(function () {
|
|||||||
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
|
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
|
||||||
<input type="hidden" name="txtStatus" id="txtStatus" />
|
<input type="hidden" name="txtStatus" id="txtStatus" />
|
||||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||||
<?php if($POStatus == PO_DRAFT) {?>
|
<?php if($PONOStatus == PO_DRAFT) {?>
|
||||||
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a>
|
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a>
|
||||||
<a class="btn btn-primary Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
<a class="btn btn-primary Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||||
<input type="reset" class="btn btn-primary" value="Reset">
|
<input type="reset" class="btn btn-primary" value="Reset">
|
||||||
@ -1519,8 +1519,8 @@ $(document).ready(function () {
|
|||||||
<?php
|
<?php
|
||||||
// $options = array("0"=>'Select Status');
|
// $options = array("0"=>'Select Status');
|
||||||
// echo form_dropdown('Status', $options,set_value('Status'),'id="Status"' ,'required="true"' ,'class="form-control select2')
|
// echo form_dropdown('Status', $options,set_value('Status'),'id="Status"' ,'required="true"' ,'class="form-control select2')
|
||||||
$options = array("0"=>$POStatus);
|
$options = array("0"=>$PONOStatus);
|
||||||
echo form_dropdown('Status', $options,set_value('Status',$POStatus),'id="Status"' ,'required="true"' ,'class="form-control select2')
|
echo form_dropdown('Status', $options,set_value('Status',$PONOStatus),'id="Status"' ,'required="true"' ,'class="form-control select2')
|
||||||
?>
|
?>
|
||||||
</div><br/>
|
</div><br/>
|
||||||
</div>
|
</div>
|
||||||
@ -2279,7 +2279,7 @@ var Detail = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
|
|||||||
|
|
||||||
$.each(Detail, function (index, value)
|
$.each(Detail, function (index, value)
|
||||||
{
|
{
|
||||||
$("#PaymentTerms").append( $('<option></option>').val(value.PaymentTerms).html(value.PaymentTerms) );
|
$("#PaymentTerms").append( $('<option></option>').val(value.ConfigValue).html(value.ConfigValue) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ foreach ($PaymentTerms as $TER)
|
|||||||
$PODate = '';
|
$PODate = '';
|
||||||
$Deliverydt ='';
|
$Deliverydt ='';
|
||||||
$DeliveryAddress ='';
|
$DeliveryAddress ='';
|
||||||
$POStatus = '';
|
$PONOStatus = '';
|
||||||
$PONO = '';
|
$PONO = '';
|
||||||
$totBasicAmt = 0;
|
$totBasicAmt = 0;
|
||||||
$totDiscountAmt = 0.0;
|
$totDiscountAmt = 0.0;
|
||||||
@ -73,7 +73,7 @@ if(!empty($POMaster))
|
|||||||
$Deliverydt = $Ddt->format('Y-m-d');
|
$Deliverydt = $Ddt->format('Y-m-d');
|
||||||
|
|
||||||
$DeliveryAddress =$Req->DeliveryAddress;
|
$DeliveryAddress =$Req->DeliveryAddress;
|
||||||
$POStatus = $Req->StatusCode;
|
$PONOStatus = $Req->StatusCode;
|
||||||
$PONO = $Req->PONO;
|
$PONO = $Req->PONO;
|
||||||
$ServiceDescription = $Req->ServiceDescription;
|
$ServiceDescription = $Req->ServiceDescription;
|
||||||
$PayableAT=$Req->PayableAT;
|
$PayableAT=$Req->PayableAT;
|
||||||
@ -96,10 +96,10 @@ if(!empty($RequistionDetails))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach ($POSTATUS as $PST )
|
// foreach ($POSTATUS as $PST )
|
||||||
{
|
// {
|
||||||
$POStatus=$PST->StatusName;
|
// $POStatus=$PST->StatusName;
|
||||||
}
|
// }
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
@ -2952,7 +2952,7 @@ body {
|
|||||||
<input type="hidden" name="<?php echo 'TotalOrderValue'.$index ?>" id="<?php echo 'TotalOrderValue'.$index ?>" value="<?php echo $record->TotalValue ; ?>" />
|
<input type="hidden" name="<?php echo 'TotalOrderValue'.$index ?>" id="<?php echo 'TotalOrderValue'.$index ?>" value="<?php echo $record->TotalValue ; ?>" />
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if($POStatus == PO_DRAFT)
|
if($PONOStatus == PO_DRAFT)
|
||||||
{?>
|
{?>
|
||||||
<td> <a data-target='#EDITREVENUE' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#EDITREVENUE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> <a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
|
<td> <a data-target='#EDITREVENUE' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#EDITREVENUE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> <a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
|
||||||
<?php
|
<?php
|
||||||
@ -3114,7 +3114,7 @@ body {
|
|||||||
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
||||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||||
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
|
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
|
||||||
<?php if($POStatus == PO_DRAFT) {?>
|
<?php if($PONOStatus == PO_DRAFT) {?>
|
||||||
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a>
|
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a>
|
||||||
<a class="btn btn-primary Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
<a class="btn btn-primary Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||||
<input type="reset" class="btn btn-primary" value="Reset">
|
<input type="reset" class="btn btn-primary" value="Reset">
|
||||||
@ -3143,7 +3143,7 @@ body {
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<span>Status</span>
|
<span>Status</span>
|
||||||
<?php
|
<?php
|
||||||
$options = array("0"=>$POStatus);
|
$options = array("0"=>$PONOStatus);
|
||||||
echo form_dropdown('Status', $options,set_value('Status'),'id="Status"' ,'required="true"' ,'class="form-control select2')
|
echo form_dropdown('Status', $options,set_value('Status'),'id="Status"' ,'required="true"' ,'class="form-control select2')
|
||||||
?>
|
?>
|
||||||
</div><br/>
|
</div><br/>
|
||||||
@ -4013,7 +4013,7 @@ $('#Scheduleby').change(function(){
|
|||||||
|
|
||||||
$.each(Detail, function (index, value)
|
$.each(Detail, function (index, value)
|
||||||
{
|
{
|
||||||
$("#PaymentTerms").append( $('<option></option>').val(value.PaymentTerms).html(value.PaymentTerms) );
|
$("#PaymentTerms").append( $('<option></option>').val(value.ConfigValue).html(value.ConfigValue) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@ $Address = '';
|
|||||||
$PODate = '';
|
$PODate = '';
|
||||||
$Deliverydt ='';
|
$Deliverydt ='';
|
||||||
$DeliveryAddress ='';
|
$DeliveryAddress ='';
|
||||||
$POStatus='';
|
$PONOStatus='';
|
||||||
$PONO = '';
|
$PONO = '';
|
||||||
$ServiceDescription = '';
|
$ServiceDescription = '';
|
||||||
$TotalLanding='';
|
$TotalLanding='';
|
||||||
@ -99,7 +99,7 @@ if(!empty($POMaster))
|
|||||||
$Deliverydt = $Ddt->format('Y-m-d');
|
$Deliverydt = $Ddt->format('Y-m-d');
|
||||||
|
|
||||||
$DeliveryAddress =$Req->DeliveryAddress;
|
$DeliveryAddress =$Req->DeliveryAddress;
|
||||||
$POStatus = $Req->StatusCode;
|
$PONOStatus = $Req->StatusCode;
|
||||||
$PONO = $Req->PONO;
|
$PONO = $Req->PONO;
|
||||||
$ServiceDescription = $Req->ServiceDescription;
|
$ServiceDescription = $Req->ServiceDescription;
|
||||||
$ExchangeRate=$Req->ExchangeRate;
|
$ExchangeRate=$Req->ExchangeRate;
|
||||||
@ -127,10 +127,10 @@ if(!empty($RequistionDetails))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach ($POSTATUS as $PST )
|
// foreach ($POSTATUS as $PST )
|
||||||
{
|
// {
|
||||||
$POStatus=$PST->StatusName;
|
// $POStatus=$PST->StatusName;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//echo "$POStatus";
|
//echo "$POStatus";
|
||||||
?>
|
?>
|
||||||
@ -1709,7 +1709,7 @@ foreach ($POSTATUS as $PST )
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if($POStatus == PO_DRAFT)
|
if($PONOStatus == PO_DRAFT)
|
||||||
{?>
|
{?>
|
||||||
<td> <a data-target='#editimportpomodel' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#editimportpomodel"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> <a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
|
<td> <a data-target='#editimportpomodel' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#editimportpomodel"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> <a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
|
||||||
<?php
|
<?php
|
||||||
@ -1897,7 +1897,7 @@ foreach ($POSTATUS as $PST )
|
|||||||
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
|
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
|
||||||
|
|
||||||
|
|
||||||
<?php if($POStatus == PO_DRAFT) {?>
|
<?php if($PONOStatus == PO_DRAFT) {?>
|
||||||
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a>
|
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a>
|
||||||
<a class="btn btn-primary Submit" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
<a class="btn btn-primary Submit" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||||
<input type="reset" class="btn btn-primary" value="Reset">
|
<input type="reset" class="btn btn-primary" value="Reset">
|
||||||
@ -1926,8 +1926,11 @@ foreach ($POSTATUS as $PST )
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<span>Status</span>
|
<span>Status</span>
|
||||||
<?php
|
<?php
|
||||||
$options = array("0"=>$POStatus);
|
// $options = array("0"=>$PONOStatus);
|
||||||
echo form_dropdown('Status', $options,set_value('Status',$POStatus),'id="Status"' ,'required="true"' ,'class="form-control select2')
|
// echo form_dropdown('Status', $options,set_value('Status',$POStatus),'id="Status"' ,'required="true"' ,'class="form-control select2')
|
||||||
|
|
||||||
|
$data = array('name' => 'Status','value' => set_value('Status',$PONOStatus),'id'=>'Status', 'class' => 'form-control' ,'readonly' => 'true');
|
||||||
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div><br/>
|
</div><br/>
|
||||||
</div>
|
</div>
|
||||||
@ -3849,7 +3852,7 @@ var Detail = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
|
|||||||
|
|
||||||
$.each(Detail, function (index, value)
|
$.each(Detail, function (index, value)
|
||||||
{
|
{
|
||||||
$("#PaymentTerms").append( $('<option></option>').val(value.PaymentTerms).html(value.PaymentTerms) );
|
$("#PaymentTerms").append( $('<option></option>').val(value.ConfigValue).html(value.ConfigValue) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3657,7 +3657,7 @@ var Detail = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
|
|||||||
|
|
||||||
$.each(Detail, function (index, value)
|
$.each(Detail, function (index, value)
|
||||||
{
|
{
|
||||||
$("#PaymentTerms").append( $('<option></option>').val(value.PaymentTerms).html(value.PaymentTerms) );
|
$("#PaymentTerms").append( $('<option></option>').val(value.ConfigValue).html(value.ConfigValue) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3784,7 +3784,7 @@ var Detail = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
|
|||||||
|
|
||||||
$.each(Detail, function (index, value)
|
$.each(Detail, function (index, value)
|
||||||
{
|
{
|
||||||
$("#PaymentTerms").append( $('<option></option>').val(value.PaymentTerms).html(value.PaymentTerms) );
|
$("#PaymentTerms").append( $('<option></option>').val(value.ConfigValue).html(value.ConfigValue) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2049,7 +2049,7 @@ $('#txtStatus').val(stat);
|
|||||||
|
|
||||||
$.each(Detail, function (index, value)
|
$.each(Detail, function (index, value)
|
||||||
{
|
{
|
||||||
$("#PaymentTerms").append( $('<option></option>').val(value.PaymentTerms).html(value.PaymentTerms) );
|
$("#PaymentTerms").append( $('<option></option>').val(value.ConfigValue).html(value.ConfigValue) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user