Merge branch 'master' into credit-and-debit-card-payments

This commit is contained in:
Maciej Szlosarczyk 2018-04-18 13:44:03 +03:00
commit eda6772c6f
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
112 changed files with 887 additions and 438 deletions

View file

@ -24,7 +24,7 @@ module Admin
@invoice = Invoice.find_by(id: params[:invoice_id])
@bank_transaction = @bank_statement.bank_transactions.build(
description: @invoice.to_s,
sum: @invoice.sum,
sum: @invoice.total,
reference_no: @invoice.reference_no,
paid_at: Time.zone.now.to_date,
currency: 'EUR'

View file

@ -61,7 +61,6 @@ module Admin
def registrar_params
params.require(:registrar).permit(:name,
:reg_no,
:vat_no,
:street,
:city,
:state,
@ -70,10 +69,12 @@ module Admin
:email,
:phone,
:website,
:billing_email,
:code,
:test_registrar,
:vat_no,
:vat_rate,
:accounting_customer_code,
:billing_email,
:language)
end
end

View file

@ -55,8 +55,8 @@ class Registrar
end
def normalize_search_parameters
params[:q][:sum_cache_gteq].gsub!(',', '.') if params[:q][:sum_cache_gteq]
params[:q][:sum_cache_lteq].gsub!(',', '.') if params[:q][:sum_cache_lteq]
params[:q][:total_gteq].gsub!(',', '.') if params[:q][:total_gteq]
params[:q][:total_lteq].gsub!(',', '.') if params[:q][:total_lteq]
ca_cache = params[:q][:due_date_lteq]
begin