diff --git a/app/Controllers/Amendmentpurchaseorder.php b/app/Controllers/Amendmentpurchaseorder.php index b61ba103..4d154ed3 100644 --- a/app/Controllers/Amendmentpurchaseorder.php +++ b/app/Controllers/Amendmentpurchaseorder.php @@ -291,19 +291,25 @@ class Amendmentpurchaseorder extends BaseController $POMaster = array('PONO' =>$AmendmentNewPoNo,'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'PORange' => $PoRange, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Reference' => $supplierreference, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $revenuetype, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpecialInstruction, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'IsQualityChkReqired' => $qtycheckresult); $file = $this->request->getFile('POFile'); - $requestfilename = $file->getName(); + $requestfilename = $file->getName(); + $PrePOFile = $this->request->getPost('PrePOFile'); if (!empty($requestfilename)) { - if ($file && $file->isValid() && !$file->hasMoved()) { - $path = ROOTPATH.'public/uploads/POfiles/'; - if(!is_dir($path)) { mkdir($path, 0777, true); } - if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { - log_message('error', 'File already exists in the database'.$requestfilename); - } - else{ - $file->move($path, $requestfilename); - $POMaster['POFile'] = $requestfilename; - } - } + if ($file && $file->isValid() && !$file->hasMoved()) { + $path = ROOTPATH.'public/uploads/POfiles/'; + if(!is_dir($path)) { mkdir($path, 0777, true); } + if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { + log_message('error', 'File already exists in the database'.$requestfilename); + $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; + } + else{ + $file->move($path, $requestfilename); + $POMaster['POFile'] = $requestfilename; + } + }else{ + $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; + } + }else{ + $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; } $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO); if (count($LastPO) > 0) { @@ -636,21 +642,27 @@ class Amendmentpurchaseorder extends BaseController } $AmendmentNewPoNo = generate_amendment_po_number($PONO); - $POMaster = array('PONO' =>$AmendmentNewPoNo,'ParentPO' => $PONO, 'POType' => $POType, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $scopeofwork, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $updateddt, 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'ServiceWorkStatus' => $WorkStatus, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'Description_Of_Service' => $DescriptionOfPo, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $qtycheckresult); + $POMaster = array('PONO' =>$AmendmentNewPoNo,'ParentPO' => $PONO, 'POType' => $POType, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $scopeofwork, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $updateddt, 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'ServiceWorkStatus' => $WorkStatus, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'Description_Of_Service' => strip_tags((string)$DescriptionOfPo), 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $qtycheckresult); $file = $this->request->getFile('POFile'); + $PrePOFile = $this->request->getPost('PrePOFile'); $requestfilename = $file->getName(); if (!empty($requestfilename)) { if ($file && $file->isValid() && !$file->hasMoved()) { $path = ROOTPATH.'public/uploads/POfiles/'; if(!is_dir($path)) { mkdir($path, 0777, true); } - if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { - log_message('error', 'File already exists in the database'.$requestfilename); - } - else{ - $file->move($path, $requestfilename); - $POMaster['POFile'] = $requestfilename; - } + if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { + log_message('error', 'File already exists in the database'.$requestfilename); + $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; + } + else{ + $file->move($path, $requestfilename); + $POMaster['POFile'] = $requestfilename; + } + }else{ + $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; } + }else{ + $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; } $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO); @@ -953,18 +965,24 @@ class Amendmentpurchaseorder extends BaseController $POMaster = array('PONO' =>$AmendmentNewPoNo,'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $FinalTotalOrder, 'POType' => $POType, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'CapitalRange' => $PoRange, 'ExchangeRate' => $ExchangeRate, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'PaymentTerms' => $PaymentMethod, 'PaymentOtherDescription' => $Otherpayment, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CurrencyType' => $currencytypeID, 'AmendedDetails' => $MAD, 'Import_DispatchDetails' => $curdispatch, 'Import_PlaceofOrgin' => $PlaceOforigin, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $qtycheckresult); $file = $this->request->getFile('POFile'); $requestfilename = $file->getName(); + $PrePOFile = $this->request->getPost('PrePOFile'); if (!empty($requestfilename)) { if ($file && $file->isValid() && !$file->hasMoved()) { $path = ROOTPATH.'public/uploads/POfiles/'; if(!is_dir($path)) { mkdir($path, 0777, true); } - if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { - log_message('error', 'File already exists in the database'.$requestfilename); - } - else{ - $file->move($path, $requestfilename); - $POMaster['POFile'] = $requestfilename; - } + if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { + log_message('error', 'File already exists in the database'.$requestfilename); + $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; + } + else{ + $file->move($path, $requestfilename); + $POMaster['POFile'] = $requestfilename; + } + }else{ + $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; } + }else{ + $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; } @@ -1341,6 +1359,27 @@ class Amendmentpurchaseorder extends BaseController } $AmendmentNewPoNo = generate_amendment_po_number($PONO); $POMaster = array('PONO' =>$AmendmentNewPoNo,'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'Import_DispatchDetails' => $Dispatch, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ExchangeRate' => $Exchangerate, 'ExchangeRateCalculatedon' => $ExchangeRateCalculatedon, 'CurrencyType' => $CurrencyType, 'PaymentTerms' => $PaymentTerms, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'Import_PlaceofOrgin' => $Palaceoforigin, 'Mode_Of_Shipment' => $Shipmentmode, 'Supplier_Reference' => $SupplierRef, 'Supplier_Offer_No' => $SupplierOffer, 'Other_Reference' => $otherRef, 'Fincap' => $finCap, 'AmendedDetails' => $MAD, 'PaymentOtherDescription' => $OtherPayment, 'InsuranceStatus' => $insurestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $importoption, 'IsQualityChkReqired' => $qtycheckresult); + $file = $this->request->getFile('POFile'); + $requestfilename = $file->getName(); + $PrePOFile = $this->request->getPost('PrePOFile'); + if (!empty($requestfilename)) { + if ($file && $file->isValid() && !$file->hasMoved()) { + $path = ROOTPATH.'public/uploads/POfiles/'; + if(!is_dir($path)) { mkdir($path, 0777, true); } + if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { + log_message('error', 'File already exists in the database'.$requestfilename); + $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; + } + else{ + $file->move($path, $requestfilename); + $POMaster['POFile'] = $requestfilename; + } + }else{ + $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; + } + }else{ + $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; + } $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $CreateBy, $PONO); $NewPO = ''; // if (count($LastPO) > 0) { diff --git a/app/Controllers/Emergencypurchaseorder.php b/app/Controllers/Emergencypurchaseorder.php index d76f84e0..671ee3ed 100644 --- a/app/Controllers/Emergencypurchaseorder.php +++ b/app/Controllers/Emergencypurchaseorder.php @@ -208,7 +208,26 @@ class Emergencypurchaseorder extends BaseController $newPONO = generate_po_number($lastPONO); // PO Master $POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'ServiceWorkStatus' => $ServiceWorkStatus, 'POType' => $POType, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'Description_Of_Service' => $DescriptionOfPo, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder); - + $file = $this->request->getFile('POFile'); + $requestfilename = $file->getName(); + if (!empty($requestfilename)) { + + if ($file->isValid() && !$file->hasMoved()) { + $path = ROOTPATH.'public/uploads/POfiles/'; + if(!is_dir($path)) { mkdir($path, 0777, true); } + if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { + log_message('error', 'File already exists in the database'.$requestfilename); + $POList['POFile'] = NULL; + }else{ + $file->move($path, $requestfilename); + $POList['POFile'] = $requestfilename; + } + }else{ + $POList['POFile'] = NULL; + } + + } + $POMaster = $this->purchaseorder_model->addPOMaster($POList, $POType, $ServiceTypeOptions); $PONO = $POMaster ? $newPONO : ""; @@ -463,7 +482,25 @@ class Emergencypurchaseorder extends BaseController $lastPONO = $this->purchaseorder_model->lastPONO(); $newPONO = generate_po_number($lastPONO); $POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'PORange' => $Local_Interstate, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'CapitalRange' => $Local_Interstate, 'PaymentOtherDescription' => $OtherPayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Offer_No' => $supplieroffno, 'Supplier_Reference' => $supplierreference, 'Other_Reference' => $otherreference, 'InsuranceNumber' => $InsuranceNumber, 'InsuranceStatus' => $insurancestatus, 'Fincap' => $fincap, 'POSubType' => $revenuetype, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder); - //print_r($POList); + $file = $this->request->getFile('POFiles'); + $requestfilename = $file->getName(); + if (!empty($requestfilename)) { + + if ($file->isValid() && !$file->hasMoved()) { + $path = ROOTPATH.'public/uploads/POfiles/'; + if(!is_dir($path)) { mkdir($path, 0777, true); } + if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { + log_message('error', 'File already exists in the database'.$requestfilename); + $POList['POFile'] = NULL; + }else{ + $file->move($path, $requestfilename); + $POList['POFile'] = $requestfilename; + } + }else{ + $POList['POFile'] = NULL; + } + + } $POMaster = $this->purchaseorder_model->addPOMaster($POList, $POType, $revenuetype); $PONO = $POMaster ? $newPONO : ""; // $PONO = ''; @@ -847,7 +884,7 @@ class Emergencypurchaseorder extends BaseController //$this->purchaseorder_model->UpdateRequistItemStatus(); $this->purchaseorder_model->UpdateRequistionStatus(); $data['POData'] = $this->purchaseorder_model->purchaseorderListing(); - + print_r($data['POData']);die; $this->global['pageTitle'] = 'Purchase Orders'; $this->loadViews("POlist", $this->global, $data, NULL); diff --git a/app/Controllers/Purchaseorder.php b/app/Controllers/Purchaseorder.php index 4539a280..89944b62 100644 --- a/app/Controllers/Purchaseorder.php +++ b/app/Controllers/Purchaseorder.php @@ -2436,8 +2436,11 @@ $mpdf->use_kwt = true; // $data['Status']= $this->purchaseorder_model->getStatus(); $userID = $this->session->get('userId'); //print_r($data['Status']);echo "CON"; - $data['AppList'] = $this->purchaseorder_model->getPOList($q); - + $appList = $this->purchaseorder_model->getPOList($q); + $filteredAppList = array_filter($appList, function($item) { + return $item->Status !== PO_DRAFT; + }); + $data['AppList'] = $filteredAppList; $this->loadViews("porelease_view", $this->global, $data, NULL); } diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index 22399862..c5f79f4f 100644 --- a/app/Views/EditservicePurchaseorder.php +++ b/app/Views/EditservicePurchaseorder.php @@ -1418,8 +1418,8 @@ if (!empty($getlogpodtl)) { @@ -2429,21 +2429,26 @@ if (!empty($getlogpodtl)) {

-
- +
+ + + + +
+
- + +   Cancel +   Save   Submit   Approve and Release -   Cancel   OK   Submit @@ -2461,8 +2466,8 @@ if (!empty($getlogpodtl)) {
- - + 'AWAITING APPROVE', 'AWAITING RELEASE' => 'AWAITING APPROVE', @@ -2479,7 +2484,7 @@ if (!empty($getlogpodtl)) { } else { echo "Status not provided"; } - ?> --> + ?>
diff --git a/app/Views/addCostCenter.php b/app/Views/addCostCenter.php index 1def3ef7..e4ce4ccf 100644 --- a/app/Views/addCostCenter.php +++ b/app/Views/addCostCenter.php @@ -75,13 +75,13 @@ $(function() {
- Back + Back

-
+
-
-
+
+
@@ -193,7 +193,7 @@ $(function() {
-   Add Budget +   Add Budget @@ -285,8 +285,8 @@ $(function() {
@@ -394,8 +394,8 @@ $(function() {
@@ -408,9 +408,9 @@ $(function() { diff --git a/app/Views/addRawMaterial.php b/app/Views/addRawMaterial.php index 43dffbb1..e94c8e3f 100644 --- a/app/Views/addRawMaterial.php +++ b/app/Views/addRawMaterial.php @@ -29,7 +29,7 @@
- Back + Back

@@ -142,7 +142,7 @@
diff --git a/app/Views/addSupplier.php b/app/Views/addSupplier.php index 16ece59d..afb0f450 100644 --- a/app/Views/addSupplier.php +++ b/app/Views/addSupplier.php @@ -204,7 +204,7 @@
@@ -348,7 +348,7 @@
- +
diff --git a/app/Views/addasset.php b/app/Views/addasset.php index 77e11fdc..ad96e391 100644 --- a/app/Views/addasset.php +++ b/app/Views/addasset.php @@ -55,7 +55,7 @@ $(function() {
- Back + Back

@@ -293,8 +293,8 @@ $(function() {
diff --git a/app/Views/addconfig.php b/app/Views/addconfig.php index 00adb932..a5d2612c 100644 --- a/app/Views/addconfig.php +++ b/app/Views/addconfig.php @@ -9,7 +9,7 @@
- Back + Back

@@ -120,8 +120,8 @@
@@ -186,9 +186,8 @@ @@ -201,9 +200,8 @@ diff --git a/app/Views/adddepartment.php b/app/Views/adddepartment.php index 6e0095ea..158ab09d 100644 --- a/app/Views/adddepartment.php +++ b/app/Views/adddepartment.php @@ -62,12 +62,12 @@
-

Add Employee

+

Add Department Details

- Back + Back

@@ -148,7 +148,7 @@
- +
diff --git a/app/Views/alterpurchaseorder.php b/app/Views/alterpurchaseorder.php index d9000f8e..c90314cc 100644 --- a/app/Views/alterpurchaseorder.php +++ b/app/Views/alterpurchaseorder.php @@ -2120,7 +2120,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; } @@ -2521,9 +2521,8 @@ if (!empty($INRSYMBOL)) {
@@ -2550,9 +2549,8 @@ if (!empty($INRSYMBOL)) {
@@ -2579,9 +2577,8 @@ if (!empty($INRSYMBOL)) { @@ -2718,9 +2715,8 @@ if (!empty($INRSYMBOL)) {
+ Cancel   Submit - - Cancel
@@ -2777,9 +2773,8 @@ if (!empty($INRSYMBOL)) {
@@ -2814,9 +2809,8 @@ if (!empty($INRSYMBOL)) { @@ -2851,8 +2845,8 @@ if (!empty($INRSYMBOL)) { @@ -2882,8 +2876,8 @@ if (!empty($INRSYMBOL)) { @@ -2911,8 +2905,8 @@ if (!empty($INRSYMBOL)) { @@ -3229,8 +3223,8 @@ if (!empty($INRSYMBOL)) { @@ -3588,9 +3582,8 @@ if (!empty($INRSYMBOL)) {
- + Cancel   Edit Revenue - Cancel
@@ -3928,12 +3921,8 @@ if (!empty($INRSYMBOL)) {
- + Cancel   Add Revenue - - - Cancel -
@@ -4234,8 +4223,8 @@ if (!empty($INRSYMBOL)) { @@ -4738,9 +4727,8 @@ if (!empty($INRSYMBOL)) { @@ -5198,9 +5186,8 @@ if (!empty($INRSYMBOL)) { @@ -5337,7 +5324,7 @@ if (!empty($INRSYMBOL)) {

-
+
@@ -5348,9 +5335,8 @@ if (!empty($INRSYMBOL)) { - +   Reset   Submit -   Reset
@@ -5436,6 +5422,7 @@ if (!empty($INRSYMBOL)) {

+
@@ -5446,9 +5433,8 @@ if (!empty($INRSYMBOL)) { - +   Reset   Submit -   Reset

diff --git a/app/Views/capitalpurchaseorder.php b/app/Views/capitalpurchaseorder.php index ca5bd3d6..4749b7af 100644 --- a/app/Views/capitalpurchaseorder.php +++ b/app/Views/capitalpurchaseorder.php @@ -316,7 +316,7 @@ function vaildateBeforeOpenModal()

Capital Purchase Order

- Back + Back
- -   Draft -   Approve -   Reset +   Reset +   Save as Draft +   Approve
@@ -2581,9 +2576,9 @@ function vaildateBeforeOpenModal() - diff --git a/app/Views/editCapitalAmendPO.php b/app/Views/editCapitalAmendPO.php index fff4fd18..5f7a5ae6 100644 --- a/app/Views/editCapitalAmendPO.php +++ b/app/Views/editCapitalAmendPO.php @@ -469,10 +469,10 @@ document.getElementById('dispatchinternational').style.display = 'block'; { // $currentCurrencyType=$CurrencyDetail[0]->CurrencyCode; - $options1[$CurrencyDetail[0]->Currency_Code] = $CurrencyDetail[0]->Currency_Code.' '.' - '.' '.$CurrencyDetail[0]->Country_and_Currency; + $options1[$Currency[0]->Currency_Code] = $Currency[0]->Currency_Code.' '.' - '.' '.$Currency[0]->Country_and_Currency; foreach ($Currency as $Cur) - if($CurrencyDetail[0]->Currency_Code!=$Cur->Currency_Code){ + if($Currency[0]->Currency_Code!=$Cur->Currency_Code){ $options1[$Cur->Currency_Code] = $Cur->Currency_Code.' '.' - '.' '.$Cur->Country_and_Currency; } @@ -924,9 +924,8 @@ document.getElementById('dispatchinternational').style.display = 'block'; @@ -2042,9 +2041,8 @@ document.getElementById('dispatchinternational').style.display = 'block'; @@ -2291,10 +2289,8 @@ document.getElementById('dispatchinternational').style.display = 'block'; - - -   Submit - + +   Submit @@ -2305,8 +2301,8 @@ document.getElementById('dispatchinternational').style.display = 'block';
- - + 'AWAITING APPROVE', 'AWAITING RELEASE' => 'AWAITING APPROVE', @@ -2324,7 +2320,6 @@ document.getElementById('dispatchinternational').style.display = 'block'; echo "Status not provided"; } ?> - -->
diff --git a/app/Views/editCapitalPo.php b/app/Views/editCapitalPo.php index 1259c5c6..9996e326 100644 --- a/app/Views/editCapitalPo.php +++ b/app/Views/editCapitalPo.php @@ -961,9 +961,8 @@ $("#PaymentMethod").select2(); @@ -996,9 +995,8 @@ $("#PaymentMethod").select2(); @@ -1030,9 +1028,8 @@ $("#PaymentMethod").select2(); @@ -2105,9 +2102,8 @@ $("#PaymentMethod").select2(); @@ -2846,9 +2842,8 @@ $("#PaymentMethod").select2(); @@ -3596,6 +3591,7 @@ $("#PaymentMethod").select2(); @@ -3899,63 +3894,34 @@ $("#PaymentMethod").select2(); - -   Save - -   Submit -   Approve and Release - -   Cancel - - - OK - - - + +   Cancel + +   Save as Draft + +   Submit +   Approve + + OK +   Submit - -   OK - - - -   Submit - -   OK - - - + +   Submit +   OK + + +

- - + 'AWAITING APPROVE', 'AWAITING RELEASE' => 'AWAITING APPROVE', @@ -3972,7 +3938,7 @@ $("#PaymentMethod").select2(); } else { echo "Status not provided"; } - ?> --> + ?> diff --git a/app/Views/editCostCenter.php b/app/Views/editCostCenter.php index 467efc9d..a314ed39 100644 --- a/app/Views/editCostCenter.php +++ b/app/Views/editCostCenter.php @@ -174,7 +174,7 @@ for ($i = 1; $i < 5; $i++) {
- Back + Back

@@ -430,8 +430,8 @@ for ($i = 1; $i < 5; $i++) { @@ -577,8 +577,7 @@ for ($i = 1; $i < 5; $i++) { @@ -590,8 +589,8 @@ for ($i = 1; $i < 5; $i++) {
diff --git a/app/Views/editEmployee.php b/app/Views/editEmployee.php index f5fa0976..86a0df12 100644 --- a/app/Views/editEmployee.php +++ b/app/Views/editEmployee.php @@ -655,7 +655,7 @@ function onlyAlphabets(evt) {
- Back + Back

@@ -1025,8 +1025,8 @@ function onlyAlphabets(evt) { diff --git a/app/Views/editRawmaterial.php b/app/Views/editRawmaterial.php index 8d4e90ab..b3099f87 100644 --- a/app/Views/editRawmaterial.php +++ b/app/Views/editRawmaterial.php @@ -111,7 +111,7 @@ if ($total <= $reorder) {
- Back + Back

@@ -289,8 +289,8 @@ if ($total <= $reorder) {
diff --git a/app/Views/editRevenueAmendPO.php b/app/Views/editRevenueAmendPO.php index d500cf58..d0529be9 100644 --- a/app/Views/editRevenueAmendPO.php +++ b/app/Views/editRevenueAmendPO.php @@ -427,13 +427,13 @@ function calculateDiscount() var basicValue = parseFloat($('#txtEditBasicValue').val()); var DiscountType =$("#EditDiscountType").val(); - if(DiscountType == "0") + /* if(DiscountType == "0") { alert('Please Select the discount Type'); $('#txtEditDiscount').val(''); $("#EditDiscountType").focus(); } - else if ($('#txtEditDiscount').val() != '' && $('#txtEditDiscount').val() != '0') + else */ if ($('#txtEditDiscount').val() != '' && $('#txtEditDiscount').val() != '0') { var AfterDiscount = 0.0; var Discountval = parseFloat($('#txtEditDiscount').val()); @@ -524,14 +524,14 @@ function calculatePackaging() var PackagingType =$("#EditPackagingType").val(); - if(PackagingType == "0") + /* if(PackagingType == "0") { alert('Please select the Packaging Type'); $('#txtEditPackaging').val(''); $("#EditPackagingType").focus(); } - else if($('#txtEditPackaging').val() != '' && $('#txtEditPackaging').val() !='0') + else */ if($('#txtEditPackaging').val() != '' && $('#txtEditPackaging').val() !='0') { var Packagingvalue = parseFloat($('#txtEditPackaging').val()); var AfterPackaging = 0.0; @@ -621,7 +621,7 @@ function calculatePackaging() if($('#txtEditVat').val() != '') { - var vatValue = parseFloat($('#txtEditVat').val()); + var vatValue = parseFloat($('#txtEditVat').val()).toFixed(2); var basicValue2 = parseFloat($('#txtEditBasicValue').val()); var discount=parseFloat($('#txtEditAfterDiscount').val()); basicValue1=basicValue2-discount; @@ -632,7 +632,7 @@ function calculatePackaging() //alert(packfreight); basicValue=parseFloat(basicValue1+packfreight); //alert(vatValue); - $('#txtEditGST').val(vatValue); + $('#txtEditGST').val(parseFloat(vatValue).toFixed(2)); //$('#txtEditOtherTax').val(0.00); AfterVat = ; Vatval = parseFloat(AfterVat).toFixed(2); @@ -754,13 +754,13 @@ function calculatePackaging() var basicValue = parseFloat($('#txtEditBasicValue').val()); var FreightType =$("#drpEditFreight").val(); - if(FreightType == "0") + /* if(FreightType == "0") { alert('Please select Freight Type'); $('#txtEditFreight').val(''); $("#drpEditFreight").focus(); } - else if( $('#txtEditFreight').val() != "0" && $('#txtEditFreight').val() != '') + else */if( $('#txtEditFreight').val() != "0" && $('#txtEditFreight').val() != '') { var FreightValue = parseFloat($('#txtEditFreight').val()); var UOM = parseFloat($('#EditUOM').val()); diff --git a/app/Views/editServiceAmendPO.php b/app/Views/editServiceAmendPO.php index db502bfd..cf1f535d 100644 --- a/app/Views/editServiceAmendPO.php +++ b/app/Views/editServiceAmendPO.php @@ -1596,8 +1596,7 @@ foreach ($PaymentTerms as $TER) { $Reqon = $Reqon->format('d-m-Y'); ?>

- - + ?> diff --git a/app/Views/editSupplier.php b/app/Views/editSupplier.php index d8cfa5bc..a9c63c9d 100644 --- a/app/Views/editSupplier.php +++ b/app/Views/editSupplier.php @@ -252,7 +252,7 @@ if (!empty($supplier)) {
Edit Details

@@ -413,10 +413,10 @@ if (!empty($supplier)) { diff --git a/app/Views/editasset.php b/app/Views/editasset.php index d0d4f9a4..7283aa07 100644 --- a/app/Views/editasset.php +++ b/app/Views/editasset.php @@ -112,7 +112,7 @@ if(!empty($assetList))
- Back + Back

@@ -347,8 +347,8 @@ if(!empty($assetList))
diff --git a/app/Views/editconfig.php b/app/Views/editconfig.php index 58efb457..19262af6 100644 --- a/app/Views/editconfig.php +++ b/app/Views/editconfig.php @@ -27,7 +27,7 @@ if (!empty($master)) {
- Back + Back

@@ -150,8 +150,8 @@ if (!empty($master)) { @@ -258,16 +258,16 @@ if (!empty($master)) { diff --git a/app/Views/editdepartment.php b/app/Views/editdepartment.php index e9201947..24bf9deb 100644 --- a/app/Views/editdepartment.php +++ b/app/Views/editdepartment.php @@ -102,7 +102,7 @@ if(!empty($department))
- Back + Back

diff --git a/app/Views/editimportpo.php b/app/Views/editimportpo.php index 2a33712c..b1797b06 100644 --- a/app/Views/editimportpo.php +++ b/app/Views/editimportpo.php @@ -375,9 +375,9 @@ else
-

Edit Import Purchase Order-

+

Edit Import Purchase Order-

-

Amended Purchase Order-

+

Amended Import Purchase Order-

- Cancel
@@ -2102,10 +2102,10 @@ echo form_textarea($data); @@ -2691,10 +2691,9 @@ echo form_textarea($data); @@ -3166,7 +3165,7 @@ echo form_textarea($data); - +   Cancel   Save @@ -3174,7 +3173,6 @@ echo form_textarea($data);   Submit   Approve and Release -   Cancel diff --git a/app/Views/editrequisitionform.php b/app/Views/editrequisitionform.php index ef5aaba1..435b8987 100644 --- a/app/Views/editrequisitionform.php +++ b/app/Views/editrequisitionform.php @@ -91,7 +91,7 @@ if (!empty($ReqPOType)) {
-

+

+   Save As Draft   Submit   Approve - +   Submit   Approve - diff --git a/app/Views/servicePurchaseorder.php b/app/Views/servicePurchaseorder.php index 53c5a401..17ebdb54 100644 --- a/app/Views/servicePurchaseorder.php +++ b/app/Views/servicePurchaseorder.php @@ -115,19 +115,6 @@ if (!empty($INRSYMBOL)) { } }); - - - $.each(Payment, function(idx, obj) { - if (obj.PaymentID == 'PT05') { - - - - } else { - $("#PaymentTerms").append($('').val(obj.PaymentID).html(obj.PaymentTerms)); - } - - }); - } }); @@ -158,13 +145,12 @@ if (!empty($INRSYMBOL)) { } else { $("#SupAddress").val(obj.Address); } - PaymentID = obj.PaymentID; + console.log(obj.PaymentID); } }); - if (PaymentID != 'PT08') { $('#otheroptiondiv').hide(); $('#Otherpayment').val('');