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/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index 0da895d5..f3bc7735 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/capitalpurchaseorder.php b/app/Views/capitalpurchaseorder.php index 930359ce..9433e8da 100644 --- a/app/Views/capitalpurchaseorder.php +++ b/app/Views/capitalpurchaseorder.php @@ -1,1186 +1,1860 @@ - ConfigValue; - } + $t = ''; + if (!empty($staticspecialinstruction)) { + foreach ($staticspecialinstruction as $text) + $t = $text->ConfigValue; + } - - $insuranceStatus = array( - array("name"=>"NO","value"=>"0"),array("name"=>"YES","value"=>"1") + + $insuranceStatus = array( + array("name" => "NO", "value" => "0"), array("name" => "YES", "value" => "1") ); - $ReqType =''; + $ReqType = ''; $CompanyAddress = ''; - $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); + $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $CurrentDate = $dt->format('d-m-Y'); $MaxPoDate = ''; $AvlAmount = 0; - $paymentDate=''; - $paymentCheckDays='Before'; - $paymentCheckDays1='After'; - if(!empty($MaxPODate)) - { - foreach ($MaxPODate as $date) - { - - $MaxPoDate = $date->PODate; - } - } - if(!empty($CompanyDetails)) - { - foreach ($CompanyDetails as $Req) - { - $CompanyAddress = $Req->Address; - } - } - if(!empty($AvlBudAmt)) - { + $paymentDate = ''; + $paymentCheckDays = 'Before'; + $paymentCheckDays1 = 'After'; + if (!empty($MaxPODate)) { + foreach ($MaxPODate as $date) { - $AvlAmount = number_format($AvlCapitalBudAmt, 2, '.', ''); + $MaxPoDate = $date->PODate; + } + } + if (!empty($CompanyDetails)) { + foreach ($CompanyDetails as $Req) { + $CompanyAddress = $Req->Address; + } + } + if (!empty($AvlBudAmt)) { + $AvlAmount = number_format($AvlCapitalBudAmt, 2, '.', ''); } - // if(!empty($AvlimportBudAmt)) - // { - - // $AvlAmount = $AvlimportBudAmt; - - // } + // if(!empty($AvlimportBudAmt)) + // { + + // $AvlAmount = $AvlimportBudAmt; + + // } -$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 $INRSYM; + // echo $INR; -// echo $INRSYM; -// echo $INR; - ?> - - - - - + + + + - +
- 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'ImportPO','enctype' => 'multipart/form-data'); + 'form-label-left CapitalPO ', 'name' => 'CapitalPO', 'id' => 'ImportPO', 'enctype' => 'multipart/form-data'); - echo form_open(base_url().'/purchaseorder/addPO/',$attributes); ?> + echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?> -
-
-
-
-

Capital Purchase Order

- Back -
-
-
-
-
- - '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"'); - ?> -
-
- -
- - 'POType','value' => set_value('POType',CAPITAL),'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); - ?> -
-
- +
+
+
+
+

Capital Purchase Order

+ Back
-
-
-
-
- -
- 'Select Currency Type '); - //print_r( $options); - if(!empty($Currency)) - { - foreach ($Currency as $Cur): +
+
+
+
+ + Currency_Code] = $Cur->Currency_Code.' '.' - '.' '.$Cur->Country_and_Currency; - - endforeach; - } - echo form_dropdown('currencytype', $options,set_value('currencytype'),'id="currencytype"','class="form-control select2"' , 'required="true"'); - ?> + $options = array("0" => 'Selected Requisition Numbers'); + if (!empty($ReqList)) { + foreach ($ReqList as $SID) : -
-
-
- Select Delivery By*
-
-
-
- - "DateRange", "id"=>"Date", "value"=>"2", 'checked'=>set_radio('DateRange', '2', FALSE))); ?>     -
-
- "DateRange", "id"=>"DeliverycheckDate", "value"=>"0", 'checked'=>set_radio('DateRange', '0', FALSE))); ?>     -
-
- "DateRange", "id"=>"Schedule", "value"=>"1", 'checked'=>'checked')); ?> -
-
-
-
-
- - - 'Scheduleby','value' => set_value('Scheduleby'),'id'=>'Scheduleby', '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); - ?> -
-
-
-
-
-
-
- Check Today's Foreign Exchange value (Click here) + // 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"'); + ?>
-
- -
- 'Exchangerateon','value' => set_value('Exchangerateon',$CurrentDate),'id'=>'Exchangerateon', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;'); - echo form_input($data); - ?> -
-
-
- * -
- 'ExchangeRt','value' => set_value('ExchangeRt'),'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'),'id'=>'PlaceOforigin', 'class' => 'form-control' ,'required' => 'true'); - echo form_input($data); - ?> + + 'POType', 'value' => set_value('POType', CAPITAL), 'id' => 'POType', 'class' => 'form-control', 'readonly' => '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); - ?> -
-
-
- -
- - '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); - ?> -
-
-
- -
- - '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); - ?> -
-
-
- -
- - + + 'Select Supplier'); + //print_r( $options); - $optionsPO = array("0"=>'Select'); - if(!empty($PoTypeOptions)) - { - foreach ($PoTypeOptions as $POpt): - $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; + if (!empty($Suplist)) { + foreach ($Suplist as $SID) : + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; endforeach; - } - - echo form_dropdown('PoTypeOptions', $optionsPO,set_value('PoTypeOptions'),'id="PoTypeOptions"' ,'required="true"' ,'class="form-control select2'); + } + 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); + ?> +
+
- ?>
-
- - 'Select Payment method'); - //print_r( $options); +
+
+
+ +
+ 'Select Currency Type '); + //print_r( $options); + if (!empty($Currency)) { + foreach ($Currency as $Cur) : - if(!empty($Payment)) - { - foreach ($Payment as $payment): + $options[$Cur->Currency_Code] = $Cur->Currency_Code . ' ' . ' - ' . ' ' . $Cur->Country_and_Currency; - $options1[$payment->PaymentID] = $payment->PaymentTerms; + endforeach; + } + echo form_dropdown('currencytype', $options, set_value('currencytype'), 'id="currencytype"', 'class="form-control select2"', 'required="true"'); + ?> + +
+
+
+ Select Delivery By*
+
+
+
+ + "DateRange", "id" => "Date", "value" => "2", 'checked' => set_radio('DateRange', '2', FALSE))); ?>     +
+
+ "DateRange", "id" => "DeliverycheckDate", "value" => "0", 'checked' => set_radio('DateRange', '0', FALSE))); ?>     +
+
+ "DateRange", "id" => "Schedule", "value" => "1", 'checked' => 'checked')); ?> +
+
+
+
+
+ + + 'Scheduleby', 'value' => set_value('Scheduleby'), 'id' => 'Scheduleby', '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); + ?> +
+
+
+
+
+
+
+ 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); + ?> +
+
+
+ * +
+ 'ExchangeRt', 'value' => set_value('ExchangeRt'), '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'), '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); + ?> +
+
+
+ +
+ + '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); + ?> +
+
+
+ +
+ + '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); + ?> +
+
+
+ +
+ + 'Select'); + if (!empty($PoTypeOptions)) { + foreach ($PoTypeOptions as $POpt) : + $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; + endforeach; + } + + echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions"', 'required="true"', 'class="form-control select2'); + + + ?> +
+
+
+ + '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"'); + 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'); - echo form_input($data); - ?> -
-
-
- - 'Select','1'=>'REVENUE','2'=>'CAPITAL'); - echo form_dropdown('BudgetType', $optionsnew,set_value('BudgetType'),'id="BudgetType"' ,'required="true"' ,'class="form-control select2'); - - ?> -
-
-
- - - - - - - - - - - - - - - - - - - -
-
- -
-
- -
- -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - -
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/editCapitalAmendPO.php b/app/Views/editCapitalAmendPO.php index 27034640..d5b1feb5 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,79 +676,75 @@ 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'); + + ?> +
+
@@ -781,49 +752,51 @@ document.getElementById('dispatchinternational').style.display = 'block';
-
- +
-
- -
- '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/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/editRevenueAmendPO.php b/app/Views/editRevenueAmendPO.php index 1ea8d0fd..6b4be17f 100644 --- a/app/Views/editRevenueAmendPO.php +++ b/app/Views/editRevenueAmendPO.php @@ -938,14 +938,14 @@ if (!empty($INRSYMBOL)) { echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
-
+

Amendment Revenue Purchase Order-

- Back +
@@ -1281,9 +1281,9 @@ if (!empty($INRSYMBOL)) {
@@ -1318,8 +1318,8 @@ if (!empty($INRSYMBOL)) {
@@ -1349,8 +1349,8 @@ if (!empty($INRSYMBOL)) { @@ -1378,8 +1378,8 @@ if (!empty($INRSYMBOL)) { @@ -1757,8 +1757,8 @@ if (!empty($INRSYMBOL)) { @@ -2012,6 +2012,7 @@ if (!empty($INRSYMBOL)) {
+ @@ -2021,7 +2022,6 @@ if (!empty($INRSYMBOL)) {   Submit - @@ -2567,7 +2567,7 @@ 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..2498231e 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,8 +1266,8 @@ 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); + ?>

@@ -1487,7 +1500,7 @@ foreach ($PaymentTerms as $TER) {
- * + *
'amenddescofpo', 'value' => set_value('amenddescofpo', $DescriptionOfPo), 'id' => 'amenddescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); @@ -1508,13 +1521,13 @@ 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/editimportpo.php b/app/Views/editimportpo.php index 0f13431a..ae5da4e2 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..df3ccec3 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..78707c53 100644 --- a/app/Views/purchaseorder.php +++ b/app/Views/purchaseorder.php @@ -1734,16 +1734,24 @@ if (!empty($INRSYMBOL)) { 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; + }
-
+

Revenue Purchase Order

@@ -1815,31 +1823,31 @@ if (!empty($INRSYMBOL)) {
Select Tax Range
- "Range", - "id" => "Local", - "value" => "0", - 'checked' => 'checked', - 'onchange' => 'SetVatorCST();' - )); - ?>      - "Range", - "id" => "Inter_state", - "value" => "1", - 'onchange' => 'SetVatorCST();' - )); - ?> -
+ "Range", + "id" => "Local", + "value" => "0", + 'checked' => 'checked', + 'onchange' => 'SetVatorCST();' + )); + ?>      + "Range", + "id" => "Inter_state", + "value" => "1", + 'onchange' => 'SetVatorCST();' + )); + ?> +
- Select Delivery By*
+ Select Delivery By*
- "DateRange", "id" => "Date", "value" => "0", "checked" => "checked")); ?>     - "DateRange", "id" => "Schedule", "value" => "1")); ?> + "DateRange", "id" => "Date", "value" => "0", "checked" => "checked")); ?>     + "DateRange", "id" => "Schedule", "value" => "1")); ?>
@@ -1852,7 +1860,7 @@ if (!empty($INRSYMBOL)) {
- +
'InsuranceNumber', 'InsuranceNumber' => set_value('InsuranceNumber'), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); diff --git a/app/Views/servicePurchaseorder.php b/app/Views/servicePurchaseorder.php index 6d7f4e3a..cb83ef2c 100644 --- a/app/Views/servicePurchaseorder.php +++ b/app/Views/servicePurchaseorder.php @@ -593,6 +593,7 @@ if (!empty($INRSYMBOL)) { .num { text-align: right; } + .header-container { display: flex; justify-content: space-between; @@ -605,17 +606,24 @@ if (!empty($INRSYMBOL)) { 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; + }
-
+

Service Purchase Order

Back
-
+
- + 'Selected Requisition Numbers'); @@ -652,17 +660,17 @@ if (!empty($INRSYMBOL)) {
- -
+ +
- 'POType', 'value' => set_value('POType', SERVICE), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); - echo form_input($data); - ?> -
+ 'POType', 'value' => set_value('POType', SERVICE), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
- + 'Select Supplier'); @@ -680,120 +688,120 @@ if (!empty($INRSYMBOL)) {
- -
- '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 Work Status'); - //print_r( $options); - - if (!empty($WorkStatus)) { - foreach ($WorkStatus as $WID) : - - - $optionsWork[$WID->StatusCode] = $WID->StatusName; - - endforeach; - } - - echo form_dropdown('workstatus', $optionsWork, set_value('workstatus'), 'id="workstatus"', '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))); ?> -
-
-
- -
- 'Deliverydt', 'value' => set_value('Deliverydt', $CurrentDate), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); - echo form_input($data); - ?> -
-
- -
- -
- 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $CompanyAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> -
+ + 'Select Work Status'); + //print_r( $options); + + if (!empty($WorkStatus)) { + foreach ($WorkStatus as $WID) : + + + $optionsWork[$WID->StatusCode] = $WID->StatusName; + + endforeach; + } + + echo form_dropdown('workstatus', $optionsWork, set_value('workstatus'), 'id="workstatus"', '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))); ?> +
+
+
+ +
+ 'Deliverydt', 'value' => set_value('Deliverydt', $CurrentDate), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?> +
+
+ + +
+ +
+ 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $CompanyAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + ?> +
-
-
+
+
-
- 'PODate', 'value' => set_value('PODate', $CurrentDate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); - echo form_input($data); - ?> -
+
+ 'PODate', 'value' => set_value('PODate', $CurrentDate), 'id' => 'PODate', 'class' => 'form-control num', '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); + ?> +
-
+
-
-
+
+
@@ -806,95 +814,95 @@ if (!empty($INRSYMBOL)) {
- -
- 'Select Work Status'); - $optionsPO = array("0" => 'Select'); + +
+ 'Select Work Status'); + $optionsPO = array("0" => 'Select'); - if (!empty($PoTypeOptions)) { - foreach ($PoTypeOptions as $POpt) : - $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; - endforeach; - } - echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions"', 'required="true"', 'class="form-control select2'); - ?> -
+ if (!empty($PoTypeOptions)) { + foreach ($PoTypeOptions as $POpt) : + $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; + endforeach; + } + echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions"', 'required="true"', 'class="form-control select2'); + ?> +
- - 'Select Payment Terms '); - foreach ($Payment as $pay) : - $options6[$pay->PaymentID] = $pay->PaymentTerms; - endforeach; - } + + 'Select Payment Terms '); + foreach ($Payment as $pay) : + $options6[$pay->PaymentID] = $pay->PaymentTerms; + endforeach; + } - echo form_dropdown('PaymentTerms', $options6, set_value('PaymentTerms'), 'id="PaymentTerms"', 'required="true"', 'class="form-control select2'); + echo form_dropdown('PaymentTerms', $options6, set_value('PaymentTerms'), 'id="PaymentTerms"', 'required="true"', 'class="form-control select2'); - ?> + ?>
-
-
-
-
-
- -
- - -
-
- -
- -
- 'InsuranceNumber', 'value' => set_value('InsuranceNumber'), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); - echo form_input($data); - ?> -
-
-
- - 'Select', '1' => 'REVENUE', '2' => 'CAPITAL'); - echo form_dropdown('BudgetType', $optionsnew, set_value('BudgetType'), 'id="BudgetType"', 'required="true"', 'class="form-control select2'); - - ?> - - -
-
+
+
+
+
+ +
+ + +
+
+ +
+ +
+ 'InsuranceNumber', 'value' => set_value('InsuranceNumber'), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); + echo form_input($data); + ?> +
+
+
+ + 'Select', '1' => 'REVENUE', '2' => 'CAPITAL'); + echo form_dropdown('BudgetType', $optionsnew, set_value('BudgetType'), 'id="BudgetType"', 'required="true"', 'class="form-control select2'); + + ?> + + +
+
+
@@ -1259,7 +1267,7 @@ if (!empty($INRSYMBOL)) {
- +
'Item Code'); diff --git a/app/Views/servicepo.php b/app/Views/servicepo.php index 36e53a51..2393a32c 100644 --- a/app/Views/servicepo.php +++ b/app/Views/servicepo.php @@ -1,437 +1,444 @@ + .table-bordered>thead>tr>th, + .table-bordered>tbody>tr>th, + .table-bordered>tfoot>tr>th, + .table-bordered>thead>tr>td, + .table-bordered>tbody>tr>td, + .table-bordered>tfoot>tr>td { + border: 1px solid #333; + } +
- - -
- -
-

Service Purchase Order.

-
-
-
-
- -
- 'Requistion No'); - //print_r( $options); - - if(!empty($POType)) - { - foreach ($SupplierName as $SID): - - - $options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName; - endforeach; - } - - echo form_dropdown('MaterialCode', $options,set_value('MaterialCode'),'id="MaterialCode"' ,'class="form-control required"','required="true"'); - ?> -
-
-
- -
- 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true'); - echo form_input($data); - ?> -
-
-
- -
- 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true'); - echo form_input($data); - ?> -
-
-
- -
- 'Supplier'); - //print_r( $options); - - if(!empty($POType)) - { - foreach ($SupplierName as $SID): - - - $options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName; +
- endforeach; - } - - echo form_dropdown('MaterialCode', $options,set_value('MaterialCode'),'id="MaterialCode"' ,'class="form-control required"','required="true"'); +
+
+

Service Purchase Order.

+
+
+
+
+
+ +
+ 'Requistion No'); + //print_r( $options); - ?> -
-
-
- -
- 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true'); - echo form_input($data); - ?> -
-
-
- -
- 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true'); - echo form_input($data); - ?> -
-
-
-
-
- -
-
-
-
-
-
- -
-
- + if (!empty($POType)) { + foreach ($SupplierName as $SID) : + + + $options[$SID->SupplierID] = $SID->SupplierID . ' ' . ' - ' . ' ' . $SID->SupplierName; + + endforeach; + } + + echo form_dropdown('MaterialCode', $options, set_value('MaterialCode'), 'id="MaterialCode"', 'class="form-control required"', 'required="true"'); + + ?>
- -
+
+
+
+
+
- -
- -
- 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true'); - echo form_input($data); - ?> -
-
-
- -
- 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true'); - echo form_input($data); - ?> -
-
-
- -
- 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true'); - echo form_input($data); - ?> -
-
-
-
-
- -
- 'Item Code'); - //print_r( $options); - - if(!empty($POType)) - { - foreach ($SupplierName as $SID): - - - $options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName; + +
- endforeach; - } - - echo form_dropdown('MaterialCode', $options,set_value('MaterialCode'),'id="MaterialCode"' ,'class="form-control required"','required="true"'); + - -
- -
- - -
-
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 R NoItem NameQuantityUOMRateTax %Total
 1001Waste SandTon100HighNo Change
 2002ResinLitre50HighChange
 3003ResinLitre100HighChange
-
- -
- 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true'); - echo form_input($data); - ?> + + +
+
+
-
-
- - - -
-
-
-
- + + +
+ + + +   + R No + Item Name + Quantity + UOM + Rate + Tax % + Total + + + + +   + 1 + 001 + Waste Sand + Ton + 100 + High + No Change + + +   + 2 + 002 + Resin + Litre + 50 + High + Change + + +   + 3 + 003 + Resin + Litre + 100 + High + Change + + + + +
+ +
+ 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'required' => 'true'); + echo form_input($data); + ?> +
+
+
+ + + +
+
+
+
+
\ No newline at end of file diff --git a/app/Views/viewinwardgateregister.php b/app/Views/viewinwardgateregister.php index 878b9108..2f2f21bf 100644 --- a/app/Views/viewinwardgateregister.php +++ b/app/Views/viewinwardgateregister.php @@ -257,10 +257,10 @@
- @@ -345,7 +345,7 @@
@@ -365,7 +365,7 @@
- Close + Close

@@ -386,7 +386,7 @@
- Close + Close

@@ -430,7 +430,7 @@ @@ -468,8 +468,7 @@ @@ -607,10 +606,10 @@ var dcd2 = (String(dcd.getDate()).padStart(2, '0') + '-' + (String(dcd.getMonth() + 1).padStart(2, '0')) + '-' + dcd.getFullYear()); $("#Invoice_Date").val(dcd2); console.log(item.MaterialRcvdDate) - var Mat_rcv_date = (item.MaterialRcvdDate === null) ? ' ' : formatDateTime(new Date(item.MaterialRcvdDate)); - $("#MaterialRcvdDate").val(GrossWeightDate); + var Mat_rcv_date = (item.MaterialRcvdDate === null) ? ' ' : formatDateTime(item.MaterialRcvdDate,1); + $("#MaterialRcvdDate").val(Mat_rcv_date); console.log(item.MaterialRcvdDate) - var gross_rcv_date = (item.GrossWeightDate === null) ? ' ' : formatDateTime(new Date(item.GrossWeightDate)); + var gross_rcv_date = (item.GrossWeightDate === null) ? ' ' : formatDateTime(item.GrossWeightDate,2); $("#ser").val(item.ServiceDescription); i = i + 1; @@ -869,7 +868,7 @@ function constructSentence(record) { let str = record.field; let fieldName = str.replace(/([a-z])([A-Z])/g, '$1 $2'); - let sentence = record.FullName + ' on ' + formatDateTime(record.history_dated) + " " + fieldName + " "; + let sentence = record.FullName + ' on ' + formatDateTime(record.history_dated,2) + " " + fieldName + " "; if (parseInt(record.is_add) === 1) { sentence += record.new_data + " was added."; } else if (parseInt(record.is_edit) === 1) { @@ -1150,9 +1149,9 @@ function deleteBill(Billno,i){ // Set modal inputs with the retrieved values $("#GrossWeight").val(v1); - $("#GrossWeightDate").val(v2); + $("#GrossWeightDate").val(formatDateTime(v2,2)); $("#TareWeight").val(v3); - $("#TareWeightDate").val(v4); + $("#TareWeightDate").val(formatDateTime(v4,2) ); $("#NetWeight").val(v5); $("#CurrentInx").val(inx); @@ -1257,30 +1256,52 @@ function deleteBill(Billno,i){