'IGRissuefixed'
This commit is contained in:
parent
547226f07b
commit
85c9b5f9bb
@ -39,24 +39,20 @@ class inwardgateregister extends BaseController
|
|||||||
$this->load->model('inwardgateregister_model');
|
$this->load->model('inwardgateregister_model');
|
||||||
$this->global['pageTitle'] = 'Siddharth : Inward Gate Register';
|
$this->global['pageTitle'] = 'Siddharth : Inward Gate Register';
|
||||||
$data['IGR']= $this->inwardgateregister_model->igrListing();
|
$data['IGR']= $this->inwardgateregister_model->igrListing();
|
||||||
//print_r($data['IGR']);//print_r statement is used to get the values
|
|
||||||
$this->loadViews("viewinwardgateregister",$this->global,$data,NULL);
|
$this->loadViews("viewinwardgateregister",$this->global,$data,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
function addinwardgateregister($pono='',$IGRNO='',$IGR='')
|
function addinwardgateregister()
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->load->model('inwardgateregister_model');
|
$this->load->model('inwardgateregister_model');
|
||||||
$this->global['pageTitle'] = 'Siddharth : Add Inward Gate Register';
|
$this->global['pageTitle'] = 'Siddharth : Add Inward Gate Register';
|
||||||
//$data['IGR']=$this->inwardgateregister_model->igrListing($IGRNO,$IGR);
|
|
||||||
|
|
||||||
$data['PO_NO'] = $this->inwardgateregister_model->getpurchaseorder($pono);
|
$data['PO_NO'] = $this->inwardgateregister_model->getpurchaseorder();
|
||||||
|
//print_r($data['PO_NO']);
|
||||||
|
|
||||||
//print_r($data);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->loadViews("inwardgateregister", $this->global, $data, NULL);
|
$this->loadViews("inwardgateregister", $this->global, $data, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,53 +64,27 @@ class inwardgateregister extends BaseController
|
|||||||
return $retDate;
|
return $retDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
function IGRITEM($PO='')
|
function IGRITEM()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$PO = $this->input->post('id');
|
$PO = $this->input->post('id');
|
||||||
$data = $this->inwardgateregister_model->viewpurchaseorder($PO);
|
$data = $this->inwardgateregister_model->viewpurchaseorder($PO);
|
||||||
//$result = $this->inwardgateregister_model->viewpurchaseorder($PO);
|
//print_r($data);
|
||||||
/*$HTML="";
|
echo json_encode($data);
|
||||||
for ($i = 0; $i < count($data); $i++)
|
|
||||||
{
|
|
||||||
$SNo = $i + 1;
|
|
||||||
$MaterialCode = $result[$i]['MaterialCode'];
|
|
||||||
$MaterialName = $result[$i]['MaterialName'];
|
|
||||||
$UOM = $result[$i]['UOM'];
|
|
||||||
$Quantity = $result[$i]['Quantity'];
|
|
||||||
$HTML.="<tr id='".$i."'>
|
|
||||||
<td align='left'>".$SNo."</td>
|
|
||||||
<td align='left'>". $MaterialCode."</td>
|
|
||||||
|
|
||||||
<td align='left'>".$MaterialName."</td>
|
|
||||||
|
|
||||||
<td align='left'>".$UOM."</td>
|
|
||||||
<td align='left'>".$Quantity."</td>
|
|
||||||
</tr>";
|
|
||||||
|
|
||||||
//$index = $index + 1;
|
|
||||||
|
|
||||||
}*/
|
|
||||||
echo json_encode($data);
|
|
||||||
//$this->load->view('sample',$data,NULL);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
function addNewigr()
|
function addNewigr()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$PONO = $this->input->post('PONO');
|
$PONO = $this->input->post('PONO');
|
||||||
//$igr = $this->input->post('igr');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$DeliveryChellanOrInvoiceNo = $this->input->post('InvoiceNo');
|
$DeliveryChellanOrInvoiceNo = $this->input->post('InvoiceNo');
|
||||||
|
|
||||||
$DeliveryChellan = $this->input->post('InvoiceDate');
|
$DeliveryChellan = $this->input->post('InvoiceDate');
|
||||||
$DeliveryChellanDate = $this->getDateformat($DeliveryChellan);
|
$DeliveryChellanDate = $this->getDateformat($DeliveryChellan);
|
||||||
|
|
||||||
|
|
||||||
$VehicleNo = $this->input->post('VehicleNo');
|
$VehicleNo = $this->input->post('VehicleNo');
|
||||||
$CourierNo = $this->input->post('CourierNo');
|
$CourierNo = $this->input->post('CourierNo');
|
||||||
@ -126,7 +96,8 @@ class inwardgateregister extends BaseController
|
|||||||
//echo $RowCount;
|
//echo $RowCount;
|
||||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
$createddt = $dt->format('Y-m-d H:i:s');
|
$createddt = $dt->format('Y-m-d H:i:s');
|
||||||
$IGRStatus = IGR_CREATED;
|
|
||||||
|
$IGRStatus = IGR_CREATED;
|
||||||
|
|
||||||
|
|
||||||
//echo $RowCount;
|
//echo $RowCount;
|
||||||
@ -134,8 +105,7 @@ class inwardgateregister extends BaseController
|
|||||||
$igr = array();
|
$igr = array();
|
||||||
|
|
||||||
$igr = array('PONO'=>$PONO,'VehicleNo'=>$VehicleNo,'DeliveryChellanOrInvoiceNo'=>$DeliveryChellanOrInvoiceNo,'DeliveryChellanDate'=>$DeliveryChellanDate,'CourierNo'=>$CourierNo,'IGRStatus'=>$IGRStatus,'CreatedBy'=>$CreatedBy,'CreatedDate' =>$createddt);
|
$igr = array('PONO'=>$PONO,'VehicleNo'=>$VehicleNo,'DeliveryChellanOrInvoiceNo'=>$DeliveryChellanOrInvoiceNo,'DeliveryChellanDate'=>$DeliveryChellanDate,'CourierNo'=>$CourierNo,'IGRStatus'=>$IGRStatus,'CreatedBy'=>$CreatedBy,'CreatedDate' =>$createddt);
|
||||||
//print_r($IGRNO);
|
|
||||||
//die();
|
|
||||||
|
|
||||||
$igrM = $this->inwardgateregister_model->addigrM($igr);
|
$igrM = $this->inwardgateregister_model->addigrM($igr);
|
||||||
|
|
||||||
@ -150,38 +120,51 @@ class inwardgateregister extends BaseController
|
|||||||
echo $IGRNO;
|
echo $IGRNO;
|
||||||
|
|
||||||
$IGRItemStatus = REQITEM_NEW;
|
$IGRItemStatus = REQITEM_NEW;
|
||||||
//echo ("success");
|
|
||||||
|
|
||||||
//print_r($RowCount);
|
|
||||||
for ($i = 1; $i <= $RowCount; $i++)
|
for ($i = 1; $i <= $RowCount; $i++)
|
||||||
{
|
{
|
||||||
//echo i;
|
|
||||||
|
|
||||||
//echo $IGRNO ;
|
|
||||||
$MaterialCode = $this->input->post('MaterialCode'.$i);
|
$MaterialCode = $this->input->post('MaterialCode'.$i);
|
||||||
|
|
||||||
$QuantityAsPerInvoice = $this->input->post('ReceivedQuantity'.$i);
|
$QuantityAsPerInvoice = $this->input->post('ReceivedQuantity'.$i);
|
||||||
$Remarks = $this->input->post('Remarks'.$i);
|
|
||||||
//$Remarks = $this->input->post('Remarks');
|
|
||||||
|
|
||||||
$CreatedBy = $this->session->userdata('userId');
|
$OrderedQuantity = $this->input->post('OrderedQuantity'.$i);
|
||||||
|
|
||||||
|
//echo 'OrderedQunatity'.$OrderedQuantity;
|
||||||
|
|
||||||
|
//echo 'QuantityAsPerInvoice'.$QuantityAsPerInvoice;
|
||||||
|
|
||||||
|
if(strlen($QuantityAsPerInvoice)>0)
|
||||||
|
{
|
||||||
|
$Remarks = $this->input->post('txtRemarks'.$i);
|
||||||
|
$ItemStatus = '';
|
||||||
|
if($QuantityAsPerInvoice == $OrderedQuantity)
|
||||||
|
{
|
||||||
|
$ItemStatus = IGR_CREATED;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
|
||||||
|
}
|
||||||
|
|
||||||
|
$CreatedBy = $this->session->userdata('userId');
|
||||||
|
|
||||||
|
|
||||||
$igrDetails = array('IGRNO'=>$IGRNO,'MaterialCode'=>$MaterialCode,'QuantityAsPerInvoice'=>$QuantityAsPerInvoice,'Remarks'=>$Remarks,'IGRItemStatus'=>$IGRItemStatus,'CreatedBy'=>$CreatedBy,'CreatedDate'=>$createddt);
|
$igrDetails = array('IGRNO'=>$IGRNO,'MaterialCode'=>$MaterialCode,'QuantityAsPerInvoice'=>$QuantityAsPerInvoice,'Remarks'=>$Remarks,'IGRItemStatus'=>$IGRItemStatus,'CreatedBy'=>$CreatedBy,'CreatedDate'=>$createddt);
|
||||||
//print_r($igrDetails);
|
|
||||||
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
|
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
|
||||||
|
|
||||||
|
$POLineItem = array('Status'=>$ItemStatus,'UpdateBY'=>$CreatedBy,'UpdatedOn'=>$createddt );
|
||||||
|
|
||||||
|
$this->inwardgateregister_model->UpdatePOLineItem($POLineItem,$PONO,$MaterialCode);
|
||||||
|
}
|
||||||
|
echo $IGRNO;
|
||||||
|
|
||||||
}
|
}
|
||||||
//print_r($IGRNO);
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function ViewIGR($IGRNO='')
|
function ViewIGR()
|
||||||
{
|
{
|
||||||
|
|
||||||
$IGRNO= $this->input->post('id');
|
$IGRNO= $this->input->post('id');
|
||||||
|
|||||||
@ -17,7 +17,7 @@ class storestatus extends BaseController
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->load->model('assetdetails_model');
|
$this->load->model('store_model');
|
||||||
$this->load->library('form_validation');
|
$this->load->library('form_validation');
|
||||||
|
|
||||||
|
|
||||||
@ -45,8 +45,9 @@ class storestatus extends BaseController
|
|||||||
//$data['userRecords'] = $this->supplier_model->supplierListing();
|
//$data['userRecords'] = $this->supplier_model->supplierListing();
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Siddharth Industries : Store Status';
|
$this->global['pageTitle'] = 'Siddharth Industries : Store Status';
|
||||||
|
//viewStock
|
||||||
$this->loadViews("storestatus", $this->global, NULL);
|
$data['Stock'] $this->store_model->viewStock();
|
||||||
|
$this->loadViews("storestatus", $this->global, $data,null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user