diff --git a/application/controllers/emergencypurchaseorder.php b/application/controllers/emergencypurchaseorder.php
index 5c4398a0..5f718355 100755
--- a/application/controllers/emergencypurchaseorder.php
+++ b/application/controllers/emergencypurchaseorder.php
@@ -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);
diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php
index f2551f8b..0ac16a41 100755
--- a/application/controllers/purchaseorder.php
+++ b/application/controllers/purchaseorder.php
@@ -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);
diff --git a/application/controllers/servicepurchaseorder.php b/application/controllers/servicepurchaseorder.php
index 8ee0c9b3..90ae695f 100755
--- a/application/controllers/servicepurchaseorder.php
+++ b/application/controllers/servicepurchaseorder.php
@@ -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'];
+
}
}
diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php
index 12515e5f..be1270e4 100755
--- a/application/models/purchaseorder_model.php
+++ b/application/models/purchaseorder_model.php
@@ -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));
diff --git a/application/views/EditservicePurchaseorder.php b/application/views/EditservicePurchaseorder.php
index 5bd1a7bf..8a5448fa 100755
--- a/application/views/EditservicePurchaseorder.php
+++ b/application/views/EditservicePurchaseorder.php
@@ -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)
// }
?>
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
- 'form-label-left CreatePO ','name' => 'CreatePO','id' => 'CreatePO');
-
- echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
-
-
-
-
-
Siddharth Industries - Edit Revenue Purchase Order -
-
-
-
-
-
-
- 'Selected Requisition Numbers');
- if(!empty($ReqList))
- {
- foreach ($ReqList as $SID):
-
- $options[$SID->ReqNo] = $SID->ReqNo ;
- //$ReqType = $SID->ReqType;
- endforeach;
- }
- echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' ,'required="true"' , 'height="400px"' );
- ?>
-
-
-
-
- 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
- 'Select Supplier');
- //print_r( $options);
-
- if(!empty($Suplist))
- {
- foreach ($Suplist as $SID):
-
-
- $options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
-
- endforeach;
- }
-
- echo form_dropdown('drpSupplier', $options,set_value('drpSupplier',$SupId),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
-
- ?>
-
-
-
-
-
- 'POType','value' => set_value('POType',REVENUE),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
- Select Tax Range
-
- |
- "Range","id"=>"Local","value"=>"0", 'checked'=>set_radio('Range', '0', TRUE),'onchange'=>'SetVatorCST();')); ?> |
- "Range","id"=>"Inter_state","value"=>"1", 'checked'=>set_radio('Range', '1', FALSE),'onchange'=>'SetVatorCST();')); ?>
- |
-
-
-
-
-
-
-
-
-
- Select Delivery By
-
- |
- 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?>
-
- |
- 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?>
-
-
- |
-
-
-
-
-
-
-
- 'SupAddress','value' => set_value('SupAddress',$Address),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true' ,'rows' => '3', 'cols' => '40');
- echo Form_textarea($data);
- ?>
-
-
-
-
-
- 'DeliveryAddr','value' => set_value('DeliveryAddr',$DeliveryAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
- echo Form_textarea($data);
- ?>
-
-
-
-
-
- 'Deliverydt','value' => set_value('Deliverydt',$Deliverydt),'id'=>'Deliverydt', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'Scheduleby','value' => set_value('Scheduleby',$DeliverSchedule),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
- echo Form_textarea($data);
- ?>
-
-
-
-
-
-
-
-
- Payable Terms
-
-
-
-
- Payable AT
-
- 'PayableAT','value' => set_value('PayableAT',$PayableAT),'id'=>'PayableAT', 'class' => 'form-control' ,'required' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
- Payment Date
-
- |
- "Payment", "id"=>"Before", "value"=>"0", 'checked'=>set_radio('Payment', '0', TRUE))); ?> |
-
- "Payment", "id"=>"After", "value"=>"1", 'checked'=>set_radio('Payment', '1', FALSE))); ?>
-
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | SNo |
- Requisition No |
- Item Name |
- Quantity |
- UOM |
- Rate |
- Basic Amount |
- Tax Amount |
- Total Order Amount |
- Action |
-
-
-
-
-
-
- |
- ReqNo ?> |
- MaterialName ?> |
- Quantity ?> |
- UOM ?> |
- Rate ?> |
-
- BasicValue ?> |
-
- Taxamount ?> |
- TotalValue ?> |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | |
-
-
-
-
- BasicValue;
- $totDiscountAmt = $totDiscountAmt + $record->AfterDiscount;
- $totPackagingAmt = $totPackagingAmt + $record->AfterPackagingValue;
- $totExciseAmt = $totExciseAmt + $record->AfterExciseDuty;
- $totVATAmt = $totVATAmt + $record->AfterVAT;
- $totCSTAmt = $totCSTAmt + $record->AfterCST;
- $totGSTAmt = $totGSTAmt +$record->AfterGST;
-
- $totOtherTaxAmt = $totOtherTaxAmt + $record->AfterOtherTaxes;
- $totFreightAmt = $totFreightAmt + $record->AfterFreightValue;
- $totInsuranceAmt = $totInsuranceAmt + $record->Insurance;
- $totOrderSummaryAmt = $totOrderSummaryAmt +$record->TotalValue;
-
- }
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount',$totBasicAmt),'id'=>'txtTotBasicAmount', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
-
- 'txtTotalDiscount','value' => set_value('txtTotalDiscount',$totDiscountAmt),'id'=>'txtTotalDiscount', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txtTotalVat','value' => set_value('txtTotalVat',$totVATAmt),'id'=>'txtTotalVat', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txtTotCST','value' => set_value('txtTotCST',$totCSTAmt),'id'=>'txtTotCST', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txtTotalPackaing','value' => set_value('txtTotalPackaing',$totPackagingAmt),'id'=>'txtTotalPackaing', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
- 'txtTotExciseDuty','value' => set_value('txtTotExciseDuty',$totExciseAmt),'id'=>'txtTotExciseDuty', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txtTotalGST','value' => set_value('txtTotalGST',$totGSTAmt),'id'=>'txtTotalGST', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txtTotalInsurance','value' => set_value('txtTotalInsurance',$totInsuranceAmt),'id'=>'txtTotalInsurance', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txtTotalFreight','value' => set_value('txtTotalFreight',$totFreightAmt),'id'=>'txtTotalFreight', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
-
- 'txtTotalOtherTaxes','value' => set_value('txtTotalOtherTaxes',$totOtherTaxAmt),'id'=>'txtTotalOtherTaxes', 'class' => 'form-control num','readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
- 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary',$totOrderSummaryAmt),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
- 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '3', 'cols' => '40' );
- echo form_textarea($data);
- ?>
-
-
-
-
-
- Request On
- 'Requeston','value' => set_value('Requeston',$Reqon),'id'=>'Requeston', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
- echo form_input($data);
- ?>
-
-
- Request By
- 'RequestBy','value' => set_value('RequestBy', $RequesterName),'id'=>'RequestBy', 'class' => 'form-control' ,'required' => 'true');
- echo form_input($data);
- ?>
-
-
- Status
- $PONOStatus);
- // echo form_dropdown('Status', $options,set_value('Status'),'id="Status"' ,'required="true"' ,'class="form-control select2')
-
-
- $data = array('name' => 'Status','value' => set_value('Status',$StatusName),'id'=>'Status', 'class' => 'form-control' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ 'form-label-left CreatePO ','name' => 'CreatePO','id' => 'CreatePO');
+
+ echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
+
+
+
+
+
Siddharth Industries - Edit Revenue Purchase Order -
+
+
+
+
+
+
+ 'Selected Requisition Numbers');
+ if(!empty($ReqList))
+ {
+ foreach ($ReqList as $SID):
+
+ $options[$SID->ReqNo] = $SID->ReqNo ;
+ //$ReqType = $SID->ReqType;
+ endforeach;
+ }
+ echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' ,'required="true"' , 'height="400px"' );
+ ?>
+
+
+
+
+ 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+ 'Select Supplier');
+ //print_r( $options);
+
+ if(!empty($Suplist))
+ {
+ foreach ($Suplist as $SID):
+
+
+ $options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
+
+ endforeach;
+ }
+
+ echo form_dropdown('drpSupplier', $options,set_value('drpSupplier',$SupId),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
+
+ ?>
+
+
+
+
+
+ 'POType','value' => set_value('POType',REVENUE),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+ Select Tax Range
+
+
+|
+ 'Range', 'value' => '0', 'checked' => ('0' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Local','onchange'=>'SetVatorCST();')); ?>
+ |
+
+
+ 'Range', 'value' => '1', 'checked' => ('1' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Inter_state','onchange'=>'SetVatorCST();')); ?>
+
+ |
+
+
+
+
+
+
+
+
+
+ Select Delivery By
+
+ |
+ 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?> |
+
+
+ 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?>
+
+
+ |
+
+
+
+
+
+
+
+ 'SupAddress','value' => set_value('SupAddress',$Address),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+ 'DeliveryAddr','value' => set_value('DeliveryAddr',$DeliveryAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+ 'Deliverydt','value' => set_value('Deliverydt',$Deliverydt),'id'=>'Deliverydt', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'Scheduleby','value' => set_value('Scheduleby',$DeliverSchedule),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+ PaymentID] = $pay->PaymentTerms;
+
+
+ endforeach;
+ }
+
+ echo form_dropdown('PaymentTerms', $options6,set_value('PaymentTerms',$Terms),'id="PaymentTerms"' ,'required="true"' ,'class="form-control select2');
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | SNo |
+ Requisition No |
+ Item Code |
+ Item Description |
+ Quantity |
+ UOM |
+ Rate |
+ Basic Amount |
+ Tax Amount |
+ Total Order Amount |
+ Actual Quantity |
+ Received Quantity |
+ Pending Quantity |
+ Action |
+
+
+
+
+
+
+ |
+ ReqNo ?> |
+ MaterialCode ?> |
+ MaterialName ?> |
+ Quantity ?> |
+ UOM ?> |
+ Rate ?> |
+
+ BasicValue ?> |
+
+ Taxamount ?> |
+ TotalValue ?> |
+ Quantity ?> |
+ ReceivedQuantity ?> |
+ Quantity - $record->ReceivedQuantity, 2, '.', ''); ?> |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | |
+
+
+
+
+ BasicValue;
+ $totDiscountAmt = $totDiscountAmt + $record->AfterDiscount;
+ $totPackagingAmt = $totPackagingAmt + $record->AfterPackagingValue;
+ $totCgst = $totCgst + $record->AfterCGST;
+ $totSgst = $totSgst + $record->AfterSGST;
+ $totIgst = $totIgst + $record->AfterIGST;
+
+ $totFreightAmt = $totFreightAmt + $record->AfterFreightValue;
+ $totInsuranceAmt = $totInsuranceAmt + $record->Insurance;
+ $totOrderSummaryAmt = $totOrderSummaryAmt +$record->TotalValue;
+
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount',number_format($totBasicAmt, 2, '.', '')),'id'=>'txtTotBasicAmount', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'txtTotalDiscount','value' => set_value('txtTotalDiscount',number_format($totDiscountAmt, 2, '.', '')),'id'=>'txtTotalDiscount', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalSGST','value' => set_value('txtTotalSGST',number_format($totSgst, 2, '.', '')),'id'=>'txtTotalSGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalIGST','value' => set_value('txtTotalIGST',number_format($totIgst, 2, '.', '')),'id'=>'txtTotalIGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalCGST','value' => set_value('txtTotalCGST',number_format($totCgst, 2, '.', '')),'id'=>'txtTotalCGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+ 'txtTotalPackaing','value' => set_value('txtTotalPackaing',number_format($totPackagingAmt, 2, '.', '')),'id'=>'txtTotalPackaing', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalInsurance','value' => set_value('txtTotalInsurance',number_format($totInsuranceAmt, 2, '.', '')),'id'=>'txtTotalInsurance', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'txtTotalFreight','value' => set_value('txtTotalFreight',number_format($totFreightAmt, 2, '.', '')),'id'=>'txtTotalFreight', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary',number_format($totOrderSummaryAmt, 2, '.', '')),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '3', 'cols' => '40' );
+ echo form_textarea($data);
+ ?>
+
+
+
+
+
+
+ Request On
+ 'Requeston','value' => set_value('Requeston',$Reqon),'id'=>'Requeston', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+ Request By
+ 'RequestBy','value' => set_value('RequestBy', $RequesterName),'id'=>'RequestBy', 'class' => 'form-control' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+ Status
+ $PONOStatus);
+ // echo form_dropdown('Status', $options,set_value('Status'),'id="Status"' ,'required="true"' ,'class="form-control select2')
+
+
+ $data = array('name' => 'Status','value' => set_value('Status',$StatusName),'id'=>'Status', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/application/views/editRevenuepurchaseorder.php~ b/application/views/editRevenuepurchaseorder.php~
new file mode 100755
index 00000000..29d7f10d
--- /dev/null
+++ b/application/views/editRevenuepurchaseorder.php~
@@ -0,0 +1,4363 @@
+
+format('Y-m-d');
+$MaxPoDate = '';
+$AvlAmount = 0;
+$DeliverSchedule='';
+$DeliverOption='';
+$StatusName='';
+
+if(!empty($MaxPODate))
+{
+ foreach ($MaxPODate as $date)
+ {
+ $MaxPoDate = $date->PODate;
+ }
+}
+if(!empty($CompanyDetails))
+{
+ foreach ($CompanyDetails as $Req)
+ {
+ $CompanyAddress = $Req->Address;
+ }
+}
+if(!empty($AvlBudAmt))
+{
+
+ $AvlAmount = $AvlBudAmt;
+
+}
+
+if(!empty($INRSYMBOL))
+{
+
+ foreach($INRSYMBOL as $INRS)
+ {
+ $INRSYM=$INRS->FontCode2000;
+
+ }
+}
+
+foreach ($PaymentTerms as $TER)
+{
+ $Terms=$TER->PaymentTerms;
+}
+
+ $SupId = '';
+ $SupName = '';
+ $Address = '';
+ $PODate = '';
+ $Deliverydt ='';
+ $DeliveryAddress ='';
+ $PONOStatus = '';
+ $PONO = '';
+ $totBasicAmt = 0;
+ $totDiscountAmt = 0.0;
+ $totPackagingAmt = 0.0;
+ $totCgst = 0.0;
+ $totSgst = 0.0;
+ $totIgst = 0.0;
+ $totFreightAmt = 0.0;
+ $totInsuranceAmt = 0.0;
+ $totOrderSummaryAmt = 0.0;
+
+ $ServiceDescription = '';
+ $CapitalRange = '';
+if(!empty($POMaster))
+{
+ foreach ($POMaster as $Req)
+ {
+ $SupId = $Req->SupplierID;
+ $SupName = $Req->SupplierName;
+ $Address = $Req->Address;
+
+ $Pdt = new DateTime($Req->PODate);
+ $PODate = $Pdt->format('Y-m-d');
+ $DeliverOption = $Req->DeliveryOption;
+ $DeliverSchedule = $Req->DeliverySchedule;
+
+ $Ddt = new DateTime($Req->DeliveryDate);
+ $Deliverydt = $Ddt->format('Y-m-d');
+
+ $DeliveryAddress =$Req->DeliveryAddress;
+ $PONOStatus = $Req->StatusCode;
+ $PONO = $Req->PONO;
+ $ServiceDescription = $Req->ServiceDescription;
+ $CapitalRange = $Req->CapitalRange;
+ $StatusName=$Req->StatusName;
+ }
+}
+
+
+
+
+if(!empty($RequistionDetails))
+{
+
+ foreach ($RequistionDetails as $ReqDet)
+ {
+ $Reqonn=new DateTime($ReqDet->ReqDate);
+ $Reqon=$Reqonn->format('Y-m-d');
+
+ // $Pdt = new DateTime($Req->PODate);
+ // $PODate = $Pdt->format('Y-m-d');
+ $Requestedby=$ReqDet->Requestedby;
+ $RequesterName=$ReqDet->FirstName;
+ //$Status=$ReqDet->Status;
+ }
+}
+
+
+// foreach ($POSTATUS as $PST )
+// {
+// $POStatus=$PST->StatusName;
+// }
+
+?>
+
+
+
+
+
+
+
+
+
+ 'form-label-left CreatePO ','name' => 'CreatePO','id' => 'CreatePO');
+
+ echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
+
+
+
+
+
Siddharth Industries - Edit Revenue Purchase Order -
+
+
+
+
+
+
+ 'Selected Requisition Numbers');
+ if(!empty($ReqList))
+ {
+ foreach ($ReqList as $SID):
+
+ $options[$SID->ReqNo] = $SID->ReqNo ;
+ //$ReqType = $SID->ReqType;
+ endforeach;
+ }
+ echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' ,'required="true"' , 'height="400px"' );
+ ?>
+
+
+
+
+ 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+ 'Select Supplier');
+ //print_r( $options);
+
+ if(!empty($Suplist))
+ {
+ foreach ($Suplist as $SID):
+
+
+ $options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
+
+ endforeach;
+ }
+
+ echo form_dropdown('drpSupplier', $options,set_value('drpSupplier',$SupId),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
+
+ ?>
+
+
+
+
+
+ 'POType','value' => set_value('POType',REVENUE),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+ Select Tax Range
+
+
+|
+ 'Range', 'value' => '0', 'checked' => ('0' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Local','onchange'=>'SetVatorCST();')); ?>
+ |
+
+
+ 'Range', 'value' => '1', 'checked' => ('1' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Inter_state','onchange'=>'SetVatorCST();')); ?>
+
+ |
+
+
+
+
+
+
+
+
+
+ Select Delivery By
+
+ |
+ 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?> |
+
+
+ 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?>
+
+
+ |
+
+
+
+
+
+
+
+ 'SupAddress','value' => set_value('SupAddress',$Address),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+ 'DeliveryAddr','value' => set_value('DeliveryAddr',$DeliveryAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+ 'Deliverydt','value' => set_value('Deliverydt',$Deliverydt),'id'=>'Deliverydt', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'Scheduleby','value' => set_value('Scheduleby',$DeliverSchedule),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+ PaymentID] = $pay->PaymentTerms;
+
+
+ endforeach;
+ }
+
+ echo form_dropdown('PaymentTerms', $options6,set_value('PaymentTerms',$Terms),'id="PaymentTerms"' ,'required="true"' ,'class="form-control select2');
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | SNo |
+ Requisition No |
+ Item Code |
+ Item Description |
+ Quantity |
+ UOM |
+ Rate |
+ Basic Amount |
+ Tax Amount |
+ Total Order Amount |
+ Actual Quantity |
+ Received Quantity |
+ Pending Quantity |
+ Action |
+
+
+
+
+
+
+ |
+ ReqNo ?> |
+ MaterialCode ?> |
+ MaterialName ?> |
+ Quantity ?> |
+ UOM ?> |
+ Rate ?> |
+
+ BasicValue ?> |
+
+ Taxamount ?> |
+ TotalValue ?> |
+ Quantity ?> |
+ ReceivedQuantity ?> |
+ Quantity - $record->ReceivedQuantity, 2, '.', ''); ?> |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | |
+
+
+
+
+ BasicValue;
+ $totDiscountAmt = $totDiscountAmt + $record->AfterDiscount;
+ $totPackagingAmt = $totPackagingAmt + $record->AfterPackagingValue;
+ $totCgst = $totCgst + $record->AfterCGST;
+ $totSgst = $totSgst + $record->AfterSGST;
+ $totIgst = $totIgst + $record->AfterIGST;
+
+ $totFreightAmt = $totFreightAmt + $record->AfterFreightValue;
+ $totInsuranceAmt = $totInsuranceAmt + $record->Insurance;
+ $totOrderSummaryAmt = $totOrderSummaryAmt +$record->TotalValue;
+
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount',number_format($totBasicAmt, 2, '.', '')),'id'=>'txtTotBasicAmount', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'txtTotalDiscount','value' => set_value('txtTotalDiscount',number_format($totDiscountAmt, 2, '.', '')),'id'=>'txtTotalDiscount', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalSGST','value' => set_value('txtTotalSGST',number_format($totSgst, 2, '.', '')),'id'=>'txtTotalSGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalIGST','value' => set_value('txtTotalIGST',number_format($totIgst, 2, '.', '')),'id'=>'txtTotalIGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalCGST','value' => set_value('txtTotalCGST',number_format($totCgst, 2, '.', '')),'id'=>'txtTotalCGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+ 'txtTotalPackaing','value' => set_value('txtTotalPackaing',number_format($totPackagingAmt, 2, '.', '')),'id'=>'txtTotalPackaing', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalInsurance','value' => set_value('txtTotalInsurance',number_format($totInsuranceAmt, 2, '.', '')),'id'=>'txtTotalInsurance', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'txtTotalFreight','value' => set_value('txtTotalFreight',number_format($totFreightAmt, 2, '.', '')),'id'=>'txtTotalFreight', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary',number_format($totOrderSummaryAmt, 2, '.', '')),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '3', 'cols' => '40' );
+ echo form_textarea($data);
+ ?>
+
+
+
+
+
+
+ Request On
+ 'Requeston','value' => set_value('Requeston',$Reqon),'id'=>'Requeston', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+ Request By
+ 'RequestBy','value' => set_value('RequestBy', $RequesterName),'id'=>'RequestBy', 'class' => 'form-control' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+ Status
+ $PONOStatus);
+ // echo form_dropdown('Status', $options,set_value('Status'),'id="Status"' ,'required="true"' ,'class="form-control select2')
+
+
+ $data = array('name' => 'Status','value' => set_value('Status',$StatusName),'id'=>'Status', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/application/views/purchaseorder.php b/application/views/purchaseorder.php
index 30bc8ff2..7475e7a5 100755
--- a/application/views/purchaseorder.php
+++ b/application/views/purchaseorder.php
@@ -1,2124 +1,3808 @@
-format('Y-m-d');
-$MaxPoDate = '';
-$AvlAmount = 0;
-$Value="₹";
-if(!empty($MaxPODate))
-{
- foreach ($MaxPODate as $date)
- {
- $MaxPoDate = $date->PODate;
- }
-}
-if(!empty($CompanyDetails))
-{
- foreach ($CompanyDetails as $Req)
- {
- $CompanyAddress = $Req->Address;
- }
-}
-if(!empty($AvlBudAmt))
-{
-
- $AvlAmount = $AvlBudAmt;
-
-}
-
-
-if(!empty($INRSYMBOL))
-{
-
- foreach($INRSYMBOL as $INRS)
- {
- $INRSYM=$INRS->FontCode2000;
-
- }
-}
-
-
-?>
-
-
-
-
- 'form-label-left ServicePO ','name' => 'ServicePO','id' => 'ServicePO');
-
- echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
-
-
-
-
-
-
Siddharth Industries - Service Purchase Order
-
-
-
-
-
-
-
-
-
- 'Selected Requisition Numbers');
- if(!empty($ReqList))
-
- {
- foreach ($ReqList as $SID):
-
- // print_r($SID->ReqNo);
- $options[$SID->ReqNo] = $SID->ReqNo ."-". $SID->ReqBy;
- $ReqType = $SID->ReqType;
- endforeach;
- }
- echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' , 'required="true"');
-
- ?>
-
-
-
-
- 'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
- 'Select Supplier');
- //print_r( $options);
-
- if(!empty($Suplist))
- {
- foreach ($Suplist as $SID):
-
-
- $options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
-
- endforeach;
- }
-
- echo form_dropdown('drpSupplier', $options,set_value('drpSupplier'),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
-
- ?>
-
-
-
-
-
- 'SupAddress','value' => set_value('SupAddress'),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true','rows' => '3', 'cols' => '40');
- echo Form_textarea($data);
- ?>
-
-
-
-
-
-
-
-
- 'POType','value' => set_value('POType',SERVICE),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'DeliveryAddr','value' => set_value('DeliveryAddr',$CompanyAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true', 'rows' => '3', 'cols' => '40');
- echo Form_textarea($data);
- ?>
-
-
-
-
-
- Select Delivery By
-
- |
- "DateRange", "id"=>"Date", "value"=>"0", 'checked'=>set_radio('DateRange', '0', TRUE))); ?> |
-
- "DateRange", "id"=>"Schedule", "value"=>"1", 'checked'=>set_radio('DateRange', '1', FALSE))); ?>
-
- |
-
-
-
-
-
- 'Select Work Status');
- //print_r( $options);
-
- if(!empty($WorkStatus))
- {
- foreach ($WorkStatus as $WID):
-
-
- $optionsWork[$WID->StatusCode] = $WID->StatusName;
-
- endforeach;
- }
-
- echo form_dropdown('workstatus', $optionsWork,set_value('workstatus'),'id="workstatus"' ,'required="true"' ,'class="form-control select2');
-
-
- ?>
-
-
-
-
- 'Deliverydt','value' => set_value('Deliverydt',$CurrentDate),'id'=>'Deliverydt', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
- echo form_input($data);
- ?>
-
-
-
-
- 'Scheduleby','value' => set_value('Scheduleby'),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
- echo Form_textarea($data);
- ?>
-
-
-
-
-
-
-
-
-
-
-
- 'Select Payment Terms ');
- foreach ($Payment as $pay):
-
-
-
- $options6[$pay->PaymentID] = $pay->PaymentTerms;
-
-
- endforeach;
- }
-
- echo form_dropdown('PaymentTerms', $options6,set_value('PaymentTerms'),'id="PaymentTerms"' ,'required="true"' ,'class="form-control select2');
-
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | SNo |
- Requisition No |
- Item Code |
- Item Description |
- Quantity |
- UOM |
- Rate |
- Basic Amount |
- Tax Amount |
- Total Order Amount |
- Action |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount'),'id'=>'txtTotBasicAmount', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
- 'txtTotCgst','value' => set_value('txtTotCgst'),'id'=>'txtTotCgst', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txtTotSgst','value' => set_value('txtTotSgst'),'id'=>'txtTotSgst', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
- 'txtTotIgst','value' => set_value('txtTotIgst'),'id'=>'txtTotIgst', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
- 'TotalOtherAllowances','value' => set_value('TotalOtherAllowances'),'id'=>'TotalOtherAllowances', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
- 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary'),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'ScopeOfWork','value' => set_value('ScopeOfWork'),'id'=>'ScopeOfWork', 'class' => 'form-control' ,'rows' => '10', 'cols' => '40' );
- echo form_textarea($data); ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+format('Y-m-d');
+$MaxPoDate = '';
+$AvlAmount = 0;
+$Value="₹";
+if(!empty($MaxPODate))
+{
+ foreach ($MaxPODate as $date)
+ {
+ $MaxPoDate = $date->PODate;
+ }
+}
+if(!empty($CompanyDetails))
+{
+ foreach ($CompanyDetails as $Req)
+ {
+ $CompanyAddress = $Req->Address;
+ }
+}
+if(!empty($AvlBudAmt))
+{
+
+ $AvlAmount = $AvlBudAmt;
+
+}
+
+
+
+if(!empty($INRSYMBOL))
+{
+
+ foreach($INRSYMBOL as $INRS)
+ {
+ $INRSYM=$INRS->FontCode2000;
+
+ }
+}
+
+
+
+
+
+
+//echo "$INRSYM";
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+ 'form-label-left CreatePO ','name' => 'CreatePO','id' => 'CreatePO');
+
+ echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
+
+
+
+
+
+
Siddharth Industries - Revenue Purchase Order
+
+
+
+
+
+
+ 'Selected Requisition Numbers');
+ if(!empty($ReqList))
+ {
+ foreach ($ReqList as $SID):
+
+ $options[$SID->ReqNo] = $SID->ReqNo ."-". $SID->ReqBy;
+ $ReqType = $SID->ReqType;
+ endforeach;
+ }
+ echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' ,'required="true"' , 'height="400px"' );
+ ?>
+
+
+
+
+ 'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+ 'Select Supplier');
+ //print_r( $options);
+
+ if(!empty($Suplist))
+ {
+ foreach ($Suplist as $SID):
+
+
+ $options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
+
+ endforeach;
+ }
+
+ echo form_dropdown('drpSupplier', $options,set_value('drpSupplier'),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
+
+ ?>
+
+
+
+
+ 'POType','value' => set_value('POType',$ReqType),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ Select Tax Range
+
+ |
+ "Range","id"=>"Local","value"=>"0", 'checked'=>'checked','onchange'=>'SetVatorCST();')); ?> |
+ "Range","id"=>"Inter_state","value"=>"1", 'onchange'=>'SetVatorCST();')); ?>
+ |
+
+
+
+
+
+
+
+
+
+ Select Delivery By
+
+ |
+ "DateRange", "id"=>"Date", "value"=>"0", "checked"=>"checked")); ?> |
+
+ "DateRange", "id"=>"Schedule", "value"=>"1")); ?>
+
+ |
+
+
+
+
+
+
+
+ 'SupAddress','value' => set_value('SupAddress'),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+ 'DeliveryAddr','value' => set_value('DeliveryAddr',$CompanyAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+ 'Deliverydt','value' => set_value('Deliverydt',$CurrentDate),'id'=>'Deliverydt', 'class' => 'form-control' ,'required' => 'true','onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'Scheduleby','value' => set_value('Scheduleby'),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+ Payable Terms
+ 'Select Payment Terms ');
+ foreach ($Payment as $pay):
+
+
+
+ $options6[$pay->PaymentID] = $pay->PaymentTerms;
+
+
+ endforeach;
+ }
+
+ echo form_dropdown('PaymentTerms', $options6,set_value('PaymentTerms'),'id="PaymentTerms"' ,'required="true"' ,'class="form-control select2');
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | SNo |
+ Requisition No |
+ Item Code |
+ Item Description |
+ Quantity |
+ UOM |
+ Rate |
+ Basic Amount |
+ Tax Amount |
+ Total Order Amount |
+ Action |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount'),'id'=>'txtTotBasicAmount', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'txtTotalDiscount','value' => set_value('txtTotalDiscount'),'id'=>'txtTotalDiscount', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalSGST','value' => set_value('txtTotalSGST'),'id'=>'txtTotalSGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalIGST','value' => set_value('txtTotalIGST'),'id'=>'txtTotalIGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalCGST','value' => set_value('txtTotalCGST'),'id'=>'txtTotalCGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+ 'txtTotalPackaing','value' => set_value('txtTotalPackaing'),'id'=>'txtTotalPackaing', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalInsurance','value' => set_value('txtTotalInsurance'),'id'=>'txtTotalInsurance', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalFreight','value' => set_value('txtTotalFreight'),'id'=>'txtTotalFreight', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary'),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction'),'id'=>'txtSpcialInstruction', 'class' => 'form-control' ,'rows' => '8');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/application/views/purchaseorder.php~ b/application/views/purchaseorder.php~
new file mode 100755
index 00000000..7475e7a5
--- /dev/null
+++ b/application/views/purchaseorder.php~
@@ -0,0 +1,3808 @@
+format('Y-m-d');
+$MaxPoDate = '';
+$AvlAmount = 0;
+$Value="₹";
+if(!empty($MaxPODate))
+{
+ foreach ($MaxPODate as $date)
+ {
+ $MaxPoDate = $date->PODate;
+ }
+}
+if(!empty($CompanyDetails))
+{
+ foreach ($CompanyDetails as $Req)
+ {
+ $CompanyAddress = $Req->Address;
+ }
+}
+if(!empty($AvlBudAmt))
+{
+
+ $AvlAmount = $AvlBudAmt;
+
+}
+
+
+
+if(!empty($INRSYMBOL))
+{
+
+ foreach($INRSYMBOL as $INRS)
+ {
+ $INRSYM=$INRS->FontCode2000;
+
+ }
+}
+
+
+
+
+
+
+//echo "$INRSYM";
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+ 'form-label-left CreatePO ','name' => 'CreatePO','id' => 'CreatePO');
+
+ echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
+
+
+
+
+
+
Siddharth Industries - Revenue Purchase Order
+
+
+
+
+
+
+ 'Selected Requisition Numbers');
+ if(!empty($ReqList))
+ {
+ foreach ($ReqList as $SID):
+
+ $options[$SID->ReqNo] = $SID->ReqNo ."-". $SID->ReqBy;
+ $ReqType = $SID->ReqType;
+ endforeach;
+ }
+ echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' ,'required="true"' , 'height="400px"' );
+ ?>
+
+
+
+
+ 'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+ 'Select Supplier');
+ //print_r( $options);
+
+ if(!empty($Suplist))
+ {
+ foreach ($Suplist as $SID):
+
+
+ $options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
+
+ endforeach;
+ }
+
+ echo form_dropdown('drpSupplier', $options,set_value('drpSupplier'),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
+
+ ?>
+
+
+
+
+ 'POType','value' => set_value('POType',$ReqType),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ Select Tax Range
+
+ |
+ "Range","id"=>"Local","value"=>"0", 'checked'=>'checked','onchange'=>'SetVatorCST();')); ?> |
+ "Range","id"=>"Inter_state","value"=>"1", 'onchange'=>'SetVatorCST();')); ?>
+ |
+
+
+
+
+
+
+
+
+
+ Select Delivery By
+
+ |
+ "DateRange", "id"=>"Date", "value"=>"0", "checked"=>"checked")); ?> |
+
+ "DateRange", "id"=>"Schedule", "value"=>"1")); ?>
+
+ |
+
+
+
+
+
+
+
+ 'SupAddress','value' => set_value('SupAddress'),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+ 'DeliveryAddr','value' => set_value('DeliveryAddr',$CompanyAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+ 'Deliverydt','value' => set_value('Deliverydt',$CurrentDate),'id'=>'Deliverydt', 'class' => 'form-control' ,'required' => 'true','onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'Scheduleby','value' => set_value('Scheduleby'),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+ Payable Terms
+ 'Select Payment Terms ');
+ foreach ($Payment as $pay):
+
+
+
+ $options6[$pay->PaymentID] = $pay->PaymentTerms;
+
+
+ endforeach;
+ }
+
+ echo form_dropdown('PaymentTerms', $options6,set_value('PaymentTerms'),'id="PaymentTerms"' ,'required="true"' ,'class="form-control select2');
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | SNo |
+ Requisition No |
+ Item Code |
+ Item Description |
+ Quantity |
+ UOM |
+ Rate |
+ Basic Amount |
+ Tax Amount |
+ Total Order Amount |
+ Action |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount'),'id'=>'txtTotBasicAmount', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'txtTotalDiscount','value' => set_value('txtTotalDiscount'),'id'=>'txtTotalDiscount', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalSGST','value' => set_value('txtTotalSGST'),'id'=>'txtTotalSGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalIGST','value' => set_value('txtTotalIGST'),'id'=>'txtTotalIGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalCGST','value' => set_value('txtTotalCGST'),'id'=>'txtTotalCGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+ 'txtTotalPackaing','value' => set_value('txtTotalPackaing'),'id'=>'txtTotalPackaing', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalInsurance','value' => set_value('txtTotalInsurance'),'id'=>'txtTotalInsurance', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalFreight','value' => set_value('txtTotalFreight'),'id'=>'txtTotalFreight', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary'),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction'),'id'=>'txtSpcialInstruction', 'class' => 'form-control' ,'rows' => '8');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/application/views/revenuepopdf.php b/application/views/revenuepopdf.php
index b71eda3f..4b69b338 100755
--- a/application/views/revenuepopdf.php
+++ b/application/views/revenuepopdf.php
@@ -1,4 +1,4 @@
-
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/application/views/revenuepopdf.php~ b/application/views/revenuepopdf.php~
new file mode 100755
index 00000000..4b69b338
--- /dev/null
+++ b/application/views/revenuepopdf.php~
@@ -0,0 +1,326 @@
+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;
+
+
+ }
+
+ }
+
+
+ ?>
+
+
+
+
+ PURCHASE ORDER - PO NO:
+
+
+
+
+
+
+|
+
+
+ |
+ |
+
+
+|
+ Vendor Address :
+
+ |
+
+ Delivery To :
+
+ |
+
+
+| PO DATE : |
+DELIVERY DATE / SCHEDULE BY : |
+
+
+
+
+
+
+
+
+
+| Requistion Number |
+Requested By |
+Requested Department |
+Cost Center |
+
+
+
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+| # |
+ Item Name |
+ UOM |
+ Qty |
+ Rate In INR |
+ Basic Value In INR |
+ Discount In INR |
+ SGST In INR |
+ CGST In INR |
+ IGST In INR |
+ Packaging In INR |
+ Insurance In INR |
+ Freight In INR |
+ Total Amount In INR |
+
+BasicValue+$record->Taxamount;
+ ?>
+
+ |
+ MaterialName ; ?> |
+ UOM ; ?> |
+ Quantity ; ?> |
+
+ Rate ; ?> |
+ BasicValue;?> |
+ AfterDiscount;?> |
+ AfterSGST ; ?> |
+ AfterCGST ; ?> |
+
+
+ AfterIGST ; ?> |
+ AfterPackagingValue;?> |
+ AfterFreightValue;?> |
+ Insurance;?> |
+ |
+
+
+ BasicValue;
+ $TotalTax = $TotalTax+$record->Taxamount;
+ $OrderValue = $SubTotalAmount + $TotalTax;
+
+ }
+
+
+
+ }
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+|
+
+ Total Amount In Words
+
+
+
+ |
+
+Total Amount Before Tax In INR |
+
+
+
+
+
+| Total Tax Amount In INR |
+
+
+
+
+
+| Total Amount After Tax In INR |
+
+
+
+
+
+|
+
+ Payment Terms
+
+
+
+ |
+
+
+
+ Certified that the particulars given above are true and correct
+
+
+
+
+
+Authorized Signatory
+ |
+
+
+
+Special Instruction:
+
+ReleasedOn, new DateTimeZone('Asia/Kolkata'));
+
+
+ ?>
+
+
+
+
+ Released By : FirstName;?>
+ Released On : format('d-m-Y');?>
+
+
+
+
\ No newline at end of file
diff --git a/application/views/servicePurchaseorder.php b/application/views/servicePurchaseorder.php
index 51ebd2ee..1a02c2f5 100755
--- a/application/views/servicePurchaseorder.php
+++ b/application/views/servicePurchaseorder.php
@@ -39,7 +39,18 @@ if(!empty($INRSYMBOL))
?>
+
+
+
+
+
+
+
+
+
+
+
+ PURCHASE ORDER - PO NO:
+
+
+
+
+
+
+|
+
+
+ |
+ |
+
+
+|
+ Vendor Address :
+
+ |
+
+ Delivery To :
+
+ |
+
+
+| PO DATE : |
+DELIVERY DATE / SCHEDULE BY : |
+
+
+
+
+
+
+
+
+
+
+
+
+| Requistion Number |
+
+Requested By |
+
+Requested Department |
+
+Cost Center |
+
+
+
+
+
+
+
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+| # |
+
+Item Name |
+
+Service Description |
+
+UOM |
+
+Qty |
+
+Rate In INR |
+
+Basic Value In INR |
+
+CGST In INR |
+
+SGST In INR |
+
+IGST In INR |
+
+Other Allow In INR |
+
+Total Amount In INR |
+
+
+
+
+
+
+
+ |
+ MaterialName ; ?> |
+ ServiceMaterialDescription ; ?> |
+ UOM ; ?> |
+ Quantity ; ?> |
+
+ Rate ; ?> |
+ 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;
+ }
+ ?> |
+ After_SGST ; ?> |
+ After_CGST ; ?> |
+ After_IGST ; ?> |
+ otherallowance ; ?> |
+ |
+
+
+ After_SGST;
+ $Cgst =$Cgst + $record->After_CGST;
+ $Igst = $Igst + $record->After_IGST;
+
+
+ }
+
+ $TotalTax =$TotalTax+ $Sgst + $Cgst+$Igst;
+ $OrderValue = $OrderValue + $SubTotalAmount + $TotalTax;
+ }
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+|
+
+
+
+ Total Amount In Words
+
+
+
+
+
+
+
+ |
+
+
+
+Total Amount Before Tax In INR - |
+
+
+
+
+
+
+
+
+
+
+
+| Total Tax Amount In INR - |
+
+
+
+
+
+
+
+
+
+
+
+| Total Amount After Tax In INR - |
+
+
+
+
+
+
+
+
+
+
+
+|
+
+
+
+ Payment Terms
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+ Certified that the particulars given above are true and correct
+
+
+
+
+
+
+
+
+
+
+
+Authorized Signatory
+
+ |
+
+
+
+
+
+
+
+Scope Of Work:
+
+
+
+ ReleasedOn, new DateTimeZone('Asia/Kolkata'));
+
+
+ ?>
+
+
+
+
+ Released By : FirstName;?>
+ Released On : format('d-m-Y');?>
+
+
+
+
+
+
+
\ No newline at end of file