This commit is contained in:
venbatechnologies 2018-05-15 14:18:02 +05:30
parent 2079a7598b
commit 41fc9df7d8
9 changed files with 3920 additions and 3882 deletions

View File

@ -189,7 +189,7 @@ function addfile1()
function addNewServicePurchaseOrder()
{
//echo "t54";
//echo "t54";
//die();
@ -290,12 +290,12 @@ function addfile1()
$DescriptionOfPo = $this->input->post('emergdescofpo');
//create T_Requestion_Master
$Request = array('ReqType'=>$POType, 'RequestedDept'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$RequistionComments,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy,'Schedule_Type'=>$ServiceScheduleType,'NumberOfService'=>$ServiceServiceNo,'Service_Period'=>$ServiceScheduleOptions);
$Req = $this->requistion_model->addRequistion($Request);
$RegNo='';
if(count($Req)>0)
$Request = array('ReqType'=>$POType, 'RequestedDept'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$RequistionComments,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy,'Schedule_Type'=>$ServiceScheduleType,'NumberOfService'=>$ServiceServiceNo,'Service_Period'=>$ServiceScheduleOptions);
$Req = $this->requistion_model->addRequistion($Request);
$RegNo='';
if(count($Req)>0)
{
$RegNo = $Req[0]['ReqNo'];
}
@ -330,7 +330,7 @@ function addfile1()
$AfterSgst = $this->input->post('AfterSgst'.$i);
$AfterIgst = $this->input->post('AfterIgst'.$i);
$OtherAmt = $this->input->post('OtherAmt'.$i);
$CostCenter = $this->input->post('costCode'.$i);
$CostCenter = $this->input->post('costCode'.$i);
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
$ServiceFrequency=$this->input->post('Frequency'.$i).' - '.$this->input->post('FrequencyValue'.$i);
@ -340,7 +340,7 @@ function addfile1()
{
for($j = 1; $j < count($comma_separated); $j++)
{
$deletedRow = $comma_separated[$j];
$deletedRow = $comma_separated[$j];
if($deletedRow == $i )
{
@ -353,22 +353,22 @@ function addfile1()
if($SkipInsert == "False")
{
//add requistion details
$ReqDetails = array('ReqNo'=>$RegNo, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Status'=>$RegDetailsStatus,'UpdatedBy'=>$CreateBy,'UpdatedOn'=>$createddt);
$ReqDetQuery = $this->requistion_model->addRequistionDetails($ReqDetails,$RegNo);
$ItemNo = '';
if(count($ReqDetQuery)>0)
{
$ItemNo = $ReqDetQuery[0]['ItemNo'];
}
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'ServiceMaterialDescription'=>$ServiceMaterialDescription,'ServiceFrequency'=>$ServiceFrequency,'Per'=>$Per,'ItemNo'=>$ItemNo);
//add requistion details
$ReqDetails = array('ReqNo'=>$RegNo, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Status'=>$RegDetailsStatus,'UpdatedBy'=>$CreateBy,'UpdatedOn'=>$createddt);
$ReqDetQuery = $this->requistion_model->addRequistionDetails($ReqDetails,$RegNo);
$ItemNo = '';
if(count($ReqDetQuery)>0)
{
$ItemNo = $ReqDetQuery[0]['ItemNo'];
}
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'ServiceMaterialDescription'=>$ServiceMaterialDescription,'ServiceFrequency'=>$ServiceFrequency,'Per'=>$Per,'ItemNo'=>$ItemNo);
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
$LineItemNo = '';
if(count($POLineItem)>0)
@ -413,22 +413,22 @@ if($POStatus==SPECIAL_PO){
if($POStatus == REQ_DRAFT)
{
// echo 'Emergency Service Purchase Order Saved Successfully!The PO NO Is: '.$PONO;
{
// echo 'Emergency Service Purchase Order Saved Successfully!The PO NO Is: '.$PONO;
echo "<script>alert('You Have Successfully Saved the Purchase order! $PONO');</script>";
redirect('purchaseorder/PurchaseOrderList','refresh');
}
else
{
// echo 'Emergency Service Purchase Order Created Successfully!The PO NO Is: '.$PONO;
}
else
{
// echo 'Emergency Service Purchase Order Created Successfully!The PO NO Is: '.$PONO;
echo "<script>alert('You Have Successfully created the Purchase order! $PONO');</script>";
redirect('purchaseorder/PurchaseOrderList','refresh');
}
}
}
@ -436,19 +436,19 @@ if($POStatus==SPECIAL_PO){
//This used to Create Revenue Emergency Purchase Order
function addNewRevenuePurchaseOrder()
{
function addNewRevenuePurchaseOrder()
{
$txtspl=$this->input->post('txtSpecial');
//echo "Emergency Revenue PO";
$POdt =$this->input->post('PODate');
$PODate = $this->getDateformat($POdt);
//echo "Emergency Revenue PO";
$POdt =$this->input->post('PODate');
$PODate = $this->getDateformat($POdt);
$SupplierID = $this->input->post('drpSupplier');
$DeliveryAddr = $this->input->post('DeliveryAddr');
$dt = $this->input->post('Deliverydt');
$DeliveryOption = $this->input->post('DateRange');
$DeliveryAddr = $this->input->post('DeliveryAddr');
$dt = $this->input->post('Deliverydt');
$DeliveryOption = $this->input->post('DateRange');
if($DeliveryOption==1){
$Deliverydt = '';
$DeliverySchedule = $this->input->post('Scheduleby');
@ -457,26 +457,26 @@ if($POStatus==SPECIAL_PO){
$Deliverydt = $this->getDateformat($dt);
$DeliverySchedule = '';
}
$Modeofshipment=$this->input->post('emergmodeofshipment');
$supplierreference=$this->input->post('emergsupplierreference');
$supplieroffno=$this->input->post('emergsupplierofferno');
$otherreference=$this->input->post('emergotherreference');
$fincap=$this->input->post('emergfincap');
$revenuetype=$this->input->post('PoTypeOptions');
$insurancestatus=$this->input->post('insuranceStatus');
if($insurancestatus == 1){
$insuranceno=$this->input->post('insuranceNo');
}else{
$insuranceno="";
}
$CostCenterName = $this->input->post('CostCenterName');
$POType = $this->input->post('POType');
$PoRange = $this->input->post('txtPoRange');
$SpcialInstruction = $this->input->post('txtSpcialInstruction');
$Modeofshipment=$this->input->post('emergmodeofshipment');
$supplierreference=$this->input->post('emergsupplierreference');
$supplieroffno=$this->input->post('emergsupplierofferno');
$otherreference=$this->input->post('emergotherreference');
$fincap=$this->input->post('emergfincap');
$revenuetype=$this->input->post('PoTypeOptions');
$insurancestatus=$this->input->post('insuranceStatus');
if($insurancestatus == 1){
$insuranceno=$this->input->post('insuranceNo');
}else{
$insuranceno="";
}
$CostCenterName = $this->input->post('CostCenterName');
$POType = $this->input->post('POType');
$PoRange = $this->input->post('txtPoRange');
$SpcialInstruction = $this->input->post('txtSpcialInstruction');
$RequistionComments = "Created Emergency Revenue PO";
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
if($txtspl==0)
{
@ -487,17 +487,17 @@ if($POStatus==SPECIAL_PO){
$POStatus=SPECIAL_PO;
}
//$POStatus = $this->input->post('TextStatus');
//$POStatus = $this->input->post('TextStatus');
$RequestedBy = $this->input->post('drpDepartment');
$CreateBy = $this->session->userdata ( 'userId' );
// $RowCount = $this->input->post('TextRowCount');
// $RowCount = $this->input->post('TextRowCount');
$RowCount=$this->input->post('txtRowCount1');
$BudgetType = $this->input->post('Budget');
//echo $RowCount;
// $DeletedRow = $this->input->post('TextDeletedRowCount');
//echo $RowCount;
// $DeletedRow = $this->input->post('TextDeletedRowCount');
$DeletedRow = $this->input->post('txtDeletedRow1');
@ -506,15 +506,15 @@ $RequestedBy = $this->input->post('drpDepartment');
$splRow = $this->input->post('splrow');
// echo $DeletedRow;
$ReqStatus = REQITEM_Emergency_PO_CREATED;
$Local_Interstate=$this->input->post('Range');
$comma_separated = explode(':', $DeletedRow);
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s');
$PaymentTerms=$this->input->post('PaymentMethod');
$comma_separated = explode(':', $DeletedRow);
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s');
$PaymentTerms=$this->input->post('PaymentMethod');
$OtherPayment=$this->input->post('Otherpayment');
if($POStatus==SPECIAL_PO)
@ -529,95 +529,95 @@ $RequestedBy = $this->input->post('drpDepartment');
//add requistion
$Request = array('ReqType'=>$POType, 'RequestedDept'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$RequistionComments,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy);
$Req = $this->requistion_model->addRequistion($Request);
$RegNo='';
if(count($Req)>0)
//add requistion
$Request = array('ReqType'=>$POType, 'RequestedDept'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$RequistionComments,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy);
$Req = $this->requistion_model->addRequistion($Request);
$RegNo='';
if(count($Req)>0)
{
$RegNo = $Req[0]['ReqNo'];
}
// PO Master
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Supplier_Reference'=>$supplierreference,'Other_Reference'=>$otherreference,'InsuranceNumber'=>$insuranceno,'InsuranceStatus'=>$insurancestatus,'Fincap'=>$fincap,'POSubType'=>$revenuetype,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
//print_r($POList);
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$revenuetype);
$PONO = '';
if(count($POMaster)>0)
{
$PONO = $POMaster[0]['PONO'];
}
//echo $PONO;
// PO Line Items
$RegDetailsStatus=REQITEM_POCREATED;
$LineItemStatus = REQITEM_NEW;
for ($i = 1; $i <= $RowCount; $i++)
{
$MaterialCode = $this->input->post('materialCode'.$i);
$Quantity = $this->input->post('quantity'.$i);
$Reqnumber = $this->input->post('Reqnumber'.$i);
$itemRate = $this->input->post('itemRate'.$i);
$per = $this->input->post('per'.$i);
$DiscountType = $this->input->post('DisType'.$i);
$DiscountValue = $this->input->post('DisVal'.$i);
$AfterDiscount = $this->input->post('AfterDisVal'.$i);
$PackagingOption = $this->input->post('PackOption'.$i);
$PackagingType = $this->input->post('PackType'.$i);
$PackagingValue = $this->input->post('PackVal'.$i);
$AfterPackagingValue = $this->input->post('AfterPackVal'.$i);
$FreightType = $this->input->post('FreightType'.$i);
$FreightValue = $this->input->post('FreightVal'.$i);
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
// PO Master
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Supplier_Reference'=>$supplierreference,'Other_Reference'=>$otherreference,'InsuranceNumber'=>$insuranceno,'InsuranceStatus'=>$insurancestatus,'Fincap'=>$fincap,'POSubType'=>$revenuetype,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
//print_r($POList);
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$revenuetype);
$PONO = '';
if(count($POMaster)>0)
{
$PONO = $POMaster[0]['PONO'];
}
//echo $PONO;
// PO Line Items
$RegDetailsStatus=REQITEM_POCREATED;
$LineItemStatus = REQITEM_NEW;
for ($i = 1; $i <= $RowCount; $i++)
{
$MaterialCode = $this->input->post('materialCode'.$i);
$Quantity = $this->input->post('quantity'.$i);
$Reqnumber = $this->input->post('Reqnumber'.$i);
$itemRate = $this->input->post('itemRate'.$i);
$per = $this->input->post('per'.$i);
$DiscountType = $this->input->post('DisType'.$i);
$DiscountValue = $this->input->post('DisVal'.$i);
$AfterDiscount = $this->input->post('AfterDisVal'.$i);
$PackagingOption = $this->input->post('PackOption'.$i);
$PackagingType = $this->input->post('PackType'.$i);
$PackagingValue = $this->input->post('PackVal'.$i);
$AfterPackagingValue = $this->input->post('AfterPackVal'.$i);
$FreightType = $this->input->post('FreightType'.$i);
$FreightValue = $this->input->post('FreightVal'.$i);
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
$NOOfTrip = $this->input->post('NoOfTrip'.$i);
$InsuranceValue = $this->input->post('Insval'.$i);
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
$revenuedescription = $this->input->post('service_description'.$i);
$CostCenter = $this->input->post('costCode'.$i);
$InsuranceValue = $this->input->post('Insval'.$i);
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
$revenuedescription = $this->input->post('service_description'.$i);
$CostCenter = $this->input->post('costCode'.$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);
$SkipInsert = "False";
if( count($comma_separated) > 0)
{
for($j = 1; $j < count($comma_separated); $j++)
{
$deletedRow = $comma_separated[$j] ;
if($deletedRow == $i )
{
$SkipInsert = "True";
break;
}
}
}
if($SkipInsert == "False")
{
//add requistion details
$ReqDetails = array('ReqNo'=>$RegNo, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Status'=>$RegDetailsStatus,'UpdatedBy'=>$CreateBy,'UpdatedOn'=>$createddt);
$ReqDetQuery = $this->requistion_model->addRequistionDetails($ReqDetails);
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Per'=>$per,'ServiceMaterialDescription'=>$revenuedescription);
//print_r($POLineItemList);
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
$LineItemNo = '';
if(count($POLineItem)>0)
{
$LineItemNo = $POLineItem[0]['LineItemNo'];
}
//echo $LineItemNo;
$SkipInsert = "False";
if( count($comma_separated) > 0)
{
for($j = 1; $j < count($comma_separated); $j++)
{
$deletedRow = $comma_separated[$j] ;
if($deletedRow == $i )
{
$SkipInsert = "True";
break;
}
}
}
if($SkipInsert == "False")
{
//add requistion details
$ReqDetails = array('ReqNo'=>$RegNo, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Status'=>$RegDetailsStatus,'UpdatedBy'=>$CreateBy,'UpdatedOn'=>$createddt);
$ReqDetQuery = $this->requistion_model->addRequistionDetails($ReqDetails);
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Per'=>$per,'ServiceMaterialDescription'=>$revenuedescription);
//print_r($POLineItemList);
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
$LineItemNo = '';
if(count($POLineItem)>0)
{
$LineItemNo = $POLineItem[0]['LineItemNo'];
}
//echo $LineItemNo;
/*----------------------------*/
$logpo =array('PONO'=>$PONO,'Date'=>$PODate,'POType'=>$POType,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'SupplierID'=>$SupplierID,'LineItemNos'=>$LineItemNo);
@ -628,18 +628,18 @@ $RequestedBy = $this->input->post('drpDepartment');
/*----------------------------*/
if(trim($POType) == REVENUE )
{
// echo 'Success';
$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'=>$CreateBy,'CreatedDate'=>$createddt, 'CGST'=>$Cgst,'AfterCGST'=>$AfterCgst,'SGST'=>$Sgst,'AfterSGST'=>$AfterSgst,'IGST'=>$Igst,'AfterIGST'=>$AfterIgst,'NoOfTrip'=>$NOOfTrip);
//print_r($RevenueTaxList);
$RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
//echo 'Revenue tax Success';
}
}
}
if(trim($POType) == REVENUE )
{
// echo 'Success';
$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'=>$CreateBy,'CreatedDate'=>$createddt, 'CGST'=>$Cgst,'AfterCGST'=>$AfterCgst,'SGST'=>$Sgst,'AfterSGST'=>$AfterSgst,'IGST'=>$Igst,'AfterIGST'=>$AfterIgst,'NoOfTrip'=>$NOOfTrip);
//print_r($RevenueTaxList);
$RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
//echo 'Revenue tax Success';
}
}
}
if($txtspl==1 || $txtspl==2)
@ -857,15 +857,15 @@ $RequestedBy = $this->input->post('drpDepartment');
}
//if($result > 0)
//if($result > 0)
// {
echo "<script>alert('You Have Successfully created the Purchase order! $PONO');</script>";
redirect('purchaseorder/PurchaseOrderList','refresh');
redirect('purchaseorder/PurchaseOrderList','refresh');
// }
}
}
/**
@ -939,7 +939,7 @@ $RequestedBy = $this->input->post('drpDepartment');
$result = array();
foreach ($Req as $SID):
$ReqArray[] = $SID->ReqNo ;
$ReqArray[] = $SID->ReqNo ;
$result[] = $this->purchaseorder_model->getRawPOMaterialList($SID->ReqNo);
$ReqType = $SID->ReqType;
//echo $SID->ReqNo;
@ -997,7 +997,7 @@ $RequestedBy = $this->input->post('drpDepartment');
$result = array();
$ReqArray = array();
foreach ($Req as $SID):
$ReqArray[] = $SID->ReqNo ;
$ReqArray[] = $SID->ReqNo ;
$result[] = $this->purchaseorder_model->getRawPOMaterialList($SID->ReqNo);
endforeach;
$data['MaterialList'] = $result;//$this->purchaseorder_model->getRawMaterialList($ReqType,$ReqArray);
@ -1164,17 +1164,17 @@ $RequestedBy = $this->input->post('drpDepartment');
$Designation = $result[$i]['Designation'];
$HTML.="<tr id='".$i."'>
<td align='left'><input type='checkbox' name='chk'".$i." id='chk'".$i."/></td>
<td align='left'><a data-toggle='modal' data-target='#myModal'><u>". $ReqNo."</u></a></td>
<td align='left'>".$ReqType."</td>
<td align='left'>".$Reqedby."</td>
<td align='left'>".$ReqDate."</td>
<td align='left'>".$Status."</td>
<td align='left'>".$Department."</td>
<td align='left'>".$Designation."</td>
</tr>";
<td align='left'><input type='checkbox' name='chk'".$i." id='chk'".$i."/></td>
<td align='left'><a data-toggle='modal' data-target='#myModal'><u>". $ReqNo."</u></a></td>
<td align='left'>".$ReqType."</td>
<td align='left'>".$Reqedby."</td>
<td align='left'>".$ReqDate."</td>
<td align='left'>".$Status."</td>
<td align='left'>".$Department."</td>
<td align='left'>".$Designation."</td>
</tr>";
}
//print_r( $HTML);
die(json_encode(array('ReqList' =>$HTML)));
@ -1198,14 +1198,14 @@ $RequestedBy = $this->input->post('drpDepartment');
$UOM = $result[$i]['UOM'];
$Quantity = $result[$i]['Quantity'];
$HTML.="<tr id='".$i."'>
<td align='left'>".$SNo."</td>
<td align='left'>". $MaterialCode."</td>
<td align='left'>".$MaterialName."</td>
<td align='left'>".$UOM."</td>
<td align='left'>".$Quantity."</td>
</tr>";
<td align='left'>".$SNo."</td>
<td align='left'>". $MaterialCode."</td>
<td align='left'>".$MaterialName."</td>
<td align='left'>".$UOM."</td>
<td align='left'>".$Quantity."</td>
</tr>";
//$index = $index + 1;
@ -1250,7 +1250,7 @@ $RequestedBy = $this->input->post('drpDepartment');
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s');
$Local_Interstate=$this->input->post('Range');
$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 ,'CapitalRange'=>$Local_Interstate );
@ -1300,14 +1300,14 @@ $RequestedBy = $this->input->post('drpDepartment');
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
$InsuranceValue = $this->input->post('Insval'.$i);
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
$CostCenter = $this->input->post('costCode'.$i);
$CostCenter = $this->input->post('costCode'.$i);
$SkipInsert = "False";
if( count($comma_separated) > 0)
{
for($j = 1; $j < count($comma_separated); $j++)
{
$deletedRow = $comma_separated[$j] ;
$deletedRow = $comma_separated[$j] ;
if($deletedRow == $i )
{
@ -1336,7 +1336,7 @@ $RequestedBy = $this->input->post('drpDepartment');
/*--------------*/
if(trim($POType) == REVENUE )
{
// echo 'Success';
// echo 'Success';
$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'=>$CreateBy,'CreatedDate'=>$createddt);
$RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
@ -1379,7 +1379,7 @@ $RequestedBy = $this->input->post('drpDepartment');
$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');
$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,'CapitalRange'=>$Local_Interstate );
@ -1429,7 +1429,7 @@ $RequestedBy = $this->input->post('drpDepartment');
$InsuranceValue = $this->input->post('Insval'.$i);
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
$POLineItemNo = $this->input->post('LineItemNo'.$i);
$CostCenter = $this->input->post('costCode'.$i);
$CostCenter = $this->input->post('costCode'.$i);
$LineItemNo = '';
@ -1453,7 +1453,7 @@ $RequestedBy = $this->input->post('drpDepartment');
{
for($j = 1; $j < count($comma_separated); $j++)
{
$deletedRow = $comma_separated[$j] ;
$deletedRow = $comma_separated[$j] ;
if($deletedRow == $i )
{
@ -1547,7 +1547,7 @@ $RequestedBy = $this->input->post('drpDepartment');
public function servicepoprint($PONO)
{
// $this->load->view('includes/pdfheader');
// $this->load->view('includes/pdfheader');
// Load the pdf page with multiviews
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();

File diff suppressed because it is too large Load Diff

View File

@ -308,6 +308,9 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
{
$ItemNo = $RetItemNo[0]['ItemNo'];
}
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency,'ServiceMaterialDescription'=>$ItemDescription,'Per'=>$Per,'ItemNo'=>$ItemNo);
@ -320,6 +323,13 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
$LineItemNo = $POLineItem[0]['LineItemNo'];
}
//echo $LineItemNo;
/*---------*/
$logpo =array('PONO'=>$PONO,'Date'=>$PODate,'POType'=>$POType,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'SupplierID'=>$SupplierID,'LineItemNos'=>$LineItemNo);
$addlog= $this->purchaseorder_model->newlogpo($logpo);
/*---------*/
if(trim($POType) == SERVICE )
{

View File

@ -28,8 +28,8 @@ class purchaseorder_model extends CI_Model
function updateReqDetails($Reqnumber,$MaterialCode,$ReqDetail){
//echo'hi';
$this->db->where('ReqNo',$Reqnumber,'MaterialCode',$MaterialCode);
//$this->db->where('MaterialCode',$MaterialCode);
$this->db->where('ReqNo',$Reqnumber);
$this->db->where('MaterialCode',$MaterialCode);
// $this->db->where('Quantity',$Quantity);
$this->db->update('T_Requestion_Details',$ReqDetail);
@ -63,9 +63,9 @@ Where IGRM.PONO = ? ';
// echo $IGRItemNo;
// echo $IGRNO;
// die();
$this->db->where('IGRItemNo',$IGRItemNo,'IGRNO',$IGRNO,'MaterialCode',$MaterialCode);
$this->db->where('IGRItemNo',$IGRItemNo);
$this->db->where('IGRNO',$IGRNO);
$this->db->where('MaterialCode',$MaterialCode);
$this->db->update('T_IGR_Details',$IGRDs);
$r = $this->db->affected_rows();
@ -76,6 +76,9 @@ Where IGRM.PONO = ? ';
}

View File

@ -2350,7 +2350,13 @@ $(document).ready(function () {
<td><?php echo $inde; ?></td>
<td><?php echo empty($oldpo->logDate)?"-":date('d-m-Y',strtotime($oldpo->logDate)); ?></td>
<?php if($oldpo->logDate !='-'){
$logdate = date('d-m-Y',strtotime($oldpo->logDate));
}else{
$logdate = '-';
}?>
<td><?=$logdate;?></td>
<td><?php echo $oldpo->Lqty;?></td>
<td><?php echo $oldpo->logRate?></td>
<td><?php echo $oldpo->LSuppid?></td>

File diff suppressed because it is too large Load Diff

View File

@ -3836,7 +3836,13 @@ $("#PaymentMethod").select2();
<td><?php echo $inde; ?></td>
<td><?php echo empty($oldpo->logDate)?"-":date('d-m-Y',strtotime($oldpo->logDate)); ?></td>
<?php if($oldpo->logDate !='-'){
$logdate = date('d-m-Y',strtotime($oldpo->logDate));
}else{
$logdate = '-';
}?>
<td><?=$logdate;?></td>
<td><?php echo $oldpo->Lqty;?></td>
<td><?php echo $oldpo->logRate?></td>
<td><?php echo $oldpo->LSuppid?></td>

View File

@ -4205,6 +4205,7 @@ function calculateEditTaxValue()
</div>
</div>
<!--################################################################## -->
<div class="col-md-12" id="editpodiv">
<div class="col-md-12"><label>Editable POScreen</label>
<table id="edittable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
@ -4236,9 +4237,14 @@ function calculateEditTaxValue()
<tr id="<?php echo $inde ; ?>">
<td><?php echo $inde; ?></td>
<td><?php echo empty($oldpo->logDate)?"-":date('d-m-Y',strtotime($oldpo->logDate)); ?></td>
<?php if($oldpo->logDate !='-'){
$logdate = date('d-m-Y',strtotime($oldpo->logDate));
}else{
$logdate = '-';
}?>
<td><?=$logdate;?></td>
<td><?php echo $oldpo->Lqty;?></td>
<td><?php echo $oldpo->logRate?></td>
<td><?php echo $oldpo->LSuppid?></td>

View File

@ -3104,7 +3104,13 @@ echo form_textarea($data);
<td><?php echo $inde; ?></td>
<td><?php echo empty($oldpo->logDate)?"-":date('d-m-Y',strtotime($oldpo->logDate)); ?></td>
<?php if($oldpo->logDate !='-'){
$logdate = date('d-m-Y',strtotime($oldpo->logDate));
}else{
$logdate = '-';
}?>
<td><?=$logdate;?></td>
<td><?php echo $oldpo->Lqty;?></td>
<td><?php echo $oldpo->logRate?></td>
<td><?php echo $oldpo->LSuppid?></td>