Merge pull request #2575 from internetee/2569-add-vat-id-to-pdf

Added vat no to invoice buyer
This commit is contained in:
Timo Võhmar 2023-05-18 11:47:28 +03:00 committed by GitHub
commit 339c592215
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 51 additions and 38 deletions

View file

@ -97,6 +97,7 @@ class Registrar < ApplicationRecord # rubocop:disable Metrics/ClassLength
buyer_phone: phone, buyer_phone: phone,
buyer_url: website, buyer_url: website,
buyer_email: billing_email, buyer_email: billing_email,
buyer_vat_no: vat_no,
reference_no: reference_no, reference_no: reference_no,
vat_rate: calculate_vat_rate, vat_rate: calculate_vat_rate,
monthly_invoice: true, monthly_invoice: true,
@ -137,6 +138,7 @@ class Registrar < ApplicationRecord # rubocop:disable Metrics/ClassLength
buyer_phone: phone, buyer_phone: phone,
buyer_url: website, buyer_url: website,
buyer_email: billing_email, buyer_email: billing_email,
buyer_vat_no: vat_no,
reference_no: reference_no, reference_no: reference_no,
vat_rate: calculate_vat_rate, vat_rate: calculate_vat_rate,
items_attributes: [ items_attributes: [

View file

@ -7,6 +7,9 @@
%dt= t(:reg_no) %dt= t(:reg_no)
%dd= @invoice.buyer_reg_no %dd= @invoice.buyer_reg_no
%dt= Registrar.human_attribute_name :vat_no
%dd= @invoice.buyer_vat_no
%dt= t(:address) %dt= t(:address)
%dd= @invoice.buyer_address %dd= @invoice.buyer_address

View file

@ -181,6 +181,10 @@
%dt= t(:reg_no) %dt= t(:reg_no)
%dd= @invoice.buyer_reg_no %dd= @invoice.buyer_reg_no
- if @invoice.buyer_vat_no.present?
%dt= Registrar.human_attribute_name :vat_no
%dd= @invoice.buyer_vat_no
- if @invoice.buyer_address.present? - if @invoice.buyer_address.present?
%dt= Invoice.human_attribute_name :address %dt= Invoice.human_attribute_name :address
%dd= @invoice.buyer_address %dd= @invoice.buyer_address

View file

@ -195,6 +195,10 @@
%dt= t(:reg_no) %dt= t(:reg_no)
%dd= @invoice.buyer_reg_no %dd= @invoice.buyer_reg_no
- if @invoice.buyer_vat_no.present?
%dt= Registrar.human_attribute_name :vat_no
%dd= @invoice.buyer_vat_no
- if @invoice.buyer_address.present? - if @invoice.buyer_address.present?
%dt= Invoice.human_attribute_name :address %dt= Invoice.human_attribute_name :address
%dd= @invoice.buyer_address %dd= @invoice.buyer_address