From 474e27d32510d04f651924ca7c75b964032903ff Mon Sep 17 00:00:00 2001 From: Georg Kahest Date: Tue, 8 Oct 2019 11:41:10 +0300 Subject: [PATCH 1/7] Fix condition of buyer_url display in invoice pdf --- app/views/invoice/pdf.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/invoice/pdf.haml b/app/views/invoice/pdf.haml index 19778ec43..88d2c7bab 100644 --- a/app/views/invoice/pdf.haml +++ b/app/views/invoice/pdf.haml @@ -207,7 +207,7 @@ %dt= t(:phone) %dd= @invoice.buyer_phone - - if @invoice.buyer_phone.present? + - if @invoice.buyer_url.present? %dt= t(:url) %dd= @invoice.buyer_url From 0d1e00b64946126d3eaef2874bed2c77999eb800 Mon Sep 17 00:00:00 2001 From: Georg Kahest Date: Tue, 8 Oct 2019 11:43:12 +0300 Subject: [PATCH 2/7] Remove extra whitespace chars from pdf.haml --- app/views/invoice/pdf.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/invoice/pdf.haml b/app/views/invoice/pdf.haml index 88d2c7bab..0e059c58c 100644 --- a/app/views/invoice/pdf.haml +++ b/app/views/invoice/pdf.haml @@ -174,14 +174,14 @@ %dt= t(:payment_term) %dd Prepayment - + %dt= t(:invoice_number) %dd= @invoice.number - if @invoice.description.present? %dt= t(:description) %dd=@invoice.description - + %dt= Invoice.human_attribute_name :reference_no %dd= @invoice.reference_no From d1d484bc0cbc82be34693eff433f179161b6d2ed Mon Sep 17 00:00:00 2001 From: Georg Kahest Date: Thu, 10 Oct 2019 01:21:30 +0300 Subject: [PATCH 3/7] remove checks of displayed variables, as requested in: https://github.com/internetee/registry/pull/1346#discussion_r332424910 --- app/views/invoice/pdf.haml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/invoice/pdf.haml b/app/views/invoice/pdf.haml index 0e059c58c..20159f804 100644 --- a/app/views/invoice/pdf.haml +++ b/app/views/invoice/pdf.haml @@ -195,23 +195,23 @@ %dt= t(:reg_no) %dd= @invoice.buyer_reg_no - - if @invoice.buyer_address.present? + - @invoice.buyer_address.present? %dt= t(:address) %dd= @invoice.buyer_address - - if @invoice.buyer_country.present? + - @invoice.buyer_country.present? %dt= t(:country) %dd= @invoice.buyer_country - - if @invoice.buyer_phone.present? + - @invoice.buyer_phone.present? %dt= t(:phone) %dd= @invoice.buyer_phone - - if @invoice.buyer_url.present? + - @invoice.buyer_url.present? %dt= t(:url) %dd= @invoice.buyer_url - - if @invoice.buyer_email.present? + - @invoice.buyer_email.present? %dt= t(:email) %dd= @invoice.buyer_email From 52dc69d545b24fa4b37458750af64b7d9bf27ed8 Mon Sep 17 00:00:00 2001 From: Georg Kahest Date: Thu, 10 Oct 2019 01:24:05 +0300 Subject: [PATCH 4/7] remove all conditions from view var display --- app/views/invoice/pdf.haml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/views/invoice/pdf.haml b/app/views/invoice/pdf.haml index 20159f804..e04fb3a73 100644 --- a/app/views/invoice/pdf.haml +++ b/app/views/invoice/pdf.haml @@ -195,23 +195,18 @@ %dt= t(:reg_no) %dd= @invoice.buyer_reg_no - - @invoice.buyer_address.present? %dt= t(:address) %dd= @invoice.buyer_address - - @invoice.buyer_country.present? %dt= t(:country) %dd= @invoice.buyer_country - - @invoice.buyer_phone.present? %dt= t(:phone) %dd= @invoice.buyer_phone - - @invoice.buyer_url.present? %dt= t(:url) %dd= @invoice.buyer_url - - @invoice.buyer_email.present? %dt= t(:email) %dd= @invoice.buyer_email From 28e36d724ad86d42db26bc7b762ec70106f69b8f Mon Sep 17 00:00:00 2001 From: Georg Kahest Date: Tue, 29 Oct 2019 14:54:31 +0200 Subject: [PATCH 5/7] fix indention of pdf.haml --- app/views/invoice/pdf.haml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/views/invoice/pdf.haml b/app/views/invoice/pdf.haml index e04fb3a73..3fae850dc 100644 --- a/app/views/invoice/pdf.haml +++ b/app/views/invoice/pdf.haml @@ -195,20 +195,20 @@ %dt= t(:reg_no) %dd= @invoice.buyer_reg_no - %dt= t(:address) - %dd= @invoice.buyer_address + %dt= t(:address) + %dd= @invoice.buyer_address - %dt= t(:country) - %dd= @invoice.buyer_country + %dt= t(:country) + %dd= @invoice.buyer_country - %dt= t(:phone) - %dd= @invoice.buyer_phone + %dt= t(:phone) + %dd= @invoice.buyer_phone - %dt= t(:url) - %dd= @invoice.buyer_url + %dt= t(:url) + %dd= @invoice.buyer_url - %dt= t(:email) - %dd= @invoice.buyer_email + %dt= t(:email) + %dd= @invoice.buyer_email .clear .row.pull-down From 8f06685605b77a64f860daef9bc219740162364c Mon Sep 17 00:00:00 2001 From: Georg Kahest Date: Tue, 18 Aug 2020 16:53:57 +0300 Subject: [PATCH 6/7] resolve https://github.com/internetee/registry/pull/1346#discussion_r341532341 --- app/views/invoice/pdf.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/invoice/pdf.haml b/app/views/invoice/pdf.haml index 3fae850dc..ffcf12106 100644 --- a/app/views/invoice/pdf.haml +++ b/app/views/invoice/pdf.haml @@ -195,7 +195,7 @@ %dt= t(:reg_no) %dd= @invoice.buyer_reg_no - %dt= t(:address) + %dt= Invoice.human_attribute_name :address %dd= @invoice.buyer_address %dt= t(:country) From 2bcabcbff2534a371c2504a565d07eaaeadba60d Mon Sep 17 00:00:00 2001 From: Georg Kahest Date: Tue, 18 Aug 2020 21:34:21 +0300 Subject: [PATCH 7/7] revert removing of conditional displayof variables on invoice --- app/views/invoice/pdf.haml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/views/invoice/pdf.haml b/app/views/invoice/pdf.haml index ffcf12106..9f10acdad 100644 --- a/app/views/invoice/pdf.haml +++ b/app/views/invoice/pdf.haml @@ -194,19 +194,24 @@ %dt= t(:reg_no) %dd= @invoice.buyer_reg_no - + + - if @invoice.buyer_address.present? %dt= Invoice.human_attribute_name :address %dd= @invoice.buyer_address - + + - if @invoice.buyer_country.present? %dt= t(:country) %dd= @invoice.buyer_country - + + - if @invoice.buyer_phone.present? %dt= t(:phone) %dd= @invoice.buyer_phone - + + - if @invoice.buyer_url.present? %dt= t(:url) %dd= @invoice.buyer_url + - if @invoice.buyer_email.present? %dt= t(:email) %dd= @invoice.buyer_email