mirror of
https://github.com/internetee/registry.git
synced 2025-08-01 23:42:04 +02:00
Use Estonian reference number format instead of ISO 11649
This commit is contained in:
parent
aa6e8f8a93
commit
5738c17731
25 changed files with 244 additions and 47 deletions
|
@ -9,6 +9,7 @@ FactoryBot.define do
|
|||
seller_street { 'Paldiski mnt. 123' }
|
||||
vat_rate 0.2
|
||||
buyer { FactoryBot.create(:registrar) }
|
||||
sequence(:reference_no) { |n| "1234#{n}" }
|
||||
|
||||
after :build do |invoice|
|
||||
invoice.invoice_items << FactoryBot.create_pair(:invoice_item)
|
||||
|
|
|
@ -11,6 +11,7 @@ FactoryBot.define do
|
|||
country_code 'US'
|
||||
accounting_customer_code 'test'
|
||||
language 'en'
|
||||
sequence(:reference_no) { |n| "1234#{n}" }
|
||||
|
||||
factory :registrar_with_unlimited_balance do
|
||||
after :create do |registrar|
|
||||
|
|
|
@ -36,7 +36,7 @@ describe BankStatement do
|
|||
end
|
||||
|
||||
it 'should not bind transactions with invalid match data' do
|
||||
r = create(:registrar, reference_no: 'RF7086666663')
|
||||
r = create(:registrar, reference_no: '1234')
|
||||
|
||||
create(:account, registrar: r, account_type: 'cash', balance: 0)
|
||||
|
||||
|
@ -50,7 +50,7 @@ describe BankStatement do
|
|||
}),
|
||||
create(:bank_transaction, {
|
||||
sum: 240.0,
|
||||
reference_no: 'RF7086666663',
|
||||
reference_no: '1234',
|
||||
description: 'Invoice no. 4948934'
|
||||
})
|
||||
])
|
||||
|
|
|
@ -35,7 +35,7 @@ describe BankTransaction do
|
|||
end
|
||||
|
||||
it 'should not bind transaction with mismatching sums' do
|
||||
r = create(:registrar, reference_no: 'RF7086666663')
|
||||
r = create(:registrar)
|
||||
invoice = r.issue_prepayment_invoice(200, 'add some money')
|
||||
|
||||
bt = create(:bank_transaction, { sum: 10 })
|
||||
|
@ -45,7 +45,7 @@ describe BankTransaction do
|
|||
end
|
||||
|
||||
it 'should not bind transaction with cancelled invoice' do
|
||||
r = create(:registrar, reference_no: 'RF7086666663')
|
||||
r = create(:registrar)
|
||||
invoice = r.issue_prepayment_invoice(200, 'add some money')
|
||||
invoice.cancel
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue