Skip to content

Commit

Permalink
Fix for usage fee in onetime revenue
Browse files Browse the repository at this point in the history
  • Loading branch information
forsbergplustwo committed Aug 23, 2023
1 parent 758f1ec commit 2fc3914
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/models/payment_history/csv_importer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class PaymentHistory::CsvImporter
"One time application fee",
"Theme purchase fee",
"App sale – one-time",
"App sale – usage",
"Service sale"
],
"affiliate_revenue" => [
Expand Down Expand Up @@ -100,7 +99,6 @@ def import_new_payments
end
# Save any remaining rows
save_and_reset_batch(@batch_of_payments)
true
end

def new_payment(csv_row)
Expand Down Expand Up @@ -131,7 +129,7 @@ def row_too_old?(csv_row)
def calculate_charge_type(csv_row)
charge_type = CSV_REVENUE_TYPES.find { |_key, value| value.include?(csv_row[:charge_type]) }&.first
if charge_type == "usage_revenue"
charge_type = user.count_usage_charges_as_recurring ? "recurring_revenue" : "onetime_revenue"
charge_type = user.count_usage_charges_as_recurring == true ? "recurring_revenue" : "onetime_revenue"
end
charge_type
end
Expand Down

0 comments on commit 2fc3914

Please sign in to comment.