Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme

This commit is contained in:
vadivelJ96 2025-03-11 09:57:52 +05:30
commit fdc07e8fe4
27 changed files with 1955 additions and 1097 deletions

View File

@ -266,7 +266,8 @@ class Amendmentpurchaseorder extends BaseController
}
$POType = $this->request->getPost('POType');
$PoRange = $this->request->getPost('Range');
$Local_Interstate = $this->request->getPost('Range');
$PaymentTermsText = $this->request->getPost('beforePaymentTermsText');
$PaymentTerms = $this->request->getPost('PaymentTerms');
$Otherpayment = $this->request->getPost('Otherpayment');
@ -308,7 +309,7 @@ class Amendmentpurchaseorder extends BaseController
}
$AmendmentNewPoNo = generate_amendment_po_number($PONO);
$POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'PORange' => $PoRange, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $changeStatus , 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Reference' => $supplierreference, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $revenuetype, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpecialInstruction, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'IsQualityChkReqired' => $qtycheckresult);
$POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'PORange' => $Local_Interstate, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $changeStatus , 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Reference' => $supplierreference, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $revenuetype, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpecialInstruction, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'IsQualityChkReqired' => $qtycheckresult);
$file = $this->request->getFile('POFile');
$requestfilename = $file->getName();
$PrePOFile = $this->request->getPost('PrePOFile');

View File

@ -435,6 +435,7 @@ class Assetdetails extends BaseController
$User = $this->request->getPost('User');
$SupplierName = $this->request->getPost('SupplierName');
$DateOfPurchase = $this->request->getPost('DateOfPurchase');
$DOpurchase = "";
if ($DateOfPurchase != '') {
$DOpurchase = get_date_time_format($DateOfPurchase);
}

View File

@ -1226,6 +1226,7 @@ class Purchaseorder extends BaseController
$AfterSgst = $this->request->getPost('RevenueAfterSgst' . $i);
$AfterIgst = $this->request->getPost('RevenueAfterIgst' . $i);
$LineitemAuditorNotes = $this->request->getPost('LineItemNoteForAuditor' . $i);
$LineitemAuditorNotes = ($LineitemAuditorNotes === null || $LineitemAuditorNotes === '') ? '-' : $LineitemAuditorNotes;
if($itemRate != 0){
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
$SkipInsert = "False";
@ -1421,6 +1422,7 @@ class Purchaseorder extends BaseController
$POLineItemNo = $this->request->getPost('LineItemNo' . $i);
$CostCenter = $this->request->getPost('costCode' . $i);
$LineitemAuditorNotes = $this->request->getPost('LineItemNoteForAuditor' . $i);
$LineitemAuditorNotes = ($LineitemAuditorNotes === null || $LineitemAuditorNotes === '') ? '-' : $LineitemAuditorNotes;
$LineItemNo = '';
/*---------start---------------------*/
@ -2112,7 +2114,7 @@ class Purchaseorder extends BaseController
$specialinstruction = $this->request->getPost('Addinstruction' . $i);
$per = $this->request->getPost('Per' . $i);
$LineitemAuditorNotes = $this->request->getPost('LineItemNoteForAuditor' . $i);
$LineitemAuditorNotes = ($LineitemAuditorNotes === null || $LineitemAuditorNotes === '') ? '-' : $LineitemAuditorNotes;
if($itemRate != 0){
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
$SkipInsert = "False";
@ -2419,6 +2421,8 @@ class Purchaseorder extends BaseController
$per = $this->request->getPost('Per' . $i);
$LineitemAuditorNotes = $this->request->getPost('LineItemNoteForAuditor' . $i);
$LineitemAuditorNotes = ($LineitemAuditorNotes === null || $LineitemAuditorNotes === '') ? '-' : $LineitemAuditorNotes;
// echo $per;
//die();
$LineItemNo = '';
@ -2845,6 +2849,8 @@ class Purchaseorder extends BaseController
$CapitalItemDescription = $this->request->getPost('CapitalItemDescrition' . $i);
$Per = $this->request->getPost('per' . $i);
$LineitemAuditorNotes = $this->request->getPost('LineItemNoteForAuditor' . $i);
$LineitemAuditorNotes = ($LineitemAuditorNotes === null || $LineitemAuditorNotes === '') ? '-' : $LineitemAuditorNotes;
if($itemRate != 0){
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
$SkipInsert = "False";
@ -3153,6 +3159,7 @@ class Purchaseorder extends BaseController
$Freightrateloc = $this->request->getPost('Fvalue' . $i);
$FreightAmountloc = $this->request->getPost('Afvalue' . $i);
$LineitemAuditorNotes = $this->request->getPost('LineItemNoteForAuditor' . $i);
$LineitemAuditorNotes = ($LineitemAuditorNotes === null || $LineitemAuditorNotes === '') ? '-' : $LineitemAuditorNotes;
// echo $FreightTypeloc;
// echo 'n';
// echo $FreightNoofTriploc;

View File

@ -290,6 +290,7 @@ class Servicepurchaseorder extends BaseController
$OtherAmt = $this->request->getPost('OtherAmt' . $i);
$TotalOrderValue = $this->request->getPost('TotalOrderValue' . $i);
$LineitemAuditorNotes = $this->request->getPost('LineItemNoteForAuditor' . $i);
$LineitemAuditorNotes = ($LineitemAuditorNotes === null || $LineitemAuditorNotes === '') ? '-' : $LineitemAuditorNotes;
$SkipInsert = "False";
if (count($comma_separated) > 0) {
@ -316,6 +317,7 @@ class Servicepurchaseorder extends BaseController
$POLineItemList = array('PONO' => $PONO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'CostCenterCode' => $CostCenter, 'ServiceFrequency' => $ServiceFrequency, 'ServiceMaterialDescription' => $ItemDescription, 'Per' => $Per, 'ItemNo' => $ItemNo,'LineitemAuditorNotes' => $LineitemAuditorNotes);
print_r($POLineItemList);
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
@ -341,12 +343,13 @@ class Servicepurchaseorder extends BaseController
}
}
}
die;
echo 'Service Purchase Order Created Successfully! PO Number Is: ' . $PONO;
}
//update service po
function UpdateServicePurchaseOrder()
{
// print_r($this->request->getPost());die;
// echo "<pre>"; print_r($this->request->getPost()); echo "</pre>"; die;
$PONO = $this->request->getPost('txtPONO');
$newsup = $this->request->getPost('newsup');
// $newSupId = split("[ - ]+", $newsup);
@ -381,40 +384,34 @@ class Servicepurchaseorder extends BaseController
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
$ServiceTypeOptions = $this->request->getPost('PoTypeOptions');
$DescriptionOfPo = $this->request->getPost('editdescofpo');
$PaymentTerms = $this->request->getPost('PaymentTerms');
$OtherPayment = $this->request->getPost('Otherpayment');
$POType = $this->request->getPost('POType');
$BudgetType = $this->request->getPost('Budget');
$SpcialInstruction = $this->request->getPost('ScopeofWork');
$TotalOrderValueSummary = $this->request->getPost('txtTotalOrderValueSummary');
$POStatus = $this->request->getPost('txtStatus');
$updatedBy = $this->session->get('userId');
$RowCount = $this->request->getPost('txtRowCount');
$DeletedRow = $this->request->getPost('txtDeletedRow');
$comma_separated = explode(':', (string)$DeletedRow);
$updateddt = get_current_date_time();
$WorkStatus = $this->request->getPost('workstatus');
$IsOpenOrder = ($this->request->getPost('IsOpenOrder') !== null && !empty($this->request->getPost('IsOpenOrder')) && $this->request->getPost('IsOpenOrder') === '1') ? $this->request->getPost('IsOpenOrder') : null;
// $lastPONO = $this->purchaseorder_model->lastPONO();
// $newPONO = generate_po_number($lastPONO);
// PO Master
$POList = array('SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpcialInstruction, 'UpdateBY' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'PaymentTerms' => $PaymentTerms, 'ServiceWorkStatus' => $WorkStatus, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'Description_Of_Service' => $DescriptionOfPo, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'BudgetType' => $BudgetType, 'IsOpenOrder' => $IsOpenOrder);
if ($POStatus == 'ST026') {
$POList['ApprovedOn'] = get_current_date_time();
$POList['ApprovedBy'] = $this->session->get('userId');
$POList['ReleasedOn'] = get_current_date_time();
$POList['ReleasedBy'] = $this->session->get('userId');
}
// echo "<pre>"; print_r($POList); echo "</pre>"; die;
$file = $this->request->getFile('POFile');
if ($file !== null) {
@ -441,15 +438,13 @@ class Servicepurchaseorder extends BaseController
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO, $POList);
// echo "pomaster".$POMaster;die;
$LineItemStatus = REQITEM_NEW;
if ($PODate != $b4podate) {
$logpo = array('PONO' => $PONO, 'LineItemNos' => '-', 'UpdateBy' => $updatedBy, 'UpdatedOn' => $updateddt, 'oldValue' => $b4podate, 'newValue' => $PODate, 'entity' => 'PO DateChanged');
$this->purchaseorder_model->insertlogpo($logpo);
}
@ -458,12 +453,10 @@ class Servicepurchaseorder extends BaseController
//$newsupname = $newSupId[0].'-'.$newSupId[1];
//echo $newsup;die;
$logpo = array('PONO' => $PONO, 'LineItemNos' => '-', 'UpdateBy' => $updatedBy, 'UpdatedOn' => $updateddt, 'oldValue' => $b4supplier, 'newValue' => $newsup, 'entity' => 'Supplier Changed');
$this->purchaseorder_model->insertlogpo($logpo);
}
}
// echo "<pre>"; echo($RowCount); echo "</pre>"; die;
for ($i = 1; $i <= $RowCount; $i++) {
$MaterialCode = $this->request->getPost('materialCode' . $i);
$Quantity = $this->request->getPost('quantity' . $i);
@ -487,23 +480,16 @@ class Servicepurchaseorder extends BaseController
$OtherAmt = $this->request->getPost('OtherAmt' . $i);
$Per = $this->request->getPost('per' . $i);
$LineitemAuditorNotes = $this->request->getPost('LineItemNoteForAuditor' . $i);
$LineitemAuditorNotes = ($LineitemAuditorNotes === null || $LineitemAuditorNotes === '') ? '-' : $LineitemAuditorNotes;
/*------------------------------*/
/*------------------------------ Quantity update the req details --*/
//if($MaterialCode!= ''){
$ReqDetails = array('Quantity' => $Quantity, 'UpdatedBy' => $updatedBy, 'UpdatedOn' => $updateddt);
//print_r($ReqDetails);
$this->purchaseorder_model->updateReqDetails($Reqnumber, $MaterialCode, $ReqDetails);
// }
/*------------------------------------------------------------------*/
/*------------------------------*/
/*---------start---------------------*/
// if(($PODate != $b4podate )||($SupplierID != $b4supplier) || ($itemRate!=$b4rate) ||
// ($Quantity != $b4qty ))
@ -515,24 +501,24 @@ class Servicepurchaseorder extends BaseController
// }
/*--------- Quantity log start ---------------------*/
if ($Quantity != $b4qty) {
$logpo = array('PONO' => $PONO, 'LineItemNos' => $POLineItemNo, 'UpdateBy' => $updatedBy, 'UpdatedOn' => $updateddt, 'oldValue' => $b4qty, 'newValue' => $Quantity, 'entity' => 'Quantity Changed');
$this->purchaseorder_model->insertlogpo($logpo);
}
/*--------- Quantity log ends ---------------------*/
/*--------- Rate log start ---------------------*/
if ($itemRate != $b4rate) {
$logpo = array('PONO' => $PONO, 'LineItemNos' => $POLineItemNo, 'UpdateBy' => $updatedBy, 'UpdatedOn' => $updateddt, 'oldValue' => $b4rate, 'newValue' => $itemRate, 'entity' => 'Rate Changed');
$this->purchaseorder_model->insertlogpo($logpo);
}
/*--------- Rate log ends ---------------------*/
/*----------end--------------------*/
/*--------- Lineitem Section starts ---------------------*/
$POLineItem = array();
$LineItemNo = '';
@ -552,7 +538,6 @@ class Servicepurchaseorder extends BaseController
if ($SkipInsert == "False") {
if (strlen((string)$POLineItemNo) == 0) {
$this->requistion_model = new requistion_model();
$RetItemNo = $this->requistion_model->getItemNumber($Reqnumber, $MaterialCode);
$ItemNo = '';
@ -560,8 +545,10 @@ class Servicepurchaseorder extends BaseController
$ItemNo = $RetItemNo[0]['ItemNo'];
}
$POLineItemList = array('PONO' => $PONO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $updatedBy, 'CreatedDate' => $updateddt, 'CostCenterCode' => $CostCenter, 'ServiceFrequency' => $ServiceFrequency, 'ServiceMaterialDescription' => $ItemDescription, 'Per' => $Per, 'ItemNo' => $ItemNo,'LineitemAuditorNotes' => $LineitemAuditorNotes);
// print_r($POLineItemList);die;
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
// print_r($POLineItem);die;
if (count($POLineItem) > 0) {
$LineItemNo = $POLineItem[0]['LineItemNo'];
}
@ -619,18 +606,13 @@ class Servicepurchaseorder extends BaseController
}
}
}
/*--------- Lineitem Section starts ---------------------*/
}
echo 'Purchase Order Updated Successfully! PO Number Is: ' . $PONO;
}
/*-----------------------------------*/
function uploadfile()
{

View File

@ -15,6 +15,7 @@ use App\Models\Ipinvoice_model;
use App\Models\Ipattachment_model;
use App\Models\Zohobooks_api_model;
use App\Models\CreditNoteModel;
use App\Models\IpCreditNotesItemsModel;
require_once 'vendor/autoload.php';
@ -36,6 +37,7 @@ class User extends BaseController
protected $ipinvoice_model;
protected $ipattachment_model;
protected $CreditNoteModel;
protected $CreditNotesItemsModel;
protected $session;
/**
@ -53,6 +55,7 @@ class User extends BaseController
$this->ipinvoice_model = new Ipinvoice_model();
$this->ipattachment_model = new Ipattachment_model();
$this->CreditNoteModel = new CreditNoteModel();
$this->CreditNotesItemsModel = new IpCreditNotesItemsModel();
$this->session = session();
helper('form'); //$this->load->library('form_validation');
$this->isLoggedIn();
@ -1382,13 +1385,14 @@ class User extends BaseController
$tokenWithCreditNoteScope = generateNewTokenForCreditNoteScope();
$cteditNotesRes = getAllCreditNotes($date_today, $date_yesterday, $tokenWithCreditNoteScope);
$cteditNotesData = json_decode($cteditNotesRes['data'],true);
if(count($cteditNotesData['creditnotes']))
{
$this->saveOrUpdateCreditNote($cteditNotesData['creditnotes']);
$this->saveOrUpdateCreditNote($cteditNotesData['creditnotes'] , $tokenWithCreditNoteScope);
}
// dd($cteditNotesData);
foreach ($inv_array as $inv) {
@ -1714,7 +1718,7 @@ class User extends BaseController
}
// END zoho API
public function saveOrUpdateCreditNote($data)
public function saveOrUpdateCreditNote($data , $tokenWithCreditNoteScope )
{
foreach ($data as $key => $value) {
@ -1730,6 +1734,36 @@ class User extends BaseController
$this->CreditNoteModel->insert($value);
}
//credit note line item api call
$cteditNotesLineItemsRes = getCreditNotesItemDetails($value['creditnote_id'], $tokenWithCreditNoteScope);
$lineItemData = json_decode($cteditNotesLineItemsRes['data'],true);
if(count($lineItemData['creditnote']['line_items']))
{
foreach ($lineItemData['creditnote']['line_items'] as $itemkey => $itemvalue)
{
$itemvalue['creditnote_id'] = $value['creditnote_id'];
$existingCreditNoteItems = $this->CreditNotesItemsModel->where('line_item_id', $itemvalue['line_item_id'])->first();
if ($existingCreditNoteItems) {
// Update existing record
$this->CreditNotesItemsModel->update($itemvalue['line_item_id'], $itemvalue);
} else {
// Insert new record
$this->CreditNotesItemsModel->insert($itemvalue);
}
}
}
}
}

View File

@ -185,6 +185,58 @@ if (! function_exists('getAllCreditNotes')) {
'headers_new' => $headers,
'data' => $result
];
}
}
if (! function_exists('getCreditNotesItemDetails')) {
function getCreditNotesItemDetails($creditNoteId, $accesstoken)
{
// Initialize cURL
$ch = curl_init();
// Zoho API credentials
$organization_id = '776847408';
$url_org = "https://www.zohoapis.com/books/v3/creditnotes/".$creditNoteId."?organization_id=$organization_id";
// Set headers
$headers = array(
'Authorization: Zoho-oauthtoken ' . $accesstoken,
// 'Content-Type: application/json'
);
// Set cURL options
curl_setopt($ch, CURLOPT_URL, $url_org );
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Execute cURL request
$result = curl_exec($ch);
// Check for errors
if ($result === false) {
return ['error' => curl_error($ch)];
}
// Close cURL session
curl_close($ch);
return [
'headers_new' => $headers,
'data' => $result
];
}
}

View File

@ -47,14 +47,25 @@ class CreditNoteModel extends Model
/**
* Fetch all credit notes
*/
// public function getAllCreditNotes($fromDate,$toDate)
// {
// return $this->where('date >=', $fromDate )
// ->where('date <=', $toDate )
// ->orderBy('date', 'DESC')
// ->findAll();
// }
public function getAllCreditNotes($fromDate, $toDate)
{
return $this->where('date >=', $fromDate )
->where('date <=', $toDate )
->orderBy('date', 'DESC')
return $this->select('ip_credit_notes.*, ip_credit_notes_items.name as item_name')
->join('ip_credit_notes_items', 'ip_credit_notes.creditnote_id = ip_credit_notes_items.creditnote_id', 'left')
->where('ip_credit_notes.date >=', $fromDate)
->where('ip_credit_notes.date <=', $toDate)
->orderBy('ip_credit_notes.date', 'DESC')
->findAll();
}
/**
* Fetch a single credit note by ID
*/

View File

@ -408,7 +408,7 @@ class Inwardgateregister_model extends Model
FROM t_igr_details IGRD
LEFT JOIN t_purchaseorder_lineitem POL ON PONO = POL.PONO AND IGRD.MaterialCode = POL.MaterialCode
LEFT JOIN t_revenue_tax tax ON tax.LineItemNo = POL.LineItemNo
WHERE IGRD.IGRNO = igr.IGRNO AND IGRD.QuantityAsPerInvoice != 0
WHERE IGRD.IGRNO = igr.IGRNO AND IGRD.QuantityAsPerInvoice != 0 and igr.PONO = POL.PONO
GROUP BY POL.PONO
LIMIT 1
)
@ -420,7 +420,7 @@ class Inwardgateregister_model extends Model
FROM t_igr_details IGRD
LEFT JOIN t_purchaseorder_lineitem POL ON PONO = POL.PONO AND IGRD.MaterialCode = POL.MaterialCode
LEFT JOIN t_service_tax tax ON tax.LineItemNo = POL.LineItemNo
WHERE IGRD.IGRNO = igr.IGRNO AND IGRD.QuantityAsPerInvoice != 0
WHERE IGRD.IGRNO = igr.IGRNO AND IGRD.QuantityAsPerInvoice != 0 and igr.PONO = POL.PONO
GROUP BY POL.PONO
LIMIT 1
)

View File

@ -0,0 +1,71 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class IpCreditNotesItemsModel extends Model
{
protected $table = 'ip_credit_notes_items';
protected $primaryKey = 'line_item_id';
protected $useAutoIncrement = false;
protected $allowedFields = [
'line_item_id',
'item_id',
'creditnote_id',
'sku',
'account_id',
'account_name',
'name',
'internal_name',
'description',
'item_order',
'invoice_id',
'invoice_item_id',
'quantity',
'pricing_scheme',
'unit',
'project_id',
'pricebook_id',
'discount_amount',
'discount',
'discount_account_id',
'discount_account_name',
'bcy_rate',
'rate',
'sales_margin',
'tax_id',
'tax_name',
'tax_type',
'tax_percentage',
'tds_tax_id',
'tds_tax_name',
'tds_tax_percentage',
'tds_tax_amount',
'reverse_charge_tax_id',
'gst_treatment_code',
'item_total',
'product_type',
'item_type',
'has_product_type_mismatch',
'has_invalid_hsn',
'hsn_or_sac',
'image_document_id',
'is_credit_only_item',
'created_at',
'updated_at',
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
/**
* Get items by credit note ID
*/
public function getItemsByCreditNoteId($creditnoteId)
{
return $this->where('creditnote_id', $creditnoteId)->findAll();
}
}

View File

@ -464,7 +464,7 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
if ($forwhat == 'amendment') {
$builder->where('POMast.Status', PO_RELEASED);
} else {
$builder->where('POMast.Status !=', PO_AMENDED);
// $builder->where('POMast.Status !=', PO_AMENDED);
// $builder->orderBy('POMast.Status !=',PO_AMENDED);
}

View File

@ -346,16 +346,13 @@ if (!empty($getlogpodtl)) {
/*****************************/
var update = '<?php echo json_encode($update) ?>';
if (update != 'null')
{
$('#editpodiv').show();
} else {
$('#editpodiv').hide();
}
// var update = '<?php echo json_encode($update) ?>';
// if (update != 'null')
// {
// $('#editpodiv').show();
// } else {
// $('#editpodiv').hide();
// }
/*****************************/
@ -907,11 +904,14 @@ if (!empty($getlogpodtl)) {
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<?php if ($parentPO == '') { ?>
<h4><?= "Edit Service Purchase Order - $PONO "; ?></h4>
<?php } else { ?>
<h4><?= "Amended Service Purchase Order - $PONO "; ?></h4>
<?php } ?>
<?php
if ($PONOStatus != 'ST030') {
$title = ($parentPO == '') ? "Edit Service Purchase Order - $PONO" : "Amended Service Purchase Order - $PONO";
} else {
$title = "View Amended Service Purchase Order - $PONO";
}
?>
<h4><?= $title; ?></h4>
<a href="<?php echo base_url() ?>purchaseorderListing" class="btn btn-secondary" id="back" value="Back">Back</a>
</div>
</div>
@ -1251,8 +1251,8 @@ if (!empty($getlogpodtl)) {
<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: left; white-space: nowrap !important;">Quantity</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>
@ -1285,7 +1285,8 @@ if (!empty($getlogpodtl)) {
<td style="text-align:left !important;"><?php echo $record->MaterialCode ?></td>
<td style="text-align:left !important;"><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
echo $shortName; ?></td>
<td style="text-align:left !important;"><?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?>
<td style="text-align:left !important;">
<?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?>
<a href="#"
class="editable-field"
data-id="<?php echo $index ?>" data-notes="<?php echo $record->LineitemAuditorNotes; ?>">
@ -1296,9 +1297,7 @@ if (!empty($getlogpodtl)) {
<button class="save-btn"></button>
<button class="cancel-btn"></button>
</div>
<?php } else {
echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-";
} ?>
<?php } else { echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; } ?>
</td>
<td style="text-align:left !important;"><?php echo $record->Quantity ?></td>
<td><?php echo $record->UOM ?></td>
@ -1309,9 +1308,9 @@ if (!empty($getlogpodtl)) {
<td style="text-align:right !important;"><?php echo $record->Taxamount ?></td>
<td style="text-align:right !important;"><?php echo $record->TotalValue ?></td>
<!-- <td align="right"><?php echo $record->Quantity ?></td>
<td align="right"><?php echo $record->ReceivedQuantity ?></td>
<td align="right"><?php echo number_format($record->Quantity - $record->ReceivedQuantity, 2, '.', ''); ?></td> -->
<!-- <td align="right"><?php // echo $record->Quantity ?></td> -->
<!-- <td align="right"><?php // echo $record->ReceivedQuantity ?></td> -->
<!-- <td align="right"><?php // echo number_format($record->Quantity - $record->ReceivedQuantity, 2, '.', ''); ?></td> -->
<input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
@ -1537,7 +1536,7 @@ if (!empty($getlogpodtl)) {
</div>
<?php if (!empty($update)) { ?>
<div class="form-group col-md-12" id="editpodiv">
<!-- <div class="form-group col-md-12" id="editpodiv">
<div class="form-group col-md-12"><label>Editable POScreen</label>
<table id="edittable" class="table table-striped table-hover mb-0" style="font-size:12px;">
@ -1606,10 +1605,9 @@ if (!empty($getlogpodtl)) {
}
?>
</tbody>
<?php } else {} ?>
</table>
</div>
</div>
</div> <?php } else {} ?> -->
<div class="form-group col-md-12 px-4" align="left">
@ -1660,7 +1658,7 @@ if (!empty($getlogpodtl)) {
<a class="btn btn-success Save" ID="Submit" onclick="Save(3)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
<?php } else { ?>
<a class="btn btn-success" ID="OK" href="<?php echo base_url() . 'purchaseorderListing'; ?>">&nbsp;&nbsp;<span class="bold">OK</span></a>
<a class="btn btn-success Save" ID="Submit" onclick="Save(2)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
<!-- <a class="btn btn-success Save" ID="Submit" onclick="Save(2)">&nbsp;&nbsp;<span class="bold">Submit</span></a> -->
<?php } ?>
</div>
@ -2520,6 +2518,19 @@ if (!empty($getlogpodtl)) {
</td>
</tr>
</script> -->
<script>
$(document).ready(function() {
var PONOStatus = "<?= $PONOStatus ?>";
console.log(PONOStatus);
if (PONOStatus === 'ST030') {
$('input, textarea, select').attr('readonly', true);
$('input[type="file"], input[type="radio"], input[type="checkbox"]').attr('disabled', true);
$("#PaymentTerms,#drpSupplier,#insuranceStatus,#PoTypeOptions,#workstatus").prop("disabled", true);
}
});
</script>
<script>
var index = <?php if (isset($index)) {
echo $index;
@ -2622,12 +2633,12 @@ if (!empty($getlogpodtl)) {
// Taxvalue: TotalTaxValue,
// TotalValue: TotalOrderValue
// }));
PONOStatus = <?php echo $PONOStatus; ?>
var 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="center">${Reqnumber}</td>
<td align="left">${materialCode}</td>
<td align="left">${shorten}</td>`;
if (PONOStatus === "PO_DRAFT" || PONOStatus === "PO_CREATED") {
@ -2917,8 +2928,6 @@ if (!empty($getlogpodtl)) {
$('#OtheritemDescription').val('');
}
var DeletedMaterialCode = '';
var DeletedMaterialName = '';
function DeleteRow(rowid) {
@ -3152,6 +3161,7 @@ if (!empty($getlogpodtl)) {
</script>
<script>
function Save(status) {
console.log("serviceValidate",status);
if (status == '0') {
stat = '<?php echo PO_DRAFT; ?>';
} else if (status == '1') {
@ -3179,7 +3189,8 @@ if (!empty($getlogpodtl)) {
if (serviceValidate()) {
if (document.getElementById('ServiceTable').rows.length < 2) {
console.log("serviceValidate");
if ($('#ServiceTable tbody tr').length < 1) {
alert('Atleast One Line needed');
return false;
}
@ -3187,15 +3198,16 @@ if (!empty($getlogpodtl)) {
// 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() == '') {
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 {
console.log("serviceValidate else");
// $('#content').loader('show');
var formData = new FormData($('.ServicePO')[0]);
$('#loader').show();
@ -3243,7 +3255,6 @@ if (!empty($getlogpodtl)) {
});
}
}
}
// this function is used to clear data changing schedule option
@ -3346,12 +3357,14 @@ if (!empty($getlogpodtl)) {
//ServiceTable
var rows = $('#ServiceTable tbody tr').length;
var DeletedMaterialCode = '';
var DeletedMaterialName = '';
if (DeletedMaterialCode != undefined && DeletedMaterialCode != '') {
$("#MaterialCode").append($('<option></option>').val(DeletedMaterialCode).html(DeletedMaterialCode + "-" + DeletedMaterialName));
DeletedMaterialCode = '';
DeletedMaterialCode = '';
DeletedMaterialName = '';
}
for (i = 2; i <= rows; i++) {

View File

@ -202,9 +202,14 @@
<?php } ?>
</td>
<?php
} else {
?>
} else if ($statusCode == PO_AMENDED ) { ?>
<td>
<a data-toggle="tooltip" href="<?php echo base_url() . 'EditPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType. '&CapitalRange=' . $record->CapitalRange; ?>">
<i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Amendment Purchase Order details"></i>
&nbsp;&nbsp;&nbsp;
</a>
</td>
<?php } else { ?>
<td>

View File

@ -1839,10 +1839,14 @@ if (!empty($INRSYMBOL)) {
function showsubmit() {
var isChecked = $('#IsOpenOrder').is(':checked');
console.log("Step 1 = SS");
var PO = $('#POType').val();
var POTy = $('#POType').val();
if (PO == 'SERVICE') {
if ($('#emergdescofpo').val().trim() == '') {
if (POTy == 'SERVICE') {
var descValue = tinymce.get('emergdescofpo').getContent().trim();
descValue = $.trim(descValue);
if (descValue == '') {
alert('Please Enter Description Of Service');
$('#emergdescofpo').focus();
return false;
@ -3026,10 +3030,9 @@ if (!empty($INRSYMBOL)) {
<label>Description Of Service <span
class="badge mandatory">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'emergdescofpo', 'value' => set_value('emergdescofpo'), 'id' => 'emergdescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
echo form_textarea($data);
?>
<textarea name="emergdescofpo" id="emergdescofpo" class="form-control" rows="3" cols="40">
<?php echo set_value('emergdescofpo'); ?>
</textarea>
</div>
</div>

View File

@ -370,13 +370,13 @@ if (!empty($INRSYMBOL)) {
alert('Please Enter the Dispatch Instruction');
$('#Deliverydate').focus();
return false;
} else if ($('#ExchangeRate').val() == '') {
} else if ($('#ExchangeRt').val() == '') {
alert('Please Enter the Exchange Rate');
$('#ExchangeRate').focus();
$('#ExchangeRt').focus();
return false;
} else if ($('#ExchangeRate').val() == 0) {
} else if ($('#ExchangeRt').val() == 0) {
alert('Please Enter the Exchange Rate');
$('#ExchangeRate').focus();
$('#ExchangeRt').focus();
return false;
} else if ($('#PlaceOforigin').val() == '') {
alert('Please Enter Place Of Origin');
@ -1135,7 +1135,7 @@ if (!empty($INRSYMBOL)) {
<div class="form-row">
<div class="form-group col-md-3"></div>
<div class="form-group col-md-9"></div>
<div class="form-group col-md-3" id="hideModalExchange">
<label> Exchange Rate</label>
@ -1293,9 +1293,9 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="form-row">
<div class="form-row" id="TripsValueloc" style="display:none;">
<div class="form-group col-md-9"></div>
<div class="form-group col-md-3" id="TripsValueloc" style="display:none;">
<div class="form-group col-md-3">
<label>NO Of Trips</label>
<?php
$data = array('name' => 'NOOfTripsloc', 'value' => set_value('NOOfTripsloc'), 'id' => 'NOOfTripsloc', 'class' => 'form-control num', 'onchange' => 'calculateFreightlocaddper(0);');
@ -1306,7 +1306,6 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="form-row">
<div class="form-group col-md-6" align="right">
<label> CGST In % </label>
@ -1585,6 +1584,14 @@ if (!empty($INRSYMBOL)) {
?>
</div>
<div class="form-group col-md-4" id="TripsValue" style="display:none;">
<label>NO Of Trips</label>
<?php
$data = array('name' => 'NOOfTrips', 'value' => set_value('NOOfTrips'), 'id' => 'NOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight(0);');
echo form_input($data);
?>
</div>
<div class="form-group col-md-4">
<label>Freight Rate </label>
<?php
@ -1592,6 +1599,7 @@ if (!empty($INRSYMBOL)) {
echo form_input($data);
?>
</div>
<div class="form-group col-md-4" style="padding-left: 0px;">
<label>Freight Amt <?php echo "($INR)" ?></label>
<?php
@ -1601,23 +1609,11 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="form-row">
<div class="form-group col-md-9"></div>
<div class="form-group col-md-3" id="TripsValue" style="display:none;">
<label>NO Of Trips</label>
<?php
$data = array('name' => 'NOOfTrips', 'value' => set_value('NOOfTrips'), 'id' => 'NOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight(0);');
echo form_input($data);
?>
</div>
</div>
<br>
<center> <label><h4>Cost of the product Per UOM<h4></label></center>
<hr />
<p style="text-align:center; font-size: 16px; "><b>Cost Of The Product Per UOM</b></p>
<hr>
<br>
<div class="form-row">
<div class="form-group col-md-6">
@ -1657,7 +1653,7 @@ if (!empty($INRSYMBOL)) {
<div class="form-group col-md-6">
<!-- RMC Including Customers -->
<label><?php echo "Nett per UOM($INR)"; ?></label>
<label><?php echo "Net per Uom($INR)"; ?></label>
<?php
$data = array('name' => 'Nett', 'value' => set_value('Nett', 0), 'id' => 'Nett', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true');
echo form_input($data);
@ -1767,7 +1763,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="form-row">
<div class="form-group col-md-3"></div>
<div class="form-group col-md-9"></div>
<div class="form-group col-md-3" id="hideModalExchangeEdit">
<label> Exchange Rate</label>
@ -1933,9 +1929,9 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="form-row">
<div class="form-row" id="TripsValuelocedit" style="display:none;">
<div class="form-group col-md-9"></div>
<div class="form-group col-md-3" id="TripsValuelocedit" style="display:none;">
<div class="form-group col-md-3">
<label>NO Of Trips</label>
<?php
$data = array('name' => 'NOOfTripslocedit', 'value' => set_value('NOOfTripslocedit'), 'id' => 'NOOfTripslocedit', 'class' => 'form-control num', 'onchange' => 'calculateFreightlocaddper(0);');
@ -2277,6 +2273,13 @@ if (!empty($INRSYMBOL)) {
echo form_dropdown('drpEditFreight', $options, set_value('drpEditFreight'), 'id="drpEditFreight" class="form-control"');
?>
</div>
<div class="form-group col-md-3" id="EditTripsValue" style="display:none;">
<span>NO Of Trips</span>
<?php
$data = array('name' => 'EditNOOfTrips', 'value' => set_value('EditNOOfTrips'), 'id' => 'EditNOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight(1);');
echo form_input($data);
?>
</div>
<div class="form-group col-md-4">
<span>Freight Rate </span>
@ -2297,91 +2300,64 @@ if (!empty($INRSYMBOL)) {
</div>
<!--End of Adding of freight in edit model -->
<br>
<p style="text-align:center; font-size: 16px; "><b>Cost Of The Product Per UOM</b></p>
<hr>
<br>
<div class="form-row">
<div class="form-group col-md-9"></div>
<div class="form-group col-md-3" id="EditTripsValue" style="display:none;">
<span>NO Of Trips</span>
<?php
$data = array('name' => 'EditNOOfTrips', 'value' => set_value('EditNOOfTrips'), 'id' => 'EditNOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight(1);');
echo form_input($data);
?>
</div>
</div>
<center> <label>Cost of the product Per UOM</label></center>
<hr />
<div class="form-row">
<div class="form-group col-md-4">
<div class="form-group col-md-6">
<label>Duty Impact</label>
</div>
<div class="form-group col-md-4">
<div>
<?php
$data = array('name' => 'EditDutyImpact', 'value' => set_value('EditDutyImpact'), 'id' => 'EditDutyImpact', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-group col-md-4" style="margin-top: -3.1%">
<div class="form-group col-md-6">
<label>Quantity</label>
<div>
<?php
$data = array('name' => 'EditPurQuantity', 'value' => set_value('EditPurQuantity'), 'id' => 'EditPurQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label>
Custom Duty <?php echo "($INR)/UOM" ?>
</label>
</div>
<div class="form-group col-md-4">
</div>
<div class="form-group col-md-4">
<div>
<div class="form-group col-md-6">
<label> Custom Duty<?php echo " ($INR)/UOM" ?></label>
<?php
$data = array('name' => 'EditCustomDutyExpenses ', 'value' => set_value('EditCustomDutyExpenses'), 'id' => 'EditCustomDutyExpenses', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label>
Clearing Charges<?php echo "($INR)" ?>
</label>
</div>
<div class="form-group col-md-4">
<div>
<div class="form-group col-md-6">
<label> Clearing Charges <?php echo "($INR)" ?></label>
<?php
$data = array('name' => 'EditClearingCharges', 'value' => set_value('EditClearingCharges'), 'id' => 'EditClearingCharges', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();');
echo form_input($data);
?>
</div>
</div>
<div class="form-group col-md-4">
<!-- RMC Including Customers -->
<label><?php echo "Nett per UOM($INR)"; ?></label>
<div>
<div class="form-group col-md-6">
<label><?php echo "Net per Uom($INR)"; ?></label>
<?php
$data = array('name' => 'EditNett', 'value' => set_value('EditNett'), 'id' => 'EditNett', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>

View File

@ -238,6 +238,7 @@
<th>Credit Note</th>
<th>Invoice</th>
<th>Client </th>
<th>Item Name</th>
<th>Item Price</th>
<th>Item qty</th>
<th>Sub Total</th>
@ -257,6 +258,7 @@
<td><?php echo $val['creditnote_number'] ?></td>
<td><?php echo $val['applied_invoices'] ?></td>
<td><?php echo $val['customer_name'] ?></td>
<td><?php echo $val['item_name'] ?></td>
<td><?php echo $val['item_price'] ?></td>
<td><?php echo $val['item_quantity'] ?></td>
<td><?php echo $val['item_total_without_tax'] ?></td>

View File

@ -2231,7 +2231,7 @@ if (!empty($POItem) && $CapitalRange == '1') {
<!--Start of Adding of Frieght model-->
<div class="form-row" style="padding:0px;">
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="drpamendFreight">Freight Type</label>
<?php
$options = array("0" => 'Select Freight Type');
@ -2243,14 +2243,14 @@ if (!empty($POItem) && $CapitalRange == '1') {
echo form_dropdown('drpamendFreight', $options, set_value('drpamendFreight'), 'id="drpamendFreight" class="form-control "');
?>
</div>
<div class="form-group col-md-3" id="AmendTripsValue" style="display:none;">
<div class="form-group col-md-4" id="AmendTripsValue" style="display:none;">
<label for="AmendNOOfTrips">NO Of Trips</label>
<?php
$data = array('name' => 'AmendNOOfTrips', 'value' => set_value('AmendNOOfTrips'), 'id' => 'AmendNOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight(0);');
echo form_input($data);
?>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="AmendtxtFreight">Freight Rate</label>
<?php
$data = array('name' => 'AmendtxtFreight', 'value' => set_value('AmendtxtFreight'), 'id' => 'AmendtxtFreight', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateFreight(3);');
@ -2258,7 +2258,7 @@ if (!empty($POItem) && $CapitalRange == '1') {
?>
</div>
<div class="form-group col-md-3" style="padding-left: 0px;">
<div class="form-group col-md-4" style="padding-left: 0px;">
<label for="AmendtxtAfterFreight"> Freight Amt </label>
<?php
$data = array('name' => 'AmendtxtAfterFreight', 'value' => set_value('AmendtxtAfterFreight'), 'id' => 'AmendtxtAfterFreight', 'class' => 'form-control num', 'readonly' => 'true');
@ -2270,8 +2270,9 @@ if (!empty($POItem) && $CapitalRange == '1') {
<!--End of Adding of freight in edit model -->
<br>
<center> <label>Cost of the product Per UOM</label></center>
<hr />
<p style="text-align:center; font-size: 16px; "><b>Cost Of The Product Per UOM</b></p>
<hr>
<br>
<div class="form-row">
<div class="form-group col-md-4">
@ -2326,7 +2327,7 @@ if (!empty($POItem) && $CapitalRange == '1') {
</div>
<div class="form-group col-md-4 " style="margin-top: -4.8%">
<label for="EditNett">Nett per UOM<?php echo "($INR)"; ?></label>
<label for="EditNett">Net per Uom<?php echo "($INR)"; ?></label>
<?php
$data = array('name' => 'EditNett', 'value' => set_value('EditNett'), 'id' => 'EditNett', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true');
echo form_input($data);

View File

@ -20,7 +20,8 @@
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}
.save-btn, .cancel-btn {
.save-btn,
.cancel-btn {
border: none;
background: none;
cursor: pointer;
@ -93,7 +94,9 @@
// Hide the edit container and show the <a> tag
$editContainer.hide();
$link.show();
});});</script>
});
});
</script>
<?php $parentPO = '';
$AvlCapitalBudAmt = isset($AvlCapitalBudAmt) ? (int) $AvlCapitalBudAmt : 0;
$insuranceStatus = array(
@ -390,11 +393,11 @@ if (!empty($getlogpodtl)) {
var update = '<?php echo json_encode($update) ?>';
if (update != 'null') {
$('#editpodiv').show();
} else {
$('#editpodiv').hide();
}
// if (update != 'null') {
// $('#editpodiv').show();
// } else {
// $('#editpodiv').hide();
// }
/*****************************/
@ -514,11 +517,14 @@ if (!empty($getlogpodtl)) {
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<?php if ($parentPO == '') { ?>
<h4><?= "Edit Capital Purchase Order - $PONO "; ?></h4>
<?php } else { ?>
<h4><?= "Amended Capital Purchase Order - $PONO "; ?></h4>
<?php } ?>
<?php
if ($PONOStatus != 'ST030') {
$title = ($parentPO == '') ? "Edit Capital Purchase Order - $PONO" : "Amended Capital Purchase Order - $PONO";
} else {
$title = "View Amended Capital Purchase Order - $PONO";
}
?>
<h4><?= $title; ?></h4>
<a href="<?php echo base_url() ?>purchaseorderListing" class="btn btn-secondary" id="back"
value="Back">Back</a>
</div>
@ -937,7 +943,9 @@ if (!empty($getlogpodtl)) {
<button class="save-btn"></button>
<button class="cancel-btn"></button>
</div>
<?php }else{ echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; } ?>
<?php } else {
echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-";
} ?>
</td>
<td style="text-align:right !important"><?php echo $record->Quantity ?></td>
<td><?php echo $record->UOM ?></td>
@ -1219,7 +1227,8 @@ if (!empty($getlogpodtl)) {
data-userid="<?php echo $index; ?>" id="Del"><span class="ri-delete-bin-7-fill"></span></a>
<?php
} else { ?>
<td> <a data-target='#VIEWCAPITAL' data-id="<?php echo $index; ?>"
<td>
<a data-target='#VIEWCAPITAL' data-id="<?php echo $index; ?>"
data-userid="<?php echo $index; ?>" data-toggle="modal" href="#VIEWCAPITAL"><i
class="fa fa-eye" data-toggle="tooltip"></i>&nbsp;&nbsp;&nbsp;</a> </td>
<?php
@ -1459,7 +1468,7 @@ if (!empty($getlogpodtl)) {
<!--################################################################## -->
<?php if (!empty($update)) { ?>
<div id="editpodiv">
<!-- <div id="editpodiv">
<div class="form-row"><label>Editable POScreen</label>
<table id="edittable" class="table table-hover table-bordered"
style="background-color:#fff;font-size:12px;">
@ -1533,7 +1542,7 @@ if (!empty($getlogpodtl)) {
</tbody>
</table>
</div>
</div>
</div> -->
<?php } else {
} ?>
@ -1583,17 +1592,14 @@ if (!empty($getlogpodtl)) {
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED) { ?>
<a class="btn btn-success Save" ID="Cancel"
href="<?php echo base_url() . 'purchaseorderListing'; ?>">&nbsp;&nbsp;<span
class="bold">Cancel</span></a>
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED) { ?>
<a class="btn btn-success Save" ID="Save" onclick="Save(0)">&nbsp;&nbsp;<span class="bold">Save as
Draft</span></a>
<a class="btn btn-success Save" ID="Cancel" href="<?php echo base_url() . 'purchaseorderListing'; ?>">&nbsp;&nbsp;<span class="bold">Cancel</span></a>
<?php if ($PONOStatus == PO_DRAFT) { ?>
<a class="btn btn-success Save" ID="Save" onclick="Save(0)">&nbsp;&nbsp;<span class="bold">Save as Draft</span></a>
<?php } ?>
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span
class="bold">Submit</span></a>
<a class="btn btn btn-soft-primary waves-effect waves-light Save" ID="Submit"
onclick="Save(4)">&nbsp;&nbsp;<span class="bold">Approve</span></a>
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
<a class="btn btn btn-soft-primary waves-effect waves-light Save" ID="Submit" onclick="Save(4)">&nbsp;&nbsp;<span class="bold">Approve</span></a>
<?php } else if($PONOStatus == PO_AMENDED){ ?>
<a class="btn btn-success" ID="OK" onclick="PageRedirect()">OK</a>
<?php } else {
if ($DEPCode == FINANCE) { ?>
<a class="btn btn-success" ID="OK" onclick="PageRedirect()">OK</a>
@ -2284,7 +2290,7 @@ if (!empty($getlogpodtl)) {
<!--Start of Adding of Frieght model-->
<div class="form-row" style="padding:0px;">
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<span>Freight Type </span>
<?php
$options = array("0" => 'Select Freight Type');
@ -2296,14 +2302,14 @@ if (!empty($getlogpodtl)) {
echo form_dropdown('drpFreight', $options, set_value('drpFreight'), 'id="drpFreight"', 'class="form-control "');
?>
</div>
<div class="form-group col-md-3" id="AddTripsValue" style="display:none;">
<div class="form-group col-md-4" id="AddTripsValue" style="display:none;">
<span>NO Of Trips</span>
<?php
$data = array('name' => 'NOOfTrips', 'value' => set_value('NOOfTrips'), 'id' => 'NOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight(0);');
echo form_input($data);
?>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<span>Freight Rate </span>
<?php
$data = array('name' => 'txtFreight', 'value' => set_value('txtFreight'), 'id' => 'txtFreight', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateFreight(0);');
@ -2311,7 +2317,7 @@ if (!empty($getlogpodtl)) {
?>
</div>
<div class="form-group col-md-3" style="padding-left: 0px;">
<div class="form-group col-md-4" style="padding-left: 0px;">
<span>Freight Amt <?php echo "($INR)" ?></span>
<?php
$data = array('name' => 'txtAfterFreight', 'value' => set_value('txtAfterFreight'), 'id' => 'txtAfterFreight', 'class' => 'form-control num', 'readonly' => 'true');
@ -2323,10 +2329,10 @@ if (!empty($getlogpodtl)) {
<!--End of Adding of freight in edit model -->
<div class="form-row">
<center> <label>Cost of the product Per UOM</label></center>
<hr />
</div>
<br>
<p style="text-align:center; font-size: 16px; "><b>Cost Of The Product Per UOM</b></p>
<hr>
<br>
<div class="form-row">
<div class="form-group col-md-4">
Duty Impact
@ -2383,7 +2389,7 @@ if (!empty($getlogpodtl)) {
<div class="form-group col-md-4" style="margin-top: -25px;">
<!-- RMC Including Customers -->
<span><?php echo "Nett per UOM($INR)"; ?></span>
<span><?php echo "Net per Uom($INR)"; ?></span>
<div class="form-group">
<?php
$data = array('name' => 'Nett', 'value' => set_value('Nett', 0), 'id' => 'Nett', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true');
@ -2424,7 +2430,7 @@ if (!empty($getlogpodtl)) {
<!-- 2nd modal -->
<div id="EDITCAPITAL" class="modal fade " tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
style="display: none;">
<div class="modal-dialog modal-full-width" style="width: 1060px !important;">
@ -2995,10 +3001,10 @@ if (!empty($getlogpodtl)) {
</div>
<!--End of Adding of freight in edit model -->
<div class="form-row">
<center> <label>Cost of the product Per UOM</label></center>
<hr />
</div>
<br>
<p style="text-align:center; font-size: 16px; "><b>Cost Of The Product Per UOM</b></p>
<hr>
<br>
<div class="form-row">
<div class="form-group col-md-4">
Duty Impact
@ -3093,9 +3099,613 @@ if (!empty($getlogpodtl)) {
</div>
</div><!-- /.modal -->
<!-- 3rd modal new-->
<div id="VIEWCAPITAL" class="modal fade " tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-full-width" style="width: 1060px !important;">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">View Capital Purchase Order Item</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div><!-- modal-header -->
<form>
<div class="modal-body p-4">
<div class="form-row">
<div class="form-group col-md-3">
<label>Req No<span class="text-danger">*</span></label>
<div>
<?php
$data = array('name' => 'ViewReqnumber', 'value' => set_value('ViewReqnumber'), 'id' => 'ViewReqnumber', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- Req No -->
<div class="form-group col-md-3">
<label>Department Name</label>
<div>
<?php
$data = array('name' => 'ViewCapitalDepartmentName', 'value' => set_value('ViewCapitalDepartmentName'), 'id' => 'ViewCapitalDepartmentName', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- Department Name -->
<div class="form-group col-md-3">
<label>Cost Center Code</label>
<div>
<?php
$data = array('name' => 'ViewCostCenter', 'value' => set_value('ViewCostCenter'), 'id' => 'ViewCostCenter', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- Cost Center Code -->
<div class="form-group col-md-3">
<label>Avail Bud Amount<?php echo "($INR)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'ViewCapitalbudAmt', 'value' => set_value('ViewCapitalbudAmt'), 'id' => 'ViewCapitalbudAmt', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- Avail Bud Amount -->
</div><!-- 1st form-row -->
<div class="form-row">
<div class="form-group col-md-9"></div>
<div class="form-group col-md-3" id="ExchangeRateModalEditDiv" style="display:none;">
<label> Exchange Rate</label>
<div class="form-group">
<?php
$data = array('name' => 'ViewExchangeRtModal', 'value' => set_value('ViewExchangeRtModal'), 'id' => 'ViewExchangeRtModal', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div><!-- 2nd form-row -->
<div class="form-row" style="padding: 0px;">
<div class="form-group col-md-3">
<label>Item Code<span class="text-danger">*</span></label>
<div>
<?php
$data = array('name' => 'ViewMaterialCode', 'value' => set_value('ViewMaterialCode'), 'id' => 'ViewMaterialCode', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- Item Code -->
<div class="form-group col-md-3">
<label>Item Name</label>
<div class="form-group">
<?php
$data = array('name' => 'ViewCapitalItemName', 'value' => set_value('ViewCapitalItemName'), 'id' => 'ViewCapitalItemName', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- Item Name -->
<div class="form-group col-md-3">
<label>UOM</label>
<div class="form-group">
<?php
$data = array('name' => 'ViewCPUOM', 'value' => set_value('ViewCPUOM'), 'id' => 'ViewCPUOM', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- UOM -->
<div class="form-group col-md-3">
<label>Quantity<span class="text-danger">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'ViewCPQuantity', 'value' => set_value('ViewCPQuantity'), 'id' => 'ViewCPQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- Quantity -->
</div><!-- 3rd form-row -->
<div class="form-row">
<div class="form-group col-md-3"></div>
<div class="form-group col-md-3" style="padding: 0px;">
<label id="EditRateIn">Rate(in INR/UOM)</label><span class="text-danger">*</span>
<div class="form-group">
<?php
$data = array('name' => 'ViewCPRate', 'value' => set_value('ViewCPRate'), 'id' => 'ViewCPRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- Rate(in INR/UOM) -->
<div class="form-group col-md-3">
<label>Per</label>
<?php $data = array('name' => 'ViewPer', 'value' => set_value('ViewPer'), 'id' => 'ViewPer', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data); ?>
</div><!--Per -->
<div class="form-group col-md-3" style="padding-right: 0px;">
<label id="ViewTotalAmount">Basic value <?php echo "($INR)" ?></label>
<?php
$data = array('name' => 'ViewCPTotalAmount', 'value' => set_value('ViewCPTotalAmount'), 'id' => 'ViewCPTotalAmount', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div><!-- Basic value -->
</div><!-- 4th form-row -->
<div class="form-row" style="padding:0px;" id="VIEWCAPdiv">
<div class="form-group col-md-3">
</div>
<div class="form-group col-md-3">
<label>Discount Type </label>
<div>
<?php
$data = array('name' => 'ViewDiscountType', 'value' => set_value('ViewDiscountType'), 'id' => 'ViewDiscountType', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- Discount Type -->
<div class="form-group col-md-3">
<label>Discount Rate </label>
<div class="form-group">
<?php
$data = array('name' => 'txtViewDiscount', 'value' => set_value('txtViewDiscount'), 'id' => 'txtViewDiscount', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();calculateDiscount(1);', 'style' => 'text-align:right;', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- Discount Rate -->
<div class="form-group col-md-3" style="padding:0px;">
<label>Discounted Amt <?php echo "($INR)" ?> </label>
<div class="form-group">
<?php
$data = array('name' => 'txtViewAfterDiscount', 'value' => set_value('txtViewAfterDiscount'), 'id' => 'txtViewAfterDiscount', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div><!-- Discounted Amt -->
<div class="form-group col-md-3"></div>
<div class="form-group col-md-3">
<label>Freight Type </label>
<?php
$options = array("0" => 'Select Freight Type');
//print_r( $options);
if (!empty($FreightType)) {
foreach ($FreightType as $SID):
$options[$SID->ConfigValue] = $SID->ConfigValue;
endforeach;
}
echo form_dropdown('drpFreightviewloc', $options, set_value(field: 'drpFreightviewloc'), 'id="drpFreightviewloc" disabled class="form-control "');
?>
</div><!-- Freight Type -->
<div class="form-group col-md-3" id="TripsValuelocedit" style="display:none;">
<label>NO Of Trips</label>
<?php
$data = array('name' => 'NOOfTripslocview', 'value' => set_value('NOOfTripslocview'), 'id' => 'NOOfTripslocview', 'class' => 'form-control num', 'onchange' => 'calculateFreightlocviewper();', 'disabled' => 'disabled');
echo form_input($data);
?>
</div><!-- NO Of Trips -->
<div class="form-group col-md-3">
<label>Freight Rate </label>
<?php
$data = array('name' => 'txtFreightlocview', 'value' => set_value('txtFreightlocview'), 'id' => 'txtFreightlocview', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateFreightlocviewper();', 'disabled' => 'disabled');
echo form_input($data);
?>
</div><!-- Freight Rate -->
<div class="form-group col-md-3" style="padding: 1px;">
<label>Freight Amt <?php echo "($INR)"; ?></label>
<?php
$data = array('name' => 'txtAfterFreightlocview', 'value' => set_value('txtAfterFreightlocview'), 'id' => 'txtAfterFreightlocview', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div><!-- Freight Amt -->
<div class="form-group col-md-6" style="text-align:right !important">
<label> CGST In % <label>
</div><!-- CGST -->
<div class="form-group col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'ViewCgst', 'value' => set_value('ViewCgst'), 'id' => 'ViewCgst', 'class' => 'form-control num', 'placeholder' => 'CGST TAX PERCENTAGE', 'onchange' => 'EditRatechange()', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- CGST -->
<div class="form-group col-md-3">
<?php
$data = array('name' => 'ViewAfterCgst', 'value' => set_value('ViewAfterCgst'), 'id' => 'ViewAfterCgst', 'class' => 'form-control num', 'placeholder' => 'After CGST', 'readonly' => 'true');
echo form_input($data);
?>
</div><!-- CGST -->
</div><!-- VIEWCAPdiv form-row -->
<div class="form-row" id="VIEWCAPdiv1">
<div class="form-group col-md-6" style="text-align:right !important">
<label> SGST In % </label>
</div><!-- SGST -->
<div class="form-group col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'ViewSgst', 'value' => set_value('ViewSgst'), 'id' => 'ViewSgst', 'class' => 'form-control num', 'placeholder' => 'SGST TAX PERCENTAGE', 'onchange' => 'EditRatechange()', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- SGST1 -->
<div class="form-group col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'ViewAfterSgst', 'value' => set_value('ViewAfterSgst'), 'id' => 'ViewAfterSgst', 'class' => 'form-control num', 'placeholder' => 'After SGST', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- SGST2 -->
</div><!-- VIEWCAPdiv1 form-row -->
<div class="form-row" id="VIEWCAPdiv2">
<div class="form-group col-md-6" style="text-align:right !important">
<label> IGST In % </label>
</div><!-- IGST -->
<div class="form-group col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'ViewIgst', 'value' => set_value('ViewIgst'), 'id' => 'ViewIgst', 'class' => 'form-control num', 'placeholder' => 'IGST TAX PERCENTAGE', 'onchange' => 'EditRatechange()', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- IGST 1 -->
<div class="form-group col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'ViewAfterIgst', 'value' => set_value('ViewAfterIgst'), 'id' => 'ViewAfterIgst', 'class' => 'form-control num', 'placeholder' => 'After IGST', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div><!-- IGST 2 -->
</div><!-- VIEWCAPdiv2 form-row -->
<div class="form-row" id="VIEWCAPdiv3">
<div class="col-md-9 col-md-offset-4" style="text-align:right !important">
<label>Other Allowances <?php echo "($INR)" ?></label>
</div>
<div class="form-group col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'ViewOtherAllowances', 'value' => set_value('ViewOtherAllowances'), 'id' => 'ViewOtherAllowances', 'class' => 'form-control num', 'placeholder' => 'Other Allowances', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-9 col-md-offset-4" style="text-align:right !important">
<label>Total Amount <?php echo "($INR)" ?></label>
</div>
<div class="form-group col-md-3">
<div class="form-group">
<?php
$data = array('name' => 'ViewTotalAmountlocal', 'value' => set_value('ViewTotalAmountlocal'), 'id' => 'ViewTotalAmountlocal', 'class' => 'form-control num', 'placeholder' => 'Total Amount', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div><!-- VIEWCAPdiv3 form-row -->
<div class="form-row" style="padding:1%;">
</div>
<div class="form-row" style="border:1px solid #000;padding:0px;" id="ViewModalImportTaxHide" style="display:none;">
<br />
<div class="form-group col-md-6" style="padding:10px;">
<div class="form-row">
<div class="form-group col-md-4">
Basic Price <?php echo "($INR)" ?>
</div>
<div class="form-group col-md-4" style="display:none;">
<div class="form-group">
<?php
$data = array('name' => 'ViewBasicPriceTax', 'value' => set_value('ViewBasicPriceTax'), 'id' => 'ViewBasicPriceTax', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-group col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'ViewAfterBasicPriceTax', 'value' => set_value('ViewAfterBasicPriceTax'), 'id' => 'ViewAfterBasicPriceTax', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div><!-- form-row -->
<div class="form-row">
<div class="form-group col-md-4">
Landing charge <?php echo "($INR)" ?>
</div>
<div class="form-group col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'ViewLandingCharge', 'value' => set_value('ViewLandingCharge'), 'id' => 'ViewLandingCharge', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-group col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'ViewAfterLandingCharge', 'value' => set_value('ViewAfterLandingCharge'), 'id' => 'ViewAfterLandingCharge', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div><!-- form-row -->
<div class="form-row">
<div class="form-group col-md-4">
Assessable Value (A) <?php echo "($INR)" ?>
</div>
<div class="form-group col-md-4">
<div class="form-group" style="display: none;">
<?php
$data = array('name' => 'ViewHighseas ', 'value' => set_value('ViewHighseas'), 'id' => 'ViewHighseas', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-group col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'ViewAfterAssessable', 'value' => set_value('ViewAfterAssessable'), 'id' => 'ViewAfterAssessable', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div><!-- form-row -->
<div class="form-row">
<div class="form-group col-md-4">
Custom duty (B)<?php echo "($INR)" ?>
</div>
<div class="form-group col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'ViewCustomduty', 'value' => set_value('ViewCustomduty'), 'id' => 'ViewCustomduty', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-group col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'viewAfterCustomduty', 'value' => set_value('viewAfterCustomduty'), 'id' => 'viewAfterCustomduty', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div><!-- form-row -->
<div class="form-row">
<div class="form-group col-md-4">
Custom ED_cess (C)<?php echo "($INR)" ?>
</div>
<div class="form-group col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'ViewCustomEDcess', 'value' => set_value('ViewCustomEDcess'), 'id' => 'ViewCustomEDcess', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-group col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'ViewAfterCustomEDcess', 'value' => set_value('ViewAfterCustomEDcess'), 'id' => 'ViewAfterCustomEDcess', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div><!-- form-row -->
<div class="form-row">
<div class="form-group col-md-4">
Custom S & H cess (D)<?php echo "($INR)" ?>
</div>
<div class="form-group col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'ViewCustomSHcess', 'value' => set_value('ViewCustomSHcess'), 'id' => 'ViewCustomSHcess', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-group col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'ViewAfterCustomSHcess', 'value' => set_value('ViewAfterCustomSHcess'), 'id' => 'ViewAfterCustomSHcess', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div><!-- form-row -->
</div><!-- 1st form-group col-md-6 -->
<div class="form-group col-md-6" style="padding:10px;">
<div class="form-row">
<div class="form-group col-md-4">
Subtotal (E) <?php echo "($INR) (A+B+C+D)" ?>
</div>
<div class="form-group col-md-4">
<div class="form-group" style="display: none;">
<?php
$data = array('name' => 'ViewAdditionalExciseduty ', 'value' => set_value('ViewAdditionalExciseduty'), 'id' => 'ViewAdditionalExciseduty', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-group col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'ViewSubtotal', 'value' => set_value('ViewSubtotal'), 'id' => 'ViewSubtotal', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<!-- Additional Excise duty : (g) -->
IGST on (E): (F) <?php echo " ($INR)"; ?>
</div>
<div class="form-group col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'ViewIgstInt ', 'value' => set_value('ViewIgstInt', 0), 'id' => 'ViewIgstInt', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true', 'onchange' => 'EditCalculateIgst()');
echo form_input($data);
?>
</div>
</div>
<div class="form-group col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'ViewAfterIgstInt', 'value' => set_value('ViewAfterIgstInt', 0), 'id' => 'ViewAfterIgstInt', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-8">
Total Duty (G) <?php echo "($INR)" ?>
</div>
<div class="form-group col-md-4">
<div class="form-group">
<?php
$data = array('name' => 'ViewGrossdutypayable ', 'value' => set_value('ViewGrossdutypayable'), 'id' => 'ViewGrossdutypayable', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<!--Start of Frieght model-->
<div class="form-row" style="padding:0px;">
<div class="form-group col-md-4">
<span>Freight Type </span>
<?php
$options = array("0" => 'Select Freight Type');
if (!empty($FreightType)) {
foreach ($FreightType as $SID):
$options[$SID->ConfigValue] = $SID->ConfigValue;
endforeach;
}
echo form_dropdown('drpViewFreight', $options, set_value('drpViewFreight'), 'id="drpViewFreight"', 'class="form-control "');
?>
</div>
<div class="form-group col-md-4" id="ViewTripsValue" style="display:none;">
<span>NO Of Trips</span>
<?php
$data = array('name' => 'ViewNOOfTrips', 'value' => set_value('ViewNOOfTrips'), 'id' => 'ViewNOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight(2);');
echo form_input($data);
?>
</div>
<div class="form-group col-md-4">
<span>Freight Rate </span>
<?php
$data = array('name' => 'txtViewFreight', 'value' => set_value('txtViewFreight'), 'id' => 'txtViewFreight', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateFreight(2);');
echo form_input($data);
?>
</div>
<div class="form-group col-md-4" style="padding-left: 0px;">
<span>Freight Amt <?php echo "($INR)" ?></span>
<?php
$data = array('name' => 'txtViewAfterFreight', 'value' => set_value('txtViewAfterFreight'), 'id' => 'txtViewAfterFreight', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<!--End of Adding of freight in view model -->
<br>
<p style="text-align:center; font-size: 16px; "><b>Cost Of The Product Per UOM</b></p>
<hr>
<br>
<div class="form-row">
<div class="form-group col-md-6">
<label>Duty Impact</label>
<?php
$data = array('name' => 'ViewDutyImpact', 'value' => set_value('ViewDutyImpact'), 'id' => 'ViewDutyImpact', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-6">
<label>Quantity</label>
<?php
$data = array('name' => 'ViewPurQuantity', 'value' => set_value('ViewPurQuantity'), 'id' => 'ViewPurQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label> Custom Duty Expenses <?php echo "($INR)/UOM" ?></label>
<?php
$data = array('name' => 'ViewCustomDutyExpenses ', 'value' => set_value('ViewCustomDutyExpenses'), 'id' => 'ViewCustomDutyExpenses', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label> Clearing Charges <?php echo "($INR)" ?></label>
<?php
$data = array('name' => 'ViewClearingCharges', 'value' => set_value('ViewClearingCharges'), 'id' => 'ViewClearingCharges', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-6">
<label><?php echo "Net per UOM($INR)"; ?></span>
<?php
$data = array('name' => 'ViewNett', 'value' => set_value('ViewNett'), 'id' => 'ViewNett', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-row">
<!-- <div class="form-group col-md-6" style="text-align:right !important" style="display:none;"> <label>Total Order Amount :</label></div> -->
<div class="form-group col-md-6" style="display:none;">
<div class="form-group">
<?php
$data = array('name' => 'ViewtxtTotalOrderValue', 'value' => set_value('ViewtxtTotalOrderValue'), 'id' => 'ViewtxtTotalOrderValue', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div id="VIEWCAPITAL" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
</div><!-- 2nd form-group col-md-6 -->
</div><!-- form-row-Import-Tax-Hide -->
<div class="form-row">
<div class="form-group col-md-12">
<label>Capital Description </label>
<?php
$data = array('name' => 'ViewItemDescription', 'value' => set_value('ViewItemDescription'), 'id' => 'ViewItemDescription', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
echo form_textarea($data); ?>
</div>
</div><!-- form-row -->
</div><!-- modal-body -->
<div class="modal-footer">
<a class="btn btn-success" data-dismiss="modal" value="Cancel" style="margin-right:10px">Cancel</a>
<?php if ($CapitalRange == 1 || $CapitalRange == 0) { ?>
<!-- <a class="btn btn-success font ViewCapital" ID="ViewUpdateCapital">&nbsp;&nbsp;<span class="bold">Update Capital</span></a> -->
<?php } ?>
</div><!-- modal-footer -->
</form><!-- form -->
</div><!-- modal-content -->
</div><!-- modal-dialog modal-full-width -->
</div><!-- /.modal -->
<!-- 3rd modal old-->
<div id="VIEWCAPITALOLD" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
style="display: none;">
<div class="modal-dialog modal-full-width">
<div class="modal-content">
@ -3635,7 +4245,7 @@ if (!empty($getlogpodtl)) {
</div>
<div class="form-group col-md-4" style="margin-top: -25px;">
<!-- RMC Including Customers -->
<span><?php echo "Nett per UOM($INR)"; ?></span>
<span><?php echo "Net per Uom($INR)"; ?></span>
<div class="form-group">
<?php
$data = array('name' => 'ViewNett', 'value' => set_value('ViewNett'), 'id' => 'ViewNett', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true');
@ -3704,6 +4314,19 @@ if (!empty($getlogpodtl)) {
</td>
</tr>
</script> -->
<script>
$(document).ready(function() {
var PONOStatus = "<?= $PONOStatus ?>";
console.log(PONOStatus);
if (PONOStatus === 'ST030') {
$('input, textarea, select').attr('readonly', true);
$('input[type="file"], input[type="radio"], input[type="checkbox"]').attr('disabled', true);
$("#MaterialCode,#EditMaterialCode,#Reqnumber,#drpSupplier,#currencytype,#PoTypeOptions,#PaymentMethod,#insuranceStatus,#CapitalCostCenter").prop("disabled", true);
}
});
</script>
<script>
var RequistQuantity = '';
var AvilBudAmt = '';
@ -3955,7 +4578,9 @@ if (!empty($getlogpodtl)) {
$('#RateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + CPUOMDisplay + ')');
$('#EditRateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + CPUOMDisplay + ')');
if (obj.material_rate != 0) {
Ratechange();calculateFreight(3);calculateFreightlocaddper();
Ratechange();
calculateFreight(3);
calculateFreightlocaddper();
}
@ -4801,7 +5426,9 @@ if (!empty($getlogpodtl)) {
<button class="save-btn"></button>
<button class="cancel-btn"></button>
</div></td>`;
}else{ rowHtml += `<td>-</td>`; }
} else {
rowHtml += `<td>-</td>`;
}
rowHtml += `<td style="text-align:right !important">${quantity}</td>
<td style="text-align:right !important">${uom}</td>
<td style="text-align:right !important">${itemRate}</td>
@ -8699,7 +9326,6 @@ if (!empty($getlogpodtl)) {
$('#packagingcalmodel').css('z-index', ''); // Reset to default
});
});
</script>
<script>
@ -8719,5 +9345,4 @@ if (!empty($getlogpodtl)) {
$('#editpackagingcalmodel').css('z-index', ''); // Reset to default
});
});
</script>

View File

@ -1058,7 +1058,13 @@ if (!empty($RequistionDetails)) {
echo form_dropdown('drpamendFreight', $options, set_value('drpamendFreight'), 'id="drpamendFreight" class="form-control "');
?>
</div>
<div class="form-group col-md-4" id="AmendTripsValue" style="display:block;">
<span>NO Of Trips</span>
<?php
$data = array('name' => 'AmendNOOfTrips', 'value' => set_value('AmendNOOfTrips'), 'id' => 'AmendNOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight(0);');
echo form_input($data);
?>
</div>
<div class="form-group col-md-4">
<span>Freight Rate </span>
<?php
@ -1076,22 +1082,12 @@ if (!empty($RequistionDetails)) {
</div>
</div>
<div class="form-row">
<div class="form-group col-md-8"></div>
<div class="form-group col-md-4" id="AmendTripsValue" style="display:block;">
<span>NO Of Trips</span>
<?php
$data = array('name' => 'AmendNOOfTrips', 'value' => set_value('AmendNOOfTrips'), 'id' => 'AmendNOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight(0);');
echo form_input($data);
?>
</div>
</div>
<!--End of Adding of freight in edit model -->
<br>
<center> <label>Cost of the product Per UOM</label></center>
<hr />
<p style="text-align:center; font-size: 16px; "><b>Cost Of The Product Per UOM</b></p>
<hr>
<br>
<div class="form-row">
<div class="form-group col-md-6">
@ -1141,7 +1137,7 @@ if (!empty($RequistionDetails)) {
</div>
<div class="form-group col-md-6">
<!-- RMC Including Customers -->
<label><?php echo "Nett per UOM($INR)"; ?></label>
<label><?php echo "Net per Uom($INR)"; ?></label>
<div>
<?php
$data = array('name' => 'EditNett', 'value' => set_value('EditNett'), 'id' => 'EditNett', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true');
@ -1202,11 +1198,6 @@ if (!empty($RequistionDetails)) {
<table id="ImportTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
<thead>
<tr>
<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>
@ -1352,7 +1343,7 @@ if (!empty($RequistionDetails)) {
<?php
// } else {
?>
<td> <!-- <a data-toggle="tooltip" href="#"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requistion details"></i>&nbsp;&nbsp;&nbsp;</a> </td> -->
</td> <!-- <a data-toggle="tooltip" href="#"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requistion details"></i>&nbsp;&nbsp;&nbsp;</a> </td> -->
<?php
// }
?>

View File

@ -64,7 +64,7 @@ $insurenceno = '';
$BudgetType = '';
if (!empty($POMaster)) {
// print_r($POMaster);
// dd($POMaster);
// print_r($Payment);
// echo "****";
@ -1219,9 +1219,8 @@ if (!empty($INRSYMBOL)) {
<br>
<div class="form-row">
<div class="table-responsive" style="padding-bottom: 30px;">
<table id="ServiceTable" class="table table-bordered table-hover" style="font-size:12px;">
<table id="revenueTax" class="table table-bordered table-hover" style="font-size:12px;">
<thead>
<tr>
<th style="white-space: nowrap !important;">SNo</th>
<th class="text-center" style="white-space: nowrap !important;">Requisition No</th>

View File

@ -368,12 +368,12 @@ if (!empty($getlogpodtl)) {
$('#splpodiv').hide();
}
/*****************************/
var update = '<?php echo json_encode($update) ?>';
if (update != 'null') {
$('#editpodiv').show();
} else {
$('#editpodiv').hide();
}
// var update = '<?php echo json_encode($update) ?>';
// if (update != 'null') {
// $('#editpodiv').show();
// } else {
// $('#editpodiv').hide();
// }
/*****************************/
$('#PoTypeOptions').attr("style", "pointer-events: none;");
if (DelOpt == "0") {
@ -2036,11 +2036,14 @@ if (!empty($getlogpodtl)) {
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<?php if ($parentPO == '') { ?>
<h4><?= "Edit Revenue Purchase Order - $PONO "; ?></h4>
<?php } else { ?>
<h4><?= "Amended Revenue Purchase Order - $PONO "; ?></h4>
<?php } ?>
<?php
if ($PONOStatus != 'ST030') {
$title = ($parentPO == '') ? "Edit Revenue Purchase Order - $PONO" : "Amended Revenue Purchase Order - $PONO";
} else {
$title = "View Amended Revenue Purchase Order - $PONO";
}
?>
<h4><?= $title; ?></h4>
<a href="<?php echo base_url() ?>purchaseorderListing" class="btn btn-secondary" id="back"
value="Back">Back</a>
</div>
@ -2830,7 +2833,7 @@ if (!empty($getlogpodtl)) {
</div>
<!--################################################################## -->
<?php if (!empty($update)) { ?>
<div class="form-row" id="editpodiv">
<!-- <div class="form-row" id="editpodiv">
<!- - <div class="form-row"> - ->
<label>Editable POScreen</label>
<table id="edittable" class="table table-hover table-bordered"
@ -2891,7 +2894,7 @@ if (!empty($getlogpodtl)) {
</tbody>
</table>
<!- - </div> - ->
</div>
</div> -->
<?php } else {
} ?>
@ -4381,6 +4384,18 @@ if (!empty($getlogpodtl)) {
</section>
</div>
</script>
<script>
$(document).ready(function() {
var PONOStatus = "<?= $PONOStatus ?>";
console.log(PONOStatus);
if (PONOStatus === 'ST030') {
$('input, textarea, select').attr('readonly', true);
$('input[type="file"], input[type="radio"], input[type="checkbox"]').attr('disabled', true);
$("#PaymentTerms,#drpSupplier").prop("disabled", true);
}
});
</script>
<script>
var index = <?php if (isset($index)) {
echo $index;

View File

@ -649,6 +649,19 @@ foreach ($PaymentTerms as $TER) {
});
});
</script>
<style>
/* Container for the scrollable table */
.scrollable-table {
overflow: auto; /* Enable scrolling */
scrollbar-width: none; /* Hide scrollbar in Firefox */
-ms-overflow-style: none; /* Hide scrollbar in IE and Edge */
}
/* Hide scrollbar in WebKit browsers (Chrome, Safari, etc.) */
.scrollable-table::-webkit-scrollbar {
display: none; /* Hide scrollbar */
}
</style>
<style>
#mceu_5{
border-width: 0px 0px 0px !important;
@ -952,7 +965,7 @@ foreach ($PaymentTerms as $TER) {
<div class="form-row">
<div class="form-group col-md-3">
<label>Insurance Options<span class="text-danger">*</span></label>
<div class="form-group">
<div>
<?php
@ -975,15 +988,19 @@ foreach ($PaymentTerms as $TER) {
endforeach;
}
echo form_dropdown('insuranceStatus', $optionsInsurance, set_value('insuranceStatus'), 'id="insuranceStatus" required="true" class="form-control select2');
echo form_dropdown('insuranceStatus', $optionsInsurance, set_value('insuranceStatus'), 'id="insuranceStatus" required="true" class="form-control select2"');
?>
</div>
</div>
<div class="form-group col-md-3" id="insuranceTxtDiv" style="display:block;">
<label>Insurance No / Insurance Details<span class="text-danger">*</span></label>
<div class="form-group">
<div>
<?php
$data = array('name' => 'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
echo form_input($data);
@ -1013,7 +1030,7 @@ foreach ($PaymentTerms as $TER) {
<br />
<div class="form-row">
<div class="table-responsive" style="padding-bottom: 30px;">
<div class="table-responsive scrollable-table" style="padding-bottom: 30px;">
<table id="ServiceTable" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
<thead>
<tr>
@ -1175,6 +1192,7 @@ foreach ($PaymentTerms as $TER) {
</tbody>
</table>
</div>
</div>

View File

@ -348,9 +348,7 @@ if (!empty($getlogpodtl)) {
</style>
<script src="<?php echo base_url() ?>public/assets/tinymce/js/tinymce/tinymce.min.js"></script>
<script src="<?php echo base_url(); ?>public/assets/js/CreatePOValidation.js" type="text/javascript">
</script>
<script src="<?php echo base_url(); ?>public/assets/js/CreatePOValidation.js" type="text/javascript"></script>
<script>
@ -396,16 +394,13 @@ if (!empty($getlogpodtl)) {
/*****************************/
var update = '<?php echo json_encode($update) ?>';
if (update != 'null')
{
$('#editpodiv').show();
} else {
$('#editpodiv').hide();
}
// var update = '<?php echo json_encode($update) ?>';
// if (update != 'null')
// {
// $('#editpodiv').show();
// } else {
// $('#editpodiv').hide();
// }
/*****************************/
//Initialize Select2 Elements
@ -464,11 +459,14 @@ if (!empty($getlogpodtl)) {
<div class="col-12">
<!-- start page title -->
<div class="page-title-box page-title-box-alt">
<?php if ($parentPO == '') { ?>
<h4><?= "Edit Import Purchase Order - $PONO "; ?></h4>
<?php } else { ?>
<h4><?= "Amended Import Purchase Order - $PONO "; ?></h4>
<?php } ?>
<?php
if ($PONOStatus != 'ST030') {
$title = ($parentPO == '') ? "Edit Import Purchase Order - $PONO" : "Amended Import Purchase Order - $PONO";
} else {
$title = "View Amended Import Purchase Order - $PONO";
}
?>
<h4><?= $title; ?></h4>
<a href="<?php echo base_url() ?>purchaseorderListing" class="btn btn-secondary" id="back" value="Back">Back</a>
</div><!-- end page title -->
</div><!-- end col-->
@ -890,7 +888,10 @@ if (!empty($getlogpodtl)) {
<input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
<input type="hidden" name="<?php echo 'departmentName' . $index ?>" id="<?php echo 'departmentName' . $index ?>" value="<?php echo $record->DepartmentName; ?>" />
<!--<input type="hidden" name="<?php //echo 'AvlBudAmt'.$index ?>" id="<?php //echo 'AvlBudAmt'.$index ?>" value="<?php //echo $record->AvlBudAmt ; ?>" /> -->
<!--<input type="hidden" name="<?php //echo 'AvlBudAmt'.$index
?>" id="<?php //echo 'AvlBudAmt'.$index
?>" value="<?php //echo $record->AvlBudAmt ;
?>" /> -->
<input type="hidden" name="<?php echo 'AvlBudAmt' . $index ?>" id="<?php echo 'AvlBudAmt' . $index ?>" value="<?php echo "$AvlAmount"; ?>" />
<input type="hidden" name="<?php echo 'LineItemNo' . $index ?>" id="<?php echo 'LineItemNo' . $index ?>" value="<?php echo $record->LineItemNo; ?>" />
@ -930,8 +931,14 @@ if (!empty($getlogpodtl)) {
<input type="hidden" name="<?php echo 'CustomSHCess' . $index ?>" id="<?php echo 'CustomSHCess' . $index ?>" value="<?php echo $record->CustomSHCess; ?>" />
<input type="hidden" name="<?php echo 'AfterCustomSHCess' . $index ?>" id="<?php echo 'AfterCustomSHCess' . $index ?>" value="<?php echo $record->AfterCustomSHCess; ?>" />
<!-- <input type="hidden" name="<?php // echo 'Grossdutypayable' . $index ?>" id="<?php // echo 'Grossdutypayable' . $index ?>" value="<?php // echo $record->Grossdutypayable; ?>" /> -->
<!-- <input type="hidden" name="<?php // echo 'QuantityKG' . $index ?>" id="<?php // echo 'QuantityKG' . $index ?>" value="<?php // echo $record->QuantityKG; ?>" />-->
<!-- <input type="hidden" name="<?php // echo 'Grossdutypayable' . $index
?>" id="<?php // echo 'Grossdutypayable' . $index
?>" value="<?php // echo $record->Grossdutypayable;
?>" /> -->
<!-- <input type="hidden" name="<?php // echo 'QuantityKG' . $index
?>" id="<?php // echo 'QuantityKG' . $index
?>" value="<?php // echo $record->QuantityKG;
?>" />-->
<input type="hidden" name="<?php echo 'BasicPriceInMTon' . $index ?>" id="<?php echo 'BasicPriceInMTonG' . $index ?>" value="<?php echo $record->BasicPriceInMTon; ?>" />
@ -941,7 +948,10 @@ if (!empty($getlogpodtl)) {
<!-- <input type="hidden" name="<?php // echo 'Grossdutypayable' . $index ?>" id="<?php // echo 'Grossdutypayable' . $index ?>" value="<?php // echo $record->Grossdutypayable; ?>" />-->
<!-- <input type="hidden" name="<?php // echo 'Grossdutypayable' . $index
?>" id="<?php // echo 'Grossdutypayable' . $index
?>" value="<?php // echo $record->Grossdutypayable;
?>" />-->
<input type="hidden" name="<?php echo 'BasicINRValue' . $index ?>" id="<?php echo 'BasicINRValue' . $index ?>" value="<?php echo $record->BasicINRValue; ?>" />
@ -949,10 +959,16 @@ if (!empty($getlogpodtl)) {
<input type="hidden" name="<?php echo 'ExchangeRate' . $index ?>" id="<?php echo 'ExchangeRate' . $index ?>" value="<?php echo $record->ExchangeRate; ?>" />
<!-- <input type="hidden" name="<?php // echo 'AfterCustomEDcess' . $index ?>" id="<?php // echo 'AfterCustomEDcess' . $index ?>" value="<?php // echo $record->AfterCustomEdCess; ?>" /> -->
<!-- <input type="hidden" name="<?php // echo 'AfterCustomEDcess' . $index
?>" id="<?php // echo 'AfterCustomEDcess' . $index
?>" value="<?php // echo $record->AfterCustomEdCess;
?>" /> -->
<!-- <input type="hidden" name="<?php // echo 'CustomEDcess' . $index ?>" id="<?php // echo 'CustomEDcess' . $index ?>" value="<?php // echo $record->CustomEdCess; ?>" /> -->
<!-- <input type="hidden" name="<?php // echo 'CustomEDcess' . $index
?>" id="<?php // echo 'CustomEDcess' . $index
?>" value="<?php // echo $record->CustomEdCess;
?>" /> -->
<input type="hidden" name="<?php echo 'FreightType' . $index ?>" id="<?php echo 'FreightType' . $index ?>" value="<?php echo $record->FreightType; ?>" />
@ -967,7 +983,10 @@ if (!empty($getlogpodtl)) {
<input type="hidden" name="<?php echo 'Addinstruction' . $index ?>" id="<?php echo 'Addinstruction' . $index ?>" value="<?php echo $record->ServiceMaterialDescription; ?>" />
<!-- <input type="hidden" name="<?php // echo 'AfterFreightValue' . $index ?>" id="<?php // echo 'AfterFreightValue' . $index ?>" value="<?php // echo $record->AfterFreightValue; ?>" /> -->
<!-- <input type="hidden" name="<?php // echo 'AfterFreightValue' . $index
?>" id="<?php // echo 'AfterFreightValue' . $index
?>" value="<?php // echo $record->AfterFreightValue;
?>" /> -->
<input type="hidden" name="<?php echo 'AssessableValue' . $index ?>" id="<?php echo 'AssessableValue' . $index ?>" value="<?php echo $record->AssessableValue; ?>" />
@ -992,10 +1011,14 @@ if (!empty($getlogpodtl)) {
<?php
if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED || $PONOStatus == PO_APPROVED) { ?>
<td> <a data-target='#editimportpomodel' data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" data-toggle="modal" href="#editimportpomodel"><i class="ri-pencil-fill" data-toggle="tooltip"></i>&nbsp;&nbsp;&nbsp;</a> <a href='#' onclick="DeleteRow(<?php echo $index; ?>)" class="link" data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" id="Del"><span class="ri-delete-bin-7-fill"></span></a>
<td> <a data-target='#editimportpomodel' data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" data-toggle="modal" href="#editimportpomodel"><i class="ri-pencil-fill" data-toggle="tooltip"></i>&nbsp;&nbsp;&nbsp;</a>
<a href='#' onclick="DeleteRow(<?php echo $index; ?>)" class="link" data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" id="Del"><span class="ri-delete-bin-7-fill"></span></a>
</td>
<?php
} else { ?>
<td> <a data-target='#viewimportmodal' data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" data-toggle="modal" href="#viewimportmodal"><i class="fa fa-eye" data-toggle="tooltip" title="Click here to view the <?php echo $record->ReqNo; ?>Click here to view Requisition details"></i>&nbsp;&nbsp;&nbsp;</a> </td>
<!-- <td> <a data-target='#viewimportmodal' data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" data-toggle="modal" href="#viewimportmodal"><i class="fa fa-eye" data-toggle="tooltip" title="Click here to view the <?php echo $record->ReqNo; ?> Requisition details"></i></a> </td> -->
<td> <a data-target='#viewimportmodal' data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" data-toggle="modal" href="#viewimportmodal"><i class=" ri-eye-fill" data-toggle="tooltip"></i>&nbsp;&nbsp;&nbsp;</a>
</td>
<?php
} ?>
</tr> <?php
@ -1188,7 +1211,7 @@ if (!empty($getlogpodtl)) {
<!-- ################################################################## -->
<?php if (!empty($update)) { ?>
<div class="form-row" id="editpodiv">
<!-- <div class="form-row" id="editpodiv">
<div class="form-group col-md-12"><label>Editable POScreen</label>
<table id="edittable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;">
<thead>
@ -1258,7 +1281,7 @@ if (!empty($getlogpodtl)) {
</tbody>
</table>
</div>
</div>
</div> -->
<?php } ?>
@ -1321,15 +1344,12 @@ if (!empty($getlogpodtl)) {
<?php } ?>
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
<a class="btn btn btn-soft-primary waves-effect waves-light Submit" ID="Submit" onclick="Save(4)">&nbsp;&nbsp;<span class="bold">Approve</span></a>
<!-- <input type="reset" class="btn btn-success" value="Reset"> -->
<?php } else if($PONOStatus == PO_AMENDED){ ?>
<a class="btn btn-success" ID="OK" onclick="PageRedirect()">OK</a>
<?php } else { ?>
<?php if ($DEPCode == FINANCE) { ?>
<a class="btn btn-success" ID="OK" onclick="PageRedirect()">OK</a>
<?php } else { ?>
<!-- <input type="reset" class="btn btn-success" value = "OK"> -->
<a class="btn btn-success Submit" ID="Submit" onclick="Save(2)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
<a class="btn btn btn-soft-primary waves-effect waves-light Submit" ID="Submit" onclick="Save(4)">&nbsp;&nbsp;<span class="bold">Approve</span></a>
<a class="btn btn-success" href="<?php echo base_url(); ?>purchaseorderListing">OK</a>
@ -1871,9 +1891,9 @@ if (!empty($getlogpodtl)) {
<!--End of Adding of freight in edit model -->
<br>
<center> <label>Cost of the product Per UOM</label></center>
<p style="text-align:center; font-size: 16px; "><b>Cost Of The Product Per UOM</b></p>
<hr>
<br>
<div class="form-row mt-3">
<div class="form-group col-md-6">
@ -2434,15 +2454,13 @@ if (!empty($getlogpodtl)) {
echo form_input($data);
?>
</div>
<div class="form-group col-md-4" style="padding-left: 0px;">
<span>Freight Amt <?php echo $INR; ?></span>
<div class="form-group col-md-4">
<label>Freight Amt <?php echo $INR; ?> </label>
<?php
$data = array('name' => 'edittxtAfterFreight', 'value' => set_value('edittxtAfterFreight'), 'id' => 'edittxtAfterFreight', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<!--End of Adding of freight in edit model -->
@ -2959,7 +2977,7 @@ if (!empty($getlogpodtl)) {
</div>
<div class="form-group col-md-6">
<!-- RMC Including Customers -->
<label><?php echo "Nett per UOM($INR)"; ?></label>
<label><?php echo "Net per Uom($INR)"; ?></label>
<div>
<?php
$data = array('name' => 'ViewNett', 'value' => set_value('ViewNett'), 'id' => 'ViewNett', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true');
@ -3001,13 +3019,25 @@ if (!empty($getlogpodtl)) {
<!-- <a class="btn btn-success font UpdateImport" ID="UpdateImport"> &nbsp;&nbsp;<span class="bold">Update</span></a> -->
</div>
</form>
</div>
</div><!-- /. modal-content -->
</div>
</div><!-- /.modal -->
</div>
<script>
$(document).ready(function() {
var PONOStatus = "<?= $PONOStatus ?>";
console.log(PONOStatus);
if (PONOStatus === 'ST030') {
$('input, textarea, select').attr('readonly', true);
$('input[type="file"], input[type="radio"], input[type="checkbox"]').attr('disabled', true);
$("#drpSupplier,#currencytype,#PaymentTerms").prop("disabled", true);
}
});
</script>
<script type="text/javascript">
$(document).ready(function() {
$('#Date').click(function() {
@ -4277,7 +4307,7 @@ if (!empty($getlogpodtl)) {
//alert('in');
PONOStatus = <?php echo $PONOStatus; ?>
var PONOStatus = "<?php echo $PONOStatus; ?>";
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
var rowHtml = `
<tr id="${temp}">
@ -4297,10 +4327,10 @@ if (!empty($getlogpodtl)) {
} else {
rowHtml += `<td>-</td>`;
}
rowHtml += `<td align="left">${quantity}</td>
rowHtml += `<td align="right">${quantity}</td>
<td align="left">${uom}</td>
<td align="left">${itemRate}</td>
<td align="left">${BasicAmt}</td>
<td align="right">${itemRate}</td>
<td align="right">${BasicAmt}</td>
<td>
<a data-target='#editimportpomodel' data-id="${temp}" data-userid="${temp}" data-toggle="modal" href="#editimportpomodel">
<i class="ri-pencil-fill" data-toggle="tooltip" title="Click here to view/Edit the ${Reqnumber} Requisition details"></i>

View File

@ -827,7 +827,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
<thead>
<tr>
<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; 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>
@ -1451,7 +1451,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
echo form_dropdown('drpFreight', $options, set_value('drpFreight'), 'id="drpFreight" class="form-control "');
?>
</div>
<div class="form-group col-md-3" id="TripsValue" style="display:none;">
<div class="form-group col-md-4" id="TripsValue" style="display:none;">
<label>NO Of Trips</label>
<?php
$data = array('name' => 'NOOfTrips', 'value' => set_value('NOOfTrips'), 'id' => 'NOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight(0);');
@ -1535,7 +1535,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
<div class="form-group col-md-6">
<!-- RMC Including Customers -->
<label><?php echo "Nett per UOM($INR)"; ?></label>
<label><?php echo "Net per Uom($INR)"; ?></label>
<div>
<?php
$data = array('name' => 'Nett', 'value' => set_value('Nett', 0), 'id' => 'Nett', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'readonly' => 'true');
@ -2106,7 +2106,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
<div class="form-group col-md-6">
<label><?php echo "Nett per UOM($INR)"; ?></label>
<label><?php echo "Net per Uom($INR)"; ?></label>
<div>
<?php
@ -3530,7 +3530,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
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:center !important">${Reqnumber}</td>
<td style="text-align:left !important">${materialCode}</td>
<td style="text-align:left !important">${shorten}</td>
<td style="text-align:left !important">
@ -3645,7 +3645,8 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
clearTaxField();
$('#IMPORT').modal('hide');
setTimeout(() => {
alert('Line Item Added SuccesFully..');
// alert('Line Item Added SuccesFully..'); tracker id - 1444
console.log('Line Item Added SuccesFully..');
}, 1000);
}
@ -3924,7 +3925,9 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
populateValueMainFormForEditImportTax();
$('#editimportpomodel').modal('hide');
setTimeout(() => {
alert("Line Item Update SuccesFully..");
// alert("Line Item Update SuccesFully.."); tracker id - 1444
console.log('Line Item Added SuccesFully..');
}, 1000);
}
});

View File

@ -310,10 +310,19 @@
Save();
}
// function Save() {
// $('#loader').show();
// if (validate()) {
// $('#IGRForm').submit();
// $('#loader').hide();
// }else{
// $('#loader').hide();
// }
// }
function Save() {
if (validate()) {
$('#IGRForm').submit();
}
$("#IGRLink, #IGRDraftLink").prop("disabled", true);
if (validate()) { $("#IGRForm").submit(); }
else { $("#IGRLink, #IGRDraftLink").prop("disabled", false); }
}
});
</script>
@ -411,7 +420,7 @@
var status = '';
var isOpenOrder = 0;
if (id != '-1') {
$('#content').loader('show');
$('#loader').show();
var y = <?php echo json_encode($PO_NO, JSON_PRETTY_PRINT) ?>;
$.each(y, function(idx, obj) {
if (id == obj.PONO) {
@ -443,7 +452,7 @@
type: "POST",
url: "<?php echo base_url() ?>GetIGRLineItemDetails",
success: function(data) {
$('#content').loader('hide');
$('#loader').hide();
//alert(data);
var trHTML = '';
var j = 0;

View File

@ -2385,7 +2385,7 @@ if (!empty($INRSYMBOL)) {
var AvlBudAmt = '<?php echo $AvlAmount ?>';
var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
if (serviceValidate()) {
if (document.getElementById('ServiceTable').rows.length < 1) {
if ($('#ServiceTable tbody tr').length < 1) {
alert('Atleast One Line needed');
return false;
}
@ -2397,7 +2397,7 @@ if (!empty($INRSYMBOL)) {
// alert('Please Enter Other Payable Terms Description');
// $('#Otherpayment').focus();
// return false;
} else if ($('#descofpo').val().trim() == '') {
else if ($('#descofpo').val().trim() == '') {
alert('Please Enter Description Of Service');
$('#descofpo').focus();
return false;
@ -2443,7 +2443,7 @@ if (!empty($INRSYMBOL)) {
}
});
// }
}
}
}

View File

@ -226,9 +226,9 @@
<!-- Rec qty changed to invoice qty -->
<th>Invoice Qty</th>
<th>Net weight</th>
<!-- <th>Taxable Amt</th>
<th>Taxable Amt</th>
<th>Tax Amt</th>
<th>Total Amt</th> -->
<th>Total Amt</th>
<th>Vechicle No</th>
<th>Driver</th>
<th>Transporter</th>
@ -281,9 +281,9 @@
<td align="right"><?php echo (int)$record->ReceivedQuantity ?></td>
<td align="right"><?php echo (int)$record->NetWeight ?></td>
<!-- <td align="right"><?php echo (int)$record->taxable_value ?></td>
<td align="right"><?php echo (int)$record->taxable_value ?></td>
<td align="right"><?php echo (int)$record->gst_amount ?></td>
<td align="right"><?php echo ((int)$record->taxable_value + (int)$record->gst_amount) ?></td> -->
<td align="right"><?php echo ((int)$record->taxable_value + (int)$record->gst_amount) ?></td>
<td><?php echo $record->VehicleNo ?></td>
<td><?php echo $record->DriverName ?></td>

View File

@ -43,7 +43,7 @@ function enableButtons() {
function revenueValidate(){
var radioValue = parseInt($("input[name='DateRange']:checked").val());
var scheduleBy = $('#Scheduleby').val(); // Get the value
if ($('#drpSupplier').val() == "0") {
alert('Please Select the Supplier details');
$('#drpSupplier').focus();
@ -60,13 +60,10 @@ function revenueValidate(){
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
}else if (radioValue == 1 && (!scheduleBy || scheduleBy.trim() == '')) {
alert('Please Enter the Schedule By');
$('#Scheduleby').focus();
return false;
}
}else if($('#PODate').val() == ''){
alert('Please Enter the Purchase Order date');
$('#PODate').focus();
@ -97,54 +94,68 @@ function revenueValidate(){
function serviceValidate(){
var radioValue = parseInt($("input[name='DateRange']:checked").val());
var scheduleBy = $('#Scheduleby').val(); // Get the value
if ($('#drpSupplier').val() == "0") {
console.log('Please Select the Supplier details');
alert('Please Select the Supplier details');
$('#drpSupplier').focus();
return false;
}else if ($('#workstatus').val() == "0") {
console.log('Please Select the Work Status');
alert('Please Select the Work Status');
$('#workstatus').focus();
return false;
}else if ($('#PODate').val().trim() == '') {
console.log('Please Enter the Purchase Order date');
alert('Please Enter the Purchase Order date');
$('#PODate').focus();
return false;
}else if ($('#DeliveryAddr').val().trim() == '') {
console.log('Please Enter the Delivery Address');
alert('Please Enter the Delivery Address');
$('#DeliveryAddr').focus();
return false;
}else if (radioValue === 0 && $('#Deliverydt').val() == '') {
console.log('Please Select the Delivery Date');
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
}else if (radioValue == 1 && (!scheduleBy || scheduleBy.trim() == '')) {
console.log('Please Enter the Schedule By');
alert('Please Enter the Schedule By');
$('#Scheduleby').focus();
return false;
}
}else if($('#PODate').val() == ''){
console.log('Please Enter the Purchase Order date');
alert('Please Enter the Purchase Order date');
$('#PODate').focus();
return false;
}else if ($('#PoTypeOptions').val() == "0") {
console.log('Please Select Service Type');
alert('Please Select Service Type');
$('#PoTypeOptions').focus();
return false;
}else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
console.log('Please Enter Payable Terms Description');
alert('Please Enter Payable Terms Description');
$('#Otherpayment').focus();
return false;
}else if($('#insuranceStatus').val() == "1" && $('#InsuranceNumber').val().trim() == ''){
console.log('Please Enter the Insurance No / Insurance Details');
alert('Please Enter the Insurance No / Insurance Details');
$('#InsuranceNumber').focus();
return false;
}else if ($('#BudgetType').val() == "0") {
console.log('Please Select Budget Type');
alert('Please Select Budget Type');
$('#BudgetType').focus();
return false;
}
else {
console.log("JS else part");
return true;
}
// else if ($('#ServiceTable tbody tr').length < 1) {
// alert('Atleast One Line needed');
@ -154,9 +165,7 @@ function serviceValidate(){
// $('#descofpo').focus();
// return false;
// }
else {
return true;
}
}
function capitalValidate(){
@ -189,13 +198,13 @@ function capitalValidate(){
alert('Please Enter the Dispatch Instruction');
$('#Deliverydate').focus();
return false;
} else if ($('#ExchangeRate').val() == '') {
} else if ($('#ExchangeRt').val() == '') {
alert('Please Enter the Exchange Rate');
$('#ExchangeRate').focus();
$('#ExchangeRt').focus();
return false;
} else if ($('#ExchangeRate').val() == 0) {
} else if ($('#ExchangeRt').val() == 0) {
alert('Please Enter the Exchange Rate');
$('#ExchangeRate').focus();
$('#ExchangeRt').focus();
return false;
} else if ($('#PlaceOforigin').val() == '') {
alert('Please Enter Place Of Origin');
@ -332,21 +341,21 @@ function importValidate(){
function validate()
{
var radioValue = $("input[name='DateRange']:checked").val();
var PoType = $('#POType').val();
var currencyType = $('#currencytype').val();
if($('#PODate').val() == '')
{
alert('Please Enter the Purchase Order date');
$('#PODate').focus();
return false;
}
else if($('#drpSupplier').val() == "0")
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();