format('d-m-Y'); $MaxPoDate = ''; $AvlAmount = 0; $DeliverSchedule = ''; $DeliverOption = ''; $RowCount = 0; $PrePOFile = ''; $Reqon = ''; $RequesterName = ''; if (!empty($MaxPODate)) { foreach ($MaxPODate as $date) { $MaxPoDate = $date->PODate; } } if (!empty($CompanyDetails)) { foreach ($CompanyDetails as $Req) { $CompanyAddress = $Req->Address; } } if (!empty($AvlBudAmt)) { $AvlAmount = $AvlBudAmt; //echo $AvlAmount; } foreach ($PaymentTerms as $TER) { $Terms = $TER->PaymentTerms; } $SupId = ''; $SupName = ''; $Address = ''; $PODate = ''; $Deliverydt = ''; $DeliveryAddress = ''; $POStatus = ''; $PONO = ''; $totBasicAmt = 0; $totDiscountAmt = 0.0; $totPackagingAmt = 0.0; $totExciseAmt = 0.0; $totVATAmt = 0.0; //FOR SGST $totCSTAmt = 0.0; //FOR CGST $totGSTAmt = 0.0; //FOR IGST $totOtherTaxAmt = 0.0; $totFreightAmt = 0.0; $totInsuranceAmt = 0.0; $totOrderSummaryAmt = 0.0; $PaymentOtherDescription = ''; $ServiceDescription = ''; $taxrange = ""; $modeofshipment = ''; $supplierref = ''; $suppofferno = ''; $otherref = ''; $revenuesubtype = ''; $insurencestatus = ''; $insurenceno = ''; $BudgetType = ''; if (!empty($POMaster)) { // print_r($POMaster); // print_r($Payment); // echo "****"; // print_r($PaymentTerms); foreach ($POMaster as $Req) { $SupId = $Req->SupplierID; $SupName = $Req->SupplierName; $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; $DeliverSchedule = $Req->DeliverySchedule; $Ddt = new DateTime($Req->DeliveryDate); //echo $Req->DeliveryDate."
"; $Deliverydt = $Ddt->format('d-m-Y'); //echo $Deliverydt; $PaymentOtherDescription = $Req->PaymentOtherDescription; //echo $PaymentOtherDescription; $DeliveryAddress = $Req->DeliveryAddress; $POStatus = $Req->StatusName; $PONO = $Req->PONO; $taxrange = $Req->PORange; //echo $taxrange . "t"; $ServiceDescription = $Req->ServiceDescription; $modeofshipment = $Req->Mode_Of_Shipment; $supplierref = $Req->Supplier_Reference; $suppofferno = $Req->Supplier_Offer_No; $otherref = $Req->Other_Reference; $revenuesubtype = $Req->POSubType; $insurencestatus = $Req->InsuranceStatus; $insurenceno = $Req->InsuranceNumber; $BudgetType = $Req->BudgetType; $PrePOFile = $Req->POFile; } } //echo $BudgetType; if (!empty($RequistionDetails)) { foreach ($RequistionDetails as $ReqDet) { $Reqon = $ReqDet->ReqDate; $Requestedby = $ReqDet->Requestedby; //echo $ReqDet->FirstName . "3";die(); if ($Requestedby != '') { $RequesterName = $ReqDet->FirstName; } $Status = $ReqDet->Status; } } //echo $ServiceDescription; foreach ($POSTATUS as $PST) { $POStatus = $PST->StatusName; } if (!empty($INRSYMBOL)) { foreach ($INRSYMBOL as $INRS) { $INRSYM = $INRS->FontCode2000; } } ?>
'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" 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;', 'min' => date('d-m-Y'), ); 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"'); ?>
'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; } ?>
SNo Requisition No Item Name Quantity UOM Rate Basic Amount Tax Amount Total Order Amount Action
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); ?>
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"; } ?>