diff --git a/app/BulkActions/Purchases/Bills.php b/app/BulkActions/Purchases/Bills.php index a8ea511f2..8d591af7e 100644 --- a/app/BulkActions/Purchases/Bills.php +++ b/app/BulkActions/Purchases/Bills.php @@ -6,6 +6,7 @@ use App\Abstracts\BulkAction; use App\Events\Purchase\BillCancelled; use App\Events\Purchase\BillReceived; use App\Exports\Purchases\Bills as Export; +use App\Jobs\Banking\CreateDocumentTransaction; use App\Jobs\Purchase\CreateBillHistory; use App\Jobs\Purchase\DeleteBill; use App\Models\Purchase\Bill; @@ -15,6 +16,11 @@ class Bills extends BulkAction public $model = Bill::class; public $actions = [ + 'paid' => [ + 'name' => 'bills.mark_paid', + 'message' => 'bulk_actions.message.paid', + 'permission' => 'update-purchases-bills', + ], 'received' => [ 'name' => 'bills.mark_received', 'message' => 'bulk_actions.message.received', @@ -37,6 +43,15 @@ class Bills extends BulkAction ], ]; + public function paid($request) + { + $bills = $this->getSelectedRecords($request); + + foreach ($bills as $bill) { + $this->dispatch(new CreateDocumentTransaction($bill, [])); + } + } + public function received($request) { $bills = $this->getSelectedRecords($request); diff --git a/app/Console/Commands/Install.php b/app/Console/Commands/Install.php index 5e3602ea8..f18bec765 100644 --- a/app/Console/Commands/Install.php +++ b/app/Console/Commands/Install.php @@ -97,7 +97,7 @@ class Install extends Command { $missing_options = []; - $contants = [ + $constants = [ 'OPT_LOCALE', 'OPT_DB_PORT', 'OPT_DB_HOST', @@ -113,7 +113,7 @@ class Install extends Command $allowed_empty = ['db_password', 'db_prefix']; - foreach ($contants as $const) { + foreach ($constants as $const) { $option = constant("self::$const"); $property = str_replace('-', '_', $option); @@ -155,7 +155,7 @@ class Install extends Command $this->db_username = $this->ask('What is the database username?', 'root'); } - if (empty($this->db_password)) { + if (!isset($this->db_password)) { $this->db_password = $this->secret('What is the database password?', ''); } diff --git a/public/css/custom.css b/public/css/custom.css index 71312f226..daf4d6f16 100644 --- a/public/css/custom.css +++ b/public/css/custom.css @@ -774,8 +774,8 @@ table .align-items-center td span.badge { } @media (min-width: 1200px) { - .g-sidenav-show .sidenav:hover { - max-width: 250px; + .g-sidenav-show .sidenav { + max-width: 250px !important; } } diff --git a/resources/views/partials/admin/scripts.blade.php b/resources/views/partials/admin/scripts.blade.php index 62371f23b..9aa57c37f 100644 --- a/resources/views/partials/admin/scripts.blade.php +++ b/resources/views/partials/admin/scripts.blade.php @@ -32,7 +32,7 @@ function unpinSidenav() { $('.sidenav-toggler').removeClass('active'); $('.sidenav-toggler').data('action', 'sidenav-pin'); - $('body').removeClass('g-sidenav-pinned').removeClass('g-sidenav-show').addClass('g-sidenav-hidden'); + $('body').removeClass('g-sidenav-pinned').addClass('g-sidenav-hidden'); $('body').find('.backdrop').remove(); // Store the sidenav state in a cookie session