This commit is contained in:
2025-03-26 18:16:16 +05:00
parent 6121dce8e8
commit 20e3211719
5 changed files with 78 additions and 80 deletions

View File

@@ -43,6 +43,6 @@ class AppHelpersModule implements ModuleContract
*/
public function hasFilamentResource(): bool
{
return true;
return false;
}
}

View File

@@ -0,0 +1,76 @@
<?php
use App\Modules\Invoice\Actions\GenerateInvoiceExcell;
use App\Modules\Invoice\Data\InvoiceExcellData;
use App\Modules\Invoice\Data\InvoiceItem;
use Carbon\Carbon;
GenerateInvoiceExcell::make()
->setTemplateFile(app_path('Modules/Invoice/Resources/Docs/invoice.xls'))
->setData(new InvoiceExcellData(
number: random_int(1, 99),
date: new Carbon('2024-11-08'),
seller_firm_type: 'Telekeçi',
seller_firm_name: 'Nurmuhammet Allanov Parahatowiç',
seller_ssb: '201126532321',
seller_bank_name: 'Türkmenistanyň „Halkbank“ paýdarlar täjirçilik banky',
seller_bank_hb_1: '23206934160169902250000',
seller_bank_hb_2: '21101934110100700005000',
seller_bank_city: 'Aşgabat',
seller_bank_bab: '390101601',
buyer: 'Türkmenistanyň „Türkmenbaşy“ paýdarlar täjirçilik banky',
buyer_address: '744000 Aşgabat ş., Çandebil şaýoly köç., 121,',
buyer_bank: 'Türkmenistanyň Merkezi Banky',
buyer_bank_address: 'Aşgabat ş.',
buyer_bank_data: sprintf('şahsy salgyt belgisi %s, MFO %s, Hasap № %s', '101301000408', '390101304', '21101934110100300007000'),
items: [
new InvoiceItem(
name: 'Programma üpjünçiligini hyzmat etmek barada',
unit: 'ay',
quantity: 2,
unit_price: 100000,
vat: null,
vat_excluded: null,
vat_percentage: null,
vat_tmt: null,
total: 200000,
),
new InvoiceItem(
name: 'Programma üpjünçiligini hyzmat etmek barada',
unit: 'ay',
quantity: 2,
unit_price: 100000,
vat: null,
vat_excluded: null,
vat_percentage: null,
vat_tmt: null,
total: 200000,
),
new InvoiceItem(
name: 'Programma üpjünçiligini hyzmat etmek barada',
unit: 'ay',
quantity: 2,
unit_price: 100000,
vat: null,
vat_excluded: null,
vat_percentage: null,
vat_tmt: null,
total: 200000,
),
new InvoiceItem(
name: 'Programma üpjünçiligini işläp taýýarlamak barada',
unit: 'ay',
quantity: 2,
unit_price: 100000,
vat: null,
vat_excluded: null,
vat_percentage: null,
vat_tmt: null,
total: 200000,
),
]
))
->handle()
->save();

View File

@@ -48,7 +48,7 @@ class ModuleRepository
/**
* Set modules
*
* @param bool|bool $withDisabled
* @param bool $withDisabled
*/
public function setModules(bool $withDisabled = false): void
{