Refactor e_invoice props

This commit is contained in:
David Bomba 2024-05-20 17:00:34 +10:00
parent 34820bc2ea
commit 5de8aeb372
15 changed files with 146 additions and 109 deletions

View File

@ -388,7 +388,7 @@ class Company extends BaseModel
'e_invoice_certificate_passphrase' => EncryptedCast::class, 'e_invoice_certificate_passphrase' => EncryptedCast::class,
'smtp_username' => 'encrypted', 'smtp_username' => 'encrypted',
'smtp_password' => 'encrypted', 'smtp_password' => 'encrypted',
'einvoice' => 'object', 'e_invoice' => 'object',
]; ];
protected $with = []; protected $with = [];

View File

@ -28,6 +28,7 @@ use Laracasts\Presenter\PresentableTrait;
* App\Models\Credit * App\Models\Credit
* *
* @property int $id * @property int $id
* @property object|null $e_invoice
* @property int $client_id * @property int $client_id
* @property int $user_id * @property int $user_id
* @property int|null $assigned_user_id * @property int|null $assigned_user_id
@ -179,6 +180,7 @@ class Credit extends BaseModel
'created_at' => 'timestamp', 'created_at' => 'timestamp',
'deleted_at' => 'timestamp', 'deleted_at' => 'timestamp',
'is_amount_discount' => 'bool', 'is_amount_discount' => 'bool',
'e_invoice' => 'object',
]; ];

View File

@ -17,6 +17,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* App\Models\Expense * App\Models\Expense
* *
* @property int $id * @property int $id
* @property object|null $e_invoice
* @property int|null $created_at * @property int|null $created_at
* @property int|null $updated_at * @property int|null $updated_at
* @property int|null $deleted_at * @property int|null $deleted_at
@ -141,6 +142,7 @@ class Expense extends BaseModel
'updated_at' => 'timestamp', 'updated_at' => 'timestamp',
'created_at' => 'timestamp', 'created_at' => 'timestamp',
'deleted_at' => 'timestamp', 'deleted_at' => 'timestamp',
'e_invoice' => 'object',
]; ];
protected $touches = []; protected $touches = [];

View File

@ -32,6 +32,7 @@ use Laracasts\Presenter\PresentableTrait;
* App\Models\Invoice * App\Models\Invoice
* *
* @property int $id * @property int $id
* @property object|null $e_invoice
* @property int $client_id * @property int $client_id
* @property int $user_id * @property int $user_id
* @property int|null $assigned_user_id * @property int|null $assigned_user_id
@ -209,6 +210,7 @@ class Invoice extends BaseModel
'custom_surcharge_tax2' => 'bool', 'custom_surcharge_tax2' => 'bool',
'custom_surcharge_tax3' => 'bool', 'custom_surcharge_tax3' => 'bool',
'custom_surcharge_tax4' => 'bool', 'custom_surcharge_tax4' => 'bool',
'e_invoice' => 'object',
]; ];
protected $with = []; protected $with = [];

View File

@ -22,6 +22,7 @@ use Illuminate\Support\Carbon;
* App\Models\PurchaseOrder * App\Models\PurchaseOrder
* *
* @property int $id * @property int $id
* @property object|null $e_invoice
* @property int|null $client_id * @property int|null $client_id
* @property int $user_id * @property int $user_id
* @property int|null $assigned_user_id * @property int|null $assigned_user_id
@ -187,7 +188,7 @@ class PurchaseOrder extends BaseModel
'created_at' => 'timestamp', 'created_at' => 'timestamp',
'deleted_at' => 'timestamp', 'deleted_at' => 'timestamp',
'is_amount_discount' => 'bool', 'is_amount_discount' => 'bool',
'e_invoice' => 'object',
]; ];
public const STATUS_DRAFT = 1; public const STATUS_DRAFT = 1;

View File

@ -27,6 +27,7 @@ use Laracasts\Presenter\PresentableTrait;
* App\Models\Quote * App\Models\Quote
* *
* @property int $id * @property int $id
* @property object|null $e_invoice
* @property int $client_id * @property int $client_id
* @property int $user_id * @property int $user_id
* @property int|null $assigned_user_id * @property int|null $assigned_user_id
@ -174,6 +175,7 @@ class Quote extends BaseModel
'deleted_at' => 'timestamp', 'deleted_at' => 'timestamp',
'is_deleted' => 'boolean', 'is_deleted' => 'boolean',
'is_amount_discount' => 'bool', 'is_amount_discount' => 'bool',
'e_invoice' => 'object',
]; ];
public const STATUS_DRAFT = 1; public const STATUS_DRAFT = 1;

View File

@ -211,7 +211,7 @@ class CompanyTransformer extends EntityTransformer
'smtp_password' => $company->smtp_password ? '********' : '', 'smtp_password' => $company->smtp_password ? '********' : '',
'smtp_local_domain' => (string)$company->smtp_local_domain ?? '', 'smtp_local_domain' => (string)$company->smtp_local_domain ?? '',
'smtp_verify_peer' => (bool)$company->smtp_verify_peer, 'smtp_verify_peer' => (bool)$company->smtp_verify_peer,
'einvoice' => $company->einvoice ?: new \stdClass(), 'e_invoice' => $company->e_invoice ?: new \stdClass(),
]; ];
} }

View File

@ -133,6 +133,7 @@ class CreditTransformer extends EntityTransformer
'subscription_id' => $this->encodePrimaryKey($credit->subscription_id), 'subscription_id' => $this->encodePrimaryKey($credit->subscription_id),
'invoice_id' => $credit->invoice_id ? $this->encodePrimaryKey($credit->invoice_id) : '', 'invoice_id' => $credit->invoice_id ? $this->encodePrimaryKey($credit->invoice_id) : '',
'tax_info' => $credit->tax_data ?: new \stdClass(), 'tax_info' => $credit->tax_data ?: new \stdClass(),
'e_invoice' => $credit->e_invoice ?: new \stdClass(),
]; ];
} }

View File

@ -148,6 +148,8 @@ class ExpenseTransformer extends EntityTransformer
'uses_inclusive_taxes' => (bool) $expense->uses_inclusive_taxes, 'uses_inclusive_taxes' => (bool) $expense->uses_inclusive_taxes,
'calculate_tax_by_amount' => (bool) $expense->calculate_tax_by_amount, 'calculate_tax_by_amount' => (bool) $expense->calculate_tax_by_amount,
'entity_type' => 'expense', 'entity_type' => 'expense',
'e_invoice' => $expense->e_invoice ?: new \stdClass(),
]; ];
} }
} }

View File

@ -158,6 +158,8 @@ class InvoiceTransformer extends EntityTransformer
'subscription_id' => $this->encodePrimaryKey($invoice->subscription_id), 'subscription_id' => $this->encodePrimaryKey($invoice->subscription_id),
'auto_bill_enabled' => (bool) $invoice->auto_bill_enabled, 'auto_bill_enabled' => (bool) $invoice->auto_bill_enabled,
'tax_info' => $invoice->tax_data ?: new \stdClass(), 'tax_info' => $invoice->tax_data ?: new \stdClass(),
'e_invoice' => $invoice->e_invoice ?: new \stdClass(),
]; ];
if (request()->has('reminder_schedule') && request()->query('reminder_schedule') == 'true') { if (request()->has('reminder_schedule') && request()->query('reminder_schedule') == 'true') {

View File

@ -150,6 +150,8 @@ class PurchaseOrderTransformer extends EntityTransformer
'expense_id' => $this->encodePrimaryKey($purchase_order->expense_id), 'expense_id' => $this->encodePrimaryKey($purchase_order->expense_id),
'currency_id' => $purchase_order->currency_id ? (string) $purchase_order->currency_id : '', 'currency_id' => $purchase_order->currency_id ? (string) $purchase_order->currency_id : '',
'tax_info' => $purchase_order->tax_data ?: new \stdClass(), 'tax_info' => $purchase_order->tax_data ?: new \stdClass(),
'e_invoice' => $purchase_order->e_invoice ?: new \stdClass(),
]; ];
} }
} }

View File

@ -149,6 +149,8 @@ class QuoteTransformer extends EntityTransformer
'project_id' => $this->encodePrimaryKey($quote->project_id), 'project_id' => $this->encodePrimaryKey($quote->project_id),
'subscription_id' => $this->encodePrimaryKey($quote->subscription_id), 'subscription_id' => $this->encodePrimaryKey($quote->subscription_id),
'tax_info' => $quote->tax_data ?: new \stdClass(), 'tax_info' => $quote->tax_data ?: new \stdClass(),
'e_invoice' => $quote->e_invoice ?: new \stdClass(),
]; ];
} }
} }

205
composer.lock generated
View File

@ -1385,16 +1385,16 @@
}, },
{ {
"name": "aws/aws-sdk-php", "name": "aws/aws-sdk-php",
"version": "3.307.1", "version": "3.304.1",
"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": "cc79f16e1a1bd3feee421401ba2f21915abfdf91" "reference": "6dac9b3257873a807ac73f6dc4418bdc49a5d9db"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/cc79f16e1a1bd3feee421401ba2f21915abfdf91", "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/6dac9b3257873a807ac73f6dc4418bdc49a5d9db",
"reference": "cc79f16e1a1bd3feee421401ba2f21915abfdf91", "reference": "6dac9b3257873a807ac73f6dc4418bdc49a5d9db",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1474,9 +1474,9 @@
"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.307.1" "source": "https://github.com/aws/aws-sdk-php/tree/3.304.1"
}, },
"time": "2024-05-17T18:07:44+00:00" "time": "2024-04-09T19:25:27+00:00"
}, },
{ {
"name": "bacon/bacon-qr-code", "name": "bacon/bacon-qr-code",
@ -5034,12 +5034,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/invoiceninja/einvoice.git", "url": "https://github.com/invoiceninja/einvoice.git",
"reference": "b340368e889bac1009c3cb45de024d00bfb43359" "reference": "e59a4c4d06ea61da87f7cdb19dac88e4e8665454"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/invoiceninja/einvoice/zipball/b340368e889bac1009c3cb45de024d00bfb43359", "url": "https://api.github.com/repos/invoiceninja/einvoice/zipball/e59a4c4d06ea61da87f7cdb19dac88e4e8665454",
"reference": "b340368e889bac1009c3cb45de024d00bfb43359", "reference": "e59a4c4d06ea61da87f7cdb19dac88e4e8665454",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5075,7 +5075,7 @@
"source": "https://github.com/invoiceninja/einvoice/tree/main", "source": "https://github.com/invoiceninja/einvoice/tree/main",
"issues": "https://github.com/invoiceninja/einvoice/issues" "issues": "https://github.com/invoiceninja/einvoice/issues"
}, },
"time": "2024-05-20T03:57:25+00:00" "time": "2024-05-20T04:15:47+00:00"
}, },
{ {
"name": "invoiceninja/inspector", "name": "invoiceninja/inspector",
@ -6225,34 +6225,34 @@
}, },
{ {
"name": "lcobucci/clock", "name": "lcobucci/clock",
"version": "3.0.0", "version": "3.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/lcobucci/clock.git", "url": "https://github.com/lcobucci/clock.git",
"reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc" "reference": "6f28b826ea01306b07980cb8320ab30b966cd715"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/lcobucci/clock/zipball/039ef98c6b57b101d10bd11d8fdfda12cbd996dc", "url": "https://api.github.com/repos/lcobucci/clock/zipball/6f28b826ea01306b07980cb8320ab30b966cd715",
"reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc", "reference": "6f28b826ea01306b07980cb8320ab30b966cd715",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "~8.1.0 || ~8.2.0", "php": "~8.2.0 || ~8.3.0",
"psr/clock": "^1.0" "psr/clock": "^1.0"
}, },
"provide": { "provide": {
"psr/clock-implementation": "1.0" "psr/clock-implementation": "1.0"
}, },
"require-dev": { "require-dev": {
"infection/infection": "^0.26", "infection/infection": "^0.27",
"lcobucci/coding-standard": "^9.0", "lcobucci/coding-standard": "^11.0.0",
"phpstan/extension-installer": "^1.2", "phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan": "^1.9.4", "phpstan/phpstan": "^1.10.25",
"phpstan/phpstan-deprecation-rules": "^1.1.1", "phpstan/phpstan-deprecation-rules": "^1.1.3",
"phpstan/phpstan-phpunit": "^1.3.2", "phpstan/phpstan-phpunit": "^1.3.13",
"phpstan/phpstan-strict-rules": "^1.4.4", "phpstan/phpstan-strict-rules": "^1.5.1",
"phpunit/phpunit": "^9.5.27" "phpunit/phpunit": "^10.2.3"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -6273,7 +6273,7 @@
"description": "Yet another clock abstraction", "description": "Yet another clock abstraction",
"support": { "support": {
"issues": "https://github.com/lcobucci/clock/issues", "issues": "https://github.com/lcobucci/clock/issues",
"source": "https://github.com/lcobucci/clock/tree/3.0.0" "source": "https://github.com/lcobucci/clock/tree/3.2.0"
}, },
"funding": [ "funding": [
{ {
@ -6285,7 +6285,7 @@
"type": "patreon" "type": "patreon"
} }
], ],
"time": "2022-12-19T15:00:24+00:00" "time": "2023-11-17T17:00:27+00:00"
}, },
{ {
"name": "lcobucci/jwt", "name": "lcobucci/jwt",
@ -12498,20 +12498,20 @@
}, },
{ {
"name": "symfony/css-selector", "name": "symfony/css-selector",
"version": "v6.4.7", "version": "v7.0.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/css-selector.git", "url": "https://github.com/symfony/css-selector.git",
"reference": "1c5d5c2103c3762aff27a27e1e2409e30a79083b" "reference": "b08a4ad89e84b29cec285b7b1f781a7ae51cf4bc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/1c5d5c2103c3762aff27a27e1e2409e30a79083b", "url": "https://api.github.com/repos/symfony/css-selector/zipball/b08a4ad89e84b29cec285b7b1f781a7ae51cf4bc",
"reference": "1c5d5c2103c3762aff27a27e1e2409e30a79083b", "reference": "b08a4ad89e84b29cec285b7b1f781a7ae51cf4bc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1" "php": ">=8.2"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -12543,7 +12543,7 @@
"description": "Converts CSS selectors to XPath expressions", "description": "Converts CSS selectors to XPath expressions",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/css-selector/tree/v6.4.7" "source": "https://github.com/symfony/css-selector/tree/v7.0.7"
}, },
"funding": [ "funding": [
{ {
@ -12559,7 +12559,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-04-18T09:22:46+00:00" "time": "2024-04-18T09:29:19+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
@ -12705,24 +12705,24 @@
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v6.4.7", "version": "v7.0.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "d84384f3f67de3cb650db64d685d70395dacfc3f" "reference": "db2a7fab994d67d92356bb39c367db115d9d30f9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d84384f3f67de3cb650db64d685d70395dacfc3f", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/db2a7fab994d67d92356bb39c367db115d9d30f9",
"reference": "d84384f3f67de3cb650db64d685d70395dacfc3f", "reference": "db2a7fab994d67d92356bb39c367db115d9d30f9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.2",
"symfony/event-dispatcher-contracts": "^2.5|^3" "symfony/event-dispatcher-contracts": "^2.5|^3"
}, },
"conflict": { "conflict": {
"symfony/dependency-injection": "<5.4", "symfony/dependency-injection": "<6.4",
"symfony/service-contracts": "<2.5" "symfony/service-contracts": "<2.5"
}, },
"provide": { "provide": {
@ -12731,13 +12731,13 @@
}, },
"require-dev": { "require-dev": {
"psr/log": "^1|^2|^3", "psr/log": "^1|^2|^3",
"symfony/config": "^5.4|^6.0|^7.0", "symfony/config": "^6.4|^7.0",
"symfony/dependency-injection": "^5.4|^6.0|^7.0", "symfony/dependency-injection": "^6.4|^7.0",
"symfony/error-handler": "^5.4|^6.0|^7.0", "symfony/error-handler": "^6.4|^7.0",
"symfony/expression-language": "^5.4|^6.0|^7.0", "symfony/expression-language": "^6.4|^7.0",
"symfony/http-foundation": "^5.4|^6.0|^7.0", "symfony/http-foundation": "^6.4|^7.0",
"symfony/service-contracts": "^2.5|^3", "symfony/service-contracts": "^2.5|^3",
"symfony/stopwatch": "^5.4|^6.0|^7.0" "symfony/stopwatch": "^6.4|^7.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -12765,7 +12765,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v6.4.7" "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.7"
}, },
"funding": [ "funding": [
{ {
@ -12781,7 +12781,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-04-18T09:22:46+00:00" "time": "2024-04-18T09:29:19+00:00"
}, },
{ {
"name": "symfony/event-dispatcher-contracts", "name": "symfony/event-dispatcher-contracts",
@ -13351,25 +13351,25 @@
}, },
{ {
"name": "symfony/intl", "name": "symfony/intl",
"version": "v6.4.7", "version": "v7.0.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/intl.git", "url": "https://github.com/symfony/intl.git",
"reference": "9ed7dfeeba5759b61798358100bb63230509b337" "reference": "dd12042707110995e2e7d80103f8d9928bea8621"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/intl/zipball/9ed7dfeeba5759b61798358100bb63230509b337", "url": "https://api.github.com/repos/symfony/intl/zipball/dd12042707110995e2e7d80103f8d9928bea8621",
"reference": "9ed7dfeeba5759b61798358100bb63230509b337", "reference": "dd12042707110995e2e7d80103f8d9928bea8621",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1" "php": ">=8.2"
}, },
"require-dev": { "require-dev": {
"symfony/filesystem": "^5.4|^6.0|^7.0", "symfony/filesystem": "^6.4|^7.0",
"symfony/finder": "^5.4|^6.0|^7.0", "symfony/finder": "^6.4|^7.0",
"symfony/var-exporter": "^5.4|^6.0|^7.0" "symfony/var-exporter": "^6.4|^7.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -13414,7 +13414,7 @@
"localization" "localization"
], ],
"support": { "support": {
"source": "https://github.com/symfony/intl/tree/v6.4.7" "source": "https://github.com/symfony/intl/tree/v7.0.7"
}, },
"funding": [ "funding": [
{ {
@ -13430,7 +13430,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-04-18T09:22:46+00:00" "time": "2024-04-18T09:29:19+00:00"
}, },
{ {
"name": "symfony/mailer", "name": "symfony/mailer",
@ -13668,20 +13668,20 @@
}, },
{ {
"name": "symfony/options-resolver", "name": "symfony/options-resolver",
"version": "v6.4.7", "version": "v7.0.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/options-resolver.git", "url": "https://github.com/symfony/options-resolver.git",
"reference": "9a3c92b490716ba6771f5beced13c6eda7183eed" "reference": "23cc173858776ad451e31f053b1c9f47840b2cfa"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/9a3c92b490716ba6771f5beced13c6eda7183eed", "url": "https://api.github.com/repos/symfony/options-resolver/zipball/23cc173858776ad451e31f053b1c9f47840b2cfa",
"reference": "9a3c92b490716ba6771f5beced13c6eda7183eed", "reference": "23cc173858776ad451e31f053b1c9f47840b2cfa",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.2",
"symfony/deprecation-contracts": "^2.5|^3" "symfony/deprecation-contracts": "^2.5|^3"
}, },
"type": "library", "type": "library",
@ -13715,7 +13715,7 @@
"options" "options"
], ],
"support": { "support": {
"source": "https://github.com/symfony/options-resolver/tree/v6.4.7" "source": "https://github.com/symfony/options-resolver/tree/v7.0.7"
}, },
"funding": [ "funding": [
{ {
@ -13731,7 +13731,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-04-18T09:22:46+00:00" "time": "2024-04-18T09:29:19+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
@ -14916,20 +14916,20 @@
}, },
{ {
"name": "symfony/string", "name": "symfony/string",
"version": "v6.4.7", "version": "v7.0.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/string.git", "url": "https://github.com/symfony/string.git",
"reference": "ffeb9591c61f65a68d47f77d12b83fa530227a69" "reference": "e405b5424dc2528e02e31ba26b83a79fd4eb8f63"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/ffeb9591c61f65a68d47f77d12b83fa530227a69", "url": "https://api.github.com/repos/symfony/string/zipball/e405b5424dc2528e02e31ba26b83a79fd4eb8f63",
"reference": "ffeb9591c61f65a68d47f77d12b83fa530227a69", "reference": "e405b5424dc2528e02e31ba26b83a79fd4eb8f63",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.2",
"symfony/polyfill-ctype": "~1.8", "symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-grapheme": "~1.0",
"symfony/polyfill-intl-normalizer": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0",
@ -14939,11 +14939,11 @@
"symfony/translation-contracts": "<2.5" "symfony/translation-contracts": "<2.5"
}, },
"require-dev": { "require-dev": {
"symfony/error-handler": "^5.4|^6.0|^7.0", "symfony/error-handler": "^6.4|^7.0",
"symfony/http-client": "^5.4|^6.0|^7.0", "symfony/http-client": "^6.4|^7.0",
"symfony/intl": "^6.2|^7.0", "symfony/intl": "^6.4|^7.0",
"symfony/translation-contracts": "^2.5|^3.0", "symfony/translation-contracts": "^2.5|^3.0",
"symfony/var-exporter": "^5.4|^6.0|^7.0" "symfony/var-exporter": "^6.4|^7.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -14982,7 +14982,7 @@
"utf8" "utf8"
], ],
"support": { "support": {
"source": "https://github.com/symfony/string/tree/v6.4.7" "source": "https://github.com/symfony/string/tree/v7.0.7"
}, },
"funding": [ "funding": [
{ {
@ -14998,7 +14998,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-04-18T09:22:46+00:00" "time": "2024-04-18T09:29:19+00:00"
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
@ -16477,16 +16477,16 @@
}, },
{ {
"name": "brianium/paratest", "name": "brianium/paratest",
"version": "v7.3.1", "version": "v7.4.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/paratestphp/paratest.git", "url": "https://github.com/paratestphp/paratest.git",
"reference": "551f46f52a93177d873f3be08a1649ae886b4a30" "reference": "bfe354e71aca261cf37bf70bf47791081100000d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/551f46f52a93177d873f3be08a1649ae886b4a30", "url": "https://api.github.com/repos/paratestphp/paratest/zipball/bfe354e71aca261cf37bf70bf47791081100000d",
"reference": "551f46f52a93177d873f3be08a1649ae886b4a30", "reference": "bfe354e71aca261cf37bf70bf47791081100000d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -16494,28 +16494,27 @@
"ext-pcre": "*", "ext-pcre": "*",
"ext-reflection": "*", "ext-reflection": "*",
"ext-simplexml": "*", "ext-simplexml": "*",
"fidry/cpu-core-counter": "^0.5.1 || ^1.0.0", "fidry/cpu-core-counter": "^1.1.0",
"jean85/pretty-package-versions": "^2.0.5", "jean85/pretty-package-versions": "^2.0.6",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0", "php": "~8.2.0 || ~8.3.0",
"phpunit/php-code-coverage": "^10.1.7", "phpunit/php-code-coverage": "^10.1.14 || ^11.0.3",
"phpunit/php-file-iterator": "^4.1.0", "phpunit/php-file-iterator": "^4.1.0 || ^5.0.0",
"phpunit/php-timer": "^6.0", "phpunit/php-timer": "^6.0.0 || ^7.0.0",
"phpunit/phpunit": "^10.4.2", "phpunit/phpunit": "^10.5.20 || ^11.1.3",
"sebastian/environment": "^6.0.1", "sebastian/environment": "^6.1.0 || ^7.1.0",
"symfony/console": "^6.3.4 || ^7.0.0", "symfony/console": "^6.4.7 || ^7.0.7",
"symfony/process": "^6.3.4 || ^7.0.0" "symfony/process": "^6.4.7 || ^7.0.7"
}, },
"require-dev": { "require-dev": {
"doctrine/coding-standard": "^12.0.0", "doctrine/coding-standard": "^12.0.0",
"ext-pcov": "*", "ext-pcov": "*",
"ext-posix": "*", "ext-posix": "*",
"infection/infection": "^0.27.6", "phpstan/phpstan": "^1.10.67",
"phpstan/phpstan": "^1.10.40",
"phpstan/phpstan-deprecation-rules": "^1.1.4", "phpstan/phpstan-deprecation-rules": "^1.1.4",
"phpstan/phpstan-phpunit": "^1.3.15", "phpstan/phpstan-phpunit": "^1.3.16",
"phpstan/phpstan-strict-rules": "^1.5.2", "phpstan/phpstan-strict-rules": "^1.5.5",
"squizlabs/php_codesniffer": "^3.7.2", "squizlabs/php_codesniffer": "^3.9.2",
"symfony/filesystem": "^6.3.1 || ^7.0.0" "symfony/filesystem": "^6.4.3 || ^7.0.7"
}, },
"bin": [ "bin": [
"bin/paratest", "bin/paratest",
@ -16556,7 +16555,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/paratestphp/paratest/issues", "issues": "https://github.com/paratestphp/paratest/issues",
"source": "https://github.com/paratestphp/paratest/tree/v7.3.1" "source": "https://github.com/paratestphp/paratest/tree/v7.4.4"
}, },
"funding": [ "funding": [
{ {
@ -16568,7 +16567,7 @@
"type": "paypal" "type": "paypal"
} }
], ],
"time": "2023-10-31T09:24:17+00:00" "time": "2024-05-03T13:01:49+00:00"
}, },
{ {
"name": "clue/ndjson-react", "name": "clue/ndjson-react",
@ -20301,20 +20300,20 @@
}, },
{ {
"name": "symfony/stopwatch", "name": "symfony/stopwatch",
"version": "v6.4.7", "version": "v7.0.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/stopwatch.git", "url": "https://github.com/symfony/stopwatch.git",
"reference": "ffec95ba269e541eb2232126c0c20f83086b5c68" "reference": "41a7a24aa1dc82adf46a06bc292d1923acfe6b84"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/ffec95ba269e541eb2232126c0c20f83086b5c68", "url": "https://api.github.com/repos/symfony/stopwatch/zipball/41a7a24aa1dc82adf46a06bc292d1923acfe6b84",
"reference": "ffec95ba269e541eb2232126c0c20f83086b5c68", "reference": "41a7a24aa1dc82adf46a06bc292d1923acfe6b84",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.2",
"symfony/service-contracts": "^2.5|^3" "symfony/service-contracts": "^2.5|^3"
}, },
"type": "library", "type": "library",
@ -20343,7 +20342,7 @@
"description": "Provides a way to profile code", "description": "Provides a way to profile code",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/stopwatch/tree/v6.4.7" "source": "https://github.com/symfony/stopwatch/tree/v7.0.7"
}, },
"funding": [ "funding": [
{ {
@ -20359,7 +20358,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-04-18T09:22:46+00:00" "time": "2024-04-18T09:29:19+00:00"
}, },
{ {
"name": "theseer/tokenizer", "name": "theseer/tokenizer",

View File

@ -13,7 +13,27 @@ return new class extends Migration
{ {
Schema::table('companies', function (Blueprint $table) { Schema::table('companies', function (Blueprint $table) {
$table->mediumText('einvoice')->nullable(); $table->mediumText('e_invoice')->nullable();
});
Schema::table('invoices', function (Blueprint $table) {
$table->mediumText('e_invoice')->nullable();
});
Schema::table('quotes', function (Blueprint $table) {
$table->mediumText('e_invoice')->nullable();
});
Schema::table('credits', function (Blueprint $table) {
$table->mediumText('e_invoice')->nullable();
});
Schema::table('purchase_orders', function (Blueprint $table) {
$table->mediumText('e_invoice')->nullable();
});
Schema::table('expenses', function (Blueprint $table) {
$table->mediumText('e_invoice')->nullable();
}); });

View File

@ -252,7 +252,7 @@ class RandomDataSeeder extends Seeder
$invoice->service()->createInvitations()->markSent()->save(); $invoice->service()->createInvitations()->markSent()->save();
$invoice->ledger()->updateInvoiceBalance($invoice->balance); $invoice->ledger()->update_invoiceBalance($invoice->balance);
if (rand(0, 1)) { if (rand(0, 1)) {
$payment = Payment::create([ $payment = Payment::create([
@ -277,7 +277,7 @@ class RandomDataSeeder extends Seeder
event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars())); event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars()));
// $payment->service()->updateInvoicePayment($payment_hash); // $payment->service()->update_invoicePayment($payment_hash);
} }
}); });