service and revenue po /pdf changes done
This commit is contained in:
parent
b86ba943cf
commit
bea9ac7cf0
@ -281,7 +281,7 @@ class emergencypurchaseorder extends BaseController
|
||||
$DeletedRow = $this->input->post('TextDeletedRowCount');
|
||||
$RequestedBy = $this->session->userdata ('EmpID');
|
||||
$ReqStatus = REQITEM_Emergency_PO_CREATED;
|
||||
|
||||
$Local_Interstate=$this->input->post('Range');
|
||||
|
||||
$comma_separated = explode(':', $DeletedRow);
|
||||
|
||||
@ -302,7 +302,7 @@ class emergencypurchaseorder extends BaseController
|
||||
$RegNo = $Req[0]['ReqNo'];
|
||||
}
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType );
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate );
|
||||
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList);
|
||||
|
||||
@ -773,8 +773,9 @@ class emergencypurchaseorder extends BaseController
|
||||
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$createddt = $dt->format('Y-m-d H:i:s');
|
||||
$Local_Interstate=$this->input->post('Range');
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt );
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt ,'CapitalRange'=>$Local_Interstate );
|
||||
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList);
|
||||
|
||||
@ -890,9 +891,10 @@ class emergencypurchaseorder extends BaseController
|
||||
$comma_separated = explode(':', $DeletedRow);
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
$Local_Interstate=$this->input->post('Range');
|
||||
// PO Master
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt );
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'CapitalRange'=>$Local_Interstate );
|
||||
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||
|
||||
|
||||
@ -334,13 +334,12 @@ class purchaseorder extends BaseController
|
||||
$data['MaxPODate'] = $this->purchaseorder_model->getLastReleasedPODate();
|
||||
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
|
||||
$data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
|
||||
if($ReqType == SERVICE)
|
||||
if($ReqType == SERVICE)
|
||||
{
|
||||
|
||||
$data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderDetails($PONO);
|
||||
|
||||
// $data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||
$data['PaymentTerms']=$this->purchaseorder_model->getPaymentTermsDetails();
|
||||
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||
//$data['WorkStatus']=$this->purchaseorder_model->GetWorkStatus('C019');
|
||||
|
||||
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
|
||||
@ -352,7 +351,7 @@ class purchaseorder extends BaseController
|
||||
|
||||
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO);
|
||||
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||
//$data['WorkStatus']=$this->purchaseorder_model->GetWorkStatus('C019');
|
||||
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Revenue Purchase order form';
|
||||
$this->loadViews("editRevenuepurchaseorder", $this->global, $data, NULL);
|
||||
}
|
||||
@ -639,47 +638,35 @@ class purchaseorder extends BaseController
|
||||
}
|
||||
|
||||
//This used to Create Revenue Purchase Order
|
||||
//This used to Create Revenue Purchase Order
|
||||
|
||||
function addNewPurchaseOrder()
|
||||
{
|
||||
|
||||
|
||||
$POdt =$this->input->post('PODate');
|
||||
$PODate = $this->getDateformat($POdt);
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$DeliveryAddr = $this->input->post('DeliveryAddr');
|
||||
$dt = $this->input->post('Deliverydt');
|
||||
$POType = $this->input->post('POType');
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
if($DeliveryOption==1){
|
||||
$Deliverydt = '';
|
||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||
}
|
||||
else{
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
if($DeliveryOption==1){
|
||||
$Deliverydt = '';
|
||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||
}
|
||||
else{
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$PaymentDate=$this->input->post('Payment');
|
||||
if($PaymentDate==1)
|
||||
{
|
||||
$PaymentDays='After';
|
||||
}
|
||||
else
|
||||
{
|
||||
$PaymentDays='Before';
|
||||
}
|
||||
|
||||
$POType = $this->input->post('POType');
|
||||
$PoRange = $this->input->post('txtPoRange');
|
||||
|
||||
$SpcialInstruction = $this->input->post('txtSpcialInstruction');
|
||||
$SpcialInstruction = $this->input->post('SpcialInstruction');
|
||||
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
||||
$POStatus = $this->input->post('txtStatus');
|
||||
$POStatus = $this->input->post('txtStatus');
|
||||
|
||||
$CreateBy = $this->session->userdata ( 'userId' );
|
||||
$CreateBy = $this->session->userdata ( 'userId' );
|
||||
$RowCount = $this->input->post('txtRowCount');
|
||||
$DeletedRow = $this->input->post('txtDeletedRow');
|
||||
|
||||
@ -689,9 +676,9 @@ $DeliveryOption = $this->input->post('DateRange');
|
||||
$createddt = $dt->format('Y-m-d H:i:s');
|
||||
|
||||
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||
$Payableat=$this->input->post('PayableAT');
|
||||
$Local_Interstate=$this->input->post('Range');
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'PayableAT'=>$Payableat,'PaymentDays'=>$PaymentDays,'POType'=>$POType);
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate);
|
||||
|
||||
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList);
|
||||
@ -778,6 +765,7 @@ $DeliveryOption = $this->input->post('DateRange');
|
||||
//This used to Edit the Revenue Purchase Order
|
||||
function EditRevenuePurchaseOrder()
|
||||
{
|
||||
|
||||
$PONO =$this->input->post('txtPONO');
|
||||
$POdt =$this->input->post('PODate');
|
||||
$PODate = $this->getDateformat($POdt);
|
||||
@ -798,15 +786,6 @@ $DeliveryOption = $this->input->post('DateRange');
|
||||
|
||||
|
||||
|
||||
$PaymentDate=$this->input->post('Payment');
|
||||
if($PaymentDate==1)
|
||||
{
|
||||
$PaymentDays='After';
|
||||
}
|
||||
else
|
||||
{
|
||||
$PaymentDays='Before';
|
||||
}
|
||||
|
||||
$POType = $this->input->post('POType');
|
||||
$PoRange = $this->input->post('txtPoRange');
|
||||
@ -824,10 +803,10 @@ $DeliveryOption = $this->input->post('DateRange');
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
|
||||
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||
$Payableat=$this->input->post('PayableAT');
|
||||
$Local_Interstate=$this->input->post('Range');
|
||||
// PO Master
|
||||
// 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,'PayableAT'=>$Payableat,'PaymentDays'=>$PaymentDays);
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate);
|
||||
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||
|
||||
@ -851,19 +830,12 @@ $DeliveryOption = $this->input->post('DateRange');
|
||||
$PackagingType = $this->input->post('PackType'.$i);
|
||||
$PackagingValue = $this->input->post('PackVal'.$i);
|
||||
$AfterPackagingValue = $this->input->post('AfterPackVal'.$i);
|
||||
$ExciseOption = $this->input->post('ExciseOption'.$i);
|
||||
$ExciseValue = $this->input->post('ExciseVal'.$i);
|
||||
$AfterExciseValue = $this->input->post('AfterExciseVal'.$i);
|
||||
$VatOption = $this->input->post('VatOption'.$i);
|
||||
$VatValue = $this->input->post('VatVal'.$i);
|
||||
$AfterVatValue = $this->input->post('AfterVatVal'.$i);
|
||||
$CSTOption = $this->input->post('CSTOption'.$i);
|
||||
$CSTValue = $this->input->post('CSTVal'.$i);
|
||||
$AfterCSTValue = $this->input->post('AfterCSTVal'.$i);
|
||||
$GSTValue = $this->input->post('GSTVal'.$i);
|
||||
$AfterGSTValue = $this->input->post('AfterGSTVal'.$i);
|
||||
$OtherTaxValue = $this->input->post('OtherTaxVal'.$i);
|
||||
$AfterOtherTaxValue = $this->input->post('AfterOtherTaxVal'.$i);
|
||||
$Cgst = $this->input->post('RevenueCgst'.$i);
|
||||
$Sgst = $this->input->post('RevenueSgst'.$i);
|
||||
$Igst = $this->input->post('RevenueIgst'.$i);
|
||||
$AfterCgst = $this->input->post('RevenueAfterCgst'.$i);
|
||||
$AfterSgst = $this->input->post('RevenueAfterSgst'.$i);
|
||||
$AfterIgst = $this->input->post('RevenueAfterIgst'.$i);
|
||||
$FreightType = $this->input->post('FreightType'.$i);
|
||||
$FreightValue = $this->input->post('FreightVal'.$i);
|
||||
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
|
||||
@ -912,14 +884,14 @@ $DeliveryOption = $this->input->post('DateRange');
|
||||
$isExists = $this->purchaseorder_model->LineItemExistsinRevenueTax($LineItemNo);
|
||||
if(count($isExists) == 0)
|
||||
{
|
||||
$RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'ExciseDuty'=>$ExciseValue,'ExciseDutyCalulatedOn'=>$ExciseOption,'AfterExciseDuty'=>$AfterExciseValue,'Vat'=>$VatValue,'AfterVAT'=>$AfterVatValue,'VatCalulatedOn'=>$VatOption, 'CST'=>$CSTValue,'AfterCST'=>$AfterCSTValue,'CSTCalulatedOn'=>$CSTOption,'GST'=>$GSTValue,'AfterGST'=>$AfterGSTValue,'OtherTaxes'=>$OtherTaxValue,'AfterOtherTaxes'=>$AfterOtherTaxValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt);
|
||||
$RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CGST'=>$Cgst,'AfterCGST'=>$AfterCgst,'SGST'=>$Sgst,'AfterSGST'=>$AfterSgst,'IGST'=>$Igst,'AfterIGST'=>$AfterIgst);
|
||||
|
||||
$RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$RevenueTaxList = array('DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'ExciseDuty'=>$ExciseValue,'ExciseDutyCalulatedOn'=>$ExciseOption,'AfterExciseDuty'=>$AfterExciseValue,'Vat'=>$VatValue,'AfterVAT'=>$AfterVatValue,'VatCalulatedOn'=>$VatOption, 'CST'=>$CSTValue,'AfterCST'=>$AfterCSTValue,'CSTCalulatedOn'=>$CSTOption,'GST'=>$GSTValue,'AfterGST'=>$AfterGSTValue,'OtherTaxes'=>$OtherTaxValue,'AfterOtherTaxes'=>$AfterOtherTaxValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
$RevenueTaxList = array('DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'CGST'=>$Cgst,'AfterCGST'=>$AfterCgst,'SGST'=>$Sgst,'AfterSGST'=>$AfterSgst,'IGST'=>$Igst,'AfterIGST'=>$AfterIgst,'CreatedBy'=>$updatedBy);
|
||||
|
||||
$this->purchaseorder_model->updateRevenueTax($LineItemNo,$RevenueTaxList);
|
||||
|
||||
|
||||
@ -142,7 +142,7 @@ class servicepurchaseorder extends BaseController
|
||||
}
|
||||
|
||||
//This used to Create Service Purchase Order
|
||||
//This used to Create Service Purchase Order
|
||||
|
||||
function addNewServicePurchaseOrder()
|
||||
{
|
||||
|
||||
@ -350,11 +350,14 @@ class servicepurchaseorder extends BaseController
|
||||
{
|
||||
if(strlen($POLineItemNo) == 0)
|
||||
{
|
||||
|
||||
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency,'ServiceMaterialDescription'=>$ItemDescription);
|
||||
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
if(count($POLineItem)>0)
|
||||
{
|
||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -570,7 +570,7 @@ function purchaseorderListing($forwhat='')
|
||||
function GetServicePurchaseOrderDetails($PONO = '')
|
||||
{
|
||||
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,Quantity,ReceivedQuantity,Rate,LineItem.Status,ROUND((Quantity *Rate),2 ) as BasicValue ,ROUND((After_CGST + After_SGST + After_IGST),2)as Taxamount
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,Quantity,ReceivedQuantity,Rate,LineItem.Status,(Quantity *Rate) as BasicValue ,(After_CGST + After_SGST + After_IGST) as Taxamount
|
||||
,TotalValue,CGST,After_CGST,SGST,After_SGST,IGST,After_IGST,otherallowance,LineItem.CostCenterCode,LineItem.ServiceFrequency,LineItem.ServiceMaterialDescription,Req.Schedule_Type,Req.NumberOfService,Req.Service_Period
|
||||
FROM T_PurchaseOrder_LineItem LineItem
|
||||
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
@ -589,7 +589,7 @@ function purchaseorderListing($forwhat='')
|
||||
{
|
||||
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,LineItem.ServiceMaterialDescription,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,
|
||||
LineItem.Quantity,LineItem.Rate,ROUND((LineItem.Quantity *LineItem.Rate),2 ) as BasicValue ,ROUND((After_CGST + After_SGST + After_IGST),2)as Taxamount
|
||||
LineItem.Quantity,LineItem.Rate,(LineItem.Quantity *LineItem.Rate) as BasicValue ,(After_CGST + After_SGST + After_IGST) as Taxamount
|
||||
,TotalValue,After_CGST,After_SGST,After_IGST,otherallowance,LineItem.CostCenterCode,sup.SupplierName,sup.Address,POMaster.DeliveryAddress,POMaster.DeliveryDate,POMaster.Status,POMaster.PODate,POMaster.PONO,POMaster.ServiceDescription,ReqMat.NumberOfService,ReqMat.Service_Period,ReqMat.Schedule_Type,Payment.PaymentID,Payment.PaymentTerms FROM
|
||||
T_PurchaseOrder_LineItem LineItem
|
||||
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
@ -634,9 +634,9 @@ function purchaseorderListing($forwhat='')
|
||||
function GetRevenuePurchaseOrderDetails($PONO = '')
|
||||
{
|
||||
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,Quantity,Rate,Req.Status,ROUND((Quantity *Rate),2 ) as BasicValue , ROUND(((AfterPackagingValue + AfterFreightValue + AfterSGST + AfterCGST +
|
||||
AfterIGST + Insurance)) ,2)as Taxamount ,TotalValue,Tax.*,Req.CostCenterCode,Dept.DepartmentName
|
||||
FROM T_PurchaseOrder_LineItem LineItem
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,Quantity,ReceivedQuantity,Rate,Req.Status,(Quantity *Rate) as BasicValue , ((AfterPackagingValue + AfterFreightValue + AfterSGST + AfterCGST +
|
||||
AfterIGST + Insurance - AfterDiscount)) as Taxamount ,TotalValue,Tax.*,Req.CostCenterCode,Dept.DepartmentName
|
||||
FROM T_PurchaseOrder_LineItem LineItem
|
||||
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
join T_Revenue_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo
|
||||
join T_Requestion_Master Req on Req.ReqNo = LineItem.ReqNo
|
||||
@ -656,15 +656,17 @@ function purchaseorderListing($forwhat='')
|
||||
{
|
||||
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName,
|
||||
Mat.UOM,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue ,
|
||||
ROUND(((AfterPackagingValue + AfterFreightValue + AfterSGST + AfterCGST +
|
||||
AfterIGST + Insurance)) ,2)as Taxamount ,
|
||||
TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address
|
||||
Mat.UOM,Quantity,Rate,(Quantity *Rate) as BasicValue ,
|
||||
(AfterPackagingValue + AfterFreightValue + AfterSGST + AfterCGST +
|
||||
AfterIGST + Insurance - AfterDiscount) as Taxamount,
|
||||
TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address,Payment.PaymentID,Payment.PaymentTerms
|
||||
FROM T_PurchaseOrder_LineItem LineItem
|
||||
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
join T_Revenue_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo
|
||||
join T_PurchaseOrder_Master POMaster on POMaster.PONO = LineItem.PONO
|
||||
join T_SupplierDetailsN sup on sup.SupplierID = POMaster.SupplierID
|
||||
|
||||
join T_PaymentTerms Payment on Payment.PaymentID = POMaster.PaymentTerms
|
||||
where LineItem.PONO =?';
|
||||
|
||||
$query = $this->db->query($subQuery,array($PONO));
|
||||
|
||||
@ -55,7 +55,7 @@ if(!empty($POMaster))
|
||||
$pdt = new DateTime($Req->PODate);
|
||||
$PODate = $pdt->format('Y-m-d');
|
||||
$DeliverOption = $Req->DeliveryOption;
|
||||
$DeliverSchedule = $Req->DeliverySchedule;
|
||||
$DeliverSchedule = $Req->DeliverySchedule;
|
||||
$Ddt = new DateTime($Req->DeliveryDate);
|
||||
$Deliverydt = $Ddt->format('Y-m-d');
|
||||
|
||||
@ -63,7 +63,7 @@ if(!empty($POMaster))
|
||||
$PONOStatus = $Req->StatusCode;
|
||||
$PONO = $Req->PONO;
|
||||
$ServiceDescription = $Req->ServiceDescription;
|
||||
//Terms=$Req->PaymentTerms;
|
||||
|
||||
|
||||
$WrkStatus=$Req->ServiceWorkStatus;
|
||||
$StatusName=$Req->StatusName;
|
||||
@ -108,8 +108,20 @@ foreach ($PaymentTerms as $TER)
|
||||
// }
|
||||
?>
|
||||
|
||||
<script src="<?php echo base_url(); ?>assets/js/CreatePOValidation.js" type="text/javascript"></script>
|
||||
|
||||
<script src="<?php echo base_url()?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets/js/CreatePOValidation.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
tinymce.init({
|
||||
selector: "textarea#ScopeOfWork",
|
||||
|
||||
//plugins: "link image"
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
var DelOpt = '<?php echo $DeliverOption; ?>';
|
||||
var SchName = '<?php echo $DeliverSchedule; ?>';
|
||||
@ -674,6 +686,7 @@ $(document).ready(function () {
|
||||
echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
|
||||
|
||||
<section class="content">
|
||||
<div id="content"></div>
|
||||
<div style="border:2px solid #333">
|
||||
<div id="content"></div>
|
||||
<div><center><b><h2>Siddharth Industries - Edit Service Purchase Order - <?php echo $PONO;?></h2></b></center></div>
|
||||
@ -961,10 +974,10 @@ $(document).ready(function () {
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>Service Description </label> <?php
|
||||
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control');
|
||||
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction'),'id'=>'txtSpcialInstruction', 'class' => 'form-control');
|
||||
echo form_input($data);
|
||||
?>
|
||||
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value="<?php echo $ServiceDescription;?>">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -1410,6 +1423,271 @@ $(document).ready(function () {
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
<!-- View Modal content-->
|
||||
<div class="modal fade" id="VIEWSERVICE" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:900px;">
|
||||
<div class="modal-header" style="background-color: #3c8dbc;color:#fff;">
|
||||
<center><h4>View Service Purchase Order Item </h4></center>
|
||||
</div>
|
||||
<div align="left">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Req No</label>
|
||||
<div>
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'ViewReqNo','value' => set_value('ViewReqNo'),'id'=>'ViewReqNo', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Department Name</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewdeptName','value' => set_value('ViewdeptName'),'id'=>'ViewdeptName', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Cost Center Name</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewCostCenter','value' => set_value('ViewCostCenter'),'id'=>'ViewCostCenter', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-md-3">
|
||||
<label>Avail Budget Amount In INR</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewAvlBudAmt','value' => set_value('ViewAvlBudAmt'),'id'=>'ViewAvlBudAmt', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Item Code</label>
|
||||
<div>
|
||||
<?php
|
||||
//$options = array("0"=>'Item Code');
|
||||
//print_r( $options);
|
||||
|
||||
echo form_dropdown('ViewMaterialCode', $options,set_value('ViewMaterialCode'),'id="ViewMaterialCode"' ,'class="form-control"');
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Item Name</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewItemName','value' => set_value('ViewItemName'),'id'=>'ViewItemName', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>Service Description</label> <?php
|
||||
$data = array('name' => 'ViewtxtSpcialInstruction','value' => set_value('ViewtxtSpcialInstruction'),'id'=>'ViewtxtSpcialInstruction', 'class' => 'form-control','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-2">
|
||||
<label>UOM</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewUOM','value' => set_value('ViewUOM'),'id'=>'ViewUOM', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label>Frequency</label>
|
||||
<div>
|
||||
<?php
|
||||
$data = array('name' => 'ViewFrequency','value' => set_value('ViewFrequency'),'id'=>'ViewFrequency', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewQuantity','value' => set_value('ViewQuantity'),'id'=>'ViewQuantity', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label><?php echo "Rate ($INRSYM)";?></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewRate','value' => set_value('ViewRate'),'id'=>'ViewRate', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);' ,'readonly' => 'true' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label><?php echo "Basic Amount ($INRSYM)";?></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'txtViewBasicValue','value' => set_value('txtViewBasicValue'),'id'=>'txtViewBasicValue', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6" align="right">
|
||||
|
||||
CGST In %
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'ViewCgst','value' => set_value('ViewCgst'),'id'=>'ViewCgst', 'class' => 'form-control num' ,'placeholder' => 'CGST TAX PERCENTAGE','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'ViewAfterCgst','value' => set_value('ViewAfterCgst'),'id'=>'ViewAfterCgst', 'class' => 'form-control num' ,'placeholder' => 'After CGST','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6" align="right">
|
||||
|
||||
SGST In %
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'ViewSgst','value' => set_value('ViewSgst'),'id'=>'ViewSgst', 'class' => 'form-control num' ,'placeholder' => 'SGST TAX PERCENTAGE','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'ViewAfterSgst','value' => set_value('ViewAfterSgst'),'id'=>'ViewAfterSgst', 'class' => 'form-control num' ,'placeholder' => 'After SGST','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6" align="right">
|
||||
|
||||
IGST In %
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'ViewIgst','value' => set_value('ViewIgst'),'id'=>'ViewIgst', 'class' => 'form-control num' ,'placeholder' => 'IGST TAX PERCENTAGE','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'ViewAfterIgst','value' => set_value('ViewAfterIgst'),'id'=>'ViewAfterIgst', 'class' => 'form-control num' ,'placeholder' => 'After IGST','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-5 col-md-offset-4" align="right">
|
||||
<label>Other Allowances In INR</label>>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewOtherAllowances','value' => set_value('ViewOtherAllowances'),'id'=>'ViewOtherAllowances', 'class' => 'form-control num','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-5 col-md-offset-4" align="right">
|
||||
<label><?php echo "Total Order Value ($INRSYM)";?></label>>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewTotalOrderValue','value' => set_value('ViewTotalOrderValue'),'id'=>'ViewTotalOrderValue', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="col-md-12">
|
||||
|
||||
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
<div class="box-body" style="margin-top: -2%;">
|
||||
<table id="ServiceTable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
@ -1503,7 +1781,7 @@ $(document).ready(function () {
|
||||
<td> <a data-target='#EDITSERVICE' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#EDITSERVICE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> <a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
|
||||
<?php
|
||||
} else {?>
|
||||
<td> <a data-toggle="tooltip" href="#"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requistion details"></i> </a> </td>
|
||||
<td> <a data-target='#VIEWSERVICE' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#VIEWSERVICE"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requistion details"></i> </a> </td>
|
||||
<?php
|
||||
}?>
|
||||
</tr>
|
||||
@ -1587,7 +1865,7 @@ $(document).ready(function () {
|
||||
<label>Scope Of Work</label> <?php
|
||||
$data = array('name' => 'ScopeofWork','value' => set_value('ScopeofWork',$ServiceDescription),'id'=>'ScopeofWork', 'class' => 'form-control', 'rows' => '10', 'cols' => '40' );
|
||||
echo form_textarea($data);
|
||||
?> <input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value="<?php echo $ServiceDescription;?>">
|
||||
?>
|
||||
</div>
|
||||
<!-- <div class="col-md-12">
|
||||
<label>Special Instructions :</label> <?php
|
||||
@ -1607,7 +1885,7 @@ $(document).ready(function () {
|
||||
<a class="btn btn-primary Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||
<input type="reset" class="btn btn-primary" value="Reset">
|
||||
<?php }else {?>
|
||||
<input type="reset" class="btn btn-primary" value = "OK"> <?php } ?>
|
||||
<a class="btn btn-primary" ID="OK" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">OK</span></a> <?php } ?>
|
||||
</div><br/>
|
||||
</div>
|
||||
</div>
|
||||
@ -1773,6 +2051,95 @@ $("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
$("#VIEWSERVICE").on("shown.bs.modal", function(e) {
|
||||
|
||||
userid = $(e.relatedTarget).data('userid');
|
||||
|
||||
var tr= document.getElementById(userid);
|
||||
var cellval = tr.cells;
|
||||
var id= $('#Reqnumber'+userid).val();
|
||||
|
||||
$('#ViewReqNo').val($('#Reqnumber'+userid).val());
|
||||
$('#ViewdeptName').val($('#departmentName'+userid).val());
|
||||
$("#ViewCostCenter").val($('#costCode'+userid).val());
|
||||
//$('#ViewAvlBudAmt').val($('#AvilBudget'+userid).val());
|
||||
|
||||
$('#ViewItemName').val($('#materialName'+userid).val());
|
||||
$('#ViewUOM').val($('#uom'+userid).val());
|
||||
$('#ViewQuantity').val($('#quantity'+userid).val());
|
||||
RequistQuantity = $('#quantity'+userid).val();
|
||||
$('#ViewRate').val($('#itemRate'+userid).val());
|
||||
$('#txtViewBasicValue').val(cellval[7].innerHTML);
|
||||
$('#ViewCgst').val($('#Cgst'+userid).val());
|
||||
$('#ViewSgst').val($('#Sgst'+userid).val());
|
||||
$('#ViewIgst').val($('#Igst'+userid).val());
|
||||
$('#ViewAfterCgst').val($('#AfterCgst'+userid).val());
|
||||
$('#ViewAfterSgst').val($('#AfterSgst'+userid).val());
|
||||
$('#ViewAfterIgst').val($('#AfterIgst'+userid).val());
|
||||
if($('#FrequencyValue'+userid).val()==1){
|
||||
$('#ViewFrequency').val($('#Frequency'+userid).val());
|
||||
$("#ViewFrequencyNo").val(1);
|
||||
}
|
||||
else{
|
||||
$('#ViewFrequency').val($('#Frequency'+userid).val()+'-'+$('#FrequencyNo'+userid).val());
|
||||
$("#ViewFrequencyNo").val($('#FrequencyValue'+userid).val());
|
||||
}
|
||||
|
||||
$('#ViewTotalOrderValue').val(cellval[9].innerHTML);
|
||||
$('#ViewOtherAllowances').val($('#OtherAmt'+userid).val());
|
||||
$('#ViewtxtSpcialInstruction').val($('#ItemDescription'+userid).val());
|
||||
RequistQuantity = $('#quantity'+userid).val();
|
||||
|
||||
|
||||
|
||||
$("#ViewMaterialCode").empty();
|
||||
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
||||
// For Binding Material list center for the selected Requistion Number
|
||||
|
||||
$("#ViewMaterialCode").append( $('<option></option>').val($('#materialCode'+userid).val()).html($('#materialCode'+userid).val() + "-" + $('#materialName'+userid).val() ) );
|
||||
|
||||
var isAdded = "0";
|
||||
for(i=0;i<Material.length;i++)
|
||||
{
|
||||
$.each(Material[i], function(idx, obj) {
|
||||
|
||||
if(obj.ReqNo === id )
|
||||
{
|
||||
|
||||
$.each(SelectedMaterialList.Mat, function(idx1, el){
|
||||
if (id == el.ReqNo )
|
||||
{
|
||||
|
||||
if(el.materialCode == obj.MaterialCode)
|
||||
{
|
||||
|
||||
isAdded = "1";
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
isAdded = "0";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
if(isAdded == "0")
|
||||
{
|
||||
|
||||
//$("#ViewMaterialCode").append( $('<option></option>').val(obj.MaterialCode).html(obj.MaterialCode + "-" + obj.MaterialName));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('.AddService').click(function(){
|
||||
@ -1854,7 +2221,8 @@ $('.AddService').click(function(){
|
||||
addHidden(theForm,"FrequencyValue"+temp,FrequencyValue);
|
||||
addHidden(theForm,"ItemDescription"+temp,ServiceDescription);
|
||||
addHidden(theForm,"OtherAmt"+temp,OtherAmt);
|
||||
addHidden(theForm,"TotalOrderValue"+temp,TotalOrderValue);
|
||||
addHidden(theForm,"TotalOrderValue"+temp,TotalOrderValue);
|
||||
addHidden(theForm,"LineItemNo"+temp,'');
|
||||
|
||||
$('#txtRowCount').val(temp);
|
||||
clearServiceModalFields();
|
||||
@ -2324,8 +2692,9 @@ var splinstr = $('#txtSpcialInstruction').val();
|
||||
var deladd = $('#DeliveryAddr').val();
|
||||
$('#txtStatus').val(stat);
|
||||
|
||||
|
||||
$('#SpcialInstruction').val(splinstr);
|
||||
tinyMCE.triggerSave();
|
||||
var splinstr = $('#ScopeOfWork').val();
|
||||
$('#ScopeOfWork').val(splinstr);
|
||||
$('#txtDeliveryAddress').val(deladd);
|
||||
|
||||
if(validate())
|
||||
|
||||
@ -55,7 +55,7 @@ if(!empty($POMaster))
|
||||
$pdt = new DateTime($Req->PODate);
|
||||
$PODate = $pdt->format('Y-m-d');
|
||||
$DeliverOption = $Req->DeliveryOption;
|
||||
$DeliverSchedule = $Req->DeliverySchedule;
|
||||
$DeliverSchedule = $Req->DeliverySchedule;
|
||||
$Ddt = new DateTime($Req->DeliveryDate);
|
||||
$Deliverydt = $Ddt->format('Y-m-d');
|
||||
|
||||
@ -63,7 +63,7 @@ if(!empty($POMaster))
|
||||
$PONOStatus = $Req->StatusCode;
|
||||
$PONO = $Req->PONO;
|
||||
$ServiceDescription = $Req->ServiceDescription;
|
||||
//Terms=$Req->PaymentTerms;
|
||||
|
||||
|
||||
$WrkStatus=$Req->ServiceWorkStatus;
|
||||
$StatusName=$Req->StatusName;
|
||||
@ -108,8 +108,20 @@ foreach ($PaymentTerms as $TER)
|
||||
// }
|
||||
?>
|
||||
|
||||
<script src="<?php echo base_url(); ?>assets/js/CreatePOValidation.js" type="text/javascript"></script>
|
||||
|
||||
<script src="<?php echo base_url()?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets/js/CreatePOValidation.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
tinymce.init({
|
||||
selector: "textarea#ScopeOfWork",
|
||||
|
||||
//plugins: "link image"
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
var DelOpt = '<?php echo $DeliverOption; ?>';
|
||||
var SchName = '<?php echo $DeliverSchedule; ?>';
|
||||
@ -674,6 +686,7 @@ $(document).ready(function () {
|
||||
echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
|
||||
|
||||
<section class="content">
|
||||
<div id="content"></div>
|
||||
<div style="border:2px solid #333">
|
||||
<div id="content"></div>
|
||||
<div><center><b><h2>Siddharth Industries - Edit Service Purchase Order - <?php echo $PONO;?></h2></b></center></div>
|
||||
@ -961,10 +974,10 @@ $(document).ready(function () {
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>Service Description </label> <?php
|
||||
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control');
|
||||
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction'),'id'=>'txtSpcialInstruction', 'class' => 'form-control');
|
||||
echo form_input($data);
|
||||
?>
|
||||
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value="<?php echo $ServiceDescription;?>">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -1410,6 +1423,271 @@ $(document).ready(function () {
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
<!-- View Modal content-->
|
||||
<div class="modal fade" id="VIEWSERVICE" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:900px;">
|
||||
<div class="modal-header" style="background-color: #3c8dbc;color:#fff;">
|
||||
<center><h4>View Service Purchase Order Item </h4></center>
|
||||
</div>
|
||||
<div align="left">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Req No</label>
|
||||
<div>
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'ViewReqNo','value' => set_value('ViewReqNo'),'id'=>'ViewReqNo', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Department Name</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewdeptName','value' => set_value('ViewdeptName'),'id'=>'ViewdeptName', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Cost Center Name</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewCostCenter','value' => set_value('ViewCostCenter'),'id'=>'ViewCostCenter', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-md-3">
|
||||
<label>Avail Budget Amount In INR</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewAvlBudAmt','value' => set_value('ViewAvlBudAmt'),'id'=>'ViewAvlBudAmt', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Item Code</label>
|
||||
<div>
|
||||
<?php
|
||||
//$options = array("0"=>'Item Code');
|
||||
//print_r( $options);
|
||||
|
||||
echo form_dropdown('ViewMaterialCode', $options,set_value('ViewMaterialCode'),'id="ViewMaterialCode"' ,'class="form-control"');
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Item Name</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewItemName','value' => set_value('ViewItemName'),'id'=>'ViewItemName', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>Service Description</label> <?php
|
||||
$data = array('name' => 'ViewtxtSpcialInstruction','value' => set_value('ViewtxtSpcialInstruction'),'id'=>'ViewtxtSpcialInstruction', 'class' => 'form-control','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-2">
|
||||
<label>UOM</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewUOM','value' => set_value('ViewUOM'),'id'=>'ViewUOM', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label>Frequency</label>
|
||||
<div>
|
||||
<?php
|
||||
$data = array('name' => 'ViewFrequency','value' => set_value('ViewFrequency'),'id'=>'ViewFrequency', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewQuantity','value' => set_value('ViewQuantity'),'id'=>'ViewQuantity', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label><?php echo "Rate ($INRSYM)";?></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewRate','value' => set_value('ViewRate'),'id'=>'ViewRate', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);' ,'readonly' => 'true' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label><?php echo "Basic Amount ($INRSYM)";?></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'txtViewBasicValue','value' => set_value('txtViewBasicValue'),'id'=>'txtViewBasicValue', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6" align="right">
|
||||
|
||||
CGST In %
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'ViewCgst','value' => set_value('ViewCgst'),'id'=>'ViewCgst', 'class' => 'form-control num' ,'placeholder' => 'CGST TAX PERCENTAGE','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'ViewAfterCgst','value' => set_value('ViewAfterCgst'),'id'=>'ViewAfterCgst', 'class' => 'form-control num' ,'placeholder' => 'After CGST','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6" align="right">
|
||||
|
||||
SGST In %
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'ViewSgst','value' => set_value('ViewSgst'),'id'=>'ViewSgst', 'class' => 'form-control num' ,'placeholder' => 'SGST TAX PERCENTAGE','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'ViewAfterSgst','value' => set_value('ViewAfterSgst'),'id'=>'ViewAfterSgst', 'class' => 'form-control num' ,'placeholder' => 'After SGST','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6" align="right">
|
||||
|
||||
IGST In %
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'ViewIgst','value' => set_value('ViewIgst'),'id'=>'ViewIgst', 'class' => 'form-control num' ,'placeholder' => 'IGST TAX PERCENTAGE','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'ViewAfterIgst','value' => set_value('ViewAfterIgst'),'id'=>'ViewAfterIgst', 'class' => 'form-control num' ,'placeholder' => 'After IGST','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-5 col-md-offset-4" align="right">
|
||||
<label>Other Allowances In INR</label>>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewOtherAllowances','value' => set_value('ViewOtherAllowances'),'id'=>'ViewOtherAllowances', 'class' => 'form-control num','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-5 col-md-offset-4" align="right">
|
||||
<label><?php echo "Total Order Value ($INRSYM)";?></label>>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewTotalOrderValue','value' => set_value('ViewTotalOrderValue'),'id'=>'ViewTotalOrderValue', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="col-md-12">
|
||||
|
||||
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
<div class="box-body" style="margin-top: -2%;">
|
||||
<table id="ServiceTable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
@ -1503,7 +1781,7 @@ $(document).ready(function () {
|
||||
<td> <a data-target='#EDITSERVICE' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#EDITSERVICE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> <a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
|
||||
<?php
|
||||
} else {?>
|
||||
<td> <a data-toggle="tooltip" href="#"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requistion details"></i> </a> </td>
|
||||
<td> <a data-target='#VIEWSERVICE' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#VIEWSERVICE"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requistion details"></i> </a> </td>
|
||||
<?php
|
||||
}?>
|
||||
</tr>
|
||||
@ -1587,7 +1865,7 @@ $(document).ready(function () {
|
||||
<label>Scope Of Work</label> <?php
|
||||
$data = array('name' => 'ScopeofWork','value' => set_value('ScopeofWork',$ServiceDescription),'id'=>'ScopeofWork', 'class' => 'form-control', 'rows' => '10', 'cols' => '40' );
|
||||
echo form_textarea($data);
|
||||
?> <input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value="<?php echo $ServiceDescription;?>">
|
||||
?>
|
||||
</div>
|
||||
<!-- <div class="col-md-12">
|
||||
<label>Special Instructions :</label> <?php
|
||||
@ -1607,7 +1885,7 @@ $(document).ready(function () {
|
||||
<a class="btn btn-primary Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||
<input type="reset" class="btn btn-primary" value="Reset">
|
||||
<?php }else {?>
|
||||
<input type="reset" class="btn btn-primary" value = "OK"> <?php } ?>
|
||||
<a class="btn btn-primary" ID="OK" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">OK</span></a> <?php } ?>
|
||||
</div><br/>
|
||||
</div>
|
||||
</div>
|
||||
@ -1773,6 +2051,95 @@ $("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
$("#VIEWSERVICE").on("shown.bs.modal", function(e) {
|
||||
|
||||
userid = $(e.relatedTarget).data('userid');
|
||||
|
||||
var tr= document.getElementById(userid);
|
||||
var cellval = tr.cells;
|
||||
var id= $('#Reqnumber'+userid).val();
|
||||
|
||||
$('#ViewReqNo').val($('#Reqnumber'+userid).val());
|
||||
$('#ViewdeptName').val($('#departmentName'+userid).val());
|
||||
$("#ViewCostCenter").val($('#costCode'+userid).val());
|
||||
//$('#ViewAvlBudAmt').val($('#AvilBudget'+userid).val());
|
||||
|
||||
$('#ViewItemName').val($('#materialName'+userid).val());
|
||||
$('#ViewUOM').val($('#uom'+userid).val());
|
||||
$('#ViewQuantity').val($('#quantity'+userid).val());
|
||||
RequistQuantity = $('#quantity'+userid).val();
|
||||
$('#ViewRate').val($('#itemRate'+userid).val());
|
||||
$('#txtViewBasicValue').val(cellval[7].innerHTML);
|
||||
$('#ViewCgst').val($('#Cgst'+userid).val());
|
||||
$('#ViewSgst').val($('#Sgst'+userid).val());
|
||||
$('#ViewIgst').val($('#Igst'+userid).val());
|
||||
$('#ViewAfterCgst').val($('#AfterCgst'+userid).val());
|
||||
$('#ViewAfterSgst').val($('#AfterSgst'+userid).val());
|
||||
$('#ViewAfterIgst').val($('#AfterIgst'+userid).val());
|
||||
if($('#FrequencyValue'+userid).val()==1){
|
||||
$('#ViewFrequency').val($('#Frequency'+userid).val());
|
||||
$("#ViewFrequencyNo").val(1);
|
||||
}
|
||||
else{
|
||||
$('#ViewFrequency').val($('#Frequency'+userid).val()+'-'+$('#FrequencyNo'+userid).val());
|
||||
$("#ViewFrequencyNo").val($('#FrequencyValue'+userid).val());
|
||||
}
|
||||
|
||||
$('#ViewTotalOrderValue').val(cellval[9].innerHTML);
|
||||
$('#ViewOtherAllowances').val($('#OtherAmt'+userid).val());
|
||||
$('#ViewtxtSpcialInstruction').val($('#ItemDescription'+userid).val());
|
||||
RequistQuantity = $('#quantity'+userid).val();
|
||||
|
||||
|
||||
|
||||
$("#ViewMaterialCode").empty();
|
||||
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
||||
// For Binding Material list center for the selected Requistion Number
|
||||
|
||||
$("#ViewMaterialCode").append( $('<option></option>').val($('#materialCode'+userid).val()).html($('#materialCode'+userid).val() + "-" + $('#materialName'+userid).val() ) );
|
||||
|
||||
var isAdded = "0";
|
||||
for(i=0;i<Material.length;i++)
|
||||
{
|
||||
$.each(Material[i], function(idx, obj) {
|
||||
|
||||
if(obj.ReqNo === id )
|
||||
{
|
||||
|
||||
$.each(SelectedMaterialList.Mat, function(idx1, el){
|
||||
if (id == el.ReqNo )
|
||||
{
|
||||
|
||||
if(el.materialCode == obj.MaterialCode)
|
||||
{
|
||||
|
||||
isAdded = "1";
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
isAdded = "0";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
if(isAdded == "0")
|
||||
{
|
||||
|
||||
//$("#ViewMaterialCode").append( $('<option></option>').val(obj.MaterialCode).html(obj.MaterialCode + "-" + obj.MaterialName));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('.AddService').click(function(){
|
||||
@ -1854,7 +2221,8 @@ $('.AddService').click(function(){
|
||||
addHidden(theForm,"FrequencyValue"+temp,FrequencyValue);
|
||||
addHidden(theForm,"ItemDescription"+temp,ServiceDescription);
|
||||
addHidden(theForm,"OtherAmt"+temp,OtherAmt);
|
||||
addHidden(theForm,"TotalOrderValue"+temp,TotalOrderValue);
|
||||
addHidden(theForm,"TotalOrderValue"+temp,TotalOrderValue);
|
||||
addHidden(theForm,"LineItemNo"+temp,'');
|
||||
|
||||
$('#txtRowCount').val(temp);
|
||||
clearServiceModalFields();
|
||||
@ -2324,8 +2692,9 @@ var splinstr = $('#txtSpcialInstruction').val();
|
||||
var deladd = $('#DeliveryAddr').val();
|
||||
$('#txtStatus').val(stat);
|
||||
|
||||
|
||||
$('#SpcialInstruction').val(splinstr);
|
||||
tinyMCE.triggerSave();
|
||||
var splinstr = $('#ScopeOfWork').val();
|
||||
$('#ScopeOfWork').val(splinstr);
|
||||
$('#txtDeliveryAddress').val(deladd);
|
||||
|
||||
if(validate())
|
||||
|
||||
@ -59,6 +59,21 @@ if(!empty($INRSYMBOL))
|
||||
padding:0px;
|
||||
}
|
||||
</style>
|
||||
<script src="<?php echo base_url()?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
tinymce.init({
|
||||
selector: "textarea#ScopeOfWork"//,
|
||||
|
||||
//plugins: "link image"
|
||||
});
|
||||
tinymce.init({
|
||||
selector: "textarea#txtSpcialInstruction"//,
|
||||
|
||||
//plugins: "link image"
|
||||
});
|
||||
|
||||
</script>
|
||||
<script type="text/html" id="ServiceList">
|
||||
<tr id="<%=index%>">
|
||||
<td align="left"><%=index%></td>
|
||||
@ -6188,7 +6203,8 @@ $('#content').loader('hide');
|
||||
}
|
||||
|
||||
|
||||
var splinstr = $('#txtSpcialInstruction').val();
|
||||
var splinstr = $('#ScopeOfWork').val();
|
||||
$('#ScopeOfWork').val(splinstr);
|
||||
var deladd = $('#DeliveryAddr').val();
|
||||
$('#SpcialInstruction').val(splinstr);
|
||||
$('#txtDeliveryAddress').val(deladd);
|
||||
@ -6269,9 +6285,11 @@ $('#content').loader('hide');
|
||||
}
|
||||
|
||||
|
||||
var splinstr = $('#txtSpcialInstruction').val();
|
||||
tinyMCE.triggerSave();
|
||||
var splinstr = $('#txtSpcialInstruction').val();
|
||||
$('#SpcialInstruction').val(splinstr);
|
||||
var deladd = $('#DeliveryAddr').val();
|
||||
$('#SpcialInstruction').val(splinstr);
|
||||
|
||||
$('#txtDeliveryAddress').val(deladd);
|
||||
$('#txtStatus1').val(stat);
|
||||
var TextRowCount = $('#txtRowCount1').val();
|
||||
|
||||
@ -59,6 +59,21 @@ if(!empty($INRSYMBOL))
|
||||
padding:0px;
|
||||
}
|
||||
</style>
|
||||
<script src="<?php echo base_url()?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
tinymce.init({
|
||||
selector: "textarea#ScopeOfWork"//,
|
||||
|
||||
//plugins: "link image"
|
||||
});
|
||||
tinymce.init({
|
||||
selector: "textarea#txtSpcialInstruction"//,
|
||||
|
||||
//plugins: "link image"
|
||||
});
|
||||
|
||||
</script>
|
||||
<script type="text/html" id="ServiceList">
|
||||
<tr id="<%=index%>">
|
||||
<td align="left"><%=index%></td>
|
||||
@ -6188,7 +6203,8 @@ $('#content').loader('hide');
|
||||
}
|
||||
|
||||
|
||||
var splinstr = $('#txtSpcialInstruction').val();
|
||||
var splinstr = $('#ScopeOfWork').val();
|
||||
$('#ScopeOfWork').val(splinstr);
|
||||
var deladd = $('#DeliveryAddr').val();
|
||||
$('#SpcialInstruction').val(splinstr);
|
||||
$('#txtDeliveryAddress').val(deladd);
|
||||
@ -6269,9 +6285,11 @@ $('#content').loader('hide');
|
||||
}
|
||||
|
||||
|
||||
var splinstr = $('#txtSpcialInstruction').val();
|
||||
tinyMCE.triggerSave();
|
||||
var splinstr = $('#txtSpcialInstruction').val();
|
||||
$('#SpcialInstruction').val(splinstr);
|
||||
var deladd = $('#DeliveryAddr').val();
|
||||
$('#SpcialInstruction').val(splinstr);
|
||||
|
||||
$('#txtDeliveryAddress').val(deladd);
|
||||
$('#txtStatus1').val(stat);
|
||||
var TextRowCount = $('#txtRowCount1').val();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
4363
application/views/editRevenuepurchaseorder.php~
Executable file
4363
application/views/editRevenuepurchaseorder.php~
Executable file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3808
application/views/purchaseorder.php~
Executable file
3808
application/views/purchaseorder.php~
Executable file
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
$PONO = '';
|
||||
$postatus ='';
|
||||
@ -73,274 +73,254 @@
|
||||
|
||||
?>
|
||||
<style>
|
||||
@page { margin: 300px 50px 30px 50px; }
|
||||
.header { position: fixed; left: 0px; top: -300px; right: 0px; height: 550px;text-align: center; }
|
||||
@page { margin: 280px 50px 30px 50px; }
|
||||
.header { position: fixed; left: 0px; top: -280px; right: 0px; height: 550px;text-align: center; }
|
||||
.footer { position: fixed; bottom: 0px; }
|
||||
.pagenum:before { content: counter(page); }
|
||||
</style>
|
||||
<div class="footer">Page: <span class="pagenum"></span></div>
|
||||
<div class="header">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<img width="80" height="80" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg==">
|
||||
</td>
|
||||
<td><center><h2>REVENUE PURCHASE ORDER</h2><a style="color:#515151">PO NO:<?php echo $PONO?> </a><br/><b style="color:#3c8dbc"><?php echo $CompanyName; ?></b><br/> <?php echo $CompanyAddress; ?></center></td>
|
||||
<td>
|
||||
<?php
|
||||
if ($postatus == 'ST026')
|
||||
{}
|
||||
else
|
||||
{
|
||||
echo '<div><br/><br/>This is Draft Version For Internal Purpose</div>';
|
||||
}
|
||||
<div style="text-align:right;">
|
||||
<?php
|
||||
if ($postatus == 'ST026')
|
||||
{}
|
||||
else
|
||||
{
|
||||
echo '<div><b>DRAFT</b> </div>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
?>
|
||||
</div>
|
||||
|
||||
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?> </a></span></center>
|
||||
|
||||
|
||||
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
||||
<td colspan="2">
|
||||
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
|
||||
<p> <?php echo $CompanyAddress; ?></p>
|
||||
</td>
|
||||
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p><strong>Vendor Address :</strong></p>
|
||||
<p><?php echo $SuplierName; ?><br /><?php echo $SuplierAddress; ?></p>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<p><strong>Delivery To :</strong></p>
|
||||
<p><?php echo $DeliveryAddress; ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PO DATE :<?php echo $Podt; ?></td>
|
||||
<td colspan="2">DELIVERY DATE / SCHEDULE BY :<?php echo $DeliveryDate.$DeliverySchedule;?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
||||
<tr><th>Payment Terms</th><th>Payable At</th><th>Payment Days</th><th>Delivery Date/Schedule</th><th>PO Date</th></tr>
|
||||
<tr><td><?php echo $PaymentTerms;?></td><td><?php echo $PayableAT;?></td><td><?php echo $PaymentDays;?></td><td><?php echo $DeliveryDate.$DeliverySchedule;?></td><td><?php echo $Podt?></td></tr>
|
||||
<br/>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<a style="color:#3c8dbc">Vendor Address :</a> <br/> <?php echo $SuplierName?> <br/><?php echo $SuplierAddress ?>
|
||||
</td>
|
||||
<td>
|
||||
<a style="color:#3c8dbc">Delivery To :</a><br/> <?php echo $DeliveryAddress?>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="page" style="font-size:12px;">
|
||||
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
||||
<tr style="background:#8c8c8c;color:#fff;">
|
||||
<th>#</th>
|
||||
<th>Item Description</th>
|
||||
<th>Qty</th>
|
||||
<th>Rate In INR</th>
|
||||
<th>Amount In INR</th>
|
||||
<th>Discount</th>
|
||||
<th>Excise Duty</th>
|
||||
<th>Vat</th>
|
||||
<th>CST</th>
|
||||
<th>Packaging</th>
|
||||
<th>GST</th>
|
||||
<th>Other Taxes</th>
|
||||
<th>Insurance</th>
|
||||
<th>Freight</th>
|
||||
<th>Total Amount In INR</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Requistion Number</td>
|
||||
<td>Requested By</td>
|
||||
<td>Requested Department</td>
|
||||
<td>Cost Center </td>
|
||||
</tr>
|
||||
<?php
|
||||
if(!empty($RequistionDetails))
|
||||
{
|
||||
|
||||
foreach($RequistionDetails as $ReqDetails)
|
||||
{
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $ReqDetails['RequistionNo']; ?></td>
|
||||
<td><?php echo $ReqDetails['RequestedName']; ?></td>
|
||||
<td><?php echo $ReqDetails['RequestedDept']; ?></td>
|
||||
<td><?php echo $ReqDetails['CostCenterCode']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>#</td>
|
||||
<td>Item Name</td>
|
||||
<td>UOM</td>
|
||||
<td>Qty</td>
|
||||
<td>Rate In INR</td>
|
||||
<td>Basic Value In INR</td>
|
||||
<td>Discount In INR</td>
|
||||
<td>SGST In INR</td>
|
||||
<td>CGST In INR</td>
|
||||
<td>IGST In INR</td>
|
||||
<td>Packaging In INR</td>
|
||||
<td>Insurance In INR</td>
|
||||
<td>Freight In INR</td>
|
||||
<td>Total Amount In INR</td>
|
||||
</tr>
|
||||
<?php
|
||||
if(!empty($POItem))
|
||||
{
|
||||
|
||||
$SubTotalAmount = 0;
|
||||
$index = 0;
|
||||
$TotalAmount = 0;
|
||||
$OrderValue = 0;
|
||||
$AfterExciseDuty = 0;
|
||||
$AfterVAT = 0;
|
||||
$AfterCST = 0;
|
||||
$AfterGST = 0;
|
||||
$AfterOtherTaxes = 0;
|
||||
$Insurance = 0;
|
||||
$AfterFreightValue = 0;
|
||||
$AfterDiscount = 0;
|
||||
$AfterPackaging = 0;
|
||||
|
||||
$TotalTax = 0;
|
||||
$SubTotalAmount = 0;
|
||||
foreach($POItem as $record)
|
||||
{
|
||||
$index = $index + 1;
|
||||
|
||||
$TotalAmount = $record->BasicValue+$record->Taxamount;
|
||||
?>
|
||||
<tr>
|
||||
<tr style="line-height: 1.5em;">
|
||||
<td><?php echo $index ; ?></td>
|
||||
<td><?php echo $record->MaterialName ; ?></td>
|
||||
<td align="right"><?php echo $record->UOM ; ?></td>
|
||||
<td align="right"><?php echo $record->Quantity ; ?></td>
|
||||
<td align="right"><?php echo $record->Rate ; ?></td>
|
||||
<td align="right"><?php echo $record->BasicValue ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterDiscount; ?></td>
|
||||
<td align="right"><?php echo $record->AfterExciseDuty ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterVAT ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterCST ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterPackagingValue ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterGST ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterOtherTaxes ; ?></td>
|
||||
<td align="right"><?php echo $record->Insurance ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterFreightValue ; ?></td>
|
||||
<td align="right"><?php $TotalAmount = (($record->BasicValue+$record->AfterExciseDuty
|
||||
+ $record->AfterVAT+$record->AfterCST+$record->AfterGST + $record->AfterOtherTaxes + $record->Insurance+ $record->AfterFreightValue+$record->AfterPackagingValue)- $record->AfterDiscount);
|
||||
echo number_format($TotalAmount,2) ; ?></td>
|
||||
|
||||
<td align="right"><?php echo $record->Rate ; ?></td>
|
||||
<td align="right"><?php echo $record->BasicValue;?></td>
|
||||
<td align="right"><?php echo $record->AfterDiscount;?></td>
|
||||
<td align="right"><?php echo $record->AfterSGST ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterCGST ; ?></td>
|
||||
|
||||
|
||||
<td align="right"><?php echo $record->AfterIGST ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterPackagingValue;?></td>
|
||||
<td align="right"><?php echo $record->AfterFreightValue;?></td>
|
||||
<td align="right"><?php echo $record->Insurance;?></td>
|
||||
<td align="right"><?php echo number_format($TotalAmount,2) ; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
|
||||
$SubTotalAmount = $SubTotalAmount + $record->BasicValue;
|
||||
$AfterExciseDuty =$AfterExciseDuty + $record->AfterExciseDuty;
|
||||
$AfterVAT =$AfterVAT + $record->AfterVAT;
|
||||
$AfterCST = $AfterCST + $record->AfterCST;
|
||||
$AfterGST =$AfterGST + $record->AfterGST;
|
||||
$AfterOtherTaxes =$AfterOtherTaxes + $record->AfterOtherTaxes;
|
||||
$Insurance =$Insurance + $record->Insurance;
|
||||
$AfterFreightValue =$AfterFreightValue + $record->AfterFreightValue;
|
||||
$AfterDiscount = $AfterDiscount + $record->AfterDiscount ;
|
||||
$AfterPackaging=$AfterPackaging+$record->AfterPackagingValue;
|
||||
$TotalTax = $TotalTax+$record->Taxamount;
|
||||
$OrderValue = $SubTotalAmount + $TotalTax;
|
||||
|
||||
}
|
||||
$OrderValue = (( $SubTotalAmount + $AfterVAT + $AfterCST+$AfterGST+$AfterOtherTaxes +$Insurance +$AfterFreightValue+$AfterExciseDuty+$AfterPackaging) - $AfterDiscount ) ;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
<div align="right">
|
||||
|
||||
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<!--<tr>
|
||||
<td align="right">Sub Total Amount :</td>
|
||||
<td align="right"><?php echo number_format($SubTotalAmount,2);?></td>
|
||||
<br/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Discount :</td>
|
||||
<td align="right"><?php echo number_format($AfterDiscount,2);?></td>
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Excise Duty :</td>
|
||||
<td align="right"><?php echo number_format($AfterExciseDuty,2);?></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Vat :</td>
|
||||
<td align="right"><?php echo number_format($AfterVAT,2);?></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">CST :</td>
|
||||
<td align="right"><?php echo number_format($AfterCST,2);?></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">GST :</td>
|
||||
<td align="right"><?php echo number_format($AfterGST,2);?></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Other Taxes:</td>
|
||||
<td align="right"><?php echo number_format($AfterOtherTaxes,2);?></td>
|
||||
<p> </p>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Insurance :</td>
|
||||
<td align="right"><?php echo number_format($Insurance,2);?></td>
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Freight :</td>
|
||||
<td align="right"><?php echo number_format($AfterFreightValue,2);?></td>
|
||||
<tbody>
|
||||
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td align="right"><p><b>Total Order Amount In INR :</b></p></td>
|
||||
<td align="right"><b><?php echo number_format($OrderValue,2);?></b></td>
|
||||
<tr>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td><b>Total Amount In Words:<b></td>
|
||||
<td><b><?php echo $TotalAmountInWords." "."Only.";?></b></td>
|
||||
<td style="text-align: center;" rowspan="3">
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
||||
<tr style="background:#8c8c8c;color:#fff;">
|
||||
|
||||
<th>Requistion Number</th>
|
||||
<th>Requested by</th>
|
||||
<th>Requested Department</th>
|
||||
<th>Cost center</th>
|
||||
|
||||
</tr>
|
||||
<p><strong>Total Amount In Words</strong><br /><br /><br /></p>
|
||||
|
||||
<?php
|
||||
if(!empty($RequistionDetails))
|
||||
{
|
||||
|
||||
foreach($RequistionDetails as $ReqDetails)
|
||||
{
|
||||
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<p><em><strong><?php echo $TotalAmountInWords;?></strong></em></p>
|
||||
|
||||
</td>
|
||||
|
||||
<td style="text-align: right;"><strong>Total Amount Before Tax In INR <?php echo number_format($SubTotalAmount,2);?></strong></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td style="text-align: right;"><strong>Total Tax Amount In INR <?php echo number_format($TotalTax,2);?></strong></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td style="text-align: right;"><strong>Total Amount After Tax In INR <?php echo number_format($OrderValue,2);?></strong></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p><strong>Payment Terms </strong></p>
|
||||
|
||||
<p><?php echo $PaymentTerms;?></p>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
||||
<p style="text-align: center;">Certified that the particulars given above are true and correct</p>
|
||||
|
||||
<p style="text-align: center;"><strong><?php echo $CompanyName; ?></strong></p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p style="text-align: center;">Authorized Signatory</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><strong>Special Instruction:</strong></p>
|
||||
<p><?php echo $ServiceDescription;?></p>
|
||||
<?php
|
||||
|
||||
<td><?php echo $ReqDetails['RequistionNo']; ?></td>
|
||||
<td><?php echo $ReqDetails['RequestedName']; ?></td>
|
||||
<td><?php echo $ReqDetails['RequestedDept']; ?></td>
|
||||
<td><?php echo $ReqDetails['CostCenterCode']; ?></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
<br/>
|
||||
<br/>
|
||||
<p>
|
||||
<div align="Left"> <b>Service Description:</b><br/><br/><?php echo $ServiceDescription;?></div></p>
|
||||
<?php
|
||||
if(!empty($releasedetails)){
|
||||
|
||||
$releasedOn = '';
|
||||
foreach($releasedetails as $detail){
|
||||
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<table width="200%">
|
||||
<tr>
|
||||
<td><b>ReleasedBy:</b></td>
|
||||
<td><b>ReleasedOn:</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $detail->FirstName;?></td>
|
||||
<td><?php echo $releasedOn->format('d-m-Y');?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- <table width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>Released By:</b></td>
|
||||
<td style="text-align:right;"><b>Released On:</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $detail->FirstName;?></td>
|
||||
<td style="text-align:right;"><?php echo $releasedOn->format('d-m-Y');?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table> -->
|
||||
<p> </p>
|
||||
<div align="Left"> <b>Released By : </b><?php echo $detail->FirstName;?></div>
|
||||
<div align="Left"> <b>Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<table width="200%">
|
||||
<tr>
|
||||
<td><b>Till Release State:</b></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
326
application/views/revenuepopdf.php~
Executable file
326
application/views/revenuepopdf.php~
Executable file
@ -0,0 +1,326 @@
|
||||
<?php
|
||||
|
||||
$PONO = '';
|
||||
$postatus ='';
|
||||
$CompanyAddress = '';
|
||||
$CompanyName = '';
|
||||
$SuplierName = '';
|
||||
$SuplierAddress = '';
|
||||
$DeliveryAddress = '';
|
||||
$Podt = '';
|
||||
$DeliveryDate ='';
|
||||
$postatus='';
|
||||
$ServiceDescription = '';
|
||||
$PaymentTerms = '';
|
||||
$PaymentDays='';
|
||||
$PayableAT='';
|
||||
$DeliverySchedule='';
|
||||
if(!empty($CompanyDetails))
|
||||
{
|
||||
foreach ($CompanyDetails as $CO)
|
||||
{
|
||||
$CompanyName = $CO->CompanyName;
|
||||
$CompanyAddress = $CO->Address;
|
||||
|
||||
}
|
||||
}
|
||||
if(!empty($POItem))
|
||||
{
|
||||
|
||||
foreach ($POItem as $PO)
|
||||
{
|
||||
$PONO = $PO->PONO;
|
||||
$postatus= $PO->Status;
|
||||
$SuplierName = $PO->SupplierName;
|
||||
$SuplierAddress = $PO->Address;
|
||||
$DeliveryAddress = $PO->DeliveryAddress;
|
||||
$postatus= $PO->Status;
|
||||
$dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata'));
|
||||
$Podt = $dt->format('d-m-Y');
|
||||
if($PO->DeliveryOption=='1'){
|
||||
$DeliveryDate = '';
|
||||
$DeliverySchedule = $PO->DeliverySchedule;
|
||||
}
|
||||
else{
|
||||
$dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
|
||||
$DeliveryDate = $dtDe->format('d-m-Y');
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
|
||||
|
||||
$ServiceDescription =$PO->ServiceDescription;
|
||||
$PaymentTerms = $PO->PaymentTerms;
|
||||
$PaymentDays=$PO->PaymentDays;
|
||||
$PayableAT=$PO->PayableAT;
|
||||
|
||||
}
|
||||
}
|
||||
$currencyName='INR';
|
||||
$currencyCode ='';
|
||||
if(!empty($CurrencySymbol))
|
||||
{
|
||||
foreach ($CurrencySymbol as $Curr)
|
||||
{
|
||||
|
||||
$currencyCode = $Curr->FontCode2000;
|
||||
//$currencyName = $currencyName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<style>
|
||||
@page { margin: 280px 50px 30px 50px; }
|
||||
.header { position: fixed; left: 0px; top: -280px; right: 0px; height: 550px;text-align: center; }
|
||||
.footer { position: fixed; bottom: 0px; }
|
||||
.pagenum:before { content: counter(page); }
|
||||
</style>
|
||||
<div class="footer">Page: <span class="pagenum"></span></div>
|
||||
<div class="header">
|
||||
<div style="text-align:right;">
|
||||
<?php
|
||||
if ($postatus == 'ST026')
|
||||
{}
|
||||
else
|
||||
{
|
||||
echo '<div><b>DRAFT</b> </div>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
||||
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?> </a></span></center>
|
||||
|
||||
|
||||
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
||||
<td colspan="2">
|
||||
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
|
||||
<p> <?php echo $CompanyAddress; ?></p>
|
||||
</td>
|
||||
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p><strong>Vendor Address :</strong></p>
|
||||
<p><?php echo $SuplierName; ?><br /><?php echo $SuplierAddress; ?></p>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<p><strong>Delivery To :</strong></p>
|
||||
<p><?php echo $DeliveryAddress; ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PO DATE :<?php echo $Podt; ?></td>
|
||||
<td colspan="2">DELIVERY DATE / SCHEDULE BY :<?php echo $DeliveryDate.$DeliverySchedule;?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Requistion Number</td>
|
||||
<td>Requested By</td>
|
||||
<td>Requested Department</td>
|
||||
<td>Cost Center </td>
|
||||
</tr>
|
||||
<?php
|
||||
if(!empty($RequistionDetails))
|
||||
{
|
||||
|
||||
foreach($RequistionDetails as $ReqDetails)
|
||||
{
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $ReqDetails['RequistionNo']; ?></td>
|
||||
<td><?php echo $ReqDetails['RequestedName']; ?></td>
|
||||
<td><?php echo $ReqDetails['RequestedDept']; ?></td>
|
||||
<td><?php echo $ReqDetails['CostCenterCode']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>#</td>
|
||||
<td>Item Name</td>
|
||||
<td>UOM</td>
|
||||
<td>Qty</td>
|
||||
<td>Rate In INR</td>
|
||||
<td>Basic Value In INR</td>
|
||||
<td>Discount In INR</td>
|
||||
<td>SGST In INR</td>
|
||||
<td>CGST In INR</td>
|
||||
<td>IGST In INR</td>
|
||||
<td>Packaging In INR</td>
|
||||
<td>Insurance In INR</td>
|
||||
<td>Freight In INR</td>
|
||||
<td>Total Amount In INR</td>
|
||||
</tr>
|
||||
<?php
|
||||
if(!empty($POItem))
|
||||
{
|
||||
|
||||
$index = 0;
|
||||
$TotalAmount = 0;
|
||||
$OrderValue = 0;
|
||||
$TotalTax = 0;
|
||||
$SubTotalAmount = 0;
|
||||
foreach($POItem as $record)
|
||||
{
|
||||
$index = $index + 1;
|
||||
$TotalAmount = $record->BasicValue+$record->Taxamount;
|
||||
?>
|
||||
<tr style="line-height: 1.5em;">
|
||||
<td><?php echo $index ; ?></td>
|
||||
<td><?php echo $record->MaterialName ; ?></td>
|
||||
<td align="right"><?php echo $record->UOM ; ?></td>
|
||||
<td align="right"><?php echo $record->Quantity ; ?></td>
|
||||
|
||||
<td align="right"><?php echo $record->Rate ; ?></td>
|
||||
<td align="right"><?php echo $record->BasicValue;?></td>
|
||||
<td align="right"><?php echo $record->AfterDiscount;?></td>
|
||||
<td align="right"><?php echo $record->AfterSGST ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterCGST ; ?></td>
|
||||
|
||||
|
||||
<td align="right"><?php echo $record->AfterIGST ; ?></td>
|
||||
<td align="right"><?php echo $record->AfterPackagingValue;?></td>
|
||||
<td align="right"><?php echo $record->AfterFreightValue;?></td>
|
||||
<td align="right"><?php echo $record->Insurance;?></td>
|
||||
<td align="right"><?php echo number_format($TotalAmount,2) ; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
$SubTotalAmount = $SubTotalAmount + $record->BasicValue;
|
||||
$TotalTax = $TotalTax+$record->Taxamount;
|
||||
$OrderValue = $SubTotalAmount + $TotalTax;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p> </p>
|
||||
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
|
||||
<td style="text-align: center;" rowspan="3">
|
||||
|
||||
<p><strong>Total Amount In Words</strong><br /><br /><br /></p>
|
||||
|
||||
<p><em><strong><?php echo $TotalAmountInWords;?></strong></em></p>
|
||||
|
||||
</td>
|
||||
|
||||
<td style="text-align: right;"><strong>Total Amount Before Tax In INR <?php echo number_format($SubTotalAmount,2);?></strong></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td style="text-align: right;"><strong>Total Tax Amount In INR <?php echo number_format($TotalTax,2);?></strong></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td style="text-align: right;"><strong>Total Amount After Tax In INR <?php echo number_format($OrderValue,2);?></strong></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p><strong>Payment Terms </strong></p>
|
||||
|
||||
<p><?php echo $PaymentTerms;?></p>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
||||
<p style="text-align: center;">Certified that the particulars given above are true and correct</p>
|
||||
|
||||
<p style="text-align: center;"><strong><?php echo $CompanyName; ?></strong></p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p style="text-align: center;">Authorized Signatory</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><strong>Special Instruction:</strong></p>
|
||||
<p><?php echo $ServiceDescription;?></p>
|
||||
<?php
|
||||
|
||||
if(!empty($releasedetails)){
|
||||
|
||||
$releasedOn = '';
|
||||
foreach($releasedetails as $detail){
|
||||
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<!-- <table width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>Released By:</b></td>
|
||||
<td style="text-align:right;"><b>Released On:</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $detail->FirstName;?></td>
|
||||
<td style="text-align:right;"><?php echo $releasedOn->format('d-m-Y');?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table> -->
|
||||
<p> </p>
|
||||
<div align="Left"> <b>Released By : </b><?php echo $detail->FirstName;?></div>
|
||||
<div align="Left"> <b>Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
@ -39,7 +39,18 @@ if(!empty($INRSYMBOL))
|
||||
|
||||
|
||||
?>
|
||||
<script src="<?php echo base_url()?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets/js/CreatePOValidation.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
tinymce.init({
|
||||
selector: "textarea#ScopeOfWork"//,
|
||||
|
||||
//plugins: "link image"
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
var RequistQuantity = '';
|
||||
@ -1950,10 +1961,11 @@ else
|
||||
{
|
||||
stat = '<?php echo PO_CREATED; ?>';
|
||||
}
|
||||
|
||||
var splinstr = $('#txtSpcialInstruction').val();
|
||||
tinyMCE.triggerSave();
|
||||
var splinstr = $('#ScopeOfWork').val();
|
||||
$('#ScopeOfWork').val(splinstr);
|
||||
var deladd = $('#DeliveryAddr').val();
|
||||
$('#SpcialInstruction').val(splinstr);
|
||||
|
||||
$('#txtDeliveryAddress').val(deladd);
|
||||
$('#txtStatus').val(stat);
|
||||
if(validate())
|
||||
|
||||
@ -39,7 +39,18 @@ if(!empty($INRSYMBOL))
|
||||
|
||||
|
||||
?>
|
||||
<script src="<?php echo base_url()?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets/js/CreatePOValidation.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
tinymce.init({
|
||||
selector: "textarea#ScopeOfWork"//,
|
||||
|
||||
//plugins: "link image"
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
var RequistQuantity = '';
|
||||
@ -473,7 +484,7 @@ function clearEditTaxField()
|
||||
RequistQuantity = '';
|
||||
|
||||
}
|
||||
/* $(document).ready(function () {
|
||||
$(document).ready(function () {
|
||||
$('#Date').click(function () {
|
||||
//for Date range selection
|
||||
$('#Schedulediv').hide();
|
||||
@ -484,7 +495,7 @@ function clearEditTaxField()
|
||||
$('#Deliverydtdiv').hide();
|
||||
$('#Schedulediv').show();
|
||||
});
|
||||
}); */
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.modal
|
||||
@ -1950,10 +1961,11 @@ else
|
||||
{
|
||||
stat = '<?php echo PO_CREATED; ?>';
|
||||
}
|
||||
|
||||
var splinstr = $('#txtSpcialInstruction').val();
|
||||
tinyMCE.triggerSave();
|
||||
var splinstr = $('#ScopeOfWork').val();
|
||||
$('#ScopeOfWork').val(splinstr);
|
||||
var deladd = $('#DeliveryAddr').val();
|
||||
$('#SpcialInstruction').val(splinstr);
|
||||
|
||||
$('#txtDeliveryAddress').val(deladd);
|
||||
$('#txtStatus').val(stat);
|
||||
if(validate())
|
||||
@ -2121,4 +2133,4 @@ function calculateIgstTax(varBasicValue,Igst)
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@ -186,7 +186,7 @@
|
||||
|
||||
<td>#</td>
|
||||
|
||||
<td>Item Code</td>
|
||||
<td>Item Name</td>
|
||||
|
||||
<td>Service Description</td>
|
||||
|
||||
@ -218,7 +218,8 @@
|
||||
$index = 0;
|
||||
$TotalAmount = 0;
|
||||
$OrderValue = 0;
|
||||
$OrderTax = 0;
|
||||
$TotalTax = 0;
|
||||
$SubTotalAmount=0;
|
||||
foreach($POItem as $record)
|
||||
{
|
||||
$index = $index + 1;
|
||||
@ -260,8 +261,8 @@
|
||||
|
||||
}
|
||||
|
||||
$TotalTax = $Sgst + $Cgst+$Igst;
|
||||
$OrderValue = $SubTotalAmount + $TotalTax;
|
||||
$TotalTax =$TotalTax+ $Sgst + $Cgst+$Igst;
|
||||
$OrderValue = $OrderValue + $SubTotalAmount + $TotalTax;
|
||||
}
|
||||
|
||||
?>
|
||||
@ -384,7 +385,7 @@
|
||||
|
||||
</table>
|
||||
|
||||
<p><strong>Special Instruction:</strong></p>
|
||||
<p><strong>Scope Of Work:</strong></p>
|
||||
|
||||
<p><?php echo $ServiceDescription;?></p>
|
||||
|
||||
|
||||
431
application/views/servicepopdf.php~
Executable file
431
application/views/servicepopdf.php~
Executable file
@ -0,0 +1,431 @@
|
||||
<?php
|
||||
|
||||
$PONO = '';
|
||||
$postatus ='';
|
||||
$CompanyAddress = '';
|
||||
$CompanyName = '';
|
||||
$SuplierName = '';
|
||||
$SuplierAddress = '';
|
||||
$DeliveryAddress = '';
|
||||
$Podt = '';
|
||||
$DeliveryDate ='';
|
||||
$DeliverySchedule='';
|
||||
$Cgst=0.00;
|
||||
$Sgst =0.00;
|
||||
$Igst =0.00;
|
||||
|
||||
$TotalAmount =0.00;
|
||||
$SubTotalAmount =0.00;
|
||||
$TaxAmount =0.00;
|
||||
$BasicAmount = 0.00;
|
||||
$OtherAllowance = 0.00;
|
||||
$ServiceDescription = '';
|
||||
$PaymentTerms='';
|
||||
|
||||
|
||||
if(!empty($CompanyDetails))
|
||||
{
|
||||
foreach ($CompanyDetails as $CO)
|
||||
{
|
||||
$CompanyName = $CO->CompanyName;
|
||||
$CompanyAddress = $CO->Address;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$currencyName='INR';
|
||||
$currencyCode ='';
|
||||
if(!empty($CurrencySymbol))
|
||||
{
|
||||
foreach ($CurrencySymbol as $Curr)
|
||||
{
|
||||
|
||||
$currencyCode = $Curr->FontCode2000;
|
||||
//$currencyName = $currencyName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if(!empty($POItem))
|
||||
{
|
||||
|
||||
foreach ($POItem as $PO)
|
||||
{
|
||||
|
||||
$PONO = $PO->PONO;
|
||||
$postatus= $PO->Status;
|
||||
$SuplierName = $PO->SupplierName;
|
||||
$SuplierAddress = $PO->Address;
|
||||
$DeliveryAddress = $PO->DeliveryAddress;
|
||||
$dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata'));
|
||||
$Podt = $dt->format('d-m-Y');
|
||||
$dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
|
||||
$DeliveryDate = $dtDe->format('d-m-Y');
|
||||
$ServiceDescription =$PO->ServiceDescription;
|
||||
$PaymentTerms = $PO->PaymentTerms;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<style>
|
||||
@page { margin: 280px 50px 30px 50px; }
|
||||
.header { position: fixed; left: 0px; top: -280px; right: 0px; height: 550px;text-align: center; }
|
||||
.footer { position: fixed; bottom: 0px; }
|
||||
.pagenum:before { content: counter(page); }
|
||||
</style>
|
||||
<div class="footer">Page: <span class="pagenum"></span></div>
|
||||
|
||||
<div class="header">
|
||||
<div style="text-align:right;">
|
||||
<?php
|
||||
if ($postatus == 'ST026')
|
||||
{}
|
||||
else
|
||||
{
|
||||
echo '<div><b>DRAFT</b> </div>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
||||
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?> </a></span></center>
|
||||
|
||||
|
||||
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
||||
<td colspan="2">
|
||||
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
|
||||
<p> <?php echo $CompanyAddress; ?></p>
|
||||
</td>
|
||||
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p><strong>Vendor Address :</strong></p>
|
||||
<p><?php echo $SuplierName; ?><br /><?php echo $SuplierAddress; ?></p>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<p><strong>Delivery To :</strong></p>
|
||||
<p><?php echo $DeliveryAddress; ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PO DATE :<?php echo $Podt; ?></td>
|
||||
<td colspan="2">DELIVERY DATE / SCHEDULE BY :<?php echo $DeliveryDate.$DeliverySchedule;?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>Requistion Number</td>
|
||||
|
||||
<td>Requested By</td>
|
||||
|
||||
<td>Requested Department</td>
|
||||
|
||||
<td>Cost Center </td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($RequistionDetails))
|
||||
{
|
||||
|
||||
foreach($RequistionDetails as $ReqDetails)
|
||||
{
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $ReqDetails['RequistionNo']; ?></td>
|
||||
<td><?php echo $ReqDetails['RequestedName']; ?></td>
|
||||
<td><?php echo $ReqDetails['RequestedDept']; ?></td>
|
||||
<td><?php echo $ReqDetails['CostCenterCode']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>#</td>
|
||||
|
||||
<td>Item Name</td>
|
||||
|
||||
<td>Service Description</td>
|
||||
|
||||
<td>UOM</td>
|
||||
|
||||
<td>Qty</td>
|
||||
|
||||
<td>Rate In INR</td>
|
||||
|
||||
<td>Basic Value In INR</td>
|
||||
|
||||
<td>CGST In INR</td>
|
||||
|
||||
<td>SGST In INR</td>
|
||||
|
||||
<td>IGST In INR</td>
|
||||
|
||||
<td>Other Allow In INR</td>
|
||||
|
||||
<td>Total Amount In INR</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($POItem))
|
||||
{
|
||||
$index = 0;
|
||||
$TotalAmount = 0;
|
||||
$OrderValue = 0;
|
||||
$TotalTax = 0;
|
||||
$SubTotalAmount=0;
|
||||
foreach($POItem as $record)
|
||||
{
|
||||
$index = $index + 1;
|
||||
|
||||
?>
|
||||
<tr style="line-height: 1.5em;">
|
||||
<td><?php echo $index ; ?></td>
|
||||
<td><?php echo $record->MaterialName ; ?></td>
|
||||
<td><?php echo $record->ServiceMaterialDescription ; ?></td>
|
||||
<td align="right"><?php echo $record->UOM ; ?></td>
|
||||
<td align="right"><?php echo $record->Quantity ; ?></td>
|
||||
|
||||
<td align="right"><?php echo $record->Rate ; ?></td>
|
||||
<td align="right"><?php if($record->NumberOfService==0 || $record->NumberOfService==''){
|
||||
echo $record->BasicValue;
|
||||
$TotalAmount = $record->BasicValue + $record->Taxamount + $record->otherallowance;
|
||||
$SubTotalAmount = $SubTotalAmount + $record->BasicValue + $record->otherallowance;
|
||||
}
|
||||
else{
|
||||
echo $record->BasicValue * $record->NumberOfService;
|
||||
$TotalAmount = $record->BasicValue * $record->NumberOfService + $record->Taxamount + $record->otherallowance;
|
||||
$SubTotalAmount = $SubTotalAmount + $record->BasicValue * $record->NumberOfService + $record->otherallowance;
|
||||
}
|
||||
?></td>
|
||||
<td align="right"><?php echo $record->After_SGST ; ?></td>
|
||||
<td align="right"><?php echo $record->After_CGST ; ?></td>
|
||||
<td align="right"><?php echo $record->After_IGST ; ?></td>
|
||||
<td align="right"><?php echo $record->otherallowance ; ?></td>
|
||||
<td align="right"><?php echo number_format($TotalAmount,2) ; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
$Sgst =$Sgst + $record->After_SGST;
|
||||
$Cgst =$Cgst + $record->After_CGST;
|
||||
$Igst = $Igst + $record->After_IGST;
|
||||
|
||||
|
||||
}
|
||||
|
||||
$TotalTax =$TotalTax+ $Sgst + $Cgst+$Igst;
|
||||
$OrderValue = $OrderValue + $SubTotalAmount + $TotalTax;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<p> </p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
|
||||
|
||||
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
|
||||
|
||||
<td style="text-align: center;" rowspan="3">
|
||||
|
||||
|
||||
|
||||
<p><strong>Total Amount In Words</strong><br /><br /><br /></p>
|
||||
|
||||
|
||||
|
||||
<p><em><strong><?php echo $TotalAmountInWords;?></strong></em></p>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td style="text-align: right;"><strong>Total Amount Before Tax In INR - <?php echo number_format($SubTotalAmount,2);?></strong></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
|
||||
|
||||
<td style="text-align: right;"><strong>Total Tax Amount In INR - <?php echo number_format($TotalTax,2);?></strong></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
|
||||
|
||||
<td style="text-align: right;"><strong>Total Amount After Tax In INR - <?php echo number_format($OrderValue,2);?></strong></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
|
||||
|
||||
|
||||
<p><strong>Payment Terms </strong></p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p><?php echo $PaymentTerms;?></p>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
|
||||
|
||||
|
||||
<p style="text-align: center;">Certified that the particulars given above are true and correct</p>
|
||||
|
||||
|
||||
|
||||
<p style="text-align: center;"><strong><?php echo $CompanyName; ?></strong></p>
|
||||
|
||||
|
||||
|
||||
<p> </p>
|
||||
|
||||
|
||||
|
||||
<p style="text-align: center;">Authorized Signatory</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<p><strong>Scope Of Work:</strong></p>
|
||||
|
||||
<p><?php echo $ServiceDescription;?></p>
|
||||
|
||||
<?php
|
||||
|
||||
if(!empty($releasedetails)){
|
||||
|
||||
$releasedOn = '';
|
||||
foreach($releasedetails as $detail){
|
||||
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<!-- <table width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>Released By:</b></td>
|
||||
<td style="text-align:right;"><b>Released On:</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $detail->FirstName;?></td>
|
||||
<td style="text-align:right;"><?php echo $releasedOn->format('d-m-Y');?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table> -->
|
||||
<p> </p>
|
||||
<div align="Left"> <b>Released By : </b><?php echo $detail->FirstName;?></div>
|
||||
<div align="Left"> <b>Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user