Po order list fix
This commit is contained in:
parent
3805d5b80d
commit
6e05f847ab
@ -181,7 +181,22 @@ define('RMC_CAL', 'txtpurchaserate+txtc
|
||||
define('CALCULATE_TOTAL', '(txtrmc*quantity)+basicprice');
|
||||
/* Capital Po Calculations */
|
||||
define('Capital_Landing_Charge', 'basicPrice*(landCharge/100)');
|
||||
define('Capital_Highseas_Charge', '(basicPrice+afterLandingCharge)*(highSeas/100)');
|
||||
define('Capital_Highseas_Charge', '((highSeas/100) * (basicPrice+afterLandingCharge))');
|
||||
define('Capital_Customduty_Charge', '((Customduty/100) * (basicPrice+afterLandingCharge+afterHighseas))');
|
||||
define('Capital_Excise_Charge', '((Excise/100) * (basicPrice+afterLandingCharge+afterHighseas+afterCustomduty))');
|
||||
define('Capital_ExciseEDcess_Charge', '(ExciseEDcessCharge/100) * ExciseDuty');
|
||||
define('Capital_ExciseSHcess_Charge', '(ExciseSHcessCharge/100) * ExciseDuty');
|
||||
define('Capital_CustomEDcess_Charge', '((CustomEDcess/100) * (afterLandingCharge+AfterHighseas+AfterCustomduty+AfterExcisedutyTax+AfterExcisedutyEDcess+AfterExcisedutySHcess))');
|
||||
define('Capital_CustomSHcess_Charge', '((CustomSHcess/100) * (afterLandingCharge+AfterHighseas+AfterCustomduty+AfterExcisedutyTax+AfterExcisedutyEDcess+AfterExcisedutySHcess))');
|
||||
define('Capital_AdditionalExciseduty_Charge', '((AdditionalExciseduty/100) * (basicPrices+afterLandingCharge+AfterHighseas+AfterCustomduty+AfterExcisedutyTax+AfterExcisedutyEDcess+AfterExcisedutySHcess+AfterCustomEDcess+AfterCustomSHcess))');
|
||||
|
||||
define('Capital_Grossdutypayable_Charge', '(AfterAdditionalExciseduty+afterLandingCharge+AfterHighseas+AfterCustomduty+AfterExcisedutyTax+AfterExcisedutyEDcess+AfterExcisedutySHcess+AfterCustomEDcess+AfterCustomSHcess)');
|
||||
define('Capital_ModvatCharge_Charge', '(AfterExcisedutyTax+AfterExcisedutyEDcess+AfterExcisedutySHcess+AfterAdditionalExciseduty)');
|
||||
|
||||
define('Capital_Grossexpenses_Charge', '(Grossdutypayable-AvailableModvat)');
|
||||
define('Capital_purchaserate_Charge', '(AfterBasicPriceTax/PurQuantity)');
|
||||
define('Capital_CustomDutyExpenses_Charge', '(Grossexpenses/PurQuantity)');
|
||||
define('Capital_RMCIncludingCustomers_Charge', '(purchaserate+CustomDutyExpenses)');
|
||||
|
||||
|
||||
|
||||
|
||||
@ -531,7 +531,7 @@ class purchaseorder extends BaseController
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$DeliveryAddr = $this->input->post('DeliveryAddr');
|
||||
$dt = $this->input->post('Deliverydt');
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
//$Deliverydt = $this->getDateformat($dt);
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
if($DeliveryOption==1){
|
||||
$Deliverydt = '';
|
||||
@ -657,7 +657,16 @@ $DeliveryOption = $this->input->post('DateRange');
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
|
||||
$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');
|
||||
$PoRange = $this->input->post('txtPoRange');
|
||||
|
||||
@ -674,7 +683,7 @@ $DeliveryOption = $this->input->post('DateRange');
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
// PO Master
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt );
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt );
|
||||
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||
|
||||
@ -1073,6 +1082,9 @@ public function importpoprint($PONO)
|
||||
{
|
||||
|
||||
$PONO =$this->input->post('txtPONO');
|
||||
$POdt = '';
|
||||
$createddt='';
|
||||
|
||||
$PODate = $this->getDateformat($POdt);
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$DeliveryAddr = $this->input->post('DeliveryAddr');
|
||||
|
||||
@ -70,7 +70,7 @@ class servicepurchaseorder extends BaseController
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$DeliveryAddr = $this->input->post('DeliveryAddr');
|
||||
$dt = $this->input->post('Deliverydt');
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
//$Deliverydt = $this->getDateformat($dt);
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
if($DeliveryOption==1){
|
||||
$Deliverydt = '';
|
||||
@ -178,7 +178,15 @@ class servicepurchaseorder extends BaseController
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
|
||||
$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');
|
||||
|
||||
@ -196,7 +204,7 @@ class servicepurchaseorder extends BaseController
|
||||
|
||||
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt );
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt );
|
||||
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||
|
||||
|
||||
0
application/logs/log-2017-06-21.php
Normal file → Executable file
0
application/logs/log-2017-06-21.php
Normal file → Executable file
5
application/logs/log-2017-06-22.php
Normal file
5
application/logs/log-2017-06-22.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
|
||||
|
||||
ERROR - 2017-06-22 08:00:58 --> Severity: Warning --> mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given /opt/lampp/htdocs/Git_Server/siddharth_application/system/database/drivers/mysqli/mysqli_result.php 38
|
||||
ERROR - 2017-06-22 08:01:33 --> Severity: Warning --> mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given /opt/lampp/htdocs/Git_Server/siddharth_application/system/database/drivers/mysqli/mysqli_result.php 38
|
||||
ERROR - 2017-06-22 08:01:52 --> Severity: Notice --> Undefined property: stdClass::$AvlBudAmt /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/editimportpo.php 1474
|
||||
0
application/models/inwardgateregister_model.php
Normal file → Executable file
0
application/models/inwardgateregister_model.php
Normal file → Executable file
@ -119,8 +119,45 @@ $("#txtBasicValue").val('');
|
||||
|
||||
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
||||
var AvlBudAmt = '<?php echo $AvlAmount ?>';
|
||||
|
||||
// For Binding DepartmentName
|
||||
//ServiceTable
|
||||
var rows = document.getElementById('ServiceTable').rows.length;
|
||||
|
||||
if(DeletedMaterialCode!=undefined && DeletedMaterialCode!=''){
|
||||
|
||||
$("#MaterialCode").append( $('<option></option>').val(DeletedMaterialCode).html(DeletedMaterialCode + "-" + DeletedMaterialName));
|
||||
|
||||
}
|
||||
|
||||
for(i=2;i<=rows;i++){
|
||||
|
||||
//var j=1;
|
||||
$.each(Material[i], function(idx, obj) {
|
||||
|
||||
// j=j+1;
|
||||
var materialCode = $('#materialCode'+i);
|
||||
|
||||
|
||||
|
||||
|
||||
if(obj.materialCode == materialCode )
|
||||
{
|
||||
$("#MaterialCode").val('');
|
||||
}
|
||||
|
||||
|
||||
|
||||
else{
|
||||
$("#MaterialCode").append( $('<option></option>').val(obj.MaterialCode).html(obj.MaterialCode + "-" + obj.MaterialName));
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
} // For Binding DepartmentName
|
||||
$.each(y, function(idx, obj) {
|
||||
if(obj.ReqNo === id)
|
||||
{
|
||||
@ -159,6 +196,7 @@ $("#txtBasicValue").val('');
|
||||
|
||||
if(isAdded == "0")
|
||||
{
|
||||
|
||||
|
||||
$("#MaterialCode").append( $('<option></option>').val(obj.MaterialCode).html(obj.MaterialCode + "-" + obj.MaterialName));
|
||||
}
|
||||
@ -187,16 +225,21 @@ $('#MaterialCode').change(function() {
|
||||
{
|
||||
var y = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
||||
|
||||
|
||||
$.each(y, function(idx, obj) {
|
||||
if(obj.MaterialCode === id)
|
||||
for(i=0;i<y.length;i++)
|
||||
{
|
||||
$.each(y[i], function(idx, obj) {
|
||||
|
||||
if(obj.MaterialCode == id)
|
||||
{
|
||||
|
||||
|
||||
$("#ItemName").val(obj.MaterialName);
|
||||
$("#UOM").val(obj.UOM);
|
||||
$("#Quantity").val(obj.Quantity);
|
||||
RequistQuantity = obj.Quantity;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1200,6 +1243,8 @@ $(document).ready(function () {
|
||||
$TotalKrishiKalyantax = $TotalKrishiKalyantax + $record->KrishiKalyantax;
|
||||
$TotalSwachhBharattax = $TotalSwachhBharattax + $record->SwachhBharattax;
|
||||
$TotalSummary = $TotalSummary + $record->TotalValue;
|
||||
|
||||
|
||||
$TotalBasicAmount = $TotalBasicAmount + $record->BasicValue;
|
||||
|
||||
}
|
||||
@ -1326,7 +1371,11 @@ $(document).ready(function () {
|
||||
<script>
|
||||
var index = $('#txtRowCount').val();;
|
||||
var userid = '';
|
||||
|
||||
var SelectedMaterialCode = [];
|
||||
var CollIndex = 0;
|
||||
var SelectedMaterialList = {
|
||||
Mat: []
|
||||
};
|
||||
|
||||
$("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
||||
userid = $(e.relatedTarget).data('userid');
|
||||
@ -1465,7 +1514,7 @@ $('.AddService').click(function(){
|
||||
|
||||
$('#ServiceAppend').append(_.template(template,{index:temp,ReqNo:Reqnumber,MaterialName:materialName,Quantity:quantity,UOM:uom,Rate:itemRate,BasicAmount:basicval,Taxvalue:TotalTaxValue,TotalValue:TotalOrderValue}));
|
||||
|
||||
clearServiceModalFields();
|
||||
|
||||
|
||||
var theForm = $(".ServicePO");
|
||||
|
||||
@ -1488,7 +1537,7 @@ $('.AddService').click(function(){
|
||||
addHidden(theForm,"TotalOrderValue"+temp,TotalOrderValue);
|
||||
|
||||
$('#txtRowCount').val(temp);
|
||||
|
||||
clearServiceModalFields();
|
||||
}
|
||||
|
||||
});
|
||||
@ -1585,6 +1634,8 @@ function populateValueMainFormForServiceTax()
|
||||
var TotalOrderValueSummary = $('#txtTotalOrderValueSummary').val() == '' ? '0.00' : $('#txtTotalOrderValueSummary').val();
|
||||
|
||||
var totBasicAmt = $('#txtTotBasicAmount').val() == '' ? '0.00' : $('#txtTotBasicAmount').val();
|
||||
totBasicAmt = Number(totBasicAmt.replace(/[^0-9\.]+/g,""));
|
||||
|
||||
var TotalServiceTax = $('#txtTotalServiceTax').val() == '' ? '0.00' : $('#txtTotalServiceTax').val();
|
||||
var TotHigherEdu = $('#txtTotHigherEdu').val() == '' ? '0.00' : $('#txtTotHigherEdu').val();
|
||||
var TotalEducess = $('#txtTotalEducess').val() == '' ? '0.00' : $('#txtTotalEducess').val();
|
||||
@ -1690,7 +1741,8 @@ function clearServiceModalFields()
|
||||
$("#AfterSwachhTax").val('');
|
||||
$("#TotalOrderValue ").val('');
|
||||
}
|
||||
|
||||
var DeletedMaterialCode='';
|
||||
var DeletedMaterialName='';
|
||||
function DeleteRow(rowid)
|
||||
{
|
||||
var id = [];
|
||||
@ -1713,7 +1765,28 @@ function DeleteRow(rowid)
|
||||
|
||||
tr.parentNode.removeChild(tr);
|
||||
|
||||
var removeItem = $('#materialCode'+rowid).val();
|
||||
var removeItem = $('#materialCode'+rowid).val();
|
||||
|
||||
var materialCode = $('#materialCode'+rowid).val();
|
||||
|
||||
|
||||
var removeItem = $('#materialCode'+rowid).val();
|
||||
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
||||
for(i=0;i<Material.length;i++)
|
||||
{
|
||||
$.each(Material[i], function (index, value) {
|
||||
|
||||
|
||||
if (value.MaterialCode==materialCode) {
|
||||
|
||||
|
||||
// $("#MaterialCode").append( $('<option></option>').val(value.MaterialCode).html(value.MaterialCode + "-" + value.MaterialName) );
|
||||
DeletedMaterialCode = $('#materialCode'+rowid).val();
|
||||
DeletedMaterialName = $('#materialName'+rowid).val();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
SelectedMaterialCode.splice( SelectedMaterialCode.indexOf('removeItem'), 1 );
|
||||
var x = <?php echo json_encode($POItem, JSON_PRETTY_PRINT) ?>;
|
||||
@ -1786,16 +1859,16 @@ function populateValueMainFormForDeleteItem(rowid)
|
||||
{
|
||||
|
||||
|
||||
// alert(rows);
|
||||
var TotServiceTax = $('#txtTotalServiceTax'+rowid).val();
|
||||
var TotEduCess = $('#txtTotalEducess'+rowid).val();
|
||||
var TotSecHighTax = $('#txtTotHigherEdu'+rowid).val();
|
||||
var TotKrishiTax = $('#txtTotalKrishiKalyan'+rowid).val();
|
||||
var TotSwachhTax = $('#txtTotSwachhBharat'+rowid).val();
|
||||
var TotSummary = $('#TotalOrderValue'+rowid).val();
|
||||
var TotBasicAmout = $('#txtTotalOrderValueSummary'+rowid).val();
|
||||
//alert(rowid);
|
||||
var TotServiceTax = $('#txtTotalServiceTax').val();
|
||||
var TotEduCess = $('#txtTotalEducess').val();
|
||||
var TotSecHighTax = $('#txtTotHigherEdu').val();
|
||||
var TotKrishiTax = $('#txtTotalKrishiKalyan').val();
|
||||
var TotSwachhTax = $('#txtTotSwachhBharat').val();
|
||||
var TotSummary = $('#TotalOrderValue').val();
|
||||
var TotBasicAmout = $('#txtTotBasicAmount').val();
|
||||
|
||||
|
||||
|
||||
|
||||
var AfterServiceTax = $('#ServiceTax'+rowid).val() == '' ? '0.00' : $('#ServiceTax'+rowid).val();
|
||||
var AfterEduCess = $('#EduCess'+rowid).val() == '' ? '0.00' : $('#EduCess'+rowid).val();
|
||||
@ -1807,14 +1880,16 @@ function populateValueMainFormForDeleteItem(rowid)
|
||||
var Quantity = $('#quantity'+rowid).val() == '' ? '0.00' : $('#quantity'+rowid).val();
|
||||
var ItemRate = $('#itemRate'+rowid).val() == '' ? '0.00' : $('#itemRate'+rowid).val();
|
||||
var BasicVal = parseFloat(Quantity) * parseFloat(ItemRate);
|
||||
// alert(BasicVal);
|
||||
//alert(TotalVal);
|
||||
|
||||
|
||||
TotServiceTax = parseFloat(TotServiceTax) - parseFloat(AfterServiceTax);
|
||||
TotEduCess = parseFloat(TotEduCess) - parseFloat(AfterEduCess);
|
||||
TotSecHighTax = parseFloat(TotSecHighTax) - parseFloat(AfterSecHighTax);
|
||||
TotKrishiTax = parseFloat(TotKrishiTax) - parseFloat(AfterKrishiTax);
|
||||
TotSwachhTax = parseFloat(TotSwachhTax) - parseFloat(AfterSwachhTax);
|
||||
TotSummary = parseFloat(TotSummary) - parseFloat(TotalVal);
|
||||
TotSummary = parseFloat(TotBasicAmout) - parseFloat(TotalVal);
|
||||
TotBasicAmout = parseFloat(TotBasicAmout) - parseFloat(BasicVal);
|
||||
|
||||
|
||||
@ -1983,7 +2058,20 @@ $('#txtDeliveryAddress').val(deladd);
|
||||
|
||||
}
|
||||
}
|
||||
// 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>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -3825,6 +3825,20 @@ $('#txtDeliveryAddress').val(deladd);
|
||||
|
||||
}
|
||||
}
|
||||
// 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 for table , It works uned the datatable plugin-->
|
||||
$(function () {
|
||||
//$("#revenueTax").DataTable();
|
||||
|
||||
0
application/views/viewinwardgateregister.php
Normal file → Executable file
0
application/views/viewinwardgateregister.php
Normal file → Executable file
Loading…
Reference in New Issue
Block a user