Emergency PO changes-1 vadivel J 03-12--2024
This commit is contained in:
parent
7ad0d2853c
commit
bef33dc5cd
@ -297,34 +297,22 @@ class Emergencypurchaseorder extends BaseController
|
|||||||
}
|
}
|
||||||
if ($POStatus == SPECIAL_PO) {
|
if ($POStatus == SPECIAL_PO) {
|
||||||
|
|
||||||
$count = $this->request->getPost('hidecounters');
|
$serviceFilesLength = $this->request->getPost('serviceFilesLength');
|
||||||
$constant = $this->request->getPost('hideconstants');
|
$file = $this->request->getFiles();
|
||||||
|
|
||||||
|
|
||||||
|
if($serviceFilesLength > 0){ $listOfFiles = $serviceFilesLength ;}
|
||||||
|
|
||||||
$arr = [];
|
$arr = [];
|
||||||
$prefile = array();
|
$prefile = array();
|
||||||
|
|
||||||
for ($i = 1; $i <= $constant; $i++) {
|
for ($i = 1; $i <= $listOfFiles; $i++) {
|
||||||
|
|
||||||
$file = $this->request->getFile('browseFiles' . $i);
|
$file = $this->request->getFile('browseFiles' . $i);
|
||||||
$requestfilename = $file->getName();
|
$requestfilename = $file->getName();
|
||||||
|
|
||||||
if (!empty($requestfilename)) {
|
if (!empty($requestfilename)) {
|
||||||
|
|
||||||
$files = str_replace(" ", "", $requestfilename);
|
|
||||||
|
|
||||||
$fcount = 0;
|
|
||||||
|
|
||||||
foreach ($prefile as $value) {
|
|
||||||
|
|
||||||
if ($value == $files) {
|
|
||||||
|
|
||||||
$fcount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($fcount == 0) {
|
|
||||||
|
|
||||||
|
|
||||||
if ($file->isValid() && !$file->hasMoved()) {
|
if ($file->isValid() && !$file->hasMoved()) {
|
||||||
$path = ROOTPATH.'public/uploads/BillFiles/';
|
$path = ROOTPATH.'public/uploads/BillFiles/';
|
||||||
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
||||||
@ -334,28 +322,14 @@ class Emergencypurchaseorder extends BaseController
|
|||||||
//echo $Picture;
|
//echo $Picture;
|
||||||
$arr[] = array($Picture);
|
$arr[] = array($Picture);
|
||||||
}
|
}
|
||||||
|
$prefile[] = trim($requestfilename);
|
||||||
$prefile[] = $files;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//print_r($arr);
|
|
||||||
if (!empty($arr)) {
|
if (!empty($arr)) {
|
||||||
foreach ($arr as $ma) {
|
foreach ($arr as $filename) {
|
||||||
|
|
||||||
|
|
||||||
$index = 0;
|
|
||||||
foreach ($ma as $key => $value) {
|
|
||||||
$index++;
|
|
||||||
if ($index == 1) {
|
|
||||||
$filename = $value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!empty($filename)) {
|
|
||||||
|
|
||||||
$myfile = array('FilePath' => $filename, 'PONO' => $PONO);
|
$myfile = array('FilePath' => $filename, 'PONO' => $PONO);
|
||||||
$this->purchaseorder_model->fileupload($myfile);
|
$this->purchaseorder_model->fileupload($myfile);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -740,14 +714,9 @@ class Emergencypurchaseorder extends BaseController
|
|||||||
$igrDetails = array('IGRNO' => $IGRNO, 'MaterialCode' => $MaterialCode, 'QuantityAsPerInvoice' => $QuantityAsPerInvoice, 'Remarks' => $Remarks, 'IGRItemStatus' => $IGRItemStatus, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt);
|
$igrDetails = array('IGRNO' => $IGRNO, 'MaterialCode' => $MaterialCode, 'QuantityAsPerInvoice' => $QuantityAsPerInvoice, 'Remarks' => $Remarks, 'IGRItemStatus' => $IGRItemStatus, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt);
|
||||||
|
|
||||||
|
|
||||||
//print_r($igrDetails);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
|
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
|
||||||
$IGRItemNo = !empty($igrD) ? $igrD : '';
|
$IGRItemNo = !empty($igrD) ? $igrD : '';
|
||||||
|
|
||||||
//echo $IGRItemNo;
|
|
||||||
$MaterialstockHistoryadd = array('Ref_No' => $IGRItemNo, 'MaterialCode' => $MaterialCode, 'Transaction_type' => 'Add', 'Ref_Type' => 'IGR', 'SupplierID' => $SupplierID, 'Quantity' => $QuantityAsPerInvoice, 'ItemValue' => $itemRate, 'CreatedBy' => $CreatedBy, 'CreatedOn' => $createddt);
|
$MaterialstockHistoryadd = array('Ref_No' => $IGRItemNo, 'MaterialCode' => $MaterialCode, 'Transaction_type' => 'Add', 'Ref_Type' => 'IGR', 'SupplierID' => $SupplierID, 'Quantity' => $QuantityAsPerInvoice, 'ItemValue' => $itemRate, 'CreatedBy' => $CreatedBy, 'CreatedOn' => $createddt);
|
||||||
|
|
||||||
|
|
||||||
@ -797,77 +766,52 @@ class Emergencypurchaseorder extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//$myfile = array('FilePath'=>$filename);
|
|
||||||
// $emergencyitemcode = $this->request->getPost('emergencyitemcode'.$i);
|
|
||||||
// ($this->request->getPost('materialCode'.$i));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$counts = $this->request->getPost('hidecounter');
|
$revenueFilesLength = $this->request->getPost('revenueFilesLength');
|
||||||
$constants = $this->request->getPost('hideconstant');
|
$serviceFilesLength = $this->request->getPost('serviceFilesLength');
|
||||||
|
|
||||||
$file = $this->request->getFiles();
|
$file = $this->request->getFiles();
|
||||||
|
|
||||||
dd($file);
|
|
||||||
|
|
||||||
$arr = [];
|
$arr = [];
|
||||||
$prefile = array();
|
$prefile = array();
|
||||||
|
|
||||||
for ($i = 1; $i <= $constants; $i++) {
|
$listOfFiles = 0 ;
|
||||||
|
|
||||||
|
if($revenueFilesLength > 0){ $listOfFiles = $revenueFilesLength ;}
|
||||||
|
if($serviceFilesLength > 0){ $listOfFiles = $serviceFilesLength ;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for ($i = 1; $i <= $listOfFiles; $i++) {
|
||||||
|
|
||||||
$file = $this->request->getFile('browseFiles' . $i);
|
$file = $this->request->getFile('browseFiles' . $i);
|
||||||
$requestfilename = $file->getName();
|
$requestfilename = $file->getName();
|
||||||
|
|
||||||
if (!empty($requestfilename)) {
|
if (!empty($requestfilename)) {
|
||||||
|
|
||||||
$files = str_replace(" ", "", $requestfilename);
|
if ($file->isValid() && !$file->hasMoved()){
|
||||||
|
|
||||||
$fcount = 0;
|
|
||||||
|
|
||||||
foreach ($prefile as $value) {
|
|
||||||
|
|
||||||
|
|
||||||
if ($value == $files) {
|
|
||||||
|
|
||||||
|
|
||||||
$fcount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($fcount == 0) {
|
|
||||||
if ($file->isValid() && !$file->hasMoved()) {
|
|
||||||
$path = ROOTPATH.'public/uploads/BillFiles/';
|
$path = ROOTPATH.'public/uploads/BillFiles/';
|
||||||
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
if(!is_dir($path)) { mkdir($path, 0777, true);}
|
||||||
$Picture = $file->getName();
|
$Picture = $file->getName();
|
||||||
$file->move($path,$Picture);
|
$file->move($path,$Picture);
|
||||||
}
|
}
|
||||||
//echo $Picture;
|
|
||||||
$arr[] = array($Picture);
|
|
||||||
}
|
|
||||||
|
|
||||||
$prefile[] = $files;
|
$arr[] = array($Picture);
|
||||||
|
|
||||||
|
$prefile[] = trim($requestfilename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($arr)) {
|
if (!empty($arr)) {
|
||||||
foreach ($arr as $ma) {
|
foreach ($arr as $filename) {
|
||||||
|
|
||||||
|
|
||||||
$index = 0;
|
|
||||||
$filename = null;
|
|
||||||
foreach ($ma as $key => $value) {
|
|
||||||
$index++;
|
|
||||||
if ($index == 1) {
|
|
||||||
$filename = $value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!empty($filename)) {
|
|
||||||
|
|
||||||
$myfile = array('FilePath' => $filename, 'PONO' => $PONO, 'IGRNO' => $IGRNO);
|
$myfile = array('FilePath' => $filename, 'PONO' => $PONO, 'IGRNO' => $IGRNO);
|
||||||
$this->purchaseorder_model->fileupload($myfile);
|
$this->purchaseorder_model->fileupload($myfile);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -2633,7 +2633,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
<div class="form-row" style="padding-bottom: 10px;">
|
<div class="form-row" style="padding-bottom: 10px;">
|
||||||
|
|
||||||
<div class=" col-md-8 px-2">
|
<div class=" col-md-8 px-2">
|
||||||
<label>Upload Purchase Order Bill </label>
|
<label>Upload IGR Bill </label>
|
||||||
<input type="button" class="btn btn-success" id="addmorebutton"
|
<input type="button" class="btn btn-success" id="addmorebutton"
|
||||||
value=" ADD FILES "><br>
|
value=" ADD FILES "><br>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user