done revenue and service Po schedule options

This commit is contained in:
venbatechnologies@gmail.com 2017-06-19 16:50:12 +05:30
parent c87d465869
commit b08f47b8df
11 changed files with 1040 additions and 188 deletions

View File

@ -173,6 +173,9 @@ define('PURCHASE_RATE', 'txtbasicinrprice/txt
define('CUSTOMDUTY_EXP', 'txtgrossexp/txtCtablequantity'); define('CUSTOMDUTY_EXP', 'txtgrossexp/txtCtablequantity');
define('RMC_CAL', 'txtpurchaserate+txtcustomdutyexp'); define('RMC_CAL', 'txtpurchaserate+txtcustomdutyexp');
define('CALCULATE_TOTAL', '(txtrmc*quantity)+basicprice'); define('CALCULATE_TOTAL', '(txtrmc*quantity)+basicprice');
/* Capital Po Calculations */
define('Capital_Landing_Charge', 'basicPrice*(landCharge/100)');
define('Capital_Highseas_Charge', '(basicPrice+afterLandingCharge)*(highSeas/100)');

View File

@ -500,6 +500,15 @@ class purchaseorder extends BaseController
$DeliveryAddr = $this->input->post('DeliveryAddr'); $DeliveryAddr = $this->input->post('DeliveryAddr');
$dt = $this->input->post('Deliverydt'); $dt = $this->input->post('Deliverydt');
$Deliverydt = $this->getDateformat($dt); $Deliverydt = $this->getDateformat($dt);
$DeliveryOption = $this->input->post('DateRange');
if($DeliveryOption==1){
$Deliverydt = '';
$DeliverySchedule = $this->input->post('Scheduleby');
}
else{
$Deliverydt = $this->getDateformat($dt);
$DeliverySchedule = '';
}
$POType = $this->input->post('POType'); $POType = $this->input->post('POType');
$PoRange = $this->input->post('txtPoRange'); $PoRange = $this->input->post('txtPoRange');
@ -516,7 +525,8 @@ class purchaseorder extends BaseController
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s'); $createddt = $dt->format('Y-m-d H:i:s');
// PO Master // PO Master
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt ); $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt );
$POMaster = $this->purchaseorder_model->addPOMaster($POList); $POMaster = $this->purchaseorder_model->addPOMaster($POList);

View File

@ -69,6 +69,15 @@ class servicepurchaseorder extends BaseController
$DeliveryAddr = $this->input->post('DeliveryAddr'); $DeliveryAddr = $this->input->post('DeliveryAddr');
$dt = $this->input->post('Deliverydt'); $dt = $this->input->post('Deliverydt');
$Deliverydt = $this->getDateformat($dt); $Deliverydt = $this->getDateformat($dt);
$DeliveryOption = $this->input->post('DateRange');
if($DeliveryOption==1){
$Deliverydt = '';
$DeliverySchedule = $this->input->post('Scheduleby');
}
else{
$Deliverydt = $this->getDateformat($dt);
$DeliverySchedule = '';
}
$POType = $this->input->post('POType'); $POType = $this->input->post('POType');
$SpcialInstruction = $this->input->post('txtSpcialInstruction'); $SpcialInstruction = $this->input->post('txtSpcialInstruction');
@ -84,7 +93,8 @@ class servicepurchaseorder extends BaseController
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s'); $createddt = $dt->format('Y-m-d H:i:s');
// PO Master // PO Master
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt ); $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,Delivery'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt );
$POMaster = $this->purchaseorder_model->addPOMaster($POList); $POMaster = $this->purchaseorder_model->addPOMaster($POList);

View File

@ -0,0 +1,7 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
ERROR - 2017-06-19 13:18:05 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
ERROR - 2017-06-19 13:18:05 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
ERROR - 2017-06-19 13:18:05 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
ERROR - 2017-06-19 13:18:05 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
ERROR - 2017-06-19 13:18:05 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214

File diff suppressed because it is too large Load Diff

0
application/views/editimportpo.php Normal file → Executable file
View File

0
application/views/importpo.php Normal file → Executable file
View File

0
application/views/poapproval_view.php Normal file → Executable file
View File

0
application/views/porelease_view.php Normal file → Executable file
View File

View File

@ -1002,6 +1002,9 @@ function calculatePackaging(isEdit)
} }
else else
{ {
var discountValue = parseFloat($('#txtAfterDiscount').val());
var packageValue = parseFloat($('#txtAfterPackaging').val());
var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val()); var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
vatValue = parseFloat($('#txtVat').val()); vatValue = parseFloat($('#txtVat').val());
AfterVat = <?php echo VAT_ONEXICSEVALUE; ?>; AfterVat = <?php echo VAT_ONEXICSEVALUE; ?>;
@ -1012,8 +1015,12 @@ function calculatePackaging(isEdit)
} }
else if(VatCalculation == 0 && $('#txtVat').val() != '') else if(VatCalculation == 0 && $('#txtVat').val() != '')
{ {
var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
var discountValue = parseFloat($('#txtAfterDiscount').val());
var packageValue = parseFloat($('#txtAfterPackaging').val());
vatValue = parseFloat($('#txtVat').val()); vatValue = parseFloat($('#txtVat').val());
AfterVat = <?php echo VAT_ONBASICVALUE; ?>; AfterVat = <?php echo VAT_ONEXICSEVALUE; ?>;
var Vatval = parseFloat(AfterVat).toFixed(2); var Vatval = parseFloat(AfterVat).toFixed(2);
$('#txtAfterVat').val(Vatval); $('#txtAfterVat').val(Vatval);
@ -1109,7 +1116,9 @@ function calculatePackaging(isEdit)
else else
{ {
var basicValue = parseFloat($('#txtBasicValue').val()); var basicValue = parseFloat($('#txtBasicValue').val());
var discountValue = parseFloat($('#txtAfterDiscount').val());
var packageValue = parseFloat($('#txtAfterPackaging').val());
var AfterCST = 0.0; var AfterCST = 0.0;
if(CSTCalculation != 0 && $('#txtCST').val() != '' ) if(CSTCalculation != 0 && $('#txtCST').val() != '' )
{ {
@ -1125,7 +1134,7 @@ function calculatePackaging(isEdit)
{ {
var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val()); var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
var CSTValue= parseFloat($('#txtCST').val()); var CSTValue= parseFloat($('#txtCST').val());
AfterCST = <?php echo CST_ONBASICVALUE; ?>; AfterCST = <?php echo CST_ONEXICSEVALUE; ?>;
var Vatval = parseFloat(AfterCST).toFixed(2); var Vatval = parseFloat(AfterCST).toFixed(2);
$('#txtAfterCST').val(Vatval); $('#txtAfterCST').val(Vatval);
@ -1133,8 +1142,9 @@ function calculatePackaging(isEdit)
} }
else if(CSTCalculation == 0 && $('#txtCST').val() != '') else if(CSTCalculation == 0 && $('#txtCST').val() != '')
{ {
var CSTValue= parseFloat($('#txtCST').val()); var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
AfterCST = <?php echo CST_ONBASICVALUE; ?>; var CSTValue= parseFloat($('#txtCST').val());
AfterCST = <?php echo CST_ONEXICSEVALUE; ?>;
var Vatval = parseFloat(AfterCST).toFixed(2); var Vatval = parseFloat(AfterCST).toFixed(2);
$('#txtAfterCST').val(Vatval); $('#txtAfterCST').val(Vatval);
@ -1431,6 +1441,9 @@ function calculatePackaging(isEdit)
{ {
AfterFreight = <?php echo FREIGHT_PERTRIP;?>; AfterFreight = <?php echo FREIGHT_PERTRIP;?>;
} }
else {
AfterFreight = $("#txtFreight").val();
}
var AfterFreightval = parseFloat(AfterFreight).toFixed(2); var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
$('#txtAfterFreight').val(AfterFreightval); $('#txtAfterFreight').val(AfterFreightval);
@ -1692,6 +1705,18 @@ function calculateEditTaxValue()
//alert('tot:'+tot); //alert('tot:'+tot);
return tot; return tot;
} }
$(document).ready(function () {
$('#Date').click(function () {
//for Date range selection
$('#Schedulediv').hide();
$('#Deliverydtdiv').show();
});
$('#Schedule').click(function () {
//for schedule range selection
$('#Deliverydtdiv').hide();
$('#Schedulediv').show();
});
});
</script> </script>
<style> <style>
.content { .content {
@ -1721,6 +1746,7 @@ body {
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-3"> <div class="col-md-3">
<div class="col-md-12">
<label>Requistion No</label> <label>Requistion No</label>
<?php <?php
$options = array("0"=>'Selected Requisition Numbers'); $options = array("0"=>'Selected Requisition Numbers');
@ -1734,6 +1760,16 @@ body {
} }
echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' ,'required="true"' , 'height="400px"' ); echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' ,'required="true"' , 'height="400px"' );
?> ?>
</div>
<div class="col-md-12">
<label>Purchase Order Date</label>
<div class="form-group">
<?php
$data = array('name' => 'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
echo form_input($data);
?>
</div>
</div>
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
<div class="row"> <div class="row">
@ -1760,21 +1796,20 @@ body {
<div class="col-md-4"> <div class="col-md-4">
<label>Purchase Order Type</label> <label>Purchase Order Type</label>
<div class="form-group"> <div class="form-group">
<?php
<?php
$data = array('name' => 'POType','value' => set_value('POType',$ReqType),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true'); $data = array('name' => 'POType','value' => set_value('POType',$ReqType),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data); echo form_input($data);
?> ?>
</div> </div>
</div> </div>
<div class="col-md-4"> <div class="col-md-2" style="padding: 0px;">
<div id="div1" style="display:block;"> <div id="div1" style="display:block;">
<b><u>Select Tax Range</u></b><br/> <b><u>Select Tax Range</u></b><br/>
<tr> <tr>
<td> <td>
<?php echo form_label('Local', 'Local') ."&nbsp;&nbsp;". form_radio(array("name"=>"Range","id"=>"Local","value"=>"0", 'checked'=>'checked','onchange'=>'SetVatorCST();')); ?>&nbsp;&nbsp;&nbsp;&nbsp;</td> <?php echo form_label('Local', 'Local') ."&nbsp;". form_radio(array("name"=>"Range","id"=>"Local","value"=>"0", 'checked'=>'checked','onchange'=>'SetVatorCST();')); ?>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><?php echo form_label('Inter state', 'Inter state') ."&nbsp;&nbsp;". form_radio(array("name"=>"Range","id"=>"Inter_state","value"=>"1", 'onchange'=>'SetVatorCST();')); ?> <td><?php echo form_label('Inter state', 'Inter state') ."&nbsp;". form_radio(array("name"=>"Range","id"=>"Inter_state","value"=>"1", 'onchange'=>'SetVatorCST();')); ?>
</td> </td>
</tr> </tr>
</div> </div>
@ -1782,9 +1817,19 @@ body {
</div> </div>
<div id="div4" style="display:none;"> <div id="div4" style="display:none;">
</div> </div>
</div> </div>
<div class="col-md-2" style="padding:0px;">
<b><u>Select Delivery By</u></b><br/>
<tr>
<td>
<?php echo form_label('Date', 'Date') ."&nbsp;". form_radio(array("name"=>"DateRange", "id"=>"Date", "value"=>"0", 'checked'=>set_radio('DateRange', '0', TRUE))); ?>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
<?php echo form_label('Schedule', 'Schedule') ."&nbsp;". form_radio(array("name"=>"DateRange", "id"=>"Schedule", "value"=>"1", 'checked'=>set_radio('DateRange', '1', FALSE))); ?>
</td>
</tr>
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
@ -1805,25 +1850,22 @@ body {
?> ?>
</div> </div>
</div> </div>
<div class="col-md-2"> <div class="col-md-4" id="Deliverydtdiv" style="padding:0%;">
<label>PO Date</label>
<div class="form-group">
<?php
$data = array('name' => 'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2">
<label>Delivery Date</label> <label>Delivery Date</label>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('name' => 'Deliverydt','value' => set_value('Deliverydt',$CurrentDate),'id'=>'Deliverydt', 'class' => 'form-control' ,'required' => 'true','onkeypress'=>'return false;'); $data = array('name' => 'Deliverydt','value' => set_value('Deliverydt',$CurrentDate),'id'=>'Deliverydt', 'class' => 'form-control' ,'required' => 'true','onkeypress'=>'return false;');
echo form_input($data); echo form_input($data);
?> ?>
</div> </div>
</div> </div>
<div class="col-md-4" id="Schedulediv" style="display:none;padding:0%;">
<label >Schedule </label>
<?php
$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> </div>
</div> </div>
@ -3641,4 +3683,19 @@ $('#txtStatus').val(stat);
}); });
}); });
// this function is used to clear data changing schedule option
$('#Scheduleby').change(function(){
$("#Deliverydt").datepicker({
minDate : 'now',
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
});
});
$('#Deliverydt').change(function(){
$('#Scheduleby').val('');
});
</script> </script>

View File

@ -514,6 +514,18 @@ function clearEditTaxField()
RequistQuantity = ''; RequistQuantity = '';
} }
$(document).ready(function () {
$('#Date').click(function () {
//for Date range selection
$('#Schedulediv').hide();
$('#Deliverydtdiv').show();
});
$('#Schedule').click(function () {
//for schedule range selection
$('#Deliverydtdiv').hide();
$('#Schedulediv').show();
});
});
</script> </script>
<style> <style>
.modal .modal
@ -544,6 +556,7 @@ function clearEditTaxField()
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-3"> <div class="col-md-3">
<div class="col-md-12">
<label>Requistion No</label> <label>Requistion No</label>
@ -562,6 +575,16 @@ function clearEditTaxField()
echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' , 'required="true"'); echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' , 'required="true"');
?> ?>
</div>
<div class="col-md-12">
<label>Purchase Order Date</label>
<div class="form-group">
<?php
$data = array('name' => 'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
echo form_input($data);
?>
</div>
</div>
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
@ -621,15 +644,17 @@ function clearEditTaxField()
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<div class="col-md-12"> <div class="col-md-12">
<label>Purchase Order Date</label> <b><u>Select Delivery By</u></b><br/>
<div class="form-group"> <tr>
<?php <td>
$data = array('name' => 'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;'); <?php echo form_label('Date', 'Date') ."&nbsp;&nbsp;". form_radio(array("name"=>"DateRange", "id"=>"Date", "value"=>"0", 'checked'=>set_radio('DateRange', '0', TRUE))); ?>&nbsp;&nbsp;&nbsp;&nbsp;</td>
echo form_input($data); <td>
?> <?php echo form_label('Schedule', 'Schedule') ."&nbsp;&nbsp;". form_radio(array("name"=>"DateRange", "id"=>"Schedule", "value"=>"1", 'checked'=>set_radio('DateRange', '1', FALSE))); ?>
</div>
</td>
</tr>
</div> </div>
<div class="col-md-12"> <div class="col-md-12" id="Deliverydtdiv"><br/>
<label>Delivery Date</label> <label>Delivery Date</label>
<div class="form-group"> <div class="form-group">
<?php <?php
@ -638,6 +663,14 @@ function clearEditTaxField()
?> ?>
</div> </div>
</div> </div>
<div class="col-md-12" id="Schedulediv" style="display:none;"><br/>
<label >Schedule :</label>
<?php
$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> </div>
</div> </div>
@ -1802,6 +1835,21 @@ function validateServiceTax()
} }
} }
// this function is used to clear data changing schedule option
$('#Scheduleby').change(function(){
$("#Deliverydt").datepicker({
minDate : 'now',
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
});
});
$('#Deliverydt').change(function(){
$('#Scheduleby').val('');
});
// //
</script> </script>
<script> <script>
@ -1874,5 +1922,7 @@ $('#txtStatus').val(stat);
}); });
}); });
</script> </script>