Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
4ec0e24c61
@ -230,6 +230,7 @@ $routes->post('emergencypurchaseorder/addNewRevenuePurchaseOrder','Emergencypurc
|
||||
|
||||
|
||||
$routes->post('purchaseorder/addNewPurchaseOrder', 'Purchaseorder::addNewPurchaseOrder');
|
||||
$routes->post('purchaseorder/DeletePODetails', 'Purchaseorder::DeletePODetails');
|
||||
$routes->post('purchaseorder/addNewCapitalPurchaseOrder', 'Purchaseorder::addNewCapitalPurchaseOrder');
|
||||
$routes->post('purchaseorder/addNewImportPurchaseOrder', 'Purchaseorder::addNewImportPurchaseOrder');
|
||||
$routes->post('servicepurchaseorder/addNewServicePurchaseOrder', 'Servicepurchaseorder::addNewServicePurchaseOrder');
|
||||
|
||||
@ -1215,8 +1215,6 @@ class Purchaseorder extends BaseController
|
||||
//This used to Edit the Revenue Purchase Order
|
||||
function EditRevenuePurchaseOrder()
|
||||
{
|
||||
|
||||
|
||||
$PONO = $this->request->getPost('txtPONO');
|
||||
$POdt = $this->request->getPost('PODate');
|
||||
$PODate = get_date_time_format($POdt);
|
||||
@ -1446,6 +1444,7 @@ class Purchaseorder extends BaseController
|
||||
if ($SkipInsert == "False") {
|
||||
|
||||
if (strlen((string)$POLineItemNo) == 0) {
|
||||
|
||||
} else {
|
||||
|
||||
$LineItemNo = $POLineItemNo;
|
||||
@ -1454,10 +1453,12 @@ class Purchaseorder extends BaseController
|
||||
|
||||
$POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO, $POLineItemNo, $POLineItemList);
|
||||
}
|
||||
$isExists = $this->purchaseorder_model->LineItemExistsinRevenueTax($LineItemNo);
|
||||
if (count($isExists) == 0) {
|
||||
} else {
|
||||
|
||||
$isExists = $this->purchaseorder_model->LineItemExistsinRevenueTax($LineItemNo);
|
||||
|
||||
if (is_array($isExists) && count($isExists) == 0) {
|
||||
|
||||
} else {
|
||||
$RevenueTaxList = array('DiscountType' => $DiscountType, 'DiscountValue' => $DiscountValue, 'AfterDiscount' => $AfterDiscount, 'PackagingType' => $PackagingType, 'PackagingValue' => $PackagingValue, 'PackagingCalulatedOn' => $PackagingOption, 'AfterPackagingValue' => $AfterPackagingValue, 'FreightType' => $FreightType, 'FreightValue' => $FreightValue, 'AfterFreightValue' => $AfterFreightValue, 'Insurance' => $InsuranceValue, 'TotalValue' => $TotalOrderValue, 'UpdateBY' => $updatedBy, 'UpdatedOn' => $updateddt, 'CGST' => $Cgst, 'AfterCGST' => $AfterCgst, 'SGST' => $Sgst, 'AfterSGST' => $AfterSgst, 'IGST' => $Igst, 'AfterIGST' => $AfterIgst, 'CreatedBy' => $updatedBy, 'NoOfTrip' => $NOOfTrip);
|
||||
$this->purchaseorder_model->updateRevenueTax($LineItemNo, $RevenueTaxList);
|
||||
}
|
||||
|
||||
@ -241,18 +241,18 @@ class Servicepurchaseorder extends BaseController
|
||||
|
||||
if ($file->isValid() && !$file->hasMoved()) {
|
||||
$path = ROOTPATH . 'public/uploads/POfiles/';
|
||||
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
||||
if (!is_dir($path)) {
|
||||
mkdir($path, 0777, true);
|
||||
}
|
||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
||||
log_message('error', 'File already exists in the database' . $requestfilename);
|
||||
$requestfilename = "";
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$file->move($path, $requestfilename);
|
||||
}
|
||||
} else {
|
||||
$requestfilename = "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// PO Master
|
||||
@ -391,7 +391,6 @@ class Servicepurchaseorder extends BaseController
|
||||
$updatedBy = $this->session->get('userId');
|
||||
$RowCount = $this->request->getPost('txtRowCount');
|
||||
$DeletedRow = $this->request->getPost('txtDeletedRow');
|
||||
|
||||
$comma_separated = explode(':', (string)$DeletedRow);
|
||||
|
||||
$updateddt = get_current_date_time();
|
||||
@ -414,11 +413,12 @@ class Servicepurchaseorder extends BaseController
|
||||
if (!empty($requestfilename)) {
|
||||
if ($file && $file->isValid() && !$file->hasMoved()) {
|
||||
$path = ROOTPATH . 'public/uploads/POfiles/';
|
||||
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
||||
if (!is_dir($path)) {
|
||||
mkdir($path, 0777, true);
|
||||
}
|
||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
||||
log_message('error', 'File already exists in the database' . $requestfilename);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$file->move($path, $requestfilename);
|
||||
$POList['POFile'] = $requestfilename;
|
||||
}
|
||||
@ -559,13 +559,45 @@ class Servicepurchaseorder extends BaseController
|
||||
|
||||
|
||||
if (trim((string)$POType) == SERVICE) {
|
||||
// Check if LineItemExists() returns a valid array
|
||||
$isExists = $this->purchaseorder_model->LineItemExists($LineItemNo);
|
||||
if (is_array($isExists) && count($isExists) == 0) {
|
||||
$ServiceTaxList = array('LineItemNo' => $LineItemNo, 'CGST' => $Cgst, 'After_CGST' => $AfterCgst, 'SGST' => $Sgst, 'After_SGST' => $AfterSgst, 'IGST' => $Igst, 'After_IGST' => $AfterIgst, 'TotalValue' => $TotalOrderValue, 'CreatedBy' => $updatedBy, 'CreatedDate' => $updateddt, 'otherallowance' => $OtherAmt);
|
||||
|
||||
// Ensure $isExists is an array, or initialize it as an empty array
|
||||
if (!is_array($isExists)) {
|
||||
$isExists = [];
|
||||
}
|
||||
|
||||
if (count($isExists) == 0) {
|
||||
// Insert new service tax record
|
||||
$ServiceTaxList = array(
|
||||
'LineItemNo' => $LineItemNo,
|
||||
'CGST' => $Cgst,
|
||||
'After_CGST' => $AfterCgst,
|
||||
'SGST' => $Sgst,
|
||||
'After_SGST' => $AfterSgst,
|
||||
'IGST' => $Igst,
|
||||
'After_IGST' => $AfterIgst,
|
||||
'TotalValue' => $TotalOrderValue,
|
||||
'CreatedBy' => $updatedBy,
|
||||
'CreatedDate' => $updateddt,
|
||||
'otherallowance' => $OtherAmt
|
||||
);
|
||||
|
||||
$this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
||||
} else {
|
||||
$ServiceTaxList1 = array('CGST' => $Cgst, 'After_CGST' => $AfterCgst, 'SGST' => $Sgst, 'After_SGST' => $AfterSgst, 'IGST' => $Igst, 'After_IGST' => $AfterIgst, 'TotalValue' => $TotalOrderValue, 'UpdateBY' => $updatedBy, 'UpdatedOn' => $updateddt, 'otherallowance' => $OtherAmt);
|
||||
// Update existing service tax record
|
||||
$ServiceTaxList1 = array(
|
||||
'CGST' => $Cgst,
|
||||
'After_CGST' => $AfterCgst,
|
||||
'SGST' => $Sgst,
|
||||
'After_SGST' => $AfterSgst,
|
||||
'IGST' => $Igst,
|
||||
'After_IGST' => $AfterIgst,
|
||||
'TotalValue' => $TotalOrderValue,
|
||||
'UpdateBY' => $updatedBy,
|
||||
'UpdatedOn' => $updateddt,
|
||||
'otherallowance' => $OtherAmt
|
||||
);
|
||||
|
||||
$this->purchaseorder_model->updateServiceTax($LineItemNo, $ServiceTaxList1);
|
||||
}
|
||||
|
||||
@ -1012,12 +1012,12 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
|
||||
$subQuery = 'SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,LineItem.Per,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,LineItem.Quantity,ReceivedQuantity,Rate,LineItem.Status,(LineItem.Quantity *Rate) as BasicValue ,(After_CGST + After_SGST + After_IGST) as Taxamount,Dept.DepartmentName
|
||||
,TotalValue,CGST,After_CGST,SGST,After_SGST,IGST,After_IGST,otherallowance,LineItem.CostCenterCode,LineItem.ServiceFrequency,LineItem.ServiceMaterialDescription,Req.Schedule_Type,Req.NumberOfService,Req.Service_Period,ReqDet.MaterialDescription
|
||||
FROM t_purchaseorder_lineitem LineItem
|
||||
join t_materialmaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
join t_service_tax Tax on Tax.LineItemNo = LineItem.LineItemNo
|
||||
join t_requestion_master Req on Req.ReqNo = LineItem.ReqNo
|
||||
join t_requestion_details ReqDet on ReqDet.ReqNo = LineItem.ReqNo and LineItem.MaterialCode = ReqDet.MaterialCode
|
||||
left join t_materialmaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
left join t_service_tax Tax on Tax.LineItemNo = LineItem.LineItemNo
|
||||
left join t_requestion_master Req on Req.ReqNo = LineItem.ReqNo
|
||||
left join t_requestion_details ReqDet on ReqDet.ReqNo = LineItem.ReqNo and LineItem.MaterialCode = ReqDet.MaterialCode
|
||||
left join t_employee_details emp on Req.Requestedby = emp.EmpID
|
||||
join t_departmentdetails Dept on Req.RequestedDept = Dept.DEPCode
|
||||
left join t_departmentdetails Dept on Req.RequestedDept = Dept.DEPCode
|
||||
where LineItem.PONO =?';
|
||||
|
||||
$query = $this->db->query($subQuery, array($PONO));
|
||||
|
||||
@ -3019,21 +3019,21 @@ if (!empty($getlogpodtl)) {
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
// if (data) {
|
||||
// // $('#content').loader('hide');
|
||||
// alert(data);
|
||||
// $('#txtRowCount').val('');
|
||||
// $('#txtDeletedRow').val('');
|
||||
// $('#txtStatus').val('');
|
||||
// $('#SpcialInstruction').val('');
|
||||
// $('#txtDeliveryAddress').val('')
|
||||
// window.location = "purchaseorderListing";
|
||||
// console.log(data);
|
||||
if (data) {
|
||||
// $('#content').loader('hide');
|
||||
alert(data);
|
||||
$('#txtRowCount').val('');
|
||||
$('#txtDeletedRow').val('');
|
||||
$('#txtStatus').val('');
|
||||
$('#SpcialInstruction').val('');
|
||||
$('#txtDeliveryAddress').val('')
|
||||
window.location = "purchaseorderListing";
|
||||
|
||||
// } else {
|
||||
// // $('#content').loader('hide');
|
||||
// alert("Error");
|
||||
// }
|
||||
} else {
|
||||
// $('#content').loader('hide');
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -4000,18 +4000,12 @@ if (!empty($getlogpodtl)) {
|
||||
<td align="left">${Reqnumber}</td>
|
||||
<td align="left">${materialCode}</td>
|
||||
<td align="left">${materialName}</td>
|
||||
<td align="right">${quantity}</td>
|
||||
<td align="left">${quantity}</td>
|
||||
<td align="left">${uom}</td>
|
||||
<td align="right">${itemRate}</td>
|
||||
<td align="right">${PER}</td>
|
||||
<td align="right">${service_description}</td>
|
||||
<td align="right">${basicval}</td>
|
||||
<td align="right">${TotalTaxValue}</td>
|
||||
<td align="right">${TotalOrderValue}</td>
|
||||
<td align="right">${quantity}</td>
|
||||
<td align="right">0</td>
|
||||
<td align="right">${quantity}</td>
|
||||
|
||||
<td align="left">${itemRate}</td>
|
||||
<td align="left">${basicval}</td>
|
||||
<td align="left">${TotalTaxValue}</td>
|
||||
<td align="left">${TotalOrderValue}</td>
|
||||
<td>
|
||||
<a data-target='#EDITREVENUE' data-id="${temp}" data-userid="${temp}" data-toggle="modal" href="#EDITREVENUE">
|
||||
<i class="ri-pencil-fill"></i>
|
||||
@ -4891,18 +4885,18 @@ if (!empty($getlogpodtl)) {
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(data) {
|
||||
// console.log(data);
|
||||
console.log(data);
|
||||
if (data) {
|
||||
alert(data);
|
||||
$('#txtRowCount').val('');
|
||||
$('#txtDeletedRow').val('');
|
||||
$('#txtStatus').val('');
|
||||
$('#SpcialInstruction').val('');
|
||||
$('#txtDeliveryAddress').val('')
|
||||
window.location = "purchaseorderListing";
|
||||
// alert(data);
|
||||
// $('#txtRowCount').val('');
|
||||
// $('#txtDeletedRow').val('');
|
||||
// $('#txtStatus').val('');
|
||||
// $('#SpcialInstruction').val('');
|
||||
// $('#txtDeliveryAddress').val('')
|
||||
// window.location = "purchaseorderListing";
|
||||
|
||||
} else {
|
||||
alert("Error");
|
||||
alert("Something went wrong");
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@ -1166,13 +1166,13 @@ if (!empty($getlogpodtl)) {
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
|
||||
<div align="right"><br>
|
||||
<div>
|
||||
<div align="right">
|
||||
<div class="form-group col-md-3">
|
||||
<input type="file" class="form-control" name="POFile" id="POFile">
|
||||
<?php if ($PrePOFile) { ?>
|
||||
<label><a title="previously uploaded PO File" href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
|
||||
<?php } ?>
|
||||
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br><br>
|
||||
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" />
|
||||
</div>
|
||||
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
||||
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
||||
@ -1211,10 +1211,8 @@ if (!empty($getlogpodtl)) {
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-row p-3" align="left" style="padding-right:10px">
|
||||
|
||||
<div class="col-md-5 col-md-offset-7" align="right"><br />
|
||||
<br><br>
|
||||
<div class="form-group col-md-12" align="left" style="padding-right:10px">
|
||||
<div class="col-md-5 col-md-offset-7" align="left"><br />
|
||||
<label>Request On :</label><?php echo $Reqon; ?><br />
|
||||
<label>Request By :</label><?php echo $RequesterName; ?><br />
|
||||
<label>Status : </label><?php
|
||||
|
||||
@ -315,7 +315,7 @@ if (empty($Status)) {
|
||||
/* MSG*/
|
||||
var answer = confirm(strMsg);
|
||||
if (answer) {
|
||||
$('#content').loader('show');
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
data: {
|
||||
PONO: PO,
|
||||
@ -326,7 +326,7 @@ if (empty($Status)) {
|
||||
url: "<?php echo base_url() ?>purchaseorder/ReleasePO",
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
$('#content').loader('hide');
|
||||
$('#loader').hide();
|
||||
alert(data);
|
||||
location.reload();
|
||||
} else {
|
||||
@ -388,7 +388,7 @@ if (empty($Status)) {
|
||||
$("#txtSpcialInstruction").val('');
|
||||
$('#AlertImg').attr("style", "display:none;");
|
||||
|
||||
$('#content').loader('show');
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
data: {
|
||||
id: ReqId
|
||||
@ -397,8 +397,8 @@ if (empty($Status)) {
|
||||
dataType: 'json',
|
||||
url: "<?php echo base_url() ?>requisitionform/ViewRequest",
|
||||
success: function(json) {
|
||||
// success:function(data) {
|
||||
$('#content').loader('hide');
|
||||
|
||||
$('#loader').hide();
|
||||
//alert(data);
|
||||
$("#ReqType").val(json.Requist[0]['ReqType']);
|
||||
$("#ReqBy").val(json.Requist[0]['Requestedby']);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user