Skip to content

Commit

Permalink
Merge branch 'master' of github.com:akaunting/akaunting
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed May 8, 2023
2 parents e93bbee + 537c45e commit 1295cbd
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
3 changes: 1 addition & 2 deletions app/Http/Controllers/Purchases/Bills.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use App\Http\Requests\Common\Import as ImportRequest;
use App\Http\Requests\Document\Document as Request;
use App\Imports\Purchases\Bills as Import;
use App\Jobs\Banking\CreateBankingDocumentTransaction;
use App\Jobs\Document\CreateDocument;
use App\Jobs\Document\DeleteDocument;
use App\Jobs\Document\DuplicateDocument;
Expand All @@ -31,7 +30,7 @@ class Bills extends Controller
*/
public function index()
{
$bills = Document::bill()->with('contact', 'items', 'last_history', 'transactions')->collect(['issued_at' => 'desc']);
$bills = Document::bill()->with('contact', 'items', 'item_taxes', 'last_history', 'transactions')->collect(['issued_at' => 'desc']);

return $this->response('purchases.bills.index', compact('bills'));
}
Expand Down
3 changes: 1 addition & 2 deletions app/Http/Controllers/Sales/Invoices.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use App\Jobs\Document\SendDocument;
use App\Jobs\Document\UpdateDocument;
use App\Models\Document\Document;
use App\Notifications\Sale\Invoice as Notification;
use App\Traits\Documents;

class Invoices extends Controller
Expand All @@ -32,7 +31,7 @@ class Invoices extends Controller
*/
public function index()
{
$invoices = Document::invoice()->with('contact', 'items', 'last_history', 'transactions')->collect(['document_number'=> 'desc']);
$invoices = Document::invoice()->with('contact', 'items', 'item_taxes', 'last_history', 'transactions')->collect(['document_number'=> 'desc']);

return $this->response('sales.invoices.index', compact('invoices'));
}
Expand Down
23 changes: 21 additions & 2 deletions app/Utilities/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,23 @@
use App\Models\Common\Company;
use App\Models\Common\Contact;
use App\Models\Document\Document;
use App\Traits\Cloud;
use Composer\InstalledVersions;
use Illuminate\Support\Facades\DB;

class Info
{
public static function all()
{
return array_merge(static::versions(), [
static $info = [];

$is_cloud = (new class { use Cloud; })->isCloud();

if (! empty($info) || $is_cloud) {
return $info;
}

$info = array_merge(static::versions(), [
'api_key' => setting('apps.api_key'),
'ip' => static::ip(),
'companies' => Company::count(),
Expand All @@ -22,11 +31,19 @@ public static function all()
'customers' => Contact::customer()->count(),
'php_extensions' => static::phpExtensions(),
]);

return $info;
}

public static function versions()
{
return [
static $versions = [];

if (! empty($versions)) {
return $versions;
}

$versions = [
'akaunting' => version('short'),
'laravel' => InstalledVersions::getPrettyVersion('laravel/framework'),
'php' => static::phpVersion(),
Expand All @@ -35,6 +52,8 @@ public static function versions()
'livewire' => InstalledVersions::getPrettyVersion('livewire/livewire'),
'omnipay' => InstalledVersions::getPrettyVersion('league/omnipay'),
];

return $versions;
}

public static function phpVersion()
Expand Down
3 changes: 1 addition & 2 deletions app/View/Components/Documents/Form/Company.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\View\Components\Documents\Form;

use App\Abstracts\View\Components\Documents\Form as Component;
use App\Models\Common\Company as Model;

class Company extends Component
{
Expand All @@ -14,7 +13,7 @@ class Company extends Component
*/
public function render()
{
$company = Model::find(company_id());
$company = company();

$inputNameType = config('type.document.' . $this->type . '.route.parameter');

Expand Down

0 comments on commit 1295cbd

Please sign in to comment.