mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
Compare commits
7 Commits
dependabot
...
dom-pdf
| Author | SHA1 | Date | |
|---|---|---|---|
| ddbcad274f | |||
| 37fa96b29a | |||
| 147be77859 | |||
| 6ef2553423 | |||
| 22f6a48b5b | |||
| 897d759758 | |||
| bcd80377cf |
@ -3,7 +3,6 @@
|
|||||||
namespace Crater\Http\Controllers\V1\Customer\Estimate;
|
namespace Crater\Http\Controllers\V1\Customer\Estimate;
|
||||||
|
|
||||||
use Crater\Http\Controllers\Controller;
|
use Crater\Http\Controllers\Controller;
|
||||||
use Crater\Http\Requests\CustomerEstimateStatusRequest;
|
|
||||||
use Crater\Http\Resources\Customer\EstimateResource;
|
use Crater\Http\Resources\Customer\EstimateResource;
|
||||||
use Crater\Models\Company;
|
use Crater\Models\Company;
|
||||||
use Crater\Models\Estimate;
|
use Crater\Models\Estimate;
|
||||||
|
|||||||
@ -442,7 +442,7 @@ class Payment extends Model implements HasMedia
|
|||||||
|
|
||||||
$serial = (new SerialNumberFormatter())
|
$serial = (new SerialNumberFormatter())
|
||||||
->setModel(new Payment())
|
->setModel(new Payment())
|
||||||
->setCompany(request()->header('company'))
|
->setCompany($invoice->company_id)
|
||||||
->setCustomer($invoice->customer_id)
|
->setCustomer($invoice->customer_id)
|
||||||
->setNextNumbers();
|
->setNextNumbers();
|
||||||
|
|
||||||
@ -455,7 +455,7 @@ class Payment extends Model implements HasMedia
|
|||||||
$data['exchange_rate'] = $invoice->exchange_rate;
|
$data['exchange_rate'] = $invoice->exchange_rate;
|
||||||
$data['base_amount'] = $data['amount'] * $data['exchange_rate'];
|
$data['base_amount'] = $data['amount'] * $data['exchange_rate'];
|
||||||
$data['currency_id'] = $invoice->currency_id;
|
$data['currency_id'] = $invoice->currency_id;
|
||||||
$data['company_id'] = request()->header('company');
|
$data['company_id'] = $invoice->company_id;
|
||||||
$data['transaction_id'] = $transaction->id;
|
$data['transaction_id'] = $transaction->id;
|
||||||
|
|
||||||
$payment = Payment::create($data);
|
$payment = Payment::create($data);
|
||||||
|
|||||||
@ -36,6 +36,11 @@ class PaymentMethod extends Model
|
|||||||
return $this->belongsTo(Company::class);
|
return $this->belongsTo(Company::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function scopeWhereCompanyId($query, $id)
|
||||||
|
{
|
||||||
|
$query->where('company_id', $id);
|
||||||
|
}
|
||||||
|
|
||||||
public function scopeWhereCompany($query)
|
public function scopeWhereCompany($query)
|
||||||
{
|
{
|
||||||
$query->where('company_id', request()->header('company'));
|
$query->where('company_id', request()->header('company'));
|
||||||
@ -48,7 +53,7 @@ class PaymentMethod extends Model
|
|||||||
|
|
||||||
public function scopeWhereSearch($query, $search)
|
public function scopeWhereSearch($query, $search)
|
||||||
{
|
{
|
||||||
$query->where('name', 'LIKE', '%' . $search . '%');
|
$query->where('name', 'LIKE', '%'.$search.'%');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scopeApplyFilters($query, array $filters)
|
public function scopeApplyFilters($query, array $filters)
|
||||||
@ -88,8 +93,7 @@ class PaymentMethod extends Model
|
|||||||
|
|
||||||
public static function getSettings($id)
|
public static function getSettings($id)
|
||||||
{
|
{
|
||||||
$settings = PaymentMethod::whereCompany()
|
$settings = PaymentMethod::find($id)
|
||||||
->find($id)
|
|
||||||
->settings;
|
->settings;
|
||||||
|
|
||||||
return $settings;
|
return $settings;
|
||||||
|
|||||||
@ -10,8 +10,8 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": "^7.4 || ^8.0",
|
"php": "^7.4 || ^8.0",
|
||||||
"aws/aws-sdk-php": "^3.142",
|
"aws/aws-sdk-php": "^3.142",
|
||||||
|
"barryvdh/laravel-dompdf": "^0.9.0",
|
||||||
"crater-invoice/modules": "^1.0.0",
|
"crater-invoice/modules": "^1.0.0",
|
||||||
"barryvdh/laravel-dompdf": "^0.8.7",
|
|
||||||
"doctrine/dbal": "^2.10",
|
"doctrine/dbal": "^2.10",
|
||||||
"dragonmantank/cron-expression": "^3.1",
|
"dragonmantank/cron-expression": "^3.1",
|
||||||
"fideloper/proxy": "^4.0",
|
"fideloper/proxy": "^4.0",
|
||||||
@ -88,4 +88,4 @@
|
|||||||
"dont-discover": []
|
"dont-discover": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
67
composer.lock
generated
67
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "b4c1fd7a94025b650a89756e1140b1c0",
|
"content-hash": "bec0a5c13fb0fdf512aa6fc44ca14273",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "asm89/stack-cors",
|
"name": "asm89/stack-cors",
|
||||||
@ -114,16 +114,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "aws/aws-sdk-php",
|
"name": "aws/aws-sdk-php",
|
||||||
"version": "3.209.1",
|
"version": "3.209.2",
|
||||||
"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": "3a418a7a9beae4675685efe7bb426ee0ae338a40"
|
"reference": "77c14dd84704d2db6c5c4d6a8c1226337e4e6783"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/3a418a7a9beae4675685efe7bb426ee0ae338a40",
|
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/77c14dd84704d2db6c5c4d6a8c1226337e4e6783",
|
||||||
"reference": "3a418a7a9beae4675685efe7bb426ee0ae338a40",
|
"reference": "77c14dd84704d2db6c5c4d6a8c1226337e4e6783",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -199,33 +199,33 @@
|
|||||||
"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.209.1"
|
"source": "https://github.com/aws/aws-sdk-php/tree/3.209.2"
|
||||||
},
|
},
|
||||||
"time": "2022-01-07T19:12:55+00:00"
|
"time": "2022-01-10T19:14:32+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "barryvdh/laravel-dompdf",
|
"name": "barryvdh/laravel-dompdf",
|
||||||
"version": "v0.8.7",
|
"version": "v0.9.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/barryvdh/laravel-dompdf.git",
|
"url": "https://github.com/barryvdh/laravel-dompdf.git",
|
||||||
"reference": "30310e0a675462bf2aa9d448c8dcbf57fbcc517d"
|
"reference": "5b99e1f94157d74e450f4c97e8444fcaffa2144b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/30310e0a675462bf2aa9d448c8dcbf57fbcc517d",
|
"url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/5b99e1f94157d74e450f4c97e8444fcaffa2144b",
|
||||||
"reference": "30310e0a675462bf2aa9d448c8dcbf57fbcc517d",
|
"reference": "5b99e1f94157d74e450f4c97e8444fcaffa2144b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"dompdf/dompdf": "^0.8",
|
"dompdf/dompdf": "^1",
|
||||||
"illuminate/support": "^5.5|^6|^7|^8",
|
"illuminate/support": "^5.5|^6|^7|^8",
|
||||||
"php": ">=7"
|
"php": "^7.1 || ^8.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "0.8-dev"
|
"dev-master": "0.9-dev"
|
||||||
},
|
},
|
||||||
"laravel": {
|
"laravel": {
|
||||||
"providers": [
|
"providers": [
|
||||||
@ -259,7 +259,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/barryvdh/laravel-dompdf/issues",
|
"issues": "https://github.com/barryvdh/laravel-dompdf/issues",
|
||||||
"source": "https://github.com/barryvdh/laravel-dompdf/tree/master"
|
"source": "https://github.com/barryvdh/laravel-dompdf/tree/v0.9.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -267,7 +267,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-09-07T11:50:18+00:00"
|
"time": "2020-12-27T12:05:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
@ -1058,16 +1058,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "dompdf/dompdf",
|
"name": "dompdf/dompdf",
|
||||||
"version": "v0.8.6",
|
"version": "v1.1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/dompdf/dompdf.git",
|
"url": "https://github.com/dompdf/dompdf.git",
|
||||||
"reference": "db91d81866c69a42dad1d2926f61515a1e3f42c5"
|
"reference": "de4aad040737a89fae2129cdeb0f79c45513128d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/dompdf/dompdf/zipball/db91d81866c69a42dad1d2926f61515a1e3f42c5",
|
"url": "https://api.github.com/repos/dompdf/dompdf/zipball/de4aad040737a89fae2129cdeb0f79c45513128d",
|
||||||
"reference": "db91d81866c69a42dad1d2926f61515a1e3f42c5",
|
"reference": "de4aad040737a89fae2129cdeb0f79c45513128d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1075,11 +1075,11 @@
|
|||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"phenx/php-font-lib": "^0.5.2",
|
"phenx/php-font-lib": "^0.5.2",
|
||||||
"phenx/php-svg-lib": "^0.3.3",
|
"phenx/php-svg-lib": "^0.3.3",
|
||||||
"php": "^7.1"
|
"php": "^7.1 || ^8.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"mockery/mockery": "^1.3",
|
"mockery/mockery": "^1.3",
|
||||||
"phpunit/phpunit": "^7.5",
|
"phpunit/phpunit": "^7.5 || ^8 || ^9",
|
||||||
"squizlabs/php_codesniffer": "^3.5"
|
"squizlabs/php_codesniffer": "^3.5"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
@ -1089,11 +1089,6 @@
|
|||||||
"ext-zlib": "Needed for pdf stream compression"
|
"ext-zlib": "Needed for pdf stream compression"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-develop": "0.7-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Dompdf\\": "src/"
|
"Dompdf\\": "src/"
|
||||||
@ -1124,9 +1119,9 @@
|
|||||||
"homepage": "https://github.com/dompdf/dompdf",
|
"homepage": "https://github.com/dompdf/dompdf",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/dompdf/dompdf/issues",
|
"issues": "https://github.com/dompdf/dompdf/issues",
|
||||||
"source": "https://github.com/dompdf/dompdf/tree/master"
|
"source": "https://github.com/dompdf/dompdf/tree/v1.1.1"
|
||||||
},
|
},
|
||||||
"time": "2020-08-30T22:54:22+00:00"
|
"time": "2021-11-24T00:45:04+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "dragonmantank/cron-expression",
|
"name": "dragonmantank/cron-expression",
|
||||||
@ -11432,16 +11427,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nunomaduro/collision",
|
"name": "nunomaduro/collision",
|
||||||
"version": "v5.10.0",
|
"version": "v5.11.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nunomaduro/collision.git",
|
"url": "https://github.com/nunomaduro/collision.git",
|
||||||
"reference": "3004cfa49c022183395eabc6d0e5207dfe498d00"
|
"reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/3004cfa49c022183395eabc6d0e5207dfe498d00",
|
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/8b610eef8582ccdc05d8f2ab23305e2d37049461",
|
||||||
"reference": "3004cfa49c022183395eabc6d0e5207dfe498d00",
|
"reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -11503,7 +11498,7 @@
|
|||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L",
|
"url": "https://www.paypal.com/paypalme/enunomaduro",
|
||||||
"type": "custom"
|
"type": "custom"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -11515,7 +11510,7 @@
|
|||||||
"type": "patreon"
|
"type": "patreon"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-09-20T15:06:32+00:00"
|
"time": "2022-01-10T16:22:52+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pestphp/pest",
|
"name": "pestphp/pest",
|
||||||
@ -12412,5 +12407,5 @@
|
|||||||
"php": "^7.4 || ^8.0"
|
"php": "^7.4 || ^8.0"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"plugin-api-version": "2.1.0"
|
"plugin-api-version": "2.0.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class ChangeEnablePortalFieldOfCustomersTable extends Migration
|
|||||||
$customers = Customer::all();
|
$customers = Customer::all();
|
||||||
|
|
||||||
if ($customers) {
|
if ($customers) {
|
||||||
$customers->map(function ($customer) {
|
$customers->map(function ($customer) {
|
||||||
$customer->enable_portal = false;
|
$customer->enable_portal = false;
|
||||||
$customer->save();
|
$customer->save();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -82,16 +82,15 @@
|
|||||||
/>
|
/>
|
||||||
</MenuButton>
|
</MenuButton>
|
||||||
</template>
|
</template>
|
||||||
|
<router-link :to="{ name: 'customer.profile' }">
|
||||||
<BaseDropdownItem
|
<BaseDropdownItem>
|
||||||
@click="$router.push({ name: 'customer.profile' })"
|
<CogIcon
|
||||||
>
|
class="w-5 h-5 mr-3 text-gray-400 group-hover:text-gray-500"
|
||||||
<CogIcon
|
aria-hidden="true"
|
||||||
class="w-5 h-5 mr-3 text-gray-400 group-hover:text-gray-500"
|
/>
|
||||||
aria-hidden="true"
|
{{ $t('navigation.settings') }}
|
||||||
/>
|
</BaseDropdownItem>
|
||||||
{{ $t('navigation.settings') }}
|
</router-link>
|
||||||
</BaseDropdownItem>
|
|
||||||
|
|
||||||
<BaseDropdownItem @click="logout">
|
<BaseDropdownItem @click="logout">
|
||||||
<LogoutIcon
|
<LogoutIcon
|
||||||
|
|||||||
@ -3,10 +3,8 @@
|
|||||||
use Crater\Http\Controllers\V1\Admin\Invoice\InvoicesController;
|
use Crater\Http\Controllers\V1\Admin\Invoice\InvoicesController;
|
||||||
use Crater\Http\Requests\InvoicesRequest;
|
use Crater\Http\Requests\InvoicesRequest;
|
||||||
use Crater\Mail\SendInvoiceMail;
|
use Crater\Mail\SendInvoiceMail;
|
||||||
use Crater\Models\Company;
|
|
||||||
use Crater\Models\Invoice;
|
use Crater\Models\Invoice;
|
||||||
use Crater\Models\InvoiceItem;
|
use Crater\Models\InvoiceItem;
|
||||||
use Crater\Models\Item;
|
|
||||||
use Crater\Models\Tax;
|
use Crater\Models\Tax;
|
||||||
use Crater\Models\User;
|
use Crater\Models\User;
|
||||||
use Illuminate\Support\Facades\Artisan;
|
use Illuminate\Support\Facades\Artisan;
|
||||||
|
|||||||
@ -27,4 +27,3 @@ test('bulk exchange rate request authorize', function () {
|
|||||||
|
|
||||||
$this->assertTrue($request->authorize());
|
$this->assertTrue($request->authorize());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -23,4 +23,3 @@ test('exchange rate log request authorize', function () {
|
|||||||
|
|
||||||
$this->assertTrue($request->authorize());
|
$this->assertTrue($request->authorize());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -36,4 +36,3 @@ test('exchange rate provider request authorize', function () {
|
|||||||
|
|
||||||
$this->assertTrue($request->authorize());
|
$this->assertTrue($request->authorize());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,6 @@ test('note request validation rules', function () {
|
|||||||
'required'
|
'required'
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
$request->rules()
|
$request->rules()
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -21,7 +21,6 @@ test('profile request validation rules', function () {
|
|||||||
Rule::unique('users')->ignore(Auth::id(), 'id'),
|
Rule::unique('users')->ignore(Auth::id(), 'id'),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
$request->rules()
|
$request->rules()
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -821,9 +821,9 @@ ansi-colors@^4.1.1:
|
|||||||
integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==
|
integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==
|
||||||
|
|
||||||
ansi-regex@^5.0.0:
|
ansi-regex@^5.0.0:
|
||||||
version "5.0.1"
|
version "5.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
|
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
|
||||||
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
|
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
|
||||||
|
|
||||||
ansi-styles@^3.2.1:
|
ansi-styles@^3.2.1:
|
||||||
version "3.2.1"
|
version "3.2.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user