'EditRMCIncludingCustomers','value' => set_value('EditRMCIncludingCustomers'),'id'=>'EditRMCIncludingCustomers', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
+ $data = array('name' => 'EditRMCIncludingCustomers','value' => set_value('EditRMCIncludingCustomers'),'id'=>'EditRMCIncludingCustomers', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
echo form_input($data);
?>
@@ -1559,7 +1563,7 @@ body {
'EditTotalExp','value' => set_value('EditTotalExp'),'id'=>'EditTotalExp', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
+ $data = array('name' => 'EditTotalExp','value' => set_value('EditTotalExp'),'id'=>'EditTotalExp', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
echo form_input($data);
?>
@@ -3825,79 +3829,6 @@ $('#Deliverydt').change(function(){
});
-function validate()
-{
-
-
- if($('#PODate').val() == '')
- {
- alert('Please Enter the Purchase Order date');
- $('#PODate').focus();
- return false;
- }
- else if($('#drpSupplier').val() == "0")
- {
- alert('Please Select the Supplier details');
- $('#drpSupplier').focus();
- return false;
- }
- else if($('#DeliveryAddr').val() == '')
- {
- alert('Please Enter the Delivery Address');
- $('#DeliveryAddr').focus();
- return false;
- }
- else if($('#Dispatch').val() == '' && $('#Scheduleby').val() == '')
- {
- alert('Please Enter the Dispatch Instruction');
- $('#Dispatch').focus();
- return false;
- }
- else if($('#currencytype').val() == '0')
- {
- alert('Please Select the Currency Type');
- $('#currencytype').focus();
- return false;
- }
- else if($('#ExchangeRate').val() == '')
- {
- alert('Please Enter the Exchange Rate');
- $('#ExchangeRate').focus();
- return false;
- }
-
- else if($('#PlaceOforigin').val()== '')
- {
- alert('Please Enter Place Of Origin');
- $('#PlaceOforigin').focus();
- return false;
- }
-
- else if($('#PaymentTerms').val()=='')
- {
- alert('Please Select Payment Terms');
- $('#PaymentTerms').focus();
- return false;
-
- }
-
- if(document.getElementById('ImportTax').rows.length <3)
- {
- // alert();
- // die();
- alert('Please Select Line item to Create PO');
- $('#Deliverydt').focus();
- return false;
- }
-
-
-
- else
- {
- return true;
- }
-}
-
@@ -3926,10 +3857,9 @@ var txtDeletedRow = $('#txtDeletedRow').val();
//exit();
if(validate())
{
- if(document.getElementById('ImportTax').rows.length <3)
+ if(document.getElementById('ImportTax').rows.length <= 0)
{
- // alert();
- // die();
+
alert('Please Select Line item to Create PO');
$('#Deliverydt').focus();
return false;
@@ -4000,6 +3930,18 @@ var Detail = ;
} );
+ $("#PaymentTerms").change(function() {
+
+ if ($('#PaymentTerms').val().trim()=='PT08')
+
+ {
+
+ $('#otheroptiondiv').show();
+ }
+ else {
+ $('#otheroptiondiv').hide();
+ }
+ });
-
+
\ No newline at end of file
diff --git a/application/views/purchaseorder.php b/application/views/purchaseorder.php
index 419da21b..c444e0db 100755
--- a/application/views/purchaseorder.php
+++ b/application/views/purchaseorder.php
@@ -182,23 +182,46 @@ $('#drpSupplier').change(function() {
if(id != '0')
{
var y = ;
-
+ var Payment = ;
+ var PaymentID='';
+ $('#PaymentTerms').empty();
$.each(y, function(idx, obj) {
if(obj.SupplierID === id)
{
$("#SupAddress").val(obj.Address);
-
- var b=obj.PaymentID;
- $("#PaymentTerms").val(obj.PaymentID);
-
+ PaymentID = obj.PaymentID;
-
-
}
+ });
+ if(PaymentID!='PT08'){
+ $('#otheroptiondiv').hide();
+ $('#Otherpayment').val('');
+ }
+ $.each(Payment, function(pay, payobj) {
+ if(payobj.PaymentID == PaymentID)
+ {
+
+
+ $("#PaymentTerms").append( $('
').val(payobj.PaymentID).html(payobj.PaymentTerms));
+
+ }
+
+
+ });
+ $.each(Payment, function(pay, payobj) {
+ if(payobj.PaymentID == PaymentID)
+ {
+
+ }
+ else{
+ $("#PaymentTerms").append( $('
').val(payobj.PaymentID).html(payobj.PaymentTerms));
+
+ }
+
});
}
@@ -395,7 +418,7 @@ $("#txtEditBasicValue").val('');
$('#PackagingType').val("0");
$('#Rate').focus();
}
- calculateDiscount(0);
+ change();
});
@@ -428,7 +451,7 @@ $('#EditDiscountType').change(function() {
$('#EditDiscountType').val("0");
$('#EditRate').focus();
}
- calculateDiscount(1);
+ Editchange();
});
$('#PackagingType').change(function() {
@@ -683,6 +706,7 @@ function calculateDiscount(isEdit)
$('#txtAfterDiscount').val("0.00");
}
}
+ // change();
calculateTotalValue();
}
else
@@ -739,6 +763,7 @@ function calculateDiscount(isEdit)
$('#txtEditAfterDiscount').val("0.00");
}
}
+ // Editchange();
calculateEditTotalValue();
}
}
@@ -819,6 +844,7 @@ function calculatePackaging(isEdit)
$('#txtAfterPackaging').val("0.00");
}
}
+
calculateTotalValue();
}
else
@@ -892,6 +918,7 @@ function calculatePackaging(isEdit)
$('#txtEditAfterPackaging').val("0.00");
}
}
+
calculateEditTotalValue();
}
}
@@ -1815,27 +1842,27 @@ return true;
var txtUnitPrice = parseFloat($('#EditRate').val());
var Tot = txtQuantity * txtUnitPrice
$('#txtEditBasicValue').val(parseFloat(Tot).toFixed(2));
-
+ if ($("#EditDiscountType").val()!=0) {
+ calculateDiscount(1);
+ }
if($("#EditCgst").val()!=''){
- $('#EditAfterCgst').val(calculateSgstTax($('#txtEditBasicValue').val(),$('#EditCgst').val()));
+ $('#EditAfterCgst').val(calculateSgstTax($('#txtEditBasicValue').val(),$('#EditCgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val()));
}
if($("#EditSgst").val()!=''){
- $('#EditAfterSgst').val(calculateSgstTax($('#txtEditBasicValue').val(),$('#EditSgst').val()));
+ $('#EditAfterSgst').val(calculateSgstTax($('#txtEditBasicValue').val(),$('#EditSgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val()));
}
if($("#EditIgst").val()!=''){
- $('#EditAfterIgst').val(calculateIgstTax($('#txtEditBasicValue').val(),$('#EditIgst').val()));
+ $('#EditAfterIgst').val(calculateIgstTax($('#txtEditBasicValue').val(),$('#EditIgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val()));
}
- if ($("#DiscountType").val()!=0) {
- calculateDiscount(1);
- }
- if ($("#PackagingType").val()!=0) {
+
+ if ($("#EditPackagingType").val()!=0) {
calculatePackaging(1);
}
- if($("#drpFreight").val()!=0){
+ if($("#drpEditFreight").val()!=0){
calculateFreight(1);
}
@@ -2391,7 +2418,7 @@ function calculateEditTaxValue()
'txtDiscount','value' => set_value('txtDiscount'),'id'=>'txtDiscount', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'calculateDiscount(0);');
+ $data = array('name' => 'txtDiscount','value' => set_value('txtDiscount'),'id'=>'txtDiscount', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'change();calculateDiscount(0);');
echo form_input($data);
?>
@@ -2745,7 +2772,7 @@ function calculateEditTaxValue()
'txtEditDiscount','value' => set_value('txtEditDiscount'),'id'=>'txtEditDiscount', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'calculateDiscount(1);','style'=>'text-align:right;');
+ $data = array('name' => 'txtEditDiscount','value' => set_value('txtEditDiscount'),'id'=>'txtEditDiscount', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'Editchange();calculateDiscount(1);','style'=>'text-align:right;');
echo form_input($data);
?>
@@ -3821,23 +3848,25 @@ function change(){
var txtUnitPrice = parseFloat($('#Rate').val());
var Tot = txtQuantity * txtUnitPrice
$('#txtBasicValue').val(parseFloat(Tot).toFixed(2));
-
+ if ($("#DiscountType").val()!=0) {
+ calculateDiscount(0);
+ }
if($("#Cgst").val()!=''){
- $('#AfterCgst').val(calculateCgstTax($('#txtBasicValue').val(),$('#Cgst').val()));
+
+ $('#AfterCgst').val(calculateCgstTax($('#txtBasicValue').val(),$('#Cgst').val(),$('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val()));
}
+
if($("#Sgst").val()!=''){
- $('#AfterSgst').val(calculateSgstTax($('#txtBasicValue').val(),$('#Sgst').val()));
+ $('#AfterSgst').val(calculateSgstTax($('#txtBasicValue').val(),$('#Sgst').val(),$('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val()));
}
if($("#Igst").val()!=''){
- $('#AfterIgst').val(calculateIgstTax($('#txtBasicValue').val(),$('#Igst').val()));
+ $('#AfterIgst').val(calculateIgstTax($('#txtBasicValue').val(),$('#Igst').val(),$('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val()));
}
- if ($("#DiscountType").val()!=0) {
- calculateDiscount(0);
- }
+
if ($("#PackagingType").val()!=0) {
calculatePackaging(0);
}
@@ -3874,10 +3903,10 @@ function calculateTotalValue()
ExceedQuantityCheck();
}
- function calculateCgstTax(varBasicValue,Cgst)
+ function calculateCgstTax(varBasicValue,Cgst,discount)
{
-
- var basicValue = parseFloat(varBasicValue);
+ var discount = discount;
+ var basicValue = parseFloat(varBasicValue-discount);
var Cgst = parseFloat(Cgst);
var ServiceTaxValue = 0.0;
@@ -3888,10 +3917,10 @@ function calculateTotalValue()
return TAXval;// $('#AfterServiceTax').val(TAXval);
}
- function calculateSgstTax(varBasicValue,Sgst)
+ function calculateSgstTax(varBasicValue,Sgst,discount)
{
-
- var basicValue = parseFloat(varBasicValue);
+ var discount = discount;
+ var basicValue = parseFloat(varBasicValue-discount);
var Sgst = parseFloat(Sgst);
var ServiceTaxValue = 0.0;
@@ -3902,10 +3931,10 @@ function calculateTotalValue()
return TAXval;// $('#AfterServiceTax').val(TAXval);
}
- function calculateIgstTax(varBasicValue,Igst)
+ function calculateIgstTax(varBasicValue,Igst,discount)
{
-
- var basicValue = parseFloat(varBasicValue);
+ var discount = discount;
+ var basicValue = parseFloat(varBasicValue-discount);
var Igst = parseFloat(Igst);
var ServiceTaxValue = 0.0;
diff --git a/application/views/revenuepopdf.php b/application/views/revenuepopdf.php
index 7a1b48c8..fee95f07 100644
--- a/application/views/revenuepopdf.php
+++ b/application/views/revenuepopdf.php
@@ -49,7 +49,12 @@
$ServiceDescription =$PO->ServiceDescription;
+ if($PO->PaymentID!='PT08'){
$PaymentTerms = $PO->PaymentTerms;
+ }
+ else{
+ $PaymentTerms = $PO->PaymentTerms . ' ( '.$PO->PaymentOtherDescription.' ) ';
+ }
}
@@ -145,7 +150,7 @@
?>
|
- 01/08/2017 |
+ |
|
|
|
@@ -159,7 +164,7 @@
-
+
| # |
@@ -188,9 +193,9 @@
?>
|
- 001 |
+ MaterialCode ; ?> |
MaterialName ; ?> |
- 000666 |
+ HSNCODE ; ?>
| UOM ; ?> |
Quantity ; ?> |
@@ -201,7 +206,7 @@
BasicValue;
+ $SubTotalAmount = $SubTotalAmount + $record->BasicValue-$record->AfterDiscount;
$TotalTax = $TotalTax+$record->Taxamount;
$OrderValue = $SubTotalAmount + $TotalTax;
@@ -216,71 +221,12 @@
-
-
+
-
+
HSN Code
|
Discount In INR
|
SGST
|
@@ -289,56 +235,58 @@
Packaging In INR |
Insurance In INR |
Freight In INR |
+Tax Amt In INR
|
Total Amount In INR |
-
-| IN% |
+
+| Type |
Amt |
-IN% |
+Type |
Amt |
-IN% |
+Type |
Amt |
-IN% |
+Type |
Amt |
-IN% |
+Type |
Amt |
-IN% |
+Type |
Amt |
+
-| 000666 |
-5% |
-25 |
-5% |
-25 |
-5% |
-25 |
-5% |
-25 |
-5% |
-25 |
- |
-5% |
-25 |
-150 |
-
-
-| 000666 |
- |
-20 |
- |
-30 |
- |
-50 |
- |
-60 |
- |
-500 |
- |
- |
-5000 |
-10000 |
+HSNCODE ; ?> |
+DiscountType.'-'.$record1->DiscountValue; ?> |
+AfterDiscount, 2, '.', ''); ?> |
+SGST ; ?> |
+AfterSGST, 2, '.', ''); ?> |
+CGST ; ?> |
+AfterCGST, 2, '.', ''); ?> |
+IGST ; ?> |
+AfterIGST, 2, '.', ''); ?> |
+PackagingType.'-'. $record1->PackagingValue ; ?> |
+AfterPackagingValue, 2, '.', ''); ?> |
+Insurance, 2, '.', ''); ?> |
+FreightType=='PER TRIP'){ ?>
+FreightType.'('.$record1->NoOfTrip.')-'. $record1->FreightValue;?> |
+
+FreightType!='PER TRIP'){ ?>
+FreightType.'-'. $record1->FreightValue;?> |
+
+
+AfterFreightValue, 2, '.', ''); ?> |
+Taxamount, 2, '.', ''); ?> |
+BasicValue+$record1->Taxamount-$record1->AfterDiscount), 2, '.', ''); ?> |
+
diff --git a/application/views/servicePurchaseorder.php b/application/views/servicePurchaseorder.php
index a4a06f52..0f32b51a 100755
--- a/application/views/servicePurchaseorder.php
+++ b/application/views/servicePurchaseorder.php
@@ -91,9 +91,11 @@ $('#drpSupplier').change(function() {
if(id != '0')
{
+
var y = ;
-
-
+ var Payment = ;
+ var PaymentID='';
+ $('#PaymentTerms').empty();
$.each(y, function(idx, obj) {
if(obj.SupplierID === id)
{
@@ -102,12 +104,39 @@ $('#drpSupplier').change(function() {
$("#SupAddress").val(obj.Address);
PaymentID = obj.PaymentID;
- $("#PaymentTerms").val(obj.PaymentID);
+
+
}
});
+ if(PaymentID!='PT08'){
+ $('#otheroptiondiv').hide();
+ $('#Otherpayment').val('');
+ }
+ $.each(Payment, function(pay, payobj) {
+ if(payobj.PaymentID == PaymentID)
+ {
+
+
+ $("#PaymentTerms").append( $('').val(payobj.PaymentID).html(payobj.PaymentTerms));
+
+ }
+
+
+ });
+ $.each(Payment, function(pay, payobj) {
+ if(payobj.PaymentID == PaymentID)
+ {
+
+ }
+ else{
+ $("#PaymentTerms").append( $('').val(payobj.PaymentID).html(payobj.PaymentTerms));
+
+ }
+
+ });
}
diff --git a/application/views/servicepopdf.php b/application/views/servicepopdf.php
index 157b59f8..6f762360 100755
--- a/application/views/servicepopdf.php
+++ b/application/views/servicepopdf.php
@@ -297,13 +297,13 @@
IN% |
Amt |
-
+
| HSNCODE ; ?> |
CGST ; ?> |
@@ -315,11 +315,11 @@
Taxamount, 2, '.', ''); ?> |
otherallowance, 2, '.', ''); ?> |
NumberOfService==0 || $record->NumberOfService==''){
- echo number_format($record->BasicValue + $record1->Taxamount + $record1->otherallowance, 2, '.', '');
+ echo number_format($record1->BasicValue + $record1->Taxamount + $record1->otherallowance, 2, '.', '');
}
else{
- echo number_format($record->BasicValue * $record->NumberOfService + $record1->Taxamount + $record1->otherallowance, 2, '.', '');
+ echo number_format($record1->BasicValue * $record1->NumberOfService + $record1->Taxamount + $record1->otherallowance, 2, '.', '');
}
?> |