diff --git a/app/Controllers/Emergencypurchaseorder.php b/app/Controllers/Emergencypurchaseorder.php index 38cf1975..dd02756e 100644 --- a/app/Controllers/Emergencypurchaseorder.php +++ b/app/Controllers/Emergencypurchaseorder.php @@ -507,7 +507,7 @@ class Emergencypurchaseorder extends BaseController }else{ } - print_r($POList);die; + // print_r($POList);die; $POMaster = $this->purchaseorder_model->addPOMaster($POList, $POType, $revenuetype); $PONO = $POMaster ? $newPONO : ""; // $PONO = ''; diff --git a/app/Controllers/Purchaseorder.php b/app/Controllers/Purchaseorder.php index f763a120..d25e7e54 100644 --- a/app/Controllers/Purchaseorder.php +++ b/app/Controllers/Purchaseorder.php @@ -564,7 +564,7 @@ $mpdf->use_kwt = true; $ReqDetails = $this->purchaseorder_model->getRequistDetails($ReqArray); $data['RequistionDetails'] = $ReqDetails; - + $Status = ""; foreach ($data['RequistionDetails'] as $ReqDet) { $Status = $ReqDet->Status; diff --git a/app/Models/Purchaseorder_model.php b/app/Models/Purchaseorder_model.php index 9126f9ca..ccc6603f 100644 --- a/app/Models/Purchaseorder_model.php +++ b/app/Models/Purchaseorder_model.php @@ -1589,9 +1589,9 @@ QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty,Per, ->join('t_requestion_master rmast', 'rmast.ReqNo=req.ReqNo') //->join('t_costcenter_budget bud','bud.CostCenterCode = req.CostCenterCode and bud.BudgetType = rmast.ReqType') ->join('t_costcenter_master ccm', 'ccm.CostCenterCode = req.CostCenterCode', 'left') - ->join('tbl_users tbl', 'rmast.createdby=tbl.userid') - ->join('t_employee_details as emp', 'emp.empid=tbl.empid') - ->join('t_departmentdetails as Dep', 'Dep.DEPCode=emp.Departmentcode'); + ->join('tbl_users tbl', 'rmast.createdby=tbl.userid', 'left') + ->join('t_employee_details as emp', 'emp.empid=tbl.empid', 'left') + ->join('t_departmentdetails as Dep', 'Dep.DEPCode=emp.Departmentcode', 'left'); // old Status Don't Deleted it. // if ($type == 'APPROVAL') { diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index ad31b7fc..23c0eca2 100644 --- a/app/Views/EditservicePurchaseorder.php +++ b/app/Views/EditservicePurchaseorder.php @@ -717,8 +717,6 @@ if (!empty($getlogpodtl)) { });
@@ -794,7 +791,7 @@ if (!empty($getlogpodtl)) {
-
+
'POType', 'value' => set_value('POType', SERVICE), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); @@ -814,7 +811,7 @@ if (!empty($getlogpodtl)) { endforeach; } - echo form_dropdown('drpSupplier', $options, set_value('drpSupplier', $SupId), 'id="drpSupplier"', 'required="true"', 'class="form-control select2'); + echo form_dropdown('drpSupplier', $options, set_value('drpSupplier', $SupId), 'id="drpSupplier" required="true" class="form-control select2"'); ?> @@ -823,7 +820,7 @@ if (!empty($getlogpodtl)) {
-
+
'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); echo Form_textarea($data); @@ -856,7 +853,7 @@ if (!empty($getlogpodtl)) { endforeach; } - echo form_dropdown('workstatus', $optionsWork, set_value('workstatus'), 'id="workstatus"', 'required="true"', 'class="form-control select2'); + echo form_dropdown('workstatus', $optionsWork, set_value('workstatus'), 'id="workstatus" required="true" class="form-control select2"'); ?>
@@ -870,7 +867,7 @@ if (!empty($getlogpodtl)) {
-
+
'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); echo form_input($data); @@ -887,7 +884,7 @@ if (!empty($getlogpodtl)) {
-
+
'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40'); echo Form_textarea($data); @@ -900,7 +897,7 @@ if (!empty($getlogpodtl)) {
-
+
'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); echo form_input($data); @@ -909,7 +906,7 @@ if (!empty($getlogpodtl)) {
-
+
'editmodeofshipment', 'value' => set_value('editmodeofshipment', $ModeOfShipment), 'id' => 'editmodeofshipment', 'class' => 'form-control'); @@ -919,7 +916,7 @@ if (!empty($getlogpodtl)) {
-
+
'editsupplierreference', 'value' => set_value('editsupplierreference', $SupplierReference), 'id' => 'editsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); @@ -929,7 +926,7 @@ if (!empty($getlogpodtl)) {
-
+
'editsupplierofferno', 'value' => set_value('editsupplierofferno', $SuppliersOfferNo), 'id' => 'editsupplierofferno', 'class' => 'form-control'); @@ -941,10 +938,10 @@ if (!empty($getlogpodtl)) {
-
+
-
+
'editotherreference', 'value' => set_value('editotherreference', $OtherReferences), 'id' => 'editotherreference', 'class' => 'form-control'); @@ -958,7 +955,7 @@ if (!empty($getlogpodtl)) { -
+
@@ -1004,12 +1001,12 @@ if (!empty($getlogpodtl)) { } endforeach; } - echo form_dropdown('PaymentTerms', $optionsPay, set_value('PaymentTerms'), 'id="PaymentTerms"', 'required="true"', 'class="form-control select2'); + echo form_dropdown('PaymentTerms', $optionsPay, set_value('PaymentTerms'), 'id="PaymentTerms" required="true" class="form-control select2"'); ?>
+
- - -
-
-
-
-
-
-
@@ -928,12 +900,6 @@ if (!empty($INRSYMBOL)) { .centered input { margin: 0 5px; } - - .mandatory { - color: red; - text-align: right; - background-color: white; - }
@@ -954,1123 +920,557 @@ if (!empty($INRSYMBOL)) {
+ 'form-label-left CreatePO ', 'name' => 'CreatePO', 'id' => 'CreatePO'); + echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); + ?> + +
+
+ + 'Selected Requisition Numbers'); + if (!empty($ReqList)) { + foreach ($ReqList as $SID) : + + $options[$SID->ReqNo] = $SID->ReqNo; + //$ReqType = $SID->ReqType; + endforeach; + } + echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"', 'height="400px"'); + ?> +
+
+ + 'POType', 'value' => set_value('POType', REVENUE), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ + 'Select Supplier'); + //print_r( $options); + + if (!empty($Suplist)) { + foreach ($Suplist as $SID) : + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; + endforeach; + } + + echo form_dropdown('drpSupplier', $options, set_value('drpSupplier', $SupId), 'id="drpSupplier" required="true" class="form-control select2" disabled readonly'); + + ?> +
+
+ +
+ 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + ?> +
+
+
+
+
+
+ Select Tax Range
+
+ "Range", "id" => "Local", "value" => "0", 'checked' => ('0' == $taxrange) ? TRUE : FALSE, 'onchange' => 'SetVatorCST();')); ?>   + "Range", "id" => "Inter_state", "value" => "1", 'checked' => ('1' == $taxrange) ? TRUE : FALSE, 'onchange' => 'SetVatorCST();')); ?> +
+
+
+
+ Select Delivery By*
+ +
+ 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?> + 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?> +
+
+
+ + + +
+ 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?> +
+
+ +
+ +
+ 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'readonly' => 'true'); + echo Form_textarea($data); + ?> +
+
+
+
+
+ + 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ +
+ + 'addmodeofshipment', 'value' => set_value('addmodeofshipment', $modeofshipment), 'id' => 'addmodeofshipment', 'class' => 'form-control', 'readonly' => 'readonly'); + echo form_input($data); + ?> +
+ + + +
+
+ +
+ + 'amendsupplierreference', 'value' => set_value('amendsupplierreference', $supplierref), 'id' => 'amendsupplierreference', 'class' => 'form-control', 'readonly' => 'readonly', 'maxlength' => '40'); + echo form_input($data); + ?> +
+
+
+ +
+ + 'amendsupplierofferno', 'value' => set_value('amendsupplierofferno', $suppofferno), 'id' => 'amendsupplierofferno', 'class' => 'form-control', 'readonly' => 'readonly'); + echo form_input($data); + ?> +
+ +
+
+
+
+ +
+ + 'amendotherreference', 'value' => set_value('amendotherreference', $otherref), 'id' => 'amendotherreference', 'class' => 'form-control', 'readonly' => 'readonly'); + echo form_input($data); + ?> +
+
+
+ +
+ + 'Select Work Status'); + + + if (!empty($PoTypeOptions)) { + foreach ($PoTypeOptions as $POpt) : + + + $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; + + endforeach; + } + // $revenuesubtype + echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions" required="true" class="form-control select2"'); + + + + ?> +
+ + + +
+
+ + + + + PaymentID) { + //echo "$Terms"; + //echo "$pay2->PaymentTerms"; + + ?> + + PaymentID] = $pay2->PaymentTerms; + } + + foreach ($Payment as $pay1) : + + if ($Terms != $pay1->PaymentID) { + + $optionsPay[$pay1->PaymentID] = $pay1->PaymentTerms; + } + endforeach; + } + + echo form_dropdown('PaymentTerms', $optionsPay, set_value('PaymentTerms'), 'id="PaymentTerms" required="true" class="form-control select2"'); + ?> -
-
-
-
- - 'Selected Requisition Numbers'); - if (!empty($ReqList)) { - foreach ($ReqList as $SID) : - - $options[$SID->ReqNo] = $SID->ReqNo; - //$ReqType = $SID->ReqType; - endforeach; - } - echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"', 'height="400px"'); - ?> -
-
- -
- - 'POType', 'value' => set_value('POType', REVENUE), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
- - 'Select Supplier'); - //print_r( $options); - - if (!empty($Suplist)) { - foreach ($Suplist as $SID) : - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; - endforeach; - } - - echo form_dropdown('drpSupplier', $options, set_value('drpSupplier', $SupId), 'id="drpSupplier"', 'required="true"', 'class="form-control select2', 'disabled=disabled', 'readonly=readonly'); - - ?> -
-
- -
- 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> -
-
-
-
-
-
-
-
- Select Tax Range
-
- "Range", "id" => "Local", "value" => "0", 'checked' => ('0' == $taxrange) ? TRUE : FALSE, 'onchange' => 'SetVatorCST();')); ?>   - "Range", "id" => "Inter_state", "value" => "1", 'checked' => ('1' == $taxrange) ? TRUE : FALSE, 'onchange' => 'SetVatorCST();')); ?> -
-
-
-
- Select Delivery By*
- -
- 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?> - 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?> -
-
-
- - - -
- 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); - echo form_input($data); - ?> -
-
- -
- -
- 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'readonly' => 'true'); - echo Form_textarea($data); - ?> -
-
-
-
-
-
-
- -
- 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
- -
- - 'addmodeofshipment', 'value' => set_value('addmodeofshipment', $modeofshipment), 'id' => 'addmodeofshipment', 'class' => 'form-control', 'readonly' => 'readonly'); - echo form_input($data); - ?> -
- - - -
-
- -
- - 'amendsupplierreference', 'value' => set_value('amendsupplierreference', $supplierref), 'id' => 'amendsupplierreference', 'class' => 'form-control', 'readonly' => 'readonly', 'maxlength' => '40'); - echo form_input($data); - ?> -
-
-
- -
- - 'amendsupplierofferno', 'value' => set_value('amendsupplierofferno', $suppofferno), 'id' => 'amendsupplierofferno', 'class' => 'form-control', 'readonly' => 'readonly'); - echo form_input($data); - ?> -
- -
-
-
-
-
-
- -
- - 'amendotherreference', 'value' => set_value('amendotherreference', $otherref), 'id' => 'amendotherreference', 'class' => 'form-control', 'readonly' => 'readonly'); - echo form_input($data); - ?> -
-
-
- -
- - 'Select Work Status'); - - - if (!empty($PoTypeOptions)) { - foreach ($PoTypeOptions as $POpt) : - - - $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; - - endforeach; - } - - echo form_dropdown('PoTypeOptions', $optionsPO, $revenuesubtype, set_value('PoTypeOptions'), 'id="PoTypeOptions"', 'required="true"', 'class="form-control'); - - - ?> -
- - - -
-
- - - - - PaymentID) { - //echo "$Terms"; - //echo "$pay2->PaymentTerms"; - - ?> - - PaymentID] = $pay2->PaymentTerms; - } - - foreach ($Payment as $pay1) : - - if ($Terms != $pay1->PaymentID) { - - $optionsPay[$pay1->PaymentID] = $pay1->PaymentTerms; - } - endforeach; - } - - echo form_dropdown('PaymentTerms', $optionsPay, set_value('PaymentTerms'), 'id="PaymentTerms"', 'required="true"', 'class="form-control select2'); - - ?> - -
- -
-
-
-
-
- - 'Yes', '0' => 'No'); - echo form_dropdown('insurancestatus', $optionsnew, set_value('insurancestatus'), 'id="insurancestatus"', 'required="true"', 'class="form-control select2', 'readonly ="true"'); - ?> -
-
- -
- 'InsuranceNumber', 'InsuranceNumber' => set_value('InsuranceNumber', $insurenceno), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); - echo form_input($data); - ?> -
-
-
- - - - -
-
-
-
-
- - - - - - - - - - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BasicValue; - $totDiscountAmt = $totDiscountAmt + $record->AfterDiscount; - $totPackagingAmt = $totPackagingAmt + $record->AfterPackagingValue; - $totExciseAmt = isset($record->AfterExciseDuty) ? $totExciseAmt + $record->AfterExciseDuty : ""; - $totVATAmt = $totVATAmt + $record->AfterSGST; - //$totCSTAmt = $totCSTAmt + $record->AfterCST; - $totGSTAmt = $totGSTAmt + $record->AfterCGST; - - $totOtherTaxAmt = $totOtherTaxAmt + $record->AfterIGST; - $totFreightAmt = $totFreightAmt + $record->AfterFreightValue; - $totInsuranceAmt = $totInsuranceAmt + $record->Insurance; - $totOrderSummaryAmt = $totOrderSummaryAmt + $record->TotalValue; - } - ?> - - -
SNoRequisition NoItem NameQuantityUOMRateBasic AmountTax AmountTotal Order AmountAction
ReqNo ?>MaterialName ?>Quantity ?>UOM ?>Rate ?>BasicValue, 2, '.', '') ?>Taxamount ?>TotalValue ?> - - - -
-
- -
-
-
-
- - - 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount', number_format($totBasicAmt, 2, '.', '')), 'id' => 'txtTotBasicAmount', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> - - -
-
- - - 'txtTotalDiscount', 'value' => set_value('txtTotalDiscount', number_format($totDiscountAmt, 2, '.', '')), 'id' => 'txtTotalDiscount', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> - -
-
- - - 'txtTotalVat', 'value' => set_value('txtTotalVat', number_format($totVATAmt, 2, '.', '')), 'id' => 'txtTotalVat', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> - -
- -
- - - 'txtTotalGST', 'value' => set_value('txtTotalGST', number_format($totGSTAmt, 2, '.', '')), 'id' => 'txtTotalGST', 'readonly' => 'true', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' calculateGST(0);'); - echo form_input($data); - ?> - -
- -
-
- - -
- - - 'txtTotalPackaing', 'value' => set_value('txtTotalPackaing', number_format($totPackagingAmt, 2, '.', '')), 'id' => 'txtTotalPackaing', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> - -
-
- - - 'txtTotalInsurance', 'value' => set_value('txtTotalInsurance', number_format($totInsuranceAmt, 2, '.', '')), 'id' => 'txtTotalInsurance', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> - -
-
- - - 'txtTotalFreight', 'value' => set_value('txtTotalFreight', number_format($totFreightAmt, 2, '.', '')), 'id' => 'txtTotalFreight', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> - -
-
- - - 'txtTotalOrderValueSummary', 'value' => set_value('txtTotalOrderValueSummary', number_format($totOrderSummaryAmt, 2, '.', '')), 'id' => 'txtTotalOrderValueSummary', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
-
- -
-
- 'txtSpcialInstruction', 'id' => 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction', strip_tags($ServiceDescription)), 'rows' => '8', 'class' => 'form-control'); - echo form_textarea($data); - ?> - -
-
-
-

- -
- - - - - - - - - -   Submit - - -
- - -
-
- - - - - -
-
- format('d-m-Y'); ?> -
- - -
- 'AWAITING APPROVE', - 'AWAITING RELEASE' => 'AWAITING APPROVE', - 'RELEASER ONHOLD' => 'APPROVER ONHOLD', - 'PO RELEASED' => 'PO APPROVED', - ]; - - if (isset($POStatus) && !empty($POStatus)) { - if (isset($statusMappings[$POStatus])) { - echo $statusMappings[$POStatus]; - } else { - echo $POStatus; - } - } else { - echo "Status not provided"; - } - ?> +
+ +
+
+
+
+ + 'Yes', '0' => 'No'); + echo form_dropdown('insurancestatus', $optionsnew, set_value('insurancestatus'), 'id="insurancestatus" required="true" class="form-control select2"'); + ?>
- +
+ +
+ 'InsuranceNumber', 'InsuranceNumber' => set_value('InsuranceNumber', $insurenceno), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); + echo form_input($data); + ?> +
+
+
+ + + + +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BasicValue; + $totDiscountAmt = $totDiscountAmt + $record->AfterDiscount; + $totPackagingAmt = $totPackagingAmt + $record->AfterPackagingValue; + $totExciseAmt = isset($record->AfterExciseDuty) ? $totExciseAmt + $record->AfterExciseDuty : ""; + $totVATAmt = $totVATAmt + $record->AfterSGST; + //$totCSTAmt = $totCSTAmt + $record->AfterCST; + $totGSTAmt = $totGSTAmt + $record->AfterCGST; + + $totOtherTaxAmt = $totOtherTaxAmt + $record->AfterIGST; + $totFreightAmt = $totFreightAmt + $record->AfterFreightValue; + $totInsuranceAmt = $totInsuranceAmt + $record->Insurance; + $totOrderSummaryAmt = $totOrderSummaryAmt + $record->TotalValue; + } + ?> + + +
SNoRequisition NoItem NameQuantityUOMRateBasic AmountTax AmountTotal Order AmountAction
ReqNo ?>MaterialName ?>Quantity ?>UOM ?>Rate ?>BasicValue, 2, '.', '') ?>Taxamount ?>TotalValue ?> + + + +
+
+
+
+
+
+ + + 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount', number_format($totBasicAmt, 2, '.', '')), 'id' => 'txtTotBasicAmount', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> + + +
+
+ + + 'txtTotalDiscount', 'value' => set_value('txtTotalDiscount', number_format($totDiscountAmt, 2, '.', '')), 'id' => 'txtTotalDiscount', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> + +
+
+ + + 'txtTotalVat', 'value' => set_value('txtTotalVat', number_format($totVATAmt, 2, '.', '')), 'id' => 'txtTotalVat', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> + +
+ +
+ + + 'txtTotalGST', 'value' => set_value('txtTotalGST', number_format($totGSTAmt, 2, '.', '')), 'id' => 'txtTotalGST', 'readonly' => 'true', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' calculateGST(0);'); + echo form_input($data); + ?> + +
+
+
+
+ + + 'txtTotalPackaing', 'value' => set_value('txtTotalPackaing', number_format($totPackagingAmt, 2, '.', '')), 'id' => 'txtTotalPackaing', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> + +
+
+ + + 'txtTotalInsurance', 'value' => set_value('txtTotalInsurance', number_format($totInsuranceAmt, 2, '.', '')), 'id' => 'txtTotalInsurance', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> + +
+
+ + + 'txtTotalFreight', 'value' => set_value('txtTotalFreight', number_format($totFreightAmt, 2, '.', '')), 'id' => 'txtTotalFreight', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> + +
+
+ + + 'txtTotalOrderValueSummary', 'value' => set_value('txtTotalOrderValueSummary', number_format($totOrderSummaryAmt, 2, '.', '')), 'id' => 'txtTotalOrderValueSummary', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+
+
+
+ 'txtSpcialInstruction', 'id' => 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction', strip_tags($ServiceDescription)), 'rows' => '8', 'class' => 'form-control'); + echo form_textarea($data); + ?> + +
+
+
+

+ +
+ + + + + + + + + +   Submit + + +
+ + +
+
+
+ format('d-m-Y'); ?> +
+ + +
+ 'AWAITING APPROVE', + 'AWAITING RELEASE' => 'AWAITING APPROVE', + 'RELEASER ONHOLD' => 'APPROVER ONHOLD', + 'PO RELEASED' => 'PO APPROVED', + ]; + + if (isset($POStatus) && !empty($POStatus)) { + if (isset($statusMappings[$POStatus])) { + echo $statusMappings[$POStatus]; + } else { + echo $POStatus; + } + } else { + echo "Status not provided"; + } + ?> +
+
@@ -2078,6 +1478,526 @@ if (!empty($INRSYMBOL)) {
+ + + + + + + + + + + + @@ -1834,31 +1834,10 @@ if (!empty($getlogpodtl)) { }
@@ -1885,12 +1858,12 @@ if (!empty($getlogpodtl)) {
- -

- -

- - Back + +

+ +

+ + Back
@@ -1900,2094 +1873,741 @@ if (!empty($getlogpodtl)) {
- 'form-label-left CreatePO ', 'name' => 'CreatePO', 'id' => 'CreatePO'); - echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); + echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?> +
- -
+
+
+ + 'Selected Requisition Numbers'); + if (!empty($ReqList)) { + foreach ($ReqList as $SID) : -
-
-
- - 'Selected Requisition Numbers'); - if (!empty($ReqList)) { - foreach ($ReqList as $SID) : + $options[$SID->ReqNo] = $SID->ReqNo; + //$ReqType = $SID->ReqType; + endforeach; + } + echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"', 'height="400px"'); + ?> +
+
+ +
- $options[$SID->ReqNo] = $SID->ReqNo; - //$ReqType = $SID->ReqType; - endforeach; - } - echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"', 'height="400px"'); - ?> -
-
- -
+ 'POType', 'value' => set_value('POType', REVENUE), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+ + 'Select Supplier'); + //print_r( $options); - 'POType', 'value' => set_value('POType', REVENUE), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
- - 'Select Supplier'); - //print_r( $options); - - if (!empty($Suplist)) { - foreach ($Suplist as $SID) : - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; - endforeach; - } - - echo form_dropdown('drpSupplier', $options, set_value('drpSupplier', $SupId), 'id="drpSupplier"', 'required="true"', 'class="form-control select2'); - ?> - -
-
- -
- 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> -
-
-
-
-
-
-
-
- - Select Tax Range
-
- - 'Range', 'value' => '0', 'checked' => ('0' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Local', 'onchange' => 'SetVatorCST();')); ?> - - 'Range', 'value' => '1', 'checked' => ('1' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Inter_state', 'onchange' => 'SetVatorCST();')); ?> - -
-
-
-
- Select Delivery By*
-
- - 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?> - - 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?> -
- -
-
- -
- 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); - echo form_input($data); - ?> - -
-
- -
- -
- 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> -
-
-
-
-
-
-
- -
- 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); - echo form_input($data); - ?> -
-
-
- - -
- - 'editmodeofshipment', 'value' => set_value('editmodeofshipment', $modeofshipment), 'id' => 'editmodeofshipment', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
- -
- - 'editsupplierreference', 'value' => set_value('editsupplierreference', $supplierref), 'id' => 'editsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); - echo form_input($data); - ?> -
- -
-
- -
- - 'editsupplierofferno', 'value' => set_value('editsupplierofferno', $suppofferno), 'id' => 'editsupplierofferno', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
-
-
-
-
- - -
- - 'editotherreference', 'value' => set_value('editotherreference', $otherref), 'id' => 'editotherreference', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
- -
- - 'Select Work Status'); - - - if (!empty($PoTypeOptions)) { - - foreach ($PoTypeOptions as $POpt) : - - if ($revenuesubtype == $POpt->ConfigValue) { - $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; + if (!empty($Suplist)) { + foreach ($Suplist as $SID) : + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; + endforeach; } - endforeach; - foreach ($PoTypeOptions as $POpt1) : + echo form_dropdown('drpSupplier', $options, set_value('drpSupplier', $SupId), 'id="drpSupplier"', 'required="true"', 'class="form-control select2'); + ?> + +
+
+ +
+ 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + ?> +
+
+
+
+
+
- if ($revenuesubtype != $POpt1->ConfigValue) { - $optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue; + Select Tax Range
+
+ + 'Range', 'value' => '0', 'checked' => ('0' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Local', 'onchange' => 'SetVatorCST();')); ?> + + 'Range', 'value' => '1', 'checked' => ('1' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Inter_state', 'onchange' => 'SetVatorCST();')); ?> + +
+
+
+
+ Select Delivery By*
+
+ + 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?> + + 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?> +
+ +
+
+ +
+ 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?> + +
+
+ +
+ +
+ 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + ?> +
+
+
+
+
+ +
+ 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?> +
+
+
+ + +
+ + 'editmodeofshipment', 'value' => set_value('editmodeofshipment', $modeofshipment), 'id' => 'editmodeofshipment', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+ +
+ + 'editsupplierreference', 'value' => set_value('editsupplierreference', $supplierref), 'id' => 'editsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); + echo form_input($data); + ?> +
+ +
+
+ +
+ + 'editsupplierofferno', 'value' => set_value('editsupplierofferno', $suppofferno), 'id' => 'editsupplierofferno', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+
+
+ + +
+ + 'editotherreference', 'value' => set_value('editotherreference', $otherref), 'id' => 'editotherreference', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+ + + 'Select Work Status'); + + + if (!empty($PoTypeOptions)) { + + foreach ($PoTypeOptions as $POpt) : + + if ($revenuesubtype == $POpt->ConfigValue) { + $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; + } + + endforeach; + foreach ($PoTypeOptions as $POpt1) : + + if ($revenuesubtype != $POpt1->ConfigValue) { + $optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue; + } + + endforeach; } - endforeach; - } + echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions" required="true" class="form-control"'); - echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions"', 'required="true"', 'class="form-control select2'); - ?> + ?> -
-
-
- - - PaymentID] = $pay->PaymentTerms; - - endforeach; - } - echo form_dropdown('PaymentTerms', $options6, set_value('PaymentTerms', $Terms), 'id="PaymentTerms"', 'required="true"', 'class="form-control select2'); - ?> - - - -
- -
-
-
-
-
- - 'Yes', '0' => 'No'); - echo form_dropdown('insurancestatus', $optionsnew, set_value('insurancestatus'), 'id="insurancestatus"', 'required="true"', 'class="form-control select2'); - ?> -
-
- -
- 'InsuranceNumber', 'InsuranceNumber' => set_value('InsuranceNumber', $insurenceno), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); - echo form_input($data); - ?> -
-
-
- - - -
-
-
-
-
- - - -