Compare commits
10 Commits
04ff8df666
...
e2173e625d
| Author | SHA1 | Date | |
|---|---|---|---|
| e2173e625d | |||
| 04d507a7fe | |||
| 61d475ef72 | |||
| f1e9d46d4b | |||
| f6b88a66ff | |||
| 4977418756 | |||
| 11f24f73c7 | |||
| 13a5197b07 | |||
| 20e3211719 | |||
| 6121dce8e8 |
12
README.md
12
README.md
@@ -1 +1,13 @@
|
||||
# F
|
||||
|
||||
# Installation
|
||||
```bash
|
||||
# Clone
|
||||
|
||||
composer install
|
||||
cp .env .env.example
|
||||
|
||||
touch database/database.sqlite
|
||||
|
||||
php artisan migrate --seed
|
||||
```
|
||||
|
||||
@@ -2,86 +2,10 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Modules\Invoice\Actions\GenerateInvoiceExcell;
|
||||
use App\Modules\Invoice\Data\InvoiceExcellData;
|
||||
use App\Modules\Invoice\Data\InvoiceItem;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
public function index(): string
|
||||
{
|
||||
return 'F';
|
||||
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();
|
||||
|
||||
return 'F';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Filament\Models\Contracts\FilamentUser;
|
||||
use Filament\Panel;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
class User extends Authenticatable
|
||||
class User extends Authenticatable implements FilamentUser
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||
use HasFactory, Notifiable;
|
||||
@@ -34,4 +35,12 @@ class User extends Authenticatable
|
||||
'password' => 'hashed',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Panel guard
|
||||
*/
|
||||
public function canAccessPanel(Panel $panel): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,6 @@ class AppHelpersModule implements ModuleContract
|
||||
*/
|
||||
public function hasFilamentResource(): bool
|
||||
{
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Excell\Types\RichText\Traits;
|
||||
namespace App\Modules\Excell\Types\iRichText\Traits;
|
||||
|
||||
trait HasExcellRichTextWrappers {}
|
||||
|
||||
76
app/Modules/Invoice/Examples/InvoiceExcellExample.php
Normal file
76
app/Modules/Invoice/Examples/InvoiceExcellExample.php
Normal 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();
|
||||
@@ -47,8 +47,6 @@ class ModuleRepository
|
||||
|
||||
/**
|
||||
* Set modules
|
||||
*
|
||||
* @param bool|bool $withDisabled
|
||||
*/
|
||||
public function setModules(bool $withDisabled = false): void
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $code
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property Carbon\Carbon $updated_at
|
||||
* @property null|\Carbon\Carbon $created_at
|
||||
* @property null|\Carbon\Carbon $updated_at
|
||||
*/
|
||||
class PaymentPurposeCode extends Model {}
|
||||
|
||||
@@ -5,8 +5,6 @@ namespace App\Providers\Filament;
|
||||
use Filament\Http\Middleware\Authenticate;
|
||||
use Filament\Http\Middleware\DisableBladeIconComponents;
|
||||
use Filament\Http\Middleware\DispatchServingFilamentEvent;
|
||||
use Filament\Navigation\MenuItem;
|
||||
use Filament\Navigation\NavigationGroup;
|
||||
use Filament\Pages;
|
||||
use Filament\Panel;
|
||||
use Filament\PanelProvider;
|
||||
@@ -29,6 +27,7 @@ class AdminPanelProvider extends PanelProvider
|
||||
->id('panel')
|
||||
->path('panel')
|
||||
->login()
|
||||
->registration()
|
||||
->colors([
|
||||
'primary' => Color::Amber,
|
||||
])
|
||||
@@ -60,13 +59,7 @@ class AdminPanelProvider extends PanelProvider
|
||||
])
|
||||
->unsavedChangesAlerts()
|
||||
->databaseTransactions()
|
||||
->brandName('Telekeçi')
|
||||
->userMenuItems([
|
||||
MenuItem::make()
|
||||
->label('Settings')
|
||||
->url(fn (): string => '/')
|
||||
->icon('heroicon-o-cog-6-tooth'),
|
||||
]);
|
||||
->brandName('Telekeçi');
|
||||
|
||||
return $panel;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"filament/filament": "^3.2",
|
||||
"laravel/framework": "^11.9",
|
||||
"laravel/framework": "^12.0",
|
||||
"laravel/tinker": "^2.9",
|
||||
"phpoffice/phpspreadsheet": "^3.3",
|
||||
"phpoffice/phpword": "^1.3",
|
||||
@@ -16,13 +16,13 @@
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-ide-helper": "^3.2",
|
||||
"fakerphp/faker": "^1.23",
|
||||
"larastan/larastan": "^2.0",
|
||||
"larastan/larastan": "^3.0",
|
||||
"laravel/pail": "^1.1",
|
||||
"laravel/pint": "^1.13",
|
||||
"laravel/sail": "^1.26",
|
||||
"mockery/mockery": "^1.6",
|
||||
"nunomaduro/collision": "^8.1",
|
||||
"pestphp/pest": "^3.4",
|
||||
"pestphp/pest": "^3.0",
|
||||
"pestphp/pest-plugin-laravel": "^3.0",
|
||||
"phpstan/phpstan": "*"
|
||||
},
|
||||
|
||||
2365
composer.lock
generated
2365
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -13,8 +13,8 @@ class DatabaseSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$seeders = [];
|
||||
// $seeders = modular()->databaseSeederClasses();
|
||||
// $seeders = [];
|
||||
$seeders = modular()->databaseSeederClasses();
|
||||
|
||||
$this->call($seeders);
|
||||
}
|
||||
|
||||
@@ -11,3 +11,4 @@ parameters:
|
||||
ignoreErrors:
|
||||
- '#Unsafe usage of new static#'
|
||||
- '#Static method Illuminate\\Log\\Logger::info\(\) invoked with 3 parameters, 1-2 required#'
|
||||
- '#PHPDoc type array<int, string> of property App\\Models\\User::\$hidden#'
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
function i({state:a,splitKeys:n}){return{newTag:"",state:a,createTag:function(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag:function(t){this.state=this.state.filter(e=>e!==t)},reorderTags:function(t){let e=this.state.splice(t.oldIndex,1)[0];this.state.splice(t.newIndex,0,e),this.state=[...this.state]},input:{["x-on:blur"]:"createTag()",["x-model"]:"newTag",["x-on:keydown"](t){["Enter",...n].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},["x-on:paste"](){this.$nextTick(()=>{if(n.length===0){this.createTag();return}let t=n.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{i as default};
|
||||
function i({state:a,splitKeys:n}){return{newTag:"",state:a,createTag:function(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag:function(t){this.state=this.state.filter(e=>e!==t)},reorderTags:function(t){let e=this.state.splice(t.oldIndex,1)[0];this.state.splice(t.newIndex,0,e),this.state=[...this.state]},input:{"x-on:blur":"createTag()","x-model":"newTag","x-on:keydown"(t){["Enter",...n].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},"x-on:paste"(){this.$nextTick(()=>{if(n.length===0){this.createTag();return}let t=n.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{i as default};
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,8 +1,22 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
Artisan::command('inspire', function () {
|
||||
$this->comment(Inspiring::quote());
|
||||
})->purpose('Display an inspiring quote')->hourly();
|
||||
|
||||
Artisan::command('create-me', function () {
|
||||
User::create([
|
||||
'first_name' => 'Nurmuhammet',
|
||||
'last_name' => 'Allanov',
|
||||
'name' => 'Nurmuhammet Allanov',
|
||||
'email' => 'nurmuhammet@mail.com',
|
||||
'email_verified_at' => now(),
|
||||
'password' => bcrypt('payload10'),
|
||||
]);
|
||||
|
||||
$this->comment('Done');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user