Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
4ea83bb174
@ -812,7 +812,9 @@ function viewIGRDetails()
|
||||
$DriverName = $this->request->getPost('driver');
|
||||
$DriverMobileNumber = $this->request->getPost('driver_mobile');
|
||||
|
||||
$IGRStatus = (int)$this->request->getPost('status') == 1 ? IGR_CREATED : IGR_DRAFT;
|
||||
$PreIGRStatus = (int)$this->request->getPost('status') == 1 ? IGR_CREATED : IGR_DRAFT;
|
||||
$IsThisOpenOrderPO = $this->request->getPost('hiddenIsOpenOrder');
|
||||
$IGRStatus = ((int)$IsThisOpenOrderPO == 1) ? IGR_DRAFT : $PreIGRStatus;
|
||||
|
||||
# Here decode the tableData for IGRLineitem
|
||||
$tableData = $this->request->getPost('tableData');
|
||||
@ -942,23 +944,26 @@ function viewIGRDetails()
|
||||
|
||||
# Step 4.3 : IGRlineitem affectedRow have value and MaterialCode have value means
|
||||
# : updated the polineitem Qty
|
||||
$OldQuantityAsPerInvoice = $this->inwardgateregister_model->getOldIgrReceivedQty($IGRNo, $igrItemNo,$MaterialCode);
|
||||
if(!$IsThisOpenOrderPO){
|
||||
$OldQuantityAsPerInvoice = $this->inwardgateregister_model->getOldIgrReceivedQty($IGRNo, $igrItemNo,$MaterialCode);
|
||||
|
||||
if ($MaterialCode != '' && ((int)$quantityAsPerInvoice != (int)$OldQuantityAsPerInvoice)) {
|
||||
|
||||
$PolineitemQty = $this->inwardgateregister_model->getPOLineItemReceivedQty($PONo, $MaterialCode);
|
||||
$POReceivedQuantity = 0.00;
|
||||
if (count($PolineitemQty) > 0) {
|
||||
foreach ($PolineitemQty as $key) {
|
||||
$POReceivedQuantity = $key->ReceivedQuantity;
|
||||
if ($MaterialCode != '' && ((int)$quantityAsPerInvoice != (int)$OldQuantityAsPerInvoice)) {
|
||||
|
||||
$PolineitemQty = $this->inwardgateregister_model->getPOLineItemReceivedQty($PONo, $MaterialCode);
|
||||
$POReceivedQuantity = 0.00;
|
||||
if (count($PolineitemQty) > 0) {
|
||||
foreach ($PolineitemQty as $key) {
|
||||
$POReceivedQuantity = $key->ReceivedQuantity;
|
||||
}
|
||||
}
|
||||
|
||||
$totalReceivedqty = ($POReceivedQuantity - $OldQuantityAsPerInvoice) + $quantityAsPerInvoice;
|
||||
$POLineItem = array('ReceivedQuantity' => $totalReceivedqty);
|
||||
$this->inwardgateregister_model->UpdatePOLineItem($POLineItem, $PONo, $MaterialCode);
|
||||
}
|
||||
|
||||
$totalReceivedqty = ($POReceivedQuantity - $OldQuantityAsPerInvoice) + $quantityAsPerInvoice;
|
||||
$POLineItem = array('ReceivedQuantity' => $totalReceivedqty);
|
||||
$this->inwardgateregister_model->UpdatePOLineItem($POLineItem, $PONo, $MaterialCode);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# Step 4.3 : Updating IGRlineitem
|
||||
$updateigrlineitem = $this->inwardgateregister_model->updateIGRLineItem($igrline, $igrItemNo);
|
||||
log_message('error', "lineitem updated successfully: " . $updateigrlineitem);
|
||||
|
||||
@ -2234,7 +2234,7 @@ join t_purchaseorder_master po on po.PONO = pl.PONO
|
||||
join t_supplierdetailsn sup on sup.SupplierID=po.SupplierID
|
||||
join t_materialmaster mm on mm.MaterialCode=pl.MaterialCode
|
||||
join t_configdetails cd on cd.key = mm.Category
|
||||
where po.Status != 'ST030' and po.Status = 'ST026'
|
||||
where po.Status != 'ST030' and po.Status = 'ST026 and po.IsOpenOrder != '1'
|
||||
";
|
||||
if ($cname != '') {
|
||||
|
||||
|
||||
@ -1441,6 +1441,7 @@
|
||||
if (fileInput && fileInput.files.length > 0) {
|
||||
var file = fileInput.files[0];
|
||||
formData.append('WeightFile', file);
|
||||
$("#txtWeightFileName" + inx).val(file.name);
|
||||
} else {
|
||||
console.log("No file selected or file input not found.");
|
||||
}
|
||||
|
||||
@ -479,8 +479,6 @@
|
||||
isOpenOrder = parseInt(obj.IsOpenOrder ? obj.IsOpenOrder : "0", 2);
|
||||
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "" : "Open";
|
||||
$('.help-block').text(formatted_IsOpenOrder);
|
||||
var button_text_for_IGRDraftLink = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "Save as Draft IGR" : "Save as Open IGR";
|
||||
$('#IGRDraftLink').text(button_text_for_IGRDraftLink);
|
||||
//$("#Add").val(obj.Address);
|
||||
$("#del").val(obj.DeliveryDate);
|
||||
//$("#ser").val(obj.ServiceDescription);
|
||||
@ -683,7 +681,16 @@
|
||||
// InvoiceQty
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
} else if(formatted_IsOpenOrder == 1){
|
||||
// alert("Here Handling Open Order");
|
||||
console.log(InvoiceQty + "Here Handling Open Order");
|
||||
$('#PendingQuantity' + Rowid).text(0.00);
|
||||
$('#txtPendingQty' + Rowid).val(0.00);
|
||||
$("#ReceivedQuantity" + Rowid).val(InvoiceQty);
|
||||
$("#txtQuantityAsPerInvoice" + Rowid).val((InvoiceQty));
|
||||
return true;
|
||||
} else{
|
||||
// alert("None Of the Above");
|
||||
console.log(InvoiceQty + RecQty);
|
||||
$('#PendingQuantity' + Rowid).text(0.00);
|
||||
$('#txtPendingQty' + Rowid).val(0.00);
|
||||
@ -913,8 +920,6 @@
|
||||
isOpenOrder = parseInt(obj.IsOpenOrder ? obj.IsOpenOrder : "0", 2);
|
||||
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "" : "Open";
|
||||
$('.help-block').text(formatted_IsOpenOrder);
|
||||
var button_text_for_IGRDraftLink = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "Save as Draft IGR" : "Save as Draft IGR";
|
||||
$('#IGRDraftLink').text(button_text_for_IGRDraftLink);
|
||||
//$("#Add").val(obj.Address);
|
||||
$("#del").val(obj.DeliveryDate);
|
||||
//$("#ser").val(obj.ServiceDescription);
|
||||
|
||||
@ -234,6 +234,7 @@
|
||||
<th>Driver</th>
|
||||
<th>Transporter</th>
|
||||
<th>IGR Status</th>
|
||||
<!-- <th>Remark</th> -->
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -296,6 +297,7 @@
|
||||
<td><?php echo $record->DriverName ?></td>
|
||||
<td><?php echo $record->TransporterName ?></td>
|
||||
<td><?php if($record->IGRStatus == 'ST029'){ echo 'Cancel'; } elseif($record->IGRStatus == 'ST074'){ echo 'Draft'; } else{ echo 'Completed'; } ?></td>
|
||||
<!-- <td style="width: 3% !important;"><?php // echo $record->Remark; ?></td> -->
|
||||
<td>
|
||||
|
||||
|
||||
@ -1206,8 +1208,6 @@
|
||||
console.log(isOpenOrder);
|
||||
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "" : "Open";
|
||||
$('.help-block').text(formatted_IsOpenOrder);
|
||||
var button_text_for_IGRDraft = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "Save as Draft IGR" : "Save as Open IGR";
|
||||
$('#draftIGR').text(button_text_for_IGRDraft);
|
||||
$("#hiddenIsOpenOrder").val(isOpenOrder);
|
||||
$("#Vehicle_No").val(item.VehicleNo);
|
||||
$("#Transporter_Id").val(item.TransporterId);
|
||||
@ -1546,7 +1546,7 @@
|
||||
|
||||
var igrno = $("#IGRNO1").val();
|
||||
var pono = $("#PONO1").val();
|
||||
var status = 1;
|
||||
var status = 1; // Some Handle This 1 - Generate IGR
|
||||
var tableData = [];
|
||||
$('#tbleIGRAppend tr').each(function(index) {
|
||||
var row = $(this);
|
||||
@ -1843,7 +1843,8 @@
|
||||
$("#WeightCalculator").on("shown.bs.modal", function(e) {
|
||||
var inx = $(e.relatedTarget).data('index');
|
||||
var material = $(e.relatedTarget).data('material');
|
||||
// console.log(material);// toolbox
|
||||
console.log("xyz");
|
||||
console.log(material);// toolbox
|
||||
var modal = $(this);
|
||||
|
||||
|
||||
@ -1924,10 +1925,16 @@
|
||||
formData.append('NetWeight', v5);
|
||||
formData.append('IGR', IGRNO1);
|
||||
formData.append('IGRlineitem', txtIGRLineItem);
|
||||
$("#txtGrossWeight" + inx).val(v1);
|
||||
$("#txtGrossWeightDate" + inx).val(v2);
|
||||
$("#txtTareWeight" + inx).val(v3);
|
||||
$("#txtTareWeightDate" + inx).val(v4);
|
||||
$("#txtNetWeight" + inx).val(v5);
|
||||
|
||||
if (fileInput && fileInput.files.length > 0) {
|
||||
var file = fileInput.files[0];
|
||||
formData.append('WeightFile', file);
|
||||
$("#txtWeightFileName" + inx).val(file.name);
|
||||
console.log("File selected:", file.name);
|
||||
} else {
|
||||
console.log("No file selected.");
|
||||
@ -1947,6 +1954,13 @@
|
||||
console.log("Upload error:", error);
|
||||
}
|
||||
});
|
||||
|
||||
$("#GrossWeight").val('');
|
||||
$("#GrossWeightDate").val('');
|
||||
$("#TareWeight").val('');
|
||||
$("#TareWeightDate").val('');
|
||||
$("#NetWeight").val('');
|
||||
$("#WeightFile").val('');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user