Merge branch 'master' of github.com:akaunting/akaunting into 2.1-dev

This commit is contained in:
Denis Duliçi 2020-10-16 15:50:03 +03:00
commit 78e6d8d5ac
4 changed files with 21 additions and 6 deletions

View File

@ -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);

View File

@ -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?', '');
}

View File

@ -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;
}
}

View File

@ -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