Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
fdc07e8fe4
@ -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');
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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()
|
||||
{
|
||||
|
||||
@ -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);
|
||||
|
||||
$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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -47,14 +47,25 @@ class CreditNoteModel extends Model
|
||||
/**
|
||||
* Fetch all credit notes
|
||||
*/
|
||||
public function getAllCreditNotes($fromDate,$toDate)
|
||||
// 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
|
||||
*/
|
||||
|
||||
@ -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
|
||||
)
|
||||
|
||||
71
app/Models/IpCreditNotesItemsModel.php
Normal file
71
app/Models/IpCreditNotesItemsModel.php
Normal 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();
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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;">
|
||||
|
||||
@ -1545,8 +1544,8 @@ if (!empty($getlogpodtl)) {
|
||||
<tr>
|
||||
<th>Sno</th>
|
||||
<th>PONO</th>
|
||||
<!-- <th>Material</th> -->
|
||||
<!-- <th>Date</th> -->
|
||||
<!- - <th>Material</th> - ->
|
||||
<!- - <th>Date</th> - ->
|
||||
<th>LineItemNo</th>
|
||||
<th>Entity</th>
|
||||
<th>OldValue</th>
|
||||
@ -1571,14 +1570,14 @@ if (!empty($getlogpodtl)) {
|
||||
<td><?php echo $inde; ?></td>
|
||||
<td><?php echo $oldpo->PONO ?></td>
|
||||
|
||||
<!--
|
||||
<!- -
|
||||
<?php // if ($oldpo->logDate != '-') {
|
||||
// $logdate = date('d-m-Y', strtotime($oldpo->logDate));
|
||||
// } else {
|
||||
// $logdate = '-';
|
||||
// }
|
||||
?>
|
||||
-->
|
||||
- ->
|
||||
<td><?php echo $oldpo->LineItemNos; ?></td>
|
||||
<td><?php echo $oldpo->entity ?></td>
|
||||
<?php if ($oldpo->entity == 'PO DateChanged') {
|
||||
@ -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)"> <span class="bold">Submit</span></a>
|
||||
<?php } else { ?>
|
||||
<a class="btn btn-success" ID="OK" href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span class="bold">OK</span></a>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(2)"> <span class="bold">Submit</span></a>
|
||||
<!-- <a class="btn btn-success Save" ID="Submit" onclick="Save(2)"> <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,71 +3189,72 @@ if (!empty($getlogpodtl)) {
|
||||
|
||||
|
||||
if (serviceValidate()) {
|
||||
if (document.getElementById('ServiceTable').rows.length < 2) {
|
||||
alert('Atleast One Line needed');
|
||||
return false;
|
||||
}
|
||||
console.log("serviceValidate");
|
||||
if ($('#ServiceTable tbody tr').length < 1) {
|
||||
alert('Atleast One Line needed');
|
||||
return false;
|
||||
}
|
||||
// else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
|
||||
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// return false;
|
||||
// }
|
||||
// else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||
// alert('Please Enter Payable Terms');
|
||||
// $('#Otherpayment').focus();
|
||||
// return false;
|
||||
else if ($('#editdescofpo').val().trim() == '') {
|
||||
alert('Please Enter Description Of Service');
|
||||
$('#editdescofpo').focus();
|
||||
return false;
|
||||
} else {
|
||||
// $('#content').loader('show');
|
||||
var formData = new FormData($('.ServicePO')[0]);
|
||||
$('#loader').show();
|
||||
// disableButtons();
|
||||
$.ajax({
|
||||
// data: $('.ServicePO').serialize(),
|
||||
type: "POST",
|
||||
url: "<?php echo base_url() ?>servicepurchaseorder/UpdateServicePurchaseOrder",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(data) {
|
||||
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();
|
||||
// disableButtons();
|
||||
$.ajax({
|
||||
// data: $('.ServicePO').serialize(),
|
||||
type: "POST",
|
||||
url: "<?php echo base_url() ?>servicepurchaseorder/UpdateServicePurchaseOrder",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(data) {
|
||||
|
||||
|
||||
|
||||
// var newWindow = window.open("", "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,width=1024,height=768");
|
||||
// newWindow.document.write("<html><head><title>Response</title></head><body>");
|
||||
// newWindow.document.write("<pre>" + data + "</pre>"); // Using <pre> to preserve formatting
|
||||
// newWindow.document.write("</body></html>");
|
||||
// newWindow.document.close();
|
||||
// newWindow.moveTo(0, 0);
|
||||
// newWindow.resizeTo(screen.width, screen.height);
|
||||
if (data) {
|
||||
$('#loader').hide();
|
||||
alert(data);
|
||||
$('#txtRowCount').val('');
|
||||
$('#txtDeletedRow').val('');
|
||||
$('#txtStatus').val('');
|
||||
$('#SpcialInstruction').val('');
|
||||
$('#txtDeliveryAddress').val('')
|
||||
window.location = "purchaseorderListing";
|
||||
// var newWindow = window.open("", "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,width=1024,height=768");
|
||||
// newWindow.document.write("<html><head><title>Response</title></head><body>");
|
||||
// newWindow.document.write("<pre>" + data + "</pre>"); // Using <pre> to preserve formatting
|
||||
// newWindow.document.write("</body></html>");
|
||||
// newWindow.document.close();
|
||||
// newWindow.moveTo(0, 0);
|
||||
// newWindow.resizeTo(screen.width, screen.height);
|
||||
if (data) {
|
||||
$('#loader').hide();
|
||||
alert(data);
|
||||
$('#txtRowCount').val('');
|
||||
$('#txtDeletedRow').val('');
|
||||
$('#txtStatus').val('');
|
||||
$('#SpcialInstruction').val('');
|
||||
$('#txtDeliveryAddress').val('')
|
||||
window.location = "purchaseorderListing";
|
||||
// setTimeout(function() { enableButtons(); }, 2000);
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
// setTimeout(function() { enableButtons(); }, 2000);
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
||||
alert("Error: " + textStatus);
|
||||
// setTimeout(function() { enableButtons(); }, 2000);
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
// setTimeout(function() { enableButtons(); }, 2000);
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
||||
alert("Error: " + textStatus);
|
||||
// setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
// 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++) {
|
||||
|
||||
@ -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>
|
||||
|
||||
</a>
|
||||
</td>
|
||||
<?php } else { ?>
|
||||
<td>
|
||||
|
||||
|
||||
|
||||
@ -1839,14 +1839,18 @@ 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() == '') {
|
||||
alert('Please Enter Description Of Service');
|
||||
$('#emergdescofpo').focus();
|
||||
return false;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
if (isChecked) {
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
@ -1584,6 +1583,14 @@ if (!empty($INRSYMBOL)) {
|
||||
echo form_dropdown('drpFreight', $options, set_value('drpFreight'), 'id="drpFreight" class="form-control "');
|
||||
?>
|
||||
</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>
|
||||
@ -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,27 +1609,15 @@ 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 />
|
||||
<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>
|
||||
<label>Duty Impact</label>
|
||||
<?php
|
||||
$data = array('name' => 'DutyImpact', 'value' => set_value('DutyImpact'), 'id' => 'DutyImpact', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Ratechange();', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
@ -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>
|
||||
<div class="form-group col-md-6">
|
||||
<label>Duty Impact</label>
|
||||
<?php
|
||||
$data = array('name' => 'EditNOOfTrips', 'value' => set_value('EditNOOfTrips'), 'id' => 'EditNOOfTrips', 'class' => 'form-control num', 'onchange' => 'calculateFreight(1);');
|
||||
$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 class="form-group col-md-6">
|
||||
<label>Quantity</label>
|
||||
<?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-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>
|
||||
|
||||
<center> <label>Cost of the product Per UOM</label></center>
|
||||
<hr />
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<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%">
|
||||
<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 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>
|
||||
<?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 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-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label>
|
||||
Clearing Charges<?php echo "($INR)" ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<div>
|
||||
<?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 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 class="form-group col-md-4">
|
||||
<!-- RMC Including Customers -->
|
||||
<label><?php echo "Nett 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');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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');
|
||||
@ -2269,9 +2269,10 @@ if (!empty($POItem) && $CapitalRange == '1') {
|
||||
</div>
|
||||
<!--End of Adding of freight in edit model -->
|
||||
|
||||
<br>
|
||||
<center> <label>Cost of the product Per UOM</label></center>
|
||||
<hr />
|
||||
<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">
|
||||
@ -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);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -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 />
|
||||
<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">
|
||||
@ -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>
|
||||
@ -1215,7 +1206,7 @@ if (!empty($RequistionDetails)) {
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo $INR ?></th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo $INR ?></th>
|
||||
<!-- <th>Tax Amount</th>
|
||||
<th>Total Order Amount</th> -->
|
||||
<th>Total Order Amount</th> -->
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -1239,7 +1230,7 @@ if (!empty($RequistionDetails)) {
|
||||
<td style="text-align:right !important"><?php echo $record->Rate ?></td>
|
||||
<td style="text-align:right !important"><?php echo $record->BasicValue ?></td>
|
||||
<!-- <td><?php echo $record->Taxamount ?></td>
|
||||
<td><?php echo $record->TotalOrderValue ?></td> -->
|
||||
<td><?php echo $record->TotalOrderValue ?></td> -->
|
||||
<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
|
||||
@ -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> </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> </a> </td> -->
|
||||
<?php
|
||||
// }
|
||||
?>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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,8 +2833,8 @@ if (!empty($getlogpodtl)) {
|
||||
</div>
|
||||
<!--################################################################## -->
|
||||
<?php if (!empty($update)) { ?>
|
||||
<div class="form-row" id="editpodiv">
|
||||
<!-- <div class="form-row"> -->
|
||||
<!-- <div class="form-row" 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;">
|
||||
@ -2890,8 +2893,8 @@ if (!empty($getlogpodtl)) {
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- </div> -->
|
||||
</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;
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
|
||||
@ -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,16 +459,19 @@ 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-->
|
||||
</div><!-- end first row -->
|
||||
|
||||
|
||||
<!-- second row -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@ -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> </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> </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> </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> </a>
|
||||
</td>
|
||||
<?php
|
||||
} ?>
|
||||
</tr> <?php
|
||||
@ -1188,15 +1211,15 @@ 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>
|
||||
<tr>
|
||||
<th>Sno</th>
|
||||
<th>PONO</th>
|
||||
<!-- <th>Material</th> -->
|
||||
<!-- <th>Date</th> -->
|
||||
<!- - <th>Material</th> - ->
|
||||
<!- - <th>Date</th> - ->
|
||||
<th>LineItemNo</th>
|
||||
<th>Entity</th>
|
||||
<th>OldValue</th>
|
||||
@ -1221,14 +1244,14 @@ if (!empty($getlogpodtl)) {
|
||||
<td><?php echo $inde; ?></td>
|
||||
<td><?php echo $oldpo->PONO ?></td>
|
||||
|
||||
<!--
|
||||
<!- -
|
||||
<?php if (isset($oldpo->logDate) && $oldpo->logDate != '-') {
|
||||
$logdate = date('d-m-Y', strtotime($oldpo->logDate));
|
||||
} else {
|
||||
$logdate = '-';
|
||||
} ?>
|
||||
|
||||
<td><?= $logdate; ?></td> -->
|
||||
<td><?= $logdate; ?></td> - ->
|
||||
<td><?php echo $oldpo->LineItemNos; ?></td>
|
||||
<td><?php echo $oldpo->entity ?></td>
|
||||
<?php if ($oldpo->entity == 'PO DateChanged') {
|
||||
@ -1258,7 +1281,7 @@ if (!empty($getlogpodtl)) {
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -1316,20 +1339,17 @@ if (!empty($getlogpodtl)) {
|
||||
|
||||
<a class="btn btn-success Save" ID="Cancel" href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED) {
|
||||
if ($PONOStatus == PO_DRAFT) { ?>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save as Draft</span></a>
|
||||
<?php } ?>
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn btn-soft-primary waves-effect waves-light Submit" ID="Submit" onclick="Save(4)"> <span class="bold">Approve</span></a>
|
||||
<!-- <input type="reset" class="btn btn-success" value="Reset"> -->
|
||||
if ($PONOStatus == PO_DRAFT) { ?>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save as Draft</span></a>
|
||||
<?php } ?>
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn btn-soft-primary waves-effect waves-light Submit" ID="Submit" onclick="Save(4)"> <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 { ?>
|
||||
|
||||
|
||||
<?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)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn btn-soft-primary waves-effect waves-light Submit" ID="Submit" onclick="Save(4)"> <span class="bold">Approve</span></a>
|
||||
<a class="btn btn-success" href="<?php echo base_url(); ?>purchaseorderListing">OK</a>
|
||||
@ -1532,7 +1552,7 @@ if (!empty($getlogpodtl)) {
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<!-- <P id=labelRate> -->
|
||||
<!-- <P id=labelRate> -->
|
||||
<label id=labelRate><?php echo "Rate in"; ?> <span class="text-danger">*</span></label><!-- </P> -->
|
||||
<div>
|
||||
<?php
|
||||
@ -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"> <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>
|
||||
|
||||
@ -827,8 +827,8 @@ 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;">Item Code</th>
|
||||
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
|
||||
<th style="white-space: nowrap !important;">Item Code</th>
|
||||
<th style="white-space: nowrap !important;">Item Description</th>
|
||||
<th style="white-space: nowrap !important;">Line Item Specs</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Quantity</th>
|
||||
@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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)) {
|
||||
}
|
||||
|
||||
});
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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() == '')
|
||||
var PoType = $('#POType').val();
|
||||
var currencyType = $('#currencytype').val();
|
||||
|
||||
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($('#drpSupplier').val() == "0")
|
||||
{
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
}
|
||||
else if(radioValue==0 && $('#Deliverydate').val()==''){
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user