format('d-m-Y'); $MaxPoDate = ''; $AvlAmount = 0; $DeliverSchedule = ''; $DeliverOption = ''; $StatusName = ''; $modeofshipment = ''; $supplierref = ''; $suppofferno = ''; $otherref = ''; $revenuesubtype = ''; $insurencestatus = ''; $insurenceno = ''; $parentPO = ''; if (!empty($MaxPODate)) { foreach ($MaxPODate as $date) { $MaxPoDate = $date->PODate; } } if (!empty($CompanyDetails)) { foreach ($CompanyDetails as $Req) { $CompanyAddress = $Req->Address; } } if (!empty($AvlBudAmt)) { $AvlAmount = number_format($AvlBudAmt, 2, '.', ''); } if (!empty($INRSYMBOL)) { foreach ($INRSYMBOL as $INRS) { $INRSYM = $INRS->FontCode2000; } } foreach ($PaymentTerms as $TER) { $Terms = $TER->PaymentTerms; } $SupId = ''; $SupName = ''; $Address = ''; $PODate = ''; $Deliverydt = ''; $DeliveryAddress = ''; $PONOStatus = ''; $PONO = ''; $totBasicAmt = 0; $totDiscountAmt = 0.0; $totPackagingAmt = 0.0; $totCgst = 0.0; $totSgst = 0.0; $totIgst = 0.0; $totFreightAmt = 0.0; $totInsuranceAmt = 0.0; $totOrderSummaryAmt = 0.0; $ServiceDescription = ''; $CapitalRange = ''; $otherPayment = ''; $BudgetType = ''; $PrePOFile = ''; $Reqon = ''; $RequesterName = ''; if (!empty($POMaster)) { //print_r($POMaster); //print_r($POItem); foreach ($POMaster as $Req) { $parentPO = $Req->ParentPO; $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); $Deliverydt = $Ddt->format('d-m-Y'); $IsOpenOrder = isset($Req->IsOpenOrder) ? $Req->IsOpenOrder : null; if ($IsOpenOrder !== null && (int) $IsOpenOrder !== 0) { $isChecked = true; } else { $isChecked = false; } $DeliveryAddress = $Req->DeliveryAddress; $PONOStatus = $Req->StatusCode; $PONO = $Req->PONO; $ServiceDescription = $Req->ServiceDescription; $CapitalRange = $Req->CapitalRange; $StatusName = $Req->StatusName; $otherPayment = $Req->PaymentOtherDescription; $modeofshipment = $Req->Mode_Of_Shipment; $supplierref = $Req->Supplier_Reference; $suppofferno = $Req->Supplier_Offer_No; $otherref = $Req->Other_Reference; $revenuesubtype = $Req->POSubType; $insurencestatus = (int) $Req->InsuranceStatus; $insurenceno = $Req->InsuranceNumber; $BudgetType = $Req->BudgetType; $IGRNO = $Req->IGRNO; $PrePOFile = $Req->POFile; // echo $otherPayment; } } //echo $BudgetType; if (!empty($RequistionDetails)) { foreach ($RequistionDetails as $ReqDet) { $Reqonn = new DateTime($ReqDet->ReqDate); $Reqon = $Reqonn->format('d-m-Y'); // $Pdt = new DateTime($Req->PODate); // $PODate = $Pdt->format('Y-m-d'); $Requestedby = $ReqDet->Requestedby; $RequesterName = isset($ReqDet->FirstName) ? $ReqDet->FirstName : ''; //$Status=$ReqDet->Status; } } // foreach ($POSTATUS as $PST ) // { // $POStatus=$PST->StatusName; // } if (!empty($getlogpodtl)) { foreach ($getlogpodtl as $values) { $update = $values->FirstName; } } else { $update = []; } ?>
'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'); ?>
'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; } endforeach; foreach ($PoTypeOptions as $POpt1): if ($revenuesubtype != $POpt1->ConfigValue) { $optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue; } endforeach; } echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions" required="true" class="form-control"'); ?>
PaymentID] = $pay->PaymentTerms; endforeach; } echo form_dropdown('PaymentTerms', $options6, set_value('PaymentTerms', $Terms), 'id="PaymentTerms"', 'required="true"', 'class="form-control"'); ?>
'Yes', '0' => 'No'); echo form_dropdown('insurancestatus', $optionsnew, set_value('insurancestatus'), 'id="insurancestatus" required="true" class="form-control"'); ?>
'InsuranceNumber', 'InsuranceNumber' => set_value('InsuranceNumber', $insurenceno), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); echo form_input($data); ?>
> IS THIS OPEN ORDER FORMAT

BasicValue; $totDiscountAmt = $totDiscountAmt + $record->AfterDiscount; $totPackagingAmt = $totPackagingAmt + $record->AfterPackagingValue; $totCgst = $totCgst + $record->AfterCGST; $totSgst = $totSgst + $record->AfterSGST; $totIgst = $totIgst + $record->AfterIGST; $totFreightAmt = $totFreightAmt + $record->AfterFreightValue; $totInsuranceAmt = $totInsuranceAmt + $record->Insurance; $totOrderSummaryAmt = $totOrderSummaryAmt + $record->TotalValue; } ?>
SNo Requisition No Item Code Item Description Quantity UOM Rate Basic Amount Tax Amount Total Order Amount Action
ReqNo ?> MaterialCode ?> MaterialName ?> Quantity ?> UOM ?> Rate ?> BasicValue, 2, '.', ''); ?> Taxamount ?> TotalValue ?>    

'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount', number_format($totBasicAmt, 2, '.', '')), 'id' => 'txtTotBasicAmount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'txtTotalDiscount', 'value' => set_value('txtTotalDiscount', number_format($totDiscountAmt, 2, '.', '')), 'id' => 'txtTotalDiscount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'txtTotalSGST', 'value' => set_value('txtTotalSGST', number_format($totSgst, 2, '.', '')), 'id' => 'txtTotalSGST', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'txtTotalCGST', 'value' => set_value('txtTotalCGST', number_format($totCgst, 2, '.', '')), 'id' => 'txtTotalCGST', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>

'txtTotalPackaing', 'value' => set_value('txtTotalPackaing', number_format($totPackagingAmt, 2, '.', '')), 'id' => 'txtTotalPackaing', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'txtTotalInsurance', 'value' => set_value('txtTotalInsurance', number_format($totInsuranceAmt, 2, '.', '')), 'id' => 'txtTotalInsurance', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'txtTotalFreight', 'value' => set_value('txtTotalFreight', number_format($totFreightAmt, 2, '.', '')), 'id' => 'txtTotalFreight', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'txtTotalOrderValueSummary', 'value' => set_value('txtTotalOrderValueSummary', number_format($totOrderSummaryAmt, 2, '.', '')), 'id' => 'txtTotalOrderValueSummary', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>

'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction', strip_tags($ServiceDescription)), 'id' => 'txtSpcialInstruction', 'class' => 'form-control'); echo form_textarea($data); ?>

entity == 'PO DateChanged') { $oldValue = date('d-m-Y', strtotime($oldpo->oldValue)); } else { $oldValue = $oldpo->oldValue; } ?> entity == 'PO DateChanged') { $newValue = date('d-m-Y', strtotime($oldpo->newValue)); } else { $newValue = $oldpo->newValue; } ?>
Sno PONO LineItemNo Entity OldValue NewValue UpdatedBy UpdateOn
PONO ?> LineItemNos; ?> entity ?> SupplierName; ?> FirstName ?> UpdatedOn); echo $date->format('d-m-Y'); ?>



'AWAITING APPROVE', 'AWAITING RELEASE' => 'AWAITING APPROVE', 'RELEASER ONHOLD' => 'APPROVER ONHOLD', 'PO RELEASED' => 'PO APPROVED', ]; if (isset($StatusName) && !empty($StatusName)) { if (isset($statusMappings[$StatusName])) { echo $statusMappings[$StatusName]; } else { echo $StatusName; } } else { echo "Status not provided"; } ?>