From 7fc5fd8a10267d3b980cc4a5411303d04612c3aa Mon Sep 17 00:00:00 2001 From: Nurmuhammet Allanov Date: Tue, 12 Nov 2024 23:12:25 +0500 Subject: [PATCH] include wrapper inside --- .../Invoice/Actions/GenerateInvoiceExcell.php | 23 +++++++++++------- .../Invoice/Resources/Docs/invoice.xls | Bin 32256 -> 32256 bytes 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/Modules/Invoice/Actions/GenerateInvoiceExcell.php b/app/Modules/Invoice/Actions/GenerateInvoiceExcell.php index 8ac1860..5d67a7c 100644 --- a/app/Modules/Invoice/Actions/GenerateInvoiceExcell.php +++ b/app/Modules/Invoice/Actions/GenerateInvoiceExcell.php @@ -4,6 +4,7 @@ namespace App\Modules\Invoice\Actions; use App\Modules\Excell\Excell; use App\Modules\Excell\Fonts\FONTS; +use App\Modules\Excell\Types\iRichText\RichTextWrapper; use App\Modules\Invoice\Data\InvoiceExcellData; use App\Modules\Invoice\Data\InvoiceItem; use App\Modules\Makeable; @@ -101,6 +102,16 @@ class GenerateInvoiceExcell $this->worksheet = $this->spreadsheet->getActiveSheet(); } + /** + * Return new RichTextWrapper + */ + public function richText(): RichTextWrapper + { + return Excell::richText() + ->setDefaultFont(FONTS::TIMES_NEW_ROMAN) + ->setDefaultSize(10); + } + /** * Fill the cells */ @@ -290,9 +301,7 @@ class GenerateInvoiceExcell */ public function satyjySalgytBelgi(): RichText { - return Excell::richText() - ->setDefaultFont(FONTS::TIMES_NEW_ROMAN) - ->setDefaultSize(10) + return $this->richText() ->add('Satyjynyň şahsy salgyt belgisi: ') ->add($this->data->seller_ssb, bold: true) ->toRichText(); @@ -303,9 +312,7 @@ class GenerateInvoiceExcell */ public function satyjyBanky(): RichText { - return Excell::richText() - ->setDefaultFont(FONTS::TIMES_NEW_ROMAN) - ->setDefaultSize(10) + return $this->richText() ->add(sprintf('Satyjynyň bankynyň ady %s, hasap № ', $this->data->seller_bank_name)) ->add($this->data->seller_bank_hb_1, bold: true) ->toRichText(); @@ -316,9 +323,7 @@ class GenerateInvoiceExcell */ public function satyjyBankyMaglumatlary(): RichText { - return Excell::richText() - ->setDefaultFont(FONTS::TIMES_NEW_ROMAN) - ->setDefaultSize(10) + return $this->richText() ->add('şäherde (etrapda) ') ->add($this->data->seller_bank_city, bold: true) ->add(' BAB ') diff --git a/app/Modules/Invoice/Resources/Docs/invoice.xls b/app/Modules/Invoice/Resources/Docs/invoice.xls index 793ae7ea30bf33aab3c98458c55128e183954bf8..761530b860b150f362f783a2bbcee414b93fc8f8 100755 GIT binary patch delta 21 dcmZqp!`SeLaYIfG+kzE0g7i!`7uEDJ0swH}37!A| delta 21 ccmZqp!`SeLaYIfG+Xc5}O;N_1i)#890dN8dlmGw#