Skip to content

Commit

Permalink
accounting fix and db migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
shanmugga committed Sep 12, 2024
1 parent ce3ffc2 commit 6fe7526
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
6 changes: 0 additions & 6 deletions app/controllers/wkgltransaction_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}"]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -353,8 +349,6 @@ def validateTransaction
$temptxnDetail = @tempwktxnDetail
$tempTransaction = wkgltransaction
end

ret
end

def destroy
Expand Down
1 change: 0 additions & 1 deletion app/helpers/wkgltransaction_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion assets/javascripts/invoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,6 @@ function tallyAmount(fldId)
var oldrowlength = oldtable.rows.length;
if(addclm > 2 && addclm == oldrowlength )
{
alert("invoiceAddRow");
invoiceAddRow('txnTable', 'txntotalrow');
}
updateAmount();
Expand Down
5 changes: 5 additions & 0 deletions db/migrate/20240912130705_update_wk_survey_responses.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class UpdateWkSurveyResponses < ActiveRecord::Migration[6.1]
def up
change_column :wk_survey_responses, :ip_address, :string, limit: 60
end
end

0 comments on commit 6fe7526

Please sign in to comment.