"NO", "value" => "0"), array("name" => "YES", "value" => "1") ); $requestedBy = $requestedBy[0]->FirstName; // $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); // $CurrentDate = $dt->format('Y-m-d'); $res_arr_values = array(); $DeliverOption = ''; $SupId = ''; $SupName = ''; $Address = ''; $PODate = ''; $TotalCgst = ''; $TotalSgst = ''; $TotalIgst = ''; $DeliveryAddress = ''; $POStatus = ''; $PONO = ''; $PaymentOtherDescription = ''; $TotalSGST = 0.0; $TotalCGST = 0.0; $TotalIGST = 0.0; $Totalotherallowances = 0.0; $TotalDiscountedAmt = 0.0; $TotalFreightvalue = 0.0; $TotalFrieght = 0; $totigst = 0; $totSubtotal = 0; $totassesable = 0; $TotalSummary = 0.0; $TotalBasicAmount = 0.0; $scopeofwork = ''; $Import_DispatchDetails = ''; $Import_PlaceofOrgin = ''; $CapitalRange = ''; $Deliverydt = ''; $DeliverSchedule = ''; $MaxPoDate = ''; $AvlAmount = 0; $currentCurrencyType = ''; $exchangeRate = ''; $exchangeRate = $ExchangeRate; $ConfigValue = ''; $tt = 0.0; $TotalLanding = 0; $tothighseas = 0; $totcustom = 0; $totexciseduty = 0; $totexcisedutyED = 0; $totexciseSH = 0; $totcustomED = 0; $totcustomSH = 0; $totaddtnlexcise = 0; $totgrossduty = 0; $totavlmodvat = 0; $totgrossexpense = 0; $totordervalue = 0; $ExchangeRate = 0; $totorder = 0; $ExchangeRate = ''; $PaymentTerms = ''; $PaymentDays = ''; $PayableAT = ''; $ExchangeDate = ''; $ExchangeRateOn = ''; $UpdatedOn; $CapitalRange = ''; $PoStatusName = ''; $ModeOfShipment = ''; $SupplierReference = ''; $SuppliersOfferNo = ''; $OtherReferences = ''; $InsuranceOptions = ''; $InsuranceNumber = ''; $ServiceTypeOptions = ''; $FinalTotalBasic = 0; $BudgetType = ''; $PrePOFile = ''; $INR = ''; $INRSYM = ''; if (!empty($INRSYMBOL)) { foreach ($INRSYMBOL as $INR) { $INRSYM = $INR->Currency_Code; $INR = $INR->FontCode2000; } } //echo $INR; if (!empty($MaxPODate)) { foreach ($MaxPODate as $date) { $MaxPoDate = $date->PODate; } } if (!empty($POItem)) { //print_r($POItem); } if (!empty($POMaster)) { //print_r($POMaster); 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; //echo $DeliverOption; $DeliverSchedule = $Req->DeliverySchedule; //echo $DeliverSchedule; // $Deliverydt=$Req->DeliveryDate; if (!empty($Req->DeliveryDate)) { $Ddt = new DateTime($Req->DeliveryDate); $Deliverydt = $Ddt->format('d-m-Y'); } else { $Deliverydt = null; } $DeliveryAddress = $Req->DeliveryAddress; $POStatus = $Req->StatusCode; $PoStatusName = $Req->StatusName; $PONO = $Req->PONO; $scopeofwork = $Req->ServiceDescription; //$PayableAT=$Req->PayableAT; $ExchangeRateOn1 = new DateTime($Req->ExchangeRateCalculatedon); $ExchangeRateOn = $ExchangeRateOn1->format('d-m-Y'); // $PaymentDays=$Req->PaymentDays; $PaymentOtherDescription = $Req->PaymentOtherDescription; $PaymentTerms = $Req->PaymentTerms; //echo $PaymentTerms; $UpdatedOn = $Req->UpdatedOn; $CapitalRange = $Req->CapitalRange; $Import_DispatchDetails = $Req->Import_DispatchDetails; $Import_PlaceofOrgin = $Req->Import_PlaceofOrgin; $CapitalRange = $Req->CapitalRange; if ($CapitalRange == '0') { $ExitExchangeRate = $Req->ExchangeRate; $ExitTotalOrderValue = number_format($Req->TotalOrderValue * $ExitExchangeRate, 2, '.', ''); } else { $ExitTotalOrderValue = $Req->TotalOrderValue; } $ModeOfShipment = $Req->Mode_Of_Shipment; $SupplierReference = $Req->Supplier_Reference; $SuppliersOfferNo = $Req->Supplier_Offer_No; $OtherReferences = $Req->Other_Reference; $InsuranceOptions = $Req->InsuranceStatus; $InsuranceNumber = $Req->InsuranceNumber; $ServiceTypeOptions = $Req->POSubType; $BudgetType = $Req->BudgetType; $PrePOFile = $Req->POFile; } } //echo $CapitalRange; if (!empty($POItem) && $CapitalRange == '1') { $currentPoBasicAmt = 0; $currentPoDiscountedAmt = 0; foreach ($POItem as $getTotalAmt) { $currentPoBasicAmt = $currentPoBasicAmt + ($getTotalAmt->Rate * $getTotalAmt->Quantity); $currentPoDiscountedAmt = $currentPoDiscountedAmt + $getTotalAmt->Afterdiscountval; } if (!empty($AvlBudAmt)) { $AvlAmount = number_format($AvlCapitalBudAmt + $currentPoBasicAmt - $currentPoDiscountedAmt, 2, '.', ''); } } else { $AvlAmount = number_format($AvlCapitalBudAmt + $ExitTotalOrderValue, 2, '.', ''); } ?>
'form-label-left CapitalPO ', 'name' => 'CapitalPO', 'id' => 'CapitalPO', 'enctype' => 'multipart/form-data'); echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
'Selected Requisition Numbers'); if (!empty($ReqList)) { foreach ($ReqList as $SID): $options[$SID->ReqNo] = $SID->ReqNo; endforeach; } echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"'); ?>
'POType', 'value' => set_value('POType', CAPITAL), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); echo form_input($data); ?>
SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; endforeach; } echo form_dropdown('drpSupplier', $options2, 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); ?>
CurrencyCode; $options1[$Currency[0]->Currency_Code] = $Currency[0]->Currency_Code . ' ' . ' - ' . ' ' . $Currency[0]->Country_and_Currency; foreach ($Currency as $Cur) if ($Currency[0]->Currency_Code != $Cur->Currency_Code) { $options1[$Cur->Currency_Code] = $Cur->Currency_Code . ' ' . ' - ' . ' ' . $Cur->Country_and_Currency; } } echo form_dropdown('currencytype', $options1, set_value('currencytype', $currentCurrencyType), 'id="currencytype" class="form-control select2" required="true"'); ?>
Select Delivery By
'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?>
'Dispatch','value' => set_value('Dispatch',$Import_DispatchDetails),'id'=>'Dispatch', 'class' => 'form-control' ,'required' => 'true'); // echo form_input($data); $data = array('name' => 'Dispatch', 'value' => set_value('Dispatch', $Import_DispatchDetails), 'id' => 'Dispatch', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110'); echo Form_textarea($data); ?>
'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40'); echo Form_textarea($data); ?>
'PlaceOforigin','value' => set_value('PlaceOforigin'),'id'=>'PlaceOforigin', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;'); // echo form_input($data); $data = array('name' => 'PlaceOforigin', 'value' => set_value('PlaceOforigin', $Import_PlaceofOrgin), 'id' => 'PlaceOforigin', 'class' => 'form-control', 'required' => 'true'); echo form_input($data); ?>
'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); echo form_input($data); ?>
'addmodeofshipment', 'value' => set_value('addmodeofshipment', $ModeOfShipment), 'id' => 'addmodeofshipment', 'class' => 'form-control'); echo form_input($data); ?>
'amendsupplierreference', 'value' => set_value('amendsupplierreference', $SupplierReference), 'id' => 'amendsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); echo form_input($data); ?>
'amendsupplierofferno', 'value' => set_value('amendsupplierofferno', $SuppliersOfferNo), 'id' => 'amendsupplierofferno', 'class' => 'form-control'); echo form_input($data); ?>
'amendotherreference', 'value' => set_value('amendotherreference', $OtherReferences), 'id' => 'amendotherreference', 'class' => 'form-control'); echo form_input($data); ?>
ConfigValue) { $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; } endforeach; foreach ($PoTypeOptions as $POpt1): if ($ServiceTypeOptions != $POpt1->ConfigValue) { $optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue; } endforeach; } echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions" required="true" class="form-control select2"'); ?>
PaymentID) { //echo $PaymentTerms."
"; //print_r($Payment); $options6[$rl->PaymentID] = $rl->PaymentTerms; ?> PaymentID) { $options6[$rl2->PaymentID] = $rl2->PaymentTerms; } endforeach; } echo form_dropdown('PaymentMethod', $options6, set_value('PaymentMethod', $PaymentTerms), 'id="PaymentMethod" required="true" class="form-control select2"'); ?>
'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); echo form_input($data); ?>
$record->MaterialCode, "ReqNo" => $record->ReqNo); array_push($res_arr_values, $row); ?> " /> After_SGST; $TotalCGST = $TotalCGST + $record->After_CGST; $TotalIGST = $TotalIGST + $record->After_IGST; $FinalTotalBasic = $FinalTotalBasic + ($record->Rate * $record->Quantity); $f = ($record->Rate * $record->Quantity); $Totalotherallowances = $Totalotherallowances + $record->otherallowance; $TotalDiscountedAmt = $TotalDiscountedAmt + $record->Afterdiscountval; $TotalSummary = $TotalSummary + $record->ServiceTaxamount; //tax //echo 'TAx' . $TotalSummary; $TotalFreightvalue = $TotalFreightvalue + $record->Afvalue; // echo $TotalFreightvalue; // $totalCapitalOrder = $totalCapitalOrder+$record->Rate * $record->Quantity + $record->After_CGST + $record->After_SGST + $record->After_IGST + $record->otherallowance+ $record->Afvalue - $TotalDiscountedAmt; $totalCapitalOrder = $totalCapitalOrder + $record->Rate * $record->Quantity + $record->After_CGST + $record->After_SGST + $record->After_IGST + $record->otherallowance + $record->Afvalue - $record->Afterdiscountval; // echo $TotalBasicAmount; // echo $totalCapitalOrder; //echo $record->TotalValue; //echo 'ALL' . $TotalBasicAmount; //$ServiceDescription = $ServiceDescription; } $TotalBasicAmount = $TotalBasicAmount + $record->TotalValue; if ($CapitalRange == '0') { $TotalBasicAmount = $TotalBasicAmount + ($record->Rate * $record->Quantity); //basic $TotalLanding = $TotalLanding + $record->AfterLandingCharge; $tothighseas = $tothighseas + $record->AfterHighSeasSalesCharge; $totcustom = $totcustom + $record->AfterCustomDuty; $totexciseduty = $totexciseduty + $record->AfterExciseDuty; $totexcisedutyED = $totexcisedutyED + $record->AfterExciseDutyEdCess; $totexciseSH = $totexciseSH + $record->AfterExciseDutySHCess; $totcustomED = $totcustomED + $record->AfterCustomEdCess; $totcustomSH = $totcustomSH + $record->AfterCustomSHCess; $totaddtnlexcise = $totaddtnlexcise + $record->AfterAddlExciseDuty; $totgrossduty = $totgrossduty + $record->Grossdutypayable; $totavlmodvat = $totavlmodvat + $record->AvailableModvat; $TotalFrieght = $TotalFrieght + $record->AfterFreightValue; $totgrossexpense = $totgrossexpense + $record->Grossexpensesduetocustomduty; $ExchangeRate = $record->ExchangeRate; $totassesable = $totassesable + $record->AssessableValue; $totSubtotal = $totSubtotal + $record->SubTotal; $totigst = $totigst + $record->AfterIGST; } // $totorder=$totorder+$record->TotalOrderValue; } //echo $TotalSummary; if ($CapitalRange == '1') { // $totalCapitalOrder = $totalCapitalOrder+$TotalBasicAmount; //echo 'FNAL' . $totalCapitalOrder; } else if ($CapitalRange == '0') { $totalCapitalOrder = $totalCapitalOrder + $TotalBasicAmount; } ?>
SNo Requisition No Item Name Quantity UOM Rate Basic Amount Tax Amount Total Order Amount Action
ReqNo ?> MaterialName ?> Quantity ?> UOM ?> Rate ?> Rate * $record->Quantity, 2, '.', ''); ?> ServiceTaxamount; } else if ($CapitalRange == '0') { echo "0.0"; } ?> Rate * $record->Quantity + $record->ServiceTaxamount + $record->otherallowance + $record->Afvalue - $record->Afterdiscountval, 2, '.', '') ?> Rate * $record->Quantity), 2, '.', ''); ?>    

'txtTotalBasic', 'value' => set_value('txtTotalBasic', number_format($FinalTotalBasic, 2, '.', '')), 'id' => 'txtTotalBasic', 'class' => 'form-control num', 'readonly' => 'true'); echo form_input($data); ?>
'txtTotalDiscount', 'value' => set_value('txtTotalDiscount', number_format($TotalDiscountedAmt, 2, '.', '')), 'id' => 'txtTotalDiscount', 'class' => 'form-control num', 'readonly' => 'true'); echo form_input($data); ?>
'txtTotCgst', 'value' => set_value('txtTotCgst', number_format($TotalCGST, 2, '.', '')), 'id' => 'txtTotCgst', 'class' => 'form-control num', 'readonly' => 'true'); echo form_input($data); ?>
'txtTotSgst', 'value' => set_value('txtTotSgst', number_format($TotalSGST, 2, '.', '')), 'id' => 'txtTotSgst', 'class' => 'form-control num', 'readonly' => 'true'); echo form_input($data); ?>
'txtTotIgst', 'value' => set_value('txtTotIgst', number_format($TotalIGST, 2, '.', '')), 'id' => 'txtTotIgst', 'class' => 'form-control num', 'readonly' => 'true'); echo form_input($data); ?>
'TotalOtherAllowances', 'value' => set_value('TotalOtherAllowances', number_format($Totalotherallowances, 2, '.', '')), 'id' => 'TotalOtherAllowances', 'class' => 'form-control num', 'readonly' => 'true'); echo form_input($data); ?>
'TotalFreight', 'value' => set_value('TotalFreight', number_format($TotalFreightvalue, 2, '.', '')), 'id' => 'TotalFreight', 'class' => 'form-control num', 'readonly' => 'true'); echo form_input($data); ?>
'Totalservicesummary', 'value' => set_value('Totalservicesummary', number_format($totalCapitalOrder, 2, '.', '')), 'id' => 'Totalservicesummary', 'class' => 'form-control num', 'readonly' => 'true'); echo form_input($data); ?>

'txttotalfrieght', 'value' => set_value('txttotalfrieght', $TotalFrieght), 'id' => 'txttotalfrieght', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'txttotallanding', 'value' => set_value('txttotallanding', $TotalLanding), 'id' => 'txttotallanding', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'txttotalAssessable', 'value' => set_value('txttotalAssessable', $totassesable), 'id' => 'txttotalAssessable', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'txttotalcustom', 'value' => set_value('txttotalcustom', $totcustom), 'id' => 'txttotalcustom', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'txttotalcustomED', 'value' => set_value('txttotalcustomED', $totcustomED), 'id' => 'txttotalcustomED', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'txttotalcustomSH', 'value' => set_value('txttotalcustomSH', $totcustomSH), 'id' => 'txttotalcustomSH', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'txttotalSubtotal', 'value' => set_value('txttotalSubtotal', $totSubtotal), 'id' => 'txttotalSubtotal', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'txttotalIgst', 'value' => set_value('txttotalIgst', $totigst), 'id' => 'txttotalIgst', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'txttotalgrossduty', 'value' => set_value('txttotalgrossduty', $totgrossduty), 'id' => 'txttotalgrossduty', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'CapitalToatlOrder', 'value' => set_value('CapitalToatlOrder', number_format($totalCapitalOrder, 2, '.', '')), 'id' => 'CapitalToatlOrder', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction', $scopeofwork), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); echo form_textarea($data); ?>
format('d-m-Y'); ?>

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