diff --git a/app/Models/Purchaseorder_model.php b/app/Models/Purchaseorder_model.php index 2e2c3114..f5a6fde4 100644 --- a/app/Models/Purchaseorder_model.php +++ b/app/Models/Purchaseorder_model.php @@ -979,7 +979,7 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath, function GetServicePurchaseOrder($PONO = '') { $builder = $this->db->table('t_purchaseorder_master POMast')->distinct() - ->select('ReqNo,POMast.PONO,POMast.PaymentTerms,POMast.PaymentOtherDescription,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,POMast.PaymentTerms,POMast.ExchangeRate,POMast.UpdatedOn,Stat.StatusCode,POMast.ServiceWorkStatus,POMast.*,POMast.TotalOrderValue,POMast.BudgetType,IGR.IGRNO') + ->select('ReqNo,POMast.PONO,POMast.PaymentTerms,POMast.PaymentOtherDescription,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,supp.MSME,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,POMast.PaymentTerms,POMast.ExchangeRate,POMast.UpdatedOn,Stat.StatusCode,POMast.ServiceWorkStatus,POMast.*,POMast.TotalOrderValue,POMast.BudgetType,IGR.IGRNO') ->join('t_supplierdetailsn supp', 'supp.SupplierID = POMast.SupplierID') ->join('t_status Stat', 'Stat.StatusCode = POMast.Status') ->join('t_purchaseorder_lineitem LineItem', 'POMast.PONO = LineItem.PONO') @@ -1573,7 +1573,7 @@ QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty,Per, $builder = $this->db->table('t_purchaseorder_master mast')->distinct() ->select('mast.PONO,mast.TotalOrderValue,st.StatusCode,st.StatusName,emp.FirstName,mast.CreatedDate,ccm.CostCenterName,ccm.CostCenterCode,mast.POType as RType,mast.Remarks,DepartmentName,mast.ApprovedBy,(select EmpID from tbl_users where userId=mast.ApprovedBy )as EID,rmast.ReqType,mast.Status,mast.CapitalRange, - (select FirstName from t_employee_details where EmpID=EID)as Approver,sup.SupplierName') + (select FirstName from t_employee_details where EmpID=EID)as Approver,sup.SupplierName,sup.MSME') // ->orderBy('mast.Status',"PO_CREATED"); ->join('t_supplierdetailsn sup', 'sup.SupplierID = mast.SupplierID') diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index 32bdc4a6..c53721cd 100644 --- a/app/Views/EditservicePurchaseorder.php +++ b/app/Views/EditservicePurchaseorder.php @@ -55,7 +55,7 @@ if (!empty($POMaster)) { $SupId = $Req->SupplierID; $SupName = $Req->SupplierName; - $Address = $Req->Address; + $Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ; $pdt = new DateTime($Req->PODate); $PODate = $pdt->format('d-m-Y'); $DeliverOption = $Req->DeliveryOption; @@ -292,8 +292,11 @@ if (!empty($getlogpodtl)) { $.each(y, function(idx, obj) { if (obj.SupplierID === id) { - $("#SupAddress").val(obj.Address); - + if (obj.MSME) { + $("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address); + } else { + $("#SupAddress").val(obj.Address); + } PaymentID = obj.PaymentID; @@ -769,7 +772,7 @@ if (!empty($getlogpodtl)) { if (!empty($Suplist)) { foreach ($Suplist as $SID) : - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName . (!empty($SID->MSME) ? ' ( MSME - ' . $SID->MSME.')' : ''); + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ; endforeach; } @@ -2324,13 +2327,12 @@ if (!empty($getlogpodtl)) { PONO ?> + logDate != '-') { + // $logdate = date('d-m-Y', strtotime($oldpo->logDate)); + // } else { + // $logdate = '-'; + // } ?> + --> LineItemNos; ?> entity ?> entity == 'PO DateChanged') { diff --git a/app/Views/capitalpurchaseorder.php b/app/Views/capitalpurchaseorder.php index add043b7..e0686ce9 100644 --- a/app/Views/capitalpurchaseorder.php +++ b/app/Views/capitalpurchaseorder.php @@ -386,7 +386,7 @@ function vaildateBeforeOpenModal() if(!empty($Suplist)) { foreach ($Suplist as $SID): - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName . (!empty($SID->MSME) ? ' ( MSME - ' . $SID->MSME.' )' : ''); + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ; endforeach; } @@ -2735,8 +2735,12 @@ $('#PoTypeOptions').change(function() if(obj.SupplierID === id) { + if (obj.MSME) { + $("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address); + } else { $("#SupAddress").val(obj.Address); - supPaymentTerms=obj.PaymentID; + } + supPaymentTerms=obj.PaymentID; //$("#PaymentMethod").val(obj.PaymentID); diff --git a/app/Views/editCapitalAmendPO.php b/app/Views/editCapitalAmendPO.php index 81d3723a..801ae4b4 100644 --- a/app/Views/editCapitalAmendPO.php +++ b/app/Views/editCapitalAmendPO.php @@ -125,7 +125,7 @@ if(!empty($POMaster)) $SupId = $Req->SupplierID; $SupName = $Req->SupplierName; - $Address = $Req->Address; + $Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ; $pdt = new DateTime($Req->PODate); $PODate = $pdt->format('d-m-Y'); $DeliverOption = $Req->DeliveryOption; @@ -497,7 +497,7 @@ document.getElementById('dispatchinternational').style.display = 'block'; if(!empty($Suplist)) { foreach ($Suplist as $SID): - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName . (!empty($SID->MSME) ? ' ( MSME - ' . $SID->MSME.')' : ''); + $options2[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ; endforeach; } @@ -2414,7 +2414,11 @@ var myArray = ; $.each(y, function(idx, obj) { if(obj.SupplierID === id) { + if (obj.MSME) { + $("#SupAddress").val("MSME :" + obj.MSME + "\n" + obj.Address); + } else { $("#SupAddress").val(obj.Address); + } supPaymentTerms=obj.PaymentTerms; supPaymentAT=obj.PayableAT; subPaymentDate=obj.PaymentDays; diff --git a/app/Views/editCapitalPo.php b/app/Views/editCapitalPo.php index 41312024..40bb3a39 100644 --- a/app/Views/editCapitalPo.php +++ b/app/Views/editCapitalPo.php @@ -122,7 +122,7 @@ if(!empty($POMaster)) $SupId = $Req->SupplierID; $SupName = $Req->SupplierName; - $Address = $Req->Address; + $Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ; $pdt = new DateTime($Req->PODate); $PODate = $pdt->format('d-m-Y'); $DeliverOption = $Req->DeliveryOption; @@ -545,7 +545,7 @@ $("#PaymentMethod").select2(); if(!empty($Suplist)) { foreach ($Suplist as $SID): - $options2[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName . (!empty($SID->MSME) ? ' ( MSME - ' . $SID->MSME.' )' : ''); + $options2[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ; endforeach; } @@ -4084,8 +4084,11 @@ var PaymentOtherData = ''; $.each(y, function(idx, obj) { if(obj.SupplierID === id) { + if (obj.MSME) { + $("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address); + } else { $("#SupAddress").val(obj.Address); - supPaymentTerms=obj.PaymentID; + } supPaymentTerms=obj.PaymentID; $("#PaymentMethod").val(obj.PaymentID); } diff --git a/app/Views/editImportAmendPO.php b/app/Views/editImportAmendPO.php index ba2a35ca..22f459ec 100644 --- a/app/Views/editImportAmendPO.php +++ b/app/Views/editImportAmendPO.php @@ -123,7 +123,7 @@ if(!empty($POMaster)) { $SupId = $Req->SupplierID; $SupName = $Req->SupplierName; - $Address = $Req->Address; + $Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ; $Pdt = new DateTime($Req->PODate); $PODate = $Pdt->format('d-m-Y'); @@ -388,7 +388,7 @@ if(!empty($RequistionDetails)) if(!empty($Suplist)) { foreach ($Suplist as $SID): - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName . (!empty($SID->MSME) ? ' ( MSME - ' . $SID->MSME.' )' : ''); + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ; endforeach; } @@ -2131,7 +2131,11 @@ $('#drpSupplier').change(function() { $.each(y, function(idx, obj) { if(obj.SupplierID === id) { - $("#SupAddress").val(obj.Address); + if (obj.MSME) { + $("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address); + } else { + $("#SupAddress").val(obj.Address); + } PaymentID = obj.PaymentID; //$("#PayableAT").val(obj.PayableAT); var a=obj.PaymentDays; diff --git a/app/Views/editRevenueAmendPO.php b/app/Views/editRevenueAmendPO.php index d39912c2..c834f9de 100644 --- a/app/Views/editRevenueAmendPO.php +++ b/app/Views/editRevenueAmendPO.php @@ -77,7 +77,7 @@ if(!empty($POMaster)) { $SupId = $Req->SupplierID; $SupName = $Req->SupplierName; - $Address = $Req->Address; + $Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ; $Pdt = new DateTime($Req->PODate); $PODate = $Pdt->format('d-m-Y'); @@ -287,7 +287,32 @@ $(function() { maxDate : 'now', dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' }); */ +$('#drpSupplier').change(function() { + var cd = $("#drpSupplier option:selected").text(); + //alert(cd); + $("#changeSup").val(cd); + var id = $('#drpSupplier').val(); + $("#SupAddress").val(''); + + if (id != '0') { + var y = ; + $.each(y, function(idx, obj) { + if (obj.SupplierID === id) { + if (obj.MSME) { + $("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address); + } else { + $("#SupAddress").val(obj.Address); + } + } + + }); + } else { + alert('Please select the SupplierID'); + return false; + } + + }); $('#EditDiscountType').change(function() { selValue = $("#EditDiscountType").val(); @@ -1029,7 +1054,7 @@ function calculateEditTaxValue() if(!empty($Suplist)) { foreach ($Suplist as $SID): - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName . (!empty($SID->MSME) ? ' ( MSME - ' . $SID->MSME.')' : ''); + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ; endforeach; } diff --git a/app/Views/editRevenuepurchaseorder.php b/app/Views/editRevenuepurchaseorder.php index e4c2d657..23474c45 100644 --- a/app/Views/editRevenuepurchaseorder.php +++ b/app/Views/editRevenuepurchaseorder.php @@ -65,7 +65,7 @@ if (!empty($POMaster)) { foreach ($POMaster as $Req) { $SupId = $Req->SupplierID; $SupName = $Req->SupplierName; - $Address = $Req->Address; + $Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ; $Pdt = new DateTime($Req->PODate); $PODate = $Pdt->format('d-m-Y'); @@ -341,7 +341,11 @@ if (!empty($getlogpodtl)) { $.each(y, function(idx, obj) { if (obj.SupplierID === id) { - $("#SupAddress").val(obj.Address); + if (obj.MSME) { + $("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address); + } else { + $("#SupAddress").val(obj.Address); + } PaymentID = obj.PaymentID; @@ -1882,7 +1886,7 @@ if (!empty($getlogpodtl)) { if (!empty($Suplist)) { foreach ($Suplist as $SID) : - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName . (!empty($SID->MSME) ? ' ( MSME - ' . $SID->MSME.' )' : ''); + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ; endforeach; } diff --git a/app/Views/editServiceAmendPO.php b/app/Views/editServiceAmendPO.php index 5f592880..a4a9d8c6 100644 --- a/app/Views/editServiceAmendPO.php +++ b/app/Views/editServiceAmendPO.php @@ -58,7 +58,7 @@ if (!empty($POMaster)) { $SupId = $Req->SupplierID; $SupName = $Req->SupplierName; - $Address = $Req->Address; + $Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ; $pdt = new DateTime($Req->PODate); $PODate = $pdt->format('d-m-Y'); $DeliverOption = $Req->DeliveryOption; @@ -251,8 +251,11 @@ foreach ($PaymentTerms as $TER) { $.each(y, function(idx, obj) { if (obj.SupplierID === id) { - $("#SupAddress").val(obj.Address); - $("#PaymentTerms").val(obj.PaymentID); + if (obj.MSME) { + $("#SupAddress").val("MSME :" + obj.MSME + "\n" + obj.Address); + } else { + $("#SupAddress").val(obj.Address); + } $("#PaymentTerms").val(obj.PaymentID); @@ -696,7 +699,7 @@ foreach ($PaymentTerms as $TER) { if (!empty($Suplist)) { foreach ($Suplist as $SID) : - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName . (!empty($SID->MSME) ? ' ( MSME - ' . $SID->MSME.' )' : ''); + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ; endforeach; } @@ -1309,10 +1312,9 @@ foreach ($PaymentTerms as $TER) {
- 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction', $ServiceMaterialDescription), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); - echo form_textarea($data); - ?> + 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction', $ServiceMaterialDescription), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); + echo form_textarea($data); + ?>

@@ -2120,11 +2122,7 @@ foreach ($PaymentTerms as $TER) { else if (ExceedBudget($('#txtEditBasicValue').val(), $('#EditAvlBudAmt').val()) == false) { $('#EditRate').focus(); return false; - } else if ($('#EdittxtSpcialInstruction').val() == '') { - alert('Please Enter the Service Description'); - $('#EdittxtSpcialInstruction').focus(); - return false; - } else { + } else { return true; } diff --git a/app/Views/editimportpo.php b/app/Views/editimportpo.php index f6026f02..21c279cd 100644 --- a/app/Views/editimportpo.php +++ b/app/Views/editimportpo.php @@ -128,7 +128,7 @@ if(!empty($POMaster)) { $SupId = $Req->SupplierID; $SupName = $Req->SupplierName; - $Address = $Req->Address; + $Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ; $Pdt = new DateTime($Req->PODate); $PODate = $Pdt->format('d-m-Y'); @@ -473,7 +473,7 @@ else if(!empty($Suplist)) { foreach ($Suplist as $SID): - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName . (!empty($SID->MSME) ? ' ( MSME - ' . $SID->MSME.')' : ''); + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ; endforeach; } @@ -3442,7 +3442,11 @@ $('#drpSupplier').change(function() { $.each(y, function(idx, obj) { if(obj.SupplierID === id) { - $("#SupAddress").val(obj.Address); + if (obj.MSME) { + $("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address); + } else { + $("#SupAddress").val(obj.Address); + } PaymentID = obj.PaymentID; $("#PayableAT").val(obj.PayableAT); var a=obj.PaymentDays; diff --git a/app/Views/importpo.php b/app/Views/importpo.php index b21016f5..d7818630 100644 --- a/app/Views/importpo.php +++ b/app/Views/importpo.php @@ -309,7 +309,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) { //print_r( $options); if (!empty($Suplist)) { foreach ($Suplist as $SID) : - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName . (!empty($SID->MSME) ? ' ( MSME - ' . $SID->MSME.' )' : ''); + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ; endforeach; } @@ -2172,8 +2172,12 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) { $.each(y, function(idx, obj) { if (obj.SupplierID === id) { - $("#SupAddress").val(obj.Address); - PaymentID = obj.PaymentID; + if (obj.MSME) { + $("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address); + } else { + $("#SupAddress").val(obj.Address); + } + PaymentID = obj.PaymentID; //PaymentID = obj.PaymentID; $('#PaymentTerms').val(obj.PaymentTerms); } diff --git a/app/Views/po_pdf.php b/app/Views/po_pdf.php index ceee0f76..6f967cee 100755 --- a/app/Views/po_pdf.php +++ b/app/Views/po_pdf.php @@ -141,6 +141,7 @@ $SuplierAddress = (!empty($POItem) && !empty($POItem[0]->Address)) ? $POItem[0]->Address : "-"; $DeliveryAddress = (!empty($POItem) && !empty($POItem[0]->DeliveryAddress)) ? $POItem[0]->DeliveryAddress : "-"; $SplserviceDescription = (!empty($POItem) && !empty($POItem[0]->ServiceDescription)) ? $POItem[0]->ServiceDescription : "-"; + $SplserviceDescription = ($POType == 'SERVICE') ? $POItem[0]->Description_Of_Service : $SplserviceDescription; $supRef = (!empty($POItem) && !empty($POItem[0]->Supplier_Reference)) ? $POItem[0]->Supplier_Reference : "-"; $supOfferNo = (!empty($POItem) && !empty($POItem[0]->Supplier_Offer_No)) ? $POItem[0]->Supplier_Offer_No : "-"; $supplierEmail = (!empty($POItem) && !empty($POItem[0]->EmailAddress)) ? $POItem[0]->EmailAddress : "-"; diff --git a/app/Views/purchaseorder.php b/app/Views/purchaseorder.php index 685b0081..75b4f3aa 100644 --- a/app/Views/purchaseorder.php +++ b/app/Views/purchaseorder.php @@ -257,8 +257,11 @@ if (!empty($INRSYMBOL)) { $.each(y, function(idx, obj) { if (obj.SupplierID === id) { - $("#SupAddress").val(obj.Address); - + if (obj.MSME) { + $("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address); + } else { + $("#SupAddress").val(obj.Address); + } PaymentID = obj.PaymentID; @@ -1866,7 +1869,7 @@ if (!empty($INRSYMBOL)) { if (!empty($Suplist)) { foreach ($Suplist as $SID) : - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName . (!empty($SID->MSME) ? ' ( MSME - ' . $SID->MSME.' )' : ''); + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ; endforeach; } diff --git a/app/Views/servicePurchaseorder.php b/app/Views/servicePurchaseorder.php index 119237a3..67f411a4 100644 --- a/app/Views/servicePurchaseorder.php +++ b/app/Views/servicePurchaseorder.php @@ -153,8 +153,11 @@ if (!empty($INRSYMBOL)) { $.each(y, function(idx, obj) { if (obj.SupplierID === id) { - $("#SupAddress").val(obj.Address); - $("#SupAddress").val(obj.Address); + if (obj.MSME) { + $("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address); + } else { + $("#SupAddress").val(obj.Address); + } PaymentID = obj.PaymentID; } @@ -662,7 +665,7 @@ if (!empty($INRSYMBOL)) { if (!empty($Suplist)) { foreach ($Suplist as $SID) : - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName . (!empty($SID->MSME) ? ' ( MSME - ' . $SID->MSME.' )' : ''); + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ; endforeach; } @@ -1244,7 +1247,7 @@ if (!empty($INRSYMBOL)) {
- +
- + 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction'), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); echo form_textarea($data); ?> @@ -2244,10 +2247,6 @@ if (!empty($INRSYMBOL)) { return false; } else if (ExceedQuantityCheck() == false) { return false; - } else if ($('#txtSpcialInstruction').val() == '') { - alert('Please Enter the Service Description'); - $('#txtSpcialInstruction').focus(); - return false; } else if (ExceedBudget($('#txtBasicValue').val(), $('#AvlBudAmt').val()) == false) { $('#Rate').focus(); return false; @@ -2285,10 +2284,6 @@ if (!empty($INRSYMBOL)) { return false; } else if (EditExceedQuantityCheck() == false) { return false; - } else if ($('#EdittxtSpcialInstruction').val() == '') { - alert('Please Enter the Service Description'); - $('#EdittxtSpcialInstruction').focus(); - return false; } else if (ExceedBudget($('#txtEditBasicValue').val(), $('#EditAvlBudAmt').val()) == false) { $('#EditRate').focus(); return false;