diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 0beaad5e..ca7afd44 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -61,19 +61,12 @@ $routes->post('materialExist','Rawmaterialdetails::checkmaterial'); $routes->get('viewRawmaterial','Rawmaterialdetails::viewRawmaterial'); $routes->post('rawmaterialdetails/editRawmaterial', 'Rawmaterialdetails::editRawmaterial'); $routes->get('exportmaterial' , 'Rawmaterialdetails::exportmaterial'); +$routes->get('rawmaterialdetailsautocomplete' , 'Rawmaterialdetails::autocomplete'); // Cost Center Routes $routes->get('costListing', 'CostCenter::index'); -$routes->get('addCostCenter', 'CostCenter::addCostCenter'); -$routes->get('editCostCenter', 'CostCenter::editCostCenter'); +$routes->get('fetchCostCenterDetails', 'CostCenter::fetchCostCenterDetails');// for Ajax both add and edit.... $routes->get('deleteCostCenter', 'CostCenter::deleteCostCenter'); -$routes->post('saveCostCenter', 'CostCenter::saveCostCenter'); -$routes->post('updateCostCenter', 'CostCenter::updateCostCenter'); -$routes->post('CostCenter/AddCostDepartment','CostCenter::AddCostDepartment'); -$routes->post('CostCenter/DeleteCostDepartment','CostCenter::DeleteCostDepartment'); - -$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'CostCenter/GetBudgetForYear','CostCenter::GetBudgetForYear'); -$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'deletecost', 'CostCenter::deletecost'); $routes->get('exportcost', 'CostCenter::exportcost'); // Asset Detail Routes diff --git a/app/Controllers/CostCenter.php b/app/Controllers/CostCenter.php index 42e5eb68..11d25da1 100644 --- a/app/Controllers/CostCenter.php +++ b/app/Controllers/CostCenter.php @@ -52,122 +52,47 @@ class CostCenter extends BaseController } /** - * This function is used to load the add new cost Center */ - function addCostCenter() - { - - $data['Department'] = $this->costcenter_model->getDepartment(); - - $data['BudgetType'] = $this->costcenter_model->getConfigValue('C004'); - - $data['Approver'] = $this->costcenter_model->getApproverName(); - - $data['FiscalYear'] = $this->costcenter_model->getFiscalYear(); - - $this->global['pageTitle'] = 'Add Cost Center'; - - $this->loadViews("addCostCenter", $this->global, $data, NULL); - } - - function Dep_SelectedDepartment($selectValue) - { - //echo 'select_validate method called'; - // 'none' is the first option and the text says something like "-Choose one-" - if (strlen($selectValue) <= 0) { - // $this->validator->setMessage('Dep_SelectedDepartment', 'Please Select Department.'); - return false; - } else // user picked something - { - return true; - } - } - - /** - * This function is used to add new Cost to the system + * This function is used to add/edit Cost */ - function saveCostCenter() - { - // $this->validator->setRules([ - // 'CostName' => 'trim|required', - // 'CostCode' => 'trim|required', - // ]); - - // if ($this->validator->run() == FALSE) { - // $this->addCostCenter(); - // } else { + public function fetchCostCenterDetails() { + $id = $this->request->getPost('id'); + $CostCenterName = $this->request->getPost('CostCenterName'); + $CostCenterName = ($CostCenterName !== null && is_string($CostCenterName)) ? strtoupper(trim($CostCenterName)) : null; + $userId = $this->session->get('userId'); + $approverId = $this->session->get('EmpID'); + $currentdt = get_current_date_time(); + + $data = ['status' => false, 'message' => 'An error occurred while creating cost details']; + + if ($id == 0) { + $lastccid = $this->costcenter_model->lastCCID(); + $lastccid = (int)$lastccid++; + $newccc = generateCostCenterCode($lastccid); + log_message('debug', 'newccc returned: ' . $newccc); - $CostCode = $this->request->getPost('CostCode'); - $CostCode = ($CostCode !== null && is_string($CostCode)) ? strtoupper(trim($CostCode)) :null; - $CostName = $this->request->getPost('CostName'); - $CostName = ($CostName !== null && is_string($CostName)) ? strtoupper(trim($CostName)) :null; - $CreateBy = $this->session->get('userId'); - $SelectedDepartment = $this->request->getPost('txtSelectedDepartment'); - - // $ApproverName = $this->request->getPost('ApprovedBy'); - $ApproverName = $this->session->get('EmpID'); - $comma_separated = explode(':', (string)$SelectedDepartment); - // $comma_separated = $this->costcenter_model->getDepartment(); - // print_r($comma_separated);die; - - $createddt = get_current_date_time(); - $CodeExists = $this->costcenter_model->checkCostDetailsExists($CostCode); - if (count($CodeExists) == 0) { - $Cost = array('CostCenterCode' => $CostCode, 'CostCenterName' => $CostName, 'ApprovedBy' => $ApproverName, 'CreatedBy' => $CreateBy, 'createdDate' => $createddt); - $this->costcenter_model->saveCostCenter($Cost); + $Cost = ['CostCenterCode' => $newccc, + 'CostCenterName' => $CostCenterName, + 'ApprovedBy' => $approverId, + 'CreatedBy' => $userId, + 'CreatedDate' => $currentdt + ]; + if ($this->costcenter_model->saveCostCenter($Cost) > 0) { + $data = ['status' => true, 'message' => 'Successfully created cost details']; } - for ($j = 0; $j < count($comma_separated); $j++) { - $DeptCode = $comma_separated[$j]; - - $this->costcenter_model->DeleteDepartment($DeptCode, $CostCode); - - $Dept = array('CostCenterCode' => $CostCode, 'DEPCode' => $DeptCode, 'CreatedBy' => $CreateBy, 'createdDate' => $createddt); - $this->costcenter_model->addCostCenterDepartment($Dept); - } - $RowCount = $this->request->getPost('txtRowCount'); - - for ($i = 1; $i <= $RowCount; $i++) { - $BudgetType = $this->request->getPost('BudgetType' . $i); - $BudgetYear = $this->request->getPost('BudgetYear' . $i); - $BudgetAmount = $this->request->getPost('BudgetAmount' . $i); - $Remarks = $this->request->getPost('Remarks' . $i); - $this->costcenter_model->DeleteBudget($BudgetType, $BudgetYear, $CostCode); - - $Budget = array('CostCenterCode' => $CostCode, 'BudgetType' => $BudgetType, 'BudgetYear' => $BudgetYear, 'BudgetAmount' => $BudgetAmount, 'Remarks' => $Remarks, 'CreatedBy' => $CreateBy, 'createdDate' => $createddt); - $this->costcenter_model->addBudget($Budget); - } - echo 'Successfully Created Cost details'; - // } - } - /** - * This function is used load user edit information - * @param number $userId : Optional : This is user id - */ - function editCostCenter($CostCode = NULL) - { - - if ($CostCode == '') { - $CostCenterID = $_GET['CostCode']; } else { - - $CostCenterID = $CostCode; + $Cost = ['CostCenterName' => $CostCenterName,'UpdatedBy' => $userId,'UpdatedDate' => $currentdt]; + if ($this->costcenter_model->updateCostCenter($Cost, $id) > 0) { + $data = ['status' => true, 'message' => 'Successfully updated cost details']; + } } - - $data['CostMaster'] = $this->costcenter_model->GetCostCenterMaster($CostCenterID); - $data['CostDepts'] = $this->costcenter_model->GetCostCenterDepartment($CostCenterID); - $data['CostBudget'] = $this->costcenter_model->GetCostCenterBudget($CostCenterID); - $data['DeptList'] = $this->costcenter_model->GetDepartmentNotinCostCenter($CostCenterID); - $data['BudType'] = $this->costcenter_model->GetBudgetTypeNotinCostCenter($CostCenterID, 'C004'); - $data['BudYear'] = $this->costcenter_model->GetBudgetYear($CostCenterID); - $data['FiscalYear'] = $this->costcenter_model->getFiscalYear(); - //print_r(count($data['BudType'])); - - $this->global['pageTitle'] = 'Edit Cost'; - - - - $this->loadViews("editCostCenter", $this->global, $data, NULL); + + return $this->response->setJSON($data); } - + + + /** + * delete the Cost + */ function deleteCostCenter($CostCode = NULL) { @@ -183,246 +108,9 @@ class CostCenter extends BaseController } - function GetBudgetForYear() - { - - //$id = $this->request->getPost('id'); - $BudYear = $_GET['BudYear']; - $CostCenterID = $_GET['CostCode']; - $result = $this->costcenter_model->GetCostCenterBudgetByYear($CostCenterID, $BudYear); - $BudList = $this->costcenter_model->GetCostBudgetTypeByYear($CostCenterID, 'C004', $BudYear); - - $HTML = ""; - $HTML2 = ""; - $index = 0; - // $HTML2 = $BudList[0]['ConfigValue']; - //if($BudList->num_rows() > 0){ - for ($j = 0; $j < count($BudList); $j++) { - $ConfigValue = $BudList[$j]['ConfigValue']; - $HTML2 .= ""; - } - - for ($i = 0; $i < count($result); $i++) { - $index = $index + 1; - $BudgetType = $result[$i]['BudgetType']; - $BudgetYear = $result[$i]['BudgetYear']; - $BudgetAmount = $result[$i]['BudgetAmount']; - $Remarks = $result[$i]['Remarks']; - $HTML .= " - " . $BudgetType . " - - - - - - " . $BudgetYear . " - - " . $BudgetAmount . " - - " . $Remarks . " - -     - "; - } - $HTML .= ""; - die(json_encode(array('Html' => $HTML, 'BudYear' => $HTML2))); - // echo $HTML2; - } - /** - * This function is used to edit the user information + * export the Cost */ - function updateCostCenter() - { - - $CostCode = $this->request->getPost('CostCode'); - $CostCode = ($CostCode !== null && is_string($CostCode)) ? strtoupper(trim($CostCode)) :null; - $CostName = $this->request->getPost('CostName'); - $CostName = ($CostName !== null && is_string($CostName)) ? strtoupper(trim($CostName)) :null; - $updatedBy = $this->session->get('userId'); - - $SelectedDepartment = (string)$this->request->getPost('txtSelectedDepartment'); - - // $ApproverName = $this->request->getPost('ApprovedBy'); - // $ApproverName = $this->session->get('EmpID'); - $ApproverName = NULL; - - - $comma_separated = []; - print_r(strlen($SelectedDepartment)); - if(strlen($SelectedDepartment)>0) - { - - $comma_separated = explode(':', $SelectedDepartment); - } - - $updateddt = get_current_date_time(); - - $Cost = array( 'CostCenterName'=>$CostName,'ApprovedBy'=>$ApproverName,'UpdatedBy'=>$updatedBy,'UpdatedDate'=>$updateddt); - $this->costcenter_model->EditCost($Cost,$CostCode); - - - if(count($comma_separated)>= 1) - { - for ($j = 0; $j < count($comma_separated); $j++) - { - // $DeptCode = $comma_separated[$j]; - // $this->costcenter_model->DeleteDepartment( $DeptCode,$CostCode); - // $Dept = array('CostCenterCode'=>$CostCode, 'DEPCode'=>$DeptCode,'CreatedBy'=>$updatedBy,'createdDate'=>$updateddt,'UpdatedBy'=>$updatedBy,'UpdatedDate'=>$updateddt); - // $this->costcenter_model->addCostCenterDepartment($Dept); - } - } - - $RowCount = $this->request->getPost('txtRowCount'); - - if($RowCount){ - for ($i = 1; $i <= $RowCount; $i++) - { - $BudgetType = $this->request->getPost('BudgetType'.$i); - $BudgetYear = $this->request->getPost('BudgetYear'.$i); - $BudgetAmount = $this->request->getPost('BudgetAmount'.$i); - $Remarks = $this->request->getPost('Remarks'.$i); - // $this->costcenter_model->DeleteBudget($BudgetType,$BudgetYear,$CostCode); - - $Budget = array('CostCenterCode'=>$CostCode, 'BudgetType'=>$BudgetType,'BudgetYear'=>$BudgetYear,'BudgetAmount'=>$BudgetAmount,'Remarks'=>$Remarks,'CreatedBy'=>$updatedBy,'createdDate'=>$updateddt,'UpdatedBy'=>$updatedBy,'UpdatedDate'=>$updateddt); - $ExistYearBudget = $this->costcenter_model->CheckExistBudget($BudgetType,$BudgetYear,$CostCode); - - // print_r($Budget); - if($ExistYearBudget){ - $this->costcenter_model->updateBudget($Budget,$BudgetType,$BudgetYear,$CostCode); - } - else{ - $this->costcenter_model->addBudget($Budget); - } - } - } - echo('Successfully Updated Cost details'); - } - - function DeleteCostDepartment() - { - // echo "dasf"; - // die(); - $CostCode = $this->request->getPost('CostCode'); - $CostCode = ($CostCode !== null && is_string($CostCode)) ? strtoupper(trim($CostCode)) :null; - $CostName = $this->request->getPost('CostName'); - $CostName = ($CostName !== null && is_string($CostName)) ? strtoupper(trim($CostName)) :null; - $updatedBy = $this->session->get('userId'); - $SelectedDepartment = $this->request->getPost('txtSelectedDepartment'); - $this->costcenter_model->DeleteDepartment($SelectedDepartment, $CostCode); - echo ("Department Removed Successfully"); - } - - - function AddCostDepartment() - { - $CostCode = $this->request->getPost('CostCode'); - $CostCode = ($CostCode !== null && is_string($CostCode)) ? strtoupper(trim($CostCode)) :null; - $CostName = $this->request->getPost('CostName'); - $CostName = ($CostName !== null && is_string($CostName)) ? strtoupper(trim($CostName)) :null; - $updatedBy = $this->session->get('userId'); - $SelectedDepartment = $this->request->getPost('txtSelectedDepartment'); - // $updatedBy = $this->session->get ( 'userId' ); - - $updateddt = get_current_date_time(); - - $Dept = array('CostCenterCode' => $CostCode, 'DEPCode' => $SelectedDepartment, 'CreatedBy' => $updatedBy, 'createdDate' => $updateddt, 'UpdatedBy' => $updatedBy, 'UpdatedDate' => $updateddt); - $this->costcenter_model->addCostCenterDepartment($Dept); - echo ("Department Added Successfully"); - } - - - // function AddCostDepartment() - // { - // // echo "343"; - // // die(); - // $CostCode = strtoupper(trim($this->request->getPost('CostCode'))); - // $CostName = strtoupper(trim($this->request->getPost('CostName'))); - // $updatedBy = $this->session->get ( 'userId' ); - // $SelectedDepartment = $this->request->getPost('txtSelectedDepartment'); - // //echo $SelectedDepartment; - // //die(); - - // $ApproverName = $this->request->getPost('ApprovedBy'); - // $comma_separated = ""; - // //print_r(strlen($SelectedDepartment)); - // if(strlen($SelectedDepartment)>0) - // { - - // $comma_separated = explode(':', $SelectedDepartment); - // } - - // //die(); - // //echo count($comma_separated); - - - // $updateddt = get_current_date_time(); - - - // if(count($comma_separated)>= 1) - // { - - - // for ($j = 0; $j < count($comma_separated); $j++) - // { - // $DeptCode = $comma_separated[$j]; - - // $this->costcenter_model->DeleteDepartment( $DeptCode,$CostCode); - - // $Dept = array('CostCenterCode'=>$CostCode, 'DEPCode'=>$DeptCode,'CreatedBy'=>$updatedBy,'createdDate'=>$updateddt,'UpdatedBy'=>$updatedBy,'UpdatedDate'=>$updateddt); - - // //print_r($Dept); - // $this->costcenter_model->addCostCenterDepartment($Dept); - - // } - // echo "Updated"; - // } - - - - // } - - - function viewcost($CostCenterID = NULL) - { - - if ($CostCenterID == null) { - redirect('costListing'); - } - - $data['Cost'] = $this->costcenter_model->getuserinfo($CostCenterID); - //$data['users'] = $this->purchaseorder_model->getusers(); - - $this->global['pageTitle'] = 'View Cost'; - - $this->loadViews("viewcost", $this->global, $data, NULL); - } - - /** - * This function is used to delete the user using userId - * @return boolean $result : TRUE / FALSE - */ - function deletecost() - { - // if($this->isAdmin() == TRUE) - // { - // echo(json_encode(array('status'=>'access'))); - // } - // else - // { - $CostCenterID = $this->request->getPost('CostCentreID'); - $cost = array('CreateDate' => date('Y-m-d H:i:sa')); - - $result = $this->costcenter_model->deletecost($cost, $CostCenterID); - - if ($result > 0) { - echo (json_encode(array('status' => TRUE))); - } else { - echo (json_encode(array('status' => FALSE))); - } - //} - } - function exportcost() { diff --git a/app/Controllers/Inwardgateregister.php b/app/Controllers/Inwardgateregister.php index 5ca365b9..2e75b53e 100755 --- a/app/Controllers/Inwardgateregister.php +++ b/app/Controllers/Inwardgateregister.php @@ -335,25 +335,20 @@ class Inwardgateregister extends BaseController #Step 2 Master File and Its Details Gathering $MasterFile = $this->request->getFile('MasterFile'); - $requestMasterFileName = $MasterFile->getName(); - - if (!empty($requestMasterFileName)) { + $requestMasterFileName = NULL; + if (!empty($MasterFile)) { + $requestMasterFileName = $MasterFile->getName(); if ($MasterFile && $MasterFile->isValid() && !$MasterFile->hasMoved()) { if (!empty($this->inwardgateregister_model->isFileExistsInIGRmaster($requestMasterFileName))) { log_message('error', 'File already exists in the database'.$requestMasterFileName); - $requestMasterFileName = NULL; } else{ $MasterFile->move($path, $requestMasterFileName); $fileupdated_count++; $fileupdated_name[] = $requestMasterFileName; } - }else{ - $requestMasterFileName = NULL; - } - }else{ - $requestMasterFileName = NULL; - } + } + } #Step 3 Master Details Gathering to Save In DB $igr = array('PONO' => $PONO, 'VehicleNo' => $VehicleNo, 'DeliveryChellanOrInvoiceNo' => $DeliveryChellanOrInvoiceNo, 'DeliveryChellanDate' => $DeliveryChellanDate, 'MaterialRcvdDate' => $MaterialRcvdDt, 'DriverName' => $DriverName, 'DriverMobileNumber' => $DriverMobileNumber,'IGRStatus' => $IGRStatus, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt, 'PaymentStatus' => $paymentstatus); @@ -595,10 +590,11 @@ function viewIGRDetails() $IGRNo = $this->request->getPost('igr'); $DeliveryChellan = $this->request->getPost('invdate'); - $DeliveryChellanDate = get_date_time_format($DeliveryChellan); + $DeliveryChellanDate = !$DeliveryChellan || $DeliveryChellan === null ? NULL : get_date_time_format($DeliveryChellan); $Mat_Rcvd_Dt = $this->request->getPost('mrc'); - $MaterialRcvdDt = get_date_time_format($Mat_Rcvd_Dt); + $MaterialRcvdDt = !$Mat_Rcvd_Dt || $Mat_Rcvd_Dt === null ? NULL : get_date_time_format($Mat_Rcvd_Dt); + $VehicleNo = $this->request->getPost('vehicle_no'); $DriverName = $this->request->getPost('driver'); @@ -618,9 +614,9 @@ function viewIGRDetails() $igrarr = array('DeliveryChellanDate' => $DeliveryChellanDate, 'MaterialRcvdDate' => $MaterialRcvdDt,'VehicleNo'=>$VehicleNo,'DriverMobileNumber'=>$DriverMobileNumber,'DriverName'=>$DriverName, 'IGRStatus' => $IGRStatus,'UpdateBY' => $updateby); $MasterFile = $this->request->getfile('MasterFile'); - $requestMasterFileName = $MasterFile->getName(); - if (!empty($requestMasterFileName)) { + if ($MasterFile) { + $requestMasterFileName = $MasterFile->getName(); if ($MasterFile && $MasterFile->isValid() && !$MasterFile->hasMoved()) { if (!empty($this->inwardgateregister_model->isFileExistsInIGRmaster($requestMasterFileName))) { log_message('error', 'File already exists in the database'.$requestMasterFileName); @@ -700,9 +696,9 @@ function viewIGRDetails() $tareWeightDate = $row['TareWeightDate']; $netWeight = $row['NetWeight']; $igrItemNo = $row['IGRItemNo']; - $GrossWtDt = get_date_time_format($grossWeightDate); - $TareWtDt = get_date_time_format($tareWeightDate); - + $GrossWtDt = !empty($grossWeightDate) && strtolower($grossWeightDate) !== 'null' ? get_date_time_format($grossWeightDate) : NULL; + $TareWtDt = !empty($tareWeightDate) && strtolower($tareWeightDate) !== 'null' ? get_date_time_format($tareWeightDate) : NULL; + $igrline = array( 'QuantityAsPerInvoice' => $quantityAsPerInvoice, 'Remarks' => $remarks, @@ -901,9 +897,11 @@ function viewIGRDetails() $requestdata = $this->request->getPost('data'); $updateby = $this->session->get('userId'); $GrossWeightDate = (string)$this->request->getPost('GrossWeightDate'); - $GrossWtDt = get_date_time_format($GrossWeightDate); + $GrossWtDt = !empty($GrossWeightDate) ? get_date_time_format($GrossWeightDate) : NULL; + $TareWeightDate = (string)$this->request->getPost('TareWeightDate'); - $TareWtDt = get_date_time_format($TareWeightDate); + $TareWtDt = !empty($TareWeightDate) ? get_date_time_format($TareWeightDate) : NULL; + // Check if request data is not null and is a string @@ -1168,7 +1166,10 @@ function updateIGRWeight(){ $IGRItemNo = $this->request->getPost('IGRlineitem'); $updateby = $this->session->get('userId'); $WeightFile = $this->request->getfile('WeightFile'); - $requestWeightFileName = $WeightFile->getName(); + $GrossWtDt = !empty($GrossWeightDate) ? get_date_time_format($GrossWeightDate) : null; + $TareWtDt = !empty($TareWeightDate) ? get_date_time_format($TareWeightDate) : null; + + $path = ROOTPATH.'public/uploads/Igrfiles/'; if(!is_dir($path)) { mkdir($path, 0777, true); } @@ -1230,7 +1231,7 @@ function updateIGRWeight(){ log_message('error', "History updated successfully. History id: " . $history_id); } } - if($GrossWeightDate){ + if($GrossWtDt){ $grossdate = $this->inwardgateregister_model->get_igr_history('GrossWeightDate',$IGRNO, $IGRItemNo); if(!empty($grossdate)){ $old_data = NULL; @@ -1239,17 +1240,17 @@ function updateIGRWeight(){ $old_data = $row->new_data; } } - $igr_history = array('field' => 'GrossWeightDate','new_data' => $GrossWeightDate,'old_data' => $old_data,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo); + $igr_history = array('field' => 'GrossWeightDate','new_data' => $GrossWtDt,'old_data' => $old_data,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo); ($old_data != NULL) ? $igr_history['is_edit'] = 1 : $igr_history['is_add'] = 1 ; $history_id = $this->inwardgateregister_model->igr_history($igr_history); log_message('error', "History updated successfully. History id: " . $history_id); } else{ - $igr_history = array('field' => 'GrossWeightDate','is_edit' => 1,'new_data' => $GrossWeightDate,'old_data' => NULL,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo); + $igr_history = array('field' => 'GrossWeightDate','is_edit' => 1,'new_data' => $GrossWtDt,'old_data' => NULL,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo); $history_id = $this->inwardgateregister_model->igr_history($igr_history); log_message('error', "History updated successfully. History id: " . $history_id); } } - if($TareWeightDate){ + if($TareWtDt){ $taredate = $this->inwardgateregister_model->get_igr_history('TareWeightDate',$IGRNO, $IGRItemNo); if(!empty($taredate)){ @@ -1259,12 +1260,12 @@ function updateIGRWeight(){ $old_data = $row->new_data; } } - $igr_history = array('field' => 'TareWeightDate','new_data' => $TareWeightDate,'old_data' => $old_data,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo); + $igr_history = array('field' => 'TareWeightDate','new_data' => $TareWtDt,'old_data' => $old_data,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo); ($old_data != NULL) ? $igr_history['is_edit'] = 1 : $igr_history['is_add'] = 1 ; $history_id = $this->inwardgateregister_model->igr_history($igr_history); log_message('error', "History updated successfully. History id: " . $history_id); } else{ - $igr_history = array('field' => 'TareWeightDate','is_edit' => 1,'new_data' => $TareWeightDate,'old_data' => NULL,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo); + $igr_history = array('field' => 'TareWeightDate','is_edit' => 1,'new_data' => $TareWtDt,'old_data' => NULL,'history_dated' => get_current_date_time(),'by' => $this->session->get('userId'),'IGR_No' => $IGRNO,'IGRItem_No'=>$IGRItemNo); $history_id = $this->inwardgateregister_model->igr_history($igr_history); log_message('error', "History updated successfully. History id: " . $history_id); } @@ -1272,19 +1273,22 @@ function updateIGRWeight(){ $IGRItemNo = $this->request->getPost('IGRlineitem'); - $igr_lineitem = array('GrossWeight' => $GrossWeight,'GrossWeightDate' => $GrossWeightDate,'TareWeightDate' => $TareWeightDate,'TareWeight' => $TareWeight,'NetWeight' => $NetWeight,'UpdateBY' => $updateby); - - if (!empty($requestWeightFileName)) { - if ($WeightFile && $WeightFile->isValid() && !$WeightFile->hasMoved()) { - if (!empty($this->inwardgateregister_model->isFileExistsInIGRdetails($requestWeightFileName))) { - log_message('error', 'File already exists in the database'.$requestWeightFileName); - } - else{ - $WeightFile->move($path, $requestWeightFileName); - $igr_lineitem['WeightFile'] = $requestWeightFileName; + $igr_lineitem = array('GrossWeight' => $GrossWeight,'GrossWeightDate' => $GrossWtDt,'TareWeightDate' => $TareWtDt,'TareWeight' => $TareWeight,'NetWeight' => $NetWeight,'UpdateBY' => $updateby); + $requestWeightFileName =null ; + if($WeightFile){ + if (!empty($requestWeightFileName)) { + if ($WeightFile && $WeightFile->isValid() && !$WeightFile->hasMoved()) { + if (!empty($this->inwardgateregister_model->isFileExistsInIGRdetails($requestWeightFileName))) { + log_message('error', 'File already exists in the database'.$requestWeightFileName); + } + else{ + $WeightFile->move($path, $requestWeightFileName); + $igr_lineitem['WeightFile'] = $requestWeightFileName; + } } } } + $update = $this->inwardgateregister_model->updateIGRLineItem($igr_lineitem, $IGRItemNo); if ($update) { diff --git a/app/Controllers/Purchaseorder.php b/app/Controllers/Purchaseorder.php index 89944b62..d24b205c 100644 --- a/app/Controllers/Purchaseorder.php +++ b/app/Controllers/Purchaseorder.php @@ -1102,10 +1102,10 @@ $mpdf->use_kwt = true; $file = $this->request->getFile('POFile'); - $requestfilename = $file->getName(); - if (!empty($requestfilename)) { - + $requestfilename = NULL; + if (!empty($file)) { if ($file->isValid() && !$file->hasMoved()) { + $requestfilename = $file->getName(); $path = ROOTPATH.'public/uploads/POfiles/'; if(!is_dir($path)) { mkdir($path, 0777, true); } if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { @@ -1284,9 +1284,11 @@ $mpdf->use_kwt = true; $POList['ReleasedBy'] = $this->session->get('userId'); } $file = $this->request->getFile('POFile'); - $requestfilename = $file->getName(); - if (!empty($requestfilename)) { + $requestfilename = NULL; + if (!empty($file)) { if ($file && $file->isValid() && !$file->hasMoved()) { + $requestfilename = $file->getName(); + $path = ROOTPATH.'public/uploads/POfiles/'; if(!is_dir($path)) { mkdir($path, 0777, true); } if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { @@ -1905,10 +1907,11 @@ $mpdf->use_kwt = true; $lastPONO = $this->purchaseorder_model->lastPONO(); $newPONO = generate_po_number($lastPONO); $file = $this->request->getFile('POFile'); - $requestfilename = $file->getName(); - if (!empty($requestfilename)) { + $requestfilename = NULL; + if (!empty($file)) { if ($file->isValid() && !$file->hasMoved()) { + $requestfilename = $file->getName(); $path = ROOTPATH.'public/uploads/POfiles/'; if(!is_dir($path)) { mkdir($path, 0777, true); } if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { @@ -2131,9 +2134,11 @@ $mpdf->use_kwt = true; $POList['ReleasedBy'] = $this->session->get('userId'); } $file = $this->request->getFile('POFile'); - $requestfilename = $file->getName(); - if (!empty($requestfilename)) { + $requestfilename = NULL; + + if (!empty($file)) { if ($file && $file->isValid() && !$file->hasMoved()) { + $requestfilename = $file->getName(); $path = ROOTPATH.'public/uploads/POfiles/'; if(!is_dir($path)) { mkdir($path, 0777, true); } if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { @@ -2564,10 +2569,11 @@ try{ $lastPONO = $this->purchaseorder_model->lastPONO(); $newPONO = generate_po_number($lastPONO); $file = $this->request->getFile('POFile'); - $requestfilename = $file->getName(); - if (!empty($requestfilename)) { + $requestfilename = NULL; + if (!empty($file)) { if ($file->isValid() && !$file->hasMoved()) { + $requestfilename = $file->getName(); $path = ROOTPATH.'public/uploads/POfiles/'; if(!is_dir($path)) { mkdir($path, 0777, true); } if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { @@ -2851,9 +2857,10 @@ try{ $POList['ReleasedBy'] = $this->session->get('userId'); } $file = $this->request->getFile('POFile'); - $requestfilename = $file->getName(); - if (!empty($requestfilename)) { + $requestfilename = NULL; + if (!empty($file)) { if ($file && $file->isValid() && !$file->hasMoved()) { + $requestfilename = $file->getName(); $path = ROOTPATH.'public/uploads/POfiles/'; if(!is_dir($path)) { mkdir($path, 0777, true); } if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { diff --git a/app/Controllers/Rawmaterialdetails.php b/app/Controllers/Rawmaterialdetails.php index bc976f12..1a1829f5 100644 --- a/app/Controllers/Rawmaterialdetails.php +++ b/app/Controllers/Rawmaterialdetails.php @@ -237,6 +237,7 @@ class Rawmaterialdetails extends BaseController } $data['materialDetails'] = $this->rawmaterialdetails_model->getMaterialDetails($RawMaterialID); + $data['material'] = $this->rawmaterialdetails_model->getmaterialType(); $data['currentstock'] = $this->rawmaterialdetails_model->getMaterialstock($RawMaterialID, $currentdate); $data['materialType'] = $this->rawmaterialdetails_model->getmaterialType($MaterialType); $data['materialCategory'] = $this->rawmaterialdetails_model->getmaterialCategory($MaterialCategory); diff --git a/app/Helpers/cias_helper.php b/app/Helpers/cias_helper.php index 0df54a71..c48c5d5c 100755 --- a/app/Helpers/cias_helper.php +++ b/app/Helpers/cias_helper.php @@ -130,4 +130,20 @@ if (!function_exists('trans')) { return $lang_string; } -} \ No newline at end of file +} + + +if (!function_exists('generateCostCenterCode')) { + function generateCostCenterCode($id) + { + if ($id < 10) { + $CostCenterCode = 'C00' . $id; + } elseif ($id < 100) { + $CostCenterCode = 'C0' . $id; + } else { + $CostCenterCode = 'C' . $id; + } + + return $CostCenterCode; + } +} diff --git a/app/Models/Costcenter_model.php b/app/Models/Costcenter_model.php index c60f316e..3541c4aa 100644 --- a/app/Models/Costcenter_model.php +++ b/app/Models/Costcenter_model.php @@ -16,7 +16,7 @@ class Costcenter_model extends Model function CostListing() { $builder = $this->db->table('t_costcenter_master as Cost') - ->select('Cost.CostCenterCode as code,Cost.CostCenterName as CostCenterName , Cost.ApprovedBy as ApprovedBy,Emp.FirstName as FirstName,Emp.Designation as Designation ,Cost.CreatedDate,Cost.IsActive,Cost.DeletedBy,Cost.DeletedBy') + ->select('Cost.id as id, Cost.CostCenterCode as code,Cost.CostCenterName as CostCenterName , Cost.ApprovedBy as ApprovedBy,Emp.FirstName as FirstName,Emp.Designation as Designation ,Cost.CreatedDate,Cost.IsActive,Cost.DeletedBy,Cost.DeletedBy') ->join('t_employee_details as Emp', 'Emp.EmpID=Cost.ApprovedBy'); @@ -30,21 +30,29 @@ class Costcenter_model extends Model * This function used to get user information by id * @param number $userId : This is user id * @return array $result : This is user information - */ - -function saveCostCenter($Cost) - { + */ + public function saveCostCenter($Cost) { $this->db->transStart(); $builder = $this->db->table('t_costcenter_master'); - $builder->insert($Cost); - - $insert_id = $this->db->affectedRows(); - - $this->db->transComplete(); - - return $insert_id; + $builder->insert($Cost); + $aff_row = $this->db->affectedRows(); + $this->db->transComplete(); + return $aff_row; } + public function updateCostCenter($Cost, $id) { + $this->db->table('t_costcenter_master') + ->where('id', $id) + ->update($Cost); + $aff_row = $this->db->affectedRows(); + return $aff_row; + } + public function lastCCID(){ + $query = $this->db->table('t_costcenter_master')->select('id')->orderBy('id', 'DESC')->limit(1)->get(); + $lastCCID = $query->getRow()->id; + return $lastCCID; + } + function getFiscalYear() { $builder = $this->db->table('t_company_details') @@ -54,44 +62,6 @@ function saveCostCenter($Cost) return $query->getResult(); } - function addCostCenterDepartment($Dept) - { - $this->db->transStart(); - $builder = $this->db->table('t_costcenter_departments'); - $builder->insert($Dept); - - $insert_id = $this->db->affectedRows(); - - $this->db->transComplete(); - - return $insert_id; - } - - - function addBudget($Budget) - { - $this->db->transStart(); - $builder = $this->db->table('t_costcenter_budget'); - $builder->insert($Budget); - - $insert_id = $this->db->affectedRows(); - - $this->db->transComplete(); - - return $insert_id; - } - - function getApproverName() - { - $builder = $this->db->table('t_employee_details') - ->select('EmpID,FirstName,LastName,Designation') - ->where('Departmentcode ', 'DEP10'); - - $query =$builder->get(); - - return $query->getResult(); - } - /** * This function used to get user information by id * @param number $userId : This is user id @@ -337,19 +307,7 @@ where Dept.DEPCode not in } } - /* *//** - * This function is used to get the Department details from t_departmentdetails - * @return array $result : This is result of the query - */ - function getDepartment() - { - $builder = $this->db->table('t_departmentdetails') - ->select('DEPCode, DepartmentName') - ->where('IsActive =', 1); - $query =$builder->get(); - - return $query->getResult(); - } + /** * This function is used to get the Config value from configuration table * @return array $result : This is result of the query diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index 0da895d5..26d5cc45 100644 --- a/app/Views/EditservicePurchaseorder.php +++ b/app/Views/EditservicePurchaseorder.php @@ -36,7 +36,7 @@ $ServiceTypeOptions = ''; $DescriptionOfPo = ''; $BudgetType = ''; $PrePOFile = ''; -$parentPO= ''; +$parentPO = ''; if (!empty($INRSYMBOL)) { @@ -54,11 +54,11 @@ if (!empty($MaxPODate)) { if (!empty($POMaster)) { foreach ($POMaster as $Req) { - $parentPO =$Req->ParentPO; + $parentPO = $Req->ParentPO; $SupId = $Req->SupplierID; $SupName = $Req->SupplierName; - $Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ; + $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; @@ -123,9 +123,9 @@ if (!empty($getlogpodtl)) { foreach ($getlogpodtl as $values) { $update = $values->FirstName; } -}else{ - $update= []; - } +} else { + $update = []; +} // foreach ($POSTATUS as $PST ) // { @@ -137,15 +137,14 @@ if (!empty($getlogpodtl)) { \ No newline at end of file diff --git a/app/Views/addCostCenter.php b/app/Views/addCostCenter.php deleted file mode 100644 index e4ce4ccf..00000000 --- a/app/Views/addCostCenter.php +++ /dev/null @@ -1,871 +0,0 @@ - -'Select Budget Year'); -if(!empty($FiscalYear)) -{ - foreach ($FiscalYear as $Fy) - { - $FYStart =$Fy->StartYear; - $FYEnd =$Fy->EndYear; - } - //$FYear = $FYStart." - ".$FYEnd ; - -} - -for($i=1;$i<5;$i++) -{ - - $FYear = $FYStart." - ".$FYEnd ; - $opt[$FYear] = $FYear; - $FYStart++; - $FYEnd++; -} -//print_r($opt); - - ?> - - -
- -
-

-
Add Cost List
-

-
-
-
- Back -
-
-
- -
-
- - - 'form-label-left addCost ','name' => 'addCost','id' => 'addCost'); - - echo form_open(base_url().'saveCostCenter/',$attributes); ?> - -
-
-
-
-
- * - -
- 'CostCode','value' => set_value('CostCode'),'id'=>'CostCode', 'class' => 'form-control' ,'required' => 'true','style'=>'text-transform:uppercase;','maxlength'=>'10' ); - echo form_input($data); - ?> -
-
-
- - -
-
- * -
- 'CostName','value' => set_value('CostName'),'id'=>'CostName', 'class' => 'form-control' ,'required' => 'true','style'=>'text-transform:uppercase;','maxlength'=>'100'); - echo form_input($data); - ?> -
-
-
-
-
-
-
-
- -
- 'Select Department'); - //print_r( $options); - - if(!empty($Department)) - { - foreach ($Department as $SID): - - - $options[$SID->DEPCode] = $SID->DEPCode.' '.' - '.' '.$SID->DepartmentName; - - endforeach; - } - echo form_multiselect('distriList', $options,set_value('distriList',$options),'id="distriList"' ,'class="form-control required"','required="true"'); - - ?> -
-
-
-
-
-
- -
-
-
-   - - -
-
-
- - - - - 'Select Approver'); - //print_r( $options); - - if(!empty($Approver)) - { - foreach ($Approver as $SID): - - - $options[$SID->EmpID] = $SID->EmpID . " - " . $SID->FirstName . " - " . $SID->Designation; - - endforeach; - } - - // echo form_dropdown('ApprovedBy',$options,set_value('ApprovedBy'),'id="ApprovedBy"', 'class = "form-control "'); ?> - - - - -
-
- -
-
-
-
-
-   Add Budget - - - - -
-

- -
-
-
- - - - - - - - - - - - -
Budget TypeBudget YearRemarksAction
- - - -
-
-
- -
- - - -
- -
-
-
- getFlashdata('error'); - if($error) - { - ?> -
- - getFlashdata('error'); ?> -
- - getFlashdata('success'); - if($success) - { - ?> -
- - getFlashdata('success'); ?> -
- - -
-
- ', '
'); ?> -
-
-
-
- - - - - - - \ No newline at end of file diff --git a/app/Views/addRawMaterial.php b/app/Views/addRawMaterial.php index e94c8e3f..5a499b11 100644 --- a/app/Views/addRawMaterial.php +++ b/app/Views/addRawMaterial.php @@ -22,16 +22,16 @@
-

-
Add New Material
-

-
+

+
Add Material Details
+

+ +
-
- Back -
-
+
@@ -196,7 +196,7 @@ $('#MatCate').autocomplete("option", "minLength", 0); }, - serviceUrl: "rawmaterialdetails/autocomplete", + serviceUrl: "rawmaterialdetailsautocomplete", onSelect: function(suggestion) { var data = suggestion.ConfigValue; diff --git a/app/Views/addSupplier.php b/app/Views/addSupplier.php index afb0f450..cd69d4bb 100644 --- a/app/Views/addSupplier.php +++ b/app/Views/addSupplier.php @@ -199,14 +199,14 @@
-
-

Add Supplier

- -
- -
+
+

+
Add Supplier Details
+

+ +

diff --git a/app/Views/addUser.php b/app/Views/addUser.php index fd3d7a25..c7472818 100644 --- a/app/Views/addUser.php +++ b/app/Views/addUser.php @@ -1,8 +1,13 @@
-

Add User

-
+

+
Add User Details
+

+ +
diff --git a/app/Views/addasset.php b/app/Views/addasset.php index ad96e391..d488d91a 100644 --- a/app/Views/addasset.php +++ b/app/Views/addasset.php @@ -49,15 +49,17 @@ $(function() {
-
-

Add Asset

-
+
+

+
Add Asset Details
+

+ +

-
- Back -
-
+
diff --git a/app/Views/addconfig.php b/app/Views/addconfig.php index a5d2612c..d2fd07de 100644 --- a/app/Views/addconfig.php +++ b/app/Views/addconfig.php @@ -1,16 +1,14 @@
-
-

Add Config

-
-
+

+
Add Config Details
+

+ +
- - -
- Back -

diff --git a/app/Views/adddepartment.php b/app/Views/adddepartment.php index 158ab09d..b9b9d690 100644 --- a/app/Views/adddepartment.php +++ b/app/Views/adddepartment.php @@ -62,13 +62,16 @@
-

Add Department Details

-
+

+
Add Department Details
+

+ +
+
-
- Back -

diff --git a/app/Views/alterpurchaseorder.php b/app/Views/alterpurchaseorder.php index c90314cc..a5cdd7ca 100644 --- a/app/Views/alterpurchaseorder.php +++ b/app/Views/alterpurchaseorder.php @@ -1468,7 +1468,7 @@ if (!empty($INRSYMBOL)) { /* Set the Packaging calculation option for calculating Packaging */ function submitoption() { submitoptionvalue = $("input:radio[name='optsubmit']:checked").val(); - + var PO = $('#POType').val(); if (PO == 'REVENUE') { @@ -1833,7 +1833,7 @@ if (!empty($INRSYMBOL)) { $('#txtSpecialservice').val(0); Save(1) } - }else{ + } else { $('#submitmodel').modal('show'); } } @@ -1851,8 +1851,7 @@ if (!empty($INRSYMBOL)) { if (input == -1) { alert("Select Request Type"); - } - else if ($('#drpSupplier').val() == "0") { + } else if ($('#drpSupplier').val() == "0") { alert('Please Select the Supplier details'); $('#drpSupplier').focus(); return false; @@ -1875,8 +1874,7 @@ if (!empty($INRSYMBOL)) { $('#Scheduleby').focus(); return false; - } - else { + } else { $("#" + input).modal('show'); $('#isEdit').val(0); if (StateTaxCheck == "0") { @@ -2022,6 +2020,36 @@ if (!empty($INRSYMBOL)) { .num { text-align: right; } + .header-container { + display: flex; + justify-content: space-between; + align-items: center; + padding: 25px; + } + + .header-container h2 { + flex: 1; + text-align: center; + margin: 0; + } + + .centered { + display: flex; + /* justify-content: center; */ + align-items: center; + height: 10vh; + } + + .centered label, + .centered input { + margin: 0 5px; + } + + .mandatory { + color: red; + text-align: right; + background-color: white; + }
@@ -2031,20 +2059,16 @@ if (!empty($INRSYMBOL)) { echo form_open(base_url() . '/purchaseorder/addalterPO/', $attributes); ?>
-
+
-
-
+

Emergency Purchase Order

-
- -
+
-
-
- +
+ 'Select Request Type'); @@ -2062,20 +2086,7 @@ if (!empty($INRSYMBOL)) { ?>
-
- - -
- - 'PODate', 'value' => set_value('PODate', $CurrentDate), 'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 'onkeypress'=>'return false;'); - echo form_input($data); - ?> -
- - -
-
+
@@ -2085,8 +2096,46 @@ if (!empty($INRSYMBOL)) { ?>
- +
+
+
+ + - -
- Select Delivery By*
- - - "DateRange", "id" => "Date", "value" => "0", 'checked' => set_radio('DateRange', '0', true))); ?>     - - - "DateRange", "id" => "Schedule", "value" => "1", 'checked' => set_radio('DateRange', '1', false))); ?> - - -
-
-
-
- -
- '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'), 'id="drpSupplier"', 'required="true"', 'class="form-control select2"'); - - ?> +
+ Select Delivery By*
+
+ "DateRange", "id" => "Date", "value" => "0", 'checked' => set_radio('DateRange', '0', true))); ?> + "DateRange", "id" => "Schedule", "value" => "1", 'checked' => set_radio('DateRange', '1', false))); ?>
-
- -
+
+ + 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); + $data = array('name' => 'Scheduleby', 'value' => set_value('Scheduleby'), 'id' => 'Scheduleby', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110'); + echo form_textarea($data); ?> + +
+ -
@@ -2148,31 +2180,39 @@ if (!empty($INRSYMBOL)) {
-
- -
- +
+
+
+
+ -
-
-
- +
+
+
+
+
+
'Select Department Name'); @@ -2193,7 +2233,7 @@ if (!empty($INRSYMBOL)) {
- +
'Cost Center Name'); @@ -2222,49 +2262,11 @@ if (!empty($INRSYMBOL)) { echo form_hidden($data); // echo form_input($data); - + ?>
- - -
-
-
- -
- - -
-
-
-
- - - -
- - 'emergmodeofshipment', 'value' => set_value('emergmodeofshipment'), 'id' => 'emergmodeofshipment', 'class' => 'form-control'); - echo form_input($data); - ?> -
- - - -
+
+
+
+
+
+ +
+ 'PODate', 'value' => set_value('PODate', $CurrentDate), 'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?>
-
-
-
- -
+
+
+ +
+ 'emergmodeofshipment', 'value' => set_value('emergmodeofshipment'), 'id' => 'emergmodeofshipment', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+ +
- 'emergsupplierreference', 'value' => set_value('emergsupplierreference'), 'id' => 'emergsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); - echo form_input($data); - ?> -
- - - - -
-
-
-
- -
- - 'emergsupplierofferno', 'value' => set_value('emergsupplierofferno'), 'id' => 'emergsupplierofferno', 'class' => 'form-control'); - echo form_input($data); - ?> -
- -
-
-
-
+ 'emergsupplierreference', 'value' => set_value('emergsupplierreference'), 'id' => 'emergsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); + echo form_input($data); + ?> +
+
+
+ +
+ 'emergsupplierofferno', 'value' => set_value('emergsupplierofferno'), 'id' => 'emergsupplierofferno', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+
+
+
+
@@ -2371,19 +2364,9 @@ if (!empty($INRSYMBOL)) { echo form_input($data); ?>
-
-
-
-
- -
- -
-
-
-
- +
+
-
- +
+ + 'Select Payment method'); + //print_r( $options); + if (!empty($Payment)) { + foreach ($Payment as $payment) : + + + $options1[$payment->PaymentID] = $payment->PaymentTerms; + + endforeach; + } + echo form_dropdown('PaymentMethod', $options1, set_value('PaymentMethod'), 'id="PaymentMethod"', 'class="form-control"'); + ?> +
+ + +
+
+
+
+
+
-
-
- -
- +
+
'InsuranceNumber', 'value' => set_value('InsuranceNumber'), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); @@ -2445,54 +2455,22 @@ if (!empty($INRSYMBOL)) { ?>
-
- - 'Select Payment method'); - //print_r( $options); - if (!empty($Payment)) { - foreach ($Payment as $payment) : - - - $options1[$payment->PaymentID] = $payment->PaymentTerms; - - endforeach; - } - echo form_dropdown('PaymentMethod', $options1, set_value('PaymentMethod'), 'id="PaymentMethod"', 'class="form-control"'); - ?> -
- - - -
-
-
-
- +
+ 'Select', '1' => 'REVENUE', '2' => 'CAPITAL'); echo form_dropdown('BudgetType', $optionsnew, set_value('BudgetType'), 'id="BudgetType"', 'required="true"', 'class="form-control select2'); ?>
-
-
+
+ +
+
+
-
- -
- -
- IS THIS OPEN ORDER FORMAT + IS THIS OPEN ORDER FORMAT
Select Line Item @@ -2905,7 +2883,7 @@ if (!empty($INRSYMBOL)) {
@@ -2928,7 +2906,7 @@ if (!empty($INRSYMBOL)) {
- +
- +
'Item Code'); @@ -3068,7 +3046,7 @@ if (!empty($INRSYMBOL)) {
- +
'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange()'); @@ -3077,7 +3055,7 @@ if (!empty($INRSYMBOL)) {
- +
'EditRate', 'value' => set_value('EditRate'), 'id' => 'EditRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange()'); @@ -3213,7 +3191,7 @@ if (!empty($INRSYMBOL)) {
- Service Description* 'EdittxtSpcialInstructionSingle', 'value' => set_value('EdittxtSpcialInstructionSingle'), 'id' => 'EdittxtSpcialInstructionSingle', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); echo form_textarea($data); ?>
@@ -3247,7 +3225,7 @@ if (!empty($INRSYMBOL)) {
- +
'EditRevenueAvlBudAmt', 'value' => set_value('EditAvlBudAmt'), 'id' => 'EditRevenueAvlBudAmt', 'class' => 'form-control num', 'readonly' => 'true'); echo form_hidden($data); - + ?>
- +
'Item Code'); @@ -3321,7 +3299,7 @@ if (!empty($INRSYMBOL)) {
- +
'EditRevenueQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditRevenueQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange()', 'style' => 'text-align:right;'); @@ -3330,7 +3308,7 @@ if (!empty($INRSYMBOL)) {
- +
'EditRevenueRate', 'value' => set_value('EditRate'), 'id' => 'EditRevenueRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange()', 'style' => 'text-align:right;'); @@ -3619,7 +3597,7 @@ if (!empty($INRSYMBOL)) {
- +
'Item Code'); @@ -3651,7 +3629,7 @@ if (!empty($INRSYMBOL)) {
- +
'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change()'); @@ -3660,7 +3638,7 @@ if (!empty($INRSYMBOL)) {
- +
'Rate', 'value' => set_value('Rate'), 'id' => 'Rate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change()'); @@ -3689,7 +3667,7 @@ if (!empty($INRSYMBOL)) {
- +
'Select Discount Type'); @@ -3710,7 +3688,7 @@ if (!empty($INRSYMBOL)) {
- +
'txtDiscount', 'value' => set_value('txtDiscount'), 'id' => 'txtDiscount', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();calculateDiscount(0);'); @@ -3751,7 +3729,7 @@ if (!empty($INRSYMBOL)) {
- +
'Select Packaging Type'); @@ -3772,7 +3750,7 @@ if (!empty($INRSYMBOL)) {
- +
'txtPackaging', 'value' => set_value('txtPackaging'), 'id' => 'txtPackaging', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculatePackaging(0);change();'); @@ -3833,7 +3811,7 @@ if (!empty($INRSYMBOL)) {
- +
'Select Freight Type'); @@ -3854,7 +3832,7 @@ if (!empty($INRSYMBOL)) {
- +
'txtFreight', 'value' => set_value('txtFreight'), 'id' => 'txtFreight', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateFreight(0);change();'); @@ -3951,7 +3929,7 @@ if (!empty($INRSYMBOL)) {
- +
'Item Code'); @@ -4059,7 +4037,7 @@ if (!empty($INRSYMBOL)) {
- +
'ServiceQuantity', 'value' => set_value('ServiceQuantity'), 'id' => 'ServiceQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Ratechange()'); @@ -4068,7 +4046,7 @@ if (!empty($INRSYMBOL)) {
- +
'ServiceRate', 'value' => set_value('ServiceRate'), 'id' => 'ServiceRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Ratechange()'); @@ -4212,7 +4190,7 @@ if (!empty($INRSYMBOL)) {
- Service Description* 'txtSpcialInstructionSingle', 'value' => set_value('txtSpcialInstructionSingle'), 'id' => 'txtSpcialInstructionSingle', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); echo form_textarea($data); ?>
@@ -5201,7 +5179,7 @@ if (!empty($INRSYMBOL)) {
- + @@ -5402,7 +5380,7 @@ if (!empty($INRSYMBOL)) {
SNo Requisition No
- - - - - - - - - - - - - - - - - - - -
SNoRequisition NoItem CodeItem DescriptionQuantityUOMRateBasic AmountTax AmountTotal Order AmountAction
-
-
- -
-
- - -
+ + + + + + + + + + + + + + + + + + + +
SNoRequisition NoItem CodeItem DescriptionQuantityUOMRateBasic AmountTax AmountTotal Order AmountAction
+
+
+ +
+
+ + + +
+ + + +
+
+
+
+ - - - - - -
-
-
- - - 'CapitalBasicOrder','value' => set_value('CapitalBasicOrder'),'id'=>'CapitalBasicOrder', 'class' => 'form-control num' ,'readonly' => 'true',); - echo form_input($data); - ?> -
-
- - - - 'txtTotalDiscount','value' => set_value('txtTotalDiscount'),'id'=>'txtTotalDiscount', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> - -
-
- - 'txtTotCgst','value' => set_value('txtTotCgst'),'id'=>'txtTotCgst', 'class' => 'form-control num' ,'readonly' => 'true'); - echo form_input($data); - ?> -
- - -
- - 'txtTotSgst','value' => set_value('txtTotSgst'),'id'=>'txtTotSgst', 'class' => 'form-control num' ,'readonly' => 'true'); - echo form_input($data); - ?> -
-
- - 'txtTotIgst','value' => set_value('txtTotIgst'),'id'=>'txtTotIgst', 'class' => 'form-control num' ,'readonly' => 'true'); - echo form_input($data); - ?> -
-
- - 'TotalOtherAllowances','value' => set_value('TotalOtherAllowances'),'id'=>'TotalOtherAllowances', 'class' => 'form-control num' ,'readonly' => 'true'); - echo form_input($data); - ?> - -
- -
- - 'TotalFreight','value' => set_value('TotalFreight'),'id'=>'TotalFreight', 'class' => 'form-control num' ,'readonly' => 'true'); - echo form_input($data); - ?> - -
- - - -
- - - -
- -
- - - 'txttotallanding','value' => set_value('txttotallanding'),'id'=>'txttotallanding', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> -
- -
- - 'txttotalAssessable','value' => set_value('txttotalAssessable'),'id'=>'txttotalAssessable', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalcustom','value' => set_value('txttotalcustom'),'id'=>'txttotalcustom', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); + $data = array('name' => 'CapitalBasicOrder', 'value' => set_value('CapitalBasicOrder'), 'id' => 'CapitalBasicOrder', 'class' => 'form-control num', 'readonly' => 'true',); echo form_input($data); - ?> -
+ ?> +
+
+ + -
- - 'txttotalSubtotal','value' => set_value('txttotalSubtotal'),'id'=>'txttotalSubtotal', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> -
+ $data = array('name' => 'txtTotalDiscount', 'value' => set_value('txtTotalDiscount'), 'id' => 'txtTotalDiscount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> - - -
- - +
+
+ 'txttotalIgst','value' => set_value('txttotalIgst'),'id'=>'txttotalIgst', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> -
- - - -
- - - 'txttotalcustomED','value' => set_value('txttotalcustomED'),'id'=>'txttotalcustomED', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); + $data = array('name' => 'txtTotCgst', 'value' => set_value('txtTotCgst'), 'id' => 'txtTotCgst', 'class' => 'form-control num', 'readonly' => 'true'); echo form_input($data); - ?> -
+ ?> +
-
- - 'txttotalcustomSH','value' => set_value('txttotalcustomSH'),'id'=>'txttotalcustomSH', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); +
+ + 'txtTotSgst', 'value' => set_value('txtTotSgst'), 'id' => 'txtTotSgst', 'class' => 'form-control num', 'readonly' => 'true'); echo form_input($data); - ?> -
- - - - - -
- - - 'txttotalgrossduty','value' => set_value('txttotalgrossduty'),'id'=>'txttotalgrossduty', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); + ?> +
+
+ + 'txtTotIgst', 'value' => set_value('txtTotIgst'), 'id' => 'txtTotIgst', 'class' => 'form-control num', 'readonly' => 'true'); echo form_input($data); - ?> -
+ ?> +
+
+ + 'TotalOtherAllowances', 'value' => set_value('TotalOtherAllowances'), 'id' => 'TotalOtherAllowances', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> - +
+ +
+ + 'TotalFreight', 'value' => set_value('TotalFreight'), 'id' => 'TotalFreight', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> + +
- -
- - - 'txtTotalFreight','value' => set_value('txtTotalFreight'),'id'=>'txtTotalFreight', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> - -
-
-
- - 'CapitalToatlOrder','value' => set_value('CapitalToatlOrder'),'id'=>'CapitalToatlOrder', 'class' => 'form-control num' ,'readonly' => 'true',); + +
+ +
+ + + 'txttotallanding', 'value' => set_value('txttotallanding'), 'id' => 'txttotallanding', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); - ?> + ?> +
+ +
+ + + 'txttotalAssessable', 'value' => set_value('txttotalAssessable'), 'id' => 'txttotalAssessable', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ +
+ + + 'txttotalcustom', 'value' => set_value('txttotalcustom'), 'id' => 'txttotalcustom', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ +
+ + + 'txttotalSubtotal', 'value' => set_value('txttotalSubtotal'), 'id' => 'txttotalSubtotal', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + + +
+ + + 'txttotalIgst', 'value' => set_value('txttotalIgst'), 'id' => 'txttotalIgst', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + + +
+ + + 'txttotalcustomED', 'value' => set_value('txttotalcustomED'), 'id' => 'txttotalcustomED', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ +
+ + + 'txttotalcustomSH', 'value' => set_value('txttotalcustomSH'), 'id' => 'txttotalcustomSH', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + + + + +
+ + + 'txttotalgrossduty', 'value' => set_value('txttotalgrossduty'), 'id' => 'txttotalgrossduty', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + + + + +
+ + + 'txtTotalFreight', 'value' => set_value('txtTotalFreight'), 'id' => 'txtTotalFreight', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> + +
+ +
+ +
+
+ + + 'CapitalToatlOrder', 'value' => set_value('CapitalToatlOrder'), 'id' => 'CapitalToatlOrder', 'class' => 'form-control num', 'readonly' => 'true',); + echo form_input($data); + ?> +
+
+
+ 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction'), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); + echo form_textarea($data); + ?> +
+ +
+
+ + + + + + + + + + +   Reset +   Save as Draft +   Submit + +
+
-
-
- 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction'),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' ); - echo form_textarea($data); - ?> -
- -
-
- - - - - - - - - - -   Reset -   Save as Draft -   Submit - -
-
-
-
- +
+
+
+ if (isNaN(result)) { + $('#EditAfterLandingCharge').val(''); + $('#EditAfterAssessable').val(assessble.toFixed(2)); + } else { + $('#EditAfterLandingCharge').val(parseFloat(result).toFixed(2)); + $('#EditAfterAssessable').val(assessble.toFixed(2)); + } + // $('#EditAfterLandingCharge').val(result.toFixed(2)); + EditCalculateCustomduty(); + //alert(); + } - + function EditCalculateCustomduty() { + var txtbasic = 0; + var txtcustompercentage = 0; + var txthighse = 0; + var txtlandingch = 0; + var sumcustom = 0; + var txtcustomduty = 0; + // var accessible=parseFloat($('#EditAfterAssessable').val()); + // var txtcustompercentage=parseFloat($('#EditCustomduty').val()); + //sumcustom=txthighse+txtlandingch+txtbasic; + var accessible = parseFloat($('#EditAfterAssessable').val() == '' ? '0.00' : $('#EditAfterAssessable').val()); + var txtcustompercentage = parseFloat($('#EditCustomduty').val() == '' ? '0.00' : $('#EditCustomduty').val()); + txtcustomduty = ; + if (isNaN(txtcustomduty)) { + $('#EditAfterCustomduty').val(''); + } else { + $('#EditAfterCustomduty').val(parseFloat(txtcustomduty).toFixed(2)); + } + EditCalculateCustomEdcess(); + } + + function EditCalculateCustomEdcess() { + var txtloading = 0; + var txthighses = 0; + var txtcustomduty1 = 0; + var txtexciseduty = 0; + var txtedexciseduty = 0; + var txtshexcisesess = 0; + var totalval = 0; + var txtedcesspercentage = 0; + //var txtcustomedsess=(totalval*txtedcesspercentage)/100; + var txtcustomedsess = 0; + + // txtcustomduty1=parseFloat($('#EditAfterCustomduty').val()); + + // txtedcesspercentage=parseFloat($('#EditCustomEDcess').val()); + + + txtcustomduty1 = parseFloat($('#EditAfterCustomduty').val() == '' ? '0.00' : $('#EditAfterCustomduty').val()); + + txtedcesspercentage = parseFloat($('#EditCustomEDcess').val() == '' ? '0.00' : $('#EditCustomEDcess').val()); + //var txtcustomedsess=(totalval*txtedcesspercentage)/100; + txtcustomedsess = ; + if (isNaN(txtcustomedsess)) { + $('#EditAfterCustomEDcess').val(''); + } else { + $('#EditAfterCustomEDcess').val(parseFloat(txtcustomedsess).toFixed(2)); + } + EditCalculateCustomSHcess(); + + } + + + function EditCalculateCustomSHcess() { //alert(); + + var landingch = 0; + var highsesssalles = 0; + var customch = 0; + var excisech = 0; + var exciseedch = 0; + var exciseshch = 0; + var totcustomsh = 0; + + var txtshpercentage = 0; + //var totresult=(totcustomsh*txtshpercentage)/100; + var totresult = 0; + + landingch = parseFloat($('#EditAfterLandingCharge').val()); + highsesssalles = parseFloat($('#EditAfterHighseas').val()); + //customch=parseFloat($('#EditAfterCustomduty').val()); + excisech = parseFloat($('#EditAfterExcisedutyTax').val()); + exciseedch = parseFloat($('#EditAfterExcisedutyEDcess').val()); + exciseshch = parseFloat($('#EditAfterExcisedutySHcess').val()); + totcustomsh = landingch + highsesssalles + customch + excisech + exciseedch + exciseshch; + + + customch = parseFloat($('#EditAfterCustomduty').val() == '' ? '0.00' : $('#EditAfterCustomduty').val()); + //txtshpercentage=parseFloat($('#EditCustomSHcess').val()); + txtshpercentage = parseFloat($('#EditCustomSHcess').val() == '' ? '0.00' : $('#EditCustomSHcess').val()); + //var totresult=(totcustomsh*txtshpercentage)/100; + var totresult = ; + if (isNaN(totresult)) { + $('#EditAfterCustomSHcess').val(''); + } else { + $('#EditAfterCustomSHcess').val(parseFloat(totresult).toFixed(2)); + } + //EditCalculateaddlExciseDuty(); + + EditCalculateIgst() + + } + + + function EditCalculateIgst() { + + // var custom=parseFloat($('#EditAfterCustomduty').val()); + // var customsh=parseFloat($('#EditAfterCustomSHcess').val()); + // var customed=parseFloat($('#EditAfterCustomEDcess').val()); + + // var assessble=parseFloat($('#EditAfterAssessable').val()); + + + var custom = parseFloat($('#EditAfterCustomduty').val() == '' ? '0.00' : $('#EditAfterCustomduty').val()); + var customsh = parseFloat($('#EditAfterCustomSHcess').val() == '' ? '0.00' : $('#EditAfterCustomSHcess').val()); + var customed = parseFloat($('#EditAfterCustomEDcess').val() == '' ? '0.00' : $('#EditAfterCustomEDcess').val()); + + var assessble = parseFloat($('#EditAfterAssessable').val() == '' ? '0.00' : $('#EditAfterAssessable').val()); + + + + var tot = ; + //var igstpercentage=parseFloat($('#EditIgst').val()); + + var igstpercentage = parseFloat($('#EditIgstInt').val() == '' ? '0.00' : $('#EditIgstInt').val()); + var afterigst = ; + + $('#LandingCharge').val() == '' ? '0.00' : $('#LandingCharge').val() + if (isNaN(tot)) { + $('#EditSubtotal').val(''); + } else { + $('#EditSubtotal').val(parseFloat(tot).toFixed(2)); + } + + + + if (isNaN(afterigst)) { + $('#EditAfterIgstInt').val(''); + } else { + $('#EditAfterIgstInt').val(parseFloat(afterigst).toFixed(2)); + } + + + var grossexp = custom + customsh + customed + afterigst; + + var txtgrossduty = ; + + ; + if (isNaN(txtgrossduty)) { + $('#EditGrossdutypayable').val(''); + } else { + $('#EditGrossdutypayable').val(parseFloat(txtgrossduty).toFixed(2)); + } + + EditCalculateCtable() + } + + + + + function EditCalculateCtable() { + + var quantity = 0; + var txtbasicinrprice = 0; + var txtpurchaserate = 0; + var txtgrossexp = 0; + var txtcustomdutyexp = 0; + var txtrmc = 0; + var total = 0; + var basicamt = 0; + var qty = parseFloat($('#EditCPQuantity').val()); + + + var igst = parseFloat($('#EditAfterIgstInt').val()); + var totduty = parseFloat($('#EditGrossdutypayable').val()); + // console.log(igst); + // console.log(totduty); + + + var txtdutyimpact = ; + + // console.log(txtdutyimpact); + + if (isNaN(txtdutyimpact)) { + $('#EditDutyImpact').val(''); + } else { + $('#EditDutyImpact').val(parseFloat(txtdutyimpact).toFixed(2)); + } + + quantity = parseFloat($('#EditPurQuantity').val()); + + var dutyimpact = parseFloat($('#EditDutyImpact').val()); + + + var peruom = ; + + + if (isNaN(peruom)) { + $('#EditCustomDutyExpenses').val(''); + } else { + $('#EditCustomDutyExpenses').val((peruom).toFixed(2)); + } + + + var customdutyexp = $('#EditCustomDutyExpenses').val() == '' ? '0.00' : $('#EditCustomDutyExpenses').val(); + var basicqtyval = $('#EditAfterBasicPriceTax').val() == '' ? '0.00' : $('#EditAfterBasicPriceTax').val(); + var qty = parseFloat($('#EditCPQuantity').val()); + var clearing = $('#EditClearingCharges').val() == '' ? '0.00' : $('#EditClearingCharges').val(); + var basicres = ; + var clear = ; + + + var basicnett = parseFloat(basicres) + parseFloat(clear) + parseFloat(customdutyexp); + + + if (isNaN(basicnett)) { + $('#EditNett').val(''); + } else { + $('#EditNett').val((basicnett).toFixed(2)); + } + + } + + + + + + function Calculateloadingcharge() { + //alert(); + $('#AfterHighseas').val(''); + $('#AfterCustomduty').val(''); + $('#AfterExcisedutyTax').val(''); + $('#AfterExcisedutyEDcess').val(''); + $('#AfterExcisedutySHcess').val(''); + $('#AfterCustomEDcess').val(''); + $('#AfterCustomSHcess').val(''); + $('#AfterAdditionalExciseduty').val(''); + $('#Grossdutypayable').val(''); + $('#AvailableModvat').val(''); + $('#Grossexpenses').val(''); + $('#purchaserate').val(''); + $('#CustomDutyExpenses').val(''); + $('#RMCIncludingCustomers').val(''); + + + var txtlanding = 0; + var txtbasicprice = 0; + + //txtlanding=$('#LandingCharge').val() == '' ? '0.00' : $('#LandingCharge').val() + txtlanding = parseFloat($('#LandingCharge').val() == '' ? '0.00' : $('#LandingCharge').val()); + //$('#Rate').val() == '' ? '0.00' : $('#Rate').val() + //txtbasicprice=parseFloat($('#AfterBasicPriceTax').val()); + txtbasicprice = parseFloat($('#AfterBasicPriceTax').val() == '' ? '0.00' : $('#AfterBasicPriceTax').val()); + //var result=(txtlanding*txtbasicprice/100); + var result = ; + var assessble = parseFloat(result) + parseFloat(txtbasicprice); + + + var assessble = ; + //$('#AfterLandingCharge').val(parseFloat(Math.round(result))); + if (isNaN(result)) { + $('#AfterLandingCharge').val(''); + $('#AfterAssessable').val(txtbasicprice.toFixed(2)); + + + } else { + $('#AfterLandingCharge').val(result.toFixed(2)); + //$('#AfterAssessable').val(assessble.toFixed(2)); + } + + if (isNaN(assessble)) { + $('#AfterAssessable').val(txtbasicprice); + + + + } else { + $('#AfterAssessable').val(assessble.toFixed(2)); + + } + + CalculateCustomduty() + } + + + + + + function CalculateCustomduty() { + + var txtbasic = 0; + var txtcustompercentage = 0; + var txthighse = 0; + var txtlandingch = 0; + var sumcustom = 0; + var txtcustomduty = 0; + + //var accessible=parseFloat($('#AfterAssessable').val()); + var accessible = parseFloat($('#AfterAssessable').val() == '' ? '0.00' : $('#AfterAssessable').val()); + + //var txtcustompercentage=parseFloat($('#Customduty').val()); + var txtcustompercentage = parseFloat($('#Customduty').val() == '' ? '0.00' : $('#Customduty').val()); + txtcustomduty = ; + if (isNaN(txtcustomduty)) { + $('#AfterCustomduty').val(''); + } else { + $('#AfterCustomduty').val(parseFloat(txtcustomduty).toFixed(2)); + } + + CalculateCustomEdcess() + + } + + + + + + + function CalculateCustomEdcess() { + + var txtloading = 0; + var txthighses = 0; + var txtcustomduty1 = 0; + var txtexciseduty = 0; + var txtedexciseduty = 0; + var txtshexcisesess = 0; + var totalval = 0; + var txtedcesspercentage = 0; + //var txtcustomedsess=(totalval*txtedcesspercentage)/100; + var txtcustomedsess = 0; + + + //txtcustomduty1=parseFloat($('#AfterCustomduty').val()); + + txtcustomduty1 = parseFloat($('#AfterCustomduty').val() == '' ? '0.00' : $('#AfterCustomduty').val()); + + // txtedcesspercentage=parseFloat($('#CustomEDcess').val()); + txtedcesspercentage = parseFloat($('#CustomEDcess').val() == '' ? '0.00' : $('#CustomEDcess').val()); + + //var txtcustomedsess=(totalval*txtedcesspercentage)/100; + + txtcustomedsess = ; + if (isNaN(txtcustomedsess)) { + + $('#AfterCustomEDcess').val(''); + } else { + $('#AfterCustomEDcess').val(parseFloat(txtcustomedsess).toFixed(2)); + } + CalculateCustomSHcess(); + + + + } + + + + + function CalculateCustomSHcess() { //alert(); + + var landingch = 0; + + var customch = 0; + + var totcustomsh = 0; + + var txtshpercentage = 0; + + var totresult = 0; + + + //customch=parseFloat($('#AfterCustomduty').val()); + //console.log(customch); + customch = parseFloat($('#AfterCustomduty').val() == '' ? '0.00' : $('#AfterCustomduty').val()); + + //txtshpercentage=parseFloat($('#CustomSHcess').val()); + txtshpercentage = parseFloat($('#CustomSHcess').val() == '' ? '0.00' : $('#CustomSHcess').val()); + //var totresult=(totcustomsh*txtshpercentage)/100; + totresult = ; + if (isNaN(totresult)) { + $('#AfterCustomSHcess').val(''); + } else { + $('#AfterCustomSHcess').val(parseFloat(totresult).toFixed(2)); + } + //CalculateaddlExciseDuty(); + CalculateIgst(); + + } + + + + + + function CalculateIgst() { + var basucprice = parseFloat($('#AfterBasicPriceTax').val()); + //var basucprice=$('#AfterBasicPriceTax').val() == '' ? '0.00' : $('#AfterBasicPriceTax').val(); + + var landing = parseFloat($('#AfterLandingCharge').val()); + //var landing=$('#AfterLandingCharge').val() == '' ? '0.00' : $('#AfterLandingCharge').val(); + + var custom = parseFloat($('#AfterCustomduty').val()); + //var custom=$('#AfterCustomduty').val() == '' ? '0.00' : $('#AfterCustomduty').val(); + + var customsh = parseFloat($('#AfterCustomSHcess').val()); + //var customsh=$('#AfterCustomSHcess').val() == '' ? '0.00' : $('#AfterCustomSHcess').val(); + + var customed = parseFloat($('#AfterCustomEDcess').val()); + //var customed=$('#AfterCustomEDcess').val() == '' ? '0.00' : $('#AfterCustomEDcess').val(); + + var assessble = parseFloat($('#AfterAssessable').val()); + //var assessble=$('#AfterAssessable').val() == '' ? '0.00' : $('#AfterAssessable').val(); + + // var tot=parseFloat(assessble)+parseFloat(custom)+parseFloat(customsh)+ + // parseFloat(customed); + + var tot = ; + var igstpercentage = parseFloat($('#IgstInt').val()); + var afterigst = ; + + + if (isNaN(tot)) { + $('#Subtotal').val(''); + } else { + $('#Subtotal').val(parseFloat(tot).toFixed(2)); + } + + + + if (isNaN(afterigst)) { + $('#AfterIgstInt').val(''); + } else { + $('#AfterIgstInt').val(parseFloat(afterigst).toFixed(2)); + } + + + var grossexp = custom + customsh + customed + afterigst; + + //$('#Grossdutypayable').val(parseFloat(grossexp).toFixed(2)); + + var txtgrossduty = ; + + //console.log(grossexp); + if (isNaN(txtgrossduty)) { + $('#Grossdutypayable').val(''); + } else { + $('#Grossdutypayable').val(parseFloat(txtgrossduty).toFixed(2)); + } + + CalculateCtable(); + + + } + + + + + + function CalculateCtable() { + + var quantity = 0; + var txtbasicinrprice = 0; + var txtpurchaserate = 0; + var txtgrossexp = 0; + var txtcustomdutyexp = 0; + var txtrmc = 0; + var total = 0; + var basicamt = 0; + var qty = parseFloat($('#Quantity').val()); + + + var igst = parseFloat($('#AfterIgstInt').val()); + var totduty = parseFloat($('#Grossdutypayable').val()); + + var txtdutyimpact = ; + + // console.log(txtdutyimpact); + + if (isNaN(txtdutyimpact)) { + $('#DutyImpact').val(''); + } else { + $('#DutyImpact').val(parseFloat(txtdutyimpact).toFixed(2)); + } + + quantity = parseFloat($('#PurQuantity').val()); + + var dutyimpact = parseFloat($('#DutyImpact').val()); + + + var peruom = ; + + + if (isNaN(peruom)) { + $('#CustomDutyExpenses').val(''); + } else { + $('#CustomDutyExpenses').val((peruom).toFixed(2)); + } + + + var customdutyexp = $('#CustomDutyExpenses').val() == '' ? '0.00' : $('#CustomDutyExpenses').val(); + var basicqtyval = $('#AfterBasicPriceTax').val() == '' ? '0.00' : $('#AfterBasicPriceTax').val(); + var qty = parseFloat($('#CPQuantity').val()); + var clearing = $('#ClearingCharges').val() == '' ? '0.00' : $('#ClearingCharges').val(); + var basicres = ; + var clear = ; + + + var basicnett = parseFloat(basicres) + parseFloat(clear) + parseFloat(customdutyexp); + + + if (isNaN(basicnett)) { + $('#Nett').val(''); + } else { + $('#Nett').val((basicnett).toFixed(2)); + } + + } + \ No newline at end of file diff --git a/app/Views/costListing.php b/app/Views/costListing.php index 48b82049..a9aabba5 100644 --- a/app/Views/costListing.php +++ b/app/Views/costListing.php @@ -1,98 +1,190 @@ - -
- -
+
+
-
-

Cost Details

-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - +
Cost Center CodeCost Center NameCreated ByCreate DateActiveAction
code ?>CostCenterName ?>FirstName ?>CreatedDate); - echo $date->format('d-m-Y'); ?>IsActive == 1?$R='ACTIVE':$R='INACTIVE'; - echo $R; - ?> - DeletedBy == ''){ - ?> -     -     +
+
+

Cost Details

+
+
+
+ +
+
+ + + + + + + + + + + + + + code; ?>">    --> - - - - CreatedDate); + $date = $createdat->format('d-m-Y'); + $time = $createdat->format('h:i A'); + ?> + + + + + + + + + + + - -
Create DateCreate TimeCost Center CodeCost Center NameCreated ByActiveAction
code ?>CostCenterName ?>FirstName ?>IsActive == 1 ? $R = 'ACTIVE' : $R = 'INACTIVE'; + echo $R; + ?> + DeletedBy == '') { + ?> + +     + +
- - -
-
-
- - - - - - - + } + ?> +
+ +
+
+
+ + + + + + + +
+
+ + + + + + + \ No newline at end of file diff --git a/app/Views/editCapitalAmendPO.php b/app/Views/editCapitalAmendPO.php index 27034640..dd0b5526 100644 --- a/app/Views/editCapitalAmendPO.php +++ b/app/Views/editCapitalAmendPO.php @@ -1,697 +1,672 @@ - "NO","value"=>"0"),array("name"=>"YES","value"=>"1") - ); - - $requestedBy=$requestedBy[0]->FirstName; - - // $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); + $insuranceStatus = array( + array("name" => "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; + $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; + $TotalFreightvalue = 0.0; $TotalFrieght = 0; - $totigst=0; - $totSubtotal=0; - $totassesable=0; - - $TotalSummary = 0.0; - $TotalBasicAmount = 0.0; - $scopeofwork = ''; - $Import_DispatchDetails=''; - $Import_PlaceofOrgin=''; - $CapitalRange=''; + $totigst = 0; + $totSubtotal = 0; + $totassesable = 0; - $Deliverydt=''; - $DeliverSchedule=''; - $MaxPoDate = ''; - $AvlAmount = 0; - $currentCurrencyType=''; - $exchangeRate=''; - $exchangeRate = $ExchangeRate; - $ConfigValue=''; + $TotalSummary = 0.0; + $TotalBasicAmount = 0.0; + $scopeofwork = ''; + $Import_DispatchDetails = ''; + $Import_PlaceofOrgin = ''; + $CapitalRange = ''; - $tt=0.0; + $Deliverydt = ''; + $DeliverSchedule = ''; + $MaxPoDate = ''; + $AvlAmount = 0; + $currentCurrencyType = ''; + $exchangeRate = ''; + $exchangeRate = $ExchangeRate; + $ConfigValue = ''; - $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; + $tt = 0.0; - $BudgetType = ''; - $PrePOFile = ''; + $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; - + $INR = ''; + $INRSYM = ''; + if (!empty($INRSYMBOL)) { + foreach ($INRSYMBOL as $INR) { + $INRSYM = $INR->Currency_Code; + $INR = $INR->FontCode2000; + } } -} -//echo $CapitalRange; -if(!empty($POItem) && $CapitalRange=='1') -{ + //echo $INR; - $currentPoBasicAmt=0; - $currentPoDiscountedAmt=0; - foreach ($POItem as $getTotalAmt) - { - - $currentPoBasicAmt=$currentPoBasicAmt+($getTotalAmt->Rate * $getTotalAmt->Quantity); - $currentPoDiscountedAmt=$currentPoDiscountedAmt+$getTotalAmt->Afterdiscountval; - - - - + if (!empty($MaxPODate)) { + foreach ($MaxPODate as $date) { + $MaxPoDate = $date->PODate; + } } -if(!empty($AvlBudAmt)) -{ - - $AvlAmount = number_format($AvlCapitalBudAmt+$currentPoBasicAmt-$currentPoDiscountedAmt, 2, '.', ''); - - -} + if (!empty($POItem)) { + //print_r($POItem); + } + if (!empty($POMaster)) { + //print_r($POMaster); -} -else { - $AvlAmount = number_format($AvlCapitalBudAmt+$ExitTotalOrderValue, 2, '.', ''); + 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, '.', ''); + } + ?> - - + + + capitalType = 'Domestic'; + + } else { + document.getElementById('FromOnline').style.display = 'block'; + document.getElementById('ExchangeRateOnDiv').style.display = 'block'; + document.getElementById('ExchangeRateDiv').style.display = 'block'; + document.getElementById('currencyTypeDiv').style.display = 'block'; + //document.getElementById('ExchangeRateModalDiv').style.display = 'block'; + document.getElementById('ExchangeRateModalEditDiv').style.display = 'block'; + //document.getElementById('ExchangeRateModalViewDiv').style.display = 'block'; + capitalType = 'International'; + document.getElementById('currencyTypeDiv').style.display = 'block'; + document.getElementById('dispatchinternational').style.display = 'block'; + //document.getElementById('deliverydateby').style.display = 'block'; + //document.getElementById('ViewModalImportTaxHide').style.display = 'block'; + } + } +
-
- 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'ImportPO'); +
+ 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'ImportPO'); - $attributes = array('class' => 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'CapitalPO','enctype' => 'multipart/form-data'); + $attributes = array('class' => 'form-label-left CapitalPO ', 'name' => 'CapitalPO', 'id' => 'CapitalPO', 'enctype' => 'multipart/form-data'); - echo form_open(base_url().'/purchaseorder/addPO/',$attributes); ?> + echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?> -
+
-
-
-
-

Amended Capital Purchase Order-

- Back -
- -
-
+
+
- + 'Selected Requisition Numbers'); - if(!empty($ReqList)) - { - - foreach ($ReqList as $SID): + $options = array("0" => '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"'); + + 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); - ?> -
+ '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'); - ?> + + 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); - ?> -
+ +
+ '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; + Currency_Code!=$Cur->Currency_Code){ - $options1[$Cur->Currency_Code] = $Cur->Currency_Code.' '.' - '.' '.$Cur->Country_and_Currency; - } - - } + if (!empty($Currency)) { - echo form_dropdown('currencytype', $options1,set_value('currencytype',$currentCurrencyType),'id="currencytype"','class="form-control select2"' , 'required="true"'); + // $currentCurrencyType=$CurrencyDetail[0]->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 -
-
+ Select Delivery By +
+
-
+
- -
- - - 'Dispatch','value' => set_value('Dispatch',$Import_DispatchDetails),'id'=>'Dispatch', 'class' => 'form-control' ,'required' => 'true'); - // echo form_input($data); +
+ +
+ 'Deliverydate', 'value' => set_value('Deliverydate', $Deliverydt), 'id' => 'Deliverydate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?> +
+
+
+ + + '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); - ?> -
+ +
+ '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); - ?> -
-
-
+
+ '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); - ?> -
+ +
+ '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); - ?> -
+ +
+ + '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); - ?> -
+ +
+ + '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); - ?> -
+
+ + 'amendsupplierofferno', 'value' => set_value('amendsupplierofferno', $SuppliersOfferNo), 'id' => 'amendsupplierofferno', 'class' => 'form-control'); + echo form_input($data); + ?> +
@@ -701,129 +676,127 @@ document.getElementById('dispatchinternational').style.display = 'block';
- + 'amendotherreference','value' => set_value('amendotherreference',$OtherReferences),'id'=>'amendotherreference', 'class' => 'form-control'); - echo form_input($data); - ?> + $data = array('name' => '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'); - ?> + 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; - } + if ($PaymentTerms == $rl->PaymentID) { + //echo $PaymentTerms."
"; + //print_r($Payment); + $options6[$rl->PaymentID] = $rl->PaymentTerms; + ?> + + -
- + if (!empty($Payment)) { + foreach ($Payment as $rl2) : + + if ($PaymentTerms != $rl2->PaymentID) { + $options6[$rl2->PaymentID] = $rl2->PaymentTerms; + } + + endforeach; + } + + echo form_dropdown('PaymentMethod', $options6, set_value('PaymentMethod', $PaymentTerms), 'id="PaymentMethod"', 'required="true"', 'class="form-control select2'); + + ?> +
+
- -
- Insurance Options* +
+
-
- -
- 'InsuranceNumber','value' => set_value('InsuranceNumber',$InsuranceNumber),'id'=>'InsuranceNumber', 'class' => 'form-control' ,'required' => 'true'); - echo form_input($data); - ?> -
-
+
+ +
+ 'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); + echo form_input($data); + ?> +
+
- + + + + +
@@ -832,1342 +805,1341 @@ document.getElementById('dispatchinternational').style.display = 'block'; - - - - - -
-
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $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; - } - ?> - - - - - - - - -
SNoRequisition NoItem NameQuantityUOMRateBasic AmountTax AmountTotal Order AmountAction
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,'.',''); ?>     - - - -
-
-
- -
- -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $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; + } + ?> + + + + + + + + +
SNoRequisition NoItem NameQuantityUOMRateBasic AmountTax AmountTotal Order AmountAction
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); + ?> +
- 'EditItemDescription','value' => set_value('EditItemDescription'),'id'=>'EditItemDescription', 'class' => 'form-control' ,'rows' => '3', 'cols' => '40' ); - echo form_textarea($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); + ?> +

-
-
- - - -
- -
- -
- - '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;'); + $data = array('name' => 'txttotalfrieght', 'value' => set_value('txttotalfrieght', $TotalFrieght), 'id' => 'txttotalfrieght', '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;'); + $data = array('name' => '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); + ?> +
- - - - - -
- - - 'CapitalToatlOrder','value' => set_value('CapitalToatlOrder',number_format($totalCapitalOrder, 2, '.', '')),'id'=>'CapitalToatlOrder', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); + +
+ + + '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); + ?> +
+ + + +
+ + + + + + + + +   Submit + + + +
+ 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"; + } + ?> +
+
- - - -
-
- 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$scopeofwork),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' ); - 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($PoStatusName) && !empty($PoStatusName)) { - if (isset($statusMappings[$PoStatusName])) { - echo $statusMappings[$PoStatusName]; - } else { - echo $PoStatusName; - } - } else { - echo "Status not provided"; - } - ?> -
- -
- -
-
+
+
- + + } else if (Calculation == 1) { + var basicinrValue = $('#EditCPTotalAmount').val() == '' ? '0.00' : $('#EditCPTotalAmount').val(); + var discount = $('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val(); + var basicValue = basicinrValue - discount; + var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val(); + var AfterFreight = ; + var txtAfterFreightloc = parseFloat(AfterFreight).toFixed(2); + $('#txtAfterFreightlocedit').val(txtAfterFreightloc); + } + } else if (FreightType == '') { + $('#txtAfterFreightlocedit').val(''); + AfterFreight = 0.00; + $('#txtFreightlocedit').val(''); + var txtAfterFreightloc = parseFloat(AfterFreight).toFixed(2); + $('#txtAfterFreightlocedit').val(txtAfterFreightloc); + document.getElementById("txtAfterFreightlocedit").readOnly = true; + document.getElementById("txtFreightlocedit").readOnly = true; + } else if (FreightType == '') { + $('#txtAfterFreightlocedit').val(''); + var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val(); + AfterFreight = ; + var txtAfterFreightloc = parseFloat(AfterFreight).toFixed(2); + $('#txtAfterFreightlocedit').val(txtAfterFreightloc); + document.getElementById("txtAfterFreightlocedit").readOnly = true; + + } else if (FreightType == '') { + $('#txtAfterFreightlocedit').val(''); + var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val(); + var Quantity = $('#EditCPQuantity').val() == '' ? '0.00' : $('#EditCPQuantity').val(); + AfterFreight = ; + var txtAfterFreightloc = parseFloat(AfterFreight).toFixed(2); + $('#txtAfterFreightlocedit').val(txtAfterFreightloc); + } else if (FreightType == '') { + $('#txtAfterFreightlocedit').val(''); + var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val(); + var noOftrip = $('#NOOfTripslocedit').val() == '' ? '0.00' : $('#NOOfTripslocedit').val(); + + AfterFreight = ; + + AfterFreight = parseFloat(AfterFreight * noOftrip).toFixed(2); + var txtAfterFreightloc = parseFloat(AfterFreight).toFixed(2); + $('#txtAfterFreightlocedit').val(txtAfterFreightloc); + + } else { + + $('#txtAfterFreightlocedit').val(''); + var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val(); + var txtAfterFreightloc = parseFloat(FreightValue).toFixed(2); + $('#txtAfterFreightlocedit').val(txtAfterFreightloc); + + } + + EditRatechange(); + } + + + + function EditCalculateloadingcharge() { + //alert(); + var txtlanding = 0; + var txtbasicprice = 0; + var asss = 0; + txtlanding = parseFloat($('#EditLandingCharge').val() == '' ? '0.00' : $('#EditLandingCharge').val()); + //txtlanding=parseFloat($('#EditLandingCharge').val()); + //txtbasicprice=parseFloat($('#EditAfterBasicPriceTax').val()); + + txtbasicprice = parseFloat($('#EditAfterBasicPriceTax').val() == '' ? '0.00' : $('#EditAfterBasicPriceTax').val()); + // console.log(txtbasicprice); + var result = ; + //console.log(result); + + asss = result; + //console.log(asss); + + + // var Assessable= ; + var Assessable = parseFloat(txtbasicprice) + parseFloat(asss); + //console.log(Assessable); + //alert(Assessable); + + $('#EditAfterLandingCharge').val(result.toFixed(2)); + $('#EditAfterAssessable').val(Assessable); + EditCalculateCustomduty(); + //alert(); + } + + + + + function EditCalculateCustomduty() { + + var txtbasic = 0; + var txtcustompercentage = 0; + var txthighse = 0; + var txtlandingch = 0; + var sumcustom = 0; + var txtcustomduty = 0; + + //var accessible=parseFloat($('#EditAfterAssessable').val()); + var accessible = parseFloat($('#EditAfterAssessable').val() == '' ? '0.00' : $('#EditAfterAssessable').val()); + // var txtcustompercentage=parseFloat($('#EditCustomduty').val()); + var txtcustompercentage = parseFloat($('#EditCustomduty').val() == '' ? '0.00' : $('#EditCustomduty').val()); + //sumcustom=txthighse+txtlandingch+txtbasic; + + + txtcustomduty = ; + if (isNaN(txtcustomduty)) { + $('#EditAfterCustomduty').val(''); + } else { + $('#EditAfterCustomduty').val(parseFloat(txtcustomduty).toFixed(2)); + } + EditCalculateCustomEdcess(); + + } + + + + function EditCalculateCustomEdcess() { + var txtloading = 0; + var txthighses = 0; + var txtcustomduty1 = 0; + var txtexciseduty = 0; + var txtedexciseduty = 0; + var txtshexcisesess = 0; + var totalval = 0; + var txtedcesspercentage = 0; + //var txtcustomedsess=(totalval*txtedcesspercentage)/100; + var txtcustomedsess = 0; + + //txtcustomduty1=parseFloat($('#EditAfterCustomduty').val()); + + //txtedcesspercentage=parseFloat($('#EditCustomEDcess').val()); + //var txtcustomedsess=(totalval*txtedcesspercentage)/100; + + txtcustomduty1 = parseFloat($('#EditAfterCustomduty').val() == '' ? '0.00' : $('#EditAfterCustomduty').val()); + + // txtedcesspercentage=parseFloat($('#CustomEDcess').val()); + txtedcesspercentage = parseFloat($('#EditCustomEDcess').val() == '' ? '0.00' : $('#EditCustomEDcess').val()); + + txtcustomedsess = ; + if (isNaN(txtcustomedsess)) { + $('#EditAfterCustomEDcess').val(''); + } else { + $('#EditAfterCustomEDcess').val(parseFloat(txtcustomedsess).toFixed(2)); + } + EditCalculateCustomSHcess(); + + } + + + function EditCalculateCustomSHcess() { //alert(); + + var landingch = 0; + var highsesssalles = 0; + var customch = 0; + var excisech = 0; + var exciseedch = 0; + var exciseshch = 0; + var totcustomsh = 0; + + var txtshpercentage = 0; + //var totresult=(totcustomsh*txtshpercentage)/100; + var totresult = 0; + + var basucprice = parseFloat($('#AfterBasicPriceTax').val() == '' ? '0.00' : $('#AfterBasicPriceTax').val()); + + //landingch=parseFloat($('#EditAfterLandingCharge').val()); + landingch = parseFloat($('#EditAfterLandingCharge').val() == '' ? '0.00' : $('#EditAfterLandingCharge').val()); + + //highsesssalles=parseFloat($('#EditAfterHighseas').val()); + + // customch=parseFloat($('#EditAfterCustomduty').val()); + customch = parseFloat($('#EditAfterCustomduty').val() == '' ? '0.00' : $('#EditAfterCustomduty').val()); + + //excisech=parseFloat($('#EditAfterExcisedutyTax').val()); + + + totcustomsh = landingch + highsesssalles + customch + excisech + exciseedch + exciseshch; + + //txtshpercentage=parseFloat($('#EditCustomSHcess').val()); + + txtshpercentage = $('#EditCustomSHcess').val() == '' ? '0.00' : $('#EditCustomSHcess').val() + //var totresult=(totcustomsh*txtshpercentage)/100; + var totresult = ; + if (isNaN(totresult)) { + $('#EditAfterCustomSHcess').val(''); + } else { + $('#EditAfterCustomSHcess').val(parseFloat(totresult).toFixed(2)); + } + //EditCalculateaddlExciseDuty(); + + EditCalculateIgst() + + } + + + function EditCalculateIgst() { + + // var custom=parseFloat($('#EditAfterCustomduty').val()); + // var customsh=parseFloat($('#EditAfterCustomSHcess').val()); + // var customed=parseFloat($('#EditAfterCustomEDcess').val()); + + // var assessble=parseFloat($('#EditAfterAssessable').val()); + + var custom = parseFloat($('#EditAfterCustomduty').val() == '' ? '0.00' : $('#EditAfterCustomduty').val()); + var customsh = parseFloat($('#EditAfterCustomSHcess').val() == '' ? '0.00' : $('#EditAfterCustomSHcess').val()); + var customed = parseFloat($('#EditAfterCustomEDcess').val() == '' ? '0.00' : $('#EditAfterCustomEDcess').val()); + var assessble = parseFloat($('#EditAfterAssessable').val() == '' ? '0.00' : $('#EditAfterAssessable').val()); + + + var tot = ; + //console.log(tot); + //var igstpercentage=parseFloat($('#EditIgst').val()); + var igstpercentage = $('#EditIgstInt').val() == '' ? '0.00' : $('#EditIgstInt').val() + var afterigst = ; + + + if (isNaN(tot)) { + $('#EditSubtotal').val(''); + } else { + $('#EditSubtotal').val(parseFloat(tot).toFixed(2)); + } + + + + if (isNaN(afterigst)) { + $('#EditAfterIgstInt').val(''); + } else { + $('#EditAfterIgstInt').val(parseFloat(afterigst).toFixed(2)); + } + + + var grossexp = custom + customsh + customed + afterigst; + + var txtgrossduty = ; + + ; + if (isNaN(txtgrossduty)) { + $('#EditGrossdutypayable').val(''); + } else { + $('#EditGrossdutypayable').val(parseFloat(txtgrossduty).toFixed(2)); + } + + EditCalculateCtable() + } + + + + + function EditCalculateCtable() { + + var quantity = 0; + var txtbasicinrprice = 0; + var txtpurchaserate = 0; + var txtgrossexp = 0; + var txtcustomdutyexp = 0; + var txtrmc = 0; + var total = 0; + var basicamt = 0; + var qty = parseFloat($('#EditQuantity').val()); + + + var igst = parseFloat($('#EditAfterIgstInt').val()); + var totduty = parseFloat($('#EditGrossdutypayable').val()); + + + + var txtdutyimpact = ; + + // console.log(txtdutyimpact); + + if (isNaN(txtdutyimpact)) { + $('#EditDutyImpact').val(''); + } else { + $('#EditDutyImpact').val(parseFloat(txtdutyimpact).toFixed(2)); + } + + quantity = parseFloat($('#EditPurQuantity').val()); + + var dutyimpact = parseFloat($('#EditDutyImpact').val()); + + + var peruom = ; + + + if (isNaN(peruom)) { + $('#EditCustomDutyExpenses').val(''); + } else { + $('#EditCustomDutyExpenses').val((peruom).toFixed(2)); + } + + + var customdutyexp = $('#EditCustomDutyExpenses').val() == '' ? '0.00' : $('#EditCustomDutyExpenses').val(); + var basicqtyval = $('#EditAfterBasicPriceTax').val() == '' ? '0.00' : $('#EditAfterBasicPriceTax').val(); + var qty = parseFloat($('#EditCPQuantity').val()); + var clearing = $('#EditClearingCharges').val() == '' ? '0.00' : $('#EditClearingCharges').val(); + var basicres = ; + var clear = ; + + //console.log(basicres); + //console.log(clear); + + var basicnett = parseFloat(basicres) + parseFloat(clear) + parseFloat(customdutyexp); + + //console.log(basicnett); + if (isNaN(basicnett)) { + $('#EditNett').val(''); + } else { + $('#EditNett').val((basicnett).toFixed(2)); + } + } + \ No newline at end of file diff --git a/app/Views/editCapitalPo.php b/app/Views/editCapitalPo.php index 1ed1eb74..0955b15a 100644 --- a/app/Views/editCapitalPo.php +++ b/app/Views/editCapitalPo.php @@ -1,3024 +1,2230 @@ - "NO","value"=>"0"),array("name"=>"YES","value"=>"1") - ); - $requestedBy=$RequistionDetails[0]->FirstName; - $Updateddt = new DateTime($RequistionDetails[0]->ReqDate); - $UpdatedOn=$Updateddt->format('d-m-Y'); - $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); + "NO", "value" => "0"), array("name" => "YES", "value" => "1") + ); + $requestedBy = $RequistionDetails[0]->FirstName; + $Updateddt = new DateTime($RequistionDetails[0]->ReqDate); + $UpdatedOn = $Updateddt->format('d-m-Y'); + $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $CurrentDate = $dt->format('d-m-Y'); - $res_arr_values = array(); - $DeliverOption=''; + $res_arr_values = array(); + $DeliverOption = ''; $SupId = ''; - $SupName = ''; + $SupName = ''; $Address = ''; $PODate = ''; - $TotalCgst=''; - $TotalSgst=''; - $TotalIgst=''; - $DeliveryAddress =''; + $TotalCgst = ''; + $TotalSgst = ''; + $TotalIgst = ''; + $DeliveryAddress = ''; $POStatus = ''; $PONO = ''; $TotalCgst = 0; $TotalSgst = 0.0; $TotalIgst = 0.0; $OtherAmt = 0.0; - $TotalFreightvalue=0.0; - - + $TotalFreightvalue = 0.0; $PrePOFile = ''; - - $totassesable=0; - $totSubtotal=0; - $totigst=0; - + $totassesable = 0; + $totSubtotal = 0; + $totigst = 0; $TotalSummary = 0.0; $TotalBasicAmount = 0.0; $ServiceDescription = ''; - $Import_DispatchDetails=''; - $Import_PlaceofOrgin=''; - $CapitalRange=''; - $tt=0.0; + $Import_DispatchDetails = ''; + $Import_PlaceofOrgin = ''; + $CapitalRange = ''; + $tt = 0.0; + $Deliverydt = ''; + $DeliverSchedule = ''; + $PONOStatus = ''; + $MaxPoDate = ''; + $AvlAmount = 0; + $currentCurrencyType = ''; + $exchangeRate = $ExchangeRate; + $ConfigValue = ''; + $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; + $totDis = 0; + $totFreight = 0; + $ExchangeRate = ''; + $PaymentTerms = ''; + $PaymentDays = ''; + $PayableAT = ''; + $ExchangeDate = ''; + $ExchangeRateOn = ''; + $CapitalRange = ''; + $PoStatusName = ''; + $otherPayment = ''; + $INR = ''; + $INRSYM = ''; + $ExitTotalOrderValue = 0; + $ExitTotalBasicOrderValue = 0; + $ExitExchangeRate = ''; + $ModeOfShipment = ''; + $SupplierReference = ''; + $SuppliersOfferNo = ''; + $OtherReferences = ''; + $InsuranceOptions = ''; + $InsuranceNumber = ''; + $ServiceTypeOptions = ''; + $BudgetType = ''; - $Deliverydt=''; - $DeliverSchedule=''; - $PONOStatus=''; - $MaxPoDate = ''; - $AvlAmount = 0; - $currentCurrencyType=''; - $exchangeRate = $ExchangeRate; - $ConfigValue=''; - - $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; - $totDis=0; - $totFreight=0; - $ExchangeRate=''; - $PaymentTerms=''; - $PaymentDays=''; - $PayableAT=''; - $ExchangeDate=''; - $ExchangeRateOn=''; - - $CapitalRange=''; - $PoStatusName=''; - $otherPayment=''; - $INR=''; - $INRSYM=''; - $ExitTotalOrderValue=0; - $ExitTotalBasicOrderValue=0; - - $ExitExchangeRate=''; - - $ModeOfShipment=''; - $SupplierReference=''; - $SuppliersOfferNo=''; - $OtherReferences=''; - $InsuranceOptions=''; - $InsuranceNumber=''; - $ServiceTypeOptions=''; - $BudgetType = ''; - -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($POMaster)) -{ - - - 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'); - - $DeliveryAddress =$Req->DeliveryAddress; - $PONOStatus = $Req->StatusCode; - $POStatus = $Req->StatusCode; - $PoStatusName=$Req->StatusName; - $PONO = $Req->PONO; - $ServiceDescription = $Req->ServiceDescription; - - $Exchangedt = new DateTime($Req->ExchangeRateCalculatedon); - $ExchangeRateOn=$Exchangedt->format('d-m-Y'); - - - $PaymentTerms=$Req->PaymentTerms; - $otherPayment = $Req->PaymentOtherDescription; - - - $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; - + if (!empty($INRSYMBOL)) { + foreach ($INRSYMBOL as $INR) { + $INRSYM = $INR->Currency_Code; + $INR = $INR->FontCode2000; + } } -} + //echo $INR; -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($MaxPODate)) { + foreach ($MaxPODate as $date) { + $MaxPoDate = $date->PODate; + } } -if(!empty($AvlBudAmt)) -{ - - $AvlAmount = number_format($AvlCapitalBudAmt+$currentPoBasicAmt-$currentPoDiscountedAmt, 2, '.', ''); - - -} - -} -else { - $AvlAmount = number_format($AvlCapitalBudAmt+$ExitTotalOrderValue, 2, '.', ''); - -} -//print_r($getlogpodtl);die; - -if(!empty($getlogpodtl)) -{ - - -foreach ($getlogpodtl as $values ) -{ - $update=$values->FirstName; -} -}else{ - $update= []; -} + if (!empty($POMaster)) { + 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'); + $DeliveryAddress = $Req->DeliveryAddress; + $PONOStatus = $Req->StatusCode; + $POStatus = $Req->StatusCode; + $PoStatusName = $Req->StatusName; + $PONO = $Req->PONO; + $ServiceDescription = $Req->ServiceDescription; + $Exchangedt = new DateTime($Req->ExchangeRateCalculatedon); + $ExchangeRateOn = $Exchangedt->format('d-m-Y'); + $PaymentTerms = $Req->PaymentTerms; + $otherPayment = $Req->PaymentOtherDescription; + $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; + } + } + + 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, '.', ''); + } + //print_r($getlogpodtl);die; + + if (!empty($getlogpodtl)) { + foreach ($getlogpodtl as $values) { + $update = $values->FirstName; + } + } else { + $update = []; + } + + ?> - - + + document.getElementById('FromOnline').style.display = 'none'; + document.getElementById('ExchangeRateOnDiv').style.display = 'none'; + document.getElementById('ExchangeRateDiv').style.display = 'none'; + document.getElementById('currencyTypeDiv').style.display = 'none'; + document.getElementById('ExchangeRateModalDiv').style.display = 'none'; + document.getElementById('ExchangeRateModalEditDiv').style.display = 'none'; + document.getElementById('HideImportTaxTotal').style.display = 'none'; + document.getElementById('ModalImportTaxHide').style.display = 'none'; + document.getElementById('EditModalImportTaxHide').style.display = 'none'; + document.getElementById('ExchangeRateModalViewDiv').style.display = 'none'; + document.getElementById('ViewModalImportTaxHide').style.display = 'none'; + document.getElementById('PlaceOforigindiv').style.display = 'none'; + document.getElementById('dispatchinternational').style.display = 'none'; + document.getElementById('datedomestic').style.display = 'block'; + + + capitalType = 'Domestic'; + + } else { + document.getElementById('FromOnline').style.display = 'block'; + document.getElementById('ExchangeRateOnDiv').style.display = 'block'; + document.getElementById('ExchangeRateDiv').style.display = 'block'; + document.getElementById('currencyTypeDiv').style.display = 'block'; + document.getElementById('ExchangeRateModalDiv').style.display = 'block'; + document.getElementById('ExchangeRateModalEditDiv').style.display = 'block'; + document.getElementById('ExchangeRateModalViewDiv').style.display = 'block'; + capitalType = 'International'; + document.getElementById('currencyTypeDiv').style.display = 'block'; + document.getElementById('ViewModalImportTaxHide').style.display = 'block'; + document.getElementById('dispatchinternational').style.display = 'block'; + document.getElementById('datedomestic').style.display = 'none'; + + } + } +
-
- 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'ImportPO'); +
+ 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'ImportPO'); - $attributes = array('class' => 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'CapitalPO','enctype' => 'multipart/form-data'); + $attributes = array('class' => 'form-label-left CapitalPO ', 'name' => 'CapitalPO', 'id' => 'CapitalPO', 'enctype' => 'multipart/form-data'); - echo form_open(base_url().'/purchaseorder/addPO/',$attributes); ?> + echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?> -
+
-
-
-
- -

Edit Capital Purchase Order -

- -

Amended Capital Purchase Order -

- - Back -
- -
-
-
+
+
+
- - Requistion No + 'Selected Requisition Numbers'); - if(!empty($ReqList)) - { - - foreach ($ReqList as $SID): + $options = array("0" => 'Selected Requisition Numbers'); + if (!empty($ReqList)) { - $options[$SID->ReqNo] = $SID->ReqNo; - - endforeach; - } - echo form_multiselect('RequistionNo', $options,set_value('RequistionNo', array()),'id="RequistionNo"' , 'required="true"'); + 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); - ?> -
+ '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'); - ?> - + if (!empty($Suplist)) { + foreach ($Suplist as $SID) : + $options2[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; + endforeach; + } -
-
- -
- 'SupAddress','value' => set_value('SupAddress',$Address),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true','rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> -
-
+ 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[$CurrencyDetail[0]->Currency_Code] = $CurrencyDetail[0]->Currency_Code.' '.' - '.' '.$CurrencyDetail[0]->Country_and_Currency; - foreach ($Currency as $Cur): - if($CurrencyDetail[0]->Currency_Code!=$Cur->Currency_Code){ - $options1[$Cur->Currency_Code] = $Cur->Currency_Code.' '.' - '.' '.$Cur->Country_and_Currency; +
+ +
CurrencyCode; + $options1[$CurrencyDetail[0]->Currency_Code] = $CurrencyDetail[0]->Currency_Code . ' ' . ' - ' . ' ' . $CurrencyDetail[0]->Country_and_Currency; + foreach ($Currency as $Cur) : + if ($CurrencyDetail[0]->Currency_Code != $Cur->Currency_Code) { + $options1[$Cur->Currency_Code] = $Cur->Currency_Code . ' ' . ' - ' . ' ' . $Cur->Country_and_Currency; + } + endforeach; + } + echo form_dropdown('currencytype', $options1, set_value('currencytype', $currentCurrencyType), 'id="currencytype"', 'class="form-control select2"', 'required="true"'); + ?> +
+
+
+ Select Delivery By*
+
+
- } - endforeach; - } - 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')); ?> +
+
+
+
- - -
- 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?> -
-
-
-
+
-
- 'DeliveryAddr','value' => set_value('DeliveryAddr',$DeliveryAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true', 'rows' => '3', 'cols' => '40'); - 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); + ?> +
-
-
+
+
+ +
+ 'Exchangerateon', 'value' => set_value('Exchangerateon', $ExchangeRateOn), 'id' => 'Exchangerateon', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?> +
+
+ * +
+ 'ExchangeRt', 'value' => set_value('ExchangeRt', $exchangeRate), 'id' => 'ExchangeRt', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);'); + echo form_input($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); - ?> -
-
+ +
+ '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); - ?> -
+
+ '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'); + + 'editmodeofshipment', 'value' => set_value('editmodeofshipment', $ModeOfShipment), 'id' => 'editmodeofshipment', 'class' => 'form-control'); echo form_input($data); - ?> + ?>
- +
- - 'editsupplierreference','value' => set_value('editsupplierreference',$SupplierReference),'id'=>'editsupplierreference', 'class' => 'form-control', 'maxlength'=>'40'); + + 'editsupplierreference', 'value' => set_value('editsupplierreference', $SupplierReference), 'id' => 'editsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); echo form_input($data); - ?> + ?>
- - 'editsupplierofferno','value' => set_value('editsupplierofferno',$SuppliersOfferNo),'id'=>'editsupplierofferno', 'class' => 'form-control'); + + 'editsupplierofferno', 'value' => set_value('editsupplierofferno', $SuppliersOfferNo), 'id' => 'editsupplierofferno', 'class' => 'form-control'); echo form_input($data); - - ?> + + ?>
-
-
+
+
- - 'editotherreference','value' => set_value('editotherreference',$OtherReferences),'id'=>'editotherreference', 'class' => 'form-control'); + + 'editotherreference', 'value' => set_value('editotherreference', $OtherReferences), 'id' => 'editotherreference', 'class' => 'form-control'); echo form_input($data); - ?> + ?>
- +
- - 'Select Work Status'); - - if(!empty($PoTypeOptions)) - { - foreach ($PoTypeOptions as $POpt): - if($ServiceTypeOptions==$POpt->ConfigValue){ - $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; - } + + if (!empty($PoTypeOptions)) { + foreach ($PoTypeOptions as $POpt) : + if ($ServiceTypeOptions == $POpt->ConfigValue) { + $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; + } endforeach; - foreach ($PoTypeOptions as $POpt1): - if($ServiceTypeOptions!=$POpt1->ConfigValue){ - $optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue; - } + 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'); + } + + echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions"', 'required="true"', 'class="form-control select2'); - ?> + ?>
- - PaymentTerms) - { - $options6[$rl->PaymentID] = $rl->PaymentTerms; - } - endforeach; - - - if(!empty($Payment)) - { - foreach ($Payment as $rl2): - if($PaymentTerms!=$rl2->PaymentTerms) - { - $options6[$rl2->PaymentID] = $rl2->PaymentTerms; - } + + PaymentTerms) { + $options6[$rl->PaymentID] = $rl->PaymentTerms; + } + endforeach; - endforeach; - } - echo form_dropdown('PaymentMethod', $options6,set_value('PaymentMethod',$PaymentTerms),'id="PaymentMethod"' ,'required="true"' ,'class="form-control select2"'); + if (!empty($Payment)) { + foreach ($Payment as $rl2) : + if ($PaymentTerms != $rl2->PaymentTerms) { + $options6[$rl2->PaymentID] = $rl2->PaymentTerms; + } - ?> + endforeach; + } + + echo form_dropdown('PaymentMethod', $options6, set_value('PaymentMethod', $PaymentTerms), 'id="PaymentMethod"', 'required="true"', 'class="form-control select2"'); + + ?>
+ +
+ 'Otherpayment', 'Otherpayment' => set_value('Otherpayment'), 'id' => 'Otherpayment', 'class' => 'form-control', 'required' => 'true'); + echo form_input($data); + ?> +
+
-
-
+
+
- + + ?>
-
- -
- 'InsuranceNumber','value' => set_value('InsuranceNumber',$InsuranceNumber),'id'=>'InsuranceNumber', 'class' => 'form-control' ,'required' => 'true'); - echo form_input($data); - ?> -
-
-
- - -
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
- - - -
-
-
- -
- - - - - - - - - - - - - - - - - - - - Rate * $record->Quantity); - +
+ +
+ 'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); + echo form_input($data); ?> -
- - - - - - - - - - - + + +
+ + +
+
- - -
+ + + - + - - - - + + + + + + + + + + + +
+
+ +
+ +
+
+ +
+
SNoRequisition NoItem CodeItem DescriptionQuantityUOMRateBasic AmountTax AmountTotal Order AmountAction
ReqNo ?>MaterialCode?>MaterialName?>Quantity ?>UOM ?>Rate ?>Rate * $record->Quantity, 2, '.', '') ?>ServiceTaxamount;?>Rate * $record->Quantity + $record->ServiceTaxamount + $record->otherallowance+ $record->Afvalue - $record->Afterdiscountval, 2, '.', '') ?>Rate * $record->Quantity, 2, '.', '') ?>
+ + + + + + + + + + + + + + + + + + + Rate * $record->Quantity); + + ?> + + + + + + + + + + + + + + + + + + + + + + + - $record->MaterialCode,"ReqNo"=>$record->ReqNo); - array_push($res_arr_values, $row); - ?> - - - - -" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + $row = array("materialCode" => $record->MaterialCode, "ReqNo" => $record->ReqNo); + array_push($res_arr_values, $row); + ?> + + + + + " /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + After_CGST; $TotalSgst = $TotalSgst + $record->After_SGST; $TotalIgst = $TotalIgst + $record->After_IGST; $OtherAmt = $OtherAmt + $record->otherallowance; - $TotalFreightvalue=$TotalFreightvalue+$record->Afvalue; + $TotalFreightvalue = $TotalFreightvalue + $record->Afvalue; - $TotalSummary = $TotalSummary+$record->ServiceTaxamount; + $TotalSummary = $TotalSummary + $record->ServiceTaxamount; $TotalDiscountedAmt = $record->Afterdiscountval; - $ExitDiscountedAmt=$ExitDiscountedAmt+$record->Afterdiscountval; + $ExitDiscountedAmt = $ExitDiscountedAmt + $record->Afterdiscountval; - $totalCapitalOrder = $totalCapitalOrder+$record->Rate * $record->Quantity + $record->After_CGST + $record->After_SGST + $record->After_IGST + $record->otherallowance+$record->Afvalue - $TotalDiscountedAmt; - - } - $TotalBasicAmount = $TotalBasicAmount+$record->BasicValue; - $ServiceDescription = $ServiceDescription; + $totalCapitalOrder = $totalCapitalOrder + $record->Rate * $record->Quantity + $record->After_CGST + $record->After_SGST + $record->After_IGST + $record->otherallowance + $record->Afvalue - $TotalDiscountedAmt; + } + $TotalBasicAmount = $TotalBasicAmount + $record->BasicValue; + $ServiceDescription = $ServiceDescription; - if($CapitalRange=='0'){ - $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; - $TotalFreightAmt = $TotalFreightAmt+$record->AfterFreightValue; - - $totgrossexpense=$totgrossexpense+$record->Grossexpensesduetocustomduty; - $ExchangeRate=$record->ExchangeRate; - $totalCapitalOrder = $totalCapitalOrder+$record->Rate * $record->Quantity; + if ($CapitalRange == '0') { + $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; + $TotalFreightAmt = $TotalFreightAmt + $record->AfterFreightValue; + + $totgrossexpense = $totgrossexpense + $record->Grossexpensesduetocustomduty; + $ExchangeRate = $record->ExchangeRate; + $totalCapitalOrder = $totalCapitalOrder + $record->Rate * $record->Quantity; - $totassesable=$totassesable+$record->AssessableValue; - $totSubtotal=$totSubtotal+$record->SubTotal; - $totigst=$totigst+$record->AfterIGST; + $totassesable = $totassesable + $record->AssessableValue; + $totSubtotal = $totSubtotal + $record->SubTotal; + $totigst = $totigst + $record->AfterIGST; + } + + + // $totorder=$totorder+$record->TotalOrderValue; - } - - - // $totorder=$totorder+$record->TotalOrderValue; - - } - ?> - - - + ?> + + + - - -
SNoRequisition NoItem CodeItem DescriptionQuantityUOMRateBasic AmountTax AmountTotal Order AmountAction
ReqNo ?>MaterialCode ?>MaterialName ?>Quantity ?>UOM ?>Rate ?>Rate * $record->Quantity, 2, '.', '') ?>ServiceTaxamount; ?>Rate * $record->Quantity + $record->ServiceTaxamount + $record->otherallowance + $record->Afvalue - $record->Afterdiscountval, 2, '.', '') ?>Rate * $record->Quantity, 2, '.', '') ?>     -         + +    
-
-
- -
-
-
+
- ?> - - - - - -
- -
- 'CapitalDepartmentName','value' => set_value('CapitalDepartmentName'),'id'=>'CapitalDepartmentName', 'class' => 'form-control' ,'readonly' => 'true'); - echo form_input($data); - ?> +
+ +
+
+ - - +
- - -
-
-
-
- - 'CapitalBasicOrder','value' => set_value('CapitalBasicOrder',number_format($ExitTotalBasicOrderValue, 2, '.', '')),'id'=>'CapitalBasicOrder', 'class' => 'form-control num' ,'readonly' => 'true',); - echo form_input($data); - ?> +
+
+ + 'EditCgst', 'value' => set_value('EditCgst'), 'id' => 'EditCgst', 'class' => 'form-control num', 'placeholder' => 'CGST TAX PERCENTAGE', 'onchange' => 'EditRatechange();ChangeEditSgst();', 'onkeypress' => 'return isNumberKey(event);'); + echo form_input($data); + ?> +
+ +
+
+
+ + 'EditAfterCgst', 'value' => set_value('EditAfterCgst'), 'id' => 'EditAfterCgst', 'class' => 'form-control num', 'placeholder' => 'After CGST', 'readonly' => 'true'); + echo form_input($data); + ?> +
+ +
+ +
+
+
+ + SGST In % +
+ +
+
+ + 'EditSgst', 'value' => set_value('EditSgst'), 'id' => 'EditSgst', 'class' => 'form-control num', 'placeholder' => 'SGST TAX PERCENTAGE', 'onchange' => 'EditRatechange()', 'onkeypress' => 'return isNumberKey(event);'); + echo form_input($data); + ?> +
+ +
+
+
+ + 'EditAfterSgst', 'value' => set_value('EditAfterSgst'), 'id' => 'EditAfterSgst', 'class' => 'form-control num', 'placeholder' => 'After SGST', 'readonly' => 'true'); + echo form_input($data); + ?> +
+ +
+ +
+ +
+
+ + IGST In % +
+ +
+
+ + 'EditIgst', 'value' => set_value('EditIgst'), 'id' => 'EditIgst', 'class' => 'form-control num', 'placeholder' => 'IGST TAX PERCENTAGE', 'onchange' => 'EditRatechange()', 'onkeypress' => 'return isNumberKey(event);'); + echo form_input($data); + ?> +
+ +
+
+
+ + 'EditAfterIgst', 'value' => set_value('EditAfterIgst'), 'id' => 'EditAfterIgst', 'class' => 'form-control num', 'placeholder' => 'After IGST', 'readonly' => 'true'); + echo form_input($data); + ?> +
+ +
+ +
+
+
+ +
+ +
+
+ 'EditOtherAllowances', 'value' => set_value('EditOtherAllowances'), 'id' => 'EditOtherAllowances', 'class' => 'form-control num', 'placeholder' => 'Other Allowances', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();'); + echo form_input($data); + ?> +
+
+
+ +
+
+
+ 'EdittxtTotalOrderValue', 'value' => set_value('EdittxtTotalOrderValue'), 'id' => 'EdittxtTotalOrderValue', 'class' => 'form-control num', 'placeholder' => 'Total Order Amount', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+
+
+
+
+
+
+
+ Basic Price +
+ +
+
+ 'EditAfterBasicPriceTax', 'value' => set_value('EditAfterBasicPriceTax'), 'id' => 'EditAfterBasicPriceTax', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+
+
+ Landing charge +
+
+
+ 'EditLandingCharge', 'value' => set_value('EditLandingCharge'), 'id' => 'EditLandingCharge', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();'); + echo form_input($data); + ?> +
+
+
+
+ 'EditAfterLandingCharge', 'value' => set_value('EditAfterLandingCharge'), 'id' => 'EditAfterLandingCharge', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+
+
+ Assessable Value (A) +
+
+ +
+
+
+ 'EditAfterAssessable', 'value' => set_value('EditAfterAssessable'), 'id' => 'EditAfterAssessable', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+
+
+ Custom duty (B) +
+
+
+ 'EditCustomduty', 'value' => set_value('EditCustomduty'), 'id' => 'EditCustomduty', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();'); + echo form_input($data); + ?> +
+
+
+
+ 'EditAfterCustomduty', 'value' => set_value('EditAfterCustomduty'), 'id' => 'EditAfterCustomduty', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+ + + +
+
+ Custom ED_cess (C) +
+
+
+ 'EditCustomEDcess', 'value' => set_value('EditCustomEDcess'), 'id' => 'EditCustomEDcess', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();'); + echo form_input($data); + ?> +
+
+
+
+ 'EditAfterCustomEDcess', 'value' => set_value('EditAfterCustomEDcess'), 'id' => 'EditAfterCustomEDcess', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+
+
+ Custom S & H cess (D) +
+
+
+ 'EditCustomSHcess', 'value' => set_value('EditCustomSHcess'), 'id' => 'EditCustomSHcess', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();'); + echo form_input($data); + ?> +
+
+
+
+ 'EditAfterCustomSHcess', 'value' => set_value('EditAfterCustomSHcess'), 'id' => 'EditAfterCustomSHcess', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+
+
+
+
+ Subtotal (E) +
+
+ +
+
+
+ 'EditSubtotal', 'value' => set_value('EditSubtotal'), 'id' => 'EditSubtotal', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+ + + + + + +
+
+ + IGST on (E): (F) +
+
+
+ 'EditIgstInt ', 'value' => set_value('EditIgstInt', 0), 'id' => 'EditIgstInt', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditCalculateIgst()'); + echo form_input($data); + ?> +
+
+
+
+ 'EditAfterIgstInt', 'value' => set_value('EditAfterIgstInt', 0), 'id' => 'EditAfterIgstInt', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+ + + + + + + +
+
+ Total Duty (G) +
+
+
+ 'EditGrossdutypayable ', 'value' => set_value('EditGrossdutypayable'), 'id' => 'EditGrossdutypayable', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+ + + +
+
+ Freight Type +
+ 'Select Freight Type'); + //print_r( $options); + + if (!empty($FreightType)) { + foreach ($FreightType as $SID) : + + + $options[$SID->ConfigValue] = $SID->ConfigValue; + + endforeach; + } + + echo form_dropdown('drpEditFreight', $options, set_value('drpEditFreight'), 'id="drpEditFreight"', 'class="form-control "'); + + ?> +
+
+ +
+ Freight Rate +
+ 'txtEditFreight', 'value' => set_value('txtEditFreight'), 'id' => 'txtEditFreight', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateFreight(1);'); + echo form_input($data); + ?> +
+
+ +
+ Freight Amt +
+ 'txtEditAfterFreight', 'value' => set_value('txtEditAfterFreight'), 'id' => 'txtEditAfterFreight', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ +
+ + +
+
+
+
+
+
+ Duty Impact +
+
+
+ 'EditDutyImpact', 'value' => set_value('EditDutyImpact'), 'id' => 'EditDutyImpact', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+ Quantity +
+ 'EditPurQuantity', 'value' => set_value('EditPurQuantity'), 'id' => 'EditPurQuantity', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();'); + echo form_input($data); + ?> +
+
+ +
+
+ +
+ Custom Duty Expenses +
+
+
+ 'EditCustomDutyExpenses ', 'value' => set_value('EditCustomDutyExpenses'), 'id' => 'EditCustomDutyExpenses', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ +
+
+
+ Clearing Charges +
+
+
+ 'EditClearingCharges', 'value' => set_value('EditClearingCharges'), 'id' => 'EditClearingCharges', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();'); + 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); + ?> +
+
+ + + +
+ + +
+ +
+ +
+ + +
+ + +
+ + + + 'EditItemDescription', 'value' => set_value('EditItemDescription'), 'id' => 'EditItemDescription', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); + echo form_textarea($data); ?> + +
+ + + + + + + -
- - - 'txtTotalDiscount','value' => set_value('txtTotalDiscount',number_format($ExitDiscountedAmt, 2, '.', '')),'id'=>'txtTotalDiscount', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - 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); - ?> + + + + +
+
+ -
- - 'TotalFreight','value' => set_value('TotalFreight',number_format($TotalFreightvalue,2,'.','')),'id'=>'TotalFreight', 'class' => 'form-control num' ,'readonly' => 'true'); - echo form_input($data); - ?> - -
- - - -
- - - -
- -
- - - 'txttotallanding','value' => set_value('txttotallanding',number_format($TotalLanding, 2, '.', '')),'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',number_format($totcustom, 2, '.', '')),'id'=>'txttotalcustom', '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); - ?> -
- - - -
- - - 'txttotalcustomED','value' => set_value('txttotalcustomED',number_format($totcustomED, 2, '.', '')),'id'=>'txttotalcustomED', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalcustomSH','value' => set_value('txttotalcustomSH',number_format($totcustomSH, 2, '.', '')),'id'=>'txttotalcustomSH', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> -
- - - - -
- - - 'txttotalgrossduty','value' => set_value('txttotalgrossduty',number_format($totgrossduty, 2, '.', '')),'id'=>'txttotalgrossduty', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> -
- - - - -
- - 'txtTotalFreight','value' => set_value('txtTotalFreight',number_format($TotalFreightAmt, 2, '.', '')),'id'=>'txtTotalFreight', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> - -
- + $data = array('name' => 'CapitalBasicOrder', 'value' => set_value('CapitalBasicOrder', number_format($ExitTotalBasicOrderValue, 2, '.', '')), 'id' => 'CapitalBasicOrder', 'class' => 'form-control num', 'readonly' => 'true',); + echo form_input($data); + ?> +
+
+ + + 'txtTotalDiscount', 'value' => set_value('txtTotalDiscount', number_format($ExitDiscountedAmt, 2, '.', '')), 'id' => 'txtTotalDiscount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + 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); + ?> +
- 'CapitalToatlOrder','value' => set_value('CapitalToatlOrder',number_format($totalCapitalOrder, 2, '.', '')),'id'=>'CapitalToatlOrder', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> -
-
+
+ + 'TotalOtherAllowances', 'value' => set_value('TotalOtherAllowances', number_format($OtherAmt, 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); + ?> + +
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - entity =='PO DateChanged'){ - $oldValue = date('d-m-Y',strtotime($oldpo->oldValue)); - }else{ - $oldValue = $oldpo->oldValue; - }?> - + + +
+ +
+ + + 'txttotallanding', 'value' => set_value('txttotallanding', number_format($TotalLanding, 2, '.', '')), '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', number_format($totcustom, 2, '.', '')), 'id' => 'txttotalcustom', '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); + ?> +
+ + + +
+ + + 'txttotalcustomED', 'value' => set_value('txttotalcustomED', number_format($totcustomED, 2, '.', '')), 'id' => 'txttotalcustomED', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ +
+ + + 'txttotalcustomSH', 'value' => set_value('txttotalcustomSH', number_format($totcustomSH, 2, '.', '')), 'id' => 'txttotalcustomSH', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + + + +
+ + + 'txttotalgrossduty', 'value' => set_value('txttotalgrossduty', number_format($totgrossduty, 2, '.', '')), 'id' => 'txttotalgrossduty', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + + + +
+ + + 'txtTotalFreight', 'value' => set_value('txtTotalFreight', number_format($TotalFreightAmt, 2, '.', '')), 'id' => 'txtTotalFreight', '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); + ?> +
+
+ + + + + +
+
+
SnoPONOLineItemNoEntityOldValueNewValueUpdatedByUpdateOn
PONO ?>LineItemNos;?>entity?>SupplierName;?>
+ + + + + + + + + + + + - entity =='PO DateChanged'){ - $newValue = date('d-m-Y',strtotime($oldpo->newValue)); - }else{ - $newValue = $oldpo->newValue; - }?> - - - - - - - + + + + + + + + + + + + + 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; + } ?> + + + + + + + + - - -
SnoPONOLineItemNoEntityOldValueNewValueUpdatedByUpdateOnFirstName?>UpdatedOn); - echo $date->format('d-m-Y'); ?>
PONO ?>LineItemNos; ?>entity ?>SupplierName; ?>FirstName ?>UpdatedOn); + echo $date->format('d-m-Y'); ?>
-
-
+ + +
+ + + +
+ 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction', strip_tags($ServiceDescription)), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); + echo form_textarea($data); + ?> +
+ +
+
+ + + + +
+
+ + + + + + + +   Cancel + +   Save as Draft + +   Submit +   Approve + + OK + +   Submit +   OK + +   Submit +   OK + + + -
- 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',strip_tags($ServiceDescription)),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' ); - echo form_textarea($data); - ?> -
- - +
- -
-
- - - - -
-
- - - - +
+
+ + '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"; + } + ?> - - -   Cancel - -   Save as Draft - -   Submit -   Approve - - OK - -   Submit -   OK - -   Submit -   OK - - - +
- - -
-
- - '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"; - } - ?> - - - - - - - + + + + + //highsesssalles=parseFloat($('#EditAfterHighseas').val()); + // customch=parseFloat($('#EditAfterCustomduty').val()); + customch = parseFloat($('#EditAfterCustomduty').val() == '' ? '0.00' : $('#EditAfterCustomduty').val()); + //excisech=parseFloat($('#EditAfterExcisedutyTax').val()); + totcustomsh = landingch + highsesssalles + customch + excisech + exciseedch + exciseshch; + //txtshpercentage=parseFloat($('#EditCustomSHcess').val()); + txtshpercentage = $('#EditCustomSHcess').val() == '' ? '0.00' : $('#EditCustomSHcess').val() + //var totresult=(totcustomsh*txtshpercentage)/100; + var totresult = ; + if (isNaN(totresult)) { + $('#EditAfterCustomSHcess').val(''); + } else { + $('#EditAfterCustomSHcess').val(parseFloat(totresult).toFixed(2)); + } + //EditCalculateaddlExciseDuty(); + EditCalculateIgst() + } + + + function EditCalculateIgst() { + + // var custom=parseFloat($('#EditAfterCustomduty').val()); + // var customsh=parseFloat($('#EditAfterCustomSHcess').val()); + // var customed=parseFloat($('#EditAfterCustomEDcess').val()); + + // var assessble=parseFloat($('#EditAfterAssessable').val()); + + var custom = parseFloat($('#EditAfterCustomduty').val() == '' ? '0.00' : $('#EditAfterCustomduty').val()); + var customsh = parseFloat($('#EditAfterCustomSHcess').val() == '' ? '0.00' : $('#EditAfterCustomSHcess').val()); + var customed = parseFloat($('#EditAfterCustomEDcess').val() == '' ? '0.00' : $('#EditAfterCustomEDcess').val()); + var assessble = parseFloat($('#EditAfterAssessable').val() == '' ? '0.00' : $('#EditAfterAssessable').val()); + + + var tot = ; + //console.log(tot); + //var igstpercentage=parseFloat($('#EditIgst').val()); + var igstpercentage = $('#EditIgstInt').val() == '' ? '0.00' : $('#EditIgstInt').val() + var afterigst = ; + + + if (isNaN(tot)) { + $('#EditSubtotal').val(''); + } else { + $('#EditSubtotal').val(parseFloat(tot).toFixed(2)); + } + + + + if (isNaN(afterigst)) { + $('#EditAfterIgstInt').val(''); + } else { + $('#EditAfterIgstInt').val(parseFloat(afterigst).toFixed(2)); + } + + + var grossexp = custom + customsh + customed + afterigst; + + var txtgrossduty = ; + + ; + if (isNaN(txtgrossduty)) { + $('#EditGrossdutypayable').val(''); + } else { + $('#EditGrossdutypayable').val(parseFloat(txtgrossduty).toFixed(2)); + } + + EditCalculateCtable() + } + + + + + function EditCalculateCtable() { + + var quantity = 0; + var txtbasicinrprice = 0; + var txtpurchaserate = 0; + var txtgrossexp = 0; + var txtcustomdutyexp = 0; + var txtrmc = 0; + var total = 0; + var basicamt = 0; + var qty = parseFloat($('#EditQuantity').val()); + + + var igst = parseFloat($('#EditAfterIgstInt').val()); + var totduty = parseFloat($('#EditGrossdutypayable').val()); + + + + var txtdutyimpact = ; + + // console.log(txtdutyimpact); + + if (isNaN(txtdutyimpact)) { + $('#EditDutyImpact').val(''); + } else { + $('#EditDutyImpact').val(parseFloat(txtdutyimpact).toFixed(2)); + } + + quantity = parseFloat($('#EditPurQuantity').val()); + + var dutyimpact = parseFloat($('#EditDutyImpact').val()); + + + var peruom = ; + + + if (isNaN(peruom)) { + $('#EditCustomDutyExpenses').val(''); + } else { + $('#EditCustomDutyExpenses').val((peruom).toFixed(2)); + } + + + var customdutyexp = $('#EditCustomDutyExpenses').val() == '' ? '0.00' : $('#EditCustomDutyExpenses').val(); + var basicqtyval = $('#EditAfterBasicPriceTax').val() == '' ? '0.00' : $('#EditAfterBasicPriceTax').val(); + var qty = parseFloat($('#EditCPQuantity').val()); + var clearing = $('#EditClearingCharges').val() == '' ? '0.00' : $('#EditClearingCharges').val(); + var basicres = ; + var clear = ; + + //console.log(basicres); + //console.log(clear); + + var basicnett = parseFloat(basicres) + parseFloat(clear) + parseFloat(customdutyexp); + + //console.log(basicnett); + if (isNaN(basicnett)) { + $('#EditNett').val(''); + } else { + $('#EditNett').val((basicnett).toFixed(2)); + } + } + + + + function Calculateloadingcharge() { + //alert(); + $('#AfterHighseas').val(''); + $('#AfterCustomduty').val(''); + $('#AfterExcisedutyTax').val(''); + $('#AfterExcisedutyEDcess').val(''); + $('#AfterExcisedutySHcess').val(''); + $('#AfterCustomEDcess').val(''); + $('#AfterCustomSHcess').val(''); + $('#AfterAdditionalExciseduty').val(''); + $('#Grossdutypayable').val(''); + $('#AvailableModvat').val(''); + $('#Grossexpenses').val(''); + $('#purchaserate').val(''); + $('#CustomDutyExpenses').val(''); + $('#RMCIncludingCustomers').val(''); + + + var txtlanding = 0; + var txtbasicprice = 0; + + //txtlanding=$('#LandingCharge').val() == '' ? '0.00' : $('#LandingCharge').val() + txtlanding = parseFloat($('#LandingCharge').val() == '' ? '0.00' : $('#LandingCharge').val()); + //$('#Rate').val() == '' ? '0.00' : $('#Rate').val() + //txtbasicprice=parseFloat($('#AfterBasicPriceTax').val()); + txtbasicprice = parseFloat($('#AfterBasicPriceTax').val() == '' ? '0.00' : $('#AfterBasicPriceTax').val()); + //var result=(txtlanding*txtbasicprice/100); + var result = ; + var assessble = parseFloat(result) + parseFloat(txtbasicprice); + + + var assessble = ; + //$('#AfterLandingCharge').val(parseFloat(Math.round(result))); + if (isNaN(result)) { + $('#AfterLandingCharge').val(''); + $('#AfterAssessable').val(txtbasicprice.toFixed(2)); + + + } else { + $('#AfterLandingCharge').val(result.toFixed(2)); + //$('#AfterAssessable').val(assessble.toFixed(2)); + } + + if (isNaN(assessble)) { + $('#AfterAssessable').val(txtbasicprice); + + + + } else { + $('#AfterAssessable').val(assessble.toFixed(2)); + + } + + CalculateCustomduty() + } + + + + function CalculateCustomduty() { + + var txtbasic = 0; + var txtcustompercentage = 0; + var txthighse = 0; + var txtlandingch = 0; + var sumcustom = 0; + var txtcustomduty = 0; + + //var accessible=parseFloat($('#AfterAssessable').val()); + var accessible = parseFloat($('#AfterAssessable').val() == '' ? '0.00' : $('#AfterAssessable').val()); + + //var txtcustompercentage=parseFloat($('#Customduty').val()); + var txtcustompercentage = parseFloat($('#Customduty').val() == '' ? '0.00' : $('#Customduty').val()); + txtcustomduty = ; + if (isNaN(txtcustomduty)) { + $('#AfterCustomduty').val(''); + } else { + $('#AfterCustomduty').val(parseFloat(txtcustomduty).toFixed(2)); + } + + CalculateCustomEdcess() + + } + + + + + + + function CalculateCustomEdcess() { + + var txtloading = 0; + var txthighses = 0; + var txtcustomduty1 = 0; + var txtexciseduty = 0; + var txtedexciseduty = 0; + var txtshexcisesess = 0; + var totalval = 0; + var txtedcesspercentage = 0; + //var txtcustomedsess=(totalval*txtedcesspercentage)/100; + var txtcustomedsess = 0; + + + //txtcustomduty1=parseFloat($('#AfterCustomduty').val()); + + txtcustomduty1 = parseFloat($('#AfterCustomduty').val() == '' ? '0.00' : $('#AfterCustomduty').val()); + + // txtedcesspercentage=parseFloat($('#CustomEDcess').val()); + txtedcesspercentage = parseFloat($('#CustomEDcess').val() == '' ? '0.00' : $('#CustomEDcess').val()); + + //var txtcustomedsess=(totalval*txtedcesspercentage)/100; + + txtcustomedsess = ; + if (isNaN(txtcustomedsess)) { + + $('#AfterCustomEDcess').val(''); + } else { + $('#AfterCustomEDcess').val(parseFloat(txtcustomedsess).toFixed(2)); + } + CalculateCustomSHcess(); + + + + } + + + + + function CalculateCustomSHcess() { //alert(); + + var landingch = 0; + + var customch = 0; + + var totcustomsh = 0; + + var txtshpercentage = 0; + + var totresult = 0; + + + //customch=parseFloat($('#AfterCustomduty').val()); + //console.log(customch); + customch = parseFloat($('#AfterCustomduty').val() == '' ? '0.00' : $('#AfterCustomduty').val()); + + //txtshpercentage=parseFloat($('#CustomSHcess').val()); + txtshpercentage = parseFloat($('#CustomSHcess').val() == '' ? '0.00' : $('#CustomSHcess').val()); + //var totresult=(totcustomsh*txtshpercentage)/100; + totresult = ; + if (isNaN(totresult)) { + $('#AfterCustomSHcess').val(''); + } else { + $('#AfterCustomSHcess').val(parseFloat(totresult).toFixed(2)); + } + //CalculateaddlExciseDuty(); + CalculateIgst(); + + } + + + + + + function CalculateIgst() { + var basucprice = parseFloat($('#AfterBasicPriceTax').val()); + //var basucprice=$('#AfterBasicPriceTax').val() == '' ? '0.00' : $('#AfterBasicPriceTax').val(); + + var landing = parseFloat($('#AfterLandingCharge').val()); + //var landing=$('#AfterLandingCharge').val() == '' ? '0.00' : $('#AfterLandingCharge').val(); + + var custom = parseFloat($('#AfterCustomduty').val()); + //var custom=$('#AfterCustomduty').val() == '' ? '0.00' : $('#AfterCustomduty').val(); + + var customsh = parseFloat($('#AfterCustomSHcess').val()); + //var customsh=$('#AfterCustomSHcess').val() == '' ? '0.00' : $('#AfterCustomSHcess').val(); + + var customed = parseFloat($('#AfterCustomEDcess').val()); + //var customed=$('#AfterCustomEDcess').val() == '' ? '0.00' : $('#AfterCustomEDcess').val(); + + var assessble = parseFloat($('#AfterAssessable').val()); + //var assessble=$('#AfterAssessable').val() == '' ? '0.00' : $('#AfterAssessable').val(); + + // var tot=parseFloat(assessble)+parseFloat(custom)+parseFloat(customsh)+ + // parseFloat(customed); + + var tot = ; + var igstpercentage = parseFloat($('#IgstInt').val()); + var afterigst = ; + + + if (isNaN(tot)) { + $('#Subtotal').val(''); + } else { + $('#Subtotal').val(parseFloat(tot).toFixed(2)); + } + + + + if (isNaN(afterigst)) { + $('#AfterIgstInt').val(''); + } else { + $('#AfterIgstInt').val(parseFloat(afterigst).toFixed(2)); + } + + + var grossexp = custom + customsh + customed + afterigst; + + //$('#Grossdutypayable').val(parseFloat(grossexp).toFixed(2)); + + var txtgrossduty = ; + + //console.log(grossexp); + if (isNaN(txtgrossduty)) { + $('#Grossdutypayable').val(''); + } else { + $('#Grossdutypayable').val(parseFloat(txtgrossduty).toFixed(2)); + } + + CalculateCtable(); + + + } + + + + + + function CalculateCtable() { + + var quantity = 0; + var txtbasicinrprice = 0; + var txtpurchaserate = 0; + var txtgrossexp = 0; + var txtcustomdutyexp = 0; + var txtrmc = 0; + var total = 0; + var basicamt = 0; + var qty = parseFloat($('#Quantity').val()); + + + var igst = parseFloat($('#AfterIgstInt').val()); + var totduty = parseFloat($('#Grossdutypayable').val()); + + var txtdutyimpact = ; + + // console.log(txtdutyimpact); + + if (isNaN(txtdutyimpact)) { + $('#DutyImpact').val(''); + } else { + $('#DutyImpact').val(parseFloat(txtdutyimpact).toFixed(2)); + } + + quantity = parseFloat($('#PurQuantity').val()); + + var dutyimpact = parseFloat($('#DutyImpact').val()); + + + var peruom = ; + + + if (isNaN(peruom)) { + $('#CustomDutyExpenses').val(''); + } else { + $('#CustomDutyExpenses').val((peruom).toFixed(2)); + } + + + var customdutyexp = $('#CustomDutyExpenses').val() == '' ? '0.00' : $('#CustomDutyExpenses').val(); + var basicqtyval = $('#AfterBasicPriceTax').val() == '' ? '0.00' : $('#AfterBasicPriceTax').val(); + var qty = parseFloat($('#CPQuantity').val()); + var clearing = $('#ClearingCharges').val() == '' ? '0.00' : $('#ClearingCharges').val(); + var basicres = ; + var clear = ; + + + var basicnett = parseFloat(basicres) + parseFloat(clear) + parseFloat(customdutyexp); + + + if (isNaN(basicnett)) { + $('#Nett').val(''); + } else { + $('#Nett').val((basicnett).toFixed(2)); + } + + } + \ No newline at end of file diff --git a/app/Views/editCostCenter.php b/app/Views/editCostCenter.php deleted file mode 100644 index a314ed39..00000000 --- a/app/Views/editCostCenter.php +++ /dev/null @@ -1,1016 +0,0 @@ -BudgetType; - //print_r($BudgetTypeAdd); -} - -//print_r($BudgetTypeAdd); - -if (!empty($CostMaster)) { - foreach ($CostMaster as $Cost) { - - $CostCenterCode = $Cost->CostCenterCode; - - $CostCenterName = $Cost->CostCenterName; - $ApprovedBy = $Cost->ApprovedBy; - //echo $ApprovedBy; - $FirstName = $Cost->FirstName; - $Designation = $Cost->Designation; - $BudYr = $Cost->BudYear;; - } -} -$optYear = array($BudYr => $BudYr); -if (!empty($FiscalYear)) { - foreach ($FiscalYear as $Fy) { - $FYStart = $Fy->StartYear; - $FYEnd = $Fy->EndYear; - } - //$FYear = $FYStart." - ".$FYEnd ; - -} - -for ($i = 1; $i < 5; $i++) { - - $FYear = $FYStart . " - " . $FYEnd; - $optYear[$FYear] = $FYear; - $FYStart++; - $FYEnd++; -} - -?> - - - - -
- -
-

-
Edit Cost Center
- -

- -
- -
-
- Back -
-
- -
- -
- - - -
- - - 'form-label-left EditCost ', 'name' => 'EditCost', 'id' => 'EditCost'); - - echo form_open(base_url() . 'saveCostCenter/', $attributes); ?> - -
-
-
-
-
- - * - -
- 'CostCode', 'value' => set_value('CostCode', $CostCenterCode), 'id' => 'CostCode', 'class' => 'form-control', 'readonly' => 'true', 'maxlength' => '10'); - echo form_input($data); - ?> -
-
-
- - -
-
- - * -
- 'CostName', 'value' => set_value('CostName', $CostCenterName), 'id' => 'CostName', 'class' => 'form-control', 'required' => 'true', 'style' => 'text-transform:uppercase;', 'maxlength' => '100'); - echo form_input($data); - ?> -
-
-
-
- - * - -
- - - - -
-
- -
-
-
-
-
- -
- 'Select Department'); - //print_r( $options); - - if (!empty($DeptList)) { - foreach ($DeptList as $SID) : - - $opt[$SID->DEPCode] = $SID->DEPCode . ' ' . ' - ' . ' ' . $SID->DepartmentName; - - endforeach; - } - echo form_multiselect('distriList', $opt, set_value('distriList',$opt), 'id="distriList"', 'class="form-control required"', 'required="true"'); - - ?> -
-
-
-
-
-
- -
-
-
-   - - DEPCode] = $SID->DEPCode . ' ' . ' - ' . ' ' . $SID->DepartmentName; - - endforeach; - } - echo form_multiselect('selectDistriList[]', $options, set_value('selectDistriList[]',$options), 'id="selectDistriList"', 'size="10"'); - - ?> -
-
-
- -
- IsApproved
-
- - -
-
-
-
-
-
- - - -   Add Budget - - - -
-
- - -
-

- -
-
-
- - - - - - - - - - - BudgetType; - // print_r($BudgetTypeAdd); - ?> - - - - - - - - - - - - - - - - - - - -
Budget TypeBudget YearRemarksAction
BudgetType ?>BudgetYear ?>BudgetAmount ?>Remarks ?> -     - - -
- - - -
-
-
- -
- - - -
- -
-
-
-
- -
- - - - \ No newline at end of file diff --git a/app/Views/editImportAmendPO.php b/app/Views/editImportAmendPO.php index a6e31def..ac3e087d 100644 --- a/app/Views/editImportAmendPO.php +++ b/app/Views/editImportAmendPO.php @@ -1,82 +1,71 @@ Currency_Code.' '.' - '.' '.$Detail->Country_and_Currency; - $CurCode = $Detail->Currency_Code; - +foreach ($CurrencyDetail as $Detail) { + $Cur = $Detail->Currency_Code . ' ' . ' - ' . ' ' . $Detail->Country_and_Currency; + $CurCode = $Detail->Currency_Code; } -if(!empty($AvlBudAmt)) -{ - - $AvlAmount = $AvlBudAmt; - +if (!empty($AvlBudAmt)) { + + $AvlAmount = $AvlBudAmt; } //echo $AvlBudAmt; - -foreach ($PaymentTerms as $TER) -{ - $Terms=$TER->PaymentTerms; + +foreach ($PaymentTerms as $TER) { + $Terms = $TER->PaymentTerms; } -$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); +$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $CurrentDate = $dt->format('d-m-Y'); $MaxPoDate = ''; -if(!empty($MaxPODate)) -{ - foreach ($MaxPODate as $date) - { - $MaxPoDate = $date->PODate; +if (!empty($MaxPODate)) { + foreach ($MaxPODate as $date) { + $MaxPoDate = $date->PODate; } } - -$INR=''; -$INRSYM=''; -if(!empty($INRSYMBOL)) -{ - foreach ($INRSYMBOL as $INR) - { - $INRSYM=$INR->Currency_Code; - $INR=$INR->FontCode2000; - } + +$INR = ''; +$INRSYM = ''; +if (!empty($INRSYMBOL)) { + foreach ($INRSYMBOL as $INR) { + $INRSYM = $INR->Currency_Code; + $INR = $INR->FontCode2000; + } } //echo $INR; $CompanyAddress = ''; -if(!empty($CompanyDetails)) -{ - foreach ($CompanyDetails as $Req) - { +if (!empty($CompanyDetails)) { + foreach ($CompanyDetails as $Req) { $CompanyAddress = $Req->Address; } } @@ -87,106 +76,100 @@ $SupId = ''; $SupName = ''; $Address = ''; $PODate = ''; -$Deliverydt =''; -$DeliveryAddress =''; -$PONOStatus=''; +$Deliverydt = ''; +$DeliveryAddress = ''; +$PONOStatus = ''; $PONO = ''; $ServiceDescription = ''; -$TotalLanding=0.00; -$tothighseas=0.00; -$totcustom=0.00; -$totexciseduty=0.00; -$totexcisedutyED=0.00; -$totexciseSH=0.00; -$totcustomED=0.00; -$totcustomSH=0.00; -$totaddtnlexcise=0.00; -$totgrossduty=0.00; -$totavlmodvat=0.00; -$totgrossexpense=0.00; -$totordervalue=0.00; -$ExchangeRate=0.00; -$totorder=0.00; -$totfreight=0.00; +$TotalLanding = 0.00; +$tothighseas = 0.00; +$totcustom = 0.00; +$totexciseduty = 0.00; +$totexcisedutyED = 0.00; +$totexciseSH = 0.00; +$totcustomED = 0.00; +$totcustomSH = 0.00; +$totaddtnlexcise = 0.00; +$totgrossduty = 0.00; +$totavlmodvat = 0.00; +$totgrossexpense = 0.00; +$totordervalue = 0.00; +$ExchangeRate = 0.00; +$totorder = 0.00; +$totfreight = 0.00; //$ExchangeRate -$ExchangeRateCalculatedon=''; -$StatusName=''; +$ExchangeRateCalculatedon = ''; +$StatusName = ''; $Reqon = ''; -$Requestedby=''; -$RequesterName=''; +$Requestedby = ''; +$RequesterName = ''; $BudgetType = ''; $PrePOFile = ''; -if(!empty($POMaster)) -{ - foreach ($POMaster as $Req) - { +if (!empty($POMaster)) { + foreach ($POMaster as $Req) { $SupId = $Req->SupplierID; $SupName = $Req->SupplierName; - $Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ; - + $Address = $Req->MSME ? "MSME : " . $Req->MSME . "\n" . $Req->Address : $Req->Address; + $Pdt = new DateTime($Req->PODate); $PODate = $Pdt->format('d-m-Y'); - + $Ddt = new DateTime($Req->DeliveryDate); $Deliverydt = $Ddt->format('d-m-Y'); - - $DeliveryAddress =$Req->DeliveryAddress; + + $DeliveryAddress = $Req->DeliveryAddress; $PONOStatus = $Req->StatusCode; - $PONO = $Req->PONO; - $ServiceDescription = $Req->ServiceDescription; - $ExchangeRate=number_format(($Req->ExchangeRate),2); + $PONO = $Req->PONO; + $ServiceDescription = $Req->ServiceDescription; + $ExchangeRate = number_format(($Req->ExchangeRate), 2); $EDt = new DateTime($Req->ExchangeRateCalculatedon); $ExchangeRateCalculatedon = $EDt->format('d-m-Y'); - - // $ExchangeRateCalculatedon=$Req->ExchangeRateCalculatedon; - $PaymentTerms=$Req->PaymentTerms; + + // $ExchangeRateCalculatedon=$Req->ExchangeRateCalculatedon; + $PaymentTerms = $Req->PaymentTerms; // $PayableAT=$Req->PayableAT; // $PaymentDays=$Req->PaymentDays; - $StatusName=$Req->StatusName; + $StatusName = $Req->StatusName; - $Import_DispatchDetails=$Req->Import_DispatchDetails; - $Import_PlaceofOrgin=$Req->Import_PlaceofOrgin; - $DeliverySchedule=$Req->DeliverySchedule; - $ServiceDescription=$Req->ServiceDescription; - $DeliveryOption=$Req->DeliveryOption; - $Orderedsum=$Req->TotalOrderValue; - $Shipmentmode=$Req->Mode_Of_Shipment; - $SupplierRef=$Req->Supplier_Reference; - $SupOfferno=$Req->Supplier_Offer_No; - $Otherref=$Req->Other_Reference; + $Import_DispatchDetails = $Req->Import_DispatchDetails; + $Import_PlaceofOrgin = $Req->Import_PlaceofOrgin; + $DeliverySchedule = $Req->DeliverySchedule; + $ServiceDescription = $Req->ServiceDescription; + $DeliveryOption = $Req->DeliveryOption; + $Orderedsum = $Req->TotalOrderValue; + $Shipmentmode = $Req->Mode_Of_Shipment; + $SupplierRef = $Req->Supplier_Reference; + $SupOfferno = $Req->Supplier_Offer_No; + $Otherref = $Req->Other_Reference; - $Otherpay=$Req->PaymentOtherDescription; + $Otherpay = $Req->PaymentOtherDescription; - $Insurance=$Req->InsuranceStatus; - $InsuranceNumber=$Req->InsuranceNumber; - $Importoption=$Req->POSubType; - $InsuranceStatus=$Req->InsuranceStatus; + $Insurance = $Req->InsuranceStatus; + $InsuranceNumber = $Req->InsuranceNumber; + $Importoption = $Req->POSubType; + $InsuranceStatus = $Req->InsuranceStatus; $BudgetType = $Req->BudgetType; $PrePOFile = $Req->POFile; - - } } //$AvilableBudget=0; //echo $InsuranceStatus; -$SavedSum=$Orderedsum*$ExchangeRate; +$SavedSum = $Orderedsum * $ExchangeRate; //echo $SavedSum; -$AvilableBudget=$SavedSum+$AvlAmount; +$AvilableBudget = $SavedSum + $AvlAmount; //echo $AvilableBudget; -if(!empty($RequistionDetails)) -{ +if (!empty($RequistionDetails)) { - foreach ($RequistionDetails as $ReqDet) - { + foreach ($RequistionDetails as $ReqDet) { // $Reqon=$ReqDet->ReqDate; - $Reqonn=new DateTime($ReqDet->ReqDate); - $Reqon=$Reqonn->format('Y-m-d'); - $Requestedby=$ReqDet->Requestedby; - $RequesterName=$ReqDet->FirstName; + $Reqonn = new DateTime($ReqDet->ReqDate); + $Reqon = $Reqonn->format('Y-m-d'); + $Requestedby = $ReqDet->Requestedby; + $RequesterName = $ReqDet->FirstName; //$Status=$ReqDet->Status; } } @@ -201,2645 +184,2536 @@ if(!empty($RequistionDetails)) ?> - + + tinymce.init({ + selector: "textarea#edittxtInstruction", + menubar: false, + statusbar: false, + toolbar: false + }); +
-
-
- 'form-label-left ImportPO ','name' => 'ImportPO','id' => 'ImportPO','enctype' => 'multipart/form-data'); - - echo form_open(base_url().'/purchaseorder/addPO/',$attributes); ?> - - - - -
-
-
-

Amended Import Purchase Order-

- Back -
- + +
+
+
+

Amended Import Purchase Order-

+ Back +
+ -
-
-
-
-
- - '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"' , 'height="400px"' ); - ?> -
-
- -
- - 'POType','value' => set_value('POType',IMPORT),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true'); - echo form_input($data); - ?> +
+
+
+
+
+ + '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"', 'height="400px"'); + ?> +
+
+ +
+ + 'POType', 'value' => set_value('POType', IMPORT), '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'),'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'); + + ?> +
+
+ +
+ 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); + echo Form_textarea($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'),'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'); - - ?> -
-
- -
- 'SupAddress','value' => set_value('SupAddress',$Address),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true','rows' => '3', 'cols' => '40'); - echo Form_textarea($data);?> -
-
-
-
-
-
- - - $Cur); +
+
+
+ - if(!empty($Currency)) - { - foreach ($Currency as $CUR): - $options[$CUR->Currency_Code] = $CUR->Currency_Code.' '.' - '.' '.$CUR->Country_and_Currency; - endforeach; - } - - echo form_dropdown('currencytype', $options,set_value('currencytype'),'id="currencytype"' ,'required="true"' ,'class="form-control select2');?> + $Cur); -
-
- Select Delivery By*
- - + if (!empty($Currency)) { + foreach ($Currency as $CUR) : + $options[$CUR->Currency_Code] = $CUR->Currency_Code . ' ' . ' - ' . ' ' . $CUR->Country_and_Currency; + endforeach; + } -
- "DateRange", "id"=>"Date", "value"=>"2", 'checked'=>'checked')); ?>     - "DateRange", "id"=>"Schedule", "value"=>"1")); ?> -
+ echo form_dropdown('currencytype', $options, set_value('currencytype'), 'id="currencytype"', 'required="true"', 'class="form-control select2'); ?> -
- + -
- - - - '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'); + '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); - ?> -
-
-
-
-
-
-
- Check Today's Foreign Exchange value (Click here) -
-
- -
- 'Exchangerateon','value' => set_value('Exchangerateon',$ExchangeRateCalculatedon),'id'=>'Exchangerateon', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;'); - echo form_input($data); - ?> -
-
-
- + ?> - +
+
+
'ExchangeRate','value' => set_value('ExchangeRate',$ExchangeRate),'id'=>'ExchangeRate', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'USRate()'); + $data = array('name' => 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + ?> +
+
+
+
+
+
+
+ Check Today's Foreign Exchange value (Click here) +
+
+ +
+ 'Exchangerateon', 'value' => set_value('Exchangerateon', $ExchangeRateCalculatedon), 'id' => 'Exchangerateon', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); echo form_input($data); ?> -
-
-
- -
+
+
+
+ + + +
+ 'ExchangeRate', 'value' => set_value('ExchangeRate', $ExchangeRate), 'id' => 'ExchangeRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'USRate()'); + echo form_input($data); + ?> +
+
+
+ +
+ 'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', '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' ,'required' => 'true', 'onkeypress'=>'return false;'); - echo form_input($data); - ?> -
-
-
- -
- - 'addmodeofshipment','value' => set_value('addmodeofshipment',$Shipmentmode),'id'=>'addmodeofshipment', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
- -
- - 'amendsupplierreference','value' => set_value('amendsupplierreference',$SupplierRef),'id'=>'amendsupplierreference', 'class' => 'form-control','maxlength'=>'40'); - echo form_input($data); - ?> -
-
-
- -
- - 'amendsupplierofferno','value' => set_value('amendsupplierofferno',$SupOfferno),'id'=>'amendsupplierofferno', 'class' => 'form-control'); - echo form_input($data); - ?> +
-
-
-
-
- -
- - 'amendotherreference','value' => set_value('amendotherreference',$Otherref),'id'=>'amendotherreference', 'class' => 'form-control'); - echo form_input($data); - ?> +
+
+
+ +
+ 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?> +
+
+
+ +
+ + 'addmodeofshipment', 'value' => set_value('addmodeofshipment', $Shipmentmode), 'id' => 'addmodeofshipment', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+ +
+ + 'amendsupplierreference', 'value' => set_value('amendsupplierreference', $SupplierRef), 'id' => 'amendsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); + echo form_input($data); + ?> +
+
+
+ +
+ + 'amendsupplierofferno', 'value' => set_value('amendsupplierofferno', $SupOfferno), 'id' => 'amendsupplierofferno', 'class' => 'form-control'); + echo form_input($data); + ?> +
-
- - - 'Select Import Option'); - if(!empty($PoTypeOptions)) - { - foreach ($PoTypeOptions as $payment): - - if($Importoption==$payment->ConfigValue) - { - - $options2[$payment->ConfigValue] = $payment->ConfigValue; - } - - endforeach; - foreach ($PoTypeOptions as $payment): - - if($Importoption!=$payment->ConfigValue) - { - - $options2[$payment->ConfigValue] = $payment->ConfigValue; - } - endforeach; - } - - echo form_dropdown('Importoption', $options2,set_value('Importoption'),'id="Importoption"' ,'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'); ?> - -
-
-
-
-
-
- - - - - + 'amendotherreference', 'value' => set_value('amendotherreference', $Otherref), 'id' => 'amendotherreference', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+ - 'Select Import Option'); + if (!empty($PoTypeOptions)) { + foreach ($PoTypeOptions as $payment) : - if($Insurance==1) - { - $opt1='YES'; - $opt2='NO'; - } - else - { - $opt1='NO'; - $opt2='YES'; - } + if ($Importoption == $payment->ConfigValue) { - $data = array('name' => 'Insurance','Insurance' => set_value('Insurance',$opt1),'id'=>'Insurance', 'class' => 'form-control' ,'required' => 'true', 'readonly'=>true); - echo form_input($data); - ?> - -
- -
- - -
-
+ endforeach; + foreach ($PoTypeOptions as $payment) : + + if ($Importoption != $payment->ConfigValue) { + + $options2[$payment->ConfigValue] = $payment->ConfigValue; + } + endforeach; + } + + echo form_dropdown('Importoption', $options2, set_value('Importoption'), 'id="Importoption"', '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'); ?> + +
+
-
- -
- -
-
- - - - +
+
+
+ - + -
+
+
+ + + + + + + + + +
- - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + + " id="" value="" /> --> + ?> + + + + + + + + + + + - - - - - - - + - - + + + + + + + - - + + - - + + + + - - - - + + + + - - - - + + - - + + + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - - - + + + + - - - - + + - + + + - - - - + + - - + + - - + + - + + - + - + - - - + + - + + + - - + - + - + - + - + - + - + - + - + - + - - + - + + - + - + - - + - - + + + + - - 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; - $totgrossduty=$totgrossduty+$record->Grossdutypayable; - $totavlmodvat=$totavlmodvat+$record->AvailableModvat; - $totgrossexpense=$totgrossexpense+$record->Grossexpensesduetocustomduty; - $ExchangeRate=$record->ExchangeRate; - $totorder=$totorder+$record->BasicValue; - $totfreight=$totfreight+$record->AfterFreightValue; - //alert($totorder); + AssessableValue; - $totSubtotal=$totSubtotal+$record->SubTotal; - $totigst=$totigst+$record->AfterIGST; - + // if($PONOStatus == PO_DRAFT) + // { + ?> + - - -
SNoRequisition NoItem NameQuantityUOMRateBasic AmountAction
ReqNo ?>MaterialName?>Quantity ?>UOM ?>Rate ?>BasicValue ?>Action
ReqNo ?>MaterialName ?>Quantity ?>UOM ?>Rate ?>BasicValue ?>     - - - -
    + + + +
-
- -
- -
-
- - - '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); - ?> -
- - -
- - - '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); - ?> -
- - -
- - - '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); - ?> -
- -
- - - 'txttotalgrossduty','value' => set_value('txttotalgrossduty',$totgrossduty),'id'=>'txttotalgrossduty', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> -
- - - - -
- 'txtTotalFreight','value' => set_value('txtTotalFreight',$totfreight),'id'=>'txtTotalFreight', 'class' => 'form-control' ,'required' => 'true','readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> -
- - - -> -
- 'txtToatlOrder','value' => set_value('txtToatlOrder',$totorder),'id'=>'txtToatlOrder', 'class' => 'form-control' ,'required' => 'true','readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> -
-
- - > - - - -
-
- 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',strip_tags($ServiceDescription)),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' ); - echo form_textarea($data); - ?> -
-
-
- -

- - - - - - - - - - - - - - - - -   Cancel -   Submit - - - -
-
- -
-
- -
-
- - '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"; - } - ?> - -
-
- -
+ + $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; + $totgrossduty = $totgrossduty + $record->Grossdutypayable; + $totavlmodvat = $totavlmodvat + $record->AvailableModvat; + $totgrossexpense = $totgrossexpense + $record->Grossexpensesduetocustomduty; + $ExchangeRate = $record->ExchangeRate; + $totorder = $totorder + $record->BasicValue; + $totfreight = $totfreight + $record->AfterFreightValue; + //alert($totorder); + + + $totassesable = $totassesable + $record->AssessableValue; + $totSubtotal = $totSubtotal + $record->SubTotal; + $totigst = $totigst + $record->AfterIGST; + } + $Rowcount = $index; + ?> + + + +
+ +
+ +
+
+ + + '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); + ?> +
+ + +
+ + + '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); + ?> +
+ + +
+ + + '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); + ?> +
+ +
+ + + 'txttotalgrossduty', 'value' => set_value('txttotalgrossduty', $totgrossduty), 'id' => 'txttotalgrossduty', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + + + +
+ 'txtTotalFreight', 'value' => set_value('txtTotalFreight', $totfreight), 'id' => 'txtTotalFreight', 'class' => 'form-control', 'required' => 'true', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + + + > +
+ 'txtToatlOrder', 'value' => set_value('txtToatlOrder', $totorder), 'id' => 'txtToatlOrder', 'class' => 'form-control', 'required' => 'true', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+
+ + > + + + +
+
+ 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction', strip_tags($ServiceDescription)), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); + echo form_textarea($data); + ?> +
+
+
+ +

+ + + + + + + + + + + + + + + + +   Cancel +   Submit + + + +
+
+ +
+
+ +
+
+ + '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"; + } + ?> + + + + + - \ No newline at end of file + $(function() { + //$("#revenueTax").DataTable(); + $('#ImportTax').DataTable({ + "paging": false, + "lengthChange": true, + "searching": false, + "ordering": false, + // "info": true, + "autoWidth": true + + }); + }); + + var Detail = ; + //console.log(Detail); + + $.each(Detail, function(index, value) { + $("#PaymentTerms").append($('').val(value.ConfigValue).html(value.ConfigValue)); + + + + }); + + + + $("#PaymentTerms").change(function() { + + if ($('#PaymentTerms').val().trim() == 'PT08') + + { + + $('#otheroptiondiv').show(); + } else { + $('#otheroptiondiv').hide(); + } + }); + + + + + $('#drpamendFreight').change(function() { + + //alert(); + var FreightType = $('#drpamendFreight').val(); + if (FreightType == "PER TRIP") { + + $('#AmendTripsValue').show(); + } else { + + $('#AmendTripsValue').hide(); + } + + + + if ($('#EditRate').val() != '' && $('#EditMaterialCode').val() != "0") { + selValue = $("#drpamendFreight").val(); + $('#AmendtxtFreight').val(''); + $('#edittxtAfterFreight').val(''); + + if (selValue == NilType) { + + $('#AmendtxtFreight').attr('readonly', 'true'); + $('#AmendtxtFreight').val('0.00'); + + } else { + $('#AmendtxtFreight').removeAttr('readonly', 'true'); + $('#AmendtxtFreight').val(''); + } + } else { + alert('Please Select MaterialCode and Rate Field Value'); + $('#drpamendFreight').val("0"); + $('#EditRate').focus(); + } + calculateFreight(); + + }); + + + + + + function calculateFreight() { + + //alert('af'); + if ($('#EditMaterialCode').val() == '') { + alert('Please Select the Material Code'); + $('#EditMaterialCode').focus(); + $('#edittxtFreight').val(''); + return false; + } else if ($('#EditRate').val() == '') { + alert('Please Enter the Rate value'); + $('#EditRate').focus(); + $('#AmendtxtFreight').val(''); + return false; + } else { + var basicValue = parseFloat($('#EditINRBasicvalue').val()); + var FreightType = $("#drpamendFreight").val(); + if (FreightType == "0") { + alert('Please select Freight Type'); + $('#AmendtxtFreight').val(''); + $("#drpamendFreight").focus(); + } else if ($('#AmendtxtFreight').val() != "0" && $('#AmendtxtFreight').val() != '') { + var FreightValue = parseFloat($('#AmendtxtFreight').val()); + var UOM = parseFloat($('#EditUOM').val()); + var Quantity = parseFloat($('#EditQuantity').val()); + //alert(FreightType); + var AfterFreight = 0.0; + if (FreightType == PercentageType) { + AfterFreight = ; + } else if (FreightType == NilType) { + AfterFreight = 0.0; + } else if (FreightType == '') { + AfterFreight = ; + } else if (FreightType == '') { + AfterFreight = ; + } else if (FreightType == '') { + if ($('#AmendNOOfTrips').val() == '') { + alert('Please Enter No of Trip'); + + $("#AmendNOOfTrips").focus(); + $('#AmendtxtFreight').val(0) + AfterFreight = 0; + $('#AmendtxtAfterFreight').val("0.00"); + return false; + } else { + var noOftrip = $("#AmendNOOfTrips").val(); + AfterFreight = ; + AfterFreight = parseFloat(AfterFreight * noOftrip).toFixed(2); + } + } else { + AfterFreight = $("#AmendtxtFreight").val(); + } + var AfterFreightval = parseFloat(AfterFreight).toFixed(2); + + $('#AmendtxtAfterFreight').val(AfterFreightval); + } else { + $('#AmendtxtAfterFreight').val("0.00"); + } + + } + // calculateEditTotalValue(); + + + } + \ No newline at end of file diff --git a/app/Views/editOld.php b/app/Views/editOld.php index a0d049fd..10089914 100644 --- a/app/Views/editOld.php +++ b/app/Views/editOld.php @@ -41,17 +41,16 @@ if(!empty($EmpList))
-

-
Edit User
- -

- -
+

+
Edit User Details
+

+ +
-
- Back -
+
@@ -239,9 +238,8 @@ if(!empty($EmpList)) - + -
diff --git a/app/Views/editRawmaterial.php b/app/Views/editRawmaterial.php index b3099f87..cd94a13e 100644 --- a/app/Views/editRawmaterial.php +++ b/app/Views/editRawmaterial.php @@ -104,16 +104,22 @@ if ($total <= $reorder) {

-
Edit Material -
+

+
+

+
Edit Material - Details
+

+ +

-
- Back -
-
+ +
@@ -142,12 +148,30 @@ if ($total <= $reorder) {
-
- + +
+
+ + * + +
@@ -310,6 +334,7 @@ if ($total <= $reorder) { $("#UOM").select2(); + $("#MaterialType").select2(); /** ---- auto search code -------- */ $('#MaterialCategory').autocomplete({ @@ -318,7 +343,7 @@ if ($total <= $reorder) { $('#MaterialCategory').autocomplete("option", "minLength", 0); }, - serviceUrl: "rawmaterialdetails/autocomplete", + serviceUrl: "rawmaterialdetailsautocomplete", onSelect: function(suggestion) { var data = suggestion.ConfigValue; diff --git a/app/Views/editRevenueAmendPO.php b/app/Views/editRevenueAmendPO.php index 1ea8d0fd..093c00d3 100644 --- a/app/Views/editRevenueAmendPO.php +++ b/app/Views/editRevenueAmendPO.php @@ -900,6 +900,10 @@ if (!empty($INRSYMBOL)) { text-align: right; } + .btn-container .btn { + margin-left: 10px; + } + .header-container { display: flex; justify-content: space-between; @@ -938,14 +942,14 @@ if (!empty($INRSYMBOL)) { echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
-
+

Amendment Revenue Purchase Order-

- Back +
@@ -1114,7 +1118,7 @@ if (!empty($INRSYMBOL)) {
- +
- + @@ -1193,7 +1197,7 @@ if (!empty($INRSYMBOL)) {
- + 'Yes', '0' => 'No'); echo form_dropdown('insurancestatus', $optionsnew, set_value('insurancestatus'), 'id="insurancestatus"', 'required="true"', 'class="form-control select2', 'readonly ="true"'); @@ -1209,7 +1213,7 @@ if (!empty($INRSYMBOL)) {
- +
- - - - - - +
+ + + + + + + - -   Submit - - - + +   Submit + +
@@ -2038,12 +2040,28 @@ if (!empty($INRSYMBOL)) {
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"; + } + ?>
@@ -2567,8 +2585,8 @@ if (!empty($INRSYMBOL)) { $('#Scheduleby').val(''); - }); - -
-
- - - - -
+ + \ No newline at end of file diff --git a/app/Views/editServiceAmendPO.php b/app/Views/editServiceAmendPO.php index 7361c782..1b00e674 100644 --- a/app/Views/editServiceAmendPO.php +++ b/app/Views/editServiceAmendPO.php @@ -58,7 +58,7 @@ if (!empty($POMaster)) { $SupId = $Req->SupplierID; $SupName = $Req->SupplierName; - $Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ; + $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; @@ -86,7 +86,6 @@ if (!empty($POMaster)) { $DescriptionOfPo = $Req->Description_Of_Service; $BudgetType = $Req->BudgetType; $PrePOFile = $Req->POFile; - } } @@ -253,11 +252,12 @@ foreach ($PaymentTerms as $TER) { $.each(y, function(idx, obj) { if (obj.SupplierID === id) { - if (obj.MSME) { - $("#SupAddress").val("MSME :" + obj.MSME + "\n" + obj.Address); - } else { - $("#SupAddress").val(obj.Address); - } $("#PaymentTerms").val(obj.PaymentID); + if (obj.MSME) { + $("#SupAddress").val("MSME :" + obj.MSME + "\n" + obj.Address); + } else { + $("#SupAddress").val(obj.Address); + } + $("#PaymentTerms").val(obj.PaymentID); @@ -405,13 +405,16 @@ foreach ($PaymentTerms as $TER) { } var d = $('#drpSupplier').val(); $.ajax({ - url:"VerifyWithSupplierForPendingPO", - type: 'POST', - data: {supplierid : drpSupplier, materialcode: id }, - success: function(response) { - if(response) alert(response); - } - }); + url: "VerifyWithSupplierForPendingPO", + type: 'POST', + data: { + supplierid: drpSupplier, + materialcode: id + }, + success: function(response) { + if (response) alert(response); + } + }); } else { alert('Please select the MaterialCode'); return false; @@ -442,16 +445,19 @@ foreach ($PaymentTerms as $TER) { } }); } - + var d = $('#drpSupplier').val(); $.ajax({ - url:"VerifyWithSupplierForPendingPO", - type: 'POST', - data: {supplierid : d, materialcode: id }, - success: function(response) { - if(response) alert(response); - } - }); + url: "VerifyWithSupplierForPendingPO", + type: 'POST', + data: { + supplierid: d, + materialcode: id + }, + success: function(response) { + if (response) alert(response); + } + }); } else { alert('Please select the MaterialCode'); return false; @@ -644,6 +650,7 @@ foreach ($PaymentTerms as $TER) { .num { text-align: right; } + .header-container { display: flex; justify-content: space-between; @@ -656,325 +663,331 @@ foreach ($PaymentTerms as $TER) { text-align: center; margin: 0; } - .centered { - display: flex; - /* justify-content: center; */ - align-items: center; - height: 10vh; - } - .centered label, .centered input { - margin: 0 5px; - } - .mandatory { color:red;text-align:right;background-color: white;} + + .centered { + display: flex; + /* justify-content: center; */ + align-items: center; + height: 10vh; + } + + .centered label, + .centered input { + margin: 0 5px; + } + + .mandatory { + color: red; + text-align: right; + background-color: white; + }
'form-label-left ServicePO ', 'name' => 'ServicePO', 'id' => 'ServicePO','enctype' => 'multipart/form-data'); + $attributes = array('class' => 'form-label-left ServicePO ', 'name' => 'ServicePO', 'id' => 'ServicePO', 'enctype' => 'multipart/form-data'); echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
-
+
- -

Edit Service Purchase Order-

- -

Amended Service Purchase Order-

- + +

Amended Service Purchase Order-

+ Back -
+
-
- +
+ + '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"'); + ?> +
+
+ +
+ 'Selected Requisition Numbers'); - if (!empty($ReqList)) { - foreach ($ReqList as $SID) : - $options[$SID->ReqNo] = $SID->ReqNo; + $data = array('name' => 'POType', 'value' => set_value('POType', SERVICE), '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); + ?> +
+
+
+
+
+
+
+ + StatusCode) { + + $optionsWork[$WorkSID->StatusCode] = $WorkSID->StatusName; + } + endforeach; + foreach ($WorkStatus as $SID) : + if ($WrkStatus != $SID->StatusName) { + $optionsWork[$SID->StatusCode] = $SID->StatusName; + } + endforeach; + } + echo form_dropdown('workstatus', $optionsWork, set_value('workstatus'), 'id="workstatus"', 'required="true"', 'class="form-control select2'); + ?> +
+
+ 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); + ?> +
+
+
+ +
+ '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_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"'); + + echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions"', 'required="true"', 'class="form-control select2'); + + ?> -
-
- -
- - 'POType', 'value' => set_value('POType', SERVICE), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
- - 'Select Supplier'); - //print_r( $options); +
+
+ + + SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName ; - endforeach; + if ($Terms == $pay2->PaymentID) { + ?> + + PaymentID] = $pay2->PaymentTerms; } - echo form_dropdown('drpSupplier', $options, set_value('drpSupplier', $SupId), 'id="drpSupplier"', 'required="true"', 'class="form-control select2'); + foreach ($Payment as $pay1) : - ?> + if ($Terms != $pay1->PaymentID) { -
-
- -
- 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> -
-
-
-
-
-
-
- - StatusCode) { - - $optionsWork[$WorkSID->StatusCode] = $WorkSID->StatusName; - } - endforeach; - foreach ($WorkStatus as $SID) : - if ($WrkStatus != $SID->StatusName) { - $optionsWork[$SID->StatusCode] = $SID->StatusName; - } - endforeach; + $optionsPay[$pay1->PaymentID] = $pay1->PaymentTerms; } - echo form_dropdown('workstatus', $optionsWork, set_value('workstatus'), 'id="workstatus"', 'required="true"', 'class="form-control select2'); - ?> -
-
- Select Delivery By*
-
- 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?> - 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?> + endforeach; + } -
-
-
- - - -
- '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); - ?> -
-
-
- -
- '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) { - ?> - - 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'); - ?> + echo form_dropdown('PaymentTerms', $optionsPay, set_value('PaymentTerms'), 'id="PaymentTerms"', 'required="true"', 'class="form-control select2'); + ?>
- +
- -
+ +
- -
+ ?> +
- -
- 'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); - echo form_input($data); - ?> -
-
+ +
+ 'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); + echo form_input($data); + ?> +
+
- - + +
@@ -1000,7 +1013,7 @@ foreach ($PaymentTerms as $TER) {
- +
- * + *
'Item Code'); @@ -1106,7 +1119,7 @@ foreach ($PaymentTerms as $TER) {
- * + *
'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange()'); @@ -1115,7 +1128,7 @@ foreach ($PaymentTerms as $TER) {
- * + *
'EditRate', 'value' => set_value('EditRate'), 'id' => 'EditRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange()'); @@ -1253,15 +1266,15 @@ foreach ($PaymentTerms as $TER) {
'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction', $ServiceMaterialDescription), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); - echo form_textarea($data); - ?> + echo form_textarea($data); + ?>

@@ -1432,7 +1445,7 @@ foreach ($PaymentTerms as $TER) {
-
+
@@ -1487,7 +1500,7 @@ foreach ($PaymentTerms as $TER) {
- * + *
'amenddescofpo', 'value' => set_value('amenddescofpo', $DescriptionOfPo), 'id' => 'amenddescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); @@ -1508,20 +1521,20 @@ foreach ($PaymentTerms as $TER) {


@@ -1535,13 +1548,13 @@ foreach ($PaymentTerms as $TER) {

'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]; @@ -1551,7 +1564,7 @@ foreach ($PaymentTerms as $TER) { } else { echo "Status not provided"; } - ?> + ?>
@@ -2068,7 +2081,7 @@ foreach ($PaymentTerms as $TER) { else if (ExceedBudget($('#txtEditBasicValue').val(), $('#EditAvlBudAmt').val()) == false) { $('#EditRate').focus(); return false; - } else { + } else { return true; } diff --git a/app/Views/editasset.php b/app/Views/editasset.php index 7283aa07..bc2facae 100644 --- a/app/Views/editasset.php +++ b/app/Views/editasset.php @@ -103,13 +103,14 @@ if(!empty($assetList)) ?>
-
-

- -

-

-
- +
+

+
Details
+

+ +

Back diff --git a/app/Views/editconfig.php b/app/Views/editconfig.php index 19262af6..9f737bab 100644 --- a/app/Views/editconfig.php +++ b/app/Views/editconfig.php @@ -22,14 +22,16 @@ if (!empty($master)) {
-

Edit Config Details

-
+

+
Edit Config Details
+

+ +

-
- Back -
-
+
diff --git a/app/Views/editdepartment.php b/app/Views/editdepartment.php index 24bf9deb..58001612 100644 --- a/app/Views/editdepartment.php +++ b/app/Views/editdepartment.php @@ -93,18 +93,16 @@ if(!empty($department))
-

-
Department Details
- -

- -
+

+
Edit Department - Details
+

+ +

-
- Back -
-
+
diff --git a/app/Views/editimportpo.php b/app/Views/editimportpo.php index 0f13431a..0fce1838 100644 --- a/app/Views/editimportpo.php +++ b/app/Views/editimportpo.php @@ -1,79 +1,69 @@ Currency_Code.' '.' - '.' '.$Detail->Country_and_Currency; + +foreach ($CurrencyDetail as $Detail) { + $Cur = $Detail->Currency_Code . ' ' . ' - ' . ' ' . $Detail->Country_and_Currency; } //echo $Cur; -foreach ($PaymentTerms as $TER) -{ - $Terms=$TER->PaymentTerms; +foreach ($PaymentTerms as $TER) { + $Terms = $TER->PaymentTerms; } //echo $Terms; -$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); +$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $CurrentDate = $dt->format('d-m-Y'); $MaxPoDate = ''; -if(!empty($MaxPODate)) -{ - foreach ($MaxPODate as $date) - { - $MaxPoDate = $date->PODate; +if (!empty($MaxPODate)) { + foreach ($MaxPODate as $date) { + $MaxPoDate = $date->PODate; } } -if(!empty($AvlBudAmt)) -{ - - $AvlAmount = $AvlBudAmt; - +if (!empty($AvlBudAmt)) { + + $AvlAmount = $AvlBudAmt; } //echo $AvlBudAmt;; $CompanyAddress = ''; -if(!empty($CompanyDetails)) -{ - foreach ($CompanyDetails as $Req) - { +if (!empty($CompanyDetails)) { + foreach ($CompanyDetails as $Req) { $CompanyAddress = $Req->Address; } } -$INR=''; -$INRSYM=''; -if(!empty($INRSYMBOL)) -{ - foreach ($INRSYMBOL as $INR) - { - $INRSYM=$INR->Currency_Code; - $INR=$INR->FontCode2000; - } +$INR = ''; +$INRSYM = ''; +if (!empty($INRSYMBOL)) { + foreach ($INRSYMBOL as $INR) { + $INRSYM = $INR->Currency_Code; + $INR = $INR->FontCode2000; + } } //echo $INR; //echo "$CompanyAddress"; - //$Exchangerate=$ExchangeRate; +//$Exchangerate=$ExchangeRate; $index = 0; @@ -81,288 +71,276 @@ $SupId = ''; $SupName = ''; $Address = ''; $PODate = ''; -$Deliverydt =''; -$DeliveryAddress =''; -$PONOStatus=''; +$Deliverydt = ''; +$DeliveryAddress = ''; +$PONOStatus = ''; $PONO = ''; $ServiceDescription = ''; -$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; -$totfreight=0; -$ExchangeRate=0; -$totorder=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; +$totfreight = 0; +$ExchangeRate = 0; +$totorder = 0; -$totassesable=0; -$totSubtotal=0; -$totigst=0; +$totassesable = 0; +$totSubtotal = 0; +$totigst = 0; -$Cur=''; -$Currency_Type=''; -$PayableAT=''; +$Cur = ''; +$Currency_Type = ''; +$PayableAT = ''; //$ExchangeRate -$ExchangeRateCalculatedon=''; -$StatusName=''; -$Import_DispatchDetails=''; -$Import_PlaceofOrgin=''; -$DeliveryOption=''; -$Orderedsum=''; -$PaymentTermsCode=''; -$Shipmentmode=''; -$SupplierRef=''; -$SupOfferno=''; -$Otherref=''; +$ExchangeRateCalculatedon = ''; +$StatusName = ''; +$Import_DispatchDetails = ''; +$Import_PlaceofOrgin = ''; +$DeliveryOption = ''; +$Orderedsum = ''; +$PaymentTermsCode = ''; +$Shipmentmode = ''; +$SupplierRef = ''; +$SupOfferno = ''; +$Otherref = ''; $BudgetType = ''; -if(!empty($POMaster)) -{ - foreach ($POMaster as $Req) - { +if (!empty($POMaster)) { + foreach ($POMaster as $Req) { $SupId = $Req->SupplierID; $SupName = $Req->SupplierName; - $Address = $Req->MSME ? "MSME : ".$Req->MSME."\n".$Req->Address :$Req->Address ; - + $Address = $Req->MSME ? "MSME : " . $Req->MSME . "\n" . $Req->Address : $Req->Address; + $Pdt = new DateTime($Req->PODate); $PODate = $Pdt->format('d-m-Y'); - + $Ddt = new DateTime($Req->DeliveryDate); $Deliverydt = $Ddt->format('d-m-Y'); - - $DeliveryAddress =$Req->DeliveryAddress; + + $DeliveryAddress = $Req->DeliveryAddress; $PONOStatus = $Req->StatusCode; - $PONO = $Req->PONO; - $ServiceDescription = $Req->ServiceDescription; - $ExchangeRate=number_format(($Req->ExchangeRate),2); + $PONO = $Req->PONO; + $ServiceDescription = $Req->ServiceDescription; + $ExchangeRate = number_format(($Req->ExchangeRate), 2); //echo "$ExchangeRate"; $EDt = new DateTime($Req->ExchangeRateCalculatedon); $ExchangeRateCalculatedon = $EDt->format('d-m-Y'); - - $PaymentTerms=$Req->PaymentTerms; + + $PaymentTerms = $Req->PaymentTerms; // $PayableAT=$Req->PayableAT; // $PaymentDays=$Req->PaymentDays; - $StatusName=$Req->StatusName; - $Currency_Type=$Req->CurrencyType; - $parentPO =$Req->ParentPO; - $DeliverySchedule=$Req->DeliverySchedule; - $Import_DispatchDetails=$Req->Import_DispatchDetails; - $Import_PlaceofOrgin=$Req->Import_PlaceofOrgin; - $PaymentTerms=$Req->PaymentTerms; - $DeliveryOption=$Req->DeliveryOption; - $ServiceDescription=$Req->ServiceDescription; - $Orderedsum=$Req->TotalOrderValue; - $PaymentTermsCode=$Req->PaymentOtherDescription; - $Shipmentmode=$Req->Mode_Of_Shipment; - $SupplierRef=$Req->Supplier_Reference; - $SupOfferno=$Req->Supplier_Offer_No; - $Otherref=$Req->Other_Reference; + $StatusName = $Req->StatusName; + $Currency_Type = $Req->CurrencyType; + $parentPO = $Req->ParentPO; + $DeliverySchedule = $Req->DeliverySchedule; + $Import_DispatchDetails = $Req->Import_DispatchDetails; + $Import_PlaceofOrgin = $Req->Import_PlaceofOrgin; + $PaymentTerms = $Req->PaymentTerms; + $DeliveryOption = $Req->DeliveryOption; + $ServiceDescription = $Req->ServiceDescription; + $Orderedsum = $Req->TotalOrderValue; + $PaymentTermsCode = $Req->PaymentOtherDescription; + $Shipmentmode = $Req->Mode_Of_Shipment; + $SupplierRef = $Req->Supplier_Reference; + $SupOfferno = $Req->Supplier_Offer_No; + $Otherref = $Req->Other_Reference; - $Insurance=$Req->InsuranceStatus; - $InsuranceNumber=$Req->InsuranceNumber; - $Importoption=$Req->POSubType; + $Insurance = $Req->InsuranceStatus; + $InsuranceNumber = $Req->InsuranceNumber; + $Importoption = $Req->POSubType; $BudgetType = $Req->BudgetType; $PrePOFile = $Req->POFile; - } } //echo $InsuranceNumber; -$ins=''; -if($Insurance==1) -{ - $ins='YES'; -} -else -{ - $ins='NO'; +$ins = ''; +if ($Insurance == 1) { + $ins = 'YES'; +} else { + $ins = 'NO'; } -$SavedSum=$Orderedsum*$ExchangeRate; +$SavedSum = $Orderedsum * $ExchangeRate; //echo $SavedSum; -$AvilableBudget=$SavedSum+$AvlAmount; +$AvilableBudget = $SavedSum + $AvlAmount; //echo $AvilableBudget; //echo $PaymentTermsCode; -if(!empty($RequistionDetails)) -{ +if (!empty($RequistionDetails)) { - foreach ($RequistionDetails as $ReqDet) - { + foreach ($RequistionDetails as $ReqDet) { // $Reqon=$ReqDet->ReqDate; - $Reqonn=new DateTime($ReqDet->ReqDate); - $Reqon=$Reqonn->format('d-m-Y'); - $Requestedby=$ReqDet->Requestedby; - $RequesterName=$ReqDet->FirstName; + $Reqonn = new DateTime($ReqDet->ReqDate); + $Reqon = $Reqonn->format('d-m-Y'); + $Requestedby = $ReqDet->Requestedby; + $RequesterName = $ReqDet->FirstName; //$Status=$ReqDet->Status; } } -if(!empty($getlogpodtl)) -{ - +if (!empty($getlogpodtl)) { -foreach ($getlogpodtl as $values ) -{ - $update=$values->FirstName; + + foreach ($getlogpodtl as $values) { + $update = $values->FirstName; + } +} else { + $update = []; } -} -else{ - $update= []; - } ?> - +
-
-
- 'form-label-left ImportPO ','name' => 'ImportPO','id' => 'ImportPO','enctype' => 'multipart/form-data'); - - echo form_open(base_url().'/purchaseorder/addPO/',$attributes); ?> - - - - -
-
-
- -

Edit Import Purchase Order-

- -

Amended Import Purchase Order-

- - Back -
- + +
+
+
+ +

Edit Import Purchase Order-

+ +

Amended Import Purchase Order-

+ + Back +
+ -
-
-
-
-
- - 'Selected Requisition Numbers'); - if(!empty($ReqList)) - { - foreach ($ReqList as $SID): - $options[$SID->ReqNo] = $SID->ReqNo ; - // print_r($SID->ReqNo); - // $options[$SID->ReqNo] = $SID->ReqNo ."-". $SID->ReqBy; - //$ReqType = $SID->ReqType; - endforeach; - } +
+
+
+
+
+ + 'Selected Requisition Numbers'); + if (!empty($ReqList)) { + foreach ($ReqList as $SID) : + $options[$SID->ReqNo] = $SID->ReqNo; + // print_r($SID->ReqNo); + // $options[$SID->ReqNo] = $SID->ReqNo ."-". $SID->ReqBy; + //$ReqType = $SID->ReqType; + endforeach; + } //echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' , 'required="true"'); - echo form_multiselect('RequistionNo', $options,set_value('RequistionNo', array()),'id="RequistionNo"' ,'required="true"' , 'height="400px"' ); + echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"', 'height="400px"'); - ?> -
-
- -
- - 'POType','value' => set_value('POType',IMPORT),'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'),'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'); - - ?> - - -
-
- -
- 'SupAddress','value' => set_value('SupAddress',$Address),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true','rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - - - - - ?> -
-
-
-
-
-
-
- - Currency_Code){ - $options1[$Cur->Currency_Code] = $Cur->Currency_Code.' '.' - '.' '.$Cur->Country_and_Currency; - } - endforeach; - - - foreach ($Currency as $Cur): - if($Currency_Type!=$Cur->Currency_Code){ - $options1[$Cur->Currency_Code] = $Cur->Currency_Code.' '.' - '.' '.$Cur->Country_and_Currency; - } - endforeach; - } - - echo form_dropdown('currencytype', $options1,set_value('currencytype',$Currency_Type),'id="currencytype"','class="form-control select2"' , 'required="true"'); - - ?> -
-
- Select Delivery By*
-
- - "DateRange", "id"=>"Date", "value"=>"2", 'checked'=>'checked')); ?>     - "DateRange", "id"=>"Schedule", "value"=>"1")); ?> -
-
- -
- - - '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); - ?> -
-
-
-
-
-
-
- Check Today's Foreign Exchange value (Click here) -
-
- -
- 'Exchangerateon','value' => set_value('Exchangerateon',$ExchangeRateCalculatedon),'id'=>'Exchangerateon', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;'); - echo form_input($data); - ?> -
-
-
- - - -
- 'ExchangeRate','value' => set_value('ExchangeRate',$ExchangeRate),'id'=>'ExchangeRate', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'USRate()'); - echo form_input($data); - ?> -
-
-
-
-
-
-
-
-
- -
- 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;'); - echo form_input($data); - ?>
-
-
- -
- - 'editmodeofshipment','value' => set_value('editmodeofshipment',$Shipmentmode),'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',$SupOfferno),'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 Import Option'); - if(!empty($PoTypeOptions)) - { - foreach ($PoTypeOptions as $payment): +
+ - if($Importoption==$payment->ConfigValue) - { - $options2[$payment->ConfigValue] = $payment->ConfigValue; - } - - endforeach; - foreach ($PoTypeOptions as $payment): - - if($Importoption!=$payment->ConfigValue) - { - - $options2[$payment->ConfigValue] = $payment->ConfigValue; - } + 'Select Supplier'); + //print_r( $options); + if (!empty($Suplist)) { + foreach ($Suplist as $SID) : + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; endforeach; } - echo form_dropdown('Importoption', $options2,set_value('Importoption'),'id="Importoption"' ,'class="form-control"'); ?> + //echo form_dropdown('drpSupplier', $options,set_value('drpSupplier'),'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'); + + ?> + + +
+
+ +
+ 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + + + + + ?> +
+
+
-
- - - PaymentID){ - ?> - - PaymentID] = $pay2->PaymentTerms; - - } - - foreach ($Payment as $pay1): - - if($Terms!=$pay1->PaymentID){ - $optionsPay[$pay1->PaymentID] = $pay1->PaymentTerms; +
+
+
+ + Currency_Code) { + $options1[$Cur->Currency_Code] = $Cur->Currency_Code . ' ' . ' - ' . ' ' . $Cur->Country_and_Currency; + } + endforeach; + + + foreach ($Currency as $Cur) : + if ($Currency_Type != $Cur->Currency_Code) { + $options1[$Cur->Currency_Code] = $Cur->Currency_Code . ' ' . ' - ' . ' ' . $Cur->Country_and_Currency; } endforeach; - } echo form_dropdown('PaymentTerms', $optionsPay,set_value('PaymentTerms'),'id="PaymentTerms"' ,'required="true"' ,'class="form-control select2'); ?> - -
- -
-
-
-
-
- - + echo form_dropdown('currencytype', $options1, set_value('currencytype', $Currency_Type), 'id="currencytype"', 'class="form-control select2"', 'required="true"'); + + ?> +
+
+ Select Delivery By*
+
+ + "DateRange", "id" => "Date", "value" => "2", 'checked' => 'checked')); ?>     + "DateRange", "id" => "Schedule", "value" => "1")); ?> +
+
+ +
+ + + '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); + ?> +
+
+
- -
- - -
-
+
+
+
+ Check Today's Foreign Exchange value (Click here) +
+
+ +
+ 'Exchangerateon', 'value' => set_value('Exchangerateon', $ExchangeRateCalculatedon), 'id' => 'Exchangerateon', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?> +
+
+
+ + + +
+ 'ExchangeRate', 'value' => set_value('ExchangeRate', $ExchangeRate), 'id' => 'ExchangeRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'USRate()'); + echo form_input($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', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?> +
+
+
+ +
- + 'editmodeofshipment', 'value' => set_value('editmodeofshipment', $Shipmentmode), '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); + ?> +
+
+
+ +
- +
+
+
+ +
-
-
- -
- 'Req No'); - //echo form_dropdown('ImportMaterialCode', $options,set_value('ImportMaterialCode'),'id="ImportMaterialCode"' ,'class="form-control required"'); - $RL = array("0"=>'Select Req No'); - if(!empty($RequistionDetails)) - { - foreach ($RequistionDetails as $SID): - $RL[$SID->ReqNo] = $SID->ReqNo.' '.' - '.' '.$SID->DepartmentName; - endforeach; - } - - echo form_dropdown('ReqNo', $RL,set_value('ReqNo'),'id="ReqNo"' ,'class="form-control"'); + 'editotherreference', 'value' => set_value('editotherreference', $Otherref), 'id' => 'editotherreference', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+ + 'Select Import Option'); + if (!empty($PoTypeOptions)) { + foreach ($PoTypeOptions as $payment) : - ?> -
-
+ if ($Importoption == $payment->ConfigValue) { + $options2[$payment->ConfigValue] = $payment->ConfigValue; + } -
- -
- 'ImportDepartmentName','value' => set_value('ImportDepartmentName'),'id'=>'ImportDepartmentName', 'class' => 'form-control' ,'readonly' => 'true'); - $data = array('name' => 'deptName','value' => set_value('deptName'),'id'=>'deptName', 'class' => 'form-control','readonly'=>'true'); - echo form_input($data); - ?> -
-
-
- -
- 'Select Cost Center'); + endforeach; + foreach ($PoTypeOptions as $payment) : - //echo form_dropdown('CostCenter', $options,set_value('CostCenter'),'id="CostCenter"' ,'class="form-control"'); + if ($Importoption != $payment->ConfigValue) { - $data = array('name' => 'CostCenter','value' => set_value('CostCenter'),'id'=>'CostCenter', 'class' => 'form-control' ,'readonly' => 'true'); - echo form_input($data); + $options2[$payment->ConfigValue] = $payment->ConfigValue; + } + endforeach; + } - ?> -
-
-
- -
- 'AvlBudAmt','value' => set_value('AvlBudAmt'),'id'=>'AvlBudAmt', 'class' => 'form-control num' ,'readonly' => 'true'); - echo form_input($data); - ?> -
-
+ echo form_dropdown('Importoption', $options2, set_value('Importoption'), 'id="Importoption"', 'class="form-control"'); ?> +
+
+ + + PaymentID) { + ?> + + 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'); ?> + +
+ +
+
+
+
+
+ + +
+ +
+ + +
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+ + + + + + + + + + + + +
- - - - - - - - - - - - - - - - - - Rate; - - ?> - - - - - - - - - - - - - + + + - - - - -" /> - - - - - - - - - - - - - - - + + " id="" value="ExchangeRate ; ?>" /> + foreach ($POItem as $record) { + $index = $index + 1; + //echo $record->Rate; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AfterLandingCharge + $TotalLanding; - $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; - //$totgrossduty=$totgrossduty+$record->Grossdutypayable; - $totavlmodvat=$totavlmodvat+$record->AvailableModvat; - $totgrossexpense=$totgrossexpense+$record->Grossexpensesduetocustomduty; - $ExchangeRate=$record->ExchangeRate; - //echo $totorder; - $totorder=$totorder+$record->TotalOrderValue; - - //echo $totorder; - - $totfreight=$totfreight+$record->AfterFreightValue; - - $totassesable=$totassesable+$record->AssessableValue; - $totSubtotal=$totSubtotal+$record->SubTotal; - $totigst=$totigst+$record->AfterIGST; - - //echo $totcustomED; - // $totorder=$record->TotalOrderValue; - // //$ServiceDescription=$record->ServiceDescription; - // echo $totorder; - //alert($totorder); - - - } - ?> - - + + + + + + + + + + + + + - - - " id="" value="ReqNo; ?>" /> + + + + " /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AfterLandingCharge + $TotalLanding; + $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; + //$totgrossduty=$totgrossduty+$record->Grossdutypayable; + $totavlmodvat = $totavlmodvat + $record->AvailableModvat; + $totgrossexpense = $totgrossexpense + $record->Grossexpensesduetocustomduty; + $ExchangeRate = $record->ExchangeRate; + //echo $totorder; + $totorder = $totorder + $record->TotalOrderValue; + + //echo $totorder; + + $totfreight = $totfreight + $record->AfterFreightValue; + + $totassesable = $totassesable + $record->AssessableValue; + $totSubtotal = $totSubtotal + $record->SubTotal; + $totigst = $totigst + $record->AfterIGST; + + //echo $totcustomED; + // $totorder=$record->TotalOrderValue; + // //$ServiceDescription=$record->ServiceDescription; + // echo $totorder; + //alert($totorder); + + + } + + ?> + + + + + + + $totassesable = number_format($totassesable, 2, '.', ''); + $totSubtotal = number_format($totSubtotal, 2, '.', ''); + $totigst = number_format($totigst, 2, '.', ''); + } + ?> - -
SNoRequisition NoMaterial CodeDescriptionQuantityUOMRateBasic AmountAction
ReqNo ?>MaterialCode ?>MaterialName?>Quantity ?>UOM ?>Rate ?>BasicValue ?>Action
    - -    
ReqNo ?>MaterialCode ?>MaterialName ?>Quantity ?>UOM ?>Rate ?>BasicValue ?>     + +    
-
- -
- -
-
- - - '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;'); +
+ +
+
+ + + 'txttotallanding', 'value' => set_value('txttotallanding', $TotalLanding), 'id' => 'txttotallanding', '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); - ?> -
- -
- - - '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); - ?> -
- - - - -
- - - '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); - ?> -
- - - - -
- - - 'txttotalgrossduty','value' => set_value('txttotalgrossduty',$totgrossduty),'id'=>'txttotalgrossduty', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> -
- - - - - - -
- 'txtTotalFreight','value' => set_value('txtTotalFreight',$totfreight),'id'=>'txtTotalFreight', 'class' => 'form-control' ,'required' => 'true','readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> -
- - - - -
- 'txtToatlOrder','value' => set_value('txtToatlOrder',$totorder),'id'=>'txtToatlOrder', 'class' => 'form-control' ,'required' => 'true','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); + ?> +
+ +
+ + + '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); + ?> +
+ + + + +
+ + + '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); + ?> +
+ + + + +
+ + + 'txttotalgrossduty', 'value' => set_value('txttotalgrossduty', $totgrossduty), 'id' => 'txttotalgrossduty', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + + + + + +
+ 'txtTotalFreight', 'value' => set_value('txtTotalFreight', $totfreight), 'id' => 'txtTotalFreight', 'class' => 'form-control', 'required' => 'true', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + + + +
+ 'txtToatlOrder', 'value' => set_value('txtToatlOrder', $totorder), 'id' => 'txtToatlOrder', 'class' => 'form-control', 'required' => 'true', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + +
+ > - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - entity =='PO DateChanged'){ - $oldValue = date('d-m-Y',strtotime($oldpo->oldValue)); - }else{ - $oldValue = $oldpo->oldValue; - }?> - + +
+
+
SnoPONOLineItemNoEntityOldValueNewValueUpdatedByUpdateOn
PONO ?>LineItemNos;?>entity?>SupplierName;?>
+ + + + + + + + + + + + - entity =='PO DateChanged'){ - $newValue = date('d-m-Y',strtotime($oldpo->newValue)); - }else{ - $newValue = $oldpo->newValue; - }?> - - - - - - - - - - -
SnoPONOLineItemNoEntityOldValueNewValueUpdatedByUpdateOnFirstName?>UpdatedOn); - echo $date->format('d-m-Y'); ?>
-
-
+ + + + + + + + + + PONO ?> + + + LineItemNos; ?> + entity ?> + entity == 'PO DateChanged') { + $oldValue = date('d-m-Y', strtotime($oldpo->oldValue)); + } else { + $oldValue = $oldpo->oldValue; + } ?> + SupplierName; ?> + + entity == 'PO DateChanged') { + $newValue = date('d-m-Y', strtotime($oldpo->newValue)); + } else { + $newValue = $oldpo->newValue; + } ?> + + FirstName ?> + + UpdatedOn); + echo $date->format('d-m-Y'); ?> + + + + + + + +
+
-
- 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',strip_tags($ServiceDescription)),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' ); - echo form_textarea($data); - ?> -
-
-
+
+ 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction', strip_tags($ServiceDescription)), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); + echo form_textarea($data); + ?> +
+
+
-

- - - - - - - - +

+ + + + + + + + - + -   Cancel - -   Save as Draft - -   Submit -   Approve - - +   Cancel + +   Save as Draft + +   Submit +   Approve + + - - - OK - - -   Submit -   Approve - OK - - - -
-
-
- -
-
- '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"; - } - ?> -
- -
-
-
+ + OK + + + +   Submit +   Approve + OK + + + +
+
+
+ +
+
+ '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"; + } + ?> +
+ +
+
+
- + + function Save(status) { + //alert(); + + + if (status == '0') { + stat = ''; + } else if (status == '1') { + stat = ''; + } else if (status == '4') { + stat = ''; + } + + $('#txtStatus').val(stat); + //var txtRowCount = $('#txtRowCount').val(); + //var Row=$('#txtRow').val(); + //alert(Row); + //exit(); + + + tinyMCE.triggerSave(); + + var Row = $('#txtRow').val(); + //alert(Row); + + var txtDeletedRow = $('#txtDeletedRow').val(); + //alert(Row); + //alert(txtRowCount); + //exit(); + //var TotalOrder=$('#txtToatlOrder').val(); + //alert(TotalOrder); + //exit(); + if (validate() && Budgetcheck()) { //alert(); + if (document.getElementById('ImportTax').rows.length <= 0) { + + alert('Please Select Line item to Create PO'); + $('#Deliverydt').focus(); + return false; + } else { + //alert(); + $('#content').loader('show'); + var formData = new FormData($('.ImportPO')[0]); + formData.append('txtRowCount', Row); + formData.append('txtDeletedRow', txtDeletedRow); + formData.append('textStatus', stat); + $.ajax({ + // data:$('.ImportPO').serialize()+"&txtRowCount="+Row+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat, + data: formData, + processData: false, + contentType: false, + //data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeQletedRowCount="+TextDeletedRowCount+"&TextTotalOrderValueSummaryService="+TextTotalOrderValueSummaryService+"&TextSpcialInstruction="+TextSpcialInstruction+"&TextExchangerate"+ExcLandingCharge="+hangerate+"Status="+TextStatus, + type: "POST", + url: "purchaseorder/EditImportPurchaseOrder", + success: function(data) { + if (data) { + $('#content').loader('hide'); + alert(data); + $('#txtRowCount').val(''); + $('#txtDeletedRow').val(''); + //$('#SpcialInstruction').val(''); + //$('#txtDeliveryAddress').val(''); + window.location = "purchaseorderListing"; + + } else { + alert("Error"); + } + + } + + }); + + } + } + + } + + + $(function() { + //$("#revenueTax").DataTable(); + $('#ImportTax').DataTable({ + "paging": false, + "lengthChange": true, + "searching": false, + "ordering": false, + // "info": true, + "autoWidth": true + + }); + }); + + $("#PaymentTerms").change(function() { + + if ($('#PaymentTerms').val().trim() == 'PT08') + + { + + $('#otheroptiondiv').show(); + } else { + $('#otheroptiondiv').hide(); + } + }); + + + + + $('#drpviewFreight').change(function() { + var FreightType = $('#drpviewFreight').val(); + if (FreightType == "PER TRIP") { + + $('#ViewTripsValue').show(); + } else { + + $('#ViewTripsValue').hide(); + } + + $('#viewNOOfTrips').val(''); + $('#viewtxtFreight').val(''); + $('#viewtxtAfterFreight').val(''); + selValue = $("#drpviewFreight").val(); + if (selValue == NilType) { + + $('#viewtxtFreight').attr('readonly', 'true'); + $('#viewtxtFreight').val('0.00'); + + } else { + $('#viewtxtFreight').removeAttr('readonly', 'true'); + $('#viewtxtFreight').val(''); + } + + calculateFreight(2); + + + }); + + + + + + + $('#drpeditFreight').change(function() { + var FreightType = $('#drpeditFreight').val(); + + + if (FreightType == "PER TRIP") { + + $('#EditTripsValue').show(); + } else { + + $('#EditTripsValue').hide(); + } + + + $('#editNOOfTrips').val(''); + $('#edittxtFreight').val(''); + $('#edittxtAfterFreight').val(''); + + if ($('#EditRate').val() != '' && $('#EditMaterialCode').val() != "0") { + selValue = $("#drpEditFreight").val(); + $('#txtEditFreight').val(''); + $('#edittxtAfterFreight').val(''); + + if (selValue == NilType) { + + $('#txtEditFreight').attr('readonly', 'true'); + $('#txtEditFreight').val('0.00'); + + } else { + $('#txtEditFreight').removeAttr('readonly', 'true'); + $('#txtEditFreight').val(''); + } + } else { + alert('Please Select MaterialCode and Rate Field Value'); + $('#drpEditFreight').val("0"); + $('#EditRate').focus(); + } + calculateFreight(1); + + }); + + + + $('#drpaddFreight').change(function() { + //alert(); + var FreightType = $('#drpaddFreight').val(); + if (FreightType == "PER TRIP") { + + $('#AddTripsValue').show(); + } else { + + $('#AddTripsValue').hide(); + } + + + + if ($('#Rate').val() != '' && $('#MaterialCode').val() != "0") { + selValue = $("#drpaddFreight").val(); + $('#txtFreight').val(''); + $('#txtAfterFreight').val(''); + + if (selValue == NilType) { + + $('#txtFreight').attr('readonly', 'true'); + $('#txtFreight').val('0.00'); + + } else { + $('#txtFreight').removeAttr('readonly', 'true'); + $('#txtFreight').val(''); + + + } + } else { + alert('Please Select MaterialCode and Rate Field Value'); + $('#drpaddFreight').val("0"); + $('#Rate').focus(); + } + calculateFreight(0); + + }); + + + + + function calculateFreight(isEdit) { + + + //alert(); + if (isEdit == '0') { //alert(); + if ($('#MaterialCode').val() == "0") { + alert('Please Select the Material Code'); + $('#MaterialCode').focus(); + $('#txtFreight').val(''); + return false; + } else if ($('#Rate').val() == '') { + alert('Please Enter the Rate value'); + $('#Rate').focus(); + $('#addtxtFreight').val(''); + return false; + } else { + // var basicValue = parseFloat($('#txtBasicValue').val()); + var basicValue = parseFloat($('#INRBasicvalue').val()); + var FreightType = $("#drpaddFreight").val(); + if (FreightType == "0") { + alert('Please select Freight Type'); + $('#addtxtFreight').val(''); + $("#drpaddFreight").focus(); + } else if ($('#addtxtFreight').val() != "0" && $('#addtxtFreight').val() != '') { + var FreightValue = parseFloat($('#addtxtFreight').val()); + var UOM = parseFloat($('#UOM').val()); + var Quantity = parseFloat($('#Quantity').val()); + //alert(FreightType); + var AfterFreight = 0.0; + if (FreightType == PercentageType) { + AfterFreight = ; + } else if (FreightType == NilType) { + AfterFreight = 0.0; + } else if (FreightType == '') { + AfterFreight = ; + } else if (FreightType == '') { + AfterFreight = ; + } else if (FreightType == '') { + if ($('#addNOOfTrips').val() == '') { + alert('Please Enter No of Trip'); + + $("#addNOOfTrips").focus(); + $('#addtxtFreight').val(0) + AfterFreight = 0; + $('#addtxtAfterFreight').val("0.00"); + return false; + } else { + var noOftrip = $("#addNOOfTrips").val(); + AfterFreight = ; + AfterFreight = parseFloat(AfterFreight * noOftrip).toFixed(2); + } + + + } else { + AfterFreight = $("#addtxtFreight").val(); + } + var AfterFreightval = parseFloat(AfterFreight).toFixed(2); + + $('#addtxtAfterFreight').val(AfterFreightval); + } else { + $('#addtxtAfterFreight').val("0.00"); + } + + } + // calculateTotalValue(); + } else if (isEdit == '1') { + + + + + // alert('af'); + if ($('#EditMaterialCode').val() == '') { + alert('Please Select the Material Code'); + $('#EditMaterialCode').focus(); + $('#edittxtFreight').val(''); + return false; + } else if ($('#EditRate').val() == '') { + alert('Please Enter the Rate value'); + $('#EditRate').focus(); + $('#edittxtFreight').val(''); + return false; + } else { + var basicValue = parseFloat($('#EditINRBasicvalue').val()); + var FreightType = $("#drpeditFreight").val(); + if (FreightType == "0") { + alert('Please select Freight Type'); + $('#edittxtFreight').val(''); + $("#drpeditFreight").focus(); + } else if ($('#edittxtFreight').val() != "0" && $('#edittxtFreight').val() != '') { + var FreightValue = parseFloat($('#edittxtFreight').val()); + var UOM = parseFloat($('#EditUOM').val()); + var Quantity = parseFloat($('#EditQuantity').val()); + //alert(FreightType); + var AfterFreight = 0.0; + if (FreightType == PercentageType) { + AfterFreight = ; + } else if (FreightType == NilType) { + AfterFreight = 0.0; + } else if (FreightType == '') { + AfterFreight = ; + } else if (FreightType == '') { + AfterFreight = ; + } else if (FreightType == '') { + if ($('#editNOOfTrips').val() == '') { + alert('Please Enter No of Trip'); + + $("#editNOOfTrips").focus(); + $('#edittxtFreight').val(0) + AfterFreight = 0; + $('#edittxtAfterFreight').val("0.00"); + return false; + } else { + var noOftrip = $("#editNOOfTrips").val(); + AfterFreight = ; + AfterFreight = parseFloat(AfterFreight * noOftrip).toFixed(2); + } + } else { + AfterFreight = $("#edittxtFreight").val(); + } + var AfterFreightval = parseFloat(AfterFreight).toFixed(2); + + $('#edittxtAfterFreight').val(AfterFreightval); + } else { + $('#edittxtAfterFreight').val("0.00"); + } + + } + // calculateEditTotalValue(); + + } else { + //alert(); + var basicValue = parseFloat($('#ViewINRBasicvalue').val()); + + ///console.log(basicValue); + var FreightType = $("#drpviewFreight").val(); + if (FreightType == "0") { + alert('Please select Freight Type'); + $('#viewtxtFreight').val(''); + $("#drpviewFreight").focus(); + } else if ($('#viewtxtFreight').val() != "0" && $('#viewtxtFreight').val() != '') { + var FreightValue = parseFloat($('#viewtxtFreight').val()); + var UOM = parseFloat($('#ViewUOM').val()); + var Quantity = parseFloat($('#ViewQuantity').val()); + //alert(FreightType); + var AfterFreight = 0.0; + if (FreightType == PercentageType) { + AfterFreight = ; + } else if (FreightType == NilType) { + AfterFreight = 0.0; + } else if (FreightType == '') { + AfterFreight = ; + } else if (FreightType == '') { + AfterFreight = ; + } else if (FreightType == '') { + if ($('#viewNOOfTrips').val() == '') { + alert('Please Enter No of Trip'); + + $("#viewNOOfTrips").focus(); + $('#viewtxtFreight').val(0) + AfterFreight = 0; + $('#viewtxtAfterFreight').val("0.00"); + return false; + } else { + var noOftrip = $("#viewNOOfTrips").val(); + AfterFreight = ; + AfterFreight = parseFloat(AfterFreight * noOftrip).toFixed(2); + } + } else { + AfterFreight = $("#viewtxtFreight").val(); + } + var AfterFreightval = parseFloat(AfterFreight).toFixed(2); + + $('#viewtxtAfterFreight').val(AfterFreightval); + } else { + $('#viewtxtAfterFreight').val("0.00"); + } + + + + + } + } + \ No newline at end of file diff --git a/app/Views/importpo.php b/app/Views/importpo.php index 6b2585d1..c89c3eeb 100644 --- a/app/Views/importpo.php +++ b/app/Views/importpo.php @@ -50,7 +50,7 @@ if (!empty($INRSYMBOL)) { if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) { $AvlAmount = number_format($AvlimportBudAmt, 2, '.', ''); -}else{ +} else { $AvlAmount = 0; } @@ -228,37 +228,37 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) { .num { text-align: right; } + .header-container { - display: flex; - justify-content: space-between; - align-items: center; - padding: 25px; - } + display: flex; + justify-content: space-between; + align-items: center; + padding: 25px; + } - .header-container h2 { - flex: 1; - text-align: center; - margin: 0; - } + .header-container h2 { + flex: 1; + text-align: center; + margin: 0; + } - .centered { - display: flex; - /* justify-content: center; */ - align-items: center; - height: 10vh; - } + .centered { + display: flex; + /* justify-content: center; */ + align-items: center; + height: 10vh; + } - .centered label, - .centered input { - margin: 0 5px; - } + .centered label, + .centered input { + margin: 0 5px; + } - .mandatory { - color: red; - text-align: right; - background-color: white; - } - + .mandatory { + color: red; + text-align: right; + background-color: white; + } @@ -272,281 +272,282 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) { echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?> -
+
-

Import Purchase Order

- Back -
+

Import Purchase Order

+ Back +
- - Requistion No + 'Selected Requisition Numbers'); - if (!empty($ReqList)) { - foreach ($ReqList as $SID) : + $options = array("0" => 'Selected Requisition Numbers'); + if (!empty($ReqList)) { + foreach ($ReqList as $SID) : - // print_r($SID->ReqNo); - $options[$SID->ReqNo] = $SID->ReqNo . "-" . $SID->ReqBy; - $ReqType = $SID->ReqType; - endforeach; - } - echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"'); + // print_r($SID->ReqNo); + $options[$SID->ReqNo] = $SID->ReqNo . "-" . $SID->ReqBy; + $ReqType = $SID->ReqType; + endforeach; + } + echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"'); - ?> + ?>
- -
- - 'POType', 'value' => set_value('POType', IMPORT), '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'), 'id="drpSupplier"', 'required="true"', 'class="form-control select2'); - + $data = array('name' => 'POType', 'value' => set_value('POType', IMPORT), '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'), 'id="drpSupplier"', 'required="true"', 'class="form-control select2'); + + ?>
- -
- 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> -
+ +
+ 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + ?> +
- - 'Select Currency Type'); - //print_r($Currency); - if (!empty($Currency)) { //print_r($Currency); - foreach ($Currency as $CUR) : + + 'Select Currency Type'); + //print_r($Currency); + if (!empty($Currency)) { //print_r($Currency); + foreach ($Currency as $CUR) : - $options[$CUR->Currency_Code] = $CUR->Currency_Code . ' ' . ' - ' . ' ' . $CUR->Country_and_Currency; + $options[$CUR->Currency_Code] = $CUR->Currency_Code . ' ' . ' - ' . ' ' . $CUR->Country_and_Currency; - endforeach; - } + endforeach; + } - echo form_dropdown('currencytype', $options, set_value('currencytype'), 'id="currencytype"', 'required="true"', 'class="form-control select2'); - ?> + echo form_dropdown('currencytype', $options, set_value('currencytype'), 'id="currencytype"', 'required="true"', 'class="form-control select2'); + ?>
Select Delivery By*
- "DateRange", "id" => "Date", "value" => "2", 'checked' => 'checked')); ?> - "DateRange", "id" => "Schedule", "value" => "1")); ?> + "DateRange", "id" => "Date", "value" => "2", 'checked' => 'checked')); ?> + "DateRange", "id" => "Schedule", "value" => "1")); ?>
- + - 'Dispatch','value' => set_value('Dispatch'),'id'=>'Dispatch', 'class' => 'form-control' ,'required' => 'true'); - // echo form_input($data); - $data = array('name' => 'Dispatch', 'value' => set_value('Dispatch'), 'id' => 'Dispatch', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110'); - echo Form_textarea($data); + 'Dispatch','value' => set_value('Dispatch'),'id'=>'Dispatch', 'class' => 'form-control' ,'required' => 'true'); + // echo form_input($data); + $data = array('name' => 'Dispatch', 'value' => set_value('Dispatch'), 'id' => 'Dispatch', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110'); + echo Form_textarea($data); - ?> + ?>
-
- 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $CompanyAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> +
+ 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $CompanyAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + ?> +
-
-
-
- Check Today's Foreign Exchange value (Click here) +
+
+
+ Check Today's Foreign Exchange value (Click here) +
+
+ +
+ 'Exchangerateon', 'value' => set_value('Exchangerateon', $CurrentDate), 'id' => 'Exchangerateon', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?>
-
- -
- 'Exchangerateon', 'value' => set_value('Exchangerateon', $CurrentDate), 'id' => 'Exchangerateon', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); - echo form_input($data); - ?> -
+
+
+ +
+ 'ExchangeRate', 'value' => set_value('ExchangeRate'), 'id' => 'ExchangeRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'USRate()'); + echo form_input($data); + ?>
-
- -
- 'ExchangeRate', 'value' => set_value('ExchangeRate'), 'id' => 'ExchangeRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'USRate()'); - echo form_input($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'), 'id' => 'PlaceOforigin', 'class' => 'form-control', 'required' => 'true'); - echo form_input($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'), 'id' => 'PlaceOforigin', 'class' => 'form-control', 'required' => 'true'); + echo form_input($data); + ?>
+
-
-
-
-
- -
- 'PODate', 'value' => set_value('PODate', $CurrentDate), 'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 'onkeypress' => 'return false;'); - echo form_input($data); - ?> -
-
-
- -
+
+
+
+
+ +
+ 'PODate', 'value' => set_value('PODate', $CurrentDate), 'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?> +
+
+
+ +
- 'addmodeofshipment', 'value' => set_value('addmodeofshipment'), 'id' => 'addmodeofshipment', 'class' => 'form-control'); - echo form_input($data); - ?> -
+ 'addmodeofshipment', 'value' => set_value('addmodeofshipment'), 'id' => 'addmodeofshipment', 'class' => 'form-control'); + echo form_input($data); + ?> +
-
-
+
+
-
+
- 'addsupplierreference', 'value' => set_value('addsupplierreference'), 'id' => 'addsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); - echo form_input($data); - ?> -
-
-
- -
+ 'addsupplierreference', 'value' => set_value('addsupplierreference'), 'id' => 'addsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); + echo form_input($data); + ?> +
+
+
+ +
- 'addsupplierofferno', 'value' => set_value('addsupplierofferno'), 'id' => 'addsupplierofferno', 'class' => 'form-control'); - echo form_input($data); - ?> -
+ 'addsupplierofferno', 'value' => set_value('addsupplierofferno'), 'id' => 'addsupplierofferno', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
-
-
-
-
- -
+
+
+
+ +
- 'addotherreference', 'value' => set_value('addotherreference'), 'id' => 'addotherreference', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
- - 'addotherreference', 'value' => set_value('addotherreference'), 'id' => 'addotherreference', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+ + 'Select'); + $options3 = array("0" => 'Select'); - if (!empty($PoTypeOptions)) { - foreach ($PoTypeOptions as $payment) : + if (!empty($PoTypeOptions)) { + foreach ($PoTypeOptions as $payment) : - $options3[$payment->ConfigValue] = $payment->ConfigValue; - //$options6[$pay->PaymentID] = $pay->PaymentTerms; + $options3[$payment->ConfigValue] = $payment->ConfigValue; + //$options6[$pay->PaymentID] = $pay->PaymentTerms; - endforeach; - } + endforeach; + } - echo form_dropdown('Importoption', $options3, set_value('Importoption'), 'id="Importoption"', 'class="form-control"'); ?> + echo form_dropdown('Importoption', $options3, set_value('Importoption'), 'id="Importoption"', 'class="form-control"'); ?> -
-
- - +
+
+ + - 'Select Payment method'); + $options1 = array("0" => 'Select Payment method'); - if (!empty($Payment)) { - foreach ($Payment as $payment) : + if (!empty($Payment)) { + foreach ($Payment as $payment) : - $options1[$payment->PaymentID] = $payment->PaymentTerms; - //$options6[$pay->PaymentID] = $pay->PaymentTerms; + $options1[$payment->PaymentID] = $payment->PaymentTerms; + //$options6[$pay->PaymentID] = $pay->PaymentTerms; - endforeach; - } + endforeach; + } - echo form_dropdown('PaymentTerms', $options1, set_value('PaymentTerms'), 'id="PaymentTerms"', 'class="form-control"'); ?> + echo form_dropdown('PaymentTerms', $options1, set_value('PaymentTerms'), 'id="PaymentTerms"', 'class="form-control"'); ?> -
-
-
-
-
- -
- +
+
+ +
+ 'NO', "1" => 'YES'); @@ -560,1397 +561,1397 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) { // endforeach; // } - echo form_dropdown('Insurance', $options1, set_value('Insurance'), 'id="Insurance"', 'class="form-control"'); ?> -
- -
- - 'Select', '1' => 'REVENUE', '2' => 'CAPITAL'); - echo form_dropdown('BudgetType', $optionsnew, set_value('BudgetType'), 'id="BudgetType"', 'required="true"', 'class="form-control select2'); - - ?> -
-
- -
-
-
- - - -
- -
-
-
-
- -
- -
- - - - - - - - - - - + +
+ + 'Select', '1' => 'REVENUE', '2' => 'CAPITAL'); + echo form_dropdown('BudgetType', $optionsnew, set_value('BudgetType'), 'id="BudgetType"', 'required="true"', 'class="form-control select2'); + + ?> +
+
+ +
+
- - -
+
+
+
+
+
-
+
+ Add Line Item -
-
- -
- +
+ - $data = array('name' => 'EditReqNo', 'value' => set_value('EditReqNo'), 'id' => 'EditReqNo', 'class' => 'form-control', 'readonly' => 'true'); - echo form_input($data); ?> + + + + + + + + +
- - - - - - - - - - - - - - - - - - - - - -
SNoRequisition NoMaterial CodeDescriptionQuantityUOMRateBasic AmountReceived QtyRejected QtyPending QtyAction
-
- -
- -
-
- - - 'txttotallanding', 'value' => set_value('txttotallanding'), 'id' => 'txttotallanding', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalAssessable', 'value' => set_value('txttotalAssessable'), 'id' => 'txttotalAssessable', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalcustom', 'value' => set_value('txttotalcustom'), 'id' => 'txttotalcustom', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- - -
- - - 'txttotalSubtotal', 'value' => set_value('txttotalSubtotal'), 'id' => 'txttotalSubtotal', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- - -
- - - 'txttotalIgst', 'value' => set_value('txttotalIgst'), 'id' => 'txttotalIgst', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalcustomED', 'value' => set_value('txttotalcustomED'), 'id' => 'txttotalcustomED', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalcustomSH', 'value' => set_value('txttotalcustomSH'), 'id' => 'txttotalcustomSH', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- - - -
- - - 'txttotalgrossduty', 'value' => set_value('txttotalgrossduty'), 'id' => 'txttotalgrossduty', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- - - - -
- 'txtTotalFreight', 'value' => set_value('txtTotalFreight'), 'id' => 'txtTotalFreight', 'class' => 'form-control', 'required' => 'true', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- - - - -
- 'txtToatlOrder', 'value' => set_value('txtToatlOrder'), 'id' => 'txtToatlOrder', 'class' => 'form-control', 'required' => 'true', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
-
- - - -
-
- 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction'), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); + $data = array('name' => 'addtxtInstruction', 'value' => set_value('addtxtInstruction'), 'id' => 'addtxtInstruction', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); echo form_textarea($data); ?> -
+
+
+
+ +
+ + +
+ + +
+
+
+
+ + + + + +
-
-

-
- - - - - - - -   Save as Draft -   Submit + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
SNoRequisition NoMaterial CodeDescriptionQuantityUOMRateBasic AmountReceived QtyRejected QtyPending QtyAction
+
+ +
+ +
+
+ + + 'txttotallanding', 'value' => set_value('txttotallanding'), 'id' => 'txttotallanding', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ +
+ + + 'txttotalAssessable', 'value' => set_value('txttotalAssessable'), 'id' => 'txttotalAssessable', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ +
+ + + 'txttotalcustom', 'value' => set_value('txttotalcustom'), 'id' => 'txttotalcustom', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + +
+ + + 'txttotalSubtotal', 'value' => set_value('txttotalSubtotal'), 'id' => 'txttotalSubtotal', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + +
+ + + 'txttotalIgst', 'value' => set_value('txttotalIgst'), 'id' => 'txttotalIgst', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ +
+ + + 'txttotalcustomED', 'value' => set_value('txttotalcustomED'), 'id' => 'txttotalcustomED', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ +
+ + + 'txttotalcustomSH', 'value' => set_value('txttotalcustomSH'), 'id' => 'txttotalcustomSH', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + + +
+ + + 'txttotalgrossduty', 'value' => set_value('txttotalgrossduty'), 'id' => 'txttotalgrossduty', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + + + +
+ 'txtTotalFreight', 'value' => set_value('txtTotalFreight'), 'id' => 'txtTotalFreight', 'class' => 'form-control', 'required' => 'true', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + + + +
+ 'txtToatlOrder', 'value' => set_value('txtToatlOrder'), 'id' => 'txtToatlOrder', 'class' => 'form-control', 'required' => 'true', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
-
+ + + +
+
+ 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction'), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); + echo form_textarea($data); + ?> +
+
+
+ +

+
+ + + + + + + + +   Save as Draft +   Submit + +
+
+
+
-
-
@@ -2102,12 +2103,12 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) { $.each(y, function(idx, obj) { if (obj.SupplierID === id) { - if (obj.MSME) { - $("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address); - } else { - $("#SupAddress").val(obj.Address); - } - PaymentID = obj.PaymentID; + if (obj.MSME) { + $("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address); + } else { + $("#SupAddress").val(obj.Address); + } + PaymentID = obj.PaymentID; //PaymentID = obj.PaymentID; $('#PaymentTerms').val(obj.PaymentTerms); } @@ -4254,17 +4255,17 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) { $('#content').loader('show'); var formData = new FormData($('.ImportPO')[0]); - formData.append('txtRowCount', txtRowCount); - formData.append('txtDeletedRow', txtDeletedRow); - formData.append('textStatus', stat); + formData.append('txtRowCount', txtRowCount); + formData.append('txtDeletedRow', txtDeletedRow); + formData.append('textStatus', stat); $.ajax({ // data:$('.ImportPO').serialize()+"&txtRowCount="+txtRowCount+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat, //data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeQletedRowCount="+TextDeletedRowCount+"&TextTotalOrderValueSummaryService="+TextTotalOrderValueSummaryService+"&TextSpcialInstruction="+TextSpcialInstruction+"&TextExchangerate"+ExcLandingCharge="+hangerate+"Status="+TextStatus, type: "POST", url: "purchaseorder/addNewImportPurchaseOrder", data: formData, - processData: false, - contentType: false, + processData: false, + contentType: false, success: function(data) { if (data) { $('#content').loader('hide'); diff --git a/app/Views/purchaseorder.php b/app/Views/purchaseorder.php index a9eae85d..d7b2a4f9 100644 --- a/app/Views/purchaseorder.php +++ b/app/Views/purchaseorder.php @@ -86,6 +86,8 @@ if (!empty($INRSYMBOL)) {