AMENDMENT
This commit is contained in:
parent
4ed9550af1
commit
f57b3c8b0f
@ -63,9 +63,21 @@ class amendmentpurchaseorder extends BaseController
|
||||
Start here */
|
||||
$ReqDetails = $this->purchaseorder_model->getRequistDetails($ReqArray);
|
||||
$data['RequistionDetails'] = $ReqDetails;
|
||||
// $data['RequistionDetails'] = $ReqDetails;
|
||||
foreach ($data['RequistionDetails'] as $ReqDet)
|
||||
{
|
||||
|
||||
$Status=$ReqDet->Status;
|
||||
}
|
||||
|
||||
$data['POSTATUS']=$this->purchaseorder_model->GetPOStatus($Status);
|
||||
|
||||
foreach ($data['POSTATUS'] as $POST)
|
||||
{
|
||||
$Status=$POST->StatusName;
|
||||
}
|
||||
$CostCode = '';
|
||||
|
||||
$this->load->model('costcenter_model');
|
||||
$this->load->model('costcenter_model');
|
||||
$FYStart = '';
|
||||
$FYEnd = '';
|
||||
$FiscalYear = $this->costcenter_model->getFiscalYear();
|
||||
@ -80,19 +92,10 @@ class amendmentpurchaseorder extends BaseController
|
||||
}
|
||||
|
||||
$FYdt = $FYStart." - ".$FYEnd ;
|
||||
|
||||
|
||||
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$currencycode = '';
|
||||
$Year = $dt->format('Y');
|
||||
|
||||
foreach ($ReqDetails as $Rs):
|
||||
$CostCode = $Rs->CostCenterCode;
|
||||
endforeach;
|
||||
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
|
||||
|
||||
foreach ($ReqDetails as $Rs):
|
||||
$CostCode = $Rs->CostCenterCode;
|
||||
endforeach;
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
|
||||
if(count($AvlBudget)>0)
|
||||
{
|
||||
@ -130,8 +133,6 @@ class amendmentpurchaseorder extends BaseController
|
||||
|
||||
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableImportBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
|
||||
|
||||
|
||||
//print_r($AvlBudget);
|
||||
if(count($AvlBudget)>0)
|
||||
@ -177,7 +178,7 @@ class amendmentpurchaseorder extends BaseController
|
||||
{
|
||||
$CapitalRange = $_GET['CapitalRange'];
|
||||
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
|
||||
|
||||
if(count($AvlBudget)>0)
|
||||
@ -265,11 +266,11 @@ class amendmentpurchaseorder extends BaseController
|
||||
$predeliverydate=$this->input->post('beforeDeliverydt');
|
||||
$preschedule=$this->input->post('beforeScheduleby');
|
||||
//$Deliverydt = $this->getDateformat($dt);
|
||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||
$DeliverySchedule1 = $this->input->post('Scheduleby');
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
|
||||
if($DeliveryOption==1){
|
||||
$Deliverydt = '';
|
||||
$Deliverydt=null;
|
||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||
}
|
||||
else{
|
||||
@ -277,35 +278,36 @@ class amendmentpurchaseorder extends BaseController
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
|
||||
//$predeliverydate=$this->getDateformat($predeliverydate);
|
||||
|
||||
|
||||
|
||||
$POType = $this->input->post('POType');
|
||||
$PoRange = $this->input->post('txtPoRange');
|
||||
$PaymentTermsText=$this->input->post('beforePaymentTermsText');
|
||||
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||
$Otherpayment=$this->input->post('Otherpayment');
|
||||
$Otherpaymentamend=$this->input->post('Otherpayment');
|
||||
//echo $Otherpayment;
|
||||
$prePaymentTerms=$this->input->post('beforePaymentTerms');
|
||||
$preTotalOdervalue=$this->input->post('preTotalOdervalue');
|
||||
$MAD.="Amended Total Order Value: :" . $preTotalOdervalue ."<br>";
|
||||
$testdate=date("Y-m-d");
|
||||
if($PaymentTerms!=$prePaymentTerms)
|
||||
{
|
||||
$MAD.="Amended PaymentTerms : ". $PaymentTermsText ."<br>";
|
||||
if($prePaymentTerms != 'PT08'){ $Otherpaymentamend='';}
|
||||
$MAD.="Amended PaymentTerms : ". $PaymentTermsText . $Otherpaymentamend ."<br>";
|
||||
}
|
||||
|
||||
if(($predeliverydate != $testdate)&&($dt) != ($predeliverydate))
|
||||
if((($predeliverydate != $testdate)&&($dt != $predeliverydate))|| ($DeliverySchedule1 != $preschedule))
|
||||
{
|
||||
|
||||
//$predeliverydate = $this->getDateformat($dt);
|
||||
$MAD.='Amended Delivery Date : ' . $predeliverydate . '<br>' ;
|
||||
|
||||
$MAD.='Amended Delivery Option : ' . $predeliverydate . $preschedule . '<br>' ;
|
||||
}
|
||||
if($DeliverySchedule != $preschedule)
|
||||
{
|
||||
$MAD.="Amended Schedule : " . $preschedule."<br>";
|
||||
}
|
||||
// echo "MAD is:" . $MAD;
|
||||
// die();
|
||||
|
||||
$SpecialInstruction = $this->input->post('txtSpcialInstruction');//$_POST['txtSpcialInstruction'];//$this->input->post('txtSpcialInstruction');//t->post('txtSpcialInstruction'));
|
||||
|
||||
// echo $SpecialInstruction;
|
||||
|
||||
|
||||
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
||||
$POStatus = $this->input->post('txtStatus');
|
||||
@ -313,15 +315,21 @@ class amendmentpurchaseorder extends BaseController
|
||||
$updatedBy = $this->session->userdata ( 'userId' );
|
||||
|
||||
$RowCount = $this->input->post('txtRowCount');
|
||||
//echo "Rowcount is" . $RowCount;
|
||||
//die();
|
||||
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
// PO Master
|
||||
// PO Master
|
||||
$POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID,'POType'=>$POType,'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'PaymentTerms'=>$PaymentTerms,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpecialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'AmendedDetails'=>$MAD);
|
||||
// print_r($POMaster);
|
||||
// die();
|
||||
if(empty($Deliverydt))
|
||||
{
|
||||
$Deliverydt=null;
|
||||
}
|
||||
|
||||
if($PaymentTerms != 'PT08'){
|
||||
$Otherpayment='';
|
||||
|
||||
}
|
||||
|
||||
$POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID,'POType'=>$POType,'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'PaymentTerms'=>$PaymentTerms,'PaymentOtherDescription'=>$Otherpayment,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpecialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'AmendedDetails'=>$MAD);
|
||||
//print_r($POMaster);
|
||||
|
||||
|
||||
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster,$updatedBy,$PONO);
|
||||
@ -381,6 +389,7 @@ class amendmentpurchaseorder extends BaseController
|
||||
$FreightValue = $this->input->post('FreightVal'.$i);
|
||||
$preFreightValue = $this->input->post('beforeFreightVal'.$i);
|
||||
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
|
||||
$NoofTrips = $this->input->post('Nooftrips'.$i);
|
||||
$InsuranceValue = $this->input->post('Insval'.$i);
|
||||
$preInsuranceValue = $this->input->post('beforeInsval'.$i);
|
||||
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
|
||||
@ -467,7 +476,7 @@ class amendmentpurchaseorder extends BaseController
|
||||
}
|
||||
|
||||
|
||||
$RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'Vat'=>$VatValue,'AfterVAT'=>$AfterVatValue,'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,'NoOfTrip'=>$NoofTrips,'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'SGST'=>$VatValue,'AfterSGST'=>$AfterVatValue,'CGST'=>$GSTValue,'AfterCGST'=>$AfterGSTValue,'IGST'=>$OtherTaxValue,'AfterIGST'=>$AfterOtherTaxValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt);
|
||||
// print_r($RevenueTaxList);
|
||||
$RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
|
||||
|
||||
@ -492,52 +501,47 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
|
||||
if($DeliveryOption==1){
|
||||
$Deliverydt = '';
|
||||
$Deliverydt =null;
|
||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||
}
|
||||
else{
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
// echo "IF" . $Deliverydt;
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
|
||||
$ddate=$this->input->post('Deliverydt');
|
||||
//echo "current Date is:-" . $ddate . "<br>";
|
||||
|
||||
$beforeddate=$this->input->post('beforeDeliverydt');
|
||||
//echo $beforeddate."<br>";
|
||||
|
||||
$testdate=date("Y-m-d");
|
||||
//echo "Today date:-" . $testdate ."<br>";
|
||||
|
||||
$dschedule=$this->input->post('Scheduleby');
|
||||
//echo "$dschedule";
|
||||
|
||||
$beforedschedule=$this->input->post('beforeScheduleby');
|
||||
//echo "beforedate is:-" . $beforeddate;
|
||||
|
||||
if(($beforeddate != $testdate) && ($ddate != $beforeddate))
|
||||
$preTotalordervalue=$this->input->post('preTotalordervalue');
|
||||
|
||||
$MAD.="Amended Total OrderValue: " . $preTotalordervalue . "<br>";
|
||||
if((($beforeddate != $testdate) && ($ddate != $beforeddate))||($dschedule != $beforedschedule))
|
||||
{
|
||||
$MAD.="Amended Delivery Date : " . $beforeddate . "<br>";
|
||||
$MAD.="Amended DeliveryOption : " . $beforeddate . $beforedschedule."<br>";
|
||||
}
|
||||
|
||||
if($dschedule != $beforedschedule)
|
||||
{
|
||||
$MAD.="Amended Delivery Schedule : " . $beforedschedule . "<br>";
|
||||
}
|
||||
// echo "MAD IS:-".$MAD;
|
||||
// die();
|
||||
// if(($ddate != $beforeddate) || ($dschedule != $beforedschedule) )
|
||||
// if($dschedule != $beforedschedule)
|
||||
// {
|
||||
// $beforeddate2=new DateTime($beforeddate, new DateTimeZone('Asia/Kolkata'));
|
||||
// $beforeddate3 = $beforeddate2->format('d-m-Y');
|
||||
// echo $beforeddate3;
|
||||
|
||||
// //die();
|
||||
// $MAD.="Amended Delivery Option : " . $beforeddate ."".$beforedschedule. "<br>";
|
||||
// $MAD.="Amended DeliveryOption : " . $beforedschedule . $beforeddate."<br>";
|
||||
// }
|
||||
|
||||
|
||||
$PaymentTermsText=$this->input->post('beforePaymentTermsText');
|
||||
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||
$Otherpayment=$this->input->post('Otherpayment');
|
||||
$Otherpaymentamend=$this->input->post('Otherpayment');
|
||||
$beforePaymentTerms=$this->input->post('beforePaymentTerms');
|
||||
if($PaymentTerms != $beforePaymentTerms)
|
||||
{
|
||||
$MAD.="Amended PaymentTerms : ". $PaymentTermsText ."<br>";
|
||||
if($beforePaymentTerms != 'PT08'){ $Otherpaymentamend='';}
|
||||
$MAD.="Amended PaymentTerms : ". $PaymentTermsText . $Otherpaymentamend."<br>";
|
||||
}
|
||||
//echo "MAD IS" . $MAD . "<br>";
|
||||
|
||||
@ -553,13 +557,18 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
$WorkStatus=$this->input->post('workstatus');
|
||||
|
||||
|
||||
// PO Master
|
||||
$POMaster = array('ParentPO'=>$PONO,'POType'=>$POType,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$scopeofwork,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$WorkStatus,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'AmendedDetails'=>$MAD);
|
||||
if(empty($Deliverydt))
|
||||
{
|
||||
$Deliverydt=null;
|
||||
}
|
||||
if($PaymentTerms != 'PT08'){
|
||||
$Otherpayment='';
|
||||
|
||||
}
|
||||
$POMaster = array('ParentPO'=>$PONO,'POType'=>$POType,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$scopeofwork,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'PaymentOtherDescription'=>$Otherpayment,'ServiceWorkStatus'=>$WorkStatus,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'AmendedDetails'=>$MAD);
|
||||
|
||||
// print_r($POMaster);
|
||||
// die();
|
||||
//print_r($POMaster);
|
||||
|
||||
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster,$updatedBy,$PONO);
|
||||
//print_r($LastPO);
|
||||
@ -583,6 +592,7 @@ function UpdateAmendServicePurchaseOrder()
|
||||
//echo "Inside Loop";
|
||||
$CAD='';
|
||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||
$MaterialName=$this->input->post('materialName'.$i);
|
||||
$Quantity = $this->input->post('quantity'.$i);
|
||||
$beforeQuantity = $this->input->post('beforequantity'.$i);
|
||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||
@ -628,7 +638,8 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$rowspanvalue++;
|
||||
$CAD.="<tr><td>Amended Rate : " . $beforeitemRate ."</td><td>Current Rate : " . $itemRate . "</td></tr>";
|
||||
}
|
||||
if(($SGST != $beforeSGST) && ($AfterSGST != $beforeSGSTvalue))
|
||||
|
||||
if(($SGST != $beforeSGST) && ($AfterSGST != $beforeSGSTvalue))
|
||||
{
|
||||
$rowspanvalue+=2;
|
||||
$CAD.="<tr><td>Amended SGST% : " . $beforeSGST ."</td><td>Current SGST% : " . $SGST . "</td></tr><tr><td>Amended SGST value : " . $beforeSGSTvalue ."</td><td>Current SGST value: " . $AfterSGST . "</td></tr>";
|
||||
@ -654,12 +665,12 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$CAD2='';
|
||||
$CAD2=$CAD;
|
||||
$CAD='';
|
||||
$CAD="<tr><td rowspan=". $rowspanvalue .">".$MaterialCode."</td></tr>";
|
||||
$CAD="<tr><td rowspan=". $rowspanvalue .">".$MaterialCode."-".$MaterialName."</td></tr>";
|
||||
$CAD.=$CAD2;
|
||||
}
|
||||
|
||||
// echo "<br>CAD IS" . $CAD . "<br>";
|
||||
|
||||
//echo "<br>CAD IS" . $CAD . "<br>";
|
||||
|
||||
$POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'ServiceMaterialDescription'=>$servicematerialdescription,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency,'ReceivedQuantity'=>$RecQtyvalue,'AmendedDetails'=>$CAD);
|
||||
//print_r($POLineItemList);
|
||||
|
||||
@ -689,24 +700,28 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$PONO =$this->input->post('txtPONO');
|
||||
//echo $PONO."--";
|
||||
$MAD='';
|
||||
|
||||
$DeliverySchedule = '';
|
||||
$POdt =$this->input->post('PODate');
|
||||
$PODate = $this->getDateformat($POdt);
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$DeliveryAddr = $this->input->post('DeliveryAddr');
|
||||
$dt = $this->input->post('Deliverydt');
|
||||
|
||||
$dt = $this->input->post('Deliverydate');
|
||||
//echo $dt . "-";
|
||||
//die();
|
||||
$POType = $this->input->post('POType');
|
||||
$PoRange = $this->input->post('capitalType');
|
||||
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
$Deliverydt = '';
|
||||
if($DeliveryOption==1){
|
||||
$Deliverydt = '';
|
||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||
if(($DeliveryOption==1)||($DeliveryOption==2)){
|
||||
$Deliverydt = null;
|
||||
|
||||
if($DeliveryOption==1){
|
||||
$DeliverySchedule = $this->input->post('Scheduleby');}
|
||||
}
|
||||
else{
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
|
||||
@ -716,23 +731,45 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$prePaymentmethod=$this->input->post('beforePaymentmethod');
|
||||
$prePaymentmethodtext=$this->input->post('beforePaymentTermsText');
|
||||
|
||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||
$DeliverySchedule1 = $this->input->post('Scheduleby');
|
||||
$preDeliverySchedule = $this->input->post('beforeSchedule');
|
||||
$PlaceOforigin = $this->input->post('PlaceOforigin');
|
||||
|
||||
$preDate = $this->input->post('beforeDate');
|
||||
$Date = $this->input->post('Deliverydate');
|
||||
$Otherpayment=$this->input->post('Otherpayment');
|
||||
$Otherpaymentamend=$this->input->post('Otherpayment');
|
||||
$PreServiceTotalorder = $this->input->post('preServiceTotalorderValue');//For Domestic Pre Total Value
|
||||
$Totalserviceorder = $this->input->post('Totalservicesummary');//For Domestic Current Total value
|
||||
//echo "Tjb" . $Totalserviceorder."--" . $PreServiceTotalorder;die();
|
||||
$TotalCapitalorder= $this->input->post('CapitalToatlOrder');//For International total CapitalOrder
|
||||
$preTotalCapitalorder= $this->input->post('preinterTotalorderValue');//For International pre total CapitalOrder
|
||||
//echo $TotalCapitalorder . "-" . $preTotalCapitalorder;
|
||||
if($PoRange==1){
|
||||
$MAD.="Amended TotalOrder Vale: " . $PreServiceTotalorder . "<br>";
|
||||
}else if($PoRange==0){
|
||||
$MAD.="Amended TotalOrder Vale: " . $preTotalCapitalorder . "<br>";
|
||||
}
|
||||
|
||||
if($PaymentMethod != $prePaymentmethod)
|
||||
{
|
||||
if($prePaymentmethod != 'PT08'){ $Otherpaymentamend='';}
|
||||
$MAD.="Amended Paymemnt Terms : " .$prePaymentmethodtext."<br>";
|
||||
}
|
||||
if($predispatch != $curdispatch)
|
||||
{
|
||||
$MAD.="Amended Dispatch Instruction : " .$predispatch."<br>";
|
||||
$MAD.="Amended Delivery Option : " .$predispatch.$preDeliverySchedule.$preDate."<br>";
|
||||
}
|
||||
if($DeliverySchedule != $preDeliverySchedule)
|
||||
if($DeliverySchedule1!= $preDeliverySchedule)
|
||||
{
|
||||
$MAD.="Amended Schedule : " .$preDeliverySchedule."<br>";
|
||||
$MAD.="Amended DeliveyOption : " .$preDeliverySchedule.$preDate.$predispatch."<br>";
|
||||
}
|
||||
if($preDate != $Date)
|
||||
{
|
||||
$MAD.="Amended DeliveyOption : " .$preDate.$preDeliverySchedule."<br>";
|
||||
}
|
||||
//echo "<br><br>" . $MAD;
|
||||
//die();
|
||||
|
||||
$capitalType = $this->input->post('capitalType');
|
||||
$currencytypeID = $this->input->post('currencytype');
|
||||
@ -749,12 +786,15 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$ExchangeRate=$this->input->post('ExchangeRt');
|
||||
}
|
||||
|
||||
// $PayableAT = $this->input->post('PayableAT');
|
||||
|
||||
|
||||
//$PaymentDate=$this->input->post('PaymentDate');
|
||||
|
||||
$SpcialInstruction = $this->input->post('txtSpcialInstruction');
|
||||
$TotalOrder = $this->input->post('CapitalToatlOrder');
|
||||
|
||||
if($PoRange==1){
|
||||
$FinalTotalOrder = $Totalserviceorder;
|
||||
}else if($PoRange==0)
|
||||
{
|
||||
$FinalTotalOrder=$TotalCapitalorder;
|
||||
}
|
||||
$POStatus = $this->input->post('txtStatus');
|
||||
|
||||
|
||||
@ -765,10 +805,18 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$createddt = $dt->format('Y-m-d H:i:s');
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
|
||||
$POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'POType'=>$POType,'PODate'=>$PODate,'Status'=>PO_RELEASED,'CapitalRange'=>$PoRange,'ExchangeRate'=>$ExchangeRate,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CurrencyType'=>$currencytypeID,'AmendedDetails'=>$MAD,'Import_DispatchDetails'=>$curdispatch,'Import_PlaceofOrgin'=>$PlaceOforigin);
|
||||
//echo "FINAL-".$Deliverydt;
|
||||
if(empty($Deliverydt)){
|
||||
$Deliverydt=null;
|
||||
//echo "*INSIDE IF" .$Deliverydt;
|
||||
}
|
||||
// echo "*" .$Deliverydt;
|
||||
if($PaymentMethod != 'PT08'){
|
||||
$Otherpayment='';
|
||||
}
|
||||
$POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$FinalTotalOrder,'POType'=>$POType,'PODate'=>$PODate,'Status'=>PO_RELEASED,'CapitalRange'=>$PoRange,'ExchangeRate'=>$ExchangeRate,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'PaymentOtherDescription'=>$Otherpayment,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CurrencyType'=>$currencytypeID,'AmendedDetails'=>$MAD,'Import_DispatchDetails'=>$curdispatch,'Import_PlaceofOrgin'=>$PlaceOforigin);
|
||||
// print_r($POMaster);
|
||||
// die();
|
||||
|
||||
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster,$CreateBy,$PONO);
|
||||
|
||||
foreach($LastPO as $PO):
|
||||
@ -871,7 +919,9 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$rowspanvalue++;
|
||||
$CAD.="<tr><td>Amended Rate : " . $preitemRate ."</td><td>Current Rate : " . $itemRate . "</td></tr>";
|
||||
}
|
||||
if(($SGST != $preSGST) && ($SGSTvalue != $preSGSTvalue))
|
||||
|
||||
if($PoRange==1){
|
||||
if(($SGST != $preSGST) && ($SGSTvalue != $preSGSTvalue))
|
||||
{
|
||||
$rowspanvalue+=2;
|
||||
$CAD.="<tr><td>Amended SGST% : " . $preSGST ."</td><td>Current SGST% : " . $SGST . "</td></tr><tr><td>Amended SGST value : " . $preSGSTvalue ."</td><td>Current SGST value: " . $SGSTvalue . "</td></tr>";
|
||||
@ -891,6 +941,7 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$rowspanvalue++;
|
||||
$CAD.="<tr><td>Amended OtherAllowances : " . $preotherallowance ."</td><td>Current OtherAllowances : " . $otherallowance . "</td></tr>";
|
||||
}
|
||||
}
|
||||
if($rowspanvalue>0)
|
||||
{
|
||||
$rowspanvalue++;
|
||||
@ -901,10 +952,10 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$CAD.=$CAD2;
|
||||
}
|
||||
|
||||
|
||||
//echo $CAD;
|
||||
|
||||
$POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'AmendedDetails'=>$CAD);
|
||||
//print_r($POLineItemList);
|
||||
// print_r($POLineItemList);
|
||||
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
|
||||
@ -918,12 +969,12 @@ function UpdateAmendServicePurchaseOrder()
|
||||
if(trim($POType) == CAPITAL )
|
||||
{
|
||||
$ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'CGST'=>$CGST,'After_CGST'=>$CGSTvalue,'SGST'=>$SGST,'After_SGST'=>$SGSTvalue,'IGST'=>$IGST,'After_IGST'=>$IGSTvalue, 'otherallowance'=>$otherallowance,'TotalValue'=>$TotalServiceOrderValue,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt);
|
||||
//print_r($ServiceTaxList);
|
||||
// print_r($ServiceTaxList);
|
||||
$ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
||||
//echo "Service";
|
||||
//print_r($ServiceTax);
|
||||
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'AfterLandingCharge'=>$AfterLandingCharge,'AfterHighSeasSalesCharge'=>$AfterHighSeas,'HighSeasSalesCharge'=>$HighSeas,'CustomDuty'=>$CustomDuty,'AfterCustomDuty'=>$AfterCustomDuty,'ExciseDuty'=>$ExciseDuty,'AfterExciseDuty'=>$AfterExciseDuty,'ExciseDutyEdCess'=>$ExciseDutyEd,'AfterExciseDutyEdCess'=>$AfterExciseDutyEd,'ExciseDutySHCess'=>$ExciseDutySH,'CustomEdCess'=>$CustomEd,'CustomSHCess'=>$CustomSH,'AddlExciseDuty'=>$AddAdtional,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'AfterExciseDutySHCess'=>$AfterExciseDutySH,'AfterAddlExciseDuty'=>$AfterAddAdtional,'Grossdutypayable'=>$Grossdutypayable,'AvailableModvat'=>$AvailableModvat,'Grossexpensesduetocustomduty'=>$Grossexpensesduetocustomduty,'purchaseratePerKG'=>$purchaseratePerKG,'CustomDutyExpensesPerKG'=>$CustomDutyExpensesPerKG,'RMCIncludingCustomersPerKG'=>$RMCIncludingCustomersPerKG,'QuantityKG'=>$QuantityKG,'AfterCustomSHCess'=>$AfterCustomSH,'AfterCustomEdCess'=>$AfterCustomEd,'TotalValue'=>$Totalvalueitem);
|
||||
//print_r($ImportTaxList);
|
||||
print_r($ImportTaxList);
|
||||
//die();
|
||||
|
||||
|
||||
|
||||
@ -568,7 +568,7 @@ function purchaseorderListing($forwhat='')
|
||||
function GetServicePurchaseOrder($PONO = '')
|
||||
{
|
||||
$this->db->distinct();
|
||||
$this->db->select('ReqNo,POMast.PONO,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,POMast.PaymentTerms,POMast.ExchangeRate,POMast.UpdatedOn,Stat.StatusCode,POMast.ServiceWorkStatus,POMast.*');
|
||||
$this->db->select('ReqNo,POMast.PONO,POMast.PaymentTerms,POMast.PaymentOtherDescription,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,POMast.PaymentTerms,POMast.ExchangeRate,POMast.UpdatedOn,Stat.StatusCode,POMast.ServiceWorkStatus,POMast.*');
|
||||
$this->db->from('T_PurchaseOrder_Master POMast');
|
||||
$this->db->join('T_SupplierDetailsN supp', 'supp.SupplierID = POMast.SupplierID');
|
||||
$this->db->join('T_Status Stat', 'Stat.StatusCode = POMast.Status');
|
||||
@ -634,7 +634,7 @@ function purchaseorderListing($forwhat='')
|
||||
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,LineItem.ServiceMaterialDescription,Mat.MaterialCode,Mat.MaterialName,
|
||||
Mat.UOM,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue,POMaster.AmendedDetails,LineItem.AmendedDetails as lineamenddetails,
|
||||
ROUND(( Tax.After_SGST + Tax.After_CGST + Tax.After_IGST + Tax.otherallowance) ,2)as Taxamount,ReqMat.NumberOfService,
|
||||
ROUND(( Tax.After_SGST + Tax.After_CGST + Tax.After_IGST ) ,2)as Taxamount,ReqMat.NumberOfService,
|
||||
TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address,Payment.PaymentTerms
|
||||
FROM T_PurchaseOrder_LineItem LineItem
|
||||
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
@ -702,7 +702,7 @@ function purchaseorderListing($forwhat='')
|
||||
function GetRevenuePurchaseOrderDetailsForAmendPDF($PONO = '')
|
||||
{
|
||||
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName,
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName,POMaster.PaymentOtherDescription,
|
||||
Mat.UOM,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue ,
|
||||
ROUND(((AfterPackagingValue + AfterFreightValue + AfterSGST + AfterCGST +
|
||||
AfterIGST + Insurance)) ,2)as Taxamount,
|
||||
@ -882,8 +882,8 @@ QuantityRejected,ROUND(ReceivedQuantity-QuantityRejected)as PendingQty,
|
||||
{
|
||||
//echo $PONO;
|
||||
|
||||
$subQuery ='SELECT distinct LineItem.PONO,LineItem.AmendedDetails as lineamd,LineItem.LineItemNo,SUP.SupplierName,SUP.Address,POMast.DeliveryAddress,POMast.DeliveryDate,POMast.PODate,POMast.DeliveryOption,POMast.ServiceDescription,POMast.Import_PlaceofOrgin,POMast.AmendedDetails,POMast.PaymentDays,POMast.DeliverySchedule,POMast.TotalOrderValue,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,LineItem.ServiceMaterialDescription,LineItem.ServiceFrequency,
|
||||
Mat.UOM,Quantity,Rate,Req.Status,POMast.ExchangeRate,POMast.ExchangeRateCalculatedon,POMast.TotalOrderValue as BasicValue,POMast.CapitalRange,POMast.CurrencyType,Payment.PaymentTerms,
|
||||
$subQuery ='SELECT distinct LineItem.PONO,LineItem.AmendedDetails as lineamd,LineItem.LineItemNo,SUP.SupplierName,SUP.Address,POMast.DeliveryAddress,POMast.DeliveryDate,POMast.PODate,POMast.DeliveryOption,POMast.ServiceDescription,POMast.ServiceDescription,POMast.Import_DispatchDetails,POMast.Import_PlaceofOrgin,POMast.AmendedDetails,POMast.DeliverySchedule,POMast.TotalOrderValue,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,LineItem.ServiceMaterialDescription,LineItem.ServiceFrequency,
|
||||
Mat.UOM,Quantity,Rate,POMast.Status,POMast.ExchangeRate,POMast.ExchangeRateCalculatedon,POMast.PaymentOtherDescription,POMast.TotalOrderValue as BasicValue,POMast.CapitalRange,POMast.CurrencyType,Payment.PaymentTerms,
|
||||
Req.CostCenterCode FROM T_PurchaseOrder_LineItem LineItem
|
||||
join T_PurchaseOrder_Master POMast on POMast.PONO = LineItem.PONO
|
||||
join T_SupplierDetailsN SUP on SUP.SupplierID=POMast.SupplierID
|
||||
|
||||
@ -21,10 +21,9 @@
|
||||
$TaxAmount =0.00;
|
||||
$BasicAmount = 0.00;
|
||||
$ServiceDescription = '';
|
||||
$PaymentTerms='';
|
||||
$totaltaxamount=0.0;
|
||||
/* $PaymentDays='';
|
||||
$PayableAT=''; */
|
||||
$totaltaxamount=0.00;
|
||||
$PaymentOtherDescription='';
|
||||
|
||||
|
||||
if(!empty($CompanyDetails))
|
||||
{
|
||||
@ -67,15 +66,27 @@
|
||||
$DeliveryAddress = $PO->DeliveryAddress;
|
||||
$dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata'));
|
||||
$Podt = $dt->format('d-m-Y');
|
||||
if($PO->DeliveryOption==1){
|
||||
$DeliverySchedule=$PO->DeliverySchedule;
|
||||
$DeliveryDate=null;
|
||||
|
||||
}else if($PO->DeliveryOption==0)
|
||||
{
|
||||
|
||||
if(!empty($PO->DeliveryDate)){
|
||||
$dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
$DeliveryDate = $dtDe->format('d-m-Y');
|
||||
if($DeliveryDate == '30-11--0001' || $DeliveryDate == '0001-11-30'){$DeliveryDate='';}
|
||||
$DeliverySchedule='';
|
||||
}
|
||||
}
|
||||
// if($DeliveryDate == '30-11--0001' || $DeliveryDate == '0001-11-30'){$DeliveryDate='';}
|
||||
$ServiceDescription =$PO->ServiceDescription;
|
||||
$PaymentTerms = $PO->PaymentTerms;
|
||||
$PaymentDays=$PO->PaymentDays;
|
||||
$PayableAT=$PO->PayableAT;
|
||||
$DeliverySchedule=$PO->DeliverySchedule;
|
||||
if($PaymentTerms=='Others'){
|
||||
$PaymentOtherDescription=$PO->PaymentOtherDescription;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -193,7 +204,7 @@
|
||||
foreach($POItem as $record)
|
||||
{
|
||||
$index = $index + 1;
|
||||
$TotalAmount = ($record->BasicValue*$record->NumberOfService) + $record->Taxamount + $record->otherallowance;
|
||||
$TotalAmount = ($record->BasicValue*$record->NumberOfService) + $record->Taxamount ;//+ $record->otherallowance;
|
||||
?>
|
||||
<tr style="line-height: 1.5em;">
|
||||
<td><?php echo $index ; ?></td>
|
||||
@ -202,7 +213,7 @@
|
||||
<td align="right"><?php echo $record->Quantity ; ?></td>
|
||||
<td align="right"><?php echo $record->UOM ; ?></td>
|
||||
<td align="right"><?php echo $record->Rate ; ?></td>
|
||||
<td align="right"><?php echo ($record->BasicValue * $record->NumberOfService) ; ?></td>
|
||||
<td align="right"><?php echo number_format(($record->BasicValue * $record->NumberOfService),2); ?></td>
|
||||
<td align="right"><?php echo $record->After_SGST ; ?></td>
|
||||
<td align="right"><?php echo $record->After_CGST ; ?></td>
|
||||
<td align="right"><?php echo $record->After_IGST ; ?></td>
|
||||
@ -212,7 +223,7 @@
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$SubTotalAmount = $SubTotalAmount + $record->BasicValue;
|
||||
$SubTotalAmount = $SubTotalAmount + $TotalAmount;
|
||||
$AfterSGST =$AfterSGST + $record->After_SGST;
|
||||
$AfterCGST =$AfterCGST + $record->After_CGST;
|
||||
$AfterIGST = $AfterIGST + $record->After_IGST;
|
||||
@ -220,7 +231,7 @@
|
||||
$totaltaxamount=$totaltaxamount+$record->Taxamount;
|
||||
|
||||
}
|
||||
$OrderValue = $SubTotalAmount + $AfterSGST + $AfterCGST+$AfterIGST+$otherallowances;
|
||||
$OrderValue = $SubTotalAmount ;
|
||||
}
|
||||
|
||||
?>
|
||||
@ -280,7 +291,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p><strong>Payment Terms</strong></p>
|
||||
<p><?php echo $PaymentTerms;?></p>
|
||||
<p><?php echo $PaymentTerms ." ".$PaymentOtherDescription;?></p>
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
<p><font size="1">Certified that the particulars given above are true and correct</font></p>
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
$postatus='';
|
||||
$ServiceDescription = '';
|
||||
$PaymentTerms = '';
|
||||
$PaymentOtherDescription='';
|
||||
/* $PaymentDays='';
|
||||
$PayableAT=''; */
|
||||
$totaltaxonly=0;
|
||||
@ -51,8 +52,10 @@
|
||||
|
||||
$ServiceDescription =$PO->ServiceDescription;
|
||||
$PaymentTerms = $PO->PaymentTerms;
|
||||
$PaymentDays=$PO->PaymentDays;
|
||||
$PayableAT=$PO->PayableAT;
|
||||
if($PaymentTerms=='Others'){
|
||||
$PaymentOtherDescription=$PO->PaymentOtherDescription;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -249,11 +252,12 @@
|
||||
$AfterCGST =$AfterCGST + $record->AfterCGST;
|
||||
$AfterSGST =$AfterSGST + $record->AfterSGST;
|
||||
$AfterIGST =$AfterIGST + $record->AfterIGST;
|
||||
$totaltaxonly=($AfterCGST+$AfterSGST+$AfterIGST);
|
||||
|
||||
$Insurance =$Insurance + $record->Insurance;
|
||||
$AfterFreightValue =$AfterFreightValue + $record->AfterFreightValue;
|
||||
$AfterDiscount = $AfterDiscount + $record->AfterDiscount ;
|
||||
$AfterPackaging=$AfterPackaging+$record->AfterPackagingValue;
|
||||
$AfterPackaging=$AfterPackaging+$record->AfterPackagingValue;
|
||||
$totaltaxonly=($AfterCGST+$AfterSGST+$AfterIGST+$Insurance+$AfterFreightValue+$AfterPackaging);
|
||||
}
|
||||
|
||||
|
||||
@ -266,7 +270,7 @@
|
||||
<?php
|
||||
|
||||
|
||||
$OrderValue = (( $SubTotalAmount + $AfterCGST +$AfterIGST+$AfterSGST +$Insurance +$AfterFreightValue+$AfterPackaging) - $AfterDiscount ) ;
|
||||
$OrderValue = (( $SubTotalAmount + $AfterCGST +$AfterIGST+$AfterSGST +$Insurance +$AfterFreightValue+$AfterPackaging) - $AfterDiscount) ;
|
||||
}?>
|
||||
<div align="right">
|
||||
|
||||
@ -324,7 +328,7 @@ $OrderValue = (( $SubTotalAmount + $AfterCGST +$AfterIGST+$AfterSGST +$Insuranc
|
||||
<tr>
|
||||
<td>
|
||||
<p> <b>Payment Terms :</b> </p>
|
||||
<p><?php echo $PaymentTerms;?></p>
|
||||
<p><?php echo $PaymentTerms ." ".$PaymentOtherDescription;?></p>
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
<p> Certified that the particulars given above are true and correct</p>
|
||||
@ -348,7 +352,7 @@ $OrderValue = (( $SubTotalAmount + $AfterCGST +$AfterIGST+$AfterSGST +$Insuranc
|
||||
?>
|
||||
|
||||
|
||||
<table width="100%">
|
||||
<!-- <table width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><b>Released By:</b></td>
|
||||
@ -359,7 +363,10 @@ $OrderValue = (( $SubTotalAmount + $AfterCGST +$AfterIGST+$AfterSGST +$Insuranc
|
||||
<td style="text-align:right;"><?php echo $releasedOn->format('d-m-Y');?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table> -->
|
||||
<p> </p>
|
||||
<div align="Left"> <b>Released By : </b><?php echo $detail->FirstName;?></div>
|
||||
<div align="Left"> <b>Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@ -370,7 +377,8 @@ $OrderValue = (( $SubTotalAmount + $AfterCGST +$AfterIGST+$AfterSGST +$Insuranc
|
||||
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -13,9 +13,11 @@
|
||||
$DeliveryDate ='';
|
||||
$ServiceDescription = '';
|
||||
$index=0;
|
||||
$dispatch="";
|
||||
$PaymentDays='';
|
||||
$PayableAT='';
|
||||
$PaymentTerms='';
|
||||
$PaymentOtherDescription='';
|
||||
$DeliverySchedule='';
|
||||
if(!empty($CompanyDetails))
|
||||
{
|
||||
@ -32,9 +34,11 @@
|
||||
|
||||
foreach ($POItem as $PO)
|
||||
{
|
||||
|
||||
$ReqNo=$PO->ReqNo;
|
||||
$PONO = $PO->PONO;
|
||||
$postatus= $PO->Status;
|
||||
|
||||
$SuplierName = $PO->SupplierName;
|
||||
$SuplierAddress = $PO->Address;
|
||||
$DeliveryAddress = $PO->DeliveryAddress;
|
||||
@ -42,20 +46,28 @@
|
||||
$dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata'));
|
||||
$Podt = $dt->format('d-m-Y');
|
||||
if($PO->DeliveryOption=='1'){
|
||||
$DeliveryDate = '';
|
||||
$DeliveryDate = '';
|
||||
$DeliverySchedule = $PO->DeliverySchedule;
|
||||
$dispatch="";
|
||||
}
|
||||
else{
|
||||
else if($PO->DeliveryOption=='0'){
|
||||
$dispatch="";
|
||||
$dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
|
||||
$DeliveryDate = $dtDe->format('d-m-Y');
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
$DeliveryDate = $dtDe->format('d-m-Y');
|
||||
$DeliverySchedule = '';
|
||||
}else if($PO->DeliveryOption=='2'){
|
||||
$DeliveryDate='';
|
||||
$DeliverySchedule = '';
|
||||
$dispatch=$PO->Import_DispatchDetails;
|
||||
}
|
||||
$ServiceDescription =$PO->ServiceDescription;
|
||||
$CostCenterCode=$PO->CostCenterCode;
|
||||
|
||||
$PaymentTerms=$PO->PaymentTerms;
|
||||
$PaymentDays=$PO->PaymentDays;
|
||||
$PayableAT=$PO->PaymentTerms;
|
||||
if($PaymentTerms=='Others'){
|
||||
$PaymentOtherDescription=$PO->PaymentOtherDescription;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -92,7 +104,7 @@
|
||||
<div class="header">
|
||||
<div style="text-align:right;">
|
||||
<?php
|
||||
if ($postatus == 'ST026')
|
||||
if ($postatus == PO_RELEASED)
|
||||
{}
|
||||
else
|
||||
{
|
||||
@ -127,7 +139,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PO DATE :<?php echo $Podt?></td>
|
||||
<td colspan="2">DELIVERY DATE / SCHEDULE BY :<?php echo $DeliveryDate.$DeliverySchedule;?></td>
|
||||
<td colspan="2">DELIVERY DATE / SCHEDULE BY :<?php echo $DeliveryDate.$DeliverySchedule.$dispatch;?></td>
|
||||
<!--<td>PLACE OF ORIGIN:<?php echo $Placeoforigin; ?></td> if u need this field uncommend it and remove colspan="2" in delivery date / schedule by-->
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -206,7 +218,7 @@
|
||||
|
||||
<tr>
|
||||
<td><?php echo $index ; ?></td>
|
||||
<td><?php echo $record->MaterialName ; ?></td>
|
||||
<td><?php echo $record->MaterialCode;?> - <?php echo $record->MaterialName ; ?></td>
|
||||
<td align="right"><?php echo $record->Quantity ; ?></td>
|
||||
<td align="right"><?php echo $record->Rate ; ?></td>
|
||||
|
||||
@ -237,8 +249,11 @@
|
||||
|
||||
foreach($POItem as $v)
|
||||
{
|
||||
if(!empty($v->AmendedDetails))
|
||||
{
|
||||
echo "<b>" . $v->AmendedDetails . "</b>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}?>
|
||||
</td>
|
||||
@ -254,7 +269,9 @@
|
||||
{
|
||||
foreach($POItem as $record)
|
||||
{
|
||||
echo $record->lineamd ;
|
||||
if(!empty($record->lineamd)){
|
||||
echo $record->lineamd ;
|
||||
}
|
||||
}
|
||||
} ?>
|
||||
</tbody>
|
||||
@ -273,7 +290,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p><strong>Payment Terms</strong></p>
|
||||
<p><?php echo $PaymentTerms;?></p>
|
||||
<p><?php echo $PaymentTerms ." ".$PaymentOtherDescription;?></p>
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
<p><font size="1">Certified that the particulars given above are true and correct</font></p>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
$requestedBy=$requestedBy[0]->FirstName;
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$CurrentDate = $dt->format('Y-m-d');
|
||||
// $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
// $CurrentDate = $dt->format('Y-m-d');
|
||||
$res_arr_values = array();
|
||||
$DeliverOption='';
|
||||
$SupId = '';
|
||||
@ -15,7 +15,7 @@
|
||||
$DeliveryAddress ='';
|
||||
$POStatus = '';
|
||||
$PONO = '';
|
||||
|
||||
$PaymentOtherDescription='';
|
||||
$TotalSGST = 0.0;
|
||||
$TotalCGST = 0.0;
|
||||
$TotalIGST = 0.0;
|
||||
@ -90,7 +90,7 @@ if(!empty($POItem))
|
||||
}
|
||||
if(!empty($POMaster))
|
||||
{
|
||||
|
||||
//print_r($POMaster);
|
||||
|
||||
foreach ($POMaster as $Req)
|
||||
{
|
||||
@ -104,19 +104,26 @@ if(!empty($POMaster))
|
||||
$DeliverOption = $Req->DeliveryOption;
|
||||
|
||||
$DeliverSchedule = $Req->DeliverySchedule;
|
||||
// $Deliverydt=$Req->DeliveryDate;
|
||||
if(!empty($Req->DeliveryDate))
|
||||
{
|
||||
$Ddt = new DateTime($Req->DeliveryDate);
|
||||
$Deliverydt = $Ddt->format('Y-m-d');
|
||||
}else{
|
||||
$Deliverydt=null;
|
||||
}
|
||||
|
||||
|
||||
$DeliveryAddress =$Req->DeliveryAddress;
|
||||
$POStatus = $Req->StatusCode;
|
||||
$PoStatusName=$Req->StatusName;
|
||||
$PONO = $Req->PONO;
|
||||
$scopeofwork = $Req->ServiceDescription;
|
||||
$PayableAT=$Req->PayableAT;
|
||||
//$PayableAT=$Req->PayableAT;
|
||||
$ExchangeRateOn1=new DateTime($Req->ExchangeRateCalculatedon);
|
||||
$ExchangeRateOn=$ExchangeRateOn1->format('Y-m-d');
|
||||
$PaymentDays=$Req->PaymentDays;
|
||||
|
||||
// $PaymentDays=$Req->PaymentDays;
|
||||
$PaymentOtherDescription=$Req->PaymentOtherDescription;
|
||||
$PaymentTerms=$Req->PaymentTerms;
|
||||
//echo $PaymentTerms;
|
||||
$UpdatedOn=$Req->UpdatedOn;
|
||||
@ -166,6 +173,7 @@ if(!empty($AvlBudAmt))
|
||||
|
||||
var DelOpt = '<?php echo $DeliverOption; ?>';
|
||||
var SchName = <?php echo json_encode($DeliverSchedule); ?>;
|
||||
var others ='<?php echo $PaymentOtherDescription;?>';
|
||||
var DelDt = '<?php echo $Deliverydt; ?>';
|
||||
$(document).ready(function () {
|
||||
if(DelOpt=="0"){
|
||||
@ -177,9 +185,18 @@ $('#Deliverydt').val(DelDt);
|
||||
else if(DelOpt=="1"){
|
||||
$('#Deliverydtdiv').hide();
|
||||
$('#Schedulediv').show();
|
||||
$('#Deliverydt').val('');
|
||||
//$('#Deliverydt').val('');
|
||||
$('#Deliverydt').hide();
|
||||
|
||||
$('#Scheduleby').val(SchName);
|
||||
}
|
||||
|
||||
if($('#PaymentMethod').val()== 'PT08')
|
||||
{
|
||||
|
||||
$('#otheroptiondiv').show();
|
||||
$('#Otherpayment').val(others);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@ -195,13 +212,19 @@ window.onload = function()
|
||||
document.getElementById('ExchangeRateOnDiv').style.display = 'none';
|
||||
document.getElementById('ExchangeRateDiv').style.display = 'none';
|
||||
document.getElementById('currencyTypeDiv').style.display = 'none';
|
||||
document.getElementById('ExchangeRateModalDiv').style.display = 'none';
|
||||
//document.getElementById('ExchangeRateModalDiv').style.display = 'none';
|
||||
document.getElementById('ExchangeRateModalEditDiv').style.display = 'none';
|
||||
document.getElementById('HideImportTaxTotal').style.display = 'none';
|
||||
document.getElementById('ModalImportTaxHide').style.display = 'none';
|
||||
document.getElementById('EditModalImportTaxHide').style.display = 'none';
|
||||
document.getElementById('ExchangeRateModalViewDiv').style.display = 'none';
|
||||
document.getElementById('ViewModalImportTaxHide').style.display = 'none';
|
||||
// document.getElementById('ModalImportTaxHide').style.display = 'none';
|
||||
document.getElementById('EditModalImportTaxHide').style.display = 'none';
|
||||
// document.getElementById('ExchangeRateModalViewDiv').style.display = 'none';
|
||||
//document.getElementById('ViewModalImportTaxHide').style.display = 'none';
|
||||
//document.getElementById('ExchangeRateModalViewDiv').style.display = 'none';
|
||||
document.getElementById('Deliverydtdiv').style.display = 'none';
|
||||
document.getElementById('dispatchinternational').style.display = 'none';
|
||||
document.getElementById('placeoforgin').style.display = 'none';
|
||||
document.getElementById('datedomestic').style.display = 'block';
|
||||
document.getElementById('deliverydateby').style.display = 'none';
|
||||
|
||||
|
||||
capitalType='Domestic';
|
||||
@ -218,10 +241,10 @@ document.getElementById('ExchangeRateModalEditDiv').style.display = 'block';
|
||||
//document.getElementById('ExchangeRateModalViewDiv').style.display = 'block';
|
||||
capitalType='International';
|
||||
document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
document.getElementById('dispatchinternational').style.display = 'block';
|
||||
//document.getElementById('deliverydateby').style.display = 'block';
|
||||
//document.getElementById('ViewModalImportTaxHide').style.display = 'block';
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -231,6 +254,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#PaymentMethod").select2();
|
||||
|
||||
//Initialize Select2 Elements
|
||||
$("#drpSupplier").select2();
|
||||
@ -244,7 +268,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
maxDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
$("#Deliverydt").datepicker({
|
||||
$("#Deliverydate").datepicker({
|
||||
minDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
});
|
||||
@ -255,8 +279,15 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
});
|
||||
$('#Schedule').click(function () {
|
||||
//for schedule range selection
|
||||
$('#Deliverydtdiv').hide();
|
||||
$('#deliverydateby').hide();
|
||||
$('#Schedulediv').show();
|
||||
$('#Deliverydtdiv').hide();
|
||||
});
|
||||
$('#DeliverycheckDate').click(function () {
|
||||
//for Delivery Date selection
|
||||
$('#Schedulediv').hide();
|
||||
$('#deliverydateby').show();
|
||||
$('#Deliverydtdiv').hide();
|
||||
});
|
||||
|
||||
});
|
||||
@ -394,17 +425,21 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-12">
|
||||
|
||||
<b><u>Select Delivery By</u></b><br/>
|
||||
<tr>
|
||||
<div id="dispatchinternational" style="display:none;">
|
||||
<td>
|
||||
<!-- <?php echo form_label('Date', 'Date') . " ". form_radio(array('name' => 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?> -->
|
||||
|
||||
<?php echo form_label('Dispatch instruction', 'Dispatch instruction') ." ". form_radio(array("name"=>"DateRange", "id"=>"Date", "value"=>"0", 'checked'=>'checked')); ?> </td>
|
||||
</td>
|
||||
</td>
|
||||
<?php echo form_label('Dispatch instruction', 'Dispatch instruction') ." ". form_radio(array("name"=>"DateRange", "id"=>"Date", "value"=>"2", 'checked'=>('2' == $DeliverOption) ? TRUE : FALSE)); ?> </td>
|
||||
</div>
|
||||
<div id="datedomestic" style="display:none;">
|
||||
<td>
|
||||
<?php echo form_label('Deilvery Date', 'Deilvery Date') ." ". form_radio(array("name"=>"DateRange", "id"=>"DeliverycheckDate", "value"=>"0", 'checked'=>('0' == $DeliverOption) ? TRUE : FALSE)); ?> </td>
|
||||
</div>
|
||||
<td>
|
||||
<?php echo form_label('Schedule', 'Schedule') . form_radio(array('name' => 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?>
|
||||
|
||||
@ -413,17 +448,32 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" id="Schedulediv" style="display:none;"><br/>
|
||||
<label >Schedule :</label>
|
||||
<label >Schedule </label>
|
||||
<input type="hidden" name="beforeSchedule" value="<?php echo $DeliverSchedule;?>">
|
||||
<?php
|
||||
$data = array('name' => 'Scheduleby','value' => set_value('Scheduleby',$DeliverSchedule),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
|
||||
$data = array('name' => 'Scheduleby','value' => set_value('Scheduleby'),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
|
||||
echo Form_textarea($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="col-md-12" id="deliverydateby" style="display:none;"><br/>
|
||||
<label>Delivery Date</label>
|
||||
<?php if(($DeliverOption==1) || ($DeliverOption==2)){
|
||||
$Deliverydt=null;
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="beforeDate" value="<?php echo $Deliverydt;?>">
|
||||
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Deliverydate','value' => set_value('Deliverydate',$Deliverydt),'id'=>'Deliverydate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" id="Deliverydtdiv"><br/>
|
||||
<label>Dispatch Instruction</label>
|
||||
<input type="hidden" name="beforeDisins" value="<?php echo $Import_DispatchDetails;?>">
|
||||
<input type="hidden" name="beforeDisins" value="<?php echo $Import_DispatchDetails;?>">
|
||||
<?php
|
||||
// $data = array('name' => 'Dispatch','value' => set_value('Dispatch',$Import_DispatchDetails),'id'=>'Dispatch', 'class' => 'form-control' ,'required' => 'true');
|
||||
// echo form_input($data);
|
||||
@ -472,7 +522,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-3" id="placeoforgin">
|
||||
<label>Place of Origin</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
@ -531,6 +581,17 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" id="otheroptiondiv" style="display:none;">
|
||||
<label><span class="badge" style="color:red;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'Otherpayment','Otherpayment' => set_value('Otherpayment'),'id'=>'Otherpayment', 'class' => 'form-control' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@ -579,8 +640,12 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
<td><?php echo $record->UOM ?></td>
|
||||
<td style="text-align:right"><?php echo $record->Rate ?></td>
|
||||
<td style="text-align:right"><?php echo $record->Rate * $record->Quantity ?></td>
|
||||
<td style="text-align:right"><?php if($CapitalRange=='1'){echo $record->ServiceTaxamount;}else if($CapitalRange=='0'){echo $record->Taxamount; }?></td>
|
||||
<td style="text-align:right"><?php echo $record->Rate * $record->Quantity ?></td>
|
||||
<td style="text-align:right"><?php if($CapitalRange=='1'){echo $record->ServiceTaxamount;}else if($CapitalRange=='0'){echo "0.0"; }?></td>
|
||||
<?php if($CapitalRange=='1'){?>
|
||||
<td style="text-align:right"><?php echo (($record->Rate * $record->Quantity)+$record->ServiceTaxamount); ?></td>
|
||||
<?php }else if($CapitalRange=='0'){?>
|
||||
<td style="text-align:right"><?php echo (($record->Rate * $record->Quantity)); ?></td>
|
||||
<?php }?>
|
||||
<?php
|
||||
$row=array("materialCode"=>$record->MaterialCode,"ReqNo"=>$record->ReqNo);
|
||||
array_push($res_arr_values, $row);
|
||||
@ -595,7 +660,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
<input type="hidden" name="<?php echo 'CPCostCode'.$index ?>" id="<?php echo 'CPCostCode'.$index ?>" value="<?php echo $record->CostCenterCode ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'materialCode'.$index ?>" id="<?php echo 'materialCode'.$index ?>" value="<?php echo $record->MaterialCode ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'materialName'.$index ?>" id="<?php echo 'materialName'.$index ?>" value="<?php echo $record->MaterialName ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'ServiceMaterialDescription'.$index ?>" id="<?php echo 'ServiceMaterialDescription'.$index ?>" value="<?php echo $record->ServiceMaterialDescription ; ?>" />
|
||||
|
||||
<input type="hidden" name="<?php echo 'uom'.$index ?>" id="<?php echo 'uom'.$index ?>" value="<?php echo $record->UOM ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'frequency'.$index ?>" id="<?php echo 'frequency'.$index ?>" value="<?php echo $record->ServiceFrequency ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'quantity'.$index ?>" id="<?php echo 'quantity'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
|
||||
@ -669,6 +734,16 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
<input type="hidden" name="<?php echo 'otherallowance'.$index ?>" id="<?php echo 'otherallowance'.$index ?>" value="<?php echo $record->otherallowance ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'beforeotherallowance'.$index ?>" id="<?php echo 'beforeotherallowance'.$index ?>" value="<?php echo $record->otherallowance ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'totalservicevalue'.$index ?>" id="<?php echo 'totalservicevalue'.$index ?>" value="<?php echo $record->TotalValue ; ?>" />
|
||||
<?php }else if($CapitalRange=='0'){?>
|
||||
<input type="hidden" name="<?php echo 'SGST'.$index ?>" id="<?php echo 'SGST'.$index ?>" value="0.0" />
|
||||
<input type="hidden" name="<?php echo 'afterSGST'.$index ?>" id="<?php echo 'afterSGST'.$index ?>" value="0.0" />
|
||||
<input type="hidden" name="<?php echo 'CGST'.$index ?>" id="<?php echo 'CGST'.$index ?>" value="0.0" />
|
||||
<input type="hidden" name="<?php echo 'afterCGST'.$index ?>" id="<?php echo 'afterCGST'.$index ?>" value="0.0" />
|
||||
<input type="hidden" name="<?php echo 'IGST'.$index ?>" id="<?php echo 'IGST'.$index ?>" value="0.0" />
|
||||
<input type="hidden" name="<?php echo 'afterIGST'.$index ?>" id="<?php echo 'afterIGST'.$index ?>" value="0.0" />
|
||||
<input type="hidden" name="<?php echo 'otherallowance'.$index ?>" id="<?php echo 'otherallowance'.$index ?>" value="0.0" />
|
||||
<input type="hidden" name="<?php echo 'totalservicevalue'.$index ?>" id="<?php echo 'totalservicevalue'.$index ?>" value="0.0" />
|
||||
|
||||
<?php }?>
|
||||
|
||||
|
||||
@ -691,11 +766,12 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
$TotalIGST = $TotalIGST+$record->After_IGST;
|
||||
$Totalotherallowances = $Totalotherallowances+$record->otherallowance;
|
||||
|
||||
$TotalSummary = $TotalSummary+$record->ServiceTaxamount;
|
||||
$TotalBasicAmount = $TotalBasicAmount+$record->BasicValue;
|
||||
$TotalSummary = $TotalSummary+$record->ServiceTaxamount;//tax
|
||||
$TotalBasicAmount = $TotalBasicAmount+($record->Rate * $record->Quantity);//basic
|
||||
//$ServiceDescription = $ServiceDescription;
|
||||
}
|
||||
if($CapitalRange=='0'){
|
||||
$TotalBasicAmount = $TotalBasicAmount+($record->Rate * $record->Quantity);//basic
|
||||
$TotalLanding = $TotalLanding + $record->AfterLandingCharge;
|
||||
$tothighseas = $tothighseas + $record->AfterHighSeasSalesCharge;
|
||||
$totcustom = $totcustom + $record->AfterCustomDuty;
|
||||
@ -725,15 +801,16 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
//echo $TotalSummary;
|
||||
if($CapitalRange=='1'){
|
||||
|
||||
$totalCapitalOrder = $totalCapitalOrder+$TotalSummary;
|
||||
$totalCapitalOrder = $totalCapitalOrder+$TotalBasicAmount;
|
||||
|
||||
}
|
||||
else if($CapitalRange=='0')
|
||||
{
|
||||
$totalCapitalOrder = $totalCapitalOrder+$record->BasicValue;;
|
||||
$totalCapitalOrder = $totalCapitalOrder+$TotalBasicAmount;
|
||||
}
|
||||
?> <input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index;?>">
|
||||
<input type="hidden" name="CapitalToatlOrder" id="CapitalToatlOrder" value="<?php echo $totalCapitalOrder;?>">
|
||||
<!-- first <input type="text" name="CapitalToatlOrder" id="CapitalToatlOrder" value="<?php echo $totalCapitalOrder;?>">-->
|
||||
|
||||
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
|
||||
<input type="hidden" name="capitalType" id="capitalType" value="<?php echo $CapitalRange; ?>"/>
|
||||
|
||||
@ -754,9 +831,9 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:900px;">
|
||||
<div class="modal-content" style="width:1050px;">
|
||||
<div class="modal-header" style="background-color: #3c8dbc;color:#fff;">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
|
||||
<center><h4>Edit Capital Purchase Order Item </h4></center>
|
||||
</div>
|
||||
<div align="left">
|
||||
@ -796,7 +873,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="col-md-6">
|
||||
<label>Cost Center Name</label>
|
||||
<label>Cost Center Code</label>
|
||||
<div>
|
||||
<?php
|
||||
|
||||
@ -847,11 +924,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>Service Description </label> <?php
|
||||
$data = array('name' => 'Edittxtservicedescription','value' => set_value('Edittxtservicedescription'),'id'=>'Edittxtservicedescription', 'class' => 'form-control');
|
||||
echo form_input($data); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>UOM</label>
|
||||
<div class="form-group">
|
||||
@ -861,17 +934,8 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Frequency</label>
|
||||
<div>
|
||||
<?php
|
||||
$data = array('name' => 'EditFrequency','value' => set_value('EditFrequency'),'id'=>'EditFrequency', 'class' => 'form-control','readonly' => 'true' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
<input type="hidden" name="EditFrequencyNo" id="EditFrequencyNo" value="EditFrequencyNo" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
@ -880,7 +944,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-2">
|
||||
<label id="EditRateIn">Rate(in INR/UOM)</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
@ -889,7 +953,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-2">
|
||||
<label id="EditTotalAmount">Basic value in INR</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
@ -1404,9 +1468,10 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
|
||||
</div>
|
||||
|
||||
<label >Total Order Value In INR </label>
|
||||
<label >Total Order Value In INR </label>
|
||||
previous<input type="hidden" name="preServiceTotalorderValue" value="<?php echo $totalCapitalOrder?>">
|
||||
<?php
|
||||
$data = array('name' => 'Totalservicesummary','value' => set_value('Totalservicesummary',$TotalSummary),'id'=>'Totalservicesummary', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
$data = array('name' => 'Totalservicesummary','value' => set_value('Totalservicesummary',$totalCapitalOrder),'id'=>'Totalservicesummary', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
@ -1533,12 +1598,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<label>Special Instructions :</label> <?php
|
||||
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$scopeofwork),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' );
|
||||
echo form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div align="right" style="padding-right:10px">
|
||||
|
||||
@ -1554,9 +1614,26 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="col-md-4">
|
||||
<label >Total Order Value<?php echo "($INR)"?> </label>
|
||||
<input type="hidden" name="preinterTotalorderValue" value="<?php echo $totalCapitalOrder?>">
|
||||
<?php
|
||||
$data = array('name' => 'CapitalToatlOrder','value' => set_value('CapitalToatlOrder',number_format($totalCapitalOrder, 2, '.', '')),'id'=>'CapitalToatlOrder', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<label>Special Instructions :</label> <?php
|
||||
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$scopeofwork),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' );
|
||||
echo form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" style="padding:1% 0%;">
|
||||
<div class="col-md-4">
|
||||
@ -2815,8 +2892,6 @@ $('#txtStatus').val(stat);
|
||||
$('#txtDeletedRow').val('');
|
||||
$('#SpcialInstruction').val('');
|
||||
$('#txtDeliveryAddress').val('');
|
||||
|
||||
clearAfterAddLineItemAdd();
|
||||
window.location ="amendmentpurchaseorder";
|
||||
|
||||
}
|
||||
@ -2878,13 +2953,13 @@ $('#txtStatus').val(stat);
|
||||
|
||||
//var txtExchangeRate='';
|
||||
if(capitalType=='International'){
|
||||
alert('international');
|
||||
//alert('international');
|
||||
txtExchangeRate = parseFloat( $('#EditExchangeRtModal').val());
|
||||
var Tot = txtQuantity * RatePerTon;
|
||||
}
|
||||
|
||||
else{
|
||||
alert('Dometic');
|
||||
// alert('Dometic');
|
||||
var Tot = txtQuantity * RatePerTon;
|
||||
txtExchangeRate = 1;
|
||||
}
|
||||
@ -3071,11 +3146,12 @@ $('#txtStatus').val(stat);
|
||||
var AfterIGST = $("#EditAfterIgst").val();
|
||||
var otherallowance = $("#EditOtherAllowances").val();
|
||||
|
||||
var totalservicevalue = $("#Editservicetotalordervaue").val();
|
||||
var Total = (parseFloat(AfterCGST)+parseFloat(AfterSGST)+parseFloat(AfterIGST)+parseFloat(otherallowance));
|
||||
//var totalservicevalue = $("#Editservicetotalordervaue").val();
|
||||
var totalservicevalue = $("#EditCPTotalAmount").val();
|
||||
var Totaltaxamount = (parseFloat(AfterCGST)+parseFloat(AfterSGST)+parseFloat(AfterIGST)+parseFloat(otherallowance));
|
||||
//alert(totalservicevalue+"-"+Total);
|
||||
var TotalTaxValue = EditcalculateTaxValue();
|
||||
|
||||
//alert(Totaltaxamount+"--"+TotalTaxValue);
|
||||
var landingCharge = $('#EditAfterLandingCharge').val();
|
||||
var HighSeasSalesCharge = $('#EditAfterHighseas').val();
|
||||
var CustomDuty = $('#EditAfterCustomduty').val();
|
||||
@ -3152,7 +3228,7 @@ $('#txtStatus').val(stat);
|
||||
$('#purchaseRate'+userid).val(purchaseRate);
|
||||
$('#CustomDutyExpenses'+userid).val(CustomDutyExpenses);
|
||||
$('#RMCIncludingCustomers'+userid).val(RMCIncludingCustomers);
|
||||
$('#basicvalInINR'+userid).val(basicvalInINR);
|
||||
$('#basicvalInINR'+userid).val(basicvalInINR);
|
||||
|
||||
|
||||
|
||||
@ -3182,7 +3258,7 @@ $('#txtStatus').val(stat);
|
||||
//alert(basicval);
|
||||
cellval[7].innerHTML =TotalTaxValue;
|
||||
//alert(TotalTaxValue);
|
||||
cellval[8].innerHTML =basicval;
|
||||
cellval[8].innerHTML =totalservicevalue;
|
||||
//alert(basicval);
|
||||
|
||||
|
||||
@ -3238,7 +3314,7 @@ function validateEditCapitalTax()
|
||||
var SGSTTaxAmount = $('#EditAfterSgst').val() == '' ? '0.00' : $('#EditAfterSgst').val();
|
||||
var IGSTTaxAmount = $('#EditAfterIgst').val() == '' ? '0.00' : $('#EditAfterIgst').val();
|
||||
var otherallowanceAmount = $('#EditOtherAllowances').val() == '' ? '0.00' : $('#EditOtherAllowances').val();
|
||||
|
||||
//alert(CGSTTaxAmount+""+SGSTTaxAmount+""+IGSTTaxAmount+otherallowanceAmount)
|
||||
var landingCharge = $('#EditAfterLandingCharge').val() == '' ? '0.00' : $('#EditAfterLandingCharge').val();
|
||||
var HighSeasSalesCharge = $('#EditAfterHighseas').val() == '' ? '0.00' : $('#EditAfterHighseas').val();
|
||||
var CustomDuty = $('#EditAfterCustomduty').val() == '' ? '0.00' : $('#EditAfterCustomduty').val();
|
||||
@ -3258,6 +3334,7 @@ function validateEditCapitalTax()
|
||||
//+parseFloat(landingCharge)+parseFloat(HighSeasSalesCharge)+parseFloat(CustomDuty)+parseFloat(ExciseDuty)+parseFloat(ExciseDutyEDCess)+parseFloat(ExciseDutySHCess)+parseFloat(CustomEDCess)+parseFloat(CustomSHCess)+parseFloat(AdditionalExciseDuty)+parseFloat(GrossDutyPayable)+parseFloat(AvailableModvat)+parseFloat(GrossExpensesDuetoCustom)+parseFloat(purchaseRate)+parseFloat(CustomDutyExpenses)+parseFloat(RMCIncludingCustomers)
|
||||
|
||||
var totTax = parseFloat(totTaxvalue).toFixed(2);
|
||||
|
||||
// alert("TAx from EditcalculateTaxValue function "+totTax );
|
||||
return totTax;
|
||||
}
|
||||
@ -3318,7 +3395,7 @@ function validateEditCapitalTax()
|
||||
|
||||
for (var i = 1; i < rows; i++) {
|
||||
|
||||
var TotalOrderValueSummaryI = $('#totalservicevalue'+i).val() == '' ? '0.00' : $('#totalservicevalue'+i).val();
|
||||
var TotalOrderValueSummaryI = $('#totalservicevalue'+i).val() == '' ? '0.00' : $('#totalservicevalue'+i).val();//FOr Domestic total value
|
||||
|
||||
var TotalCGSTTaxI = $('#afterCGST'+i).val() == '' ? '0.00' : $('#afterCGST'+i).val();
|
||||
var TotalSGSTTaxI = $('#afterSGST'+i).val() == '' ? '0.00' : $('#afterSGST'+i).val();
|
||||
@ -3340,7 +3417,7 @@ function validateEditCapitalTax()
|
||||
var TotAvlmodvatI = $('#AvailableModvat'+i).val() == '' ? '0.00' : $('#AvailableModvat'+i).val();
|
||||
|
||||
var TotGrossexpenseI = $('#GrossExpensesDuetoCustom'+i).val() == '' ? '0.00' : $('#GrossExpensesDuetoCustom'+i).val();
|
||||
var CapitalToatlOrderI = $('#basicval'+i).val() == '' ? '0.00' : $('#basicval'+i).val();
|
||||
var CapitalToatlOrderI = $('#basicval'+i).val() == '' ? '0.00' : $('#basicval'+i).val();//for International total value
|
||||
|
||||
TotalCGSTTax = parseFloat(TotalCGSTTax) + parseFloat(TotalCGSTTaxI);
|
||||
TotalSGSTTax = parseFloat(TotalSGSTTax) + parseFloat(TotalSGSTTaxI);
|
||||
@ -3385,9 +3462,8 @@ function validateEditCapitalTax()
|
||||
$('#txttotalgrossduty').val((parseFloat(TotGrossduty)).toFixed(2) );
|
||||
$('#txttotalavlmodvat').val((parseFloat(TotAvlmodvat)).toFixed(2) );
|
||||
$('#txttotalgrossexpense').val((parseFloat(TotGrossexpense)).toFixed(2) );
|
||||
$('#CapitalToatlOrder').val((parseFloat(CapitalToatlOrder)).toFixed(2) );
|
||||
|
||||
$('#Totalservicesummary').val((parseFloat(TotalOrderValueSummary)).toFixed(2) );
|
||||
$('#CapitalToatlOrder').val((parseFloat(CapitalToatlOrder)).toFixed(2) );
|
||||
$('#Totalservicesummary').val((parseFloat(TotalOrderValueSummary)).toFixed(2) );
|
||||
|
||||
}
|
||||
var DisplayCurrencySymbol='';
|
||||
@ -3445,5 +3521,14 @@ $('#After').change(function(){
|
||||
PaymentDate=$('#After').val();
|
||||
|
||||
});
|
||||
$("#PaymentMethod").change(function() {
|
||||
if ($('#PaymentMethod').val().trim()=='PT08')
|
||||
{
|
||||
$('#otheroptiondiv').show();
|
||||
}
|
||||
else {
|
||||
$('#otheroptiondiv').hide();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@ -25,18 +25,10 @@ if(!empty($CompanyDetails))
|
||||
if(!empty($AvlBudAmt))
|
||||
{
|
||||
|
||||
$AvlAmount = $AvlBudAmt;
|
||||
$AvlAmount = $AvlBudAmt;
|
||||
//echo $AvlAmount;
|
||||
|
||||
}
|
||||
if(!empty($INRSYMBOL))
|
||||
{
|
||||
|
||||
foreach($INRSYMBOL as $INRS)
|
||||
{
|
||||
$INRSYM=$INRS->FontCode2000;
|
||||
|
||||
}
|
||||
}
|
||||
foreach ($PaymentTerms as $TER)
|
||||
{
|
||||
$Terms=$TER->PaymentTerms;
|
||||
@ -62,7 +54,7 @@ foreach ($PaymentTerms as $TER)
|
||||
$totFreightAmt = 0.0;
|
||||
$totInsuranceAmt = 0.0;
|
||||
$totOrderSummaryAmt = 0.0;
|
||||
|
||||
$PaymentOtherDescription='';
|
||||
$ServiceDescription = '';
|
||||
|
||||
if(!empty($POMaster))
|
||||
@ -83,12 +75,13 @@ if(!empty($POMaster))
|
||||
$DeliverOption = $Req->DeliveryOption;
|
||||
$DeliverSchedule = $Req->DeliverySchedule;
|
||||
$Ddt = new DateTime($Req->DeliveryDate);
|
||||
echo $Req->DeliveryDate."<br>";
|
||||
//echo $Req->DeliveryDate."<br>";
|
||||
$Deliverydt = $Ddt->format('Y-m-d');
|
||||
echo $Deliverydt;
|
||||
|
||||
//echo $Deliverydt;
|
||||
$PaymentOtherDescription=$Req->PaymentOtherDescription;
|
||||
//echo $PaymentOtherDescription;
|
||||
$DeliveryAddress =$Req->DeliveryAddress;
|
||||
$POStatus = $Req->StatusCode;
|
||||
$POStatus = $Req->StatusName;
|
||||
$PONO = $Req->PONO;
|
||||
$ServiceDescription = $Req->ServiceDescription;
|
||||
|
||||
@ -100,8 +93,8 @@ if(!empty($RequistionDetails))
|
||||
foreach ($RequistionDetails as $ReqDet)
|
||||
{
|
||||
$Reqon=$ReqDet->ReqDate;
|
||||
$Requestedby=$ReqDet->Requestedby;
|
||||
//$Status=$ReqDet->Status;
|
||||
$Requestedby=$ReqDet->FirstName;
|
||||
$Status=$ReqDet->Status;
|
||||
}
|
||||
}
|
||||
//echo $ServiceDescription;
|
||||
@ -112,7 +105,31 @@ foreach ($POSTATUS as $PST )
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<style>
|
||||
|
||||
#packagingcalmodel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
#ExciseDutyCalModel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
#VatCalModel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
#CSTCalModel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
.modal
|
||||
{
|
||||
padding-right:30% ! important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
|
||||
<script src="<?php echo base_url()?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
||||
|
||||
@ -131,11 +148,13 @@ foreach ($POSTATUS as $PST )
|
||||
<script type="text/javascript">
|
||||
var DelOpt = '<?php echo $DeliverOption; ?>';
|
||||
var SchName = '<?php echo $DeliverSchedule; ?>';
|
||||
var others ='<?php echo $PaymentOtherDescription;?>';
|
||||
|
||||
var DelDt = '<?php echo $Deliverydt; ?>';
|
||||
$(document).ready(function () {
|
||||
if(DelOpt=="0"){
|
||||
$('#Deliverydtdiv').show();
|
||||
$('#Schedulediv').hide();
|
||||
$('#Schedulediv').hide();
|
||||
$('#Deliverydt').val(DelDt);
|
||||
}
|
||||
|
||||
@ -146,6 +165,16 @@ $('#Deliverydt').val('');
|
||||
|
||||
$('#Scheduleby').val(SchName);
|
||||
}
|
||||
|
||||
|
||||
if($('#PaymentTerms').val()== 'PT08')
|
||||
{
|
||||
|
||||
$('#otheroptiondiv').show();
|
||||
$('#Otherpayment').val(others);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
@ -177,11 +206,11 @@ $(function() {
|
||||
minDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
});
|
||||
$("#Requeston").datepicker({
|
||||
/* $("#Requeston").datepicker({
|
||||
//minDate : d,
|
||||
maxDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
}); */
|
||||
|
||||
|
||||
$('#EditDiscountType').change(function() {
|
||||
@ -202,6 +231,8 @@ $('#EditDiscountType').change(function() {
|
||||
$('#txtEditDiscount').val('');
|
||||
$('#txtEditAfterDiscount').val('');
|
||||
}
|
||||
|
||||
calculateDiscount();
|
||||
|
||||
});
|
||||
|
||||
@ -229,6 +260,8 @@ $('#EditPackagingType').change(function() {
|
||||
$('#txtEditPackaging').removeAttr( 'readonly','true' );
|
||||
}
|
||||
}
|
||||
calculatePackaging();
|
||||
|
||||
|
||||
});
|
||||
|
||||
@ -236,18 +269,18 @@ $('#EditPackagingType').change(function() {
|
||||
|
||||
|
||||
$('#drpEditFreight').change(function() {
|
||||
var FreightType =$("#drpEditFreight").val();
|
||||
//alert(FreightType);
|
||||
if (FreightType == "PER TRIP")
|
||||
{
|
||||
|
||||
$('#EditAmendTripsValue').show();
|
||||
}
|
||||
else {
|
||||
|
||||
$('#EditAmendTripsValue').hide();
|
||||
}
|
||||
|
||||
var FreightType =$("#drpEditFreight").val();
|
||||
// alert(FreightType);
|
||||
if (FreightType == "PER TRIP")
|
||||
{
|
||||
|
||||
$('#EditTripsValue').show();
|
||||
}
|
||||
else {
|
||||
|
||||
$('#EditTripsValue').hide();
|
||||
}
|
||||
selValue = $("#drpEditFreight").val() ;
|
||||
$('#txtEditFreight').val('');
|
||||
$('#txtEditAfterFreight').val('');
|
||||
@ -264,6 +297,7 @@ $('#drpEditFreight').change(function() {
|
||||
$('#txtEditFreight').removeAttr( 'readonly','true' );
|
||||
$('#txtEditFreight').val('');
|
||||
}
|
||||
calculateFreight();
|
||||
|
||||
});
|
||||
});
|
||||
@ -560,8 +594,21 @@ function calculatePackaging()
|
||||
}
|
||||
else if(FreightType == '<?php echo PERTRIP;?>')
|
||||
{
|
||||
AfterFreight = <?php echo FREIGHT_PERTRIP;?>;
|
||||
}
|
||||
var nooftrips=$('#EditNOOfTrips').val();
|
||||
var freightrate=$('#txtEditFreight').val();
|
||||
if((nooftrips == '') || (txtEditFreight == '')){
|
||||
alert("Please Enter Number of Trips or Freight Rate!");
|
||||
$('#EditNOOfTrips').val(0.0);
|
||||
$('#txtEditFreight').val(0.0);
|
||||
$('#txtEditAfterFreight').val(0.0);
|
||||
}else{
|
||||
AfterFreight = <?php echo FREIGHT_PERTRIP;?>;
|
||||
var nooftrips=$('#EditNOOfTrips').val();
|
||||
if((nooftrips!= '') || (txtEditFreight == '')){
|
||||
AfterFreight = AfterFreight * nooftrips;
|
||||
}
|
||||
}
|
||||
}
|
||||
var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
|
||||
|
||||
$('#txtEditAfterFreight').val(AfterFreightval);
|
||||
@ -669,7 +716,7 @@ function calculateEditTaxValue()
|
||||
var Discount = $('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val();
|
||||
|
||||
|
||||
var totvalue = parseFloat(Discount) -( parseFloat(Packaging)+ parseFloat(Vat) + parseFloat(GST) + parseFloat(OtherTax) + parseFloat(Freight) + parseFloat(Insurance)) ;
|
||||
var totvalue = parseFloat(Packaging)+ parseFloat(Vat) + parseFloat(GST) + parseFloat(OtherTax) + parseFloat(Freight) + parseFloat(Insurance) ;
|
||||
|
||||
var tot = parseFloat(totvalue).toFixed(2);
|
||||
//alert('tot:'+tot);
|
||||
@ -717,28 +764,6 @@ function calculateEditTaxValue()
|
||||
.num {
|
||||
text-align:right;
|
||||
}
|
||||
#packagingcalmodel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
#ExciseDutyCalModel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
#VatCalModel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
#CSTCalModel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
|
||||
.modal
|
||||
{
|
||||
padding-right:30% ! important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<?php
|
||||
@ -747,9 +772,8 @@ function calculateEditTaxValue()
|
||||
echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
|
||||
|
||||
<section class="content">
|
||||
<div style="border:2px solid #333">
|
||||
<div>
|
||||
<center><b><h2>Siddharth Industries - Amendment Revenue Purchase Order- <?php echo $PONO;?></h2></b></center></div>
|
||||
<div style="border:2px solid #333">
|
||||
<div><center><b><h2>Siddharth Industries - Amendment Revenue Purchase Order- <?php echo $PONO;?></h2></b></center></div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@ -816,7 +840,7 @@ function calculateEditTaxValue()
|
||||
<b><u>Select Tax Range</u></b><br/>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo form_label('Local', 'Local') ." ". form_radio(array("name"=>"Range","id"=>"Local","value"=>"0", 'checked'=>set_radio('Range', '0', TRUE),'onchange'=>'SetVatorCST();')); ?> </td>
|
||||
<?php echo form_label('Local', 'Local') ." ". form_radio(array("name"=>"Range","id"=>"Local","value"=>"0", 'checked'=>set_radio('Range', '0', TRUE),'onchange'=>'SetVatorCST();')); ?> </td>
|
||||
<td><?php echo form_label('Inter state', 'Inter state') ." ". form_radio(array("name"=>"Range","id"=>"Inter_state","value"=>"1", 'checked'=>set_radio('Range', '1', FALSE),'onchange'=>'SetVatorCST();')); ?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -861,7 +885,11 @@ function calculateEditTaxValue()
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4" id="Deliverydtdiv" style="padding:0%;">
|
||||
<!--<input type="text" name="beforeDeliverydt" value="<?php echo $Deliverydt;?>"> -->
|
||||
<?php if($DeliverOption==1){
|
||||
$Deliverydt=null;
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="beforeDeliverydt" value="<?php echo $Deliverydt;?>">
|
||||
<label>Delivery Date</label>
|
||||
<div class="form-group">
|
||||
|
||||
@ -874,7 +902,7 @@ function calculateEditTaxValue()
|
||||
</div>
|
||||
<div class="col-md-4" id="Schedulediv" style="display:none;padding:0%;">
|
||||
<input type="hidden" name="beforeScheduleby" value="<?php echo $DeliverSchedule;?>">
|
||||
<label >Schedule By </label>
|
||||
<label >Schedule By</label>
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'Scheduleby','value' => set_value('Scheduleby',$DeliverSchedule),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
|
||||
@ -930,9 +958,10 @@ function calculateEditTaxValue()
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" id="otheroptiondiv" style="display:none;">
|
||||
<label>Description of Payable Terms<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<label>Description of Payable Terms<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'Otherpayment','Otherpayment' => set_value('Otherpayment'),'id'=>'Otherpayment', 'class' => 'form-control' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
@ -1067,12 +1096,9 @@ function calculateEditTaxValue()
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="EDITREVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
@ -1106,7 +1132,7 @@ function calculateEditTaxValue()
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Cost Center Code</label>
|
||||
<label>Cost Center Name</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditCostCenter','value' => set_value('EditCostCenter'),'id'=>'EditCostCenter', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
@ -1116,7 +1142,7 @@ function calculateEditTaxValue()
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Avl Bud Amt In INR</label>
|
||||
<label>Avl Bud Amt</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditAvlBudAmt','value' => set_value('EditAvlBudAmt'),'id'=>'EditAvlBudAmt', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
@ -1170,7 +1196,7 @@ function calculateEditTaxValue()
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label><?php echo "Rate In ($INRSYM)";?></label>
|
||||
<label>Rate</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditRate','value' => set_value('EditRate'),'id'=>'EditRate', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Editchange()','style'=>'text-align:right;' );
|
||||
@ -1179,7 +1205,7 @@ function calculateEditTaxValue()
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label><?php echo "Basic Amount ($INRSYM)";?></label>
|
||||
<label>Basic Amt In INR</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'txtEditBasicValue','value' => set_value('txtEditBasicValue'),'id'=>'txtEditBasicValue', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
|
||||
@ -1232,24 +1258,52 @@ function calculateEditTaxValue()
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label>CGST In %</label>
|
||||
<div id="SGSTModel" >
|
||||
<div class="col-md-2" >
|
||||
<label>SGST in %</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'txtEditGST','value' => set_value('txtEditGST'),'id'=>'txtEditGST', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>' calculateGST(1);','style'=>'text-align:right;');
|
||||
$data = array('name' => 'txtEditVat','value' => set_value('txtEditVat'),'id'=>'txtEditVat', 'class' => 'form-control num','onchange'=>'calculateVat();' ,'style'=>'text-align:right;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-2" >
|
||||
<label>SGST Amt In INR </label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'txtEditAfterVat','value' => set_value('txtEditAfterVat'),'id'=>'txtEditAfterVat', 'class' => 'form-control num' ,'readonly' => 'true','onkeypress'=>'return isNumberKey(event);','style'=>'text-align:right;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="IGSTModel" style="display:none;">
|
||||
<div class="col-md-2">
|
||||
<label>IGST in %</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'txtEditOtherTax','value' => set_value('txtEditOtherTax'),'id'=>'txtEditOtherTax', 'class' => 'form-control num','onkeypress'=>'return isNumberKey(event);','onchange'=>'calculateOtherTaxes(1);','style'=>'text-align:right;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label>CGST Amt In INR</label>
|
||||
<label>IGST Amt INR</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'txtEditAfterGST','value' => set_value('txtEditAfterGST'),'id'=>'txtEditAfterGST', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
|
||||
$data = array('name' => 'txtEditAfterOtherTax','value' => set_value('txtEditAfterOtherTax'),'id'=>'txtEditAfterOtherTax', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -1295,52 +1349,24 @@ function calculateEditTaxValue()
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="SGSTModel" >
|
||||
<div class="col-md-2" >
|
||||
<label>SGST In %</label>
|
||||
<div class="col-md-2">
|
||||
<label>CGST in %</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'txtEditVat','value' => set_value('txtEditVat'),'id'=>'txtEditVat', 'class' => 'form-control num','onchange'=>'calculateVat();' ,'style'=>'text-align:right;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-2" >
|
||||
<label>SGST Amt In INR </label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'txtEditAfterVat','value' => set_value('txtEditAfterVat'),'id'=>'txtEditAfterVat', 'class' => 'form-control num' ,'readonly' => 'true','onkeypress'=>'return isNumberKey(event);','style'=>'text-align:right;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="IGSTModel" style="display:none;">
|
||||
<div class="col-md-2">
|
||||
<label>IGST In %</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'txtEditOtherTax','value' => set_value('txtEditOtherTax'),'id'=>'txtEditOtherTax', 'class' => 'form-control num','onkeypress'=>'return isNumberKey(event);','onchange'=>'calculateOtherTaxes(1);','style'=>'text-align:right;');
|
||||
$data = array('name' => 'txtEditGST','value' => set_value('txtEditGST'),'id'=>'txtEditGST', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>' calculateGST(1);','style'=>'text-align:right;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label>IGST Amt INR</label>
|
||||
<label>CGST Amt In INR</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'txtEditAfterOtherTax','value' => set_value('txtEditAfterOtherTax'),'id'=>'txtEditAfterOtherTax', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
|
||||
$data = array('name' => 'txtEditAfterGST','value' => set_value('txtEditAfterGST'),'id'=>'txtEditAfterGST', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -1368,11 +1394,11 @@ function calculateEditTaxValue()
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" id="EditAmendTripsValue" style="display:none;">
|
||||
<div class="col-md-2" id="EditTripsValue" style="display:none;">
|
||||
<label>NO Of Trips</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditAmendNOOfTrips','value' => set_value('EditAmendNOOfTrips'),'id'=>'EditAmendNOOfTrips', 'class' => 'form-control num' );
|
||||
$data = array('name' => 'EditNOOfTrips','value' => set_value('EditNOOfTrips'),'id'=>'EditNOOfTrips', 'class' => 'form-control num' ,'onchange'=>'calculateFreight();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -1381,12 +1407,11 @@ function calculateEditTaxValue()
|
||||
<label>Freight Rate </label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'txtEditFreight','value' => set_value('txtEditFreight'),'id'=>'txtEditFreight', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculateFreight(1);','style'=>'text-align:right;');
|
||||
$data = array('name' => 'txtEditFreight','value' => set_value('txtEditFreight'),'id'=>'txtEditFreight', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculateFreight();','style'=>'text-align:right;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Freight Amt In INR</label>
|
||||
<div class="form-group">
|
||||
@ -1411,8 +1436,8 @@ function calculateEditTaxValue()
|
||||
<div class="row">
|
||||
<div class="col-md-12" >
|
||||
|
||||
<div class="col-md-4 ">
|
||||
<label><?php echo "Total Order Amt In ($INRSYM)";?></label>
|
||||
<div class="col-md-4 col-md-offset-8">
|
||||
<label>Total Order Amt In INR</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'txtEditTotalOrderValue','value' => set_value('txtEditTotalOrderValue'),'id'=>'txtEditTotalOrderValue', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
|
||||
@ -1420,14 +1445,16 @@ function calculateEditTaxValue()
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<a class="btn btn-primary EditRevenue" ID="EditRevenue"><i class="fa fa-plus"></i> <span class="bold">Edit Revenue</span></a> <a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div><hr/>
|
||||
<div class="row">
|
||||
<div class="col-md-12" >
|
||||
<div class="col-md-4 col-md-offset-8">
|
||||
<a class="btn btn-primary EditRevenue" ID="EditRevenue"><i class="fa fa-plus"></i> <span class="bold">Edit Revenue</span></a>
|
||||
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br/><br/>
|
||||
<!-- footer for revenue po -->
|
||||
@ -1450,10 +1477,10 @@ function calculateEditTaxValue()
|
||||
<th>Item Name</th>
|
||||
<th>Quantity</th>
|
||||
<th>UOM</th>
|
||||
<th>Rate In INR</th>
|
||||
<th>Basic Amount In INR</th>
|
||||
<th>Tax Amount In INR</th>
|
||||
<th>Total Order Amount In INR</th>
|
||||
<th>Rate</th>
|
||||
<th>Basic Amount</th>
|
||||
<th>Tax Amount</th>
|
||||
<th>Total Order Amount</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -1482,7 +1509,7 @@ function calculateEditTaxValue()
|
||||
<td align="right"><?php echo $record->TotalValue ?></td>
|
||||
<input type="hidden" name="<?php echo 'Reqnumber'.$index ?>" id="<?php echo 'Reqnumber'.$index ?>" value="<?php echo $record->ReqNo ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'departmentName'.$index ?>" id="<?php echo 'departmentName'.$index ?>" value="<?php echo $record->DepartmentName ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'AvilBudget'.$index ?>" id="<?php echo 'AvilBudget'.$index ?>" />
|
||||
<input type="hidden" name="<?php echo 'AvlAmount'.$index ?>" id="<?php echo 'AvlAmount'.$index ?>" value="<?php echo $AvlAmount ; ?>"/>
|
||||
<input type="hidden" name="<?php echo 'LineItemNo'.$index ?>" id="<?php echo 'LineItemNo'.$index ?>" value="<?php echo $record->LineItemNo ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'costCode'.$index ?>" id="<?php echo 'costCode'.$index ?>" value="<?php echo $record->CostCenterCode ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'materialCode'.$index ?>" id="<?php echo 'materialCode'.$index ?>" value="<?php echo $record->MaterialCode ; ?>" />
|
||||
@ -1515,6 +1542,7 @@ function calculateEditTaxValue()
|
||||
<input type="hidden" name="<?php echo 'FreightVal'.$index ?>" id="<?php echo 'FreightVal'.$index ?>" value="<?php echo $record->FreightValue ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'beforeFreightVal'.$index ?>" id="<?php echo 'FreightVal'.$index ?>" value="<?php echo $record->FreightValue ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'AfterFreightVal'.$index ?>" id="<?php echo 'AfterFreightVal'.$index ?>" value="<?php echo $record->AfterFreightValue ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'Nooftrips'.$index ?>" id="<?php echo 'Nooftrips'.$index ?>" value="<?php echo $record->NoOfTrip ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'basicval'.$index ?>" id="<?php echo 'basicval'.$index ?>" value="<?php echo $record->BasicValue ; ?>"/>
|
||||
<input type="hidden" name="<?php echo 'Insval'.$index ?>" id="<?php echo 'Insval'.$index ?>" value="<?php echo $record->Insurance ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'beforeInsval'.$index ?>" id="<?php echo 'Insval'.$index ?>" value="<?php echo $record->Insurance ; ?>" />
|
||||
@ -1556,11 +1584,8 @@ function calculateEditTaxValue()
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" style="border:1px solid;">
|
||||
@ -1617,7 +1642,7 @@ function calculateEditTaxValue()
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<label >Total Packaging Amount In INR </label>
|
||||
<label >Total Packaging Amount In INR </label>
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'txtTotalPackaing','value' => set_value('txtTotalPackaing',$totPackagingAmt),'id'=>'txtTotalPackaing', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
|
||||
@ -1645,6 +1670,7 @@ function calculateEditTaxValue()
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Total Order Amount In INR </label>
|
||||
<!--<input type="text" name="preTotalOdervalue" value="<?php echo $totOrderSummaryAmt;?>"> -->
|
||||
<?php
|
||||
$data = array('name' => 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary',$totOrderSummaryAmt),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
|
||||
echo form_input($data);
|
||||
@ -1678,17 +1704,18 @@ function calculateEditTaxValue()
|
||||
|
||||
|
||||
|
||||
</div><br/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<div class="col-md-2"><label>Request On</label></div>
|
||||
<div class="col-md-4">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'Requeston','value' => set_value('Requeston',$Reqon),'id'=>'Requeston', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
|
||||
$data = array('name' => 'Requeston','value' => set_value('Requeston',$Reqon),'id'=>'Requeston', 'class' => 'form-control num' ,'required' => 'true','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -1697,7 +1724,7 @@ function calculateEditTaxValue()
|
||||
<div class="col-md-2"><label>Request By</label></div>
|
||||
<div class="col-md-4">
|
||||
<?php
|
||||
$data = array('name' => 'RequestBy','value' => set_value('RequestBy', $Requestedby),'id'=>'RequestBy', 'class' => 'form-control' ,'required' => 'true');
|
||||
$data = array('name' => 'RequestBy','value' => set_value('RequestBy', $Requestedby),'id'=>'RequestBy', 'class' => 'form-control' ,'required' => 'true','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -1705,7 +1732,7 @@ function calculateEditTaxValue()
|
||||
|
||||
<div class="row"><div class="col-md-2"><label>Status</label></div>
|
||||
<div class="col-md-4">
|
||||
<?php
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'Status','value' => set_value('Status',$POStatus),'id'=>'Status', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
@ -1713,12 +1740,13 @@ function calculateEditTaxValue()
|
||||
</div><br/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div></div>
|
||||
</section> </div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div></div></section>
|
||||
|
||||
</div>
|
||||
<script type="text/html" id="RevenueList">
|
||||
<tr id="<%=index%>">
|
||||
<td align="left"><%=index%></td>
|
||||
@ -1756,7 +1784,7 @@ $("#EDITREVENUE").on("shown.bs.modal", function(e) {
|
||||
$('#EditReqNo').val($('#Reqnumber'+userid).val());
|
||||
$('#EditdeptName').val($('#departmentName'+userid).val());
|
||||
$("#EditCostCenter").val($('#costCode'+userid).val());
|
||||
$('#EditAvlBudAmt').val($('#AvilBudget'+userid).val());
|
||||
$('#EditAvlBudAmt').val($('#AvlAmount'+userid).val());
|
||||
|
||||
$('#EditMaterialCode').val($('#materialCode'+userid).val());
|
||||
$('#EditItemName').val($('#materialName'+userid).val());
|
||||
@ -1784,6 +1812,12 @@ $("#EDITREVENUE").on("shown.bs.modal", function(e) {
|
||||
//$('#txtEditAfterExciseDuty').val($('#AfterExciseVal'+userid).val());
|
||||
$('#txtEditOtherTax').val($('#OtherTaxVal'+userid).val());
|
||||
$('#txtEditAfterOtherTax').val($('#AfterOtherTaxVal'+userid).val());
|
||||
|
||||
if($('#FreightType'+userid).val()=='PER TRIP')
|
||||
{
|
||||
$('#EditTripsValue').show();
|
||||
$('#EditNOOfTrips').val($('#Nooftrips'+userid).val());
|
||||
}
|
||||
$('#txtEditFreight').val($('#FreightVal'+userid).val());
|
||||
$('#txtEditAfterFreight').val($('#AfterFreightVal'+userid).val());
|
||||
$('#txtEditInsurance').val($('#Insval'+userid).val());
|
||||
@ -1898,7 +1932,8 @@ function AmendChange(){
|
||||
|
||||
var OtherTaxVal = $("#txtEditOtherTax").val();//IGST
|
||||
var AfterOtherTaxVal = $("#txtEditAfterOtherTax").val();
|
||||
|
||||
var Trips = $('#EditNOOfTrips').val();
|
||||
|
||||
var FreightType = $("#drpEditFreight").val();
|
||||
var FreightVal = $("#txtEditFreight").val();
|
||||
var AfterFreightVal = $("#txtEditAfterFreight").val();
|
||||
@ -1908,6 +1943,7 @@ function AmendChange(){
|
||||
var TotalOrderValue = $("#txtEditTotalOrderValue").val();
|
||||
|
||||
var TotalTaxValue = calculateEditTaxValue();
|
||||
alert(TotalTaxValue);
|
||||
|
||||
|
||||
|
||||
@ -1950,6 +1986,8 @@ function AmendChange(){
|
||||
$('#OtherTaxVal'+userid).val(OtherTaxVal);
|
||||
$('#AfterOtherTaxVal'+userid).val(AfterOtherTaxVal);
|
||||
$('#FreightType'+userid).val(FreightType);
|
||||
$('#Nooftrips'+userid).val(Trips);
|
||||
//alert($('#Nooftrips'+userid).val());
|
||||
$('#FreightVal'+userid).val(FreightVal);
|
||||
$('#AfterFreightVal'+userid).val(AfterFreightVal);
|
||||
$('#basicval'+userid).val(basicval);
|
||||
@ -2047,7 +2085,7 @@ function populateValueMainFormForEditRevenueTax()
|
||||
var Discount =$('#AfterDisVal'+rowid).val() == '' ? '0.00' : $('#AfterDisVal'+rowid).val();
|
||||
var BasicVal = $('#basicval'+rowid).val() == '' ? '0.00' : $('#basicval'+rowid).val();
|
||||
var TotalVal =$('#TotalOrderValue'+rowid).val() == '' ? '0.00' : $('#TotalOrderValue'+rowid).val();
|
||||
//alert(TotalVal);
|
||||
alert(TotalVal);
|
||||
|
||||
|
||||
totBasicAmt = parseFloat(totBasicAmt ) + parseFloat(BasicVal);
|
||||
@ -2241,16 +2279,16 @@ $('#Scheduleby').change(function(){
|
||||
$('#Scheduleby').val('');
|
||||
|
||||
});
|
||||
<!-- script for table , It works under the datatable plugin-->
|
||||
<!-- script for table , It works uned the datatable plugin-->
|
||||
$(function () {
|
||||
|
||||
|
||||
$('#revenueTax').DataTable({
|
||||
"paging": false,
|
||||
"lengthChange": true,
|
||||
"lengthChange": false,
|
||||
"searching": false,
|
||||
//"ordering": true,
|
||||
// "info": true,
|
||||
"autoWidth": false
|
||||
"autoWidth": true
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -17,6 +17,8 @@ $DeliverOption='';
|
||||
$Totalotherallowance=0.0;
|
||||
$TotalBasicAmount = 0.0;
|
||||
$ServiceDescription = '';
|
||||
$PaymentOtherDescription='';
|
||||
|
||||
$ServiceMaterialDescription='';
|
||||
|
||||
$Deliverydt='';
|
||||
@ -69,7 +71,7 @@ if(!empty($POMaster))
|
||||
$PONO = $Req->PONO;
|
||||
$ServiceDescription = $Req->ServiceDescription;
|
||||
//Terms=$Req->PaymentTerms;
|
||||
|
||||
$PaymentOtherDescription=$Req->PaymentOtherDescription;
|
||||
$WrkStatus=$Req->ServiceWorkStatus;
|
||||
$StatusName=$Req->StatusName;
|
||||
}
|
||||
@ -105,6 +107,7 @@ foreach ($PaymentTerms as $TER)
|
||||
//print_r($PaymentTerms);
|
||||
//print_r($Payment);
|
||||
$Terms=$TER->PaymentTerms;
|
||||
|
||||
//echo "CURRENT TERMS :" . $Terms;
|
||||
}
|
||||
|
||||
@ -131,6 +134,7 @@ tinymce.init({
|
||||
});
|
||||
var DelOpt = '<?php echo $DeliverOption; ?>';
|
||||
var SchName = '<?php echo $DeliverSchedule; ?>';
|
||||
var others ='<?php echo $PaymentOtherDescription;?>';
|
||||
var DelDt = '<?php echo $Deliverydt; ?>';
|
||||
$(document).ready(function () {
|
||||
if(DelOpt=="0"){
|
||||
@ -145,6 +149,15 @@ $('#Deliverydt').val(DelDt);
|
||||
$('#Deliverydt').val('');
|
||||
|
||||
$('#Scheduleby').val(SchName);
|
||||
|
||||
}
|
||||
|
||||
if($('#PaymentTerms').val()== 'PT08')
|
||||
{
|
||||
|
||||
$('#otheroptiondiv').show();
|
||||
$('#Otherpayment').val(others);
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@ -566,9 +579,7 @@ function clearEditTaxField()
|
||||
|
||||
}
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#PaymentTerms").select2();
|
||||
|
||||
$("#PaymentTerms").select2();
|
||||
$('#Date').click(function () {
|
||||
//for Date range selection
|
||||
$('#Schedulediv').hide();
|
||||
@ -798,12 +809,13 @@ $(document).ready(function () {
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-4" id="otheroptiondiv" style="display:none;">
|
||||
<label>Description of Payable Terms<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
|
||||
</div>
|
||||
<div class="col-md-4" id="otheroptiondiv" style="display:none;">
|
||||
<label><span class="badge" style="color:red;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'Otherpayment','Otherpayment' => set_value('Otherpayment'),'id'=>'Otherpayment', 'class' => 'form-control' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
@ -853,7 +865,7 @@ $(document).ready(function () {
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Cost Center Code</label>
|
||||
<label>Cost Center Name</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditCostCenter','value' => set_value('EditCostCenter'),'id'=>'EditCostCenter', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
@ -1214,38 +1226,7 @@ $(document).ready(function () {
|
||||
</div>
|
||||
|
||||
|
||||
<!--<div class="col-md-12" style="padding:5px;">
|
||||
<div class="col-md-4">
|
||||
<span>Request On</span>
|
||||
<?php
|
||||
$data = array('name' => 'Requeston','value' => set_value('Requeston',$Reqon),'id'=>'Requeston', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<span>Request By</span>
|
||||
<?php
|
||||
$data = array('name' => 'RequestBy','value' => set_value('RequestBy',$RequesterName),'id'=>'RequestBy', 'class' => 'form-control' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<span>Status</span>
|
||||
<?php
|
||||
// $options = array("0"=>'Select Status');
|
||||
// echo form_dropdown('Status', $options,set_value('Status'),'id="Status"' ,'required="true"' ,'class="form-control select2')
|
||||
// $options = array("0"=>$PONOStatus);
|
||||
// echo form_dropdown('Status', $options,set_value('Status',$StatusName),'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);
|
||||
?>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="border: 1px solid">
|
||||
<div class="row" style="border: 1px solid">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-2">
|
||||
@ -1289,7 +1270,7 @@ $(document).ready(function () {
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label >Total Order Value In INR </label>
|
||||
<input type="text" name="preTotalordervalue" value="<?php echo $TotalSummary;?>">
|
||||
<input type="hidden" name="preTotalordervalue" value="<?php echo $TotalSummary;?>">
|
||||
<?php
|
||||
$data = array('name' => 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary',number_format($TotalSummary, 2, '.', '')),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
@ -1321,46 +1302,42 @@ $(document).ready(function () {
|
||||
<input type="reset" class="btn btn-primary" value="Reset">
|
||||
|
||||
|
||||
</div>
|
||||
</div><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" style="padding:2%;">
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<div class="col-md-2"><label>Request On</label></div>
|
||||
<br/>
|
||||
</div><br/>
|
||||
<div class="col-md-12" style="padding:5px;">
|
||||
<div class="col-md-4">
|
||||
|
||||
<span>Request On</span>
|
||||
<?php
|
||||
$data = array('name' => 'Requeston','value' => set_value('Requeston',$Reqon),'id'=>'Requeston', 'class' => 'form-control num' ,'required' => 'true','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
$data = array('name' => 'Requeston','value' => set_value('Requeston',$Reqon),'id'=>'Requeston', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div><br/>
|
||||
<div class="row">
|
||||
<div class="col-md-2"><label>Request By</label></div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-4">
|
||||
<span>Request By</span>
|
||||
<?php
|
||||
$data = array('name' => 'RequestBy','value' => set_value('RequestBy', $RequesterName),'id'=>'RequestBy', 'class' => 'form-control' ,'required' => 'true','readonly' => 'true');
|
||||
$data = array('name' => 'RequestBy','value' => set_value('RequestBy',$RequesterName),'id'=>'RequestBy', 'class' => 'form-control' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div><br/>
|
||||
|
||||
<div class="row"><div class="col-md-2"><label>Status</label></div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-4">
|
||||
<span>Status</span>
|
||||
<?php
|
||||
|
||||
// $options = array("0"=>'Select Status');
|
||||
// echo form_dropdown('Status', $options,set_value('Status'),'id="Status"' ,'required="true"' ,'class="form-control select2')
|
||||
// $options = array("0"=>$PONOStatus);
|
||||
// echo form_dropdown('Status', $options,set_value('Status',$StatusName),'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);
|
||||
?>
|
||||
</div><br/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -1906,12 +1883,11 @@ function validateServiceTax()
|
||||
}
|
||||
//
|
||||
</script>
|
||||
<script>
|
||||
// <script>
|
||||
// $('#PaymentTerms').change(function() {
|
||||
// var data=$('#PaymentTerms option:selected').text();
|
||||
// $('#beforePaymentTermsText').val(data);
|
||||
// alert( data );
|
||||
|
||||
// });
|
||||
// </script>
|
||||
<script>
|
||||
@ -2024,7 +2000,6 @@ function calculateIgstTax(varBasicValue,Igst)
|
||||
return TAXval;// $('#AfterServiceTax').val(TAXval);
|
||||
|
||||
}
|
||||
//If others is the payment terms to display mandatory field
|
||||
$("#PaymentTerms").change(function() {
|
||||
if ($('#PaymentTerms').val().trim()=='PT08')
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user