From 725afa9f657269fe39532500320b87cdd5418115 Mon Sep 17 00:00:00 2001 From: harshjagad20 Date: Thu, 9 Dec 2021 18:06:25 +0530 Subject: [PATCH] fix pdf issue & payment update issue --- app/Models/Payment.php | 2 +- resources/views/app/pdf/estimate/estimate1.blade.php | 1 + resources/views/app/pdf/estimate/estimate2.blade.php | 1 + resources/views/app/pdf/estimate/estimate3.blade.php | 1 + resources/views/app/pdf/invoice/invoice1.blade.php | 1 + resources/views/app/pdf/invoice/invoice2.blade.php | 1 + resources/views/app/pdf/invoice/invoice3.blade.php | 1 + resources/views/app/pdf/payment/payment.blade.php | 1 + 8 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Models/Payment.php b/app/Models/Payment.php index 559c8eb5..c4929462 100644 --- a/app/Models/Payment.php +++ b/app/Models/Payment.php @@ -195,7 +195,7 @@ class Payment extends Model implements HasMedia $invoice->addInvoicePayment($this->amount); } - if ($this->invoice_id === $request->invoice_id && $request->amount !== $this->amount) { + if ($this->invoice_id && $this->invoice_id === $request->invoice_id && $request->amount !== $this->amount) { $invoice = Invoice::find($this->invoice_id); $invoice->addInvoicePayment($this->amount); $invoice->subtractInvoicePayment($request->amount); diff --git a/resources/views/app/pdf/estimate/estimate1.blade.php b/resources/views/app/pdf/estimate/estimate1.blade.php index 5e7f7206..1751c945 100644 --- a/resources/views/app/pdf/estimate/estimate1.blade.php +++ b/resources/views/app/pdf/estimate/estimate1.blade.php @@ -321,6 +321,7 @@ letter-spacing: 0.05em; color: #040405; width: 108px; + white-space: nowrap; height: 19.87px; padding-bottom: 10px; } diff --git a/resources/views/app/pdf/estimate/estimate2.blade.php b/resources/views/app/pdf/estimate/estimate2.blade.php index 2cc1f48b..63ce19bb 100644 --- a/resources/views/app/pdf/estimate/estimate2.blade.php +++ b/resources/views/app/pdf/estimate/estimate2.blade.php @@ -331,6 +331,7 @@ letter-spacing: 0.05em; color: #040405; width: 108px; + white-space: nowrap; height: 19.87px; padding-bottom: 10px; } diff --git a/resources/views/app/pdf/estimate/estimate3.blade.php b/resources/views/app/pdf/estimate/estimate3.blade.php index a3805f33..edc65c5c 100644 --- a/resources/views/app/pdf/estimate/estimate3.blade.php +++ b/resources/views/app/pdf/estimate/estimate3.blade.php @@ -281,6 +281,7 @@ letter-spacing: 0.05em; color: #040405; width: 108px; + white-space: nowrap; height: 19.87px; padding-bottom: 10px; } diff --git a/resources/views/app/pdf/invoice/invoice1.blade.php b/resources/views/app/pdf/invoice/invoice1.blade.php index 7b2e6e44..858a7971 100644 --- a/resources/views/app/pdf/invoice/invoice1.blade.php +++ b/resources/views/app/pdf/invoice/invoice1.blade.php @@ -271,6 +271,7 @@ letter-spacing: 0.05em; color: #040405; width: 108px; + white-space: nowrap; height: 19.87px; padding-bottom: 10px; } diff --git a/resources/views/app/pdf/invoice/invoice2.blade.php b/resources/views/app/pdf/invoice/invoice2.blade.php index 28551f01..1046e3b1 100644 --- a/resources/views/app/pdf/invoice/invoice2.blade.php +++ b/resources/views/app/pdf/invoice/invoice2.blade.php @@ -313,6 +313,7 @@ letter-spacing: 0.05em; color: #040405; width: 108px; + white-space: nowrap; height: 19.87px; padding-bottom: 10px; } diff --git a/resources/views/app/pdf/invoice/invoice3.blade.php b/resources/views/app/pdf/invoice/invoice3.blade.php index 39c1de02..c13d04aa 100644 --- a/resources/views/app/pdf/invoice/invoice3.blade.php +++ b/resources/views/app/pdf/invoice/invoice3.blade.php @@ -242,6 +242,7 @@ letter-spacing: 0.05em; color: #040405; width: 108px; + white-space: nowrap; height: 19.87px; padding-bottom: 10px; } diff --git a/resources/views/app/pdf/payment/payment.blade.php b/resources/views/app/pdf/payment/payment.blade.php index 84138cb0..cc527ee9 100644 --- a/resources/views/app/pdf/payment/payment.blade.php +++ b/resources/views/app/pdf/payment/payment.blade.php @@ -218,6 +218,7 @@ letter-spacing: 0.05em; color: #040405; width: 108px; + white-space: nowrap; height: 19.87px; padding-bottom: 10px; }