internetee/e_invoice

View on GitHub

Showing 28 of 28 total issues

Class has too many lines. [198/100]
Open

class Generator
def initialize
@builder = Builder::XmlMarkup.new
end
 
 
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Assignment Branch Condition size for build_invoice_party_details is too high. [99/15]
Open

def build_invoice_party_details(invoice)
builder.InvoiceParties do
builder.SellerParty do
builder.Name invoice.seller.name
builder.RegNumber invoice.seller.registration_number
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Assignment Branch Condition size for build_invoice_items is too high. [55/15]
Open

def build_invoice_items(items)
items.each do |item|
builder.InvoiceItem do
builder.InvoiceItemGroup do
builder.ItemEntry do
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Assignment Branch Condition size for build_monthly_invoice_items is too high. [47.38/15]
Open

def build_monthly_invoice_items(items)
builder.InvoiceItem do
builder.InvoiceItemGroup do
items.each do |item|
builder.ItemEntry do
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Assignment Branch Condition size for build_invoice_payment_details is too high. [40.11/15]
Open

def build_invoice_payment_details(invoice)
builder.PaymentInfo do
builder.Currency invoice.currency
builder.PaymentRefId invoice.reference_number
builder.PaymentDescription invoice.number
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Method has too many lines. [34/10]
Open

def build_invoice_party_details(invoice)
builder.InvoiceParties do
builder.SellerParty do
builder.Name invoice.seller.name
builder.RegNumber invoice.seller.registration_number
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Assignment Branch Condition size for build_invoice_details is too high. [31.02/15]
Open

def build_invoice_details(invoice)
builder.InvoiceInformation do
builder.Type(type: 'DEB')
builder.DocumentName invoice.name || 'ARVE'
builder.InvoiceNumber invoice.number
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Method has too many lines. [25/10]
Open

def build_invoice_items(items)
items.each do |item|
builder.InvoiceItem do
builder.InvoiceItemGroup do
builder.ItemEntry do
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Assignment Branch Condition size for build_invoice_totals is too high. [28.07/15]
Open

def build_invoice_totals(invoice)
builder.InvoiceSumGroup do
build_invoice_balance(invoice)
builder.InvoiceSum format_decimal(invoice.subtotal, scale: 4)
builder.TotalVATSum format_decimal(invoice.vat_amount)
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Method has too many lines. [23/10]
Open

def build_monthly_invoice_items(items)
builder.InvoiceItem do
builder.InvoiceItemGroup do
items.each do |item|
builder.ItemEntry do
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Method has too many lines. [16/10]
Open

def build_invoice_payment_details(invoice)
builder.PaymentInfo do
builder.Currency invoice.currency
builder.PaymentRefId invoice.reference_number
builder.PaymentDescription invoice.number
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Method has too many lines. [16/10]
Open

def build_invoice_details(invoice)
builder.InvoiceInformation do
builder.Type(type: 'DEB')
builder.DocumentName invoice.name || 'ARVE'
builder.InvoiceNumber invoice.number
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Method has too many lines. [14/10]
Open

def build_invoice(invoice)
builder.Invoice(invoiceId: invoice.id,
regNumber: invoice.recipient_id_code,
sellerRegnumber: invoice.seller.registration_number,
serviceId: invoice.reference_number) do
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Method has too many lines. [12/10]
Open

def build_invoice_totals(invoice)
builder.InvoiceSumGroup do
build_invoice_balance(invoice)
builder.InvoiceSum format_decimal(invoice.subtotal, scale: 4)
builder.TotalVATSum format_decimal(invoice.vat_amount)
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Cyclomatic complexity for build_monthly_invoice_items is too high. [7/6]
Open

def build_monthly_invoice_items(items)
builder.InvoiceItem do
builder.InvoiceItemGroup do
items.each do |item|
builder.ItemEntry do
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Assignment Branch Condition size for build_invoice is too high. [16.03/15]
Open

def build_invoice(invoice)
builder.Invoice(invoiceId: invoice.id,
regNumber: invoice.recipient_id_code,
sellerRegnumber: invoice.seller.registration_number,
serviceId: invoice.reference_number) do
Severity: Minor
Found in lib/e_invoice/generator.rb by rubocop

Method build_monthly_invoice_items has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

def build_monthly_invoice_items(items)
builder.InvoiceItem do
builder.InvoiceItemGroup do
items.each do |item|
builder.ItemEntry do
Severity: Minor
Found in lib/e_invoice/generator.rb - About 1 hr to fix

Method build_invoice_party_details has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def build_invoice_party_details(invoice)
builder.InvoiceParties do
builder.SellerParty do
builder.Name invoice.seller.name
builder.RegNumber invoice.seller.registration_number
Severity: Minor
Found in lib/e_invoice/generator.rb - About 1 hr to fix

    Block has too many lines. [32/25]
    Open

    builder.InvoiceParties do
    builder.SellerParty do
    builder.Name invoice.seller.name
    builder.RegNumber invoice.seller.registration_number
    builder.VATRegNumber invoice.seller.vat_number
    Severity: Minor
    Found in lib/e_invoice/generator.rb by rubocop

    Block has too many lines. [28/25]
    Open

    Gem::Specification.new do |spec|
    spec.name = 'e_invoice'
    spec.version = EInvoice::VERSION
    spec.authors = ['Artur Beljajev', 'Maciej Szlosarczyk', 'Sergei Tsõganov']
    spec.email = ['artur.beljajev@internet.ee', 'maciej.szlosarczyk@internet.ee', 'sergei.tsoganov@internet.ee']
    Severity: Minor
    Found in estonian_e_invoice.gemspec by rubocop
    Severity
    Category
    Status
    Source
    Language