issues fixes : ps
This commit is contained in:
parent
0e41548e2d
commit
d7bfa6f674
@ -546,6 +546,8 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$RecQtyvalue = $ReceivedQty[0]['ReceivedQuantity'];
|
||||
}
|
||||
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
$POLineItemList = array('PONO' => $NewPO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'ReceivedQuantity' => $RecQtyvalue, 'Quantity' => $Quantity, 'Per' => $per, 'ServiceMaterialDescription' => $servicematerialdescription, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $updatedBy, 'CreatedDate' => $updateddt, 'CostCenterCode' => $CostCenter, 'ServiceFrequency' => $ServiceFrequency, 'AmendedDetails' => $CAD);
|
||||
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
@ -815,6 +817,8 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$CAD = "<tr><td rowspan=" . $rowspanvalue . ">" . $MaterialCode . "-" . $MaterialName . "</td></tr>";
|
||||
$CAD .= $CAD2;
|
||||
}
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
|
||||
$POLineItemList = array('PONO' => $NewPO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'ServiceMaterialDescription' => $servicematerialdescription, 'CreatedBy' => $updatedBy, 'CreatedDate' => $updateddt, 'CostCenterCode' => $CostCenter, 'ServiceFrequency' => $ServiceFrequency, 'ReceivedQuantity' => $RecQtyvalue, 'AmendedDetails' => $CAD, 'Per' => $Per);
|
||||
|
||||
@ -1248,6 +1252,8 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$CAD = "<tr><td rowspan=" . $rowspanvalue . ">" . $MaterialCode . "</td></tr>";
|
||||
$CAD .= $CAD2;
|
||||
}
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
|
||||
$POLineItemList = array('PONO' => $NewPO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'CostCenterCode' => $CostCenter, 'AmendedDetails' => $CAD, 'Per' => $Per, 'ServiceMaterialDescription' => $CapitalItemDescrition);
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
@ -1636,6 +1642,8 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$CAD = "<tr><td rowspan=" . $rowspanvalue . ">" . $MaterialCode . "</td></tr>";
|
||||
$CAD .= $CAD2;
|
||||
}
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
|
||||
$POLineItemList = array('PONO' => $NewPO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'CostCenterCode' => $CostCenter, 'AmendedDetails' => $CAD, 'Per' => $per, 'ServiceMaterialDescription' => $specialinstruction);
|
||||
|
||||
|
||||
@ -257,6 +257,8 @@ class Emergencypurchaseorder extends BaseController
|
||||
$TotalOrderValue = $this->request->getPost('TotalOrderValue' . $i);
|
||||
$ServiceFrequency = $this->request->getPost('Frequency' . $i) . ' - ' . $this->request->getPost('FrequencyValue' . $i);
|
||||
$ServiceMaterialDescription = $this->request->getPost('ItemServiceDescription' . $i);
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
$SkipInsert = "False";
|
||||
if (count($comma_separated) > 0) {
|
||||
for ($j = 1; $j < count($comma_separated); $j++) {
|
||||
@ -524,6 +526,8 @@ class Emergencypurchaseorder extends BaseController
|
||||
$AfterCgst = $this->request->getPost('RevenueAfterCgst' . $i);
|
||||
$AfterSgst = $this->request->getPost('RevenueAfterSgst' . $i);
|
||||
$AfterIgst = $this->request->getPost('RevenueAfterIgst' . $i);
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
$SkipInsert = "False";
|
||||
if (count($comma_separated) > 0) {
|
||||
for ($j = 1; $j < count($comma_separated); $j++) {
|
||||
@ -1231,7 +1235,8 @@ class Emergencypurchaseorder extends BaseController
|
||||
$InsuranceValue = $this->request->getPost('Insval' . $i);
|
||||
$TotalOrderValue = $this->request->getPost('TotalOrderValue' . $i);
|
||||
$CostCenter = $this->request->getPost('costCode' . $i);
|
||||
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
$SkipInsert = "False";
|
||||
if (count($comma_separated) > 0) {
|
||||
for ($j = 1; $j < count($comma_separated); $j++) {
|
||||
@ -1398,7 +1403,8 @@ class Emergencypurchaseorder extends BaseController
|
||||
|
||||
|
||||
/*----------end--------------------*/
|
||||
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
|
||||
$SkipInsert = "False";
|
||||
if (count($comma_separated) > 0) {
|
||||
|
||||
@ -817,8 +817,8 @@ class Payslip extends BaseController
|
||||
|
||||
$load_driver_data[$i]->esi_amount = ($load_driver_data[$i]->esi_applicable == 1) ? ($basic) * $ESI_Rate / 100 : 0;
|
||||
$load_driver_data[$i]->pf_amount = ($load_driver_data[$i]->pf_applicable == 1) ? ($basic) * $PF_Rate / 100 : 0;
|
||||
$load_driver_data[$i]->total_cal_days = $get_last_date_of_the_month;
|
||||
|
||||
|
||||
}else {
|
||||
$PF_Rate = $load_driver_data[$i]->PF_Rate;
|
||||
$ESI_Rate = $load_driver_data[$i]->ESI_Rate;
|
||||
@ -873,6 +873,7 @@ class Payslip extends BaseController
|
||||
$empSalarySub = $loan;
|
||||
$salaryInCurrentday = $empSalaryAdd - $empSalarySub;
|
||||
$load_driver_data[$i]->driver_final_payment = $salaryInCurrentday+$shed+$diesel;
|
||||
$load_driver_data[$i]->total_cal_days = $get_last_date_of_the_month;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1226,7 +1226,8 @@ class Purchaseorder extends BaseController
|
||||
$AfterSgst = $this->request->getPost('RevenueAfterSgst' . $i);
|
||||
$AfterIgst = $this->request->getPost('RevenueAfterIgst' . $i);
|
||||
$LineitemAuditorNotes = $this->request->getPost('LineItemNoteForAuditor' . $i);
|
||||
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
$SkipInsert = "False";
|
||||
if (count($comma_separated) > 0) {
|
||||
for ($j = 1; $j < count($comma_separated); $j++) {
|
||||
@ -1437,7 +1438,8 @@ class Purchaseorder extends BaseController
|
||||
|
||||
$this->purchaseorder_model->insertlogpo($logpo);
|
||||
}
|
||||
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
$SkipInsert = "False";
|
||||
if (count($comma_separated) > 0) {
|
||||
for ($j = 1; $j < count($comma_separated); $j++) {
|
||||
@ -2111,6 +2113,8 @@ class Purchaseorder extends BaseController
|
||||
$per = $this->request->getPost('Per' . $i);
|
||||
$LineitemAuditorNotes = $this->request->getPost('LineItemNoteForAuditor' . $i);
|
||||
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
$SkipInsert = "False";
|
||||
if (count($comma_separated) > 0) {
|
||||
for ($j = 1; $j < count($comma_separated); $j++) {
|
||||
@ -2452,6 +2456,8 @@ class Purchaseorder extends BaseController
|
||||
//die();
|
||||
|
||||
$currencytypeID = $this->request->getPost('currencytype');
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
$SkipInsert = "False";
|
||||
if (count($comma_separated) > 0) {
|
||||
for ($j = 1; $j < count($comma_separated); $j++) {
|
||||
@ -2839,6 +2845,8 @@ class Purchaseorder extends BaseController
|
||||
$CapitalItemDescription = $this->request->getPost('CapitalItemDescrition' . $i);
|
||||
$Per = $this->request->getPost('per' . $i);
|
||||
$LineitemAuditorNotes = $this->request->getPost('LineItemNoteForAuditor' . $i);
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
$SkipInsert = "False";
|
||||
if (count($comma_separated) > 0) {
|
||||
for ($j = 1; $j < count($comma_separated); $j++) {
|
||||
@ -3189,7 +3197,8 @@ class Purchaseorder extends BaseController
|
||||
|
||||
/*----------end--------------------*/
|
||||
|
||||
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
$SkipInsert = "False";
|
||||
if (count($comma_separated) > 0) {
|
||||
for ($j = 1; $j < count($comma_separated); $j++) {
|
||||
@ -3279,7 +3288,8 @@ class Purchaseorder extends BaseController
|
||||
} else {
|
||||
$LineItemNo = $POLineItemNo;
|
||||
|
||||
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
|
||||
$POLineItemList = array('PONO' => $PONO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $CreateBy, 'CostCenterCode' => $CostCenter, 'ServiceMaterialDescription' => $CapitalItemDescription, 'Per' => $Per,'LineitemAuditorNotes'=>$LineitemAuditorNotes);
|
||||
$POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO, $LineItemNo, $POLineItemList);
|
||||
|
||||
@ -103,7 +103,7 @@ class Driver_model extends Model
|
||||
|
||||
function driverAttendanceForMonthlyPayInputs($from,$to){
|
||||
$builder = $this->db->table('t_driver_attendance')
|
||||
->select('t_driver_attendance.driver_id,driver_details.FirstName as driver_name,driver_details.is_driver,
|
||||
->select('t_driver_attendance.driver_id,driver_details.FirstName as driver_name,driver_details.is_driver,COUNT(DISTINCT t_driver_attendance.date) AS unique_days,
|
||||
DATE_FORMAT(date, "%M-%Y") AS month_year,COUNT(t_driver_attendance.load_type) AS no_of_loads,driver_details.*,t_emp_pay_data.PF_Rate,t_emp_pay_data.ESI_Rate')
|
||||
->select('SUM(t_driver_attendance.salary_amount) as monthly_salary_amount,
|
||||
SUM(t_driver_attendance.food_amount) as monthly_food_amount,
|
||||
|
||||
@ -2565,11 +2565,28 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
|
||||
|
||||
$query = $builder->get()->getRow();
|
||||
|
||||
$material_rate = $query ? $query->material_rate : null;
|
||||
$material_rate = $query ? $query->material_rate : 0;
|
||||
return $material_rate;
|
||||
|
||||
}
|
||||
|
||||
public function updateMaterialRate($code, $incoming_rate)
|
||||
{
|
||||
$default_rate = $this->materialRate($code);
|
||||
|
||||
if ($incoming_rate == $default_rate) {
|
||||
return 1;
|
||||
} else {
|
||||
$this->db->table('t_materialmaster')
|
||||
->where('MaterialCode', $code)
|
||||
->set('material_rate', $incoming_rate)
|
||||
->update();
|
||||
|
||||
return $this->db->affectedRows();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function lastPONO()
|
||||
{
|
||||
$query = $this->db->table('t_purchaseorder_master')->select('PONO')->orderBy('PONO', 'DESC')->limit(1)->get();
|
||||
|
||||
@ -1236,17 +1236,18 @@ if (!empty($getlogpodtl)) {
|
||||
style="font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:left !important;">SNo</th>
|
||||
<th style="text-align:center !important;">Requisition No</th>
|
||||
<th style="text-align:left !important;">Item Code</th>
|
||||
<th>Item Name</th>
|
||||
<th>Line Item Specs</th>
|
||||
<th style="text-align: left;">Quantity</th>
|
||||
<th>UOM</th>
|
||||
<th style="text-align: right;">Rate <?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align: right;">Basic Amount <?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align: right;">Tax Amount <?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align: right;">Total Order Amount <?php echo "($INRSYM)" ?></th>
|
||||
|
||||
<th style="text-align:left !important; white-space: nowrap !important;">SNo</th>
|
||||
<th style="text-align:center !important; white-space: nowrap !important;">Requisition No</th>
|
||||
<th style="text-align:left !important; white-space: nowrap !important;">Item Code</th>
|
||||
<th style="white-space: nowrap !important;">Item Description</th>
|
||||
<th style="white-space: nowrap !important;">Line Item Specs</th>
|
||||
<th style="text-align: left; white-space: nowrap !important;">Quantity</th>
|
||||
<th style="white-space: nowrap !important;">UOM</th>
|
||||
<th style="text-align: right; white-space: nowrap !important;">Rate <?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align: right; white-space: nowrap !important;">Basic Amount <?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align: right; white-space: nowrap !important;">Tax Amount <?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align: right; white-space: nowrap !important;">Total Order Amount <?php echo "($INRSYM)" ?></th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -1273,8 +1274,9 @@ if (!empty($getlogpodtl)) {
|
||||
<td style="text-align:left !important;"><?php echo $index; ?></td>
|
||||
<td style="text-align:center !important;"><?php echo $record->ReqNo ?></td>
|
||||
<td style="text-align:left !important;"><?php echo $record->MaterialCode ?></td>
|
||||
<td style="text-align:left !important;"><?php echo $record->MaterialName ?></td>
|
||||
<td>
|
||||
<td style="text-align:left !important;">
|
||||
<?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
||||
echo $shortName; ?></td>
|
||||
<?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?>
|
||||
<a href="#"
|
||||
class="editable-field"
|
||||
@ -2612,12 +2614,13 @@ if (!empty($getlogpodtl)) {
|
||||
// TotalValue: TotalOrderValue
|
||||
// }));
|
||||
PONOStatus = <?php echo $PONOStatus; ?>
|
||||
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
||||
var rowHtml = `
|
||||
<tr id="${temp}">
|
||||
<td align="left">${temp}</td>
|
||||
<td align="left">${Reqnumber}</td>
|
||||
<td align="left">${materialCode}</td>
|
||||
<td align="left">${materialName}</td>`;
|
||||
<td align="left">${shorten}</td>`;
|
||||
if (PONOStatus === "PO_DRAFT" || PONOStatus === "PO_CREATED") {
|
||||
rowHtml += `<td><a href="#" class="editable-field"
|
||||
data-id="${temp}"
|
||||
@ -3163,29 +3166,31 @@ if (!empty($getlogpodtl)) {
|
||||
|
||||
var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
|
||||
|
||||
if (validate()) {
|
||||
if (document.getElementById('ServiceTable').rows.length < 2)
|
||||
{
|
||||
alert('Please Select Line item to Create PO');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (serviceValidate()) {
|
||||
// if (document.getElementById('ServiceTable').rows.length < 2)
|
||||
// {
|
||||
// alert('Please Select Line item to Create PO');
|
||||
// $('#Deliverydt').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
|
||||
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// return false;
|
||||
// }
|
||||
else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||
alert('Please Enter Payable Terms');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
} else if ($('#editdescofpo').val().trim() == '') {
|
||||
alert('Please Enter Description Of Service');
|
||||
$('#editdescofpo').focus();
|
||||
return false;
|
||||
} else {
|
||||
// else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||
// alert('Please Enter Payable Terms');
|
||||
// $('#Otherpayment').focus();
|
||||
// return false;
|
||||
// } else if ($('#editdescofpo').val().trim() == '') {
|
||||
// alert('Please Enter Description Of Service');
|
||||
// $('#editdescofpo').focus();
|
||||
// return false;
|
||||
// } else {
|
||||
// $('#content').loader('show');
|
||||
var formData = new FormData($('.ServicePO')[0]);
|
||||
$('#loader').show();
|
||||
disableButtons();
|
||||
$.ajax({
|
||||
// data: $('.ServicePO').serialize(),
|
||||
type: "POST",
|
||||
@ -3213,16 +3218,22 @@ if (!empty($getlogpodtl)) {
|
||||
$('#SpcialInstruction').val('');
|
||||
$('#txtDeliveryAddress').val('')
|
||||
window.location = "purchaseorderListing";
|
||||
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
||||
alert("Error: " + textStatus);
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -2812,16 +2812,16 @@ if (!empty($INRSYMBOL)) {
|
||||
style="background-color:#fff;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th style="text-align:center !important">Requisition No</th>
|
||||
<th>Item Code</th>
|
||||
<th>Item Description</th>
|
||||
<th class="text-right">Quantity</th>
|
||||
<th>UOM</th>
|
||||
<th class="text-right">Rate<?php echo "($INRSYM)" ?></th>
|
||||
<th class="text-right">Basic Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th class="text-right">Tax Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th class="text-right">Total Order Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important;">SNo</th>
|
||||
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
|
||||
<th style="white-space: nowrap !important;">Item Code</th>
|
||||
<th style="white-space: nowrap !important;">Item Description</th>
|
||||
<th style="white-space: nowrap !important;" class="text-right">Quantity</th>
|
||||
<th style="white-space: nowrap !important;">UOM</th>
|
||||
<th style="white-space: nowrap !important;" class="text-right">Rate<?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important;" class="text-right">Basic Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important;" class="text-right">Tax Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important;" class="text-right">Total Order Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -6029,13 +6029,14 @@ if (!empty($INRSYMBOL)) {
|
||||
index = parseInt(index) + 1;
|
||||
|
||||
var template = jQuery("#RevenueList").html();
|
||||
var rshorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
||||
|
||||
var html = `
|
||||
<tr id="${temp}">
|
||||
<td>${temp}</td>
|
||||
<td style="text-align:center !important">${Reqnumber}</td>
|
||||
<td>${materialCode}</td>
|
||||
<td>${materialName}</td>
|
||||
<td>${rshorten}</td>
|
||||
<td align="right">${quantity}</td>
|
||||
<td>${uom}</td>
|
||||
<td align="right">${itemRate}</td>
|
||||
@ -6709,13 +6710,15 @@ if (!empty($INRSYMBOL)) {
|
||||
index = parseInt(index) + 1;
|
||||
|
||||
var template = jQuery("#ServiceList").html();
|
||||
|
||||
var sshorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
||||
|
||||
var html = `
|
||||
<tr id="${temp}">
|
||||
<td>${temp}</td>
|
||||
<td style="text-align:center !important">${Reqnumber}</td>
|
||||
<td>${materialCode}</td>
|
||||
<td>${materialName}</td>
|
||||
<td>${sshorten}</td>
|
||||
<td align="right">${quantity}</td>
|
||||
<td>${uom}</td>
|
||||
<td align="right">${itemRate}</td>
|
||||
@ -7236,26 +7239,27 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
|
||||
// Perform form validation
|
||||
if (validate()) {
|
||||
if (document.getElementById('serviceTax').rows.length < 2) {
|
||||
alert('Please Select Line item to Create PO');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
} else if ($('#Otherpayment').val() == '' && $('#PaymentMethod').val() == 'PT08') {
|
||||
alert('Please Enter Other Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
} else if ($('#emergdescofpo').val().trim() == '') {
|
||||
alert('Please Enter Description Of Service');
|
||||
$('#emergdescofpo').focus();
|
||||
return false;
|
||||
} else if ($('#PoTypeOptions').val() == "0") {
|
||||
alert('Please Select POType');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
} else {
|
||||
if (serviceValidate()) {
|
||||
// if (document.getElementById('serviceTax').rows.length < 2) {
|
||||
// alert('Please Select Line item to Create PO');
|
||||
// $('#Deliverydt').focus();
|
||||
// return false;
|
||||
// } else if ($('#Otherpayment').val() == '' && $('#PaymentMethod').val() == 'PT08') {
|
||||
// alert('Please Enter Other Payable Terms Description');
|
||||
// $('#Otherpayment').focus();
|
||||
// return false;
|
||||
// } else if ($('#emergdescofpo').val().trim() == '') {
|
||||
// alert('Please Enter Description Of Service');
|
||||
// $('#emergdescofpo').focus();
|
||||
// return false;
|
||||
// } else if ($('#PoTypeOptions').val() == "0") {
|
||||
// alert('Please Select POType');
|
||||
// $('#PoTypeOptions').focus();
|
||||
// return false;
|
||||
// } else {
|
||||
// Submit the form using AJAX
|
||||
$('#loader').show();
|
||||
disableButtons();
|
||||
$.ajax({
|
||||
url: "<?php echo base_url() ?>emergencypurchaseorder/addNewServicePurchaseOrder",
|
||||
type: "POST",
|
||||
@ -7274,14 +7278,16 @@ if (!empty($INRSYMBOL)) {
|
||||
$('#SpcialInstruction').val('');
|
||||
$('#txtDeliveryAddress').val('');
|
||||
window.location = "purchaseorderListing";
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
// Handle errors
|
||||
$('#loader').hide();
|
||||
alert("Error: " + error);
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
});
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@ -7347,22 +7353,23 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
|
||||
// Perform form validation
|
||||
if (validate()) {
|
||||
if (document.getElementById('serviceTax').rows.length < 2) {
|
||||
alert('Please Select Line item to Create PO');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
} else if ($('#insuranceStatus').val() == 'YES' && $('#InsuranceNumber').val() == '') {
|
||||
alert('Please Enter Insurance Number..!');
|
||||
if (revenueValidate()) {
|
||||
// if (document.getElementById('serviceTax').rows.length < 2) {
|
||||
// alert('Please Select Line item to Create PO');
|
||||
// $('#Deliverydt').focus();
|
||||
// return false;
|
||||
// } else if ($('#insuranceStatus').val() == 'YES' && $('#InsuranceNumber').val() == '') {
|
||||
// alert('Please Enter Insurance Number..!');
|
||||
|
||||
return false;
|
||||
} else if ($('#PaymentMethod').val() == 'PT08' && $('#Otherpayment').val() == '') {
|
||||
alert('Please Enter Other Payment Description..!');
|
||||
// return false;
|
||||
// } else if ($('#PaymentMethod').val() == 'PT08' && $('#Otherpayment').val() == '') {
|
||||
// alert('Please Enter Other Payment Description..!');
|
||||
|
||||
return false;
|
||||
} else {
|
||||
// return false;
|
||||
// } else {
|
||||
// Submit the form using AJAX
|
||||
$('#loader').show();
|
||||
disableButtons();
|
||||
$.ajax({
|
||||
url: "<?php echo base_url() ?>emergencypurchaseorder/addNewRevenuePurchaseOrder",
|
||||
type: "POST",
|
||||
@ -7377,13 +7384,15 @@ if (!empty($INRSYMBOL)) {
|
||||
$('#SpcialInstruction').val('');
|
||||
$('#txtDeliveryAddress').val('');
|
||||
window.location = "purchaseorderListing";
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
// Handle errors
|
||||
alert("Error: " + error);
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
});
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -334,98 +334,98 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
var radioValue = $("input[name='DateRange']:checked").val();
|
||||
if (capitalType == 'International') {
|
||||
if ($('#drpSupplier').val() == "0") {
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
} else if ($('#PODate').val() == '') {
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 0 && $('#Deliverydate').val() == '') {
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 1 && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 2 && $('#Dispatch').val().trim() == '') {
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if ($('#Deliverydt').val() == '' && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
} else if ($('#DeliveryAddr').val() == '') {
|
||||
alert('Please Enter the Delivery Address');
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
} else if ($('#PoTypeOptions').val() == "0") {
|
||||
alert('Please Select Capital Type');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
|
||||
} else if ($('#BudgetType').val() == "0") {
|
||||
alert('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
|
||||
}
|
||||
if ($('#drpSupplier').val() == "0") {
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
} else if ($('#currencytype').val() == '0') {
|
||||
alert('Please Select the Currency Type');
|
||||
$('#currencytype').focus();
|
||||
return false;
|
||||
} else if ($('#PODate').val() == '') {
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 0 && $('#Deliverydate').val() == '') {
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 1 && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 2 && $('#Dispatch').val().trim() == '') {
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if ($('#ExchangeRate').val() == '') {
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRate').focus();
|
||||
return false;
|
||||
} else if ($('#ExchangeRate').val() == 0) {
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRate').focus();
|
||||
return false;
|
||||
} else if ($('#PlaceOforigin').val() == '') {
|
||||
alert('Please Enter Place Of Origin');
|
||||
$('#PlaceOforigin').focus();
|
||||
return false;
|
||||
} else if ($('#PoTypeOptions').val() == "0") {
|
||||
alert('Please Select Capital Type');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
} else if ($('#PaymentTerms').val() == '') {
|
||||
alert('Please Select Payment Terms');
|
||||
$('#PaymentTerms').focus();
|
||||
return false;
|
||||
} else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||
alert('Please Enter Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
} else if ($('#BudgetType').val() == "0") {
|
||||
alert('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
} else { return true; }
|
||||
}
|
||||
if (capitalType == 'Domestic') {
|
||||
if ($('#drpSupplier').val() == "0") {
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
} else if ($('#currencytype').val() == '0') {
|
||||
alert('Please Select the Currency Type');
|
||||
$('#currencytype').focus();
|
||||
return false;
|
||||
} else if ($('#PODate').val() == '') {
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 0 && $('#Deliverydate').val() == '') {
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 1 && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 2 && $('#Dispatch').val().trim() == '') {
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if ($('#Deliverydt').val() == '' && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
} else if ($('#ExchangeRt').val() == '') {
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRt').focus();
|
||||
return false;
|
||||
} else if ($('#PlaceOforigin').val().trim() == '') {
|
||||
alert('Please Enter the Place Of Origin');
|
||||
$('#PlaceOforigin').focus();
|
||||
return false;
|
||||
} else if ($('#DeliveryAddr').val() == '') {
|
||||
alert('Please Enter the Delivery Address');
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
} else if ($('#PoTypeOptions').val() == "0") {
|
||||
alert('Please Select Capital Type');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
|
||||
} else if ($('#BudgetType').val() == "0") {
|
||||
alert('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
|
||||
}
|
||||
if ($('#drpSupplier').val() == "0") {
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
} else if ($('#PODate').val() == '') {
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 0 && $('#Deliverydate').val() == '') {
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 1 && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 2 && $('#Dispatch').val().trim() == '') {
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if ($('#PoTypeOptions').val() == "0") {
|
||||
alert('Please Select Capital Type');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
} else if ($('#PaymentTerms').val() == '') {
|
||||
alert('Please Select Payment Terms');
|
||||
$('#PaymentTerms').focus();
|
||||
return false;
|
||||
} else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||
alert('Please Enter Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
} else if ($('#BudgetType').val() == "0") {
|
||||
alert('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
} else { return true; }
|
||||
}
|
||||
|
||||
|
||||
@ -555,7 +555,7 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'Scheduleby', 'value' => set_value('Scheduleby'), 'id' => 'Scheduleby', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110');
|
||||
echo Form_textarea($data);
|
||||
echo form_textarea($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
@ -566,7 +566,7 @@ if (!empty($INRSYMBOL)) {
|
||||
// $data = array('name' => '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);
|
||||
echo form_textarea($data);
|
||||
|
||||
?>
|
||||
|
||||
@ -786,17 +786,17 @@ if (!empty($INRSYMBOL)) {
|
||||
<table id="serviceTax" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th align="center">Requisition No</th>
|
||||
<th>Item Code</th>
|
||||
<th>Item Description</th>
|
||||
<th>Line Item Specs</th>
|
||||
<th align="right">Quantity</th>
|
||||
<th>UOM</th>
|
||||
<th align="right">Rate</th>
|
||||
<th align="right">Basic Amount</th>
|
||||
<th align="right">Tax Amount</th>
|
||||
<th align="right">Total Order Amount</th>
|
||||
<th style="white-space: nowrap !important;">SNo</th>
|
||||
<th style="white-space: nowrap !important;" align="center">Requisition No</th>
|
||||
<th style="white-space: nowrap !important;">Item Code</th>
|
||||
<th style="white-space: nowrap !important;">Item Description</th>
|
||||
<th style="white-space: nowrap !important;">Line Item Specs</th>
|
||||
<th style="white-space: nowrap !important;" align="right">Quantity</th>
|
||||
<th style="white-space: nowrap !important;">UOM</th>
|
||||
<th style="white-space: nowrap !important;" align="right">Rate</th>
|
||||
<th style="white-space: nowrap !important;" align="right">Basic Amount</th>
|
||||
<th style="white-space: nowrap !important;" align="right">Tax Amount</th>
|
||||
<th style="white-space: nowrap !important;" align="right">Total Order Amount</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -2648,6 +2648,7 @@ if (!empty($INRSYMBOL)) {
|
||||
$("#MaterialCode").empty();
|
||||
$("#CapitalDepartmentName").val('');
|
||||
$("#CPUOM").val('');
|
||||
$("#CPRate").val('');
|
||||
$("#CPQuantity").val('');
|
||||
$("#CapitalItemName").val('');
|
||||
$("#CPTotalAmount").val('');
|
||||
@ -2717,6 +2718,7 @@ if (!empty($INRSYMBOL)) {
|
||||
var id = $('#MaterialCode').val();
|
||||
$("#CapitalItemName").val('');
|
||||
$("#CPUOM").val('');
|
||||
$("#CPRate").val('');
|
||||
$("#CPQuantity").val('');
|
||||
$("#CPTotalAmount").val('');
|
||||
RequistQuantity = '';
|
||||
@ -2729,6 +2731,7 @@ if (!empty($INRSYMBOL)) {
|
||||
if (obj.MaterialCode === id) {
|
||||
$("#CapitalItemName").val(obj.MaterialName);
|
||||
$("#CPUOM").val(obj.UOM);
|
||||
$("#CPRate").val(obj.material_rate);
|
||||
var CPUOMDisplay = obj.UOM;
|
||||
$("#CPQuantity").val(obj.Quantity);
|
||||
RequistQuantity = obj.Quantity;
|
||||
@ -3522,13 +3525,13 @@ if (!empty($INRSYMBOL)) {
|
||||
// Taxvalue: TotalTaxValue,
|
||||
// TotalValue: Total
|
||||
// }));
|
||||
|
||||
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
||||
var rowHtml = `
|
||||
<tr id="${temp}">
|
||||
<td align="left">${temp}</td>
|
||||
<td align="center">${Reqnumber}</td>
|
||||
<td align="left">${materialCode}</td>
|
||||
<td align="left">${materialName}</td>
|
||||
<td align="left">${shorten}</td>
|
||||
<td align="left">
|
||||
<a href="#" class="editable-field"
|
||||
data-notes = "-" data-id ="${temp}">-</a>
|
||||
@ -4431,6 +4434,7 @@ if (!empty($INRSYMBOL)) {
|
||||
var id = $('#EditMaterialCode').val();
|
||||
$("#EditCapitalItemName").val('');
|
||||
$("#EditCPUOM").val('');
|
||||
$("#EditCPRate").val('');
|
||||
$("#EditCPQuantity").val('');
|
||||
$("#EditCPTotalAmount").val('');
|
||||
RequistQuantity = '';
|
||||
@ -4443,6 +4447,7 @@ if (!empty($INRSYMBOL)) {
|
||||
if (obj.MaterialCode === id) {
|
||||
$("#EditCapitalItemName").val(obj.MaterialName);
|
||||
$("#EditCPUOM").val(obj.UOM);
|
||||
$("#EditCPRate").val(obj.material_rate);
|
||||
$("#EditCPQuantity").val(obj.Quantity);
|
||||
RequistQuantity = obj.Quantity;
|
||||
}
|
||||
@ -4523,32 +4528,32 @@ if (!empty($INRSYMBOL)) {
|
||||
} else {
|
||||
basicAmountRate = parseFloat($('#CapitalBasicOrder').val()) - parseFloat($('#txtTotalDiscount').val());
|
||||
}
|
||||
if (validate()) {
|
||||
if (document.getElementById('serviceTax').rows.length < 2) {
|
||||
alert('Please Select Line item to Create PO');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
} else if ($('#Otherpayment').val() == '' && $('#PaymentMethod').val() == 'PT08') {
|
||||
alert('Please Enter Other Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
}
|
||||
// else if(parseInt(AvlBudAmt) < parseInt(basicAmountRate)) {
|
||||
if (capitalValidate()) {
|
||||
// if (document.getElementById('serviceTax').rows.length < 2) {
|
||||
// alert('Please Select Line item to Create PO');
|
||||
// $('#Deliverydt').focus();
|
||||
// return false;
|
||||
// } else if ($('#Otherpayment').val() == '' && $('#PaymentMethod').val() == 'PT08') {
|
||||
// alert('Please Enter Other Payable Terms Description');
|
||||
// $('#Otherpayment').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else if(parseInt(AvlBudAmt) < parseInt(basicAmountRate)) {
|
||||
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
|
||||
// return false;
|
||||
// }
|
||||
else if ($('#PoTypeOptions').val() == "0") {
|
||||
alert('Please Select POType');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
// else if ($('#PoTypeOptions').val() == "0") {
|
||||
// alert('Please Select POType');
|
||||
// $('#PoTypeOptions').focus();
|
||||
// return false;
|
||||
|
||||
} else {
|
||||
// } else {
|
||||
// $('#content').loader('show');
|
||||
var formData = new FormData($('.CapitalPO')[0]);
|
||||
formData.append('ExchangeRateOn', ExchangeRateOn);
|
||||
formData.append('PaymentMethod', PaymentMethod);
|
||||
$('#loader').show();
|
||||
disableButtons();
|
||||
$.ajax({
|
||||
data: formData,
|
||||
processData: false,
|
||||
@ -4570,16 +4575,22 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
clearAfterAddLineItemAdd();
|
||||
window.location = "purchaseorderListing";
|
||||
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
} else {
|
||||
// $('#content').loader('hide');
|
||||
alert("Error");
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
||||
alert("Error: " + textStatus);
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
@ -5422,9 +5433,12 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
|
||||
function Reset() {
|
||||
location.reload();
|
||||
|
||||
}
|
||||
disableButtons();
|
||||
location.reload();
|
||||
setTimeout(function() {
|
||||
enableButtons();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
$('#insuranceTxtDiv').hide();
|
||||
$("#insuranceStatus").change(function() {
|
||||
|
||||
@ -801,16 +801,16 @@ if (!empty($POItem) && $CapitalRange == '1') {
|
||||
style="font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:left !important">SNo</th>
|
||||
<th style="text-align:center !important">Requisition No</th>
|
||||
<th style="text-align:left !important">Item Name</th>
|
||||
<th style="text-align:right !important">Quantity</th>
|
||||
<th style="text-align:left !important">UOM</th>
|
||||
<th style="text-align:right !important">Rate<?php echo "($INR)" ?></th>
|
||||
<th style="text-align:right !important">Basic Amount<?php echo "($INR)" ?></th>
|
||||
<th style="text-align:right !important">Tax Amount<?php echo "($INR)" ?></th>
|
||||
<th style="text-align:right !important">Total Order Amount<?php echo "($INR)" ?></th>
|
||||
<th style="text-align:left !important">Action</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">SNo</th>
|
||||
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Item Description</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Quantity</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">UOM</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo "($INR)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo "($INR)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Tax Amount<?php echo "($INR)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Total Order Amount<?php echo "($INR)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@ -826,7 +826,8 @@ if (!empty($POItem) && $CapitalRange == '1') {
|
||||
<tr id="<?php echo $index; ?>">
|
||||
<td style="text-align:left !important"><?php echo $index; ?></td>
|
||||
<td style="text-align:center !important"><?php echo $record->ReqNo ?></td>
|
||||
<td style="text-align:left !important"><?php echo $record->MaterialName ?></td>
|
||||
<td style="text-align:left !important"><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
||||
echo $shortName; ?></td>
|
||||
<td style="text-align:right !important"><?php echo $record->Quantity ?></td>
|
||||
<td style="text-align:left !important"><?php echo $record->UOM ?></td>
|
||||
<td style="text-align:right !important"><?php echo number_format($record->Rate, 2, '.', ''); ?></td>
|
||||
@ -3451,29 +3452,27 @@ Calculate Landing charge
|
||||
//alert(basicamt);
|
||||
}
|
||||
|
||||
if (validate()) {
|
||||
if (capitalValidate()) {
|
||||
|
||||
var ex = $('#ExchangeRt').val();
|
||||
//alert(ex);
|
||||
//alert(parseInt($('#CapitalToatlOrder').val() * ex));
|
||||
var AvlBudAmt = '<?php echo $AvlAmount ?>';
|
||||
//alert(AvlBudAmt);
|
||||
if (document.getElementById('serviceTax').rows.length < 2) {
|
||||
alert('Please Select Line item to Create PO');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
} else if ($('#Otherpayment').val() == '' && $('#PaymentMethod').val() == 'PT08') {
|
||||
alert('Please Enter Other Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
// if (document.getElementById('serviceTax').rows.length < 2) {
|
||||
// alert('Please Select Line item to Create PO');
|
||||
// $('#Deliverydt').focus();
|
||||
// return false;
|
||||
// } else if ($('#Otherpayment').val() == '' && $('#PaymentMethod').val() == 'PT08') {
|
||||
// alert('Please Enter Other Payable Terms Description');
|
||||
// $('#Otherpayment').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else if(parseInt(AvlBudAmt) < parseInt(basicamt)) {
|
||||
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
|
||||
// return false;
|
||||
// }
|
||||
else {
|
||||
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// return false;
|
||||
// }
|
||||
// else {
|
||||
|
||||
//alert('else');
|
||||
|
||||
@ -3498,7 +3497,7 @@ Calculate Landing charge
|
||||
|
||||
|
||||
$('#loader').show();
|
||||
|
||||
disableButtons();
|
||||
$.ajax({
|
||||
// data:$('.CapitalPO').serialize()+"&ExchangeRateOn="+ExchangeRateOn+"&PaymentMethod="+PaymentMethod+"&PayableAT="+PayableAT+"&PaymentDate="+PaymentDate,
|
||||
type: "POST",
|
||||
@ -3517,15 +3516,17 @@ Calculate Landing charge
|
||||
$('#SpcialInstruction').val('');
|
||||
$('#txtDeliveryAddress').val('');
|
||||
window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing";
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
alert("Error");
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -888,16 +888,16 @@ if (!empty($getlogpodtl)) {
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th style="text-align:center !important">Requisition No</th>
|
||||
<th>Item Code</th>
|
||||
<th>Item Description</th>
|
||||
<th>Line Item Specs</th>
|
||||
<th style="text-align:right !important">Quantity</th>
|
||||
<th>UOM</th>
|
||||
<th style="text-align:right !important">Rate<?php echo "($INR)" ?></th>
|
||||
<th style="text-align:right !important">Basic Amount<?php echo "($INR)" ?></th>
|
||||
<th style="text-align:right !important">Tax Amount<?php echo "($INR)" ?></th>
|
||||
<th style="text-align:right !important">Total Order Amount<?php echo "($INR)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
|
||||
<th style="white-space: nowrap !important;">Item Code</th>
|
||||
<th style="white-space: nowrap !important;">Item Description</th>
|
||||
<th style="white-space: nowrap !important;">Line Item Specs</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Quantity</th>
|
||||
<th style="white-space: nowrap !important;">UOM</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo "($INR)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo "($INR)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Tax Amount<?php echo "($INR)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Total Order Amount<?php echo "($INR)" ?></th>
|
||||
<!-- <th>Actual Quantity</th>
|
||||
<th>Received Quantity</th>
|
||||
<th>Pending Quantity</th> -->
|
||||
@ -922,7 +922,8 @@ if (!empty($getlogpodtl)) {
|
||||
<td align="left"><?php echo $index; ?></td>
|
||||
<td style="text-align:center !important"><?php echo $record->ReqNo ?></td>
|
||||
<td><?php echo $record->MaterialCode ?></td>
|
||||
<td><?php echo $record->MaterialName ?></td>
|
||||
<td><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
||||
echo $shortName; ?></td>
|
||||
<td>
|
||||
<?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?>
|
||||
<a href="#"
|
||||
@ -4776,12 +4777,13 @@ if (!empty($getlogpodtl)) {
|
||||
// PendingQuantity: quantity
|
||||
// }));
|
||||
PONOStatus = <?php echo $PONOStatus; ?>
|
||||
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
||||
var rowHtml = `
|
||||
<tr id="${temp}">
|
||||
<td align="left">${temp}</td>
|
||||
<td align="left">${Reqnumber}</td>
|
||||
<td align="left">${materialCode}</td>
|
||||
<td align="left">${materialName}</td>`;
|
||||
<td align="left">${shorten}</td>`;
|
||||
if (PONOStatus === "PO_DRAFT" || PONOStatus === "PO_CREATED") {
|
||||
rowHtml += `<td><a href="#" class="editable-field"
|
||||
data-id="${temp}"
|
||||
@ -5989,26 +5991,25 @@ if (!empty($getlogpodtl)) {
|
||||
basicAmountRate = parseFloat($('#CapitalBasicOrder').val()) - parseFloat($('#txtTotalDiscount').val());
|
||||
}
|
||||
|
||||
if (validate()) {
|
||||
if (document.getElementById('serviceTax').rows.length < 2) {
|
||||
alert('Please Select Line item to Create PO');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
} else if ($('#Otherpayment').val() == '' && $('#PaymentMethod').val() == 'PT08') {
|
||||
alert('Please Enter Other Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
}
|
||||
if (capitalValidate()) {
|
||||
// if (document.getElementById('serviceTax').rows.length < 2) {
|
||||
// alert('Please Select Line item to Create PO');
|
||||
// $('#Deliverydt').focus();
|
||||
// return false;
|
||||
// } else if ($('#Otherpayment').val() == '' && $('#PaymentMethod').val() == 'PT08') {
|
||||
// alert('Please Enter Other Payable Terms Description');
|
||||
// $('#Otherpayment').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else if(parseInt(AvlBudAmt) < parseInt(basicAmountRate)) {
|
||||
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
|
||||
// return false;
|
||||
// }
|
||||
else {
|
||||
// } else {
|
||||
|
||||
//alert('else');
|
||||
|
||||
$('#loader').show();
|
||||
disableButtons();
|
||||
//alert('ss');
|
||||
var formData = new FormData($('.CapitalPO')[0]);
|
||||
formData.append('ExchangeRateOn', ExchangeRateOn);
|
||||
@ -6059,15 +6060,17 @@ if (!empty($getlogpodtl)) {
|
||||
|
||||
clearAfterAddLineItemAdd();
|
||||
window.location = "purchaseorderListing";
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
} else {
|
||||
// $('#content').loader('hide');
|
||||
alert("Error");
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1346,6 +1346,15 @@ if (!empty($EmpDetails)) {
|
||||
}
|
||||
|
||||
});
|
||||
$("#currentaddress, #permanentaddress").on("keyup change", function () {
|
||||
if ($("#currentaddress").val().trim() === $("#permanentaddress").val().trim()) {
|
||||
$("#checksame").prop("disabled", false);
|
||||
$("#checksame").prop("checked", true);
|
||||
} else {
|
||||
$("#checksame").prop("disabled", true);
|
||||
$("#checksame").prop("checked", false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -1732,6 +1741,13 @@ if (!empty($EmpDetails)) {
|
||||
$('#Total_salary').prop('required', false);
|
||||
$('#Total_salary').prop('readonly', true);
|
||||
}
|
||||
if ($("#currentaddress").val().trim() === $("#permanentaddress").val().trim()) {
|
||||
$("#checksame").prop("disabled", false); // Enable checkbox
|
||||
$("#checksame").prop("checked", true); // Optionally check it
|
||||
} else {
|
||||
$("#checksame").prop("disabled", true); // Disable checkbox
|
||||
$("#checksame").prop("checked", false);
|
||||
}
|
||||
$("#gender").select2();
|
||||
$("#MartialStatus").select2();
|
||||
$("#desigination").select2();
|
||||
|
||||
@ -1207,13 +1207,13 @@ if (!empty($RequistionDetails)) {
|
||||
|
||||
|
||||
|
||||
<th style="text-align:left !important">SNo</th>
|
||||
<th style="text-align:center !important">Requisition No</th>
|
||||
<th style="text-align:left !important">Item Name</th>
|
||||
<th style="text-align:right !important">Quantity</th>
|
||||
<th style="text-align:left !important">UOM</th>
|
||||
<th style="text-align:right !important">Rate<?php echo $INR ?></th>
|
||||
<th style="text-align:right !important">Basic Amount<?php echo $INR ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">SNo</th>
|
||||
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Item Description</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Quantity</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">UOM</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo $INR ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo $INR ?></th>
|
||||
<!-- <th>Tax Amount</th>
|
||||
<th>Total Order Amount</th> -->
|
||||
<th>Action</th>
|
||||
@ -1232,7 +1232,8 @@ if (!empty($RequistionDetails)) {
|
||||
<tr id="<?php echo $index; ?>">
|
||||
<td><?php echo $index; ?></td>
|
||||
<td style="text-align:center !important"><?php echo $record->ReqNo ?></td>
|
||||
<td><?php echo $record->MaterialName ?></td>
|
||||
<td><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
||||
echo $shortName; ?></td>
|
||||
<td style="text-align:right !important"><?php echo $record->Quantity ?></td>
|
||||
<td><?php echo $record->UOM ?></td>
|
||||
<td style="text-align:right !important"><?php echo $record->Rate ?></td>
|
||||
@ -2925,13 +2926,14 @@ if (!empty($RequistionDetails)) {
|
||||
|
||||
if (validate() && Budgetcheck()) {
|
||||
|
||||
if (document.getElementById('ImportTax').rows.length <= 0) {
|
||||
// if (document.getElementById('ImportTax').rows.length <= 0) {
|
||||
|
||||
alert('Please Select Line item to Create PO');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
} else {
|
||||
// alert('Please Select Line item to Create PO');
|
||||
// $('#Deliverydt').focus();
|
||||
// return false;
|
||||
// } else {
|
||||
$('#loader').show();
|
||||
disableButtons();
|
||||
var formData = new FormData($('.ImportPO')[0]);
|
||||
|
||||
if (status == 0) { // for draft
|
||||
@ -2962,21 +2964,29 @@ if (!empty($RequistionDetails)) {
|
||||
//$('#txtDeliveryAddress').val('');
|
||||
|
||||
window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing";
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
|
||||
} else {
|
||||
alert("Error");
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
error : function (){
|
||||
console.error(error);
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
|
||||
},
|
||||
complete : function (){
|
||||
console.log("ajax call is completed ");
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1224,15 +1224,15 @@ if (!empty($INRSYMBOL)) {
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th class="text-center">Requisition No</th>
|
||||
<th>Item Name</th>
|
||||
<th class="text-right">Quantity</th>
|
||||
<th>UOM</th>
|
||||
<th class="text-right">Rate<?php echo "($INRSYM)" ?></th>
|
||||
<th class="text-right">Basic Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th class="text-right">Tax Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th class="text-right">Total Order Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important;">SNo</th>
|
||||
<th class="text-center" style="white-space: nowrap !important;">Requisition No</th>
|
||||
<th style="white-space: nowrap !important;">Item Description</th>
|
||||
<th class="text-right" style="white-space: nowrap !important;">Quantity</th>
|
||||
<th style="white-space: nowrap !important;">UOM</th>
|
||||
<th class="text-right" style="white-space: nowrap !important;">Rate<?php echo "($INRSYM)" ?></th>
|
||||
<th class="text-right" style="white-space: nowrap !important;">Basic Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th class="text-right" style="white-space: nowrap !important;">Tax Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th class="text-right" style="white-space: nowrap !important;">Total Order Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -1249,7 +1249,8 @@ if (!empty($INRSYMBOL)) {
|
||||
<tr id="<?php echo $index; ?>">
|
||||
<td align="left"><?php echo $index; ?></td>
|
||||
<td class="text-center"><?php echo $record->ReqNo ?></td>
|
||||
<td><?php echo $record->MaterialName ?></td>
|
||||
<td><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
||||
echo $shortName; ?></td>
|
||||
<td class="text-right"><?php echo $record->Quantity ?></td>
|
||||
<td><?php echo $record->UOM ?></td>
|
||||
<td class="text-right"><?php echo $record->Rate ?></td>
|
||||
@ -2547,21 +2548,21 @@ if (!empty($INRSYMBOL)) {
|
||||
var txtTotBasicAmount = $('#txtTotBasicAmount').val();
|
||||
var txtTotalDiscount = $('#txtTotalDiscount').val();
|
||||
//alert('Before Validate IF condition');
|
||||
if (validate()) {
|
||||
if (revenueValidate()) {
|
||||
//alert('insdie Validate IF condition');
|
||||
var realrows = document.getElementById('txtRowCount').value;
|
||||
//alert(realrows);
|
||||
if (document.getElementById('revenueTax').rows.length < 2) {
|
||||
alert('Please Select Line item to Create PO');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
}
|
||||
// if (document.getElementById('revenueTax').rows.length < 2) {
|
||||
// alert('Please Select Line item to Create PO');
|
||||
// $('#Deliverydt').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else if(parseInt(AvlBudAmt) < (parseInt(txtTotBasicAmount) - parseInt(txtTotalDiscount))) {
|
||||
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
|
||||
// return false;
|
||||
// }
|
||||
else {
|
||||
// else {
|
||||
//alert('final else for store data');
|
||||
// $('.content').loader('show');
|
||||
var formData = new FormData($('.CreatePO')[0]);
|
||||
@ -2574,6 +2575,7 @@ if (!empty($INRSYMBOL)) {
|
||||
};
|
||||
|
||||
$('#loader').show();
|
||||
disableButtons();
|
||||
$.ajax({
|
||||
// data:$('.CreatePO').serialize(),
|
||||
type: "POST",
|
||||
@ -2592,22 +2594,25 @@ if (!empty($INRSYMBOL)) {
|
||||
$('#txtDeliveryAddress').val('')
|
||||
|
||||
window.location = (status == 1) ? "amendmentpurchaseorder" : "purchaseorderListing";
|
||||
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
|
||||
},
|
||||
error : function(error){
|
||||
console.error("error occured" + error);
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
},
|
||||
complete : function (){
|
||||
$('#loader').hide();
|
||||
console.log("ajax call is completed ..!!")
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -2332,28 +2332,28 @@ if (!empty($getlogpodtl)) {
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
<th style="text-align:left !important">SNo</th>
|
||||
<th style="text-align:center !important">Requisition No</th>
|
||||
<th style="text-align:left !important">Item Code</th>
|
||||
<th style="text-align:left !important">Item Description</th>
|
||||
<th style="text-align:left !important">Line Item Specs</th>
|
||||
<th style="text-align:right !important">Quantity</th>
|
||||
<th style="text-align:left !important">UOM</th>
|
||||
<th style="text-align:right !important">Rate <?php echo "($INRSYM)" ?>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">SNo</th>
|
||||
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Item Code</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Item Description</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Line Item Specs</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Quantity</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">UOM</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Rate <?php echo "($INRSYM)" ?>
|
||||
</th>
|
||||
<th style="text-align:right !important">Basic Amount
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount
|
||||
<?php echo "($INRSYM)" ?>
|
||||
</th>
|
||||
<th style="text-align:right !important">Tax Amount
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Tax Amount
|
||||
<?php echo "($INRSYM)" ?>
|
||||
</th>
|
||||
<th style="text-align:right !important">Total Order Amount
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Total Order Amount
|
||||
<?php echo "($INRSYM)" ?>
|
||||
</th>
|
||||
<!-- <th>Actual Quantity</th>
|
||||
<th>Received Quantity</th>
|
||||
<th>Pending Quantity</th> -->
|
||||
<th style="text-align:left !important">Action</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='RevenueAppend'>
|
||||
@ -2368,7 +2368,8 @@ if (!empty($getlogpodtl)) {
|
||||
<td align="left"><?php echo $index; ?></td>
|
||||
<td align="center"><?php echo $record->ReqNo ?></td>
|
||||
<td align="left"><?php echo $record->MaterialCode ?></td>
|
||||
<td align="left"><?php echo $record->MaterialName ?></td>
|
||||
<td align="left"><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
||||
echo $shortName; ?></td>
|
||||
<td align="left">
|
||||
<?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?>
|
||||
<a href="#"
|
||||
@ -4480,6 +4481,8 @@ if (!empty($getlogpodtl)) {
|
||||
// $PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED
|
||||
var PONOStatus = <?php echo '"'.$PONOStatus.'"'; ?>
|
||||
console.log("PONOStatus",PONOStatus);
|
||||
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
||||
|
||||
|
||||
|
||||
// var template = jQuery("#RevenueList").html();
|
||||
@ -4507,7 +4510,7 @@ if (!empty($getlogpodtl)) {
|
||||
<td align="left">${temp}</td>
|
||||
<td align="center">${Reqnumber}</td>
|
||||
<td align="left">${materialCode}</td>
|
||||
<td align="left">${materialName}</td>`;
|
||||
<td align="left">${shorten}</td>`;
|
||||
if (PONOStatus === "PO_DRAFT" || PONOStatus === "PO_CREATED") {
|
||||
rowHtml += `<td align="left"><a href="#" class="editable-field"
|
||||
data-id="${temp}"
|
||||
@ -5374,12 +5377,12 @@ if (!empty($getlogpodtl)) {
|
||||
var totaldiscount = $('#txtTotalDiscount').val();
|
||||
//alert(txtTotalbasicamount+'-'+totaldiscount);
|
||||
//alert(txtTotalbasicamount-totaldiscount);
|
||||
if (validate()) {
|
||||
if (document.getElementById('revenueTax').rows.length < 2) {
|
||||
alert('Please Select Line item to Create PO');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
}
|
||||
if (revenueValidate()) {
|
||||
// if (document.getElementById('revenueTax').rows.length < 2) {
|
||||
// alert('Please Select Line item to Create PO');
|
||||
// $('#Deliverydt').focus();
|
||||
// return false;
|
||||
// }
|
||||
//else if(validateBudgetExceedLimit())
|
||||
//{
|
||||
// return false;
|
||||
@ -5389,17 +5392,18 @@ if (!empty($getlogpodtl)) {
|
||||
|
||||
// return false;
|
||||
// }
|
||||
else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||
alert('Please Enter Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
} else if ($('#insurancestatus').val() == 1 && $('#InsuranceNumber').val() == '') {
|
||||
alert('Please Enter Insurance No / Insurance Details..!');
|
||||
$('#insurance').focus();
|
||||
return false;
|
||||
} else {
|
||||
// else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||
// alert('Please Enter Payable Terms Description');
|
||||
// $('#Otherpayment').focus();
|
||||
// return false;
|
||||
// } else if ($('#insurancestatus').val() == 1 && $('#InsuranceNumber').val() == '') {
|
||||
// alert('Please Enter Insurance No / Insurance Details..!');
|
||||
// $('#insurance').focus();
|
||||
// return false;
|
||||
// } else {
|
||||
var formData = new FormData($('.CreatePO')[0]);
|
||||
$('#loader').show();
|
||||
disableButtons();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo base_url() ?>purchaseorder/EditRevenuePurchaseOrder",
|
||||
@ -5417,9 +5421,11 @@ if (!empty($getlogpodtl)) {
|
||||
$('#SpcialInstruction').val('');
|
||||
$('#txtDeliveryAddress').val('')
|
||||
window.location = "purchaseorderListing";
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
|
||||
} else {
|
||||
alert("Something went wrong");
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
|
||||
},
|
||||
@ -5428,6 +5434,7 @@ if (!empty($getlogpodtl)) {
|
||||
$('#loader').hide();
|
||||
console.error("AJAX Error: ", textStatus, errorThrown);
|
||||
alert("An error occurred: " + textStatus + " - " + errorThrown);
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
|
||||
},
|
||||
|
||||
@ -5435,10 +5442,11 @@ if (!empty($getlogpodtl)) {
|
||||
// // Actions that should always happen regardless of success or error
|
||||
// console.log("AJAX request completed.");
|
||||
// $('#loader').hide(); // Hide the loader in any case
|
||||
// setTimeout(function() { enableButtons(); }, 2000);
|
||||
// }
|
||||
|
||||
});
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
$(document).ready(function () {
|
||||
|
||||
@ -1016,18 +1016,18 @@ foreach ($PaymentTerms as $TER) {
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th style="text-align:center !important">Requisition No</th>
|
||||
<th>Item Code</th>
|
||||
<th>Item Name</th>
|
||||
<th style="text-align:right !important">Quantity</th>
|
||||
<th>UOM</th>
|
||||
<th style="text-align:right !important">Rate<?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align:right !important">Basic Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align:right !important">Tax Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align:right !important">Total Order Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align:right !important">Actual Quantity</th>
|
||||
<th style="text-align:right !important">Received Quantity</th>
|
||||
<th style="text-align:right !important">Pending Quantity</th>
|
||||
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
|
||||
<th style="white-space: nowrap !important;">Item Code</th>
|
||||
<th style="white-space: nowrap !important;">Item Description</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Quantity</th>
|
||||
<th style="white-space: nowrap !important;">UOM</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Tax Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Total Order Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Actual Quantity</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Received Quantity</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Pending Quantity</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -1056,7 +1056,8 @@ foreach ($PaymentTerms as $TER) {
|
||||
<td><?php echo $index; ?></td>
|
||||
<td style="text-align:center !important"><?php echo $record->ReqNo ?> </td>
|
||||
<td><?php echo $record->MaterialCode ?></td>
|
||||
<td><?php echo $record->MaterialName ?></td>
|
||||
<td><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
||||
echo $shortName; ?></td>
|
||||
<td style="text-align:right !important"><?php echo $record->Quantity ?></td>
|
||||
<td><?php echo $record->UOM ?></td>
|
||||
<td style="text-align:right !important"><?php echo $record->Rate ?></td>
|
||||
@ -2191,31 +2192,32 @@ foreach ($PaymentTerms as $TER) {
|
||||
var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
|
||||
// alert("worked");
|
||||
|
||||
// if (validate()) {
|
||||
if (serviceValidate()) {
|
||||
|
||||
// if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
|
||||
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
|
||||
// return false;
|
||||
// }
|
||||
if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||
alert('Please Enter Other Payment Details');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
} else if ($('#amenddescofpo').val().trim() == '') {
|
||||
alert('Please Enter Description Of Service');
|
||||
$('#amenddescofpo').focus();
|
||||
return false;
|
||||
} else {
|
||||
// if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||
// alert('Please Enter Other Payment Details');
|
||||
// $('#Otherpayment').focus();
|
||||
// return false;
|
||||
// } else if ($('#amenddescofpo').val().trim() == '') {
|
||||
// alert('Please Enter Description Of Service');
|
||||
// $('#amenddescofpo').focus();
|
||||
// return false;
|
||||
// } else {
|
||||
// $('#content').loader('show');
|
||||
var formData = new FormData($('.ServicePO')[0]);
|
||||
if (status == 0) { // for draft
|
||||
var formData = new FormData($('.ServicePO')[0]);
|
||||
if (status == 0) { // for draft
|
||||
formData.append('changeStatus','ST014');
|
||||
};
|
||||
if (status == 1) { // for approve
|
||||
formData.append('changeStatus','ST026');
|
||||
};
|
||||
$('#loader').show();
|
||||
disableButtons();
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
// data: $('.ServicePO').serialize(),
|
||||
type: "POST",
|
||||
@ -2234,15 +2236,19 @@ foreach ($PaymentTerms as $TER) {
|
||||
$('#txtDeliveryAddress').val('')
|
||||
|
||||
window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing";
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
} else {
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
$('#loader').hide();
|
||||
console.error("Error");
|
||||
}
|
||||
},
|
||||
error : function (error){
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
console.log("error occurred" , error);
|
||||
},
|
||||
complete : function (){
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
console.log("Ajax call is completed ..!!");
|
||||
}
|
||||
});
|
||||
|
||||
@ -828,15 +828,15 @@ if (!empty($getlogpodtl)) {
|
||||
<table id="ImportTax" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:left !important">SNo</th>
|
||||
<th style="text-align:center !important">Requisition No</th>
|
||||
<th style="text-align:left !important">Material Code</th>
|
||||
<th style="text-align:left !important">Description</th>
|
||||
<th style="text-align:left !important">Line Item Specs</th>
|
||||
<th style="text-align:right !important">Quantity</th>
|
||||
<th style="text-align:left !important">UOM</th>
|
||||
<th style="text-align:right !important">Rate<?php echo "($INR)" ?></th>
|
||||
<th style="text-align:right !important">Basic Amount<?php echo "($INR)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">SNo</th>
|
||||
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Item Code</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Item Description</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Line Item Specs</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Quantity</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">UOM</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo "($INR)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo "($INR)" ?></th>
|
||||
<!-- <th>Received Qty</th>
|
||||
<th>Rejected Qty</th>
|
||||
<th>Pending Qty</th> -->
|
||||
@ -859,7 +859,8 @@ if (!empty($getlogpodtl)) {
|
||||
<td align="left"><?php echo $index; ?></td>
|
||||
<td align="center"><?php echo $record->ReqNo ?></td>
|
||||
<td align="left"><?php echo $record->MaterialCode ?></td>
|
||||
<td align="left"><?php echo $record->MaterialName ?></td>
|
||||
<td align="left"><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
||||
echo $shortName; ?></td>
|
||||
<td align="left">
|
||||
<?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?>
|
||||
<a href="#"
|
||||
@ -4279,12 +4280,13 @@ if (!empty($getlogpodtl)) {
|
||||
|
||||
//alert('in');
|
||||
PONOStatus = <?php echo $PONOStatus; ?>
|
||||
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
||||
var rowHtml = `
|
||||
<tr id="${temp}">
|
||||
<td align="left">${temp}</td>
|
||||
<td align="left">${Reqnumber}</td>
|
||||
<td align="left">${materialCode}</td>
|
||||
<td align="left">${materialName}</td>`;
|
||||
<td align="left">${shorten}</td>`;
|
||||
if (PONOStatus === "PO_DRAFT" || PONOStatus === "PO_CREATED") {
|
||||
rowHtml += `<td><a href="#" class="editable-field"
|
||||
data-id="${temp}"
|
||||
@ -5489,20 +5491,20 @@ if (!empty($getlogpodtl)) {
|
||||
//exit();
|
||||
//var TotalOrder=$('#txtToatlOrder').val();
|
||||
//exit();
|
||||
if (validate() && Budgetcheck()) {
|
||||
if (document.getElementById('ImportTax').rows.length <= 0) {
|
||||
if (importValidate() && Budgetcheck()) {
|
||||
// if (document.getElementById('ImportTax').rows.length <= 0) {
|
||||
|
||||
alert('Please Select Line item to Create PO');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
} else {
|
||||
// alert('Please Select Line item to Create PO');
|
||||
// $('#Deliverydt').focus();
|
||||
// return false;
|
||||
// } else {
|
||||
// $('#content').loader('show');
|
||||
var formData = new FormData($('.ImportPO')[0]);
|
||||
formData.append('txtRowCount', Row);
|
||||
formData.append('txtDeletedRow', txtDeletedRow);
|
||||
formData.append('textStatus', stat);
|
||||
$('#loader').show();
|
||||
|
||||
disableButtons();
|
||||
$.ajax({
|
||||
// data:$('.ImportPO').serialize()+"&txtRowCount="+Row+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat,
|
||||
data: formData,
|
||||
@ -5523,16 +5525,18 @@ if (!empty($getlogpodtl)) {
|
||||
//$('#SpcialInstruction').val('');
|
||||
//$('#txtDeliveryAddress').val('');
|
||||
window.location = "purchaseorderListing";
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
|
||||
} else {
|
||||
alert("Error");
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -399,7 +399,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
||||
}
|
||||
|
||||
function vaildateBeforeOpenModal() {
|
||||
|
||||
var radioValue = parseInt($("input[name='DateRange']:checked").val());
|
||||
if ($('#drpSupplier').val() == "0") {
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
@ -416,19 +416,18 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
||||
alert('Please Enter the Delivery Address');
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
} else if ($('#Dispatch').val() == '' && $('#Scheduleby').val() == '') {
|
||||
if (document.getElementById("Schedule").checked) {
|
||||
alert('Please Enter Schedule By');
|
||||
return false;
|
||||
} else if (document.getElementById("Date").checked) {
|
||||
alert('Please Enter Dispatch Instruction');
|
||||
return false;
|
||||
}
|
||||
|
||||
} else if ($('#currencytype').val() == '0') {
|
||||
alert('Please Select the Currency Type');
|
||||
$('#currencytype').focus();
|
||||
return false;
|
||||
} else if (radioValue === 1 && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter Schedule By');
|
||||
$('#Scheduleby').focus();
|
||||
return false;
|
||||
} else if (radioValue === 2 && $('#Dispatch').val() == '') {
|
||||
alert('Please Enter Dispatch Instruction');
|
||||
$('#Dispatch').focus();
|
||||
return false;
|
||||
} else if ($('#ExchangeRate').val() == '') {
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRate').focus();
|
||||
@ -441,22 +440,25 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
||||
alert('Please Enter Place Of Origin');
|
||||
$('#PlaceOforigin').focus();
|
||||
return false;
|
||||
} else if ($('#PaymentTerms').val() == '') {
|
||||
alert('Please Select Payment Terms');
|
||||
$('#PaymentTerms').focus();
|
||||
return false;
|
||||
|
||||
} else if ($('#BudgetType').val() == "0") {
|
||||
alert('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
|
||||
} else if ($('#Importoption').val() == "0") {
|
||||
} else if ($('#Importoption').val() == "0") {
|
||||
alert('Please Select Import Type');
|
||||
$('#Importoption').focus();
|
||||
return false;
|
||||
|
||||
} else {
|
||||
} else if ($('#PaymentTerms').val() == '') {
|
||||
alert('Please Select Payment Terms');
|
||||
$('#PaymentTerms').focus();
|
||||
return false;
|
||||
} else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||
alert('Please Enter Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
} else if ($('#BudgetType').val() == "0") {
|
||||
alert('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -823,15 +825,15 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
||||
style="font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th style="text-align:right !important">Requisition No</th>
|
||||
<th>Material Code</th>
|
||||
<th>Description</th>
|
||||
<th>Line Item Specs</th>
|
||||
<th style="text-align:right !important">Quantity</th>
|
||||
<th>UOM</th>
|
||||
<th style="text-align:right !important">Rate<?php echo "($INR)" ?></th>
|
||||
<th style="text-align:right !important">Basic Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important;">SNo</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Requisition No</th>
|
||||
<th style="white-space: nowrap !important;">Item Code</th>
|
||||
<th style="white-space: nowrap !important;">Item Description</th>
|
||||
<th style="white-space: nowrap !important;">Line Item Specs</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Quantity</th>
|
||||
<th style="white-space: nowrap !important;">UOM</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo "($INR)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo "($INRSYM)" ?></th>
|
||||
<!-- <th>Received Qty</th> -->
|
||||
<!-- <th>Rejected Qty</th> -->
|
||||
<!-- <th>Pending Qty</th> -->
|
||||
@ -980,30 +982,26 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
||||
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)">
|
||||
<span class="bold">Save as Draft</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4" align="right">
|
||||
<div class="form-group col-md-12" align="right">
|
||||
|
||||
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
||||
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
||||
<input type="hidden" name="txtStatus" id="txtStatus" />
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
|
||||
<input type="hidden" name="Budget" id="Budget" />
|
||||
<input type="reset" class="btn btn-success" value="Reset" onclick="window.location.reload()" style="margin-right: 15px;">
|
||||
|
||||
<div class="btn-container" style="text-align: right;">
|
||||
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)">
|
||||
<span class="bold">Submit</span>
|
||||
</a>
|
||||
<!-- <a class="btn btn-success Save" ID="Cancel" onclick="Reset();"> <span class="bold">Reset</span></a> -->
|
||||
<!-- <input type="reset" class="btn btn-success" value="Reset" onclick="window.location.reload()"> -->
|
||||
<a class="btn btn-success Save" ID="Cancel" onclick="Reset();"> <span class="bold">Reset</span></a>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save as Draft</span></a>
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -3519,12 +3517,13 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
||||
// RejectedQty: rejectedqty,
|
||||
// PendingQty: pendingqty
|
||||
// }));
|
||||
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
||||
var rowHtml = `
|
||||
<tr id="${temp}">
|
||||
<td style="text-align:left !important">${temp}</td>
|
||||
<td style="text-align:right !important">${Reqnumber}</td>
|
||||
<td style="text-align:left !important">${materialCode}</td>
|
||||
<td style="text-align:left !important">${materialName}</td>
|
||||
<td style="text-align:left !important">${shorten}</td>
|
||||
<td style="text-align:left !important">
|
||||
<a href="#" class="editable-field"
|
||||
data-notes = "-" data-id ="${temp}">-</a>
|
||||
@ -4189,19 +4188,14 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
||||
//alert(stat);
|
||||
//alert(JSON.stringify(txtStatus));
|
||||
//exit();
|
||||
if (validate() && Budgetcheck()) {
|
||||
else if ($('#Importoption').val() == "0") {
|
||||
alert('Please Select Import Type');
|
||||
$('#Importoption').focus();
|
||||
return false;
|
||||
|
||||
} else {
|
||||
if (importValidate() && Budgetcheck()) {
|
||||
|
||||
// $('#content').loader('show');
|
||||
var formData = new FormData($('.ImportPO')[0]);
|
||||
formData.append('txtRowCount', txtRowCount);
|
||||
formData.append('txtDeletedRow', txtDeletedRow);
|
||||
formData.append('textStatus', stat);
|
||||
disableButtons();
|
||||
|
||||
$.ajax({
|
||||
// data:$('.ImportPO').serialize()+"&txtRowCount="+txtRowCount+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat,
|
||||
@ -4220,17 +4214,22 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
||||
//$('#SpcialInstruction').val('');
|
||||
//$('#txtDeliveryAddress').val('');
|
||||
window.location = "purchaseorderListing";
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
|
||||
} else {
|
||||
alert("Error");
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
||||
alert("Error: " + textStatus);
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -4333,4 +4332,12 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
||||
calculateFreight(1);
|
||||
|
||||
});
|
||||
function Reset() {
|
||||
disableButtons();
|
||||
location.reload();
|
||||
setTimeout(function() {
|
||||
enableButtons();
|
||||
}, 2000);
|
||||
|
||||
}
|
||||
</script>
|
||||
@ -233,6 +233,7 @@
|
||||
<th class="celda_encabezado_general">DOJ</th>
|
||||
<th class="celda_encabezado_general">Designation</th>
|
||||
<th class="celda_encabezado_general">Total Days</th>
|
||||
<th class="celda_encabezado_general">Number Of Trips</th>
|
||||
<th class="celda_encabezado_general">Days Worked</th>
|
||||
<th class="celda_encabezado_general">LOP Days</th>
|
||||
<th class="celda_encabezado_general">Paid Leave</th>
|
||||
@ -294,7 +295,7 @@
|
||||
</td>
|
||||
|
||||
<td style="max-width:80px;text-align:center;"><?php echo $record->NoofDays; ?></td>
|
||||
|
||||
<td style="max-width:80px;text-align:center;"><?php echo 0; ?></td>
|
||||
<td id="dayWork<?php echo $index ?>"
|
||||
<?php if (empty($record->Key)) {
|
||||
echo "contenteditable='false';";
|
||||
@ -534,10 +535,16 @@
|
||||
<?php echo $record->Designation; ?>
|
||||
</td>
|
||||
|
||||
<td style="max-width:80px;text-align:center;"><?php echo $record->no_of_loads." (trip)"; ?></td>
|
||||
<td style="max-width:80px;text-align:center;">
|
||||
<?php echo $record->total_cal_days; ?>
|
||||
</td>
|
||||
|
||||
<td style="max-width:80px;text-align:center;">
|
||||
<?php echo $record->no_of_loads." (trip)"; ?>
|
||||
</td>
|
||||
|
||||
<td id="dayWork<?php echo $inx ?>" style="text-align:center;">
|
||||
<?php echo number_format(0.00, 2, '.', ''); ?>
|
||||
<?php echo number_format($record->unique_days, 2, '.', ''); ?>
|
||||
</td>
|
||||
|
||||
<td id="lopDay<?php echo $inx ?>" style="text-align:center;">
|
||||
@ -557,7 +564,9 @@
|
||||
</td>
|
||||
|
||||
<td style="max-width:80px;text-align:right;">
|
||||
<?php echo number_format(0.00, 2, '.', ''); ?>
|
||||
<?php
|
||||
$worked_amt = $sum_of_amount / $record->total_cal_days ;
|
||||
echo number_format($worked_amt, 2, '.', ''); ?>
|
||||
</td>
|
||||
|
||||
<td style="max-width:80px;text-align:right;">
|
||||
@ -565,7 +574,8 @@
|
||||
</td>
|
||||
|
||||
<td style="max-width:80px;text-align:right;">
|
||||
<?php echo number_format(0.00, 2, '.', ''); ?>
|
||||
<?php $hr_amt = $worked_amt/8;
|
||||
echo number_format($hr_amt, 2, '.', ''); ?>
|
||||
</td>
|
||||
|
||||
<td style="max-width:80px;text-align:right;">
|
||||
@ -675,7 +685,7 @@
|
||||
<th></th> <th></th> <th></th> <th></th> <th></th>
|
||||
<th></th> <th></th> <th></th> <th></th> <th></th>
|
||||
<th></th> <th></th> <th></th> <th></th> <th></th>
|
||||
<th>Total</th>
|
||||
<th></th> <th>Total</th>
|
||||
<th id="monthloan" style="text-align:right;">
|
||||
<?php echo isset($totalmonthloan) ? number_format(array_sum($totalmonthloan), 2) : ''; ?>
|
||||
</th>
|
||||
|
||||
@ -411,7 +411,7 @@ if (!empty($INRSYMBOL)) {
|
||||
});
|
||||
|
||||
$('#MaterialCode').change(function() {
|
||||
|
||||
alert("**");
|
||||
var id = $('#MaterialCode').val();
|
||||
var drpSupplier = $('#drpSupplier').val();
|
||||
$("#ItemName").val('');
|
||||
@ -432,6 +432,7 @@ if (!empty($INRSYMBOL)) {
|
||||
$("#ItemName").val(obj.MaterialName);
|
||||
$("#UOM").val(obj.UOM);
|
||||
$("#Quantity").val(obj.Quantity);
|
||||
$("#Rate").val(obj.Rate);
|
||||
RequistQuantity = obj.Quantity;
|
||||
}
|
||||
});
|
||||
@ -2166,20 +2167,20 @@ if (!empty($INRSYMBOL)) {
|
||||
<!-- Table -->
|
||||
<div class="form-row">
|
||||
<div class="table-responsive" style="padding-bottom: 30px;">
|
||||
<table id="revenueTax" class="table table-bordered table-hover mb-0" style="font-size:12px;">
|
||||
<table id="revenueTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th style="text-align:left !important">Requisition No</th>
|
||||
<th>Item Code</th>
|
||||
<th>Item Description</th>
|
||||
<th>Line Item Specs</th>
|
||||
<th style="text-align:right !important">Quantity</th>
|
||||
<th>UOM</th>
|
||||
<th style="text-align:right !important">Rate<?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align:right !important">Basic Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align:right !important">Tax Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align:right !important">Total Order Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important;">SNo</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Requisition No</th>
|
||||
<th style="white-space: nowrap !important;">Item Code</th>
|
||||
<th style="white-space: nowrap !important;">Item Description</th>
|
||||
<th style="white-space: nowrap !important;">Line Item Specs</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Quantity</th>
|
||||
<th style="white-space: nowrap !important;">UOM</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Tax Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Total Order Amount<?php echo "($INRSYM)" ?></th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -3457,12 +3458,13 @@ if (!empty($INRSYMBOL)) {
|
||||
// }));
|
||||
|
||||
// Define your template using ES6 template literals
|
||||
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
||||
var rowHtml = `
|
||||
<tr id="${temp}">
|
||||
<td style="text-align:left !important">${temp}</td>
|
||||
<td style="text-align:left !important">${Reqnumber}</td>
|
||||
<td style="text-align:left !important">${materialCode}</td>
|
||||
<td style="text-align:left !important">${materialName}</td>
|
||||
<td style="text-align:left !important">${shorten}</td>
|
||||
<td style="text-align:left !important">
|
||||
<a href="#" class="editable-field"
|
||||
data-notes = "-" data-id ="${temp}">-</a>
|
||||
|
||||
@ -1048,17 +1048,17 @@ if (!empty($INRSYMBOL)) {
|
||||
<table id="serviceTax" class="table table-bordered table-hover mb-0" style="font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th style="text-align:center !important">Requisition No</th>
|
||||
<th>Item Code</th>
|
||||
<th>Item Name</th>
|
||||
<th>Line Item Specs</th>
|
||||
<th style="text-align:right !important">Quantity</th>
|
||||
<th>UOM</th>
|
||||
<th style="text-align:right !important">Rate <?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align:right !important">Basic Amount <?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align:right !important">Tax Amount <?php echo "($INRSYM)" ?></th>
|
||||
<th style="text-align:right !important">Total Order Amount <?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important;">SNo</th>
|
||||
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
|
||||
<th style="white-space: nowrap !important;">Item Code</th>
|
||||
<th style="white-space: nowrap !important;">Item Description</th>
|
||||
<th style="white-space: nowrap !important;">Line Item Specs</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Quantity</th>
|
||||
<th style="white-space: nowrap !important;">UOM</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Rate <?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount <?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Tax Amount <?php echo "($INRSYM)" ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Total Order Amount <?php echo "($INRSYM)" ?></th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -1975,13 +1975,13 @@ if (!empty($INRSYMBOL)) {
|
||||
// Taxvalue: TotalTaxValue,
|
||||
// TotalValue: TotalOrderValue
|
||||
// }));
|
||||
|
||||
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
||||
var rowHtml = `
|
||||
<tr id="${temp}">
|
||||
<td>${temp}</td>
|
||||
<td style="text-align:center !important">${Reqnumber}</td>
|
||||
<td>${materialCode}</td>
|
||||
<td>${materialName}</td>
|
||||
<td>${shorten}</td>
|
||||
<td>
|
||||
<a href="#" class="editable-field"
|
||||
data-notes = "-" data-id ="${temp}">-</a>
|
||||
|
||||
@ -88,7 +88,7 @@ function revenueValidate(){
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
}else if ($('#revenueTax tbody tr').length < 1) {
|
||||
alert('Please Select Line item to Create PO');
|
||||
alert('Atleast One Line needed');
|
||||
return false;
|
||||
}else {
|
||||
return true;
|
||||
@ -146,7 +146,7 @@ function serviceValidate(){
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
}else if ($('#serviceTax tbody tr').length < 1) {
|
||||
alert('Please Select Line item to Create PO');
|
||||
alert('Atleast One Line needed');
|
||||
return false;
|
||||
} else if ($('#descofpo').val().trim() == '') {
|
||||
alert('Please Enter Description Of Service');
|
||||
@ -161,148 +161,170 @@ function capitalValidate(){
|
||||
var radioValue = parseInt($("input[name='DateRange']:checked").val());
|
||||
var PoType = $('#POType').val();
|
||||
if(PoType=='CAPITAL' && capitalType=='International'){
|
||||
if ($('#drpSupplier').val() == "0") {
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
if ($('#drpSupplier').val() == "0") {
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($('#drpSupplier').val() == "0") {
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
} else if ($('#currencytype').val() == '0') {
|
||||
alert('Please Select the Currency Type');
|
||||
$('#currencytype').focus();
|
||||
return false;
|
||||
} else if ($('#PODate').val() == '') {
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 0 && $('#Deliverydate').val() == '') {
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 1 && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 2 && $('#Dispatch').val().trim() == '') {
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if ($('#ExchangeRate').val() == '') {
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRate').focus();
|
||||
return false;
|
||||
} else if ($('#ExchangeRate').val() == 0) {
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRate').focus();
|
||||
return false;
|
||||
} else if ($('#PlaceOforigin').val() == '') {
|
||||
alert('Please Enter Place Of Origin');
|
||||
$('#PlaceOforigin').focus();
|
||||
return false;
|
||||
} else if ($('#PoTypeOptions').val() == "0") {
|
||||
alert('Please Select Capital Type');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
} else if ($('#PaymentTerms').val() == '') {
|
||||
alert('Please Select Payment Terms');
|
||||
$('#PaymentTerms').focus();
|
||||
return false;
|
||||
} else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||
alert('Please Enter Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
} else if ($('#BudgetType').val() == "0") {
|
||||
alert('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
} else if ($('#serviceTax tbody tr').length < 1) {
|
||||
alert('Atleast One Line needed');
|
||||
return false;
|
||||
} else { return true; }
|
||||
|
||||
else if ($('#PODate').val().trim() == '') {
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
}else if ($('#DeliveryAddr').val().trim() == '') {
|
||||
alert('Please Enter the Delivery Address');
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
}else if (radioValue === 0 && $('#Deliverydt').val() == '') {
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
}else if (radioValue == 1) {
|
||||
var scheduleBy = $('#Scheduleby').val(); // Get the value
|
||||
if (!scheduleBy || scheduleBy.trim() == '') { // Check if it's empty or undefined
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Scheduleby').focus();
|
||||
return false;
|
||||
}
|
||||
if(PoType=='CAPITAL' && capitalType=='Domestic'){
|
||||
if ($('#drpSupplier').val() == "0") {
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
} else if ($('#PODate').val() == '') {
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 0 && $('#Deliverydate').val() == '') {
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 1 && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 2 && $('#Dispatch').val().trim() == '') {
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if ($('#PoTypeOptions').val() == "0") {
|
||||
alert('Please Select Capital Type');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
} else if ($('#PaymentTerms').val() == '') {
|
||||
alert('Please Select Payment Terms');
|
||||
$('#PaymentTerms').focus();
|
||||
return false;
|
||||
} else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||
alert('Please Enter Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
} else if ($('#BudgetType').val() == "0") {
|
||||
alert('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
} else if ($('#serviceTax tbody tr').length < 1) {
|
||||
alert('Atleast One Line needed');
|
||||
return false;
|
||||
} else { return true; }
|
||||
}
|
||||
}else if($('#PODate').val() == ''){
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
}else if ($('#PoTypeOptions').val() == "0") {
|
||||
alert('Please Select Service Type');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
}else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||
alert('Please Enter Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
}else if($('#insuranceStatus').val() == "1" && $('#InsuranceNumber').val().trim() == ''){
|
||||
alert('Please Enter the Insurance No / Insurance Details');
|
||||
$('#InsuranceNumber').focus();
|
||||
return false;
|
||||
}else if ($('#BudgetType').val() == "0") {
|
||||
alert('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
}else if ($('#serviceTax tbody tr').length < 1) {
|
||||
alert('Please Select Line item to Create PO');
|
||||
return false;
|
||||
} else if ($('#descofpo').val().trim() == '') {
|
||||
alert('Please Enter Description Of Service');
|
||||
$('#descofpo').focus();
|
||||
return false;
|
||||
}else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function importValidate(){
|
||||
var radioValue = parseInt($("input[name='DateRange']:checked").val());
|
||||
|
||||
if ($('#drpSupplier').val() == "0") {
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
} else if ($('#currencytype').val() == '0') {
|
||||
alert('Please Select the Currency Type');
|
||||
$('#currencytype').focus();
|
||||
return false;
|
||||
} else if ($('#DeliveryAddr').val().trim() == '') {
|
||||
alert('Please Enter the Delivery Address');
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
} else if (radioValue === 0 && $('#Deliverydt').val() == '') {
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
} else if (radioValue == 1) {
|
||||
var scheduleBy = $('#Scheduleby').val(); // Get the value
|
||||
if (!scheduleBy || scheduleBy.trim() == '') { // Check if it's empty or undefined
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Scheduleby').focus();
|
||||
if ($('#drpSupplier').val() == "0") {
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
} else if ($('#currencytype').val() == '0') {
|
||||
alert('Please Select the Currency Type');
|
||||
$('#currencytype').focus();
|
||||
return false;
|
||||
} else if ($('#PODate').val() == '') {
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
} else if ($('#DeliveryAddr').val() == '') {
|
||||
alert('Please Enter the Delivery Address');
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
} else if (radioValue === 1 && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter Schedule By');
|
||||
$('#Scheduleby').focus();
|
||||
return false;
|
||||
} else if (radioValue === 2 && $('#Dispatch').val() == '') {
|
||||
alert('Please Enter Dispatch Instruction');
|
||||
$('#Dispatch').focus();
|
||||
return false;
|
||||
} else if ($('#ExchangeRate').val() == '') {
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRate').focus();
|
||||
return false;
|
||||
} else if ($('#ExchangeRate').val() == 0) {
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRate').focus();
|
||||
return false;
|
||||
} else if ($('#PlaceOforigin').val() == '') {
|
||||
alert('Please Enter Place Of Origin');
|
||||
$('#PlaceOforigin').focus();
|
||||
return false;
|
||||
} else if ($('#Importoption').val() == "0") {
|
||||
alert('Please Select Import Type');
|
||||
$('#Importoption').focus();
|
||||
return false;
|
||||
} else if ($('#PaymentTerms').val() == '') {
|
||||
alert('Please Select Payment Terms');
|
||||
$('#PaymentTerms').focus();
|
||||
return false;
|
||||
} else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||
alert('Please Enter Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
} else if ($('#BudgetType').val() == "0") {
|
||||
alert('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
} else if ($('#ImportTax tbody tr').length < 1) {
|
||||
alert('Atleast One Line needed');
|
||||
return false;
|
||||
}else {
|
||||
return true;
|
||||
}
|
||||
} else if ($('#Dispatch').val() == '' && $('#Scheduleby').val() == '') {
|
||||
if (document.getElementById("Schedule").checked) {
|
||||
alert('Please Enter Schedule By');
|
||||
return false;
|
||||
} else if (document.getElementById("Date").checked) {
|
||||
alert('Please Enter Dispatch Instruction');
|
||||
return false;
|
||||
}
|
||||
|
||||
} else if ($('#ExchangeRate').val() == '') {
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRate').focus();
|
||||
return false;
|
||||
} else if ($('#ExchangeRate').val() == 0) {
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRate').focus();
|
||||
return false;
|
||||
} else if ($('#PlaceOforigin').val() == '') {
|
||||
alert('Please Enter Place Of Origin');
|
||||
$('#PlaceOforigin').focus();
|
||||
return false;
|
||||
} else if ($('#PoTypeOptions').val() == "0") {
|
||||
alert('Please Select Service Type');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
} else if($('#PODate').val() == ''){
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
} else if ($('#PaymentTerms').val() == '') {
|
||||
alert('Please Select Payment Terms');
|
||||
$('#PaymentTerms').focus();
|
||||
return false;
|
||||
|
||||
} else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||
alert('Please Enter Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
} else if($('#insuranceStatus').val() == "1" && $('#InsuranceNumber').val().trim() == ''){
|
||||
alert('Please Enter the Insurance No / Insurance Details');
|
||||
$('#InsuranceNumber').focus();
|
||||
return false;
|
||||
} else if ($('#BudgetType').val() == "0") {
|
||||
alert('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
}else if ($('#ImportTax tbody tr').length < 1) {
|
||||
alert('Please Select Line item to Create PO');
|
||||
return false;
|
||||
}else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function validate()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user