diff --git a/app/Controllers/Servicepurchaseorder.php b/app/Controllers/Servicepurchaseorder.php index 9d980446..cc35371f 100755 --- a/app/Controllers/Servicepurchaseorder.php +++ b/app/Controllers/Servicepurchaseorder.php @@ -341,6 +341,7 @@ class Servicepurchaseorder extends BaseController //update service po function UpdateServicePurchaseOrder() { + // print_r($this->request->getPost());die; $PONO = $this->request->getPost('txtPONO'); $newsup = $this->request->getPost('newsup'); // $newSupId = split("[ - ]+", $newsup); @@ -408,23 +409,30 @@ class Servicepurchaseorder extends BaseController $POList['ReleasedOn'] = get_current_date_time(); $POList['ReleasedBy'] = $this->session->get('userId'); } + + $file = $this->request->getFile('POFile'); - $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); - $POList['POFile'] = $requestfilename; + if ($file !== null) { + $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); + } else { + $file->move($path, $requestfilename); + $POList['POFile'] = $requestfilename; + } } } + } else { + log_message('error', 'No file was uploaded'); } + $POMaster = $this->purchaseorder_model->updatePOMaster($PONO, $POList); diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index b3eaf166..64fce0d3 100755 --- a/app/Views/EditservicePurchaseorder.php +++ b/app/Views/EditservicePurchaseorder.php @@ -2995,16 +2995,16 @@ if (!empty($getlogpodtl)) { var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val(); if (validate()) { - if (document.getElementById('ServiceTable').rows.length < 2) { + if (document.getElementById('ServiceTable').rows.length < 2) + { alert('Please Select Line item to Create PO'); $('#Deliverydt').focus(); return false; } - // else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) { - // alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.'); - + // else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) { + // alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.'); // return false; - // } + // } else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') { alert('Please Enter Payable Terms'); $('#Otherpayment').focus(); @@ -3025,7 +3025,16 @@ if (!empty($getlogpodtl)) { processData: false, contentType: false, success: function(data) { - // console.log(data); + + + +// var newWindow = window.open("", "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,width=1024,height=768"); +// newWindow.document.write("Response"); +// newWindow.document.write("
" + data + "
"); // Using
 to preserve formatting
+// newWindow.document.write("");
+// newWindow.document.close();
+// newWindow.moveTo(0, 0);
+// newWindow.resizeTo(screen.width, screen.height);
 						if (data) {
 							$('#loader').hide();
 							alert(data);
diff --git a/app/Views/editImportAmendPO.php b/app/Views/editImportAmendPO.php
index 24e93d06..3790585a 100755
--- a/app/Views/editImportAmendPO.php
+++ b/app/Views/editImportAmendPO.php
@@ -723,7 +723,7 @@ if (!empty($RequistionDetails)) {
                                                     
                                                 
                                                 
-
+
@@ -741,7 +741,7 @@ if (!empty($RequistionDetails)) {
-
+
-
+
-
+
-
+
+
+ +
+
+
@@ -781,12 +786,12 @@ if (!empty($RequistionDetails)) { ?>
-
+
'EditAmendPer', 'value' => set_value('EditAmendPer'), 'id' => 'EditAmendPer', 'class' => 'form-control'); echo form_input($data); ?>
-
+
@@ -800,6 +805,8 @@ if (!empty($RequistionDetails)) {
+
+
@@ -813,9 +820,7 @@ if (!empty($RequistionDetails)) {
- - - +

'EditExchangeRt', 'value' => set_value('EditExchangeRt'), 'id' => 'EditExchangeRt', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true'); @@ -828,7 +833,7 @@ if (!empty($RequistionDetails)) { - +

-->

-
- -
-
- - -
-
-
- 'EditBasicPriceTax', 'value' => set_value('EditBasicPriceTax'), 'id' => 'EditBasicPriceTax', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);'); - echo form_input($data); - ?> +
+
+
+
+ + +
+
+
+ 'EditBasicPriceTax', 'value' => set_value('EditBasicPriceTax'), 'id' => 'EditBasicPriceTax', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);'); + echo form_input($data); + ?> +
+
+
+
+ 'EditAfterBasicPriceTax', 'value' => set_value('EditAfterBasicPriceTax'), 'id' => 'EditAfterBasicPriceTax', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
-
-
- 'EditAfterBasicPriceTax', 'value' => set_value('EditAfterBasicPriceTax'), 'id' => 'EditAfterBasicPriceTax', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> +
+
+ + +
+
+
+ 'EditLandingCharge', 'value' => set_value('EditLandingCharge'), 'id' => 'EditLandingCharge', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateloadingcharge()'); + echo form_input($data); + ?> +
+
+
+
+ 'EditAfterLandingCharge', 'value' => set_value('EditAfterLandingCharge'), 'id' => 'EditAfterLandingCharge', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+
+
+ + +
+
+
+ 'EditHighseas ', 'value' => set_value('EditHighseas'), 'id' => 'EditHighseas', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateHighseassalescharge()'); + echo form_input($data); + ?> +
+
+
+
+ 'EditAfterAssessable', 'value' => set_value('EditAfterAssessable'), 'id' => 'EditAfterAssessable', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+
+
+ + +
+
+
+ 'EditCustomduty', 'value' => set_value('EditCustomduty'), 'id' => 'EditCustomduty', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateCustomduty()'); + echo form_input($data); + ?> +
+
+
+
+ 'EditAfterCustomduty', 'value' => set_value('EditAfterCustomduty'), 'id' => 'EditAfterCustomduty', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+
+
+ + +
+
+
+ 'EditCustomEDcess', 'value' => set_value('EditCustomEDcess'), 'id' => 'EditCustomEDcess', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateCustomEdcess()'); + echo form_input($data); + ?> +
+
+
+
+ 'EditAfterCustomEDcess', 'value' => set_value('EditAfterCustomEDcess'), 'id' => 'EditAfterCustomEDcess', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+
+
+ + +
+
+
+ 'EditCustomSHcess', 'value' => set_value('EditCustomSHcess'), 'id' => 'EditCustomSHcess', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateCustomSHcess()'); + echo form_input($data); + ?> +
+
+
+
+ 'EditAfterCustomSHcess', 'value' => set_value('EditAfterCustomSHcess'), 'id' => 'EditAfterCustomSHcess', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
-
-
- - -
-
-
- 'EditLandingCharge', 'value' => set_value('EditLandingCharge'), 'id' => 'EditLandingCharge', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateloadingcharge()'); - echo form_input($data); - ?> +
+
+
+ + +
+
+
+ 'EditAdditionalExciseduty ', 'value' => set_value('EditAdditionalExciseduty'), 'id' => 'EditAdditionalExciseduty', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateaddlExciseDuty(),EditCalculateAvlModvat(),EditCalculateGrossExpense()'); + echo form_input($data); + ?> +
+
+
+
+ 'EditSubtotal', 'value' => set_value('EditSubtotal'), 'id' => 'EditSubtotal', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
-
-
- 'EditAfterLandingCharge', 'value' => set_value('EditAfterLandingCharge'), 'id' => 'EditAfterLandingCharge', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> +
+
+ + +
+
+
+ 'EditIgst ', 'value' => set_value('EditIgst', 0), 'id' => 'EditIgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateIgst()'); + echo form_input($data); + ?> +
+
+
+
+ 'EditAfterIgst', 'value' => set_value('EditAfterIgst', 0), 'id' => 'EditAfterIgst', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
-
-
-
- - -
-
-
- 'EditHighseas ', 'value' => set_value('EditHighseas'), 'id' => 'EditHighseas', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateHighseassalescharge()'); - echo form_input($data); - ?> +
+
+ +
-
-
-
- 'EditAfterAssessable', 'value' => set_value('EditAfterAssessable'), 'id' => 'EditAfterAssessable', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
-
-
- - -
-
-
- 'EditCustomduty', 'value' => set_value('EditCustomduty'), 'id' => 'EditCustomduty', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateCustomduty()'); - echo form_input($data); - ?> -
-
-
-
- 'EditAfterCustomduty', 'value' => set_value('EditAfterCustomduty'), 'id' => 'EditAfterCustomduty', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
-
-
- - -
-
-
- 'EditCustomEDcess', 'value' => set_value('EditCustomEDcess'), 'id' => 'EditCustomEDcess', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateCustomEdcess()'); - echo form_input($data); - ?> -
-
-
-
- 'EditAfterCustomEDcess', 'value' => set_value('EditAfterCustomEDcess'), 'id' => 'EditAfterCustomEDcess', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
-
-
- - -
-
-
- 'EditCustomSHcess', 'value' => set_value('EditCustomSHcess'), 'id' => 'EditCustomSHcess', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateCustomSHcess()'); - echo form_input($data); - ?> -
-
-
-
- 'EditAfterCustomSHcess', 'value' => set_value('EditAfterCustomSHcess'), 'id' => 'EditAfterCustomSHcess', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
-
-
- - -
-
-
- 'EditAdditionalExciseduty ', 'value' => set_value('EditAdditionalExciseduty'), 'id' => 'EditAdditionalExciseduty', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateaddlExciseDuty(),EditCalculateAvlModvat(),EditCalculateGrossExpense()'); - echo form_input($data); - ?> -
-
-
-
- 'EditSubtotal', 'value' => set_value('EditSubtotal'), 'id' => 'EditSubtotal', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
-
-
- - -
-
-
- 'EditIgst ', 'value' => set_value('EditIgst', 0), 'id' => 'EditIgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateIgst()'); - echo form_input($data); - ?> -
-
-
-
- 'EditAfterIgst', 'value' => set_value('EditAfterIgst', 0), 'id' => 'EditAfterIgst', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
-
-
- - -
-
-
- 'EditGrossdutypayable ', 'value' => set_value('EditGrossdutypayable'), 'id' => 'EditGrossdutypayable', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);'); - echo form_input($data); - ?> -
-
-
- - - -
-
- Freight Type - 'Select Freight Type'); - if (!empty($FreightType)) { - foreach ($FreightType as $SID) : - $options[$SID->ConfigValue] = $SID->ConfigValue; - endforeach; - } - echo form_dropdown('drpamendFreight', $options, set_value('drpamendFreight'), 'id="drpamendFreight" class="form-control "'); - ?> -
-
- NO Of Trips - 'AmendNOOfTrips', 'value' => set_value('AmendNOOfTrips'), 'id' => 'AmendNOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight(0);'); - echo form_input($data); - ?> -
-
- Freight Rate - 'AmendtxtFreight', 'value' => set_value('AmendtxtFreight'), 'id' => 'AmendtxtFreight', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateFreight(0);'); - echo form_input($data); - ?> -
- -
- Freight Amt In - 'AmendtxtAfterFreight', 'value' => set_value('AmendtxtAfterFreight'), 'id' => 'AmendtxtAfterFreight', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> -
- -
- - - -
-
- -
-
- Duty Impact -
-
-
- 'EditDutyImpact', 'value' => set_value('EditDutyImpact'), 'id' => 'EditDutyImpact', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
- Quantity -
- 'EditPurQuantity', 'value' => set_value('EditPurQuantity'), 'id' => 'EditPurQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateCtable()'); - echo form_input($data); - ?> -
-
- -
-
- -
- - -
-
-
- 'EditCustomDutyExpenses ', 'value' => set_value('EditCustomDutyExpenses'), 'id' => 'EditCustomDutyExpenses', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
- -
-
-
- - -
-
-
- 'EditClearingCharges', 'value' => set_value('EditClearingCharges'), 'id' => 'EditClearingCharges', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);'); - echo form_input($data); - ?> -
-
-
-
-
- - -
-
-
- 'EditNett', 'value' => set_value('EditNett'), 'id' => 'EditNett', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true'); - echo form_input($data); - ?> +
+
+ 'EditGrossdutypayable ', 'value' => set_value('EditGrossdutypayable'), 'id' => 'EditGrossdutypayable', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);'); + echo form_input($data); + ?> +
- - - - - -
-
+ +
+
+ Freight Type 'EditTotalExp', 'value' => set_value('EditTotalExp'), 'id' => 'EditTotalExp', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true'); + $options = array("0" => 'Select Freight Type'); + if (!empty($FreightType)) { + foreach ($FreightType as $SID) : + $options[$SID->ConfigValue] = $SID->ConfigValue; + endforeach; + } + echo form_dropdown('drpamendFreight', $options, set_value('drpamendFreight'), 'id="drpamendFreight" class="form-control "'); + ?> +
+
+ NO Of Trips + 'AmendNOOfTrips', 'value' => set_value('AmendNOOfTrips'), 'id' => 'AmendNOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight(0);'); + echo form_input($data); + ?> +
+
+ Freight Rate + 'AmendtxtFreight', 'value' => set_value('AmendtxtFreight'), 'id' => 'AmendtxtFreight', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateFreight(0);'); echo form_input($data); ?>
-
+
+ Freight Amt In + 'AmendtxtAfterFreight', 'value' => set_value('AmendtxtAfterFreight'), 'id' => 'AmendtxtAfterFreight', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+ +
+ + + +
+
+ +
+
+ +
+ + 'EditDutyImpact', 'value' => set_value('EditDutyImpact'), 'id' => 'EditDutyImpact', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+ +
+ 'EditPurQuantity', 'value' => set_value('EditPurQuantity'), 'id' => 'EditPurQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateCtable()'); + echo form_input($data); + ?> +
+
+ +
+
+ +
+ + +
+ 'EditCustomDutyExpenses ', 'value' => set_value('EditCustomDutyExpenses'), 'id' => 'EditCustomDutyExpenses', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+
+
+ + +
+ 'EditClearingCharges', 'value' => set_value('EditClearingCharges'), 'id' => 'EditClearingCharges', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);'); + echo form_input($data); + ?> +
+
+
+ + +
+ 'EditNett', 'value' => set_value('EditNett'), 'id' => 'EditNett', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+
+ + +
+
+ 'EditTotalExp', 'value' => set_value('EditTotalExp'), 'id' => 'EditTotalExp', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ +
- + 'edittxtInstruction', 'value' => set_value('edittxtInstruction'), 'id' => 'edittxtInstruction', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); echo form_textarea($data); @@ -1180,7 +1175,7 @@ if (!empty($RequistionDetails)) {
@@ -1236,7 +1231,7 @@ if (!empty($RequistionDetails)) { + ?>" /> --> diff --git a/app/Views/editimportpo.php b/app/Views/editimportpo.php index fc4cd350..b110c051 100755 --- a/app/Views/editimportpo.php +++ b/app/Views/editimportpo.php @@ -1758,10 +1758,8 @@ if (!empty($getlogpodtl)) {
-
+
-
-
'DutyImpact', 'value' => set_value('DutyImpact'), 'id' => 'DutyImpact', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true'); @@ -1769,7 +1767,7 @@ if (!empty($getlogpodtl)) { ?>
-
+
-
- -
+
-
-
'CustomDutyExpenses ', 'value' => set_value('CustomDutyExpenses'), 'id' => 'CustomDutyExpenses', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true'); @@ -1797,11 +1791,9 @@ if (!empty($getlogpodtl)) {
-
+
-
-
'ClearingCharges', 'value' => set_value('ClearingCharges'), 'id' => 'ClearingCharges', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'CalculateCtable()'); @@ -1809,12 +1801,7 @@ if (!empty($getlogpodtl)) { ?>
- - - - - -
+