Fixes : ps
This commit is contained in:
parent
f2ffe5dc9e
commit
eb6e874fe1
@ -200,7 +200,7 @@ $routes->get('EditPO', 'Purchaseorder::EditPurchaseOrder');
|
||||
|
||||
$routes->get('purchaseorder/CreatePOPrint', 'Purchaseorder::CreatePOPrint');
|
||||
$routes->post('purchaseorder/ReleasePO', 'Purchaseorder::ReleasePO');
|
||||
$routes->post('purchaseorder/EditRevenuePurchaseOrder', 'Purchaseorder/EditRevenuePurchaseOrder');
|
||||
$routes->post('purchaseorder/EditRevenuePurchaseOrder', 'Purchaseorder::EditRevenuePurchaseOrder');
|
||||
|
||||
$routes->post('VerifyWithSupplierForPendingPO', 'Purchaseorder::VerifyWithSupplierForPendingPO');
|
||||
|
||||
|
||||
@ -241,9 +241,9 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$revenuetype = $this->request->getPost('PoTypeOptions');
|
||||
$insurancestatus = $this->request->getPost('insurancestatus');
|
||||
if ($insurancestatus == 1) {
|
||||
$insuranceno = $this->request->getPost('insuranceno');
|
||||
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
|
||||
} else {
|
||||
$insuranceno = "";
|
||||
$InsuranceNumber = "";
|
||||
}
|
||||
|
||||
$POType = $this->request->getPost('POType');
|
||||
@ -288,7 +288,7 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$Otherpayment = '';
|
||||
}
|
||||
|
||||
$POMaster = array('ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'PORange' => $PoRange, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Reference' => $supplierreference, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'InsuranceNumber' => $insuranceno, '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('ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'PORange' => $PoRange, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => PO_RELEASED, '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);
|
||||
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO);
|
||||
if (count($LastPO) > 0) {
|
||||
$NewPO = $LastPO[0]['PONO'];
|
||||
@ -591,7 +591,7 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$OtherReferences = $this->request->getPost('amendotherreference');
|
||||
$Fincap = $this->request->getPost('amendfincap');
|
||||
$InsuranceOptions = $this->request->getPost('insuranceStatus');
|
||||
$InsuranceNo = $this->request->getPost('insuranceNo');
|
||||
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
|
||||
$ServiceTypeOptions = $this->request->getPost('PoTypeOptions');
|
||||
$DescriptionOfPo = $this->request->getPost('amenddescofpo');
|
||||
$scopeofwork = $this->request->getPost('ScopeofWork');
|
||||
@ -618,7 +618,7 @@ class Amendmentpurchaseorder extends BaseController
|
||||
if ($PaymentTerms != 'PT08') {
|
||||
$Otherpayment = '';
|
||||
}
|
||||
$POMaster = array('ParentPO' => $PONO, 'POType' => $POType, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $scopeofwork, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $updateddt, 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'ServiceWorkStatus' => $WorkStatus, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'Description_Of_Service' => $DescriptionOfPo, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNo, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $qtycheckresult);
|
||||
$POMaster = array('ParentPO' => $PONO, 'POType' => $POType, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $scopeofwork, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $updateddt, 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'ServiceWorkStatus' => $WorkStatus, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, '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, 'IsQualityChkReqired' => $qtycheckresult);
|
||||
|
||||
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO);
|
||||
|
||||
@ -849,7 +849,7 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$OtherReferences = $this->request->getPost('amendotherreference');
|
||||
$Fincap = $this->request->getPost('amendfincap');
|
||||
$InsuranceOptions = $this->request->getPost('insuranceStatus');
|
||||
$InsuranceNo = $this->request->getPost('insuranceNo');
|
||||
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
|
||||
$ServiceTypeOptions = $this->request->getPost('PoTypeOptions');
|
||||
|
||||
if ($PoRange == 1) {
|
||||
@ -916,7 +916,7 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$Otherpayment = '';
|
||||
}
|
||||
$updatedBy = $this->session->get('userId');
|
||||
$POMaster = array('ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $FinalTotalOrder, 'POType' => $POType, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'CapitalRange' => $PoRange, 'ExchangeRate' => $ExchangeRate, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'PaymentTerms' => $PaymentMethod, 'PaymentOtherDescription' => $Otherpayment, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CurrencyType' => $currencytypeID, 'AmendedDetails' => $MAD, 'Import_DispatchDetails' => $curdispatch, 'Import_PlaceofOrgin' => $PlaceOforigin, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNo, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $qtycheckresult);
|
||||
$POMaster = array('ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $FinalTotalOrder, 'POType' => $POType, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'CapitalRange' => $PoRange, 'ExchangeRate' => $ExchangeRate, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'PaymentTerms' => $PaymentMethod, 'PaymentOtherDescription' => $Otherpayment, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CurrencyType' => $currencytypeID, 'AmendedDetails' => $MAD, 'Import_DispatchDetails' => $curdispatch, 'Import_PlaceofOrgin' => $PlaceOforigin, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $qtycheckresult);
|
||||
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $CreateBy, $PONO);
|
||||
|
||||
foreach ($LastPO as $PO) :
|
||||
@ -1268,10 +1268,10 @@ class Amendmentpurchaseorder extends BaseController
|
||||
|
||||
if ($Insurance == 'YES') {
|
||||
|
||||
$Insurancenumber = $this->request->getPost('insurancenumber');
|
||||
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
|
||||
$insurestatus = '1';
|
||||
} else {
|
||||
$Insurancenumber = '';
|
||||
$InsuranceNumber = '';
|
||||
$insurestatus = '0';
|
||||
}
|
||||
$importoption = $this->request->getPost('Importoption');
|
||||
@ -1289,7 +1289,7 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$MAD .= $MAD . "Current Place of Origin: " . $beforePalaceoforigin . "<br>";
|
||||
}
|
||||
|
||||
$POMaster = array('ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'Import_DispatchDetails' => $Dispatch, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ExchangeRate' => $Exchangerate, 'ExchangeRateCalculatedon' => $ExchangeRateCalculatedon, 'CurrencyType' => $CurrencyType, 'PaymentTerms' => $PaymentTerms, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'Import_PlaceofOrgin' => $Palaceoforigin, 'Mode_Of_Shipment' => $Shipmentmode, 'Supplier_Reference' => $SupplierRef, 'Supplier_Offer_No' => $SupplierOffer, 'Other_Reference' => $otherRef, 'Fincap' => $finCap, 'AmendedDetails' => $MAD, 'PaymentOtherDescription' => $OtherPayment, 'InsuranceStatus' => $insurestatus, 'InsuranceNumber' => $Insurancenumber, 'POSubType' => $importoption, 'IsQualityChkReqired' => $qtycheckresult);
|
||||
$POMaster = array('ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'Import_DispatchDetails' => $Dispatch, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ExchangeRate' => $Exchangerate, 'ExchangeRateCalculatedon' => $ExchangeRateCalculatedon, 'CurrencyType' => $CurrencyType, 'PaymentTerms' => $PaymentTerms, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'Import_PlaceofOrgin' => $Palaceoforigin, 'Mode_Of_Shipment' => $Shipmentmode, 'Supplier_Reference' => $SupplierRef, 'Supplier_Offer_No' => $SupplierOffer, 'Other_Reference' => $otherRef, 'Fincap' => $finCap, 'AmendedDetails' => $MAD, 'PaymentOtherDescription' => $OtherPayment, 'InsuranceStatus' => $insurestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $importoption, 'IsQualityChkReqired' => $qtycheckresult);
|
||||
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $CreateBy, $PONO);
|
||||
$NewPO = '';
|
||||
if (count($LastPO) > 0) {
|
||||
|
||||
@ -189,7 +189,7 @@ class Emergencypurchaseorder extends BaseController
|
||||
$OtherReferences = $this->request->getPost('emergotherreference');
|
||||
$Fincap = $this->request->getPost('emergfincap');
|
||||
$InsuranceOptions = $this->request->getPost('insuranceStatus');
|
||||
$InsuranceNo = $this->request->getPost('insuranceNo');
|
||||
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
|
||||
$ServiceTypeOptions = $this->request->getPost('PoTypeOptions');
|
||||
$DescriptionOfPo = $this->request->getPost('emergdescofpo');
|
||||
|
||||
@ -207,7 +207,7 @@ class Emergencypurchaseorder extends BaseController
|
||||
$lastPONO = $this->purchaseorder_model->lastPONO();
|
||||
$newPONO = generate_po_number($lastPONO);
|
||||
// PO Master
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'ServiceWorkStatus' => $ServiceWorkStatus, 'POType' => $POType, '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' => $InsuranceNo, 'POSubType' => $ServiceTypeOptions, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder);
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'ServiceWorkStatus' => $ServiceWorkStatus, 'POType' => $POType, '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);
|
||||
|
||||
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList, $POType, $ServiceTypeOptions);
|
||||
@ -392,9 +392,9 @@ class Emergencypurchaseorder extends BaseController
|
||||
$revenuetype = $this->request->getPost('PoTypeOptions');
|
||||
$insurancestatus = $this->request->getPost('insuranceStatus');
|
||||
if ($insurancestatus == 1) {
|
||||
$insuranceno = $this->request->getPost('insuranceNo');
|
||||
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
|
||||
} else {
|
||||
$insuranceno = "";
|
||||
$InsuranceNumber = "";
|
||||
}
|
||||
$CostCenterName = $this->request->getPost('CostCenterName');
|
||||
$POType = $this->request->getPost('POType');
|
||||
@ -462,7 +462,7 @@ class Emergencypurchaseorder extends BaseController
|
||||
|
||||
$lastPONO = $this->purchaseorder_model->lastPONO();
|
||||
$newPONO = generate_po_number($lastPONO);
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'PORange' => $Local_Interstate, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'CapitalRange' => $Local_Interstate, 'PaymentOtherDescription' => $OtherPayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Offer_No' => $supplieroffno, 'Supplier_Reference' => $supplierreference, 'Other_Reference' => $otherreference, 'InsuranceNumber' => $insuranceno, 'InsuranceStatus' => $insurancestatus, 'Fincap' => $fincap, 'POSubType' => $revenuetype, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder);
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'PORange' => $Local_Interstate, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'CapitalRange' => $Local_Interstate, 'PaymentOtherDescription' => $OtherPayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Offer_No' => $supplieroffno, 'Supplier_Reference' => $supplierreference, 'Other_Reference' => $otherreference, 'InsuranceNumber' => $InsuranceNumber, 'InsuranceStatus' => $insurancestatus, 'Fincap' => $fincap, 'POSubType' => $revenuetype, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder);
|
||||
//print_r($POList);
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList, $POType, $revenuetype);
|
||||
$PONO = $POMaster ? $newPONO : "";
|
||||
|
||||
@ -64,7 +64,7 @@ class Inwardgateregister extends BaseController
|
||||
$result = $this->inwardgateregister_model->getpurchaseorder();
|
||||
|
||||
$data['PO_NO'] = array_filter($result, function($item) {
|
||||
return !($item->status === 'ST027' && $item->VaildUpto === null);
|
||||
return !($item->status === 'ST027' && $item->IsOpenOrder === null);
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -1086,9 +1086,9 @@ $mpdf->use_kwt = true;
|
||||
$revenuetype = $this->request->getPost('PoTypeOptions');
|
||||
$insurancestatus = $this->request->getPost('insurance');
|
||||
if ($insurancestatus == 1) {
|
||||
$insuranceno = $this->request->getPost('insuranceno');
|
||||
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
|
||||
} else {
|
||||
$insuranceno = $this->request->getPost('insuranceno');
|
||||
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
|
||||
}
|
||||
$SpcialInstruction = $this->request->getPost('SpcialInstruction');
|
||||
$TotalOrderValueSummary = $this->request->getPost('txtTotalOrderValueSummary');
|
||||
@ -1117,7 +1117,7 @@ $mpdf->use_kwt = true;
|
||||
$newPONO = generate_po_number($lastPONO);
|
||||
|
||||
// PO Master
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'Status' => $POStatus, 'PORange' => $Local_Interstate, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'CapitalRange' => $Local_Interstate, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $supplierreference, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'POSubType' => $revenuetype, 'InsuranceNumber' => $insuranceno, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder);
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'Status' => $POStatus, 'PORange' => $Local_Interstate, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'CapitalRange' => $Local_Interstate, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $supplierreference, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'POSubType' => $revenuetype, 'InsuranceNumber' => $InsuranceNumber, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder);
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList, $POType, $revenuetype);
|
||||
// echo "@1100 i have pomaster = ".'<pre>'.print_r($POMaster,true).'</pre>'."<br>";die();
|
||||
$PONO = $POMaster ? $newPONO : "";
|
||||
@ -1205,7 +1205,6 @@ $mpdf->use_kwt = true;
|
||||
//This used to Edit the Revenue Purchase Order
|
||||
function EditRevenuePurchaseOrder()
|
||||
{
|
||||
|
||||
$PONO = $this->request->getPost('txtPONO');
|
||||
$POdt = $this->request->getPost('PODate');
|
||||
$PODate = get_date_time_format($POdt);
|
||||
@ -1239,9 +1238,9 @@ $mpdf->use_kwt = true;
|
||||
$revenuetype = $this->request->getPost('PoTypeOptions');
|
||||
$insurancestatus = $this->request->getPost('insurancestatus');
|
||||
if ($insurancestatus == 1) {
|
||||
$insuranceno = $this->request->getPost('insuranceno');
|
||||
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
|
||||
} else {
|
||||
$insuranceno = "";
|
||||
$InsuranceNumber = "";
|
||||
}
|
||||
|
||||
$POType = $this->request->getPost('POType');
|
||||
@ -1273,8 +1272,13 @@ $mpdf->use_kwt = true;
|
||||
$Qualitycheck = 1;
|
||||
// PO Master
|
||||
// PO Master
|
||||
$POList = array('SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'Status' => $POStatus, 'PORange' => $Local_Interstate, 'ServiceDescription' => $SpcialInstruction, 'UpdateBY' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'CapitalRange' => $Local_Interstate, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $supplierreference, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'POSubType' => $revenuetype, 'InsuranceNumber' => $insuranceno, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType);
|
||||
|
||||
$POList = array('SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'Status' => $POStatus, 'PORange' => $Local_Interstate, 'ServiceDescription' => $SpcialInstruction, 'UpdateBY' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'CapitalRange' => $Local_Interstate, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $supplierreference, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'POSubType' => $revenuetype, 'InsuranceNumber' => $InsuranceNumber, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType);
|
||||
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');
|
||||
}
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO, $POList);
|
||||
|
||||
|
||||
@ -1657,12 +1661,7 @@ $mpdf->use_kwt = true;
|
||||
// Output PDF
|
||||
$mpdf->Output('ServicePOReport' . $PONO . '.pdf', 'D');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function importpoprint($PONO)
|
||||
{
|
||||
// echo $PONO;
|
||||
@ -1914,9 +1913,9 @@ $mpdf->use_kwt = true;
|
||||
|
||||
if ($Insurance == 1) {
|
||||
|
||||
$Insurancenumber = $this->request->getPost('insurancenumber');
|
||||
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
|
||||
} else {
|
||||
$Insurancenumber = '';
|
||||
$InsuranceNumber = '';
|
||||
}
|
||||
|
||||
// $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType);
|
||||
@ -1927,7 +1926,7 @@ $mpdf->use_kwt = true;
|
||||
$lastPONO = $this->purchaseorder_model->lastPONO();
|
||||
$newPONO = generate_po_number($lastPONO);
|
||||
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'Import_DispatchDetails' => $Dispatch, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ExchangeRate' => $Exchangerate, 'ExchangeRateCalculatedon' => $ExchangeRateCalculatedon, 'CurrencyType' => $CurrencyType, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'Import_PlaceofOrgin' => $Palaceoforigin, 'PaymentOtherDescription' => $OtherPayment, 'Mode_Of_Shipment' => $Shipmentmode, 'Supplier_Reference' => $SupplierRef, 'Supplier_Offer_No' => $SupplierOffer, 'Other_Reference' => $otherRef, 'Fincap' => $finCap, 'InsuranceStatus' => $Insurance, 'InsuranceNumber' => $Insurancenumber, 'POSubType' => $importoption, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder);
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'Import_DispatchDetails' => $Dispatch, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ExchangeRate' => $Exchangerate, 'ExchangeRateCalculatedon' => $ExchangeRateCalculatedon, 'CurrencyType' => $CurrencyType, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'Import_PlaceofOrgin' => $Palaceoforigin, 'PaymentOtherDescription' => $OtherPayment, 'Mode_Of_Shipment' => $Shipmentmode, 'Supplier_Reference' => $SupplierRef, 'Supplier_Offer_No' => $SupplierOffer, 'Other_Reference' => $otherRef, 'Fincap' => $finCap, 'InsuranceStatus' => $Insurance, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $importoption, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder);
|
||||
|
||||
//print_r($POList);
|
||||
//die();
|
||||
@ -2142,10 +2141,10 @@ $mpdf->use_kwt = true;
|
||||
|
||||
if ($Insurance == 'YES') {
|
||||
|
||||
$Insurancenumber = $this->request->getPost('insurancenumber');
|
||||
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
|
||||
$insurestatus = '1';
|
||||
} else {
|
||||
$Insurancenumber = '';
|
||||
$InsuranceNumber = '';
|
||||
$insurestatus = '0';
|
||||
}
|
||||
// PO Master
|
||||
@ -2154,7 +2153,13 @@ $mpdf->use_kwt = true;
|
||||
$Qualitycheck = 1;
|
||||
|
||||
|
||||
$POList = array('SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'Import_DispatchDetails' => $Dispatch, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ExchangeRate' => $Exchangerate, 'ExchangeRateCalculatedon' => $ExchangeRateCalculatedon, 'CurrencyType' => $CurrencyType, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'Import_PlaceofOrgin' => $Palaceoforigin, 'PaymentOtherDescription' => $OtherPayment, 'Mode_Of_Shipment' => $Shipmentmode, 'Supplier_Reference' => $SupplierRef, 'Supplier_Offer_No' => $SupplierOffer, 'Other_Reference' => $otherRef, 'Fincap' => $finCap, 'InsuranceStatus' => $insurestatus, 'InsuranceNumber' => $Insurancenumber, 'POSubType' => $importoption, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType);
|
||||
$POList = array('SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'Import_DispatchDetails' => $Dispatch, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ExchangeRate' => $Exchangerate, 'ExchangeRateCalculatedon' => $ExchangeRateCalculatedon, 'CurrencyType' => $CurrencyType, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'Import_PlaceofOrgin' => $Palaceoforigin, 'PaymentOtherDescription' => $OtherPayment, 'Mode_Of_Shipment' => $Shipmentmode, 'Supplier_Reference' => $SupplierRef, 'Supplier_Offer_No' => $SupplierOffer, 'Other_Reference' => $otherRef, 'Fincap' => $finCap, 'InsuranceStatus' => $insurestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $importoption, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType);
|
||||
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 $PONO;
|
||||
//echo $TotalOrder;
|
||||
//print_r($POList);
|
||||
@ -2537,7 +2542,7 @@ $mpdf->use_kwt = true;
|
||||
$OtherReferences = $this->request->getPost('addotherreference');
|
||||
$Fincap = $this->request->getPost('addfincap');
|
||||
$InsuranceOptions = $this->request->getPost('insuranceStatus');
|
||||
$InsuranceNo = $this->request->getPost('insuranceNo');
|
||||
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
|
||||
$ServiceTypeOptions = $this->request->getPost('PoTypeOptions');
|
||||
|
||||
$PaymentMethod = $this->request->getPost('PaymentMethod');
|
||||
@ -2570,7 +2575,7 @@ $mpdf->use_kwt = true;
|
||||
$lastPONO = $this->purchaseorder_model->lastPONO();
|
||||
$newPONO = generate_po_number($lastPONO);
|
||||
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'ExchangeRate' => $ExchangeRate, 'PaymentTerms' => $PaymentMethod, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CapitalRange' => $CapitalRange, 'POType' => $POType, 'CurrencyType' => $currencytypeID, 'DeliverySchedule' => $DeliverySchedule, 'Import_PlaceofOrgin' => $Palaceoforigin, 'Import_DispatchDetails' => $Dispatch, 'DeliveryDate' => $Deliverydt, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNo, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder);
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'ExchangeRate' => $ExchangeRate, 'PaymentTerms' => $PaymentMethod, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CapitalRange' => $CapitalRange, 'POType' => $POType, 'CurrencyType' => $currencytypeID, 'DeliverySchedule' => $DeliverySchedule, 'Import_PlaceofOrgin' => $Palaceoforigin, 'Import_DispatchDetails' => $Dispatch, 'DeliveryDate' => $Deliverydt, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder);
|
||||
|
||||
// $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin);
|
||||
|
||||
@ -2803,7 +2808,7 @@ $mpdf->use_kwt = true;
|
||||
$OtherReferences = $this->request->getPost('editotherreference');
|
||||
$Fincap = $this->request->getPost('editfincap');
|
||||
$InsuranceOptions = $this->request->getPost('insuranceStatus');
|
||||
$InsuranceNo = $this->request->getPost('insuranceNo');
|
||||
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
|
||||
$ServiceTypeOptions = $this->request->getPost('PoTypeOptions');
|
||||
|
||||
$BudgetType = $this->request->getPost('Budget');
|
||||
@ -2822,8 +2827,13 @@ $mpdf->use_kwt = true;
|
||||
$Qualitycheck = 1;
|
||||
|
||||
|
||||
$POList = array('SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ExchangeRate' => $ExchangeRate, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'PaymentTerms' => $PaymentMethod, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CurrencyType' => $currencytypeID, 'DeliverySchedule' => $DeliverySchedule, 'Import_PlaceofOrgin' => $Palaceoforigin, 'Import_DispatchDetails' => $Dispatch, 'DeliveryDate' => $Deliverydt, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNo, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType);
|
||||
|
||||
$POList = array('SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ExchangeRate' => $ExchangeRate, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'PaymentTerms' => $PaymentMethod, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CurrencyType' => $currencytypeID, 'DeliverySchedule' => $DeliverySchedule, 'Import_PlaceofOrgin' => $Palaceoforigin, 'Import_DispatchDetails' => $Dispatch, 'DeliveryDate' => $Deliverydt, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType);
|
||||
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');
|
||||
}
|
||||
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO, $POList);
|
||||
|
||||
|
||||
@ -208,7 +208,7 @@ class Servicepurchaseorder extends BaseController
|
||||
$OtherReferences = $this->request->getPost('addotherreference');
|
||||
$Fincap = $this->request->getPost('addfincap');
|
||||
$InsuranceOptions = $this->request->getPost('insuranceStatus');
|
||||
$InsuranceNo = $this->request->getPost('insuranceNo');
|
||||
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
|
||||
$ServiceTypeOptions = $this->request->getPost('PoTypeOptions');
|
||||
$DescriptionOfPo = $this->request->getPost('descofpo');
|
||||
$PaymentTerms = $this->request->getPost('PaymentTerms');
|
||||
@ -232,12 +232,12 @@ class Servicepurchaseorder extends BaseController
|
||||
$createddt = get_current_date_time();
|
||||
|
||||
$WorkStatus = $this->request->getPost('workstatus');
|
||||
$VaildUpto = ($this->request->getPost('VaildUpto') !== null && !empty($this->request->getPost('VaildUpto'))) ? $this->request->getPost('VaildUpto') : null;
|
||||
$lastPONO = $this->purchaseorder_model->lastPONO();
|
||||
$newPONO = generate_po_number($lastPONO);
|
||||
$IsOpenOrder = ($this->request->getPost('IsOpenOrder') !== null && !empty($this->request->getPost('IsOpenOrder')) && $this->request->getPost('IsOpenOrder') === '1') ? $this->request->getPost('IsOpenOrder') : null;
|
||||
|
||||
// PO Master
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'ServiceWorkStatus' => $WorkStatus, 'POType' => $POType, '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' => $InsuranceNo, 'POSubType' => $ServiceTypeOptions, 'BudgetType' => $BudgetType,'VaildUpto'=>$VaildUpto);
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'ServiceWorkStatus' => $WorkStatus, 'POType' => $POType, '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);
|
||||
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList, $POType, $ServiceTypeOptions);
|
||||
$PONO = $POMaster ? $newPONO : "";
|
||||
@ -352,7 +352,7 @@ class Servicepurchaseorder extends BaseController
|
||||
$OtherReferences = $this->request->getPost('editotherreference');
|
||||
$Fincap = $this->request->getPost('editfincap');
|
||||
$InsuranceOptions = $this->request->getPost('insuranceStatus');
|
||||
$InsuranceNo = $this->request->getPost('insuranceNo');
|
||||
$InsuranceNumber = $this->request->getPost('InsuranceNumber');
|
||||
$ServiceTypeOptions = $this->request->getPost('PoTypeOptions');
|
||||
$DescriptionOfPo = $this->request->getPost('editdescofpo');
|
||||
|
||||
@ -377,12 +377,18 @@ class Servicepurchaseorder extends BaseController
|
||||
$updateddt = get_current_date_time();
|
||||
$WorkStatus = $this->request->getPost('workstatus');
|
||||
|
||||
$VaildUpto = ($this->request->getPost('VaildUpto') !== null && !empty($this->request->getPost('VaildUpto'))) ? $this->request->getPost('VaildUpto') : null;
|
||||
$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' => $InsuranceNo, 'POSubType' => $ServiceTypeOptions, 'BudgetType' => $BudgetType,'VaildUpto'=>$VaildUpto);
|
||||
|
||||
$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');
|
||||
}
|
||||
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO, $POList);
|
||||
|
||||
|
||||
@ -144,9 +144,9 @@ class Inwardgateregister_model extends Model
|
||||
{
|
||||
|
||||
$builder = $this->db->table('T_PurchaseOrder_Master POM')
|
||||
->distinct()->select('POM.PONO,POM.ServiceDescription,POM.DeliveryDate,sup.SupplierName,sup.Address,POM.status,OGR_Status,POM.PODate,POM.VaildUpto')
|
||||
->distinct()->select('POM.PONO,POM.ServiceDescription,POM.DeliveryDate,sup.SupplierName,sup.Address,POM.status,OGR_Status,POM.PODate,POM.IsOpenOrder')
|
||||
->select("IF(POM.PODate IS NOT NULL, DATE_FORMAT(POM.PODate, '%Y-%m-%d'), NULL) AS formatted_PODate")
|
||||
->select("IF(POM.VaildUpto IS NOT NULL, DATE_FORMAT(POM.VaildUpto, '%Y-%m-%d'), NULL) AS formatted_ValidUpto")
|
||||
->select("IF(POM.IsOpenOrder IS NOT NULL, POM.IsOpenOrder, '%Y-%m-%d'), NULL) AS formatted_IsOpenOrder")
|
||||
->join('T_PurchaseOrder_LineItem POL', 'POL.PONO = POM.PONO')
|
||||
->join('T_SupplierDetailsN sup', 'POM.SupplierID = sup.SupplierID')
|
||||
->join('T_OGR_Master OGM ', 'POM.PONO = OGM.PONO_INV', 'left')
|
||||
|
||||
@ -32,7 +32,7 @@ $SuppliersOfferNo = '';
|
||||
$OtherReferences = '';
|
||||
$Fincap = '';
|
||||
$InsuranceOptions = '';
|
||||
$InsuranceNo = '';
|
||||
$InsuranceNumber = '';
|
||||
$ServiceTypeOptions = '';
|
||||
$DescriptionOfPo = '';
|
||||
$BudgetType = '';
|
||||
@ -77,13 +77,13 @@ if (!empty($POMaster)) {
|
||||
$OtherReferences = $Req->Other_Reference;
|
||||
$Fincap = $Req->Fincap;
|
||||
$InsuranceOptions = $Req->InsuranceStatus;
|
||||
$InsuranceNo = $Req->InsuranceNumber;
|
||||
$InsuranceNumber = $Req->InsuranceNumber;
|
||||
$ServiceTypeOptions = $Req->POSubType;
|
||||
$DescriptionOfPo = $Req->Description_Of_Service;
|
||||
$BudgetType = $Req->BudgetType;
|
||||
|
||||
$IsOpenOrder = isset($Req->IsOpenOrder) ? $Req->IsOpenOrder : null;
|
||||
if ($IsOpenOrder !== null && $IsOpenOrder !== "") {
|
||||
if ($IsOpenOrder !== null && (int)$IsOpenOrder !== 0) {
|
||||
$isChecked = true;
|
||||
} else {
|
||||
$isChecked = false;
|
||||
@ -137,40 +137,12 @@ if (!empty($getlogpodtl)) {
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var PODate = '<?php echo $PODate; ?>';
|
||||
var PODate = '<?php echo $PODate; ?>';
|
||||
$("#VaildUpto").datepicker({
|
||||
dateFormat: 'dd-mm-yy',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
yearRange: '-1:+1', // Adjust as needed
|
||||
minDate: PODate
|
||||
var PODate = '<?php echo $PODate; ?>';
|
||||
$("#VaildUpto").datepicker({
|
||||
dateFormat: 'dd-mm-yy',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
yearRange: '-1:+1', // Adjust as needed
|
||||
minDate: PODate
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$("#PODate").on("change", function() {
|
||||
var minDate = $(this).datepicker("getDate");
|
||||
var maxDate = new Date(minDate.getFullYear() + 1, minDate.getMonth(), minDate.getDate());
|
||||
$("#VaildUpto").datepicker("option", "minDate", minDate);
|
||||
$("#VaildUpto").datepicker("option", "maxDate", maxDate);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
$("#PODate").on("change", function() {
|
||||
var minDate = $(this).datepicker("getDate");
|
||||
var maxDate = new Date(minDate.getFullYear() + 1, minDate.getMonth(), minDate.getDate());
|
||||
$("#VaildUpto").datepicker("option", "minDate", minDate);
|
||||
$("#VaildUpto").datepicker("option", "maxDate", maxDate);
|
||||
});
|
||||
var minDate = $(this).datepicker("getDate");
|
||||
var maxDate = new Date(minDate.getFullYear() + 1, minDate.getMonth(), minDate.getDate());
|
||||
});
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
@ -1066,10 +1038,10 @@ if (!empty($getlogpodtl)) {
|
||||
<div class="col-md-9" style="padding:0px;">
|
||||
|
||||
<div class="col-md-4" id="insuranceTxtDiv" style="display:block;">
|
||||
<label>Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<label>Insurance No / Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'insuranceNo', 'value' => set_value('insuranceNo', $InsuranceNo), 'id' => 'insuranceNo', 'class' => 'form-control', 'required' => 'true');
|
||||
$data = array('name' => 'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -1160,7 +1132,7 @@ if (!empty($getlogpodtl)) {
|
||||
<div class="col-md-12">
|
||||
<?php if($PONOStatus == REQITEM_Emergency_PO_CREATED) { ?>
|
||||
<div class="col-md-3 col-md-offset-7" align="right" style="padding:5px">
|
||||
<input type="checkbox" id="openOrderFormat" name="openOrderFormat" value="1" <?php echo $isChecked ? 'checked' : ''; ?>> IS THIS OPEN ORDER FORMAT
|
||||
<input type="checkbox" id="IsOpenOrder" name="IsOpenOrder" value="1" <?php echo $isChecked ? 'checked' : ''; ?>> IS THIS OPEN ORDER FORMAT
|
||||
</div>
|
||||
<div class="col-md-1" align="right">
|
||||
<?php }else{ ?>
|
||||
@ -2476,10 +2448,12 @@ if (!empty($getlogpodtl)) {
|
||||
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
|
||||
|
||||
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED) {
|
||||
if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED) { ?>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save</span></a> <?php } ?>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-success Save" ID="Cancel" href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||
if ($PONOStatus == PO_DRAFT) { ?>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save</span></a>
|
||||
<?php } ?>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(4)"> <span class="bold">Approve and Release</span></a>
|
||||
<a class="btn btn-success Save" ID="Cancel" href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||
<?php } else if ($PONOStatus == SPECIAL_PO) { ?>
|
||||
<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(3)"> <span class="bold">Submit</span></a>
|
||||
@ -3606,14 +3580,14 @@ if (!empty($getlogpodtl)) {
|
||||
|
||||
});
|
||||
$("#insuranceStatus").change(function() {
|
||||
var InsNo = '<?php echo $InsuranceNo; ?>';
|
||||
var InsNo = '<?php echo $InsuranceNumber; ?>';
|
||||
|
||||
if ($("#insuranceStatus").val() == "1") {
|
||||
$('#insuranceTxtDiv').show();
|
||||
$('#insuranceNo').val('Yes');
|
||||
$('#InsuranceNumber').val('Yes');
|
||||
} else {
|
||||
$('#insuranceTxtDiv').hide();
|
||||
$('#insuranceNo').val('');
|
||||
$('#InsuranceNumber').val('');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -2447,10 +2447,10 @@ if (!empty($INRSYMBOL)) {
|
||||
<div class="col-md-9" style="padding:0px;">
|
||||
|
||||
<div class="col-md-4" id="insuranceTxtDiv" style="display:block;">
|
||||
<label>Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label>
|
||||
<label>Insurance No / Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'insuranceNo', 'value' => set_value('insuranceNo'), 'id' => 'insuranceNo', 'class' => 'form-control', 'required' => 'true');
|
||||
$data = array('name' => 'InsuranceNumber', 'value' => set_value('InsuranceNumber'), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -7104,7 +7104,7 @@ $('#content').loader('hide');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
}
|
||||
else if ($('#insuranceStatus').val() == 'YES' && $('#insuranceNo').val() == '') {
|
||||
else if ($('#insuranceStatus').val() == 'YES' && $('#InsuranceNumber').val() == '') {
|
||||
alert('Please Enter Insurance Number..!');
|
||||
|
||||
return false;
|
||||
@ -7830,11 +7830,11 @@ $('#content').loader('hide');
|
||||
|
||||
if ($("#insuranceStatus").val() == "1") {
|
||||
$('#insuranceTxtDiv').show();
|
||||
$('#insuranceNo').val('Yes');
|
||||
$('#InsuranceNumber').val('Yes');
|
||||
|
||||
} else {
|
||||
$('#insuranceTxtDiv').hide();
|
||||
$('#insuranceNo').val('');
|
||||
$('#InsuranceNumber').val('');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -701,10 +701,10 @@ function vaildateBeforeOpenModal()
|
||||
<div class="col-md-9" style="padding:0px;">
|
||||
|
||||
<div class="col-md-4" id="insuranceTxtDiv" style="display:block;">
|
||||
<label>Insurance Details <span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<label>Insurance No / Insurance Details <span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'insuranceNo','value' => set_value('insuranceNo'),'id'=>'insuranceNo', 'class' => 'form-control' ,'required' => 'true');
|
||||
$data = array('name' => 'InsuranceNumber','value' => set_value('InsuranceNumber'),'id'=>'InsuranceNumber', 'class' => 'form-control' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -846,7 +846,14 @@ function vaildateBeforeOpenModal()
|
||||
<div class="col-md-12">
|
||||
<div align="right">
|
||||
<!-- <a data-toggle="modal" ><button type="submit" onclick="myFunction();" class="btn btn-success" id="abcd" >Select Line Item</button> </a> -->
|
||||
<a data-toggle="modal" class="btn btn-success" data-dismiss="modal" onclick="openModal();" >Add Line Item </a>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3 col-md-offset-7" align="right" style="padding:10px">
|
||||
<!-- <input type="checkbox" id="IsOpenOrder" name="IsOpenOrder" value="1"> IS THIS OPEN ORDER FORMAT -->
|
||||
</div>
|
||||
<div class="col-md-1" align="right">
|
||||
<a data-toggle="modal" class="btn btn-success" data-dismiss="modal" onclick="openModal();" >Add Line Item </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
@ -5694,12 +5701,12 @@ $("#insuranceStatus").change(function(){
|
||||
|
||||
if($("#insuranceStatus").val()=="1"){
|
||||
$('#insuranceTxtDiv').show();
|
||||
$('#insuranceNo').val('Yes');
|
||||
$('#InsuranceNumber').val('Yes');
|
||||
|
||||
}
|
||||
else{
|
||||
$('#insuranceTxtDiv').hide();
|
||||
$('#insuranceNo').val('');
|
||||
$('#InsuranceNumber').val('');
|
||||
}
|
||||
});
|
||||
$('#drpFreight').change(function() {
|
||||
|
||||
@ -81,7 +81,7 @@
|
||||
$OtherReferences='';
|
||||
$Fincap='';
|
||||
$InsuranceOptions='';
|
||||
$InsuranceNo='';
|
||||
$InsuranceNumber='';
|
||||
$ServiceTypeOptions='';
|
||||
$FinalTotalBasic = 0;
|
||||
|
||||
@ -171,7 +171,7 @@ if(!empty($POMaster))
|
||||
$OtherReferences=$Req->Other_Reference;
|
||||
$Fincap=$Req->Fincap;
|
||||
$InsuranceOptions=$Req->InsuranceStatus;
|
||||
$InsuranceNo=$Req->InsuranceNumber;
|
||||
$InsuranceNumber=$Req->InsuranceNumber;
|
||||
$ServiceTypeOptions=$Req->POSubType;
|
||||
$BudgetType = $Req->BudgetType;
|
||||
|
||||
@ -275,7 +275,7 @@ $('#amendsupplierofferno').attr("style", "pointer-events: none;");
|
||||
$('#amendotherreference').attr("style", "pointer-events: none;");
|
||||
$('#amendfincap').attr("style", "pointer-events: none;");
|
||||
$('#PoTypeOptions').attr("style", "pointer-events: none;");
|
||||
$('#insuranceNo').attr("style", "pointer-events: none;");
|
||||
$('#InsuranceNumber').attr("style", "pointer-events: none;");
|
||||
$('#insuranceStatus').attr("style", "pointer-events: none;");
|
||||
$('#Exchangerateon').attr("style", "pointer-events: none;");
|
||||
$('#ExchangeRt').attr("style", "pointer-events: none;");
|
||||
@ -811,10 +811,10 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4" id="insuranceTxtDiv" style="display:block;">
|
||||
<label>Insurance No<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<label>Insurance No / Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'insuranceNo','value' => set_value('insuranceNo',$InsuranceNo),'id'=>'insuranceNo', 'class' => 'form-control' ,'required' => 'true');
|
||||
$data = array('name' => 'InsuranceNumber','value' => set_value('InsuranceNumber',$InsuranceNumber),'id'=>'InsuranceNumber', 'class' => 'form-control' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
@ -88,7 +88,7 @@
|
||||
$OtherReferences='';
|
||||
$Fincap='';
|
||||
$InsuranceOptions='';
|
||||
$InsuranceNo='';
|
||||
$InsuranceNumber='';
|
||||
$ServiceTypeOptions='';
|
||||
$BudgetType = '';
|
||||
|
||||
@ -165,7 +165,7 @@ if(!empty($POMaster))
|
||||
$OtherReferences=$Req->Other_Reference;
|
||||
$Fincap=$Req->Fincap;
|
||||
$InsuranceOptions=$Req->InsuranceStatus;
|
||||
$InsuranceNo=$Req->InsuranceNumber;
|
||||
$InsuranceNumber=$Req->InsuranceNumber;
|
||||
$ServiceTypeOptions=$Req->POSubType;
|
||||
$BudgetType = $Req->BudgetType;
|
||||
|
||||
@ -859,10 +859,10 @@ $("#PaymentMethod").select2();
|
||||
<div class="col-md-9" style="padding:0px;">
|
||||
|
||||
<div class="col-md-4" id="insuranceTxtDiv" style="display:block;">
|
||||
<label>Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<label>Insurance No / Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'insuranceNo','value' => set_value('insuranceNo',$InsuranceNo),'id'=>'insuranceNo', 'class' => 'form-control' ,'required' => 'true');
|
||||
$data = array('name' => 'InsuranceNumber','value' => set_value('InsuranceNumber',$InsuranceNumber),'id'=>'InsuranceNumber', 'class' => 'form-control' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -1056,17 +1056,18 @@ $("#PaymentMethod").select2();
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3 col-md-offset-7" align="right" style="padding:10px">
|
||||
<!-- <input type="checkbox" id="IsOpenOrder" name="IsOpenOrder" value="1"> IS THIS OPEN ORDER FORMAT -->
|
||||
</div>
|
||||
<div class="col-md-1" align="right">
|
||||
<?php if($POStatus == PO_DRAFT || $POStatus == PO_CREATED) { ?>
|
||||
<a data-toggle="modal" ><button type="submit" onclick="myFunction();" class="btn btn-success" id="abcd" >Select Line Item</button> </a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php if($POStatus == PO_DRAFT || $POStatus == PO_CREATED) { ?>
|
||||
<div class="col-md-12">
|
||||
<div align="right">
|
||||
<a data-toggle="modal" ><button type="submit" onclick="myFunction();" class="btn btn-success" id="abcd" >Select Line Item</button> </a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<br>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table id="serviceTax" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead >
|
||||
@ -3885,7 +3886,7 @@ $("#PaymentMethod").select2();
|
||||
|
||||
<div class="col-md-12">
|
||||
<label>Special Instructions </label> <?php
|
||||
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' );
|
||||
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',strip_tags($ServiceDescription)),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' );
|
||||
echo form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
@ -3912,6 +3913,7 @@ $("#PaymentMethod").select2();
|
||||
}?>
|
||||
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(4)" > <span class="bold">Approve and Release</span></a>
|
||||
|
||||
<a class="btn btn-success Save" ID="Cancel" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||
|
||||
@ -7470,15 +7472,15 @@ $("#PaymentMethod").change(function() {
|
||||
}
|
||||
});
|
||||
$("#insuranceStatus").change(function(){
|
||||
var InsNo = '<?php echo $InsuranceNo; ?>';
|
||||
var InsNo = '<?php echo $InsuranceNumber; ?>';
|
||||
|
||||
if($("#insuranceStatus").val()=="1"){
|
||||
$('#insuranceTxtDiv').show();
|
||||
$('#insuranceNo').val('Yes');
|
||||
$('#InsuranceNumber').val('Yes');
|
||||
}
|
||||
else{
|
||||
$('#insuranceTxtDiv').hide();
|
||||
$('#insuranceNo').val('');
|
||||
$('#InsuranceNumber').val('');
|
||||
}
|
||||
});
|
||||
$('#drpFreight').change(function() {
|
||||
|
||||
@ -161,7 +161,7 @@ if(!empty($POMaster))
|
||||
$Otherpay=$Req->PaymentOtherDescription;
|
||||
|
||||
$Insurance=$Req->InsuranceStatus;
|
||||
$InsuranceNo=$Req->InsuranceNumber;
|
||||
$InsuranceNumber=$Req->InsuranceNumber;
|
||||
$Importoption=$Req->POSubType;
|
||||
$InsuranceStatus=$Req->InsuranceStatus;
|
||||
$BudgetType = $Req->BudgetType;
|
||||
@ -759,12 +759,12 @@ if(!empty($RequistionDetails))
|
||||
</div>
|
||||
<div class="col-md-9" style="padding:0px;">
|
||||
<div class="col-md-4" id="insurancenum" style="display:none;">
|
||||
<label>Insurance No<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5
|
||||
<label>Insurance No / Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5
|
||||
;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'insurancenumber','insurancenumber' => set_value('insurancenumber'),'id'=>'insurancenumber', 'class' => 'form-control' ,'required' => 'true', 'readonly'=>true);
|
||||
$data = array('name' => 'InsuranceNumber','InsuranceNumber' => set_value('InsuranceNumber'),'id'=>'InsuranceNumber', 'class' => 'form-control' ,'required' => 'true', 'readonly'=>true);
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -1904,14 +1904,15 @@ echo form_textarea($data);
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
<label>Special Instructions </label> <?php
|
||||
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' );
|
||||
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',strip_tags($ServiceDescription)),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' );
|
||||
echo form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div align="right" style="padding-right:10px">
|
||||
|
||||
<div class="col-md-3 col-md-offset-9"><br/>
|
||||
<div class="col-md-5 col-md-offset-7" align="right"><br />
|
||||
|
||||
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
||||
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
||||
<input type="hidden" name="txtStatus" id="txtStatus" />
|
||||
@ -2028,16 +2029,16 @@ $('#Importoption').attr("style", "pointer-events: none;");
|
||||
|
||||
|
||||
var insureoption=<?php echo json_encode($Insurance,JSON_PRETTY_PRINT)?>;
|
||||
var insureno=<?php echo json_encode($InsuranceNo,JSON_PRETTY_PRINT)?>;
|
||||
var insureno=<?php echo json_encode($InsuranceNumber,JSON_PRETTY_PRINT)?>;
|
||||
//console.log(insureoption);
|
||||
// $('#insurancenum').attr("style", "pointer-events: none;");
|
||||
// $('#insurancenumber').attr("style", "pointer-events: none;");
|
||||
// $('#InsuranceNumber').attr("style", "pointer-events: none;");
|
||||
|
||||
|
||||
if(insureoption==1)
|
||||
{
|
||||
$('#insurancenum').show();
|
||||
$('#insurancenumber').val(insureno);
|
||||
$('#InsuranceNumber').val(insureno);
|
||||
$('#Insurance').val('YES');
|
||||
}
|
||||
|
||||
|
||||
@ -202,14 +202,14 @@ if(!empty($INRSYMBOL))
|
||||
|
||||
var DelDt = '<?php echo $Deliverydt; ?>';
|
||||
var insurancestatus = '<?php echo $insurencestatus;?>';
|
||||
var insuranceno = '<?php echo $insurenceno;?>';
|
||||
var InsuranceNumber = '<?php echo $insurenceno;?>';
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#RequistionNo').attr("style", "pointer-events: none;");
|
||||
$('#drpSupplier').attr("style", "pointer-events: none;");
|
||||
$('#PoTypeOptions').attr("style", "pointer-events: none;");
|
||||
$('#insurancestatus').attr("style", "pointer-events: none;");
|
||||
$('#insuranceno').attr("style", "pointer-events: none;");
|
||||
$('#InsuranceNumber').attr("style", "pointer-events: none;");
|
||||
|
||||
|
||||
|
||||
@ -240,16 +240,16 @@ if(insurancestatus == 1)
|
||||
{
|
||||
|
||||
$('#insurancestatus').val(insurancestatus);
|
||||
$("#insurancenodiv").show();
|
||||
$('#insuranceno').val(insuranceno);
|
||||
$("#InsuranceNumberdiv").show();
|
||||
$('#InsuranceNumber').val(InsuranceNumber);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#insurancestatus').val(insurancestatus);
|
||||
$('#insuranceno').val("");
|
||||
$("#insurancenodiv").hide();
|
||||
$('#InsuranceNumber').val("");
|
||||
$("#InsuranceNumberdiv").hide();
|
||||
}
|
||||
|
||||
});
|
||||
@ -1251,11 +1251,11 @@ function calculateEditTaxValue()
|
||||
<div class="col-md-9" style="padding:0px;">
|
||||
|
||||
|
||||
<div class="col-md-4" id="insurancenodiv" style="display:block;">
|
||||
<label>Insurance No<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<div class="col-md-4" id="InsuranceNumberdiv" style="display:block;">
|
||||
<label>Insurance No / Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'insuranceno','insuranceno' => set_value('insuranceno',$insurenceno),'id'=>'insuranceno', 'class' => 'form-control' ,'required' => 'true');
|
||||
$data = array('name' => 'InsuranceNumber','InsuranceNumber' => set_value('InsuranceNumber',$insurenceno),'id'=>'InsuranceNumber', 'class' => 'form-control' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -2127,14 +2127,14 @@ function calculateEditTaxValue()
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
<label>Special Instructions </label> <?php
|
||||
$data = array('name' => 'txtSpcialInstruction','id'=>'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription), 'rows'=>'8','class' => 'form-control' );
|
||||
$data = array('name' => 'txtSpcialInstruction','id'=>'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',strip_tags($ServiceDescription)), 'rows'=>'8','class' => 'form-control' );
|
||||
echo form_textarea($data);
|
||||
?>
|
||||
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value=" ">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="padding: 2% 0%">
|
||||
<div class="col-md-3 col-md-offset-9"><br/>
|
||||
<div class="col-md-5 col-md-offset-7" align="right"><br />
|
||||
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
||||
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
||||
<input type="hidden" name="txtStatus" id="txtStatus" />
|
||||
@ -2736,11 +2736,11 @@ $('#insurancestatus').change(function(){
|
||||
var ans=$("#insurancestatus").val();
|
||||
//alert(ans);
|
||||
if(ans == 0){
|
||||
$("#insurancenodiv").hide();
|
||||
//$("#insuranceno").val("");
|
||||
$("#InsuranceNumberdiv").hide();
|
||||
//$("#InsuranceNumber").val("");
|
||||
}
|
||||
else {
|
||||
$("#insurancenodiv").show();}
|
||||
$("#InsuranceNumberdiv").show();}
|
||||
|
||||
});
|
||||
</script>
|
||||
@ -79,7 +79,7 @@ if (!empty($POMaster)) {
|
||||
|
||||
|
||||
$IsOpenOrder = isset($Req->IsOpenOrder) ? $Req->IsOpenOrder : null;
|
||||
if ($IsOpenOrder !== null && $IsOpenOrder !== "0000-00-00 00:00:00") {
|
||||
if ($IsOpenOrder !== null && (int)$IsOpenOrder !== 0) {
|
||||
$isChecked = true;
|
||||
} else {
|
||||
$isChecked = false;
|
||||
@ -98,12 +98,11 @@ if (!empty($POMaster)) {
|
||||
$otherref = $Req->Other_Reference;
|
||||
$fincap = $Req->Fincap;
|
||||
$revenuesubtype = $Req->POSubType;
|
||||
$insurencestatus = $Req->InsuranceStatus;
|
||||
$insurencestatus = (int)$Req->InsuranceStatus;
|
||||
$insurenceno = $Req->InsuranceNumber;
|
||||
$BudgetType = $Req->BudgetType;
|
||||
$IGRNO = $Req->IGRNO;
|
||||
|
||||
// echo $insurenceno;
|
||||
// echo $otherPayment;
|
||||
}
|
||||
}
|
||||
@ -197,17 +196,11 @@ if (!empty($getlogpodtl)) {
|
||||
readonly: 1
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var isChecked = <?php echo $isChecked; ?>;
|
||||
var PODate = '<?php echo $PODate; ?>';
|
||||
});
|
||||
|
||||
<script type="text/javascript">
|
||||
var DelOpt = '<?php echo $DeliverOption; ?>';
|
||||
var SchName = <?php echo json_encode($DeliverSchedule); ?>;
|
||||
var DelDt = '<?php echo $Deliverydt; ?>';
|
||||
var insurancestatus = '<?php echo $insurencestatus; ?>';
|
||||
//alert(insurancestatus)
|
||||
var budgettype = '<?php echo $BudgetType; ?>';
|
||||
// if(budgettype == 'CAPITAL')
|
||||
// {
|
||||
@ -224,7 +217,7 @@ if (!empty($getlogpodtl)) {
|
||||
//}
|
||||
|
||||
//alert(budgettype);
|
||||
var insuranceno = '<?php echo $insurenceno; ?>';
|
||||
var InsuranceNumber = '<?php echo $insurenceno; ?>';
|
||||
var statuscheck = '<?php echo $PONOStatus; ?>';
|
||||
$(document).ready(function() {
|
||||
//alert('capital-');
|
||||
@ -268,18 +261,18 @@ if (!empty($getlogpodtl)) {
|
||||
$('#Otherpayment').val('');
|
||||
}
|
||||
// var insurancestatus = <?php echo $insurencestatus; ?>;
|
||||
// var insuranceno = <?php echo $insurenceno; ?>;
|
||||
// var InsuranceNumber = <?php echo $insurenceno; ?>;
|
||||
if (insurancestatus == 1) {
|
||||
|
||||
$('#insurancestatus').val(insurancestatus);
|
||||
$("#insurancenodiv").show();
|
||||
$('#insuranceno').val(insuranceno);
|
||||
$("#InsuranceNumberdiv").show();
|
||||
$('#InsuranceNumber').val(InsuranceNumber);
|
||||
|
||||
|
||||
} else {
|
||||
$('#insurancestatus').val(insurancestatus);
|
||||
$('#insuranceno').val("");
|
||||
$("#insurancenodiv").hide();
|
||||
$('#InsuranceNumber').val("");
|
||||
$("#InsuranceNumberdiv").hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@ -2091,11 +2084,11 @@ if (!empty($getlogpodtl)) {
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8" style="padding:0px;">
|
||||
<div class="col-md-4" id="insurancenodiv" style="display:block;">
|
||||
<label>Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<div class="col-md-4" id="InsuranceNumberdiv" style="display:block;">
|
||||
<label>Insurance No / Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'insuranceno', 'insuranceno' => set_value('insuranceno', $insurenceno), 'id' => 'insuranceno', 'class' => 'form-control', 'required' => 'true');
|
||||
$data = array('name' => 'InsuranceNumber', 'InsuranceNumber' => set_value('InsuranceNumber', $insurenceno), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -2345,17 +2338,12 @@ if (!empty($getlogpodtl)) {
|
||||
<div align="right">
|
||||
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == PO_APPROVED || $PONOStatus == REQITEM_Emergency_PO_CREATED) { ?>
|
||||
<div class="col-md-12">
|
||||
<?php if($PONOStatus == REQITEM_Emergency_PO_CREATED) { ?>
|
||||
<div class="col-md-3 col-md-offset-7" align="right" style="padding:5px">
|
||||
<input type="checkbox" id="openOrderFormat" name="openOrderFormat" value="1" <?php echo $isChecked ? 'checked' : ''; ?>> IS THIS OPEN ORDER FORMAT
|
||||
<input type="checkbox" id="IsOpenOrder" name="IsOpenOrder" value="1" <?php echo $isChecked ? 'checked' : ''; ?>> IS THIS OPEN ORDER FORMAT
|
||||
</div>
|
||||
<div class="col-md-1" align="right">
|
||||
<?php }else{ ?>
|
||||
<div class="col-md-12" align="right">
|
||||
<?php } ?>
|
||||
<a data-toggle="modal" onclick="showmodel();" class=" btn btn-success"> Select Line Item </a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@ -3641,7 +3629,7 @@ if (!empty($getlogpodtl)) {
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
<label>Special Instructions </label> <?php
|
||||
$data = array('name' => 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction', $ServiceDescription), 'id' => 'txtSpcialInstruction', 'class' => 'form-control');
|
||||
$data = array('name' => 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction', strip_tags($ServiceDescription)), 'id' => 'txtSpcialInstruction', 'class' => 'form-control');
|
||||
echo form_textarea($data);
|
||||
?>
|
||||
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value="">
|
||||
@ -3950,7 +3938,7 @@ if (!empty($getlogpodtl)) {
|
||||
</div><!-- /#filemodal -->
|
||||
<!-- Revenue Special PO Modal Ends Here -->
|
||||
<div class="row" style="padding: 2% 0%">
|
||||
<div class="col-md-3 col-md-offset-9"><br />
|
||||
<div class="col-md-5 col-md-offset-7" align="right"><br />
|
||||
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
||||
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
||||
<input type="hidden" name="txtStatus" id="txtStatus" />
|
||||
@ -3960,10 +3948,11 @@ if (!empty($getlogpodtl)) {
|
||||
<input type="hidden" name="txttaxcheck" id="txttaxcheck" value="" />
|
||||
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
|
||||
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED) {
|
||||
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</span></a>
|
||||
<?php } ?>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(4)"> <span class="bold">Approve and Release </span></a>
|
||||
<a class="btn btn-success Save" ID="Cancel" href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||
<?php } else if ($PONOStatus == SPECIAL_PO) { ?>
|
||||
<a class="btn btn-success" ID="Viewsave" onclick="Save(2)"> <span class="bold">Submit</span></a>
|
||||
@ -4770,6 +4759,8 @@ if (!empty($getlogpodtl)) {
|
||||
stat = '<?php echo PO_DRAFT; ?>';
|
||||
} else if (status == '1') {
|
||||
stat = '<?php echo PO_CREATED; ?>';
|
||||
} else if (status == '4') {
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
}
|
||||
else {
|
||||
stat = '<?php echo $PONOStatus; ?>';
|
||||
@ -4804,8 +4795,8 @@ if (!empty($getlogpodtl)) {
|
||||
alert('Please Enter Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
} else if ($('#insurancestatus').val() == 1 && $('#insuranceno').val() == '') {
|
||||
alert('Please Enter Insurance No..!');
|
||||
} else if ($('#insurancestatus').val() == 1 && $('#InsuranceNumber').val() == '') {
|
||||
alert('Please Enter Insurance No / Insurance Details..!');
|
||||
$('#insurance').focus();
|
||||
return false;
|
||||
} else {
|
||||
@ -5228,11 +5219,11 @@ if (!empty($getlogpodtl)) {
|
||||
var ans = $("#insurancestatus").val();
|
||||
//alert(ans);
|
||||
if (ans == 0) {
|
||||
$("#insurancenodiv").hide();
|
||||
//$("#insuranceno").val("");
|
||||
$("#InsuranceNumberdiv").hide();
|
||||
//$("#InsuranceNumber").val("");
|
||||
} else {
|
||||
$("#insurancenodiv").show();
|
||||
$("#insuranceno").val("Yes");
|
||||
$("#InsuranceNumberdiv").show();
|
||||
$("#InsuranceNumber").val("Yes");
|
||||
}
|
||||
|
||||
});
|
||||
@ -5469,9 +5460,9 @@ if (!empty($getlogpodtl)) {
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$('#openOrderFormat').change(function() {
|
||||
$('#IsOpenOrder').change(function() {
|
||||
|
||||
// alert("openOrderFormat");
|
||||
// alert("IsOpenOrder");
|
||||
if (this.checked) {
|
||||
$('#Quantity').val(0);
|
||||
$('#Quantity').removeAttr('required');
|
||||
|
||||
@ -35,7 +35,7 @@ $SuppliersOfferNo = '';
|
||||
$OtherReferences = '';
|
||||
$Fincap = '';
|
||||
$InsuranceOptions = '';
|
||||
$InsuranceNo = '';
|
||||
$InsuranceNumber = '';
|
||||
$ServiceTypeOptions = '';
|
||||
$DescriptionOfPo = '';
|
||||
$BudgetType = '';
|
||||
@ -83,7 +83,7 @@ if (!empty($POMaster)) {
|
||||
$OtherReferences = $Req->Other_Reference;
|
||||
$Fincap = $Req->Fincap;
|
||||
$InsuranceOptions = $Req->InsuranceStatus;
|
||||
$InsuranceNo = $Req->InsuranceNumber;
|
||||
$InsuranceNumber = $Req->InsuranceNumber;
|
||||
$ServiceTypeOptions = $Req->POSubType;
|
||||
$DescriptionOfPo = $Req->Description_Of_Service;
|
||||
$BudgetType = $Req->BudgetType;
|
||||
@ -182,7 +182,7 @@ foreach ($PaymentTerms as $TER) {
|
||||
$('#amendotherreference').attr("style", "pointer-events: none;");
|
||||
$('#amendfincap').attr("style", "pointer-events: none;");
|
||||
$('#PoTypeOptions').attr("style", "pointer-events: none;");
|
||||
$('#insuranceNo').attr("style", "pointer-events: none;");
|
||||
$('#InsuranceNumber').attr("style", "pointer-events: none;");
|
||||
|
||||
$('#insuranceStatus').attr("style", "pointer-events: none;");
|
||||
|
||||
@ -965,10 +965,10 @@ foreach ($PaymentTerms as $TER) {
|
||||
<div class="col-md-9" style="padding:0px;">
|
||||
|
||||
<div class="col-md-4" id="insuranceTxtDiv" style="display:block;">
|
||||
<label>Insurance No<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<label>Insurance No / Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'insuranceNo', 'value' => set_value('insuranceNo', $InsuranceNo), 'id' => 'insuranceNo', 'class' => 'form-control', 'required' => 'true');
|
||||
$data = array('name' => 'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
@ -167,13 +167,13 @@ if(!empty($POMaster))
|
||||
$Fincap=$Req->Fincap;
|
||||
|
||||
$Insurance=$Req->InsuranceStatus;
|
||||
$InsuranceNo=$Req->InsuranceNumber;
|
||||
$InsuranceNumber=$Req->InsuranceNumber;
|
||||
$Importoption=$Req->POSubType;
|
||||
$BudgetType = $Req->BudgetType;
|
||||
}
|
||||
}
|
||||
|
||||
//echo $InsuranceNo;
|
||||
//echo $InsuranceNumber;
|
||||
|
||||
$ins='';
|
||||
if($Insurance==1)
|
||||
@ -796,12 +796,12 @@ else
|
||||
</div>
|
||||
<div class="col-md-9" style="padding:0px;">
|
||||
<div class="col-md-4" id="insurancenum" style="display:none;">
|
||||
<label>Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5
|
||||
<label>Insurance No / Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5
|
||||
;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'insurancenumber','insurancenumber' => set_value('insurancenumber'),'id'=>'insurancenumber', 'class' => 'form-control' ,'required' => 'true');
|
||||
$data = array('name' => 'InsuranceNumber','InsuranceNumber' => set_value('InsuranceNumber'),'id'=>'InsuranceNumber', 'class' => 'form-control' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -900,16 +900,16 @@ else
|
||||
<table class="table table-bordered" style="border:1px solid #333">
|
||||
<div align="right" style="padding-right:10px">
|
||||
<div align="right">
|
||||
<?php
|
||||
|
||||
if($PONOStatus == PO_RELEASED)
|
||||
{?>
|
||||
<!-- <a data-toggle="modal" data-target="#importpomodel" class="btn btn-success" data-dismiss="modal" onclick="myFunction();" >Add Line Item </a> -->
|
||||
<?php
|
||||
} else if ($PONOStatus==PO_DRAFT ||$PONOStatus==PO_CREATED || $PONOStatus==PO_APPROVED) {?>
|
||||
<a data-toggle="modal" data-target="#importpomodel" class="btn btn-success" data-dismiss="modal" onclick="myFunction();" >Add Line Item </a><?php
|
||||
}?>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3 col-md-offset-7" align="right" style="padding:10px">
|
||||
<!-- <input type="checkbox" id="IsOpenOrder" name="IsOpenOrder" value="1"> IS THIS OPEN ORDER FORMAT -->
|
||||
</div>
|
||||
<div class="col-md-1" align="right">
|
||||
<?php if ($PONOStatus==PO_DRAFT ||$PONOStatus==PO_CREATED || $PONOStatus==PO_APPROVED) {?>
|
||||
<a data-toggle="modal" data-target="#importpomodel" class="btn btn-success" data-dismiss="modal" onclick="myFunction();" >Add Line Item </a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<a data-toggle="modal"><button type="submit" onclick="myFunction();" class="btn btn-success" id="abcd" >Select Line Item</button> </a>-->
|
||||
|
||||
@ -3152,14 +3152,14 @@ echo form_textarea($data);
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
<label>Special Instructions </label> <?php
|
||||
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' );
|
||||
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',strip_tags($ServiceDescription)),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' );
|
||||
echo form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div align="right" style="padding-right:10px">
|
||||
|
||||
<div class="col-md-3 col-md-offset-9"><br/>
|
||||
<div class="col-md-5 col-md-offset-7" align="right"><br />
|
||||
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
||||
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
||||
<input type="hidden" name="txtStatus" id="txtStatus" />
|
||||
@ -3172,11 +3172,11 @@ echo form_textarea($data);
|
||||
|
||||
|
||||
<?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</span></a> <?php }?>
|
||||
if($PONOStatus == PO_DRAFT){?>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a>
|
||||
<?php }?>
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(4)" > <span class="bold">Release</span></a>
|
||||
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(4)" > <span class="bold">Approve and Release</span></a>
|
||||
<!-- <input type="reset" class="btn btn-success" value="Reset"> -->
|
||||
<a class="btn btn-success Save" ID="Cancel" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||
<?php }else {?>
|
||||
@ -3189,6 +3189,7 @@ echo form_textarea($data);
|
||||
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-success Submit" ID="Submit" onclick="Save(4)" > <span class="bold">Approve and Release</span></a>
|
||||
<a class="btn btn-success" href="<?php echo base_url(); ?>purchaseorderListing">OK</a>
|
||||
<?php }?>
|
||||
<?php } ?>
|
||||
@ -3199,8 +3200,8 @@ echo form_textarea($data);
|
||||
|
||||
<label>Request On :</label><?php echo $Reqon;?><br/>
|
||||
<label>Request By :</label><?php echo $RequesterName;?><br/>
|
||||
<!-- <label>Status :</label><?php // echo $StatusName;?> -->
|
||||
<label>Status : </label><?php
|
||||
<label>Status :</label><?php echo $StatusName;?>
|
||||
<!-- <label>Status : </label><?php
|
||||
$statusMappings = [
|
||||
'PO APPROVED' => 'AWAITING APPROVE',
|
||||
'AWAITING RELEASE' => 'AWAITING APPROVE',
|
||||
@ -3218,7 +3219,7 @@ echo form_textarea($data);
|
||||
echo "Status not provided";
|
||||
}
|
||||
?>
|
||||
|
||||
-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -3326,7 +3327,7 @@ var insure=$("#Insurance :selected").text();
|
||||
if(insure=='YES')
|
||||
{
|
||||
$('#insurancenum').show();
|
||||
$('#insurancenumber').val('Yes');
|
||||
$('#InsuranceNumber').val('Yes');
|
||||
}
|
||||
|
||||
else
|
||||
@ -3339,14 +3340,14 @@ else
|
||||
|
||||
|
||||
var insureoption=<?php echo json_encode($Insurance,JSON_PRETTY_PRINT)?>;
|
||||
var insureno=<?php echo json_encode($InsuranceNo,JSON_PRETTY_PRINT)?>;
|
||||
var insureno=<?php echo json_encode($InsuranceNumber,JSON_PRETTY_PRINT)?>;
|
||||
//console.log(insureoption);
|
||||
|
||||
|
||||
if(insureoption==1)
|
||||
{
|
||||
$('#insurancenum').show();
|
||||
$('#insurancenumber').val(insureno);
|
||||
$('#InsuranceNumber').val(insureno);
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
@ -830,12 +830,11 @@ if (!empty($ReqPOType)) {
|
||||
}
|
||||
var qty = parseInt(document.getElementById('Quantity').value);
|
||||
if (isNaN(qty) || qty < 1) {
|
||||
alert('Please Enter the Quantity');
|
||||
alert('Please Enter the Vaild Quantity');
|
||||
return false;
|
||||
}
|
||||
// if (document.getElementById('Quantity').value == '') {
|
||||
// alert('Please Enter the Quantity');
|
||||
|
||||
// }
|
||||
|
||||
if ($("#drpMaterial option:selected").val() != '-1' && $('#Quantity').val() != '') {
|
||||
@ -986,7 +985,7 @@ if (!empty($ReqPOType)) {
|
||||
$('.EditClick').click(function() {
|
||||
var editqty = parseInt(document.getElementById('EditQuantity').value);
|
||||
if (isNaN(editqty) || editqty < 1) {
|
||||
alert('Please Enter the Quantity');
|
||||
alert('Please Enter the Vaild Quantity');
|
||||
return false;
|
||||
}
|
||||
// if (document.getElementById('EditQuantity').value == '') {
|
||||
|
||||
@ -593,12 +593,12 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
||||
</div>
|
||||
<div class="col-md-9" style="padding:0px;">
|
||||
<div class="col-md-4" id="insurancenum" style="display:none;">
|
||||
<label>Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5
|
||||
<label>Insurance No / Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5
|
||||
;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'insurancenumber', 'insurancenumber' => set_value('insurancenumber'), 'id' => 'insurancenumber', 'class' => 'form-control', 'required' => 'true');
|
||||
$data = array('name' => 'InsuranceNumber', 'InsuranceNumber' => set_value('InsuranceNumber'), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -671,7 +671,16 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
||||
<table class="table table-bordered" style="border:1px solid #333">
|
||||
<div align="right" style="padding-right:10px">
|
||||
<div align="right">
|
||||
<a data-toggle="modal" class="btn btn-success" data-dismiss="modal" onclick="openModal();">Add Line Item </a>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3 col-md-offset-7" align="right" style="padding:10px">
|
||||
<!-- <input type="checkbox" id="IsOpenOrder" name="IsOpenOrder" value="1"> IS THIS OPEN ORDER FORMAT -->
|
||||
</div>
|
||||
<div class="col-md-1" align="right">
|
||||
<a data-toggle="modal" class="btn btn-success" data-dismiss="modal" onclick="openModal();">Add Line Item </a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- <a data-toggle="modal" class="btn btn-success" data-dismiss="modal" onclick="openModal();">Add Line Item </a> -->
|
||||
|
||||
|
||||
|
||||
@ -2113,10 +2122,10 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
||||
var insure = $('#Insurance').val();
|
||||
if (insure == '1') {
|
||||
$('#insurancenum').show();
|
||||
$('#insurancenumber').val('Yes');
|
||||
$('#InsuranceNumber').val('Yes');
|
||||
} else {
|
||||
$('#insurancenum').hide();
|
||||
('#insurancenumber').val('');
|
||||
('#InsuranceNumber').val('');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
$advance=0;
|
||||
$SupEmail='';
|
||||
$supplierPAN='';
|
||||
$InsuranceNo='';
|
||||
$InsuranceNumber='';
|
||||
$InsuranceStatus='';
|
||||
$InsureOpt='';
|
||||
|
||||
@ -109,13 +109,13 @@
|
||||
if($PO->InsuranceStatus=='1')
|
||||
{
|
||||
$InsuranceStatus='YES';
|
||||
$InsuranceNo=$PO->InsuranceNumber;
|
||||
$InsuranceNumber=$PO->InsuranceNumber;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$InsuranceStatus='NO';
|
||||
$InsuranceNo='No';
|
||||
$InsuranceNumber='No';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -95,7 +95,7 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
|
||||
|
||||
|
||||
?>
|
||||
<input type="hidden" name="hiddenVaildUpto" id="hiddenVaildUpto"/>
|
||||
<input type="hidden" name="hiddenIsOpenOrder" id="hiddenIsOpenOrder"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
@ -437,14 +437,14 @@ function validate()
|
||||
{
|
||||
$("#po").val(obj.PONO);
|
||||
$("#Sup").val(obj.SupplierName);
|
||||
$("#hiddenVaildUpto").val(obj.VaildUpto);
|
||||
$("#hiddenIsOpenOrder").val(obj.IsOpenOrder);
|
||||
//$("#Add").val(obj.Address);
|
||||
$("#del").val(obj.DeliveryDate);
|
||||
//$("#ser").val(obj.ServiceDescription);
|
||||
status = obj.status;
|
||||
ostatus= obj.OGR_Status;
|
||||
formatted_PODate = obj.formatted_PODate;
|
||||
formatted_ValidUpto = obj.formatted_ValidUpto;
|
||||
formatted_IsOpenOrder = obj.formatted_IsOpenOrder;
|
||||
|
||||
|
||||
}
|
||||
@ -465,7 +465,6 @@ function validate()
|
||||
var j=0;
|
||||
var showTable = false;
|
||||
// var startDate = formatted_PODate ? new Date(formatted_PODate) : null;
|
||||
// var endDate = formatted_ValidUpto ? new Date(formatted_ValidUpto) : null;
|
||||
// var currentDate = new Date();
|
||||
|
||||
|
||||
@ -534,7 +533,7 @@ function validate()
|
||||
});
|
||||
|
||||
|
||||
if((status == '<?php echo IGR_CREATED ?>' || status == '<?php echo MRIR_CREATED ?>' || status == '<?php echo MRIR_APPROVED ?>') && ((hiddenVaildUpto === null || hiddenVaildUpto === "")) )
|
||||
if((status == '<?php echo IGR_CREATED ?>' || status == '<?php echo MRIR_CREATED ?>' || status == '<?php echo MRIR_APPROVED ?>') && ((hiddenIsOpenOrder === null || hiddenIsOpenOrder === "")) )
|
||||
{
|
||||
alert('The Order is completed!!');
|
||||
$("#IGRLink").hide();
|
||||
|
||||
@ -159,8 +159,7 @@
|
||||
$PaymentTerms = (!empty($POItem) && !empty($POItem[0]->PaymentTerms)) ? ($POItem[0]->PaymentTerms == 'Others' ? $POItem[0]->PaymentOtherDescription : $POItem[0]->PaymentTerms) : "";
|
||||
$purchaseorderDate = (!empty($POItem) && !empty($POItem[0]->PODate)) ? new DateTime($POItem[0]->PODate, new DateTimeZone('Asia/Kolkata')) : "";
|
||||
$poDate = $purchaseorderDate ? $purchaseorderDate->format('d-m-Y') : "-";
|
||||
$VaildUpto = (!empty($POItem) && !empty($POItem[0]->VaildUpto)) ? new DateTime($POItem[0]->VaildUpto, new DateTimeZone('Asia/Kolkata')) : "";
|
||||
$VaildUptoDate = $VaildUpto ? $VaildUpto->format('d-m-Y') : "";
|
||||
$IsOpenOrder = (!empty($POItem) && !empty($POItem[0]->IsOpenOrder)) ? $POItem[0]->IsOpenOrder : "";
|
||||
|
||||
if (!empty($POItem) && !empty($POItem[0]->DeliveryOption)) {
|
||||
if ($POItem[0]->DeliveryOption == 1) {
|
||||
@ -332,7 +331,7 @@
|
||||
<?php if ($postatus == PO_DRAFT) { ?>
|
||||
<p style="font-size:1.2em;"><b><?php _htmlsc("DRAFT"); ?></b></p>
|
||||
<?php } ?>
|
||||
<?php if ($VaildUptoDate) { ?>
|
||||
<?php if ($IsOpenOrder) { ?>
|
||||
<p style="font-size:1.2em;"><b><?php _htmlsc("OPEN ORDER"); ?></b></p>
|
||||
<?php } ?>
|
||||
</td>
|
||||
|
||||
@ -103,8 +103,8 @@ if (!empty($INRSYMBOL)) {
|
||||
clearTotalItemValues();
|
||||
if ($("#insurance").val() == 1) {
|
||||
|
||||
$("#insurancenodiv").show();
|
||||
$("#insuranceno").val('Yes');
|
||||
$("#InsuranceNumberdiv").show();
|
||||
$("#InsuranceNumber").val('Yes');
|
||||
|
||||
}
|
||||
});
|
||||
@ -2079,11 +2079,11 @@ if (!empty($INRSYMBOL)) {
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9" style="padding:0px;">
|
||||
<div class="col-md-4" id="insurancenodiv" style="display:block;">
|
||||
<label>Insurance No<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<div class="col-md-4" id="InsuranceNumberdiv" style="display:block;">
|
||||
<label>Insurance No / Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'insuranceno', 'insuranceno' => set_value('insuranceno'), 'id' => 'insuranceno', 'class' => 'form-control', 'required' => 'true');
|
||||
$data = array('name' => 'InsuranceNumber', 'InsuranceNumber' => set_value('InsuranceNumber'), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -2309,10 +2309,16 @@ if (!empty($INRSYMBOL)) {
|
||||
<div class="container-fluid">
|
||||
|
||||
<div align="right">
|
||||
<div align="right">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3 col-md-offset-7" align="right" style="padding:10px">
|
||||
<!-- <input type="checkbox" id="IsOpenOrder" name="IsOpenOrder" value="1"> IS THIS OPEN ORDER FORMAT -->
|
||||
</div>
|
||||
<div class="col-md-1" align="right">
|
||||
<a data-toggle="modal"><button type="submit" onclick="openModal();" class="btn btn-success" id="abcd">Select Line Item</button> </a>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Model for revenue po -->
|
||||
<div id="REVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="overflow-y:scroll !important">
|
||||
<div class="modal-dialog">
|
||||
@ -3248,11 +3254,11 @@ if (!empty($INRSYMBOL)) {
|
||||
var ans = $("#insurance").val();
|
||||
//alert(ans);
|
||||
if (ans == 0) {
|
||||
$("#insurancenodiv").hide();
|
||||
$("#insuranceno").val("");
|
||||
$("#InsuranceNumberdiv").hide();
|
||||
$("#InsuranceNumber").val("");
|
||||
} else {
|
||||
$("#insurancenodiv").show();
|
||||
$("#insuranceno").val('Yes');
|
||||
$("#InsuranceNumberdiv").show();
|
||||
$("#InsuranceNumber").val('Yes');
|
||||
}
|
||||
});
|
||||
|
||||
@ -3895,8 +3901,8 @@ if (!empty($INRSYMBOL)) {
|
||||
alert('Please Enter Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
} else if ($('#insurance').val() == 1 && $('#insuranceno').val() == '') {
|
||||
alert('Please Enter Insurance No..!');
|
||||
} else if ($('#insurance').val() == 1 && $('#InsuranceNumber').val() == '') {
|
||||
alert('Please Enter Insurance No / Insurance Details..!');
|
||||
$('#insurance').focus();
|
||||
return false;
|
||||
} else if ($('#PoTypeOptions').val() == "0") {
|
||||
|
||||
@ -698,7 +698,9 @@ if (!empty($Emp)) {
|
||||
}
|
||||
var qty = parseInt(document.getElementById('Quantity').value);
|
||||
if (isNaN(qty) || qty < 1) {
|
||||
alert('Please Enter the Quantity');
|
||||
// if (document.getElementById('Quantity').value == '') {
|
||||
|
||||
alert('Please Enter the Vaild Quantity');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -795,7 +797,8 @@ if (!empty($Emp)) {
|
||||
$('.EditClick').click(function() {
|
||||
var editqty = parseInt(document.getElementById('EditQuantity').value);
|
||||
if (isNaN(editqty) || editqty < 1) {
|
||||
alert('Please Enter the Quantity');
|
||||
// if (document.getElementById('EditQuantity').value == '') {
|
||||
alert('Please Enter the Vaild Quantity');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
$supRef = '';
|
||||
$finCap='';
|
||||
$modeofshipment='';
|
||||
$insuranceno='';
|
||||
$InsuranceNumber='';
|
||||
$companyWebsit='';
|
||||
$companyPan='';
|
||||
$companyEmail='';
|
||||
@ -93,10 +93,10 @@
|
||||
$PaymentTerms = $PO->PaymentTerms;
|
||||
|
||||
if($PO->InsuranceNumber==''){
|
||||
$insuranceno = 'No';
|
||||
$InsuranceNumber = 'No';
|
||||
}
|
||||
else{
|
||||
$insuranceno = $PO->InsuranceNumber;
|
||||
$InsuranceNumber = $PO->InsuranceNumber;
|
||||
}
|
||||
if($PaymentTerms=='Others'){
|
||||
$PaymentOtherDescription=$PO->PaymentOtherDescription;
|
||||
|
||||
@ -895,10 +895,10 @@ if (!empty($INRSYMBOL)) {
|
||||
<div class="col-md-9" style="padding:0px;">
|
||||
<div class="col-md-4" id="insuranceTxtDiv" style="display:block;">
|
||||
|
||||
<label>Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<label>Insurance No / Insurance Details<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'insuranceNo', 'value' => set_value('insuranceNo'), 'id' => 'insuranceNo', 'class' => 'form-control', 'required' => 'true');
|
||||
$data = array('name' => 'InsuranceNumber', 'value' => set_value('InsuranceNumber'), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -961,19 +961,6 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-2" id="VaildUptodiv" style="display:none;">
|
||||
<label>Valid upto <span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'VaildUpto', 'value' => set_value('VaildUpto', ''), 'id' => 'VaildUpto', 'class' => 'form-control', 'onkeypress'=>'return false;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div><!--End new fields 1 sep-->
|
||||
|
||||
@ -991,6 +978,7 @@ if (!empty($INRSYMBOL)) {
|
||||
<table class="table table-bordered" style="border:1px solid #333" id="ServiceTable">
|
||||
<div style="padding-right:10px">
|
||||
<div align="right">
|
||||
|
||||
<a data-toggle="modal"><button type="submit" onclick="openModal();" class="btn btn-success" id="abcd">Select Line Item</button> </a>
|
||||
|
||||
|
||||
@ -2541,11 +2529,11 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
if ($("#insuranceStatus").val() == "1") {
|
||||
$('#insuranceTxtDiv').show();
|
||||
$('#insuranceNo').val('Yes');
|
||||
$('#InsuranceNumber').val('Yes');
|
||||
|
||||
} else {
|
||||
$('#insuranceTxtDiv').hide();
|
||||
$('#insuranceNo').val('');
|
||||
$('#InsuranceNumber').val('');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@ -99,7 +99,14 @@
|
||||
<table class="table table-bordered" style="border:1px solid #333">
|
||||
<div align="right" style="padding-right:10px">
|
||||
<div align="right">
|
||||
<a data-toggle="modal" data-target="#myModal1"><button type="button" class="btn btn-success" data-dismiss="modal" >Add Line Item</button> </a>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3 col-md-offset-7" align="right" style="padding:10px">
|
||||
<!-- <input type="checkbox" id="IsOpenOrder" name="IsOpenOrder" value="1"> IS THIS OPEN ORDER FORMAT -->
|
||||
</div>
|
||||
<div class="col-md-1" align="right">
|
||||
<a data-toggle="modal" data-target="#myModal1"><button type="button" class="btn btn-success" data-dismiss="modal" >Add Line Item</button> </a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="myModal1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
@ -61,9 +61,9 @@ function validate()
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#insuranceStatus').val() == "1" && $('#insuranceNo').val().trim() == ''){
|
||||
alert('Please Enter the Insurance No');
|
||||
$('#insuranceNo').focus();
|
||||
else if($('#insuranceStatus').val() == "1" && $('#InsuranceNumber').val().trim() == ''){
|
||||
alert('Please Enter the Insurance No / Insurance Details');
|
||||
$('#InsuranceNumber').focus();
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@ -1,205 +0,0 @@
|
||||
/**
|
||||
/**
|
||||
* File : CreatePOValidation.js
|
||||
*
|
||||
* This file contain the validation of edit Create Po
|
||||
*
|
||||
* @author Gandhimathi
|
||||
*/
|
||||
$(document).ready(function(){
|
||||
|
||||
|
||||
|
||||
|
||||
//Initialize Select2 Elements
|
||||
$("#drpSupplier").select2();
|
||||
|
||||
|
||||
});
|
||||
function myFunction() {
|
||||
|
||||
if(validate())
|
||||
{
|
||||
var input = $('#POType').val();
|
||||
|
||||
$('#' + input).modal('show');
|
||||
}
|
||||
|
||||
}
|
||||
function validate()
|
||||
{
|
||||
var PoType = $('#POType').val();
|
||||
var currencyType = $('#currencytype').val();
|
||||
if($('#PODate').val() == '')
|
||||
{
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#drpSupplier').val() == "0")
|
||||
{
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#DeliveryAddr').val() == '')
|
||||
{
|
||||
alert('Please Enter the Delivery Address');
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#Deliverydt').val() == '' && $('#Scheduleby').val() == '')
|
||||
{
|
||||
alert('Please Enter the Delivery Date');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
}
|
||||
else if(PoType=='CAPITAL' && capitalType=='International'){
|
||||
|
||||
if(currencyType=='0'){
|
||||
alert('Please Select the Currency Type');
|
||||
$('#currencytype').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#ExchangeRt').val()==''){
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRt').focus();
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function validateRevenueTax()
|
||||
{
|
||||
if($('#ReqNo').val() == "0")
|
||||
{
|
||||
alert('Please select the Requisition Number');
|
||||
$('#ReqNo').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#CostCenter').val() == "0")
|
||||
{
|
||||
alert('Please select the Cost center');
|
||||
$('#CostCenter').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#MaterialCode').val() == "0")
|
||||
{
|
||||
alert('Please select the Material Code');
|
||||
$('#MaterialCode').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#Quantity').val() == '')
|
||||
{
|
||||
alert('Please Enter the Quantity value');
|
||||
$('#Quantity').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#Rate').val() == '')
|
||||
{
|
||||
alert('Please Enter the Rate of the Item');
|
||||
$('#Rate').focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function calculateTotalValue()
|
||||
{
|
||||
var Packaging = $('#txtAfterPackaging').val() == '' ? '0.00' : $('#txtAfterPackaging').val();
|
||||
var ExciseDuty = $('#txtAfterExciseDuty').val() == '' ? '0.00' : $('#txtAfterExciseDuty').val();
|
||||
var Vat = $('#txtAfterVat').val() == '' ? '0.00' : $('#txtAfterVat').val();
|
||||
var CST = $('#txtAfterCST').val() == '' ? '0.00' : $('#txtAfterCST').val();
|
||||
var GST = $('#txtAfterGST').val() == '' ? '0.00' : $('#txtAfterGST').val();
|
||||
var OtherTax = $('#txtAfterOtherTax').val() == '' ? '0.00' : $('#txtAfterOtherTax').val();
|
||||
var Freight = $('#txtAfterFreight').val() == '' ? '0.00' : $('#txtAfterFreight').val();
|
||||
var Insurance = $('#txtInsurance').val() == '' ? '0.00' : $('#txtInsurance').val();
|
||||
var Discount = $('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val();
|
||||
var BasicVal = $('#txtBasicValue').val() == '' ? '0.00' : $('#txtBasicValue').val();
|
||||
|
||||
var totvalue = ( parseFloat(BasicVal) + parseFloat(Packaging)+ parseFloat(ExciseDuty)+ parseFloat(Vat) + parseFloat(CST)+ parseFloat(GST) + parseFloat(OtherTax) + parseFloat(Freight) + parseFloat(Insurance)) - parseFloat(Discount);
|
||||
|
||||
var tot = parseFloat(totvalue).toFixed(2);
|
||||
|
||||
$('#txtTotalOrderValue').val(tot);
|
||||
|
||||
validateExceedLimit();
|
||||
ExceedQuantityCheck();
|
||||
}
|
||||
function calculateTaxValue()
|
||||
{
|
||||
var Packaging = $('#txtAfterPackaging').val() == '' ? '0.00' : $('#txtAfterPackaging').val();
|
||||
var ExciseDuty = $('#txtAfterExciseDuty').val() == '' ? '0.00' : $('#txtAfterExciseDuty').val();
|
||||
var Vat = $('#txtAfterVat').val() == '' ? '0.00' : $('#txtAfterVat').val();
|
||||
var CST = $('#txtAfterCST').val() == '' ? '0.00' : $('#txtAfterCST').val();
|
||||
var GST = $('#txtAfterGST').val() == '' ? '0.00' : $('#txtAfterGST').val();
|
||||
var OtherTax = $('#txtAfterOtherTax').val() == '' ? '0.00' : $('#txtAfterOtherTax').val();
|
||||
var Freight = $('#txtAfterFreight').val() == '' ? '0.00' : $('#txtAfterFreight').val();
|
||||
var Insurance = $('#txtInsurance').val() == '' ? '0.00' : $('#txtInsurance').val();
|
||||
var Discount = $('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val();
|
||||
|
||||
|
||||
var totvalue = ( parseFloat(Packaging)+ parseFloat(ExciseDuty)+ parseFloat(Vat) + parseFloat(CST)+ parseFloat(GST) + parseFloat(OtherTax) + parseFloat(Freight) + parseFloat(Insurance)) - parseFloat(Discount) ;
|
||||
|
||||
var tot = parseFloat(totvalue).toFixed(2);
|
||||
//alert('tot:'+tot);
|
||||
return tot;
|
||||
}
|
||||
|
||||
|
||||
function validateExceedLimit()
|
||||
{
|
||||
var avalbudAmt = parseFloat($('#AvlBudAmt').val());
|
||||
var basicAmountRate = parseFloat($('#txtBasicValue').val());
|
||||
var totalAmount = parseFloat($('#txtTotalOrderValue').val());
|
||||
|
||||
if(basicAmountRate > avalbudAmt || totalAmount > avalbudAmt)
|
||||
{
|
||||
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
$('#Rate').focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function isNumberKey(evt)
|
||||
{
|
||||
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
if (charCode != 46 && charCode > 31
|
||||
&& (charCode < 48 || charCode > 57))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
function change(){
|
||||
ExceedQuantityCheck();
|
||||
if($('#Quantity').val() != '' && $('#Rate').val() != '')
|
||||
{
|
||||
var txtQuantity = parseFloat( $('#Quantity').val());
|
||||
var txtUnitPrice = parseFloat($('#Rate').val());
|
||||
var Tot = txtQuantity * txtUnitPrice
|
||||
$('#txtBasicValue').val(Tot);
|
||||
calculateTotalValue();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user