diff --git a/app/controllers/wkgltransaction_controller.rb b/app/controllers/wkgltransaction_controller.rb index ff4b408a..9f4f5a72 100644 --- a/app/controllers/wkgltransaction_controller.rb +++ b/app/controllers/wkgltransaction_controller.rb @@ -174,10 +174,8 @@ def update end wktxnDetail.ledger_id = params["txn_particular_#{i}"] - #if (params["txn_debit_#{i}"].blank? || params["txn_debit_#{i}"].to_i == 0) && (params["txn_credit_#{i}"].blank? || params["txn_credit_#{i}"].to_i == 0) if (params["txn_debit_#{i}"].blank? || params["txn_debit_#{i}"].to_f == 0) && (params["txn_credit_#{i}"].blank? || params["txn_credit_#{i}"].to_f == 0) next - #elsif params["txn_debit_#{i}"].blank? || params["txn_debit_#{i}"].to_i == 0 elsif params["txn_debit_#{i}"].blank? || params["txn_debit_#{i}"].to_f == 0 wktxnDetail.detail_type = 'c' wktxnDetail.amount = params["txn_credit_#{i}"] @@ -311,8 +309,6 @@ def validateTransaction end for i in 1..params[:txntotalrow].to_i - #txnDebitTotal = txnDebitTotal + params["txn_debit_#{i}"].to_i if !params["txn_debit_#{i}"].blank? - #txnCreditTotal = txnCreditTotal + params["txn_debit_#{i}"].to_i if !params["txn_debit_#{i}"].blank? txnDebitTotal = txnDebitTotal + params["txn_debit_#{i}"].to_f if !params["txn_debit_#{i}"].blank? txnCreditTotal = txnCreditTotal + params["txn_debit_#{i}"].to_f if !params["txn_debit_#{i}"].blank? end @@ -353,8 +349,6 @@ def validateTransaction $temptxnDetail = @tempwktxnDetail $tempTransaction = wkgltransaction end - - ret end def destroy diff --git a/app/helpers/wkgltransaction_helper.rb b/app/helpers/wkgltransaction_helper.rb index 5a4a9273..eaeaeeb5 100644 --- a/app/helpers/wkgltransaction_helper.rb +++ b/app/helpers/wkgltransaction_helper.rb @@ -379,7 +379,6 @@ def getSummeryamount(key, value) @debitTotal += value[:DT].to_f @creditTotal += value[:CT].to_f diff = isSubCr ? (value[:DT].to_f - value[:CT].to_f) : (value[:CT].to_f - value[:DT].to_f) - #if key == @summaryHash.keys.first if key == @summaryHashFirstKey @closeBal = diff + openingBalance.to_f else diff --git a/assets/javascripts/invoice.js b/assets/javascripts/invoice.js index 741c8e95..bf8c9798 100644 --- a/assets/javascripts/invoice.js +++ b/assets/javascripts/invoice.js @@ -507,7 +507,6 @@ function tallyAmount(fldId) var oldrowlength = oldtable.rows.length; if(addclm > 2 && addclm == oldrowlength ) { - alert("invoiceAddRow"); invoiceAddRow('txnTable', 'txntotalrow'); } updateAmount(); diff --git a/db/migrate/20240912130705_update_wk_survey_responses.rb b/db/migrate/20240912130705_update_wk_survey_responses.rb new file mode 100644 index 00000000..ebdc51ce --- /dev/null +++ b/db/migrate/20240912130705_update_wk_survey_responses.rb @@ -0,0 +1,5 @@ +class UpdateWkSurveyResponses < ActiveRecord::Migration[6.1] + def up + change_column :wk_survey_responses, :ip_address, :string, limit: 60 + end +end \ No newline at end of file