-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add user_primary_id to payment records and cleanup transaction report
- Loading branch information
1 parent
7d21b55
commit c53e46e
Showing
10 changed files
with
118 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
class Reports::TransactionsController < AdminController | ||
def show | ||
@transaction = PaymentTransaction.find(params[:id]) | ||
@logs = TransactionLog.where(transaction_id: @transaction.id).order(:logged_at) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,8 @@ | ||
|
||
<table class="table table-condensed"> | ||
<tr><td class="font-weight-light">Fee ID</td><td><%= fee.fee_id %></td></tr> | ||
<tr><td class="font-weight-light">Fee TYPE</td><td><%= fee.fee_type %></td></tr> | ||
<tr><td class="font-weight-light">Fee STATUS</td><td><%= fee.fee_status %></td></tr> | ||
<tr><td class="font-weight-light">Fee Description</td><td><%= fee.fee_description %></td></tr> | ||
<tr><td class="font-weight-light">Fee User Primary ID</td><td><%= fee.user_primary_id %></td></tr> | ||
<tr><td class="font-weight-light">Fee Remaining VAT Amount</td><td><%= fee.remaining_vat_amount %></td></tr> | ||
<tr><td class="font-weight-light">Fee Original Amount</td><td><%= fee.original_amount %></td></tr> | ||
<tr><td class="font-weight-light">Fee Original Vat Amount</td><td><%= fee.original_vat_amount %></td></tr> | ||
<tr><td class="font-weight-light">Fee Creation Time</td><td><%= fee.creation_time %></td></tr> | ||
<tr><td class="font-weight-light">Fee Status Time</td><td><%= fee.status_time %></td></tr> | ||
<tr><td class="font-weight-light">Fee Owner ID</td><td><%= fee.owner_id %></td></tr> | ||
<tr><td class="font-weight-light">Fee Owner Description</td><td><%= fee.owner_description %></td></tr> | ||
<tr><td class="font-weight-light">Fee Item Title</td><td><%= fee.item_title %></td></tr> | ||
<tr><td class="font-weight-light">Fee Item Barcode</td><td><%= fee.item_barcode %></td></tr> | ||
<tr><td class="font-weight-light">Fee YorkU ID</td><td><%= fee.yorku_id %></td></tr> | ||
<tr><td class="font-weight-light">Fee Created At</td><td><%= fee.created_at %></td></tr> | ||
</table> | ||
<% fee.attribute_names.each do |a| %> | ||
<% if fee[a].to_s.strip.length > 0 %> | ||
<div class="row border-bottom border-bottom-1"> | ||
<div class="col col-5 col-md-3 text-truncate text-muted"><%= a %></div> | ||
<div class="col col-7 col-md-9 text-truncate text-muted"><%= fee[a] %></div> | ||
</div> | ||
<% end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<ul class="list-group list-group-flush"> | ||
<% logs.each do |log| %> | ||
<li class="list-group-item"> | ||
<div class="d-flex w-100 justify-content-between"> | ||
<h6 class="mb-1"><%= log.logged_at.in_time_zone("Eastern Time (US & Canada)").strftime("%A, %b %d %I:%M:%S %p") %></h6> | ||
<small class="text-muted"><%= log.process_name.upcase %></small> | ||
</div> | ||
<p class="mb-1"><%= log.message %></p> | ||
<small class="text-muted">User ID: <%= log.username ? log.username : log.yorku_id %> </small> | ||
<span class="badge badge-primary badge-pill"><%= log.alma_fee_id %></span> | ||
</li> | ||
<% end %> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<table class="table table-condensed"> | ||
<% record.attribute_names.each do |a| %> | ||
<tr> | ||
<td class="font-weight-light"><%= a.humanize %> </td> | ||
<td><%= record[a] %></td> | ||
<tr/> | ||
<% record.attribute_names.each do |a| %> | ||
<% if record[a].to_s.strip.length > 0 %> | ||
<div class="row border-bottom border-bottom-1"> | ||
<div class="col col-5 col-md-3 text-truncate text-muted"><%= a %></div> | ||
<div class="col col-7 col-md-9 text-truncate text-muted"><%= record[a] %></div> | ||
</div> | ||
<% end %> | ||
</table> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<% transaction.attribute_names.each do |a| %> | ||
<% if transaction[a].to_s.strip.length > 0 %> | ||
<div class="row border-bottom border-bottom-1"> | ||
<div class="col col-5 col-md-3 text-truncate text-muted"><%= a %></div> | ||
<div class="col col-7 col-md-9 text-truncate text-muted"><%= transaction[a] %></div> | ||
</div> | ||
<% end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<% user.attribute_names.each do |a| %> | ||
<% if user[a].to_s.strip.length > 0 %> | ||
<div class="row border-bottom border-bottom-1"> | ||
<div class="col col-5 col-md-3 text-truncate text-muted"><%= a %></div> | ||
<div class="col col-7 col-md-9 text-truncate text-muted"><%= user[a] %></div> | ||
</div> | ||
<% end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
db/migrate/20241120101610_add_user_primary_id_to_payment_records.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class AddUserPrimaryIdToPaymentRecords < ActiveRecord::Migration[7.0] | ||
def self.up | ||
add_column :payment_records, :user_primary_id, :string | ||
end | ||
def self.down | ||
# By default, we don't want to make any assumption about how to roll back a migration when your | ||
# model already existed. Please edit below which fields you would like to remove in this migration. | ||
raise ActiveRecord::IrreversibleMigration | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters