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('RMC_CAL', 'txtpurchaserate+txtcustomdutyexp');
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');
$dt = $this->input->post('Deliverydt');
$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');
$PoRange = $this->input->post('txtPoRange');
@ -516,7 +525,8 @@ class purchaseorder extends BaseController
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s');
// 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);
@ -1264,4 +1274,4 @@ public function importpoprint($PONO)
}
?>
?>

View File

@ -69,6 +69,15 @@ class servicepurchaseorder extends BaseController
$DeliveryAddr = $this->input->post('DeliveryAddr');
$dt = $this->input->post('Deliverydt');
$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');
$SpcialInstruction = $this->input->post('txtSpcialInstruction');
@ -84,7 +93,8 @@ class servicepurchaseorder extends BaseController
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s');
// 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);
@ -279,4 +289,4 @@ class servicepurchaseorder extends BaseController
}
}
?>
?>

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
{
var discountValue = parseFloat($('#txtAfterDiscount').val());
var packageValue = parseFloat($('#txtAfterPackaging').val());
var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
vatValue = parseFloat($('#txtVat').val());
AfterVat = <?php echo VAT_ONEXICSEVALUE; ?>;
@ -1012,8 +1015,12 @@ function calculatePackaging(isEdit)
}
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());
AfterVat = <?php echo VAT_ONBASICVALUE; ?>;
AfterVat = <?php echo VAT_ONEXICSEVALUE; ?>;
var Vatval = parseFloat(AfterVat).toFixed(2);
$('#txtAfterVat').val(Vatval);
@ -1109,7 +1116,9 @@ function calculatePackaging(isEdit)
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;
if(CSTCalculation != 0 && $('#txtCST').val() != '' )
{
@ -1125,7 +1134,7 @@ function calculatePackaging(isEdit)
{
var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
var CSTValue= parseFloat($('#txtCST').val());
AfterCST = <?php echo CST_ONBASICVALUE; ?>;
AfterCST = <?php echo CST_ONEXICSEVALUE; ?>;
var Vatval = parseFloat(AfterCST).toFixed(2);
$('#txtAfterCST').val(Vatval);
@ -1133,8 +1142,9 @@ function calculatePackaging(isEdit)
}
else if(CSTCalculation == 0 && $('#txtCST').val() != '')
{
var CSTValue= parseFloat($('#txtCST').val());
AfterCST = <?php echo CST_ONBASICVALUE; ?>;
var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
var CSTValue= parseFloat($('#txtCST').val());
AfterCST = <?php echo CST_ONEXICSEVALUE; ?>;
var Vatval = parseFloat(AfterCST).toFixed(2);
$('#txtAfterCST').val(Vatval);
@ -1430,6 +1440,9 @@ function calculatePackaging(isEdit)
else if(FreightType == '<?php echo PERTRIP;?>')
{
AfterFreight = <?php echo FREIGHT_PERTRIP;?>;
}
else {
AfterFreight = $("#txtFreight").val();
}
var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
@ -1692,6 +1705,18 @@ function calculateEditTaxValue()
//alert('tot:'+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>
<style>
.content {
@ -1721,6 +1746,7 @@ body {
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<div class="col-md-12">
<label>Requistion No</label>
<?php
$options = array("0"=>'Selected Requisition Numbers');
@ -1733,7 +1759,17 @@ body {
endforeach;
}
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 class="col-md-9">
<div class="row">
@ -1759,32 +1795,41 @@ body {
</div>
<div class="col-md-4">
<label>Purchase Order Type</label>
<div class="form-group">
<?php
<div class="form-group">
<?php
$data = array('name' => 'POType','value' => set_value('POType',$ReqType),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-4">
<div class="col-md-2" style="padding: 0px;">
<div id="div1" style="display:block;">
<b><u>Select Tax Range</u></b><br/>
<tr>
<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>
<td><?php echo form_label('Inter state', 'Inter state') ."&nbsp;&nbsp;". form_radio(array("name"=>"Range","id"=>"Inter_state","value"=>"1", 'onchange'=>'SetVatorCST();')); ?>
<?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;". form_radio(array("name"=>"Range","id"=>"Inter_state","value"=>"1", 'onchange'=>'SetVatorCST();')); ?>
</td>
</tr>
</div>
<div id="div2" style="display:none;">
</div>
<div id="div4" style="display:none;">
</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 class="row">
<div class="col-md-4">
@ -1805,25 +1850,22 @@ body {
?>
</div>
</div>
<div class="col-md-2">
<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">
<div class="col-md-4" id="Deliverydtdiv" style="padding:0%;">
<label>Delivery Date</label>
<div class="form-group">
<?php
$data = array('name' => 'Deliverydt','value' => set_value('Deliverydt',$CurrentDate),'id'=>'Deliverydt', 'class' => 'form-control' ,'required' => 'true','onkeypress'=>'return false;');
echo form_input($data);
?>
?>
</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>
@ -3641,4 +3683,19 @@ $('#txtStatus').val(stat);
});
});
</script>
// 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>

View File

@ -514,6 +514,18 @@ function clearEditTaxField()
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>
<style>
.modal
@ -544,6 +556,7 @@ function clearEditTaxField()
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<div class="col-md-12">
<label>Requistion No</label>
@ -561,7 +574,17 @@ function clearEditTaxField()
}
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 class="col-md-9">
@ -621,15 +644,17 @@ function clearEditTaxField()
</div>
<div class="col-md-4">
<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>
<b><u>Select Delivery By</u></b><br/>
<tr>
<td>
<?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>
<td>
<?php echo form_label('Schedule', 'Schedule') ."&nbsp;&nbsp;". form_radio(array("name"=>"DateRange", "id"=>"Schedule", "value"=>"1", 'checked'=>set_radio('DateRange', '1', FALSE))); ?>
</td>
</tr>
</div>
<div class="col-md-12">
<div class="col-md-12" id="Deliverydtdiv"><br/>
<label>Delivery Date</label>
<div class="form-group">
<?php
@ -638,6 +663,14 @@ function clearEditTaxField()
?>
</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>
@ -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>
@ -1874,5 +1922,7 @@ $('#txtStatus').val(stat);
});
});
</script>