...
 
Commits (142)
#purchaseorder_product_table_gst tbody tr {
display:table;
width:100%;
table-layout:fixed;
}
#purchaseorder_product_table_gst tbody {
display:block;
width:100%;
height: calc(100vh - 31em);
}
#purchaseorder_product_table_gst_heading thead {
display:table;
width: calc( 100% - 0.75em );
table-layout:fixed;
}
#purchaseorder_product_table_gst_tfoot tfoot {
display:block;
width: calc( 100% - 0.75em );
}
#purchaseorder_product_table_total tbody {
display:block;
height: calc(100vh - 31em);
overflow-y:scroll;
}
#purchaseorder_product_table_total tbody tr {
display:table;
width:100%;
table-layout:fixed;
}
#purchaseorder_product_table_total tfoot {
display:block;
width:calc( 100% - 0.75em );
}
#purchaseorder_product_table_vat tbody {
display:block;
height: calc(100vh - 31em);
overflow-y:scroll;
}
#purchaseorder_product_table_vat tfoot {
display:table;
width: calc( 100% - 0.75em );
}
#salesorder_product_table_gst tbody tr {
display:table;
width:100%;
table-layout:fixed;
}
#salesorder_product_table_gst tbody {
display:block;
width:100%;
height: calc(100vh - 31em);
}
#salesorder_product_table_gst_heading thead {
display:table;
width: calc( 100% - 0.75em );
table-layout:fixed;
}
#salesorder_product_table_gst_tfoot tfoot {
display:block;
width: calc( 100% - 0.75em );
}
#salesorder_product_table_total tbody {
display:block;
height: calc(100vh - 31em);
overflow-y:scroll;
}
#salesorder_product_table_total tbody tr {
display:table;
width:100%;
table-layout:fixed;
}
#salesorder_product_table_total tfoot {
display:block;
width:calc( 100% - 0.75em );
}
#salesorder_product_table_vat tbody {
display:block;
height: calc(100vh - 31em);
overflow-y:scroll;
}
#salesorder_product_table_vat tfoot {
display:table;
width: calc( 100% - 0.75em );
}
.nopadding{
padidng:0 !important;
padding:0 !important;
}
td {
font-size: 65%;
color: black;
}
th {
font-size: 75%;
}
.crosswrap{
width :2.5%;
}
.mdwrap{
width:16%;
}
.qtywrap {
width:9%
}
.smwrap{
width:6%;
}
.taxwrap{
width:12%
}
.taxcell {
width:6%
}
.totalwrap {
width:56%;
}
.mdvwrap{
width:20%;
}
.smvwrap{
width:9%;
}
.ratewrap {
width: 8%;
}
.qtyvwrap {
width: 9%;
}
.unitaddon {
overflow:hidden;
text-overflow:clip;
white-space:nowrap;
max-width:20px;
}
@page {
size : 21cm 29.7cm;
margin : 10mm 10mm 20mm 10mm
}
thead{
display: table-header-group;
}
tfoot{
display: table-footer-group;
}
.rightJustified {
text-align: right;
}
.product_name_gst,.product_name_vat {
max-width: 100% !important;
min-width: 100% !important;
width: 100% !important;
}
#purchaseorder_customer, #togodown {
max-width: 180px !important;
}
.borderdiv {
border-left-style:solid;
border-width: 1px;
}
.rborderdiv {
border-right-style:solid;
border-width: 1px;
}
.hborderdiv {
border-top-style:solid;
padding-top: 10px;
border-width: 1px;
}
label {
font-size:95% !important;
}
.noborder {
border-style: none !important;
}
This diff is collapsed.
......@@ -321,6 +321,7 @@ $("#add_state").keydown(function(event) {
});
// Keydown events for bank details
$("#accountno").numeric();
$("#accountno").keydown(function(event) {
if (event.which==13) {
event.preventDefault();
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -93,5 +93,5 @@ $(document).ready(function() {
$("#cashmemo_record").click();
return false;
return false;
});
......@@ -25,11 +25,28 @@ Contributors:
"Ishan Masdekar " <imasdekar@dff.org.in>
"Navin Karkera" <navin@dff.org.in>
"Dinesh Sutar" <dinesh.sutar@openmailbox.org>
"Prajkta Patkar"<prajkta@riseup.net>
*/
$(document).ready(function()
{
$("#msspinmodal").modal("hide");
$(".closebooks").show();
console.log(sessionStorage);
if (sessionStorage.booksclosedflag == 1 && sessionStorage.roflag ==0){
$(".closebooks").hide();
$(".closebooks").remove();
}
if (sessionStorage.booksclosedflag == 0 && sessionStorage.roflag == 1){
$(".closebooks").show();
$(".rodiv").hide();
}
/*
if (sessionStorage.booksclosedflag==1)
{
$(".closebooks").hide();
......@@ -40,7 +57,7 @@ $(document).ready(function()
{
$(".closebooks").show();
$('.dis').attr('disabled', true);
}
}*/
function pad (str, max) { //to add leading zeros in date
str = str.toString();
......@@ -48,7 +65,7 @@ $(document).ready(function()
return str.length < max ? pad("0" + str, max) : str;
}
else{
return str
return str;
}
}
function yearpad (str, max) {
......@@ -60,7 +77,7 @@ $(document).ready(function()
return str.length < max ? pad("20" + str, max) : str;
}
else{
return str
return str;
}
}
......@@ -87,23 +104,23 @@ $(document).ready(function()
$('.modal-backdrop').remove();
$('.crdate').autotab('number');
var fromdatearray = sessionStorage.yyyymmddyear1.split(/\s*\-\s*/g)
$("#cbfromday").val(fromdatearray[2])
$("#cbfrommonth").val(fromdatearray[1])
$("#cbfromyear").val(fromdatearray[0])
var todatearray = sessionStorage.yyyymmddyear2.split(/\s*\-\s*/g)
$("#cbtoday").val(todatearray[2])
$("#cbtomonth").val(todatearray[1])
$("#cbtoyear").val(todatearray[0])
var fromdatearray = sessionStorage.yyyymmddyear1.split(/\s*\-\s*/g);
$("#cbfromday").val(fromdatearray[2]);
$("#cbfrommonth").val(fromdatearray[1]);
$("#cbfromyear").val(fromdatearray[0]);
var todatearray = sessionStorage.yyyymmddyear2.split(/\s*\-\s*/g);
$("#cbtoday").val(todatearray[2]);
$("#cbtomonth").val(todatearray[1]);
$("#cbtoyear").val(todatearray[0]);
$("#rbfromday").val(fromdatearray[2])
$("#rbfrommonth").val(fromdatearray[1])
$("#rbfromyear").val(fromdatearray[0])
$("#rbfromday").val(fromdatearray[2]);
$("#rbfrommonth").val(fromdatearray[1]);
$("#rbfromyear").val(fromdatearray[0]);
$("#rbtoday").val(todatearray[2])
$("#rbtomonth").val(todatearray[1])
$("#rbtoyear").val(todatearray[0])
$("#rbtoday").val(todatearray[2]);
$("#rbtomonth").val(todatearray[1]);
$("#rbtoyear").val(todatearray[0]);
if(sessionStorage.newfstartday)
......@@ -308,7 +325,7 @@ $("#closebooks").click(function(event)
sessionStorage.newfendmonth = endmonth2;
sessionStorage.newfendyear= endyear2;
event.preventDefault();
$(".closebooks").attr("disabled",true)
//$(".closebooks").attr("disabled",true);
$('.modal-backdrop').remove();
$('.modal').modal('hide');
$('#m_rollb').modal('show').one('click', '#m_remove', function (e)
......
......@@ -25,6 +25,7 @@ Contributors:
"Ishan Masdekar " <imasdekar@dff.org.in>
"Navin Karkera" <navin@dff.org.in>
"Vanita Rajpurohit" <vanita.rajpurohit9819@gmail.com>
"Sanket Kolnoorkar" <sanketf123@gmail.com>
*/
$(document).ready(function()
......@@ -142,14 +143,40 @@ $("#openbal").keydown(function(event){
// Keydown event for Sub-Group Name.
$("#subgroupname").keydown(function(event){
if(event.which==13) {
if ($.trim($("#subgroupname option:selected").val())=="New"){
event.preventDefault();
$("#newsubgroup").focus().select();
}
else {
event.preventDefault();
$("#maccounts").focus().select();
}
}
if (event.which==38 && (document.getElementById('subgroupname').selectedIndex==0)) {
event.preventDefault();
$("#groupname").focus().select();
}
}
});
//key down event for newsubgroup.
$("#newsubgroup").keydown(function(event) {
if (event.which==13) {
event.preventDefault();
if ($.trim($("#newsubgroup").val())=="") {
$("#nsblank-alert").alert();
$("#nsblank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#nsblank-alert").hide();
});
$("#newsubgroup").focus().select();
return false;
}
event.preventDefault();
$("#maccounts").focus().select();
}
if (event.which==38) {
event.preventDefault();
$("#subgroupname").focus().select();
}
});
// Keydown event for Create Multiple Accounts Checkbox.
$("#maccounts").keydown(function(event){
......@@ -158,9 +185,14 @@ $("#openbal").keydown(function(event){
$("#accountname").focus().select();
}
else if (event.which == 38){
event.preventDefault();
$("#subgroupname").focus().select();
}
event.preventDefault();
if ($("#newsubgroup").is(':visible')) {
$("#newsubgroup").focus().select();
}
else {
$("#subgroupname").focus().select();
}
}
});
// Keydown event for Account Name.
//Validations for Account Name.
......@@ -289,14 +321,10 @@ $("#openbal").keydown(function(event){
}
);
e.preventDefault();
}
);
$('#maccounts').change(function() {
if ($.trim($("#groupname option:selected").val())=="") {
$("#grpblank-alert").alert();
......@@ -330,7 +358,6 @@ $('#maccounts').change(function() {
}
$.ajax({
type: "POST",
url: "/showmultiacc",
......@@ -357,18 +384,11 @@ $('#maccounts').change(function() {
$("#multiaccount_modal").html("");
$("#reset").click();
});
})
.fail(function() {
alert("failed");
});
});
});
......@@ -292,6 +292,7 @@ $(document).off("keydown",".gstin").on("keydown",".gstin",function(event)
});
// Keydown events for bank details
$("#cust_accountno").numeric();
$("#cust_accountno").keydown(function(event) {
if (event.which==13) {
event.preventDefault();
......@@ -307,16 +308,16 @@ $(document).off("keydown",".gstin").on("keydown",".gstin",function(event)
if (event.which==13) {
event.preventDefault();
if ($("#cust_accountno").val() != "" && $("#cust_bankname").val() == "" ) {
$("#bankname-blank-alert").alert();
$("#bankname-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#bankname-blank-alert").hide();
$("#bankname-blank-alert-popup").alert();
$("#bankname-blank-alert-popup").fadeTo(2250, 500).slideUp(500, function(){
$("#bankname-blank-alert-popup").hide();
$("#cust_bankname").focus();
});
return false;
} else if ($("#cust_accountno").val() == "" && $("#cust_bankname").val() != "" ) {
$("#accountno-blank-alert").alert();
$("#accountno-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#accountno-blank-alert").hide();
$("#accountno-blank-alert-popup").alert();
$("#accountno-blank-alert-popup").fadeTo(2250, 500).slideUp(500, function(){
$("#accountno-blank-alert-popup").hide();
});
$("#cust_accountno").focus();
return false;
......@@ -341,16 +342,16 @@ $(document).off("keydown",".gstin").on("keydown",".gstin",function(event)
});
return false;
} else if($("#cust_accountno").val() == "" && $("#cust_branchname").val() != ""){
$("#accountno-blank-alert").alert();
$("#accountno-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#accountno-blank-alert").hide();
$("#accountno-blank-alert-popup").alert();
$("#accountno-blank-alert-popup").fadeTo(2250, 500).slideUp(500, function(){
$("#accountno-blank-alert-popup").hide();
$("#cust_accountno").focus();
});
return false;
}else if($("#cust_bankname").val() == "" && $("#cust_branchname").val() != ""){
$("#bankname-blank-alert").alert();
$("#bankname-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#bankname-blank-alert").hide();
$("#bankname-blank-alert-popup").alert();
$("#bankname-blank-alert-popup").fadeTo(2250, 500).slideUp(500, function(){
$("#bankname-blank-alert-popup").hide();
$("#cust_bankname").focus();
});
return false;
......@@ -368,23 +369,23 @@ $(document).off("keydown",".gstin").on("keydown",".gstin",function(event)
if (event.which==13) {
event.preventDefault();
if ($("#cust_accounno").val() != "" && $("#cust_bankname").val() != "" && $("#cust_branchname").val() != "" && $("#cust_ifsc").val() == "") {
$("#ifsc-blank-alert").alert();
$("#ifsc-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#ifsc-blank-alert").hide();
$("#ifsc-blank-alert-popup").alert();
$("#ifsc-blank-alert-popup").fadeTo(2250, 500).slideUp(500, function(){
$("#ifsc-blank-alert-popup").hide();
$("#cust_ifsc").focus();
});
return false;
} else if($("#cust_accountno").val() == "" && $("#cust_ifsc").val() != ""){
$("#accountno-blank-alert").alert();
$("#accountno-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#accountno-blank-alert").hide();
$("#accountno-blank-alert-popup").alert();
$("#accountno-blank-alert-popup").fadeTo(2250, 500).slideUp(500, function(){
$("#accountno-blank-alert-popup").hide();
$("#cust_accountno").focus();
});
return false;
} else if($("#cust_bankname").val() == "" && $("#cust_ifsc").val() != ""){
$("#bankname-blank-alert").alert();
$("#bankname-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#bankname-blank-alert").hide();
$("#bankname-blank-alert-popup").alert();
$("#bankname-blank-alert-popup").fadeTo(2250, 500).slideUp(500, function(){
$("#bankname-blank-alert-popup").hide();
$("#cust_bankname").focus();
});
return false;
......@@ -410,17 +411,17 @@ $(document).off("keydown",".gstin").on("keydown",".gstin",function(event)
$("#cust_bankname").change(function(event) {
event.preventDefault();
if ($("#cust_accountno").val() == "" && $("#cust_bankname").val() != "" ) {
$("#accountno-blank-alert").alert();
$("#accountno-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#accountno-blank-alert").hide();
$("#accountno-blank-alert-popup").alert();
$("#accountno-blank-alert-popup").fadeTo(2250, 500).slideUp(500, function(){
$("#accountno-blank-alert-popup").hide();
$("#cust_accountno").focus();
});
return false;
}
else if ($("#cust_accountno").val() != "" && $("#cust_bankname").val() == "" ) {
$("#bankname-blank-alert").alert();
$("#bankname-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#bankname-blank-alert").hide();
$("#bankname-blank-alert-popup").alert();
$("#bankname-blank-alert-popup").fadeTo(2250, 500).slideUp(500, function(){
$("#bankname-blank-alert-popup").hide();
$("#cust_bankname").focus();
});
return false;
......@@ -441,16 +442,16 @@ $(document).off("keydown",".gstin").on("keydown",".gstin",function(event)
});
return false;
} else if($("#cust_accountno").val() == "" && $("#cust_branchname").val() != ""){ //working
$("#accountno-blank-alert").alert();
$("#accountno-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#accountno-blank-alert").hide();
$("#accountno-blank-alert-popup").alert();
$("#accountno-blank-alert-popup").fadeTo(2250, 500).slideUp(500, function(){
$("#accountno-blank-popup").hide();
$("#cust_accountno").focus();
});
return false;
}else if($("#cust_bankname").val() == "" && $("#cust_branchname").val() != ""){ //working
$("#bankname-blank-alert").alert();
$("#bankname-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#bankname-blank-alert").hide();
$("#bankname-blank-alert-popup").alert();
$("#bankname-blank-alert-popup").fadeTo(2250, 500).slideUp(500, function(){
$("#bankname-blank-alert-popup").hide();
$("#cust_bankname").focus();
});
return false;
......@@ -464,23 +465,23 @@ $(document).off("keydown",".gstin").on("keydown",".gstin",function(event)
$("#cust_ifsc").change(function(event) {
event.preventDefault();
if($("#cust_accounno").val() != "" && $("#cust_bankname").val() != "" && $("#cust_branchname").val() != "" && $("#cust_ifsc").val() == "") {
$("#ifsc-blank-alert").alert();
$("#ifsc-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#ifsc-blank-alert").hide();
$("#ifsc-blank-alert-popup").alert();
$("#ifsc-blank-alert-popup").fadeTo(2250, 500).slideUp(500, function(){
$("#ifsc-blank-alert-popup").hide();
$("#cust_ifsc").focus();
});
return false;
} else if($("#cust_accountno").val() == "" && $("#cust_ifsc").val() != ""){
$("#accountno-blank-alert").alert();
$("#accountno-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#accountno-blank-alert").hide();
$("#accountno-blank-alert-popup").alert();
$("#accountno-blank-alert-popup").fadeTo(2250, 500).slideUp(500, function(){
$("#accountno-blank-alert-popup").hide();
$("#cust_accountno").focus();
});
return false;
} else if($("#cust_bankname").val() == "" && $("#cust_ifsc").val() != ""){
$("#bankname-blank-alert").alert();
$("#bankname-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#bankname-blank-alert").hide();
$("#bankname-blank-alert-popup").alert();
$("#bankname-blank-alert-popup").fadeTo(2250, 500).slideUp(500, function(){
$("#bankname-blank-alert-popup").hide();
$("#cust_bankname").focus();
});
return false;
......@@ -700,7 +701,7 @@ else{
});
$("#cust_accountno").focus();
return false;
}
}
}
var gobj = {}; // Creating a dictionary for storing statecode with gstin.
......
......@@ -177,26 +177,71 @@ $(document).ready(function() {
}
});
$("#tn_from_godown").keydown(function(event) {
if (event.which==13) {
event.preventDefault();
if ($.trim($('#tn_from_godown').val())=="") {
$("#godown-blank-alert").alert();
$("#godown-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#godown-blank-alert").hide();
});
$('#tn_from_godown').focus();
return false;
}
else {
$("#tn_to_godown").focus().select();
}
}
if (event.which==38 && (document.getElementById('tn_from_godown').selectedIndex==1||document.getElementById('tn_from_godown').selectedIndex==0)) {
event.preventDefault();
$("#tn_year").focus().select();
}
});
//Validation for Issuer Name.
$("#name_issuer").keydown(function(event) {
if (event.which==13||event.which==9) {
event.preventDefault();
if ($.trim($('#name_issuer').val())=="") {
$('#name_issuer').focus();
$("#issuer-name-blank-alert").alert();
$("#issuer-name-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#issuer-name-blank-alert").hide();
});
}
else {
$("#designation").focus().select();
return false;
}
}
if (event.which==38) {
event.preventDefault();
$("#transport_mode").focus().select();
}
});
//Validation for Designation.
$("#designation").keydown(function(event) {
if (event.which==13||event.which==9) {
event.preventDefault();
if ($.trim($('#designation').val())=="") {
$("#designation-blank-alert").alert();
$("#designation-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#designation-blank-alert").hide();
$('#designation').focus();
});
}
else {
$("#tn_duedate").focus().select();
return false;
}
}
if (event.which==38) {
event.preventDefault();
$("#name_issuer").focus().select();
}
});
$("#tn_from_godown").keydown(function(event) {
if (event.which==13) {
event.preventDefault();
if ($.trim($('#tn_from_godown').val())=="") {
$("#godown-blank-alert").alert();
$("#godown-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#godown-blank-alert").hide();
});
$('#tn_from_godown').focus();
return false;
}
else {
$("#tn_to_godown").focus().select();
}
}
if (event.which==38 && (document.getElementById('tn_from_godown').selectedIndex==1||document.getElementById('tn_from_godown').selectedIndex==0)) {
event.preventDefault();
$("#tn_year").focus().select();
}
});
$("#tn_to_godown").keydown(function(event) {
if (event.which==13) {
......@@ -215,27 +260,6 @@ $(document).ready(function() {
$("#transport_mode").focus();
}
});
$("#name_issuer").keydown(function(event) {
if (event.which==13) {
event.preventDefault();
$("#designation").focus().select();
}
if (event.which==38) {
event.preventDefault();
$("#transport_mode").focus().select();
}
});
$("#designation").keydown(function(event) {
if (event.which==13) {
event.preventDefault();
$("#tn_duedate").focus().select();
}
if (event.which==38) {
event.preventDefault();
$("#name_issuer").focus().select();
}
});
$("#tn_duedate").keydown(function(event) {
if (event.which==13) {
......@@ -680,6 +704,23 @@ $(document).ready(function() {
$('#tn_year').focus();
return false;
}
if ($.trim($('#name_issuer').val())=="") {
$("#issuer-name-blank-alert").alert();
$("#issuer-name-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#issuer-name-blank-alert").hide();
});
$('#name_issuer').focus();
return false;
}
if ($.trim($('#designation').val())=="") {
$("#designation-blank-alert").alert();
$("#designation-blank-alert").fadeTo(2250, 500).slideUp(500, function(){
$("#designation-blank-alert").hide();
});
$('#designation').focus();
return false;
}
if(!Date.parseExact($("#tn_date").val()+$("#tn_month").val()+$("#tn_year").val(), "ddMMyyyy")){
$("#date-alert").alert();
$("#date-alert").fadeTo(2250, 500).slideUp(500, function(){
......@@ -722,6 +763,7 @@ $(document).ready(function() {
$('#tn_from_godown').focus();
return false;
}
//Validations for product details.
var products = [];
for (var i = 0; i < $("#transfernote_product_table tbody tr").length && stock==0; i++) {
......
......@@ -499,7 +499,8 @@ $(document).ready(function() {
$("#cussup_edit_save").focus();
}
}
});
});
$("#edit_accountno").numeric();
$("#edit_accountno").keydown(function(event) {
if (event.which==13) {
event.preventDefault();
......
......@@ -144,27 +144,15 @@ $(document).ready(function() {
$("#invoice_product_table_vat").hide();
$(".gstinfield").show();
$(".tinfield").hide();
if(resp.delchaldata.delchaldata.consignee){
if (resp.delchaldata.delchaldata.consignee.consigneestate == resp.delchaldata.sourcestate) {
$(".igstfield").hide();
$(".igstfield").css('border','');
$(".sgstfield").show();
}
else {
$(".sgstfield").hide();
$(".sgstfield").css('border','');
$(".igstfield").show();
}
$(".vatfield").hide();
if (resp.delchaldata.custSupDetails.custsupstate == resp.delchaldata.delchaldata.sourcestate) {
$(".igstfield").hide();
$(".igstfield").css('border','');
$(".sgstfield").show();
} else {
if (resp.delchaldata.custSupDetails.custsupstate == resp.delchaldata.delchaldata.sourcestate) {
$(".igstfield").hide();
$(".igstfield").css('border','');
$(".sgstfield").show();
} else {
$(".sgstfield").hide();
$(".sgstfield").css('border','');
$(".igstfield").show();
}
$(".sgstfield").hide();
$(".sgstfield").css('border','');
$(".igstfield").show();
}
}
else if(resp.delchaldata.delchaldata.taxflag == '22'){
......@@ -217,16 +205,18 @@ $(document).ready(function() {
$("#statecodeforinvoice").text(resp.delchaldata.sourcestatecode);
$(".invoice_issuer").show();
$("#delchal_issuer_name").text(resp.delchaldata.delchaldata.issuername);
$("#delchal_issuer_designation").text(resp.delchaldata.delchaldata.designation);
$("#delchal_issuer_designation").text(resp.delchaldata.delchaldata.designation);
$("#deliverychallan_customerstate").text(resp.delchaldata.destinationstate);
$("#statecodeofcustomer").text(resp.delchaldata.taxstatecode);
}
else {
$("#deliverychallan_customerstate").text(resp.delchaldata.sourcestate);
$("#statecodeofcustomer").text(resp.delchaldata.sourcestatecode);
$("#invoicestate").text(resp.delchaldata.destinationstate);
$("#statecodeforinvoice").text(resp.delchaldata.taxstatecode);
}
$('#orggstin').text(resp.delchaldata.delchaldata.orggstin);
$("#deliverychallan_customer").text(resp.delchaldata.custSupDetails.custname);
$("#deliverychallan_customerstate").text(resp.delchaldata.custSupDetails.custsupstate);
$("#statecodeofcustomer").text(resp.delchaldata.custSupDetails.custsupstatecode);
if ((resp.delchaldata.delchaldata.taxflag) == '22') {
$("#tin").text(resp.delchaldata.custSupDetails.custtin);
}else{
......@@ -236,7 +226,10 @@ $(document).ready(function() {
if ((resp.delchaldata.delchaldata.taxflag) == '22') {
$("#taxapplicabletext").text("VAT");
}else{ $("#taxapplicabletext").text("GST"); }
$('#deliverychallan_edit_godown').text(resp.delchaldata.delchaldata.goname +","+resp.delchaldata.delchaldata.goaddr);
//If selected delivery note have godown then display the godown.
if(resp.delchaldata.delchaldata.goname){
$('#deliverychallan_edit_godown').text(resp.delchaldata.delchaldata.goname +","+resp.delchaldata.delchaldata.goaddr);
}
$('#deliverychallan_edit_consignment').text(typeoftrans);
if(resp.delchaldata.delchaldata.consignee) {
$('#delchal_consigneename').text(resp.delchaldata.delchaldata.consignee.consigneename);
......@@ -300,7 +293,6 @@ $(document).ready(function() {
$('.invoice_product_cessrate:eq(' + curindex + ')').text(parseFloat(value.cessrate).toFixed(2));
$('.invoice_product_cessamount:eq(' + curindex + ')').text(parseFloat(value.cess).toFixed(2));
$("#invoice_product_table_total tbody").append('<tr>'+ totaltablehtml + '</tr>');
$('#invoice_product_table_total tbody tr:last td:last').append('<a href="#" class="product_del"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a>');
$('.invoice_product_total_gst:eq(' + curindex + ')').val(parseFloat(value.totalAmount).toFixed(2));
curindex = curindex + 1;
});
......@@ -332,7 +324,6 @@ $(document).ready(function() {
let curindex = 0;
$.each(resp.delchaldata.delchalContents, function(key, value) {
$('#invoice_product_table_vat tbody').append('<tr>' + vathtml + '</tr>');
$('#invoice_product_table_vat tbody tr:last td:last').append('<a href="#" class="product_del"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a>');
$('.product_name_vat:eq(' + curindex + ')').text(value.proddesc).prop("disabled", true);
$('.invoice_product_quantity_vat:eq(' + curindex + ')').text(value.qty).attr("data", value.qty);
$('.invoice_product_freequantity_vat:eq(' + curindex + ')').text(value.freeqty).attr("data", value.freeqty);
......@@ -465,7 +456,7 @@ $(document).ready(function() {
'</div>'+
'</td>'+
'<td class="col-xs-1">'+
'<a href="#" class="product_del deliverychallan_edit_disable"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a>'+
'<a href="#" class="product_del deliverychallan_edit_disable"></a>'+
'</td>'+
'</tr>');
});
......
......@@ -158,15 +158,16 @@ $(document).ready(function() {
$("#goaddress").focus().select();
}
});
$("#gocontact").keydown(function(e){
if (e.which == 13) {
$("#gocontact").numeric();
$("#gocontact").keydown(function(e){
if (e.which == 13) {
e.preventDefault();
$("#egdnsubmit").click();
}
if (e.which == 38) {
}
if (e.which == 38) {
$("#gocontactname").focus().select();
}
});
}
});
$("#editgoddet").keyup(function(e) {
if ($(".editgodownform").is(':visible')) {
......
This diff is collapsed.
......@@ -473,6 +473,7 @@ $(document).off("keydown",".gstinstate").on("keydown",".gstinstate",function(eve
});
//validation for done button of bankdetails field.
$("#accnum").numeric();
$(document).off("click","#bankdel_done").on("click","#bankdel_done",function(event){
if($("#accnum").val()=="" && $("#branch_name").val()=="" && $("#bank_name").val()=="" && $("#ifsc_code").val()=="" )
{
......
......@@ -23,15 +23,32 @@ Copyright (C) 2017, 2018 Digital Freedom Foundation & Accion Labs Pvt. Ltd.
Contributors:
"Krishnakant Mane" <kk@dff.org.in>
"Prajkta Patkar"<prajkta@riseup.net>
"Pravin Dake" <pravindake24@gmail.com>
*/
$(document).ready(function() {
$("#msspinmodal").modal("hide");
$('.modal-backdrop').remove();
$("#cfback").click(function(event) {
$("#gstsummary").click();
});
$('#printgstsummary').hide();
$("#cfback").click(function(event) {
$("#gstsummary").click();
});
// Click event to see Printableversion of GSTSummaryreport.
$('#viewprintversion').click(function(event){
$("#rptt").unbind('dblclick');
$(".fixed-table-toolbar").remove();
$('table a').contents().unwrap();
$("table").removeClass('fixed-table').addClass('table-striped');
$('#printgstsummary').show();
$('#viewprintversion').hide();
});
// Click event to Print of GSTSummaryreport
$('#printgstsummary').click(function(event){
window.print();
});
});
......@@ -56,7 +56,7 @@ var userrole1;
$(".inventory_hide").hide();
$("#showbillwiseaccounting").hide();
$(".invoicemenu").hide();
$(".businessmenu").show();
$(".businessmenu").hide();
}
if(sessionStorage.invflag==0 && sessionStorage.invsflag==1 && sessionStorage.billflag==0) {
......@@ -305,9 +305,13 @@ var userrole1;
}
});
$(".transactionmenu").keydown(function(event){
if(event.which == 39){
$("#business").click();
}
if(event.which == 39){
if (sessionStorage.invsflag ==1){
$("#business").click();
}else{
$("#report").click();
}
}
if(event.which == 37){
if (sessionStorage.invflag ==1)
{
......@@ -334,9 +338,13 @@ $(".businessmenu").keydown(function(event){
if(event.which == 39){
$("#administration").click();
}
if(event.which == 37){
$("#business").click();
}
if(event.which == 37){
if (sessionStorage.invsflag ==1){
$("#business").click();
}else{
$("#transaction").click();
}
}
});
$(".administrationmenu").keydown(function(event){
if(event.which == 39){
......@@ -531,6 +539,8 @@ $(".businessmenu").keydown(function(event){
$("#tallyimport").remove();
$("#showviewlog").remove();
$("#orgpref").remove();
$("#gstsummary").remove();
$("#business").remove();
}
if(resp["gkresult"]["userrole"]==-1 || resp["gkresult"]["userrole"]==0){
$("listofusers").remove();
......@@ -553,17 +563,27 @@ $(".businessmenu").keydown(function(event){
$(".administrationmenu").remove();
$(".intauditor").remove();
$("#fevoucher").text("Find Voucher");
$("#business").remove();
}
if (resp["gkresult"]["booksclosedflag"]==1) {
$(".closebooks").remove();
if (resp["gkresult"]["booksclosedflag"]==1 && resp["gkresult"]["roflag"] ==1) {
$(".closebooks").remove();
$(".rollover").remove();
$("#fevoucher").text("Find Voucher");
$("#findvouchertb").text("Find Voucher - F10");
}
if (resp["gkresult"]["roflag"]==1) {
$(".rollover").remove();
if (resp["gkresult"]["roflag"]==1 && resp["gkresult"]["booksclosedflag"]==0) {
$("#showclosebooks").text("Close Books");
$("#showviewlog").remove();
}
if (resp["gkresult"]["roflag"]==0 && resp["gkresult"]["booksclosedflag"]== 1) {
$("#showclosebooks").text("Roll Over");
$("#showviewlog").remove();
$("#fevoucher").text("Find Voucher");
$("#findvouchertb").text("Find Voucher - F10");
}
if(resp["gkresult"]["userrole"]==-1) {
userrole1="<i>Admin</i>";
} else if(resp["gkresult"]["userrole"]==0) {
......@@ -877,11 +897,7 @@ $(".businessmenu").keydown(function(event){
type: 'POST',
global: false,
async: false,
datatype: 'text/html',
beforeSend: function(xhr)
{
xhr.setRequestHeader('gktoken', sessionStorage.gktoken);
}
datatype: 'text/html'
})
.done(function(resp) {
$("#info").html(resp);
......
/*
Copyright (C) 2013, 2014, 2015, 2016 Digital Freedom Foundation
This file is part of GNUKhata:A modular,robust and Free Accounting System.
GNUKhata is Free Software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation; either version 3 of
the License, or (at your option) any later version.and old.stockflag = 's'
GNUKhata is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public
License along with GNUKhata (COPYING); if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA59 Temple Place, Suite 330,
Contributors:
"Krishnakant Mane" <kk@gmail.com>
"Ishan Masdekar " <imasdekar@dff.org.in>
"Navin Karkera" <navin@dff.org.in>
*/
// This script is for the print page of invoice.
$(document).ready(function() {
oninvoice = 1;
$("title").html("");
window.scrollTo(0,0);
/*$("#subject").focus();// Focus is set to subject field on load.
$("#subject").keydown(function(event) {
if (event.which==13) {
$("#notes").focus().select();
}
});*/
$("#notes").focus().select();
$("#invprint").click(function(event) {
window.print();
});
$("#invback").click(function(event) {
if ($("#latable").length == 0 && $("#invoice_div").length == 0) {
$("#purchaseorder").click();
}
else {
$('#printload').html("");
$("#invload").show();
$("#buttondiv").show();
$('html,body').animate({scrollTop: ($("#orgdata").offset().top)},'slow');
}
});
(function() {
var beforePrint = function() {
// catch beforeprint event just before printing takes place and remove the organisation name from print.
console.log("beforeprint");
if (oninvoice==1) {
$("#printorgnameyear").removeClass('visible-print').addClass('hidden-print');
}
$("#notes").hide();
/*$("#subject").hide();
if ($("#subject").val()!='') {// if subject is not blank then print it in a label.
$("#sublabel").html("Subject : "+$("#subject").val());
} else {
$("#sublabel").html("");
}*/
if ($("#notes").val()!='') {// same as subject
$("#notespara").html("<strong>Notes :</strong> "+$("#notes").val());
} else {
$("#notespara").html("");
}
};
// set everything back like before after printing.
var afterPrint = function() {
console.log("afterPrint");
$("#printorgnameyear").removeClass('hidden-print').addClass('visible-print');
$("#printyears").removeClass('hidden-print');
$("#sublabel").html("Subject :");
$("#notespara").html("Notes : ");
//$("#subject").show();
$("#notes").show();
};
if (window.matchMedia) {
var mediaQueryList = window.matchMedia('print');
mediaQueryList.addListener(function(mql) {
if (mql.matches) {
// fires beforeprint function just before printing
beforePrint();
} else {
// fires afterprint function after printing
afterPrint();
}
});
}
// for compatibility with other browsers.
window.onbeforeprint = beforePrint;
window.onafterprint = afterPrint;
}());
$.ajax({
url: '/editorganisation?action=getattachment',
type: 'POST',
datatype: 'json',
beforeSend: function(xhr) {
xhr.setRequestHeader('gktoken', sessionStorage.gktoken);
},
data: {},
})
.done(function(resp) {
var imagesrc = "data:image/png;base64,"+resp["logo"];
if(resp["logo"]){
$("#imgbox").attr("src", imagesrc);
}
else{
$("#logo_div").hide();
}
console.log("success");
})
.fail(function() {
console.log("error");
})
.always(function() {
console.log("complete");
});
});
......@@ -30,13 +30,11 @@ $(document).ready(function() {
var oninvoice = 0;
$(".fixed-table-loading").remove();
$('.modal-backdrop').remove();
$('#expensetbl tbody tr[data-value!=""], #incometbl tbody tr[data-value!=""]').hide();
$('#expensetbl tbody tr[data-value ="blank"], #incometbl tbody tr[data-value ="blank"]').hide();
$("tbody tr:not('.group')").hide();
$("#msspinmodal").modal("hide");
$("#realprintpnl").hide();
$('#expensetbl tbody tr:first-child td:eq(1) a').focus();
$('#expensetbl tbody tr:first-child td:eq(1) a').closest('tr').addClass('selected');
$("#realprintpnl, #compress").hide();
$('#expensetbl tbody tr:first-child td:first a').focus();
$('#expensetbl tbody tr:first-child td:first a').closest('tr').addClass('selected');
var rcindex = 0;
var pyindex = 0;
......@@ -52,11 +50,6 @@ $(document).ready(function() {
});
var curindex ;
var nextindex;
var previndex;
var directEttlindex = $('#expensetbl tbody tr:visible').eq(2).index();
var directintlindex = $('#incometbl tbody tr:visible').eq(2).index();
var indirectintlindex = $('#incometbl tbody tr:visible').eq(4).index();
var indirectEttlindex = $('#expensetbl tbody tr:visible').eq(5).index();
var date = $("#ledtodate").val().split("-");
var newtodate = date[2]+"-"+date[1]+"-"+date[0];
......@@ -69,20 +62,20 @@ $(document).ready(function() {
if (event.which==40)
{
event.preventDefault();
$('#expensetbl tbody tr:eq('+nextindex+') td:eq(1) a').focus();
$('#expensetbl tbody tr:eq('+nextindex+') td:first a').focus();
}
else if (event.which==38)
{
if(previndex>-1)
{
event.preventDefault();
$('#expensetbl tbody tr:eq('+previndex+') td:eq(1) a').focus();
$('#expensetbl tbody tr:eq('+previndex+') td:first a').focus();
}
}
else if (event.which==39)
{
$('#incometbl tbody tr:eq('+pyindex+') td:eq(1) a').focus();
$('#incometbl tbody tr:eq('+pyindex+') td:first a').focus();
}
});
......@@ -114,14 +107,31 @@ $(document).ready(function() {
// Function to drill down to account ledger of the selected account for expensetbl.
$("#expensetbl").off('dblclick','tr').on('dblclick','tr',function(e){
e.preventDefault();
var acccode = $(this).attr('data-value');
var accname = $.trim($(this).find('td:first').text());
var acccode = "";
let curindex = $(this).index();
if (acccode!="")
{
var todatearray = $("#ledtodate").val().split("-");
if (accname!="" && $(this).hasClass("accountfield"))
{
$.ajax(
{
type: "POST",
url: "/getaccdetails?getAccCode",
global: false,
async: false,
datatype: "text/html",
data: {"accountname":accname},
beforeSend: function(xhr)
{
xhr.setRequestHeader('gktoken',sessionStorage.gktoken );
},
})
.done(function(resp)
{
var todatearray = $("#ledtodate").val().split("-");
var fromdatearray = $("#ledfromdate").val().split("-");
var newtodate = todatearray[2]+"-"+todatearray[1]+"-"+todatearray[0];
var newfromdate = fromdatearray[2]+"-"+fromdatearray[1]+"-"+fromdatearray[0];
var newfromdate = fromdatearray[2]+"-"+fromdatearray[1]+"-"+fromdatearray[0];
acccode = resp["accountcode"];
$.ajax(
{
type: "POST",
......@@ -140,6 +150,8 @@ $(document).ready(function() {
$("#info").html(resp);
}
);
}
);
}
/*
We need to find out if the row contains groups or not.
......@@ -149,11 +161,25 @@ $(document).ready(function() {
The limits are from next row to the row before the total is displayed. Upper limit is not included.
Then we toggle the selected elements.
*/
if ($(this).find("a").hasClass("degroup")) {
$('#expensetbl tbody tr').slice(curindex + 1, directEttlindex -1).toggle();
if ($(this).hasClass("degroup")) {
$('.subgroupofdegroup, .accountofdegroup').toggle();
$('.accountofsubgroupofdegroup').hide();
}
if ($(this).hasClass("subgroupofdegroup")) {
let subgroupindex = $(this).index() + 1;
let numberofaccounts = $(this).data("numberofaccounts") - 1;
let lastaccountindex = subgroupindex + numberofaccounts;
$('#expensetbl tbody tr').slice(subgroupindex, lastaccountindex).toggle();
}
if ($(this).hasClass("iegroup")) {
$('.subgroupofiegroup, .accountofiegroup').toggle();
$('.accountofsubgroupofiegroup').hide();
}
if ($(this).find("a").hasClass("iegroup")) {
$('#expensetbl tbody tr').slice(curindex + 1, indirectEttlindex -1).toggle();
if ($(