diff --git a/app/Http/Resources/Auth/User.php b/app/Http/Resources/Auth/User.php index 49b3b6f51..17ffaf7d8 100644 --- a/app/Http/Resources/Auth/User.php +++ b/app/Http/Resources/Auth/User.php @@ -21,8 +21,11 @@ class User extends JsonResource 'name' => $this->name, 'email' => $this->email, 'locale' => $this->locale, + 'landing_page' => $this->landing_page, + 'enabled' => $this->enabled, 'created_from' => $this->created_from, '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() : '', 'updated_at' => $this->updated_at ? $this->updated_at->toIso8601String() : '', 'companies' => [static::$wrap => Company::collection($this->companies)], diff --git a/app/Listeners/Menu/ShowInNotifications.php b/app/Listeners/Menu/ShowInNotifications.php index 49d499e47..6ba776b82 100644 --- a/app/Listeners/Menu/ShowInNotifications.php +++ b/app/Listeners/Menu/ShowInNotifications.php @@ -32,6 +32,7 @@ class ShowInNotifications foreach ($updates as $key => $update) { $prefix = ($key == 'core') ? 'core' : 'module'; + $name = ($prefix == 'core') ? 'Akaunting' : module($key)->getName(); $new = new DatabaseNotification(); $new->id = $key; @@ -39,8 +40,8 @@ class ShowInNotifications $new->notifiable_type = "users"; $new->notifiable_id = user()->id; $new->data = [ - 'title' => $key . ' (v' . $update . ')', - 'description' => '' . trans('install.update.' . $prefix) . '', + 'title' => $name . ' (v' . $update . ')', + 'description' => '' . trans('install.update.' . $prefix, ['module' => $name]) . '', ]; $new->created_at = \Carbon\Carbon::now(); diff --git a/app/Models/Common/Widget.php b/app/Models/Common/Widget.php index 481ac63bf..2f8bdf15a 100644 --- a/app/Models/Common/Widget.php +++ b/app/Models/Common/Widget.php @@ -53,6 +53,22 @@ class Widget extends Model 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. * diff --git a/app/Traits/Modules.php b/app/Traits/Modules.php index d9deef13b..e11a4112f 100644 --- a/app/Traits/Modules.php +++ b/app/Traits/Modules.php @@ -439,6 +439,10 @@ trait Modules return false; } + if (module($alias)->disabled()) { + return false; + } + if (! Module::alias($alias)->enabled()->first()) { return false; } diff --git a/app/Utilities/Reports.php b/app/Utilities/Reports.php index 225956ee5..67b0f45fb 100644 --- a/app/Utilities/Reports.php +++ b/app/Utilities/Reports.php @@ -4,10 +4,13 @@ namespace App\Utilities; use App\Models\Common\Report; use App\Models\Module\Module; +use App\Traits\Modules; use Illuminate\Support\Str; class Reports { + use Modules; + public static function getClasses($check_permission = true) { $classes = []; @@ -23,7 +26,7 @@ class Reports Module::enabled()->each(function ($module) use (&$list) { $m = module($module->alias); - if (!$m || empty($m->get('reports'))) { + if (! $m || $m->disabled() || empty($m->get('reports'))) { return; } @@ -51,6 +54,10 @@ class Reports return false; } + if (($model->alias != 'core') && (new static)->moduleIsDisabled($model->alias)) { + return false; + } + $class = $model->class; return new $class($model, $load_data); diff --git a/app/Utilities/Widgets.php b/app/Utilities/Widgets.php index 3509c236b..b9a97a7e4 100644 --- a/app/Utilities/Widgets.php +++ b/app/Utilities/Widgets.php @@ -4,10 +4,13 @@ namespace App\Utilities; use App\Models\Common\Widget; use App\Models\Module\Module; +use App\Traits\Modules; use Illuminate\Support\Str; class Widgets { + use Modules; + public static $core_widgets = [ 'App\Widgets\Receivables', 'App\Widgets\Payables', @@ -27,13 +30,13 @@ class Widgets } Module::enabled()->each(function ($module) use (&$list, $alias) { - if (!in_array($alias, [$module->alias, 'all'])) { + if (! in_array($alias, [$module->alias, 'all'])) { return; } $m = module($module->alias); - if (!$m || empty($m->get('widgets'))) { + if (! $m || $m->disabled() || empty($m->get('widgets'))) { return; } @@ -41,7 +44,7 @@ class Widgets }); foreach ($list as $class) { - if (!class_exists($class) || ($check_permission && !static::canRead($class))) { + if (! class_exists($class) || ($check_permission && ! static::canRead($class))) { continue; } @@ -62,7 +65,11 @@ class Widgets $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()); $model = new Widget(); @@ -79,6 +86,10 @@ class Widgets return false; } + if (($model->alias != 'core') && (new static)->moduleIsDisabled($model->alias)) { + return false; + } + $class_name = $model->class; } @@ -87,7 +98,7 @@ class Widgets public static function show($model, ...$arguments) { - if (!$class = static::getClassInstance($model)) { + if (! $class = static::getClassInstance($model)) { return ''; } diff --git a/composer.lock b/composer.lock index e259ccd40..38954e8aa 100644 --- a/composer.lock +++ b/composer.lock @@ -8,27 +8,28 @@ "packages": [ { "name": "akaunting/laravel-apexcharts", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/akaunting/laravel-apexcharts.git", - "reference": "3b545508bec317c36a0cb83809de6e6cc8397832" + "reference": "5d584f362afc080c5506abe13ac7d6ac3865d68f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/akaunting/laravel-apexcharts/zipball/3b545508bec317c36a0cb83809de6e6cc8397832", - "reference": "3b545508bec317c36a0cb83809de6e6cc8397832", + "url": "https://api.github.com/repos/akaunting/laravel-apexcharts/zipball/5d584f362afc080c5506abe13ac7d6ac3865d68f", + "reference": "5d584f362afc080c5506abe13ac7d6ac3865d68f", "shasum": "" }, "require": { "balping/json-raw-encoder": "^1.0", "ext-json": "*", - "illuminate/support": ">=8.0", - "php": ">=8.0" + "illuminate/support": "^8.67|^9.0", + "php": "^8.0" }, "require-dev": { - "orchestra/testbench": ">=6.0", - "phpunit/phpunit": ">=9.0" + "mockery/mockery": "^1.5", + "orchestra/testbench": "^6.23|^7.4", + "phpunit/phpunit": "^9.5" }, "type": "library", "extra": { @@ -70,9 +71,9 @@ ], "support": { "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", @@ -906,16 +907,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.225.5", + "version": "3.227.0", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "09b404c6b80b9c31be15fa245e647a2f9fb5e733" + "reference": "88d803113ade68604ec03c591d65e1e44406ab8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/09b404c6b80b9c31be15fa245e647a2f9fb5e733", - "reference": "09b404c6b80b9c31be15fa245e647a2f9fb5e733", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/88d803113ade68604ec03c591d65e1e44406ab8e", + "reference": "88d803113ade68604ec03c591d65e1e44406ab8e", "shasum": "" }, "require": { @@ -923,9 +924,9 @@ "ext-json": "*", "ext-pcre": "*", "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/psr7": "^1.7.0 || ^2.1.1", + "guzzlehttp/psr7": "^1.8.5 || ^2.3", "mtdowling/jmespath.php": "^2.6", "php": ">=5.5" }, @@ -991,9 +992,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "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", @@ -1843,16 +1844,16 @@ }, { "name": "doctrine/dbal", - "version": "3.3.6", + "version": "3.3.7", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "9e7f76dd1cde81c62574fdffa5a9c655c847ad21" + "reference": "9f79d4650430b582f4598fe0954ef4d52fbc0a8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/9e7f76dd1cde81c62574fdffa5a9c655c847ad21", - "reference": "9e7f76dd1cde81c62574fdffa5a9c655c847ad21", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/9f79d4650430b582f4598fe0954ef4d52fbc0a8a", + "reference": "9f79d4650430b582f4598fe0954ef4d52fbc0a8a", "shasum": "" }, "require": { @@ -1867,11 +1868,11 @@ "require-dev": { "doctrine/coding-standard": "9.0.0", "jetbrains/phpstorm-stubs": "2022.1", - "phpstan/phpstan": "1.6.3", + "phpstan/phpstan": "1.7.13", "phpstan/phpstan-strict-rules": "^1.2", "phpunit/phpunit": "9.5.20", "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/console": "^2.7|^3.0|^4.0|^5.0|^6.0", "vimeo/psalm": "4.23.0" @@ -1934,7 +1935,7 @@ ], "support": { "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": [ { @@ -1950,7 +1951,7 @@ "type": "tidelift" } ], - "time": "2022-05-02T17:21:01+00:00" + "time": "2022-06-13T21:43:03+00:00" }, { "name": "doctrine/deprecations", @@ -13932,16 +13933,16 @@ }, { "name": "spatie/laravel-ignition", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ignition.git", - "reference": "5409e699fc19f4d53e59427445b08f90593fda28" + "reference": "fe37a0eafe6ea040804255c70e9808af13314f87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/5409e699fc19f4d53e59427445b08f90593fda28", - "reference": "5409e699fc19f4d53e59427445b08f90593fda28", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/fe37a0eafe6ea040804255c70e9808af13314f87", + "reference": "fe37a0eafe6ea040804255c70e9808af13314f87", "shasum": "" }, "require": { @@ -14018,7 +14019,7 @@ "type": "github" } ], - "time": "2022-06-15T13:55:18+00:00" + "time": "2022-06-17T06:28:57+00:00" }, { "name": "theseer/tokenizer", @@ -14178,5 +14179,5 @@ "ext-zip": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/config/search-string.php b/config/search-string.php index 3360dcb79..d1f4690d2 100644 --- a/config/search-string.php +++ b/config/search-string.php @@ -35,6 +35,7 @@ return [ ], 'columns' => [ 'created_at' => 'date', + 'updated_at' => 'date', ], ], @@ -44,6 +45,8 @@ return [ 'name' => ['searchable' => true], 'display_name' => ['searchable' => true], 'description' => ['searchable' => true], + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -53,6 +56,8 @@ return [ 'name' => ['searchable' => true], 'display_name' => ['searchable' => true], 'description' => ['searchable' => true], + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -63,6 +68,8 @@ return [ 'email' => ['searchable' => true], 'enabled' => ['boolean' => 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'], ], 'enabled' => ['boolean' => true], + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -88,6 +97,8 @@ return [ 'reconciled' => ['boolean' => true], 'started_at' => ['date' => true], 'ended_at' => ['date' => true], + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -123,6 +134,8 @@ return [ 'relationship' => true, 'boolean' => true, ], + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -137,6 +150,7 @@ return [ 'relationship' => true, 'route' => ['accounts.index', 'search=enabled:1'], ], + 'created_at' => ['date' => true], ], ], @@ -146,6 +160,8 @@ return [ 'domain' => ['searchable' => true], 'settings.value' => ['searchable' => true], 'enabled' => ['boolean' => true], + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -154,6 +170,8 @@ return [ 'id', 'name' => ['searchable' => true], 'enabled' => ['boolean' => true], + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -168,6 +186,8 @@ return [ ], 'sale_price', 'purchase_price', + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -187,6 +207,8 @@ return [ 'reference', 'user_id', 'enabled' => ['boolean' => true], + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -206,6 +228,8 @@ return [ 'reference', 'user_id', 'enabled' => ['boolean' => true], + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -225,6 +249,8 @@ return [ 'reference', 'user_id', 'enabled' => ['boolean' => true], + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -259,6 +285,8 @@ return [ 'relationship' => true, 'boolean' => true, ], + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -302,6 +330,8 @@ return [ 'relationship' => true, 'boolean' => true, ], + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -346,6 +376,8 @@ return [ 'relationship' => true, 'boolean' => true, ], + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -355,6 +387,8 @@ return [ 'name' => ['searchable' => true], 'enabled' => ['boolean' => true], 'type', + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -376,6 +410,8 @@ return [ ], 'decimal_mark', 'thousands_separator', + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -384,6 +420,8 @@ return [ 'id', 'name' => ['searchable' => true], 'subject' => ['searchable' => true], + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], @@ -394,6 +432,8 @@ return [ 'type', 'rate', 'enabled' => ['boolean' => true], + 'created_at' => ['date' => true], + 'updated_at' => ['date' => true], ], ], diff --git a/config/version.php b/config/version.php index e63facf8d..7a3443073 100644 --- a/config/version.php +++ b/config/version.php @@ -10,15 +10,15 @@ return [ 'minor' => '0', - 'patch' => '1', + 'patch' => '2', 'build' => '', 'status' => 'Stable', - 'date' => '11-June-2022', + 'date' => '18-June-2022', - 'time' => '10:00', + 'time' => '01:00', 'zone' => 'GMT +3', diff --git a/public/css/print.css b/public/css/print.css index f98bb8dbd..0b1d3ccbd 100644 --- a/public/css/print.css +++ b/public/css/print.css @@ -546,6 +546,11 @@ html[dir='rtl'] .text-alignment-right { /*--Print Template Classic Finish--*/ /*--Print Template Modern Start--*/ +.justify-content-between +{ + justify-content: space-between !important; +} + .align-items-center { align-items: center !important; diff --git a/resources/lang/hi-IN/email_templates.php b/resources/lang/hi-IN/email_templates.php index 75b68018d..57c244122 100644 --- a/resources/lang/hi-IN/email_templates.php +++ b/resources/lang/hi-IN/email_templates.php @@ -27,6 +27,11 @@ return [ 'body' => 'नमस्ते,

{customer_name} के आवर्ती सर्कल के आधार पर, {invoice_number} चालान स्वचालित रूप से बनाया गया है।

आप निम्न लिंक से चालान का विवरण देख सकते हैं: {invoice_number}

सादर,
{company_name}', ], + 'invoice_view_admin' => [ + 'subject' => '{invoice_number} चालान देखा गया', + 'body' => 'नमस्कार,

{customer_name} ने {invoice_number} चालान देखा है।

आप निम्न लिंक से चालान विवरण देख सकते हैं: {invoice_number}

सादर,
{company_name}', + ], + 'invoice_payment_customer' => [ 'subject' => '{invoice_number} चालान के लिए भुगतान प्राप्त हुआ', 'body' => 'प्रिय {customer_name},

भुगतान के लिए धन्यवाद।भुगतान का विवरण देखें:

-------------------------------------------------

राशि: {transaction_total}
तारीख: {transaction_paid_date}
चालान संख्या: {invoice_number}

-------------------------------------------------

आप निम्न लिंक से कभी भी चालान का विवरण देख सकते हैं: {invoice_number}

किसी भी प्रश्न के लिए हमसे संपर्क करने में संकोच न करें।

सादर,
{company_name}', @@ -47,13 +52,13 @@ return [ 'body' => 'नमस्ते,

{vendor_name} के आवर्ती सर्कल के आधार पर, {bill_number} चालान स्वचालित रूप से बनाया गया है।

आप नीचे दिए गए लिंक से बिल का विवरण देख सकते हैं: {bill_number}

सादर,
{company_name}', ], - 'revenue_new_customer' => [ - 'subject' => '{revenue_date} भुगतान बनाया गया', - 'body' => 'प्रिय {customer_name},

हमने निम्नलिखित भुगतान तैयार किया है।

आप निम्न लिंक से भुगतान विवरण देख सकते हैं : {revenue_date}.

किसी भी प्रश्न के लिए हमसे बेझिझक संपर्क करें..

सादर,
{company_name}', + 'payment_received_customer' => [ + 'subject' => '{company_name} से आपकी रसीद', + 'body' => 'प्रिय {contact_name},

भुगतान के लिए धन्यवाद।

आप निम्न लिंक से भुगतान विवरण देख सकते हैं: {payment_date}

हमसे संपर्क करने में संकोच न करें किसी भी प्रश्न के साथ।

सादर,
{company_name}', ], - 'payment_new_vendor' => [ - 'subject' => '{revenue_date} भुगतान बनाया गया', - 'body' => 'प्रिय {{vendor_name}},

हमने निम्नलिखित भुगतान तैयार किया है।

आप निम्न लिंक से भुगतान विवरण देख सकते हैं : {payment_date}.

किसी भी प्रश्न के लिए हमसे बेझिझक संपर्क करें..

सादर,
{company_name}', + 'payment_made_vendor' => [ + 'subject' => '{company_name} द्वारा किया गया भुगतान', + 'body' => 'प्रिय {contact_name},

हमने निम्नलिखित भुगतान कर दिया है।

आप निम्न लिंक से भुगतान विवरण देख सकते हैं: {payment_date}

हमसे संपर्क करने में संकोच न करें किसी भी प्रश्न के साथ।

सादर,
{company_name}', ], ]; diff --git a/resources/lang/hi-IN/modules.php b/resources/lang/hi-IN/modules.php index d3ad343c4..816f8bcf7 100644 --- a/resources/lang/hi-IN/modules.php +++ b/resources/lang/hi-IN/modules.php @@ -36,7 +36,7 @@ return [ 'install' => 'इंस्टॉल करें', 'buy_now' => 'अभी खरीदें', 'get_api_key' => 'अपनी एपीआई कुंजी प्राप्त करने के लिए यहां क्लिक करें।', - 'no_apps' => 'इस श्रेणी में अभी तक कोई एप्लिकेशन नहीं हैं।', + 'no_apps' => 'अपने व्यवसाय के लिए सबसे अधिक पेशेवर ऐप्स देखें और उन्हें सर्वोत्तम मूल्य पर प्राप्त करें।', 'become_developer' => 'क्या आप एक डेवलपर हैं? यहां आप सीख सकते हैं कि ऐप कैसे बनाएं और आज बेचना शुरू करें!', 'recommended_apps' => 'अनुशंसित ऐप्स', 'can_not_install' => 'मासिक सदस्यता केवल क्लाउड सेवा पर उपलब्ध है। और जानें।', diff --git a/resources/lang/pt-BR/invoices.php b/resources/lang/pt-BR/invoices.php index 89ac429f2..88f0df099 100644 --- a/resources/lang/pt-BR/invoices.php +++ b/resources/lang/pt-BR/invoices.php @@ -40,7 +40,7 @@ return [ 'all_invoices' => 'Faça login para ver todas as faturas', 'create_invoice' => 'Criar fatura', 'send_invoice' => 'Enviar fatura', - 'get_paid' => 'Pagar', + 'get_paid' => 'Quitar', 'accept_payments' => 'Aceitar Pagamentos Online', 'payment_received' => 'Pagamento recebido', diff --git a/resources/views/components/reports/summary.blade.php b/resources/views/components/reports/summary.blade.php index d99afd9c1..44741e6a2 100644 --- a/resources/views/components/reports/summary.blade.php +++ b/resources/views/components/reports/summary.blade.php @@ -1,9 +1,17 @@ +@php + $is_print = request()->routeIs('reports.print'); +@endphp + @include($class->views['summary.content.header']) @foreach($class->tables as $table_key => $table_name) -
+
@include($class->views['summary.table']) - @include($class->views['summary.chart']) + + @if (! $is_print) + @include($class->views['summary.chart']) + @endif
@endforeach diff --git a/resources/views/components/reports/summary/chart.blade.php b/resources/views/components/reports/summary/chart.blade.php index 298d668e3..50cca6cf2 100644 --- a/resources/views/components/reports/summary/chart.blade.php +++ b/resources/views/components/reports/summary/chart.blade.php @@ -8,7 +8,7 @@

{{ trans('general.distribution') }}

-
+
donut_small signal_cellular_alt
diff --git a/resources/views/components/reports/summary/table/body.blade.php b/resources/views/components/reports/summary/table/body.blade.php index 9d0b56f8d..cee095c6a 100644 --- a/resources/views/components/reports/summary/table/body.blade.php +++ b/resources/views/components/reports/summary/table/body.blade.php @@ -1,10 +1,20 @@
-
-

{{ $table_name }}

- {{ $class->has_money ? money($grand_total, default_currency(), true) : $grand_total }} +
$is_print, + 'flex items-center justify-between text-xl text-black-400 border-b pb-2' => !$is_print + ]) + > +

{{ $table_name }}

+ {{ $class->has_money ? money($grand_total, default_currency(), true) : $grand_total }}
@if (!empty($class->row_values[$table_key])) -
    +
      $is_print, + 'space-y-2 my-3' => !$is_print + ]) + > @foreach($class->row_tree_nodes[$table_key] as $id => $node) @include($class->views['summary.table.row'], ['tree_level' => 0]) @endforeach diff --git a/resources/views/components/reports/summary/table/row.blade.php b/resources/views/components/reports/summary/table/row.blade.php index 6f71d7ccf..904de4eed 100644 --- a/resources/views/components/reports/summary/table/row.blade.php +++ b/resources/views/components/reports/summary/table/row.blade.php @@ -6,15 +6,25 @@ @if ($row_total = array_sum($rows)) @if (isset($parent_id)) -
    • +
    • $is_print, + 'collapse-sub' => !$is_print + ]) + data-collapse="child-{{ $parent_id }}"> @else
    • @endif -
      +
      $is_print, + 'flex justify-between border-0 m-0 p-0' => !$is_print + ]) + > @if (isset($parent_id)) -
      +
      @else -
      +
      @endif {{ $class->row_names[$table_key][$id] }}
      @@ -43,17 +53,24 @@ @if ($row_total = array_sum($parent_row_values)) @if (isset($parent_id)) -
    • +
    • $is_print, + 'collapse-sub' => !$is_print + ]) + data-collapse="child-{{ $parent_id }}"> @else
    • @endif -
      -
      +
      +
      {{ $class->row_names[$table_key][$id] }} - @if (array_sum($parent_row_values) != array_sum($class->row_values[$table_key][$id])) - + @if (!$is_print) + @if (array_sum($parent_row_values) != array_sum($class->row_values[$table_key][$id])) + + @endif @endif
      {{ $class->has_money ? money($row_total, setting('default.currency'), true) : $row_total }} @@ -64,9 +81,14 @@ @php $rows = $class->row_values[$table_key][$id]; @endphp @if (($row_total = array_sum($rows)) && array_sum($parent_row_values) != array_sum($rows)) -
    • -
      -
      +
    • $is_print, + 'collapse-sub' => !$is_print + ]) + data-collapse="child-{{ $id }}"> +
      +
      {{ $class->row_names[$table_key][$id] }}
      {{ $class->has_money ? money($row_total, setting('default.currency'), true) : $row_total }}