Merge branch 'master' of https://github.com/brkcvn/akaunting into form-elements

This commit is contained in:
Burak Civan 2022-06-20 10:00:43 +03:00
commit 2c4618a5a2
17 changed files with 205 additions and 72 deletions

View File

@ -21,8 +21,11 @@ class User extends JsonResource
'name' => $this->name, 'name' => $this->name,
'email' => $this->email, 'email' => $this->email,
'locale' => $this->locale, 'locale' => $this->locale,
'landing_page' => $this->landing_page,
'enabled' => $this->enabled,
'created_from' => $this->created_from, 'created_from' => $this->created_from,
'created_by' => $this->created_by, 'created_by' => $this->created_by,
'last_logged_in_at' => $this->last_logged_in_at ? $this->last_logged_in_at->toIso8601String() : '',
'created_at' => $this->created_at ? $this->created_at->toIso8601String() : '', 'created_at' => $this->created_at ? $this->created_at->toIso8601String() : '',
'updated_at' => $this->updated_at ? $this->updated_at->toIso8601String() : '', 'updated_at' => $this->updated_at ? $this->updated_at->toIso8601String() : '',
'companies' => [static::$wrap => Company::collection($this->companies)], 'companies' => [static::$wrap => Company::collection($this->companies)],

View File

@ -32,6 +32,7 @@ class ShowInNotifications
foreach ($updates as $key => $update) { foreach ($updates as $key => $update) {
$prefix = ($key == 'core') ? 'core' : 'module'; $prefix = ($key == 'core') ? 'core' : 'module';
$name = ($prefix == 'core') ? 'Akaunting' : module($key)->getName();
$new = new DatabaseNotification(); $new = new DatabaseNotification();
$new->id = $key; $new->id = $key;
@ -39,8 +40,8 @@ class ShowInNotifications
$new->notifiable_type = "users"; $new->notifiable_type = "users";
$new->notifiable_id = user()->id; $new->notifiable_id = user()->id;
$new->data = [ $new->data = [
'title' => $key . ' (v' . $update . ')', 'title' => $name . ' (v' . $update . ')',
'description' => '<a href="' . route('updates.index') . '">' . trans('install.update.' . $prefix) . '</a>', 'description' => '<a href="' . route('updates.index') . '">' . trans('install.update.' . $prefix, ['module' => $name]) . '</a>',
]; ];
$new->created_at = \Carbon\Carbon::now(); $new->created_at = \Carbon\Carbon::now();

View File

@ -53,6 +53,22 @@ class Widget extends Model
return $this->hasManyThrough('App\Models\Auth\User', 'App\Models\Common\Dashboard'); return $this->hasManyThrough('App\Models\Auth\User', 'App\Models\Common\Dashboard');
} }
/**
* Get the alias based on class.
*
* @return string
*/
public function getAliasAttribute()
{
if (Str::startsWith($this->class, 'App\\')) {
return 'core';
}
$arr = explode('\\', $this->class);
return Str::kebab($arr[1]);
}
/** /**
* Create a new factory instance for the model. * Create a new factory instance for the model.
* *

View File

@ -439,6 +439,10 @@ trait Modules
return false; return false;
} }
if (module($alias)->disabled()) {
return false;
}
if (! Module::alias($alias)->enabled()->first()) { if (! Module::alias($alias)->enabled()->first()) {
return false; return false;
} }

View File

@ -4,10 +4,13 @@ namespace App\Utilities;
use App\Models\Common\Report; use App\Models\Common\Report;
use App\Models\Module\Module; use App\Models\Module\Module;
use App\Traits\Modules;
use Illuminate\Support\Str; use Illuminate\Support\Str;
class Reports class Reports
{ {
use Modules;
public static function getClasses($check_permission = true) public static function getClasses($check_permission = true)
{ {
$classes = []; $classes = [];
@ -23,7 +26,7 @@ class Reports
Module::enabled()->each(function ($module) use (&$list) { Module::enabled()->each(function ($module) use (&$list) {
$m = module($module->alias); $m = module($module->alias);
if (!$m || empty($m->get('reports'))) { if (! $m || $m->disabled() || empty($m->get('reports'))) {
return; return;
} }
@ -51,6 +54,10 @@ class Reports
return false; return false;
} }
if (($model->alias != 'core') && (new static)->moduleIsDisabled($model->alias)) {
return false;
}
$class = $model->class; $class = $model->class;
return new $class($model, $load_data); return new $class($model, $load_data);

View File

@ -4,10 +4,13 @@ namespace App\Utilities;
use App\Models\Common\Widget; use App\Models\Common\Widget;
use App\Models\Module\Module; use App\Models\Module\Module;
use App\Traits\Modules;
use Illuminate\Support\Str; use Illuminate\Support\Str;
class Widgets class Widgets
{ {
use Modules;
public static $core_widgets = [ public static $core_widgets = [
'App\Widgets\Receivables', 'App\Widgets\Receivables',
'App\Widgets\Payables', 'App\Widgets\Payables',
@ -27,13 +30,13 @@ class Widgets
} }
Module::enabled()->each(function ($module) use (&$list, $alias) { Module::enabled()->each(function ($module) use (&$list, $alias) {
if (!in_array($alias, [$module->alias, 'all'])) { if (! in_array($alias, [$module->alias, 'all'])) {
return; return;
} }
$m = module($module->alias); $m = module($module->alias);
if (!$m || empty($m->get('widgets'))) { if (! $m || $m->disabled() || empty($m->get('widgets'))) {
return; return;
} }
@ -41,7 +44,7 @@ class Widgets
}); });
foreach ($list as $class) { foreach ($list as $class) {
if (!class_exists($class) || ($check_permission && !static::canRead($class))) { if (! class_exists($class) || ($check_permission && ! static::canRead($class))) {
continue; continue;
} }
@ -62,7 +65,11 @@ class Widgets
$model = Widget::where('dashboard_id', session('dashboard_id'))->where('class', $class_name)->first(); $model = Widget::where('dashboard_id', session('dashboard_id'))->where('class', $class_name)->first();
if (!$model instanceof Widget) { if (($model->alias != 'core') && (new static)->moduleIsDisabled($model->alias)) {
return false;
}
if (! $model instanceof Widget) {
$class = (new $class_name()); $class = (new $class_name());
$model = new Widget(); $model = new Widget();
@ -79,6 +86,10 @@ class Widgets
return false; return false;
} }
if (($model->alias != 'core') && (new static)->moduleIsDisabled($model->alias)) {
return false;
}
$class_name = $model->class; $class_name = $model->class;
} }
@ -87,7 +98,7 @@ class Widgets
public static function show($model, ...$arguments) public static function show($model, ...$arguments)
{ {
if (!$class = static::getClassInstance($model)) { if (! $class = static::getClassInstance($model)) {
return ''; return '';
} }

65
composer.lock generated
View File

@ -8,27 +8,28 @@
"packages": [ "packages": [
{ {
"name": "akaunting/laravel-apexcharts", "name": "akaunting/laravel-apexcharts",
"version": "2.0.1", "version": "2.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/akaunting/laravel-apexcharts.git", "url": "https://github.com/akaunting/laravel-apexcharts.git",
"reference": "3b545508bec317c36a0cb83809de6e6cc8397832" "reference": "5d584f362afc080c5506abe13ac7d6ac3865d68f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/akaunting/laravel-apexcharts/zipball/3b545508bec317c36a0cb83809de6e6cc8397832", "url": "https://api.github.com/repos/akaunting/laravel-apexcharts/zipball/5d584f362afc080c5506abe13ac7d6ac3865d68f",
"reference": "3b545508bec317c36a0cb83809de6e6cc8397832", "reference": "5d584f362afc080c5506abe13ac7d6ac3865d68f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"balping/json-raw-encoder": "^1.0", "balping/json-raw-encoder": "^1.0",
"ext-json": "*", "ext-json": "*",
"illuminate/support": ">=8.0", "illuminate/support": "^8.67|^9.0",
"php": ">=8.0" "php": "^8.0"
}, },
"require-dev": { "require-dev": {
"orchestra/testbench": ">=6.0", "mockery/mockery": "^1.5",
"phpunit/phpunit": ">=9.0" "orchestra/testbench": "^6.23|^7.4",
"phpunit/phpunit": "^9.5"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -70,9 +71,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/akaunting/laravel-apexcharts/issues", "issues": "https://github.com/akaunting/laravel-apexcharts/issues",
"source": "https://github.com/akaunting/laravel-apexcharts/tree/2.0.1" "source": "https://github.com/akaunting/laravel-apexcharts/tree/2.0.2"
}, },
"time": "2022-06-16T14:48:25+00:00" "time": "2022-06-16T20:42:18+00:00"
}, },
{ {
"name": "akaunting/laravel-debugbar-collector", "name": "akaunting/laravel-debugbar-collector",
@ -906,16 +907,16 @@
}, },
{ {
"name": "aws/aws-sdk-php", "name": "aws/aws-sdk-php",
"version": "3.225.5", "version": "3.227.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/aws/aws-sdk-php.git", "url": "https://github.com/aws/aws-sdk-php.git",
"reference": "09b404c6b80b9c31be15fa245e647a2f9fb5e733" "reference": "88d803113ade68604ec03c591d65e1e44406ab8e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/09b404c6b80b9c31be15fa245e647a2f9fb5e733", "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/88d803113ade68604ec03c591d65e1e44406ab8e",
"reference": "09b404c6b80b9c31be15fa245e647a2f9fb5e733", "reference": "88d803113ade68604ec03c591d65e1e44406ab8e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -923,9 +924,9 @@
"ext-json": "*", "ext-json": "*",
"ext-pcre": "*", "ext-pcre": "*",
"ext-simplexml": "*", "ext-simplexml": "*",
"guzzlehttp/guzzle": "^5.3.3 || ^6.2.1 || ^7.0", "guzzlehttp/guzzle": "^6.5.7 || ^7.4.4",
"guzzlehttp/promises": "^1.4.0", "guzzlehttp/promises": "^1.4.0",
"guzzlehttp/psr7": "^1.7.0 || ^2.1.1", "guzzlehttp/psr7": "^1.8.5 || ^2.3",
"mtdowling/jmespath.php": "^2.6", "mtdowling/jmespath.php": "^2.6",
"php": ">=5.5" "php": ">=5.5"
}, },
@ -991,9 +992,9 @@
"support": { "support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues", "issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.225.5" "source": "https://github.com/aws/aws-sdk-php/tree/3.227.0"
}, },
"time": "2022-06-15T19:35:13+00:00" "time": "2022-06-17T18:15:06+00:00"
}, },
{ {
"name": "balping/json-raw-encoder", "name": "balping/json-raw-encoder",
@ -1843,16 +1844,16 @@
}, },
{ {
"name": "doctrine/dbal", "name": "doctrine/dbal",
"version": "3.3.6", "version": "3.3.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/dbal.git", "url": "https://github.com/doctrine/dbal.git",
"reference": "9e7f76dd1cde81c62574fdffa5a9c655c847ad21" "reference": "9f79d4650430b582f4598fe0954ef4d52fbc0a8a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/9e7f76dd1cde81c62574fdffa5a9c655c847ad21", "url": "https://api.github.com/repos/doctrine/dbal/zipball/9f79d4650430b582f4598fe0954ef4d52fbc0a8a",
"reference": "9e7f76dd1cde81c62574fdffa5a9c655c847ad21", "reference": "9f79d4650430b582f4598fe0954ef4d52fbc0a8a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1867,11 +1868,11 @@
"require-dev": { "require-dev": {
"doctrine/coding-standard": "9.0.0", "doctrine/coding-standard": "9.0.0",
"jetbrains/phpstorm-stubs": "2022.1", "jetbrains/phpstorm-stubs": "2022.1",
"phpstan/phpstan": "1.6.3", "phpstan/phpstan": "1.7.13",
"phpstan/phpstan-strict-rules": "^1.2", "phpstan/phpstan-strict-rules": "^1.2",
"phpunit/phpunit": "9.5.20", "phpunit/phpunit": "9.5.20",
"psalm/plugin-phpunit": "0.16.1", "psalm/plugin-phpunit": "0.16.1",
"squizlabs/php_codesniffer": "3.6.2", "squizlabs/php_codesniffer": "3.7.0",
"symfony/cache": "^5.2|^6.0", "symfony/cache": "^5.2|^6.0",
"symfony/console": "^2.7|^3.0|^4.0|^5.0|^6.0", "symfony/console": "^2.7|^3.0|^4.0|^5.0|^6.0",
"vimeo/psalm": "4.23.0" "vimeo/psalm": "4.23.0"
@ -1934,7 +1935,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/doctrine/dbal/issues", "issues": "https://github.com/doctrine/dbal/issues",
"source": "https://github.com/doctrine/dbal/tree/3.3.6" "source": "https://github.com/doctrine/dbal/tree/3.3.7"
}, },
"funding": [ "funding": [
{ {
@ -1950,7 +1951,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-05-02T17:21:01+00:00" "time": "2022-06-13T21:43:03+00:00"
}, },
{ {
"name": "doctrine/deprecations", "name": "doctrine/deprecations",
@ -13932,16 +13933,16 @@
}, },
{ {
"name": "spatie/laravel-ignition", "name": "spatie/laravel-ignition",
"version": "1.3.0", "version": "1.3.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/spatie/laravel-ignition.git", "url": "https://github.com/spatie/laravel-ignition.git",
"reference": "5409e699fc19f4d53e59427445b08f90593fda28" "reference": "fe37a0eafe6ea040804255c70e9808af13314f87"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/5409e699fc19f4d53e59427445b08f90593fda28", "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/fe37a0eafe6ea040804255c70e9808af13314f87",
"reference": "5409e699fc19f4d53e59427445b08f90593fda28", "reference": "fe37a0eafe6ea040804255c70e9808af13314f87",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -14018,7 +14019,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2022-06-15T13:55:18+00:00" "time": "2022-06-17T06:28:57+00:00"
}, },
{ {
"name": "theseer/tokenizer", "name": "theseer/tokenizer",
@ -14178,5 +14179,5 @@
"ext-zip": "*" "ext-zip": "*"
}, },
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.2.0" "plugin-api-version": "2.3.0"
} }

View File

@ -35,6 +35,7 @@ return [
], ],
'columns' => [ 'columns' => [
'created_at' => 'date', 'created_at' => 'date',
'updated_at' => 'date',
], ],
], ],
@ -44,6 +45,8 @@ return [
'name' => ['searchable' => true], 'name' => ['searchable' => true],
'display_name' => ['searchable' => true], 'display_name' => ['searchable' => true],
'description' => ['searchable' => true], 'description' => ['searchable' => true],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -53,6 +56,8 @@ return [
'name' => ['searchable' => true], 'name' => ['searchable' => true],
'display_name' => ['searchable' => true], 'display_name' => ['searchable' => true],
'description' => ['searchable' => true], 'description' => ['searchable' => true],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -63,6 +68,8 @@ return [
'email' => ['searchable' => true], 'email' => ['searchable' => true],
'enabled' => ['boolean' => true], 'enabled' => ['boolean' => true],
'last_logged_in_at' => ['date' => true], 'last_logged_in_at' => ['date' => true],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -77,6 +84,8 @@ return [
'route' => ['currencies.index', 'search=enabled:1'], 'route' => ['currencies.index', 'search=enabled:1'],
], ],
'enabled' => ['boolean' => true], 'enabled' => ['boolean' => true],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -88,6 +97,8 @@ return [
'reconciled' => ['boolean' => true], 'reconciled' => ['boolean' => true],
'started_at' => ['date' => true], 'started_at' => ['date' => true],
'ended_at' => ['date' => true], 'ended_at' => ['date' => true],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -123,6 +134,8 @@ return [
'relationship' => true, 'relationship' => true,
'boolean' => true, 'boolean' => true,
], ],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -137,6 +150,7 @@ return [
'relationship' => true, 'relationship' => true,
'route' => ['accounts.index', 'search=enabled:1'], 'route' => ['accounts.index', 'search=enabled:1'],
], ],
'created_at' => ['date' => true],
], ],
], ],
@ -146,6 +160,8 @@ return [
'domain' => ['searchable' => true], 'domain' => ['searchable' => true],
'settings.value' => ['searchable' => true], 'settings.value' => ['searchable' => true],
'enabled' => ['boolean' => true], 'enabled' => ['boolean' => true],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -154,6 +170,8 @@ return [
'id', 'id',
'name' => ['searchable' => true], 'name' => ['searchable' => true],
'enabled' => ['boolean' => true], 'enabled' => ['boolean' => true],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -168,6 +186,8 @@ return [
], ],
'sale_price', 'sale_price',
'purchase_price', 'purchase_price',
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -187,6 +207,8 @@ return [
'reference', 'reference',
'user_id', 'user_id',
'enabled' => ['boolean' => true], 'enabled' => ['boolean' => true],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -206,6 +228,8 @@ return [
'reference', 'reference',
'user_id', 'user_id',
'enabled' => ['boolean' => true], 'enabled' => ['boolean' => true],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -225,6 +249,8 @@ return [
'reference', 'reference',
'user_id', 'user_id',
'enabled' => ['boolean' => true], 'enabled' => ['boolean' => true],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -259,6 +285,8 @@ return [
'relationship' => true, 'relationship' => true,
'boolean' => true, 'boolean' => true,
], ],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -302,6 +330,8 @@ return [
'relationship' => true, 'relationship' => true,
'boolean' => true, 'boolean' => true,
], ],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -346,6 +376,8 @@ return [
'relationship' => true, 'relationship' => true,
'boolean' => true, 'boolean' => true,
], ],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -355,6 +387,8 @@ return [
'name' => ['searchable' => true], 'name' => ['searchable' => true],
'enabled' => ['boolean' => true], 'enabled' => ['boolean' => true],
'type', 'type',
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -376,6 +410,8 @@ return [
], ],
'decimal_mark', 'decimal_mark',
'thousands_separator', 'thousands_separator',
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -384,6 +420,8 @@ return [
'id', 'id',
'name' => ['searchable' => true], 'name' => ['searchable' => true],
'subject' => ['searchable' => true], 'subject' => ['searchable' => true],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],
@ -394,6 +432,8 @@ return [
'type', 'type',
'rate', 'rate',
'enabled' => ['boolean' => true], 'enabled' => ['boolean' => true],
'created_at' => ['date' => true],
'updated_at' => ['date' => true],
], ],
], ],

View File

@ -10,15 +10,15 @@ return [
'minor' => '0', 'minor' => '0',
'patch' => '1', 'patch' => '2',
'build' => '', 'build' => '',
'status' => 'Stable', 'status' => 'Stable',
'date' => '11-June-2022', 'date' => '18-June-2022',
'time' => '10:00', 'time' => '01:00',
'zone' => 'GMT +3', 'zone' => 'GMT +3',

View File

@ -546,6 +546,11 @@ html[dir='rtl'] .text-alignment-right {
/*--Print Template Classic Finish--*/ /*--Print Template Classic Finish--*/
/*--Print Template Modern Start--*/ /*--Print Template Modern Start--*/
.justify-content-between
{
justify-content: space-between !important;
}
.align-items-center .align-items-center
{ {
align-items: center !important; align-items: center !important;

View File

@ -27,6 +27,11 @@ return [
'body' => 'नमस्ते,<br/><br/>{customer_name} के आवर्ती सर्कल के आधार पर, <strong>{invoice_number}</strong> चालान स्वचालित रूप से बनाया गया है।<br/><br/>आप निम्न लिंक से चालान का विवरण देख सकते हैं: <a href="{invoice_admin_link}">{invoice_number}</a>।<br/><br/>सादर,<br/>{company_name}', 'body' => 'नमस्ते,<br/><br/>{customer_name} के आवर्ती सर्कल के आधार पर, <strong>{invoice_number}</strong> चालान स्वचालित रूप से बनाया गया है।<br/><br/>आप निम्न लिंक से चालान का विवरण देख सकते हैं: <a href="{invoice_admin_link}">{invoice_number}</a>।<br/><br/>सादर,<br/>{company_name}',
], ],
'invoice_view_admin' => [
'subject' => '{invoice_number} चालान देखा गया',
'body' => 'नमस्कार,<br /><br />{customer_name} ने <strong>{invoice_number}</strong> चालान देखा है।<br /><br />आप निम्न लिंक से चालान विवरण देख सकते हैं: <a href="{invoice_admin_link}">{invoice_number}</a>।<br /><br />सादर,<br />{company_name}',
],
'invoice_payment_customer' => [ 'invoice_payment_customer' => [
'subject' => '{invoice_number} चालान के लिए भुगतान प्राप्त हुआ', 'subject' => '{invoice_number} चालान के लिए भुगतान प्राप्त हुआ',
'body' => 'प्रिय {customer_name},<br/><br/>भुगतान के लिए धन्यवाद।भुगतान का विवरण देखें:<br/><br/>-------------------------------------------------<br/><br/>राशि: <strong>{transaction_total}<br /></strong>तारीख: <strong>{transaction_paid_date}</strong><br/>चालान संख्या: <strong>{invoice_number}<br/><br/></strong>-------------------------------------------------<br/><br/>आप निम्न लिंक से कभी भी चालान का विवरण देख सकते हैं: <a href="{invoice_guest_link}">{invoice_number}</a>।<br/><br/>किसी भी प्रश्न के लिए हमसे संपर्क करने में संकोच न करें।<br/><br/>सादर,<br/>{company_name}', 'body' => 'प्रिय {customer_name},<br/><br/>भुगतान के लिए धन्यवाद।भुगतान का विवरण देखें:<br/><br/>-------------------------------------------------<br/><br/>राशि: <strong>{transaction_total}<br /></strong>तारीख: <strong>{transaction_paid_date}</strong><br/>चालान संख्या: <strong>{invoice_number}<br/><br/></strong>-------------------------------------------------<br/><br/>आप निम्न लिंक से कभी भी चालान का विवरण देख सकते हैं: <a href="{invoice_guest_link}">{invoice_number}</a>।<br/><br/>किसी भी प्रश्न के लिए हमसे संपर्क करने में संकोच न करें।<br/><br/>सादर,<br/>{company_name}',
@ -47,13 +52,13 @@ return [
'body' => 'नमस्ते,<br/><br/>{vendor_name} के आवर्ती सर्कल के आधार पर, <strong>{bill_number}</strong> चालान स्वचालित रूप से बनाया गया है।<br/><br/>आप नीचे दिए गए लिंक से बिल का विवरण देख सकते हैं: <a href="{bill_admin_link}">{bill_number}</a>।<br/><br/>सादर,<br/>{company_name}', 'body' => 'नमस्ते,<br/><br/>{vendor_name} के आवर्ती सर्कल के आधार पर, <strong>{bill_number}</strong> चालान स्वचालित रूप से बनाया गया है।<br/><br/>आप नीचे दिए गए लिंक से बिल का विवरण देख सकते हैं: <a href="{bill_admin_link}">{bill_number}</a>।<br/><br/>सादर,<br/>{company_name}',
], ],
'revenue_new_customer' => [ 'payment_received_customer' => [
'subject' => '{revenue_date} भुगतान बनाया गया', 'subject' => '{company_name} से आपकी रसीद',
'body' => 'प्रिय {customer_name},<br /><br />हमने निम्नलिखित भुगतान तैयार किया है।<br /><br />आप निम्न लिंक से भुगतान विवरण देख सकते हैं : <a href="{revenue_guest_link}">{revenue_date}</a>.<br /><br />किसी भी प्रश्न के लिए हमसे बेझिझक संपर्क करें..<br /><br />सादर,<br />{company_name}', 'body' => 'प्रिय {contact_name},<br /><br />भुगतान के लिए धन्यवाद। <br /><br />आप निम्न लिंक से भुगतान विवरण देख सकते हैं: <a href="{payment_guest_link}">{payment_date}</a>।<br /><br />हमसे संपर्क करने में संकोच न करें किसी भी प्रश्न के साथ।<br /><br />सादर,<br />{company_name}',
], ],
'payment_new_vendor' => [ 'payment_made_vendor' => [
'subject' => '{revenue_date} भुगतान बनाया गया', 'subject' => '{company_name} द्वारा किया गया भुगतान',
'body' => 'प्रिय {{vendor_name}},<br /><br />हमने निम्नलिखित भुगतान तैयार किया है।<br /><br />आप निम्न लिंक से भुगतान विवरण देख सकते हैं : <a href="{payment_admin_link}">{payment_date}</a>.<br /><br />किसी भी प्रश्न के लिए हमसे बेझिझक संपर्क करें..<br /><br />सादर,<br />{company_name}', 'body' => 'प्रिय {contact_name},<br /><br />हमने निम्नलिखित भुगतान कर दिया है। <br /><br />आप निम्न लिंक से भुगतान विवरण देख सकते हैं: <a href="{payment_guest_link}">{payment_date}</a>।<br /><br />हमसे संपर्क करने में संकोच न करें किसी भी प्रश्न के साथ।<br /><br />सादर,<br />{company_name}',
], ],
]; ];

View File

@ -36,7 +36,7 @@ return [
'install' => 'इंस्टॉल करें', 'install' => 'इंस्टॉल करें',
'buy_now' => 'अभी खरीदें', 'buy_now' => 'अभी खरीदें',
'get_api_key' => 'अपनी एपीआई कुंजी प्राप्त करने के लिए यहां <a href=":url" target="_blank">क्लिक</a> करें।', 'get_api_key' => 'अपनी एपीआई कुंजी प्राप्त करने के लिए यहां <a href=":url" target="_blank">क्लिक</a> करें।',
'no_apps' => 'इस श्रेणी में अभी तक कोई एप्लिकेशन नहीं हैं।', 'no_apps' => 'अपने व्यवसाय के लिए सबसे अधिक पेशेवर ऐप्स देखें और उन्हें सर्वोत्तम मूल्य पर प्राप्त करें।',
'become_developer' => 'क्या आप एक डेवलपर हैं? <a href=":url" target="_blank">यहां</a> आप सीख सकते हैं कि ऐप कैसे बनाएं और आज बेचना शुरू करें!', 'become_developer' => 'क्या आप एक डेवलपर हैं? <a href=":url" target="_blank">यहां</a> आप सीख सकते हैं कि ऐप कैसे बनाएं और आज बेचना शुरू करें!',
'recommended_apps' => 'अनुशंसित ऐप्स', 'recommended_apps' => 'अनुशंसित ऐप्स',
'can_not_install' => 'मासिक सदस्यता केवल क्लाउड सेवा पर उपलब्ध है। <a href="https://akaunting.com/upgrad-to-yearly" target="_blank">और जानें।</a>', 'can_not_install' => 'मासिक सदस्यता केवल क्लाउड सेवा पर उपलब्ध है। <a href="https://akaunting.com/upgrad-to-yearly" target="_blank">और जानें।</a>',

View File

@ -40,7 +40,7 @@ return [
'all_invoices' => 'Faça login para ver todas as faturas', 'all_invoices' => 'Faça login para ver todas as faturas',
'create_invoice' => 'Criar fatura', 'create_invoice' => 'Criar fatura',
'send_invoice' => 'Enviar fatura', 'send_invoice' => 'Enviar fatura',
'get_paid' => 'Pagar', 'get_paid' => 'Quitar',
'accept_payments' => 'Aceitar Pagamentos Online', 'accept_payments' => 'Aceitar Pagamentos Online',
'payment_received' => 'Pagamento recebido', 'payment_received' => 'Pagamento recebido',

View File

@ -1,9 +1,17 @@
@php
$is_print = request()->routeIs('reports.print');
@endphp
@include($class->views['summary.content.header']) @include($class->views['summary.content.header'])
@foreach($class->tables as $table_key => $table_name) @foreach($class->tables as $table_key => $table_name)
<div class="flex flex-col lg:flex-row mt-12"> <div
class="flex flex-col lg:flex-row mt-12">
@include($class->views['summary.table']) @include($class->views['summary.table'])
@include($class->views['summary.chart'])
@if (! $is_print)
@include($class->views['summary.chart'])
@endif
</div> </div>
@endforeach @endforeach

View File

@ -8,7 +8,7 @@
<h2 x-show="toggle === 'bar'">{{ trans('general.distribution') }}</h2> <h2 x-show="toggle === 'bar'">{{ trans('general.distribution') }}</h2>
</div> </div>
<div class="w-full lg:w-1/12 flex items-center justify-center text-right cursor-pointer hover:shadow-lg hover:translate-y-0 hover:rounded-md" x-on:click="toggle === 'bar' ? toggle = 'donut' : toggle = 'bar'"> <div class="w-8 h-8 flex items-center justify-center px-2 py-2 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6 cursor-pointer" x-on:click="toggle === 'bar' ? toggle = 'donut' : toggle = 'bar'">
<span class="material-icons-outlined" x-bind:class="toggle === 'donut' ? 'block': 'hidden'" title="{{ trans('general.distribution') }}">donut_small</span> <span class="material-icons-outlined" x-bind:class="toggle === 'donut' ? 'block': 'hidden'" title="{{ trans('general.distribution') }}">donut_small</span>
<span class="material-icons" x-bind:class="toggle === 'bar' ? 'block': 'hidden'" title="{{ trans('general.timeline') }}">signal_cellular_alt</span> <span class="material-icons" x-bind:class="toggle === 'bar' ? 'block': 'hidden'" title="{{ trans('general.timeline') }}">signal_cellular_alt</span>
</div> </div>

View File

@ -1,10 +1,20 @@
<div> <div>
<div class="flex items-center justify-between text-xl text-black-400 border-b pb-2"> <div
<h2>{{ $table_name }}</h2> @class([
<span>{{ $class->has_money ? money($grand_total, default_currency(), true) : $grand_total }}</span> 'd-flex align-items-center justify-content-between rp-border-bottom-1 text' => $is_print,
'flex items-center justify-between text-xl text-black-400 border-b pb-2' => !$is_print
])
>
<h2>{{ $table_name }}</h2>
<span>{{ $class->has_money ? money($grand_total, default_currency(), true) : $grand_total }}</span>
</div> </div>
@if (!empty($class->row_values[$table_key])) @if (!empty($class->row_values[$table_key]))
<ul class="space-y-2 my-3"> <ul
@class([
'print-template text-normal' => $is_print,
'space-y-2 my-3' => !$is_print
])
>
@foreach($class->row_tree_nodes[$table_key] as $id => $node) @foreach($class->row_tree_nodes[$table_key] as $id => $node)
@include($class->views['summary.table.row'], ['tree_level' => 0]) @include($class->views['summary.table.row'], ['tree_level' => 0])
@endforeach @endforeach

View File

@ -6,15 +6,25 @@
@if ($row_total = array_sum($rows)) @if ($row_total = array_sum($rows))
@if (isset($parent_id)) @if (isset($parent_id))
<li class="collapse-sub" data-collapse="child-{{ $parent_id }}"> <li
@class([
'mt-1' => $is_print,
'collapse-sub' => !$is_print
])
data-collapse="child-{{ $parent_id }}">
@else @else
<li> <li>
@endif @endif
<div class="flex justify-between border-0 m-0 p-0"> <div
@class([
'd-flex align-items-center justify-content-between' => $is_print,
'flex justify-between border-0 m-0 p-0' => !$is_print
])
>
@if (isset($parent_id)) @if (isset($parent_id))
<div class="flex items-center" style="padding-left: {{ $tree_level * 20 }}px;"> <div style="display:flex; align-items: center; padding-left: {{ $tree_level * 20 }}px;">
@else @else
<div class="flex items-center"> <div style="display:flex; align-items: center;">
@endif @endif
<span>{{ $class->row_names[$table_key][$id] }}</span> <span>{{ $class->row_names[$table_key][$id] }}</span>
</div> </div>
@ -43,17 +53,24 @@
@if ($row_total = array_sum($parent_row_values)) @if ($row_total = array_sum($parent_row_values))
@if (isset($parent_id)) @if (isset($parent_id))
<li class="collapse-sub" data-collapse="child-{{ $parent_id }}"> <li
@class([
'mt-1' => $is_print,
'collapse-sub' => !$is_print
])
data-collapse="child-{{ $parent_id }}">
@else @else
<li> <li>
@endif @endif
<div class="flex justify-between border-0 m-0 p-0"> <div style="display: flex; justify-content: space-between;">
<div class="flex items-center" style="padding-left: {{ $tree_level * 20 }}px;"> <div style="display:flex; align-items: center; padding-left: {{ $tree_level * 20 }}px;">
<span>{{ $class->row_names[$table_key][$id] }}</span> <span>{{ $class->row_names[$table_key][$id] }}</span>
@if (array_sum($parent_row_values) != array_sum($class->row_values[$table_key][$id])) @if (!$is_print)
<button type="button" class="align-text-top flex" node="child-{{ $id }}" onClick="toggleSub('child-{{ $id }}', event)"> @if (array_sum($parent_row_values) != array_sum($class->row_values[$table_key][$id]))
<span class="material-icons transform rotate-90 transition-all text-lg leading-none">navigate_next</span> <button type="button" class="align-text-top flex" node="child-{{ $id }}" onClick="toggleSub('child-{{ $id }}', event)">
</button> <span class="material-icons transform rotate-90 transition-all text-lg leading-none">navigate_next</span>
</button>
@endif
@endif @endif
</div> </div>
<span>{{ $class->has_money ? money($row_total, setting('default.currency'), true) : $row_total }}</span> <span>{{ $class->has_money ? money($row_total, setting('default.currency'), true) : $row_total }}</span>
@ -64,9 +81,14 @@
<!-- no categories part --> <!-- no categories part -->
@php $rows = $class->row_values[$table_key][$id]; @endphp @php $rows = $class->row_values[$table_key][$id]; @endphp
@if (($row_total = array_sum($rows)) && array_sum($parent_row_values) != array_sum($rows)) @if (($row_total = array_sum($rows)) && array_sum($parent_row_values) != array_sum($rows))
<li class="collapse-sub" data-collapse="child-{{ $id }}"> <li
<div class="flex justify-between border-0 m-0 p-0"> @class([
<div class="flex items-center" style="padding-left: {{ ($tree_level + 1) * 20 }}px;"> 'mt-1' => $is_print,
'collapse-sub' => !$is_print
])
data-collapse="child-{{ $id }}">
<div style="display: flex; justify-content: space-between;">
<div style="display:flex; align-items: center; padding-left: {{ ($tree_level + 1) * 20 }}px;">
<span>{{ $class->row_names[$table_key][$id] }}</span> <span>{{ $class->row_names[$table_key][$id] }}</span>
</div> </div>
<span>{{ $class->has_money ? money($row_total, setting('default.currency'), true) : $row_total }}</span> <span>{{ $class->has_money ? money($row_total, setting('default.currency'), true) : $row_total }}</span>