From d64785829c36f1c3df9f28610f1aa59d36f85e2a Mon Sep 17 00:00:00 2001 From: gandhimathi Bharathirajan Date: Tue, 1 Aug 2017 17:35:21 +0530 Subject: [PATCH] MRIR Issue Item --- application/views/MaterialIssueList.php | 90 ++++++++++++++----------- 1 file changed, 52 insertions(+), 38 deletions(-) diff --git a/application/views/MaterialIssueList.php b/application/views/MaterialIssueList.php index ded3d759..88526263 100755 --- a/application/views/MaterialIssueList.php +++ b/application/views/MaterialIssueList.php @@ -70,7 +70,7 @@ $index = $index +1; ?> - PONO ?> + PONO ?> ReqNo ?> FirstName ?> DepartmentName ?> @@ -84,18 +84,35 @@ RequestedQty ?> OrderedQuantity ?> - AcceptedQty ?> + AcceptedQty; ?> - + + ReqStatus != REQ_DELIVERED) { ?> + - - + + + + + + Remarks; ?> + StatusName; ?> + '; - var strMsg = 'Do you want to Approve the Requisition?'; - if(Status == '3') - { - StatusCode = ''; - strMsg = 'Do you want to Reject the Requisition?' - } + var StatusCode = $('#status'+Index).val(); + + var Remarks = $('#Remarks'+Index).val(); - if(Status == '3' && Remarks == '') - { - alert('Please enter remarks'); - $('#status'+Index).val('1'); - return false; - - } - - var answer = confirm(strMsg); - if (answer) - { + var MaterialCode = cellval[5].innerHTML; + var ReqNo = cellval[1].innerHTML; + var Sendvalues = []; + Sendvalues[0] = StatusCode; + Sendvalues[1] = MaterialCode; + Sendvalues[2] = ReqNo; + Sendvalues[3] = Remarks; + //alert(MaterialCode); + alert(StatusCode); $('#content').loader('show'); $.ajax({ - data:{id:id}, + data:{id:Sendvalues}, type:"POST", - url:"requisitionform/ApproveRequest?Status="+StatusCode+"&ReqNo="+ReqId, + url:"MRIRcontroller/UpdateReqItemStatus", success:function(data) { if(data) { @@ -203,18 +221,14 @@ function saveToDatabase(editableObj,column,ReqId,Index) { alert("Error"); } - } - + + } }); - -} -else -{ -return; } -} + + $(function() { var d = new Date();