mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
PHP CS Fixer
This commit is contained in:
parent
9b4382b451
commit
f7340d6114
@ -12,7 +12,6 @@
|
|||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
use App;
|
use App;
|
||||||
use App\DataMapper\ClientSettings;
|
|
||||||
use App\Factory\ClientContactFactory;
|
use App\Factory\ClientContactFactory;
|
||||||
use App\Factory\VendorContactFactory;
|
use App\Factory\VendorContactFactory;
|
||||||
use App\Jobs\Company\CreateCompanyToken;
|
use App\Jobs\Company\CreateCompanyToken;
|
||||||
|
@ -11,54 +11,53 @@
|
|||||||
|
|
||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
use stdClass;
|
use App\DataMapper\ClientRegistrationFields;
|
||||||
use Carbon\Carbon;
|
use App\DataMapper\CompanySettings;
|
||||||
use Faker\Factory;
|
use App\DataMapper\FeesAndLimits;
|
||||||
use App\Models\Task;
|
use App\Events\Invoice\InvoiceWasCreated;
|
||||||
use App\Models\User;
|
use App\Events\RecurringInvoice\RecurringInvoiceWasCreated;
|
||||||
use App\Utils\Ninja;
|
use App\Factory\GroupSettingFactory;
|
||||||
use App\Models\Quote;
|
use App\Factory\InvoiceFactory;
|
||||||
use App\Models\Client;
|
use App\Factory\InvoiceItemFactory;
|
||||||
use App\Models\Credit;
|
use App\Factory\RecurringInvoiceFactory;
|
||||||
use App\Models\Vendor;
|
use App\Factory\SubscriptionFactory;
|
||||||
|
use App\Helpers\Invoice\InvoiceSum;
|
||||||
|
use App\Jobs\Company\CreateCompanyTaskStatuses;
|
||||||
|
use App\Libraries\MultiDB;
|
||||||
use App\Models\Account;
|
use App\Models\Account;
|
||||||
|
use App\Models\BankIntegration;
|
||||||
|
use App\Models\BankTransaction;
|
||||||
|
use App\Models\BankTransactionRule;
|
||||||
|
use App\Models\Client;
|
||||||
|
use App\Models\ClientContact;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
|
use App\Models\CompanyGateway;
|
||||||
|
use App\Models\CompanyToken;
|
||||||
use App\Models\Country;
|
use App\Models\Country;
|
||||||
|
use App\Models\Credit;
|
||||||
use App\Models\Expense;
|
use App\Models\Expense;
|
||||||
use App\Models\Gateway;
|
|
||||||
use App\Models\Invoice;
|
use App\Models\Invoice;
|
||||||
use App\Models\Product;
|
use App\Models\Product;
|
||||||
use App\Models\Project;
|
use App\Models\Project;
|
||||||
use App\Models\TaxRate;
|
use App\Models\Quote;
|
||||||
use App\Libraries\MultiDB;
|
|
||||||
use App\Models\TaskStatus;
|
|
||||||
use App\Models\CompanyToken;
|
|
||||||
use App\Models\ClientContact;
|
|
||||||
use App\Models\VendorContact;
|
|
||||||
use App\Models\CompanyGateway;
|
|
||||||
use App\Factory\InvoiceFactory;
|
|
||||||
use App\Models\BankIntegration;
|
|
||||||
use App\Models\BankTransaction;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use Illuminate\Console\Command;
|
|
||||||
use App\Models\RecurringInvoice;
|
use App\Models\RecurringInvoice;
|
||||||
use App\DataMapper\FeesAndLimits;
|
use App\Models\Task;
|
||||||
use App\DataMapper\CompanySettings;
|
use App\Models\TaskStatus;
|
||||||
use App\Factory\InvoiceItemFactory;
|
use App\Models\TaxRate;
|
||||||
use App\Helpers\Invoice\InvoiceSum;
|
use App\Models\User;
|
||||||
use App\Models\BankTransactionRule;
|
use App\Models\Vendor;
|
||||||
use App\Factory\GroupSettingFactory;
|
use App\Models\VendorContact;
|
||||||
use App\Factory\SubscriptionFactory;
|
|
||||||
use Illuminate\Support\Facades\Hash;
|
|
||||||
use Illuminate\Support\Facades\Cache;
|
|
||||||
use App\Utils\Traits\GeneratesCounter;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use App\Repositories\InvoiceRepository;
|
use App\Repositories\InvoiceRepository;
|
||||||
use App\Factory\RecurringInvoiceFactory;
|
use App\Utils\Ninja;
|
||||||
use App\Events\Invoice\InvoiceWasCreated;
|
use App\Utils\Traits\GeneratesCounter;
|
||||||
use App\DataMapper\ClientRegistrationFields;
|
use App\Utils\Traits\MakesHash;
|
||||||
use App\Jobs\Company\CreateCompanyTaskStatuses;
|
use Carbon\Carbon;
|
||||||
use App\Events\RecurringInvoice\RecurringInvoiceWasCreated;
|
use Faker\Factory;
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
use Illuminate\Support\Facades\Cache;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use stdClass;
|
||||||
|
|
||||||
class CreateSingleAccount extends Command
|
class CreateSingleAccount extends Command
|
||||||
{
|
{
|
||||||
|
@ -11,17 +11,17 @@
|
|||||||
|
|
||||||
namespace App\Export\CSV;
|
namespace App\Export\CSV;
|
||||||
|
|
||||||
|
use App\Export\Decorators\Decorator;
|
||||||
|
use App\Libraries\MultiDB;
|
||||||
|
use App\Models\Client;
|
||||||
|
use App\Models\Company;
|
||||||
|
use App\Transformers\ClientContactTransformer;
|
||||||
|
use App\Transformers\ClientTransformer;
|
||||||
use App\Utils\Ninja;
|
use App\Utils\Ninja;
|
||||||
use App\Utils\Number;
|
use App\Utils\Number;
|
||||||
use App\Models\Client;
|
|
||||||
use League\Csv\Writer;
|
|
||||||
use App\Models\Company;
|
|
||||||
use App\Libraries\MultiDB;
|
|
||||||
use Illuminate\Support\Facades\App;
|
|
||||||
use App\Export\Decorators\Decorator;
|
|
||||||
use App\Transformers\ClientTransformer;
|
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use App\Transformers\ClientContactTransformer;
|
use Illuminate\Support\Facades\App;
|
||||||
|
use League\Csv\Writer;
|
||||||
|
|
||||||
class ClientExport extends BaseExport
|
class ClientExport extends BaseExport
|
||||||
{
|
{
|
||||||
|
@ -11,15 +11,15 @@
|
|||||||
|
|
||||||
namespace App\Export\CSV;
|
namespace App\Export\CSV;
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
use App\Export\Decorators\Decorator;
|
||||||
use League\Csv\Writer;
|
use App\Libraries\MultiDB;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use App\Models\Payment;
|
use App\Models\Payment;
|
||||||
use App\Libraries\MultiDB;
|
|
||||||
use Illuminate\Support\Facades\App;
|
|
||||||
use App\Transformers\PaymentTransformer;
|
use App\Transformers\PaymentTransformer;
|
||||||
|
use App\Utils\Ninja;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use App\Export\Decorators\Decorator;
|
use Illuminate\Support\Facades\App;
|
||||||
|
use League\Csv\Writer;
|
||||||
|
|
||||||
class PaymentExport extends BaseExport
|
class PaymentExport extends BaseExport
|
||||||
{
|
{
|
||||||
|
@ -23,8 +23,7 @@ class ClientDecorator extends Decorator implements DecoratorInterface
|
|||||||
|
|
||||||
if($entity instanceof Client) {
|
if($entity instanceof Client) {
|
||||||
$client = $entity;
|
$client = $entity;
|
||||||
}
|
} elseif($entity->client) {
|
||||||
elseif($entity->client) {
|
|
||||||
$client = $entity->client;
|
$client = $entity->client;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,109 +34,178 @@ class ClientDecorator extends Decorator implements DecoratorInterface
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function name(Client $client) {
|
public function name(Client $client)
|
||||||
|
{
|
||||||
return $client->present()->name();
|
return $client->present()->name();
|
||||||
}
|
}
|
||||||
public function number(Client $client) {
|
|
||||||
|
public function number(Client $client)
|
||||||
|
{
|
||||||
return $client->number ?? '';
|
return $client->number ?? '';
|
||||||
}
|
}
|
||||||
public function user(Client $client) {
|
|
||||||
|
public function user(Client $client)
|
||||||
|
{
|
||||||
return $client->user->present()->name();
|
return $client->user->present()->name();
|
||||||
}
|
}
|
||||||
public function assigned_user(Client $client) {
|
|
||||||
|
public function assigned_user(Client $client)
|
||||||
|
{
|
||||||
return $client->assigned_user ? $client->user->present()->name() : '';
|
return $client->assigned_user ? $client->user->present()->name() : '';
|
||||||
}
|
}
|
||||||
public function balance(Client $client) {
|
|
||||||
|
public function balance(Client $client)
|
||||||
|
{
|
||||||
return $client->balance ?? 0;
|
return $client->balance ?? 0;
|
||||||
}
|
}
|
||||||
public function paid_to_date(Client $client) {
|
|
||||||
|
public function paid_to_date(Client $client)
|
||||||
|
{
|
||||||
return $client->paid_to_date ?? 0;
|
return $client->paid_to_date ?? 0;
|
||||||
}
|
}
|
||||||
public function currency_id(Client $client) {
|
|
||||||
|
public function currency_id(Client $client)
|
||||||
|
{
|
||||||
return $client->currency() ? $client->currency()->code : $client->company->currency()->code;
|
return $client->currency() ? $client->currency()->code : $client->company->currency()->code;
|
||||||
}
|
}
|
||||||
public function website(Client $client) {
|
|
||||||
|
public function website(Client $client)
|
||||||
|
{
|
||||||
return $client->website ?? '';
|
return $client->website ?? '';
|
||||||
}
|
}
|
||||||
public function private_notes(Client $client) {
|
|
||||||
|
public function private_notes(Client $client)
|
||||||
|
{
|
||||||
return $client->private_notes ?? '';
|
return $client->private_notes ?? '';
|
||||||
}
|
}
|
||||||
public function industry_id(Client $client) {
|
|
||||||
|
public function industry_id(Client $client)
|
||||||
|
{
|
||||||
return $client->industry ? ctrans("texts.industry_{$client->industry->name}") : '';
|
return $client->industry ? ctrans("texts.industry_{$client->industry->name}") : '';
|
||||||
}
|
}
|
||||||
public function size_id(Client $client) {
|
|
||||||
|
public function size_id(Client $client)
|
||||||
|
{
|
||||||
return $client->size ? ctrans("texts.size_{$client->size->name}") : '';
|
return $client->size ? ctrans("texts.size_{$client->size->name}") : '';
|
||||||
}
|
}
|
||||||
public function phone(Client $client) {
|
|
||||||
|
public function phone(Client $client)
|
||||||
|
{
|
||||||
return $client->phone ?? '';
|
return $client->phone ?? '';
|
||||||
}
|
}
|
||||||
public function address1(Client $client) {
|
|
||||||
|
public function address1(Client $client)
|
||||||
|
{
|
||||||
return $client->address1 ?? '';
|
return $client->address1 ?? '';
|
||||||
}
|
}
|
||||||
public function address2(Client $client) {
|
|
||||||
|
public function address2(Client $client)
|
||||||
|
{
|
||||||
return $client->address2 ?? '';
|
return $client->address2 ?? '';
|
||||||
}
|
}
|
||||||
public function city(Client $client) {
|
|
||||||
|
public function city(Client $client)
|
||||||
|
{
|
||||||
return $client->city ?? '';
|
return $client->city ?? '';
|
||||||
}
|
}
|
||||||
public function state(Client $client) {
|
|
||||||
|
public function state(Client $client)
|
||||||
|
{
|
||||||
return $client->state ?? '';
|
return $client->state ?? '';
|
||||||
}
|
}
|
||||||
public function postal_code(Client $client) {
|
|
||||||
|
public function postal_code(Client $client)
|
||||||
|
{
|
||||||
return $client->postal_code ?? '';
|
return $client->postal_code ?? '';
|
||||||
}
|
}
|
||||||
public function country_id(Client $client) {
|
|
||||||
|
public function country_id(Client $client)
|
||||||
|
{
|
||||||
return $client->country ? ctrans("texts.country_{$client->country->name}") : '';
|
return $client->country ? ctrans("texts.country_{$client->country->name}") : '';
|
||||||
}
|
}
|
||||||
public function shipping_address1(Client $client) {
|
|
||||||
|
public function shipping_address1(Client $client)
|
||||||
|
{
|
||||||
return $client->shipping_address1 ?? '';
|
return $client->shipping_address1 ?? '';
|
||||||
}
|
}
|
||||||
public function shipping_address2(Client $client) {
|
|
||||||
|
public function shipping_address2(Client $client)
|
||||||
|
{
|
||||||
return $client->shipping_address2 ?? '';
|
return $client->shipping_address2 ?? '';
|
||||||
}
|
}
|
||||||
public function shipping_city(Client $client) {
|
|
||||||
|
public function shipping_city(Client $client)
|
||||||
|
{
|
||||||
return $client->shipping_city ?? '';
|
return $client->shipping_city ?? '';
|
||||||
}
|
}
|
||||||
public function shipping_state(Client $client) {
|
|
||||||
|
public function shipping_state(Client $client)
|
||||||
|
{
|
||||||
return $client->shipping_state ?? '';
|
return $client->shipping_state ?? '';
|
||||||
}
|
}
|
||||||
public function shipping_postal_code(Client $client) {
|
|
||||||
|
public function shipping_postal_code(Client $client)
|
||||||
|
{
|
||||||
return $client->shipping_postal_code ?? '';
|
return $client->shipping_postal_code ?? '';
|
||||||
}
|
}
|
||||||
public function shipping_country_id(Client $client) {
|
|
||||||
|
public function shipping_country_id(Client $client)
|
||||||
|
{
|
||||||
return $client->shipping_country ? ctrans("texts.country_{$client->shipping_country->name}") : '';
|
return $client->shipping_country ? ctrans("texts.country_{$client->shipping_country->name}") : '';
|
||||||
}
|
}
|
||||||
public function payment_terms(Client $client) {
|
|
||||||
|
public function payment_terms(Client $client)
|
||||||
|
{
|
||||||
return $client?->settings?->payment_terms ?? $client->company->settings->payment_terms;
|
return $client?->settings?->payment_terms ?? $client->company->settings->payment_terms;
|
||||||
}
|
}
|
||||||
public function vat_number(Client $client) {
|
|
||||||
|
public function vat_number(Client $client)
|
||||||
|
{
|
||||||
return $client->vat_number ?? '';
|
return $client->vat_number ?? '';
|
||||||
}
|
}
|
||||||
public function id_number(Client $client) {
|
|
||||||
|
public function id_number(Client $client)
|
||||||
|
{
|
||||||
return $client->id_number ?? '';
|
return $client->id_number ?? '';
|
||||||
}
|
}
|
||||||
public function public_notes(Client $client) {
|
|
||||||
|
public function public_notes(Client $client)
|
||||||
|
{
|
||||||
return $client->public_notes ?? '';
|
return $client->public_notes ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value1(Client $client) {
|
|
||||||
|
public function custom_value1(Client $client)
|
||||||
|
{
|
||||||
return $client->custom_value1 ?? '';
|
return $client->custom_value1 ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value2(Client $client) {
|
|
||||||
|
public function custom_value2(Client $client)
|
||||||
|
{
|
||||||
return $client->custom_value2 ?? '';
|
return $client->custom_value2 ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value3(Client $client) {
|
|
||||||
|
public function custom_value3(Client $client)
|
||||||
|
{
|
||||||
return $client->custom_value3 ?? '';
|
return $client->custom_value3 ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value4(Client $client) {
|
|
||||||
|
public function custom_value4(Client $client)
|
||||||
|
{
|
||||||
return $client->custom_value4 ?? '';
|
return $client->custom_value4 ?? '';
|
||||||
}
|
}
|
||||||
public function payment_balance(Client $client) {
|
|
||||||
|
public function payment_balance(Client $client)
|
||||||
|
{
|
||||||
return $client->payment_balance ?? 0;
|
return $client->payment_balance ?? 0;
|
||||||
}
|
}
|
||||||
public function credit_balance(Client $client) {
|
|
||||||
|
public function credit_balance(Client $client)
|
||||||
|
{
|
||||||
return $client->credit_balance ?? 0;
|
return $client->credit_balance ?? 0;
|
||||||
}
|
}
|
||||||
public function classification(Client $client) {
|
|
||||||
|
public function classification(Client $client)
|
||||||
|
{
|
||||||
ctrans("texts.{$client->classification}") ?? '';
|
ctrans("texts.{$client->classification}") ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +222,4 @@ class ClientDecorator extends Decorator implements DecoratorInterface
|
|||||||
return ctrans('texts.active');
|
return ctrans('texts.active');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -33,28 +33,36 @@ class ContactDecorator implements DecoratorInterface
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function phone(ClientContact $contact) {
|
public function phone(ClientContact $contact)
|
||||||
|
{
|
||||||
return $contact->phone ?? '';
|
return $contact->phone ?? '';
|
||||||
}
|
}
|
||||||
public function first_name(ClientContact $contact) {
|
public function first_name(ClientContact $contact)
|
||||||
|
{
|
||||||
return $contact->first_name ?? '';
|
return $contact->first_name ?? '';
|
||||||
}
|
}
|
||||||
public function last_name(ClientContact $contact) {
|
public function last_name(ClientContact $contact)
|
||||||
|
{
|
||||||
return $contact->last_name ?? '';
|
return $contact->last_name ?? '';
|
||||||
}
|
}
|
||||||
public function email(ClientContact $contact) {
|
public function email(ClientContact $contact)
|
||||||
|
{
|
||||||
return $contact->email ?? '';
|
return $contact->email ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value1(ClientContact $contact) {
|
public function custom_value1(ClientContact $contact)
|
||||||
|
{
|
||||||
return $contact->custom_value1 ?? '';
|
return $contact->custom_value1 ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value2(ClientContact $contact) {
|
public function custom_value2(ClientContact $contact)
|
||||||
|
{
|
||||||
return $contact->custom_value2 ?? '';
|
return $contact->custom_value2 ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value3(ClientContact $contact) {
|
public function custom_value3(ClientContact $contact)
|
||||||
|
{
|
||||||
return $contact->custom_value3 ?? '';
|
return $contact->custom_value3 ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value4(ClientContact $contact) {
|
public function custom_value4(ClientContact $contact)
|
||||||
|
{
|
||||||
return $contact->custom_value4 ?? '';
|
return $contact->custom_value4 ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,91 +33,120 @@ class CreditDecorator implements DecoratorInterface
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function number(Credit $credit ) {
|
public function number(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->number ?? '';
|
return $credit->number ?? '';
|
||||||
}
|
}
|
||||||
public function amount(Credit $credit ) {
|
public function amount(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->amount ?? 0;
|
return $credit->amount ?? 0;
|
||||||
}
|
}
|
||||||
public function balance(Credit $credit ) {
|
public function balance(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->balance ?? 0;
|
return $credit->balance ?? 0;
|
||||||
}
|
}
|
||||||
public function paid_to_date(Credit $credit ) {
|
public function paid_to_date(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->paid_to_date ?? 0;
|
return $credit->paid_to_date ?? 0;
|
||||||
}
|
}
|
||||||
public function po_number(Credit $credit ) {
|
public function po_number(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->po_number ?? '';
|
return $credit->po_number ?? '';
|
||||||
}
|
}
|
||||||
public function date(Credit $credit ) {
|
public function date(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->date ?? '';
|
return $credit->date ?? '';
|
||||||
}
|
}
|
||||||
public function due_date(Credit $credit ) {
|
public function due_date(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->due_date ?? '';
|
return $credit->due_date ?? '';
|
||||||
}
|
}
|
||||||
public function terms(Credit $credit ) {
|
public function terms(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->terms ?? '';
|
return $credit->terms ?? '';
|
||||||
}
|
}
|
||||||
public function discount(Credit $credit ) {
|
public function discount(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->discount ?? 0;
|
return $credit->discount ?? 0;
|
||||||
}
|
}
|
||||||
public function footer(Credit $credit ) {
|
public function footer(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->footer ?? '';
|
return $credit->footer ?? '';
|
||||||
}
|
}
|
||||||
public function status(Credit $credit ) {
|
public function status(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->stringStatus($credit->status_id);
|
return $credit->stringStatus($credit->status_id);
|
||||||
}
|
}
|
||||||
public function public_notes(Credit $credit ) {
|
public function public_notes(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->public_notes ?? '';
|
return $credit->public_notes ?? '';
|
||||||
}
|
}
|
||||||
public function private_notes(Credit $credit ) {
|
public function private_notes(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->private_notes ?? '';
|
return $credit->private_notes ?? '';
|
||||||
}
|
}
|
||||||
public function uses_inclusive_taxes(Credit $credit ) {
|
public function uses_inclusive_taxes(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->uses_inclusive_taxes ? ctrans('texts.yes') : ctrans('texts.no');
|
return $credit->uses_inclusive_taxes ? ctrans('texts.yes') : ctrans('texts.no');
|
||||||
}
|
}
|
||||||
public function is_amount_discount(Credit $credit ) {
|
public function is_amount_discount(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->is_amount_discount ? ctrans('texts.yes') : ctrans('texts.no');
|
return $credit->is_amount_discount ? ctrans('texts.yes') : ctrans('texts.no');
|
||||||
}
|
}
|
||||||
public function partial(Credit $credit ) {
|
public function partial(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->partial ?? 0;
|
return $credit->partial ?? 0;
|
||||||
}
|
}
|
||||||
public function partial_due_date(Credit $credit ) {
|
public function partial_due_date(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->partial_due_date ?? '';
|
return $credit->partial_due_date ?? '';
|
||||||
}
|
}
|
||||||
public function custom_surcharge1(Credit $credit ) {
|
public function custom_surcharge1(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->custom_surcharge1 ?? 0;
|
return $credit->custom_surcharge1 ?? 0;
|
||||||
}
|
}
|
||||||
public function custom_surcharge2(Credit $credit ) {
|
public function custom_surcharge2(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->custom_surcharge2 ?? 0;
|
return $credit->custom_surcharge2 ?? 0;
|
||||||
}
|
}
|
||||||
public function custom_surcharge3(Credit $credit ) {
|
public function custom_surcharge3(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->custom_surcharge3 ?? 0;
|
return $credit->custom_surcharge3 ?? 0;
|
||||||
}
|
}
|
||||||
public function custom_surcharge4(Credit $credit ) {
|
public function custom_surcharge4(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->custom_surcharge4 ?? 0;
|
return $credit->custom_surcharge4 ?? 0;
|
||||||
}
|
}
|
||||||
public function custom_value1(Credit $credit ) {
|
public function custom_value1(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->custom_value1 ?? '';
|
return $credit->custom_value1 ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value2(Credit $credit ) {
|
public function custom_value2(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->custom_value2 ?? '';
|
return $credit->custom_value2 ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value3(Credit $credit ) {
|
public function custom_value3(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->custom_value3 ?? '';
|
return $credit->custom_value3 ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value4(Credit $credit ) {
|
public function custom_value4(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->custom_value4 ?? '';
|
return $credit->custom_value4 ?? '';
|
||||||
}
|
}
|
||||||
public function exchange_rate(Credit $credit ) {
|
public function exchange_rate(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->exchange_rate ?? 0;
|
return $credit->exchange_rate ?? 0;
|
||||||
}
|
}
|
||||||
public function total_taxes(Credit $credit ) {
|
public function total_taxes(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->total_taxes ?? 0;
|
return $credit->total_taxes ?? 0;
|
||||||
}
|
}
|
||||||
public function assigned_user_id(Credit $credit ) {
|
public function assigned_user_id(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->assigned_user ? $credit->assigned_user->present()->name(): '';
|
return $credit->assigned_user ? $credit->assigned_user->present()->name(): '';
|
||||||
}
|
}
|
||||||
public function user_id(Credit $credit ) {
|
public function user_id(Credit $credit)
|
||||||
|
{
|
||||||
return $credit->user ? $credit->user->present()->name(): '';
|
return $credit->user ? $credit->user->present()->name(): '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,22 +11,8 @@
|
|||||||
|
|
||||||
namespace App\Export\Decorators;
|
namespace App\Export\Decorators;
|
||||||
|
|
||||||
|
class Decorator implements DecoratorInterface
|
||||||
use App\Models\Task;
|
{
|
||||||
use App\Models\Quote;
|
|
||||||
use App\Models\Client;
|
|
||||||
use App\Models\Credit;
|
|
||||||
use App\Models\Vendor;
|
|
||||||
use App\Models\Expense;
|
|
||||||
use App\Models\Invoice;
|
|
||||||
use App\Models\Payment;
|
|
||||||
use App\Models\Product;
|
|
||||||
use App\Models\Project;
|
|
||||||
use App\Models\PurchaseOrder;
|
|
||||||
use App\Models\RecurringInvoice;
|
|
||||||
use App\Export\Decorators\DecoratorInterface;
|
|
||||||
|
|
||||||
class Decorator implements DecoratorInterface{
|
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace App\Export\Decorators;
|
namespace App\Export\Decorators;
|
||||||
|
|
||||||
interface DecoratorInterface {
|
interface DecoratorInterface
|
||||||
|
{
|
||||||
public function transform(string $key, mixed $entity): mixed;
|
public function transform(string $key, mixed $entity): mixed;
|
||||||
}
|
}
|
||||||
|
@ -33,100 +33,132 @@ class ExpenseDecorator implements DecoratorInterface
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function amount(Expense $expense) {
|
public function amount(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->amount ?? 0;
|
return $expense->amount ?? 0;
|
||||||
}
|
}
|
||||||
public function category_id(Expense $expense) {
|
public function category_id(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->category ? $expense->category->name : '';
|
return $expense->category ? $expense->category->name : '';
|
||||||
}
|
}
|
||||||
public function client_id(Expense $expense) {
|
public function client_id(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->client ? $expense->client->present()->name() : '';
|
return $expense->client ? $expense->client->present()->name() : '';
|
||||||
}
|
}
|
||||||
public function custom_value1(Expense $expense) {
|
public function custom_value1(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->custom_value1 ?? '';
|
return $expense->custom_value1 ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value2(Expense $expense) {
|
public function custom_value2(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->custom_value2 ?? '';
|
return $expense->custom_value2 ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value3(Expense $expense) {
|
public function custom_value3(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->custom_value3 ?? '';
|
return $expense->custom_value3 ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value4(Expense $expense) {
|
public function custom_value4(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->custom_value4 ?? '';
|
return $expense->custom_value4 ?? '';
|
||||||
}
|
}
|
||||||
public function currency_id(Expense $expense) {
|
public function currency_id(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->currency ? $expense->currency->code : $expense->company->currency()->code;
|
return $expense->currency ? $expense->currency->code : $expense->company->currency()->code;
|
||||||
}
|
}
|
||||||
public function date(Expense $expense) {
|
public function date(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->date ?? '';
|
return $expense->date ?? '';
|
||||||
}
|
}
|
||||||
public function exchange_rate(Expense $expense) {
|
public function exchange_rate(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->exchange_rate ?? 0;
|
return $expense->exchange_rate ?? 0;
|
||||||
}
|
}
|
||||||
public function foreign_amount(Expense $expense) {
|
public function foreign_amount(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->foreign_amount ?? 0;
|
return $expense->foreign_amount ?? 0;
|
||||||
}
|
}
|
||||||
public function invoice_currency_id(Expense $expense) {
|
public function invoice_currency_id(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->invoice_currency ? $expense->invoice_currency->code : $expense->company->currency()->code;
|
return $expense->invoice_currency ? $expense->invoice_currency->code : $expense->company->currency()->code;
|
||||||
}
|
}
|
||||||
public function payment_date(Expense $expense) {
|
public function payment_date(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->payment_date ?? '';
|
return $expense->payment_date ?? '';
|
||||||
}
|
}
|
||||||
public function number(Expense $expense) {
|
public function number(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->number ?? '';
|
return $expense->number ?? '';
|
||||||
}
|
}
|
||||||
public function payment_type_id(Expense $expense) {
|
public function payment_type_id(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->payment_type ? $expense->payment_type->name : '';
|
return $expense->payment_type ? $expense->payment_type->name : '';
|
||||||
}
|
}
|
||||||
public function private_notes(Expense $expense) {
|
public function private_notes(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->private_notes ?? '';
|
return $expense->private_notes ?? '';
|
||||||
}
|
}
|
||||||
public function project_id(Expense $expense) {
|
public function project_id(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->project ? $expense->project->name : '';
|
return $expense->project ? $expense->project->name : '';
|
||||||
}
|
}
|
||||||
public function public_notes(Expense $expense) {
|
public function public_notes(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->public_notes ?? '';
|
return $expense->public_notes ?? '';
|
||||||
}
|
}
|
||||||
public function tax_amount1(Expense $expense) {
|
public function tax_amount1(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->tax_amount1 ?? 0;
|
return $expense->tax_amount1 ?? 0;
|
||||||
}
|
}
|
||||||
public function tax_amount2(Expense $expense) {
|
public function tax_amount2(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->tax_amount2 ?? 0;
|
return $expense->tax_amount2 ?? 0;
|
||||||
}
|
}
|
||||||
public function tax_amount3(Expense $expense) {
|
public function tax_amount3(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->tax_amount3 ?? 0;
|
return $expense->tax_amount3 ?? 0;
|
||||||
}
|
}
|
||||||
public function tax_name1(Expense $expense) {
|
public function tax_name1(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->tax_name1 ?? '';
|
return $expense->tax_name1 ?? '';
|
||||||
}
|
}
|
||||||
public function tax_name2(Expense $expense) {
|
public function tax_name2(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->tax_name2 ?? '';
|
return $expense->tax_name2 ?? '';
|
||||||
}
|
}
|
||||||
public function tax_name3(Expense $expense) {
|
public function tax_name3(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->tax_name3 ?? '';
|
return $expense->tax_name3 ?? '';
|
||||||
}
|
}
|
||||||
public function tax_rate1(Expense $expense) {
|
public function tax_rate1(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->tax_rate1 ?? 0;
|
return $expense->tax_rate1 ?? 0;
|
||||||
}
|
}
|
||||||
public function tax_rate2(Expense $expense) {
|
public function tax_rate2(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->tax_rate2 ?? 0;
|
return $expense->tax_rate2 ?? 0;
|
||||||
}
|
}
|
||||||
public function tax_rate3(Expense $expense) {
|
public function tax_rate3(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->tax_rate3 ?? 0;
|
return $expense->tax_rate3 ?? 0;
|
||||||
}
|
}
|
||||||
public function transaction_reference(Expense $expense) {
|
public function transaction_reference(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->transaction_reference ?? '';
|
return $expense->transaction_reference ?? '';
|
||||||
}
|
}
|
||||||
public function vendor_id(Expense $expense) {
|
public function vendor_id(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->vendor ? $expense->vendor->name : '';
|
return $expense->vendor ? $expense->vendor->name : '';
|
||||||
}
|
}
|
||||||
public function invoice_id(Expense $expense) {
|
public function invoice_id(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->invoice ? $expense->invoice->number : '';
|
return $expense->invoice ? $expense->invoice->number : '';
|
||||||
}
|
}
|
||||||
public function user(Expense $expense) {
|
public function user(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->user ? $expense->user->present()->name() : '';
|
return $expense->user ? $expense->user->present()->name() : '';
|
||||||
}
|
}
|
||||||
public function assigned_user(Expense $expense) {
|
public function assigned_user(Expense $expense)
|
||||||
|
{
|
||||||
return $expense->assigned_user ? $expense->assigned_user->present()->name() : '';
|
return $expense->assigned_user ? $expense->assigned_user->present()->name() : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,119 +33,153 @@ class InvoiceDecorator extends Decorator implements DecoratorInterface
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function number(Invoice $invoice)
|
||||||
public function number(Invoice $invoice) {
|
{
|
||||||
return $invoice->number ?? '';
|
return $invoice->number ?? '';
|
||||||
}
|
}
|
||||||
public function amount(Invoice $invoice) {
|
public function amount(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->amount ?? 0;
|
return $invoice->amount ?? 0;
|
||||||
}
|
}
|
||||||
public function balance(Invoice $invoice) {
|
public function balance(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->balance ?? 0;
|
return $invoice->balance ?? 0;
|
||||||
}
|
}
|
||||||
public function paid_to_date(Invoice $invoice) {
|
public function paid_to_date(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->paid_to_date ?? 0;
|
return $invoice->paid_to_date ?? 0;
|
||||||
}
|
}
|
||||||
public function po_number(Invoice $invoice) {
|
public function po_number(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->po_number ?? '';
|
return $invoice->po_number ?? '';
|
||||||
}
|
}
|
||||||
public function date(Invoice $invoice) {
|
public function date(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->date ?? '';
|
return $invoice->date ?? '';
|
||||||
}
|
}
|
||||||
public function due_date(Invoice $invoice) {
|
public function due_date(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->due_date ?? '';
|
return $invoice->due_date ?? '';
|
||||||
}
|
}
|
||||||
public function terms(Invoice $invoice) {
|
public function terms(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->terms ?? '';
|
return $invoice->terms ?? '';
|
||||||
}
|
}
|
||||||
public function footer(Invoice $invoice) {
|
public function footer(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->footer ?? '';
|
return $invoice->footer ?? '';
|
||||||
}
|
}
|
||||||
public function status(Invoice $invoice) {
|
public function status(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->stringStatus($invoice->status_id);
|
return $invoice->stringStatus($invoice->status_id);
|
||||||
}
|
}
|
||||||
public function public_notes(Invoice $invoice) {
|
public function public_notes(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->public_notes ?? '';
|
return $invoice->public_notes ?? '';
|
||||||
}
|
}
|
||||||
public function private_notes(Invoice $invoice) {
|
public function private_notes(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->private_notes ?? '';
|
return $invoice->private_notes ?? '';
|
||||||
}
|
}
|
||||||
public function uses_inclusive_taxes(Invoice $invoice) {
|
public function uses_inclusive_taxes(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->uses_inclusive_taxes ? ctrans('texts.yes') : ctrans('texts.no');
|
return $invoice->uses_inclusive_taxes ? ctrans('texts.yes') : ctrans('texts.no');
|
||||||
}
|
}
|
||||||
public function is_amount_discount(Invoice $invoice) {
|
public function is_amount_discount(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->is_amount_discount ? ctrans('texts.yes') : ctrans('texts.no');
|
return $invoice->is_amount_discount ? ctrans('texts.yes') : ctrans('texts.no');
|
||||||
}
|
}
|
||||||
public function discount(Invoice $invoice) {
|
public function discount(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->discount ?? 0;
|
return $invoice->discount ?? 0;
|
||||||
}
|
}
|
||||||
public function partial(Invoice $invoice) {
|
public function partial(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->partial ?? 0;
|
return $invoice->partial ?? 0;
|
||||||
}
|
}
|
||||||
public function partial_due_date(Invoice $invoice) {
|
public function partial_due_date(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->partial_due_date ?? '';
|
return $invoice->partial_due_date ?? '';
|
||||||
}
|
}
|
||||||
public function custom_surcharge1(Invoice $invoice) {
|
public function custom_surcharge1(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->custom_surcharge1 ?? 0;
|
return $invoice->custom_surcharge1 ?? 0;
|
||||||
}
|
}
|
||||||
public function custom_surcharge2(Invoice $invoice) {
|
public function custom_surcharge2(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->custom_surcharge2 ?? 0;
|
return $invoice->custom_surcharge2 ?? 0;
|
||||||
}
|
}
|
||||||
public function custom_surcharge3(Invoice $invoice) {
|
public function custom_surcharge3(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->custom_surcharge3 ?? 0;
|
return $invoice->custom_surcharge3 ?? 0;
|
||||||
}
|
}
|
||||||
public function custom_surcharge4(Invoice $invoice) {
|
public function custom_surcharge4(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->custom_surcharge4 ?? 0;
|
return $invoice->custom_surcharge4 ?? 0;
|
||||||
}
|
}
|
||||||
public function exchange_rate(Invoice $invoice) {
|
public function exchange_rate(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->exchange_rate ?? 0;
|
return $invoice->exchange_rate ?? 0;
|
||||||
}
|
}
|
||||||
public function total_taxes(Invoice $invoice) {
|
public function total_taxes(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->total_taxes ?? 0;
|
return $invoice->total_taxes ?? 0;
|
||||||
}
|
}
|
||||||
public function assigned_user_id(Invoice $invoice) {
|
public function assigned_user_id(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->assigned_user ? $invoice->assigned_user->present()->name(): '';
|
return $invoice->assigned_user ? $invoice->assigned_user->present()->name(): '';
|
||||||
}
|
}
|
||||||
public function user_id(Invoice $invoice) {
|
public function user_id(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->user ? $invoice->user->present()->name(): '';
|
return $invoice->user ? $invoice->user->present()->name(): '';
|
||||||
}
|
}
|
||||||
public function custom_value1(Invoice $invoice) {
|
public function custom_value1(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->custom_value1 ?? '';
|
return $invoice->custom_value1 ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value2(Invoice $invoice) {
|
public function custom_value2(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->custom_value2 ?? '';
|
return $invoice->custom_value2 ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value3(Invoice $invoice) {
|
public function custom_value3(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->custom_value3 ?? '';
|
return $invoice->custom_value3 ?? '';
|
||||||
}
|
}
|
||||||
public function custom_value4(Invoice $invoice) {
|
public function custom_value4(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->custom_value4 ?? '';
|
return $invoice->custom_value4 ?? '';
|
||||||
}
|
}
|
||||||
public function tax_name1(Invoice $invoice) {
|
public function tax_name1(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->tax_name1 ?? '';
|
return $invoice->tax_name1 ?? '';
|
||||||
}
|
}
|
||||||
public function tax_name2(Invoice $invoice) {
|
public function tax_name2(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->tax_name2 ?? '';
|
return $invoice->tax_name2 ?? '';
|
||||||
}
|
}
|
||||||
public function tax_name3(Invoice $invoice) {
|
public function tax_name3(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->tax_name3 ?? '';
|
return $invoice->tax_name3 ?? '';
|
||||||
}
|
}
|
||||||
public function tax_rate1(Invoice $invoice) {
|
public function tax_rate1(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->tax_rate1 ?? 0;
|
return $invoice->tax_rate1 ?? 0;
|
||||||
}
|
}
|
||||||
public function tax_rate2(Invoice $invoice) {
|
public function tax_rate2(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->tax_rate2 ?? 0;
|
return $invoice->tax_rate2 ?? 0;
|
||||||
}
|
}
|
||||||
public function tax_rate3(Invoice $invoice) {
|
public function tax_rate3(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->tax_rate3 ?? 0;
|
return $invoice->tax_rate3 ?? 0;
|
||||||
}
|
}
|
||||||
public function recurring_id(Invoice $invoice) {
|
public function recurring_id(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->recurring_invoice ? $invoice->recurring_invoice->number : '';
|
return $invoice->recurring_invoice ? $invoice->recurring_invoice->number : '';
|
||||||
}
|
}
|
||||||
public function auto_bill_enabled(Invoice $invoice) {
|
public function auto_bill_enabled(Invoice $invoice)
|
||||||
|
{
|
||||||
return $invoice->auto_bill_enabled ? ctrans('texts.yes') : ctrans('texts.no');
|
return $invoice->auto_bill_enabled ? ctrans('texts.yes') : ctrans('texts.no');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,8 @@ namespace App\Export\Decorators;
|
|||||||
|
|
||||||
use App\Models\Payment;
|
use App\Models\Payment;
|
||||||
|
|
||||||
class PaymentDecorator extends Decorator implements DecoratorInterface{
|
class PaymentDecorator extends Decorator implements DecoratorInterface
|
||||||
|
{
|
||||||
|
|
||||||
private $entity_key = 'payment';
|
private $entity_key = 'payment';
|
||||||
|
|
||||||
@ -23,18 +24,15 @@ class PaymentDecorator extends Decorator implements DecoratorInterface{
|
|||||||
|
|
||||||
if($entity instanceof Payment) {
|
if($entity instanceof Payment) {
|
||||||
$payment = $entity;
|
$payment = $entity;
|
||||||
}
|
} elseif($entity->payment) {
|
||||||
elseif($entity->payment) {
|
|
||||||
$payment = $entity->payment;
|
$payment = $entity->payment;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($key == 'amount' && (!$entity instanceof Payment)) {
|
if($key == 'amount' && (!$entity instanceof Payment)) {
|
||||||
return $entity->payments()->exists() ? $entity->payments()->withoutTrashed()->sum('paymentables.amount') : ctrans('texts.unpaid');
|
return $entity->payments()->exists() ? $entity->payments()->withoutTrashed()->sum('paymentables.amount') : ctrans('texts.unpaid');
|
||||||
}
|
} elseif($key == 'refunded' && (!$entity instanceof Payment)) {
|
||||||
elseif($key == 'refunded' && (!$entity instanceof Payment)) {
|
|
||||||
return $entity->payments()->exists() ? $entity->payments()->withoutTrashed()->sum('paymentables.refunded') : '';
|
return $entity->payments()->exists() ? $entity->payments()->withoutTrashed()->sum('paymentables.refunded') : '';
|
||||||
}
|
} elseif($key == 'applied' && (!$entity instanceof Payment)) {
|
||||||
elseif($key == 'applied' && (!$entity instanceof Payment)) {
|
|
||||||
$refunded = $entity->payments()->withoutTrashed()->sum('paymentables.refunded');
|
$refunded = $entity->payments()->withoutTrashed()->sum('paymentables.refunded');
|
||||||
$amount = $entity->payments()->withoutTrashed()->sum('paymentables.amount');
|
$amount = $entity->payments()->withoutTrashed()->sum('paymentables.amount');
|
||||||
return $entity->payments()->withoutTrashed()->exists() ? ($amount - $refunded) : '';
|
return $entity->payments()->withoutTrashed()->exists() ? ($amount - $refunded) : '';
|
||||||
@ -47,95 +45,118 @@ class PaymentDecorator extends Decorator implements DecoratorInterface{
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function date(Payment $payment) {
|
public function date(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->date ?? '';
|
return $payment->date ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function amount(Payment $payment) {
|
public function amount(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->amount ?? '';
|
return $payment->amount ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function refunded(Payment $payment) {
|
public function refunded(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->refunded ?? '';
|
return $payment->refunded ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applied(Payment $payment) {
|
public function applied(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->applied ?? '';
|
return $payment->applied ?? '';
|
||||||
}
|
}
|
||||||
public function transaction_reference(Payment $payment) {
|
public function transaction_reference(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->transaction_reference ?? '';
|
return $payment->transaction_reference ?? '';
|
||||||
}
|
}
|
||||||
public function currency(Payment $payment) {
|
public function currency(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->currency()->exists() ? $payment->currency->code : $payment->company->currency()->code;
|
return $payment->currency()->exists() ? $payment->currency->code : $payment->company->currency()->code;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function exchange_rate(Payment $payment) {
|
public function exchange_rate(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->exchange_rate ?? 1;
|
return $payment->exchange_rate ?? 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function number(Payment $payment) {
|
public function number(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->number ?? '';
|
return $payment->number ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function method(Payment $payment) {
|
public function method(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->translatedType();
|
return $payment->translatedType();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function status(Payment $payment) {
|
public function status(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->stringStatus($payment->status_id);
|
return $payment->stringStatus($payment->status_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function private_notes(Payment $payment) {
|
public function private_notes(Payment $payment)
|
||||||
|
{
|
||||||
return strip_tags($payment->private_notes) ?? '';
|
return strip_tags($payment->private_notes) ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function custom_value1(Payment $payment) {
|
public function custom_value1(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->custom_value1 ?? '';
|
return $payment->custom_value1 ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function custom_value2(Payment $payment) {
|
public function custom_value2(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->custom_value2 ?? '';
|
return $payment->custom_value2 ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function custom_value3(Payment $payment) {
|
public function custom_value3(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->custom_value3 ?? '';
|
return $payment->custom_value3 ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function custom_value4(Payment $payment) {
|
public function custom_value4(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->custom_value4 ?? '';
|
return $payment->custom_value4 ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function user_id(Payment $payment) {
|
public function user_id(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->user ? $payment->user->present()->name() : '';
|
return $payment->user ? $payment->user->present()->name() : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function assigned_user_id(Payment $payment) {
|
public function assigned_user_id(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->assigned_user ? $payment->assigned_user->present()->name() : '';
|
return $payment->assigned_user ? $payment->assigned_user->present()->name() : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function project_id(Payment $payment) {
|
public function project_id(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->project()->exists() ? $payment->project->name : '';
|
return $payment->project()->exists() ? $payment->project->name : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////
|
///////////////////////////////////////////////////
|
||||||
|
|
||||||
public function vendor_id(Payment $payment){
|
public function vendor_id(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->vendor()->exists() ? $payment->vendor->name : '';
|
return $payment->vendor()->exists() ? $payment->vendor->name : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function exchange_currency(Payment $payment){
|
public function exchange_currency(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->exchange_currency()->exists() ? $payment->exchange_currency->code : '';
|
return $payment->exchange_currency()->exists() ? $payment->exchange_currency->code : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function gateway_type_id(Payment $payment) {
|
public function gateway_type_id(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->gateway_type ? $payment->gateway_type->name : 'Unknown Type';
|
return $payment->gateway_type ? $payment->gateway_type->name : 'Unknown Type';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function client_id(Payment $payment) {
|
public function client_id(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->client->present()->name();
|
return $payment->client->present()->name();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function type_id(Payment $payment) {
|
public function type_id(Payment $payment)
|
||||||
|
{
|
||||||
return $payment->translatedType();
|
return $payment->translatedType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,9 +27,9 @@ class ProductDecorator implements DecoratorInterface
|
|||||||
|
|
||||||
if($product && method_exists($this, $key)) {
|
if($product && method_exists($this, $key)) {
|
||||||
return $this->{$key}($product);
|
return $this->{$key}($product);
|
||||||
}
|
} elseif($product->{$key}) {
|
||||||
elseif($product->{$key})
|
|
||||||
return $product->{$key} ?? '';
|
return $product->{$key} ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
@ -46,7 +46,8 @@ class ProductDecorator implements DecoratorInterface
|
|||||||
public const PRODUCT_TYPE_ZERO_RATED = 8;
|
public const PRODUCT_TYPE_ZERO_RATED = 8;
|
||||||
public const PRODUCT_TYPE_REVERSE_TAX = 9;
|
public const PRODUCT_TYPE_REVERSE_TAX = 9;
|
||||||
*/
|
*/
|
||||||
public function tax_category(Product $product) {
|
public function tax_category(Product $product)
|
||||||
|
{
|
||||||
|
|
||||||
$category = ctrans('texts.physical_goods');
|
$category = ctrans('texts.physical_goods');
|
||||||
|
|
||||||
@ -67,6 +68,3 @@ class ProductDecorator implements DecoratorInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,19 +27,21 @@ class PurchaseOrderDecorator extends Decorator implements DecoratorInterface
|
|||||||
|
|
||||||
if($purchase_order && method_exists($this, $key)) {
|
if($purchase_order && method_exists($this, $key)) {
|
||||||
return $this->{$key}($purchase_order);
|
return $this->{$key}($purchase_order);
|
||||||
}
|
} elseif($purchase_order->{$key}) {
|
||||||
elseif($purchase_order->{$key})
|
|
||||||
return $purchase_order->{$key} ?? '';
|
return $purchase_order->{$key} ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function status(PurchaseOrder $purchase_order) {
|
public function status(PurchaseOrder $purchase_order)
|
||||||
|
{
|
||||||
return $purchase_order->stringStatus($purchase_order->status_id);
|
return $purchase_order->stringStatus($purchase_order->status_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function currency_id(PurchaseOrder $purchase_order) {
|
public function currency_id(PurchaseOrder $purchase_order)
|
||||||
|
{
|
||||||
return $purchase_order->currency ? $purchase_order->currency->code : $purchase_order->company->currency()->code;
|
return $purchase_order->currency ? $purchase_order->currency->code : $purchase_order->company->currency()->code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,21 +35,29 @@ class QuoteDecorator extends Decorator implements DecoratorInterface
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function status(Quote $quote) {
|
public function status(Quote $quote)
|
||||||
|
{
|
||||||
return $quote->stringStatus($quote->status_id);
|
return $quote->stringStatus($quote->status_id);
|
||||||
}
|
}
|
||||||
public function uses_inclusive_taxes(Quote $quote) {
|
|
||||||
|
public function uses_inclusive_taxes(Quote $quote)
|
||||||
|
{
|
||||||
return $quote->uses_inclusive_taxes ? ctrans('texts.yes') : ctrans('texts.no');
|
return $quote->uses_inclusive_taxes ? ctrans('texts.yes') : ctrans('texts.no');
|
||||||
}
|
}
|
||||||
public function is_amount_discount(Quote $quote) {
|
|
||||||
|
public function is_amount_discount(Quote $quote)
|
||||||
|
{
|
||||||
return $quote->is_amount_discount ? ctrans('texts.yes') : ctrans('texts.no');
|
return $quote->is_amount_discount ? ctrans('texts.yes') : ctrans('texts.no');
|
||||||
}
|
}
|
||||||
public function assigned_user_id(Quote $quote) {
|
|
||||||
|
public function assigned_user_id(Quote $quote)
|
||||||
|
{
|
||||||
return $quote->assigned_user ? $quote->assigned_user->present()->name() : '';
|
return $quote->assigned_user ? $quote->assigned_user->present()->name() : '';
|
||||||
}
|
}
|
||||||
public function user_id(Quote $quote) {
|
|
||||||
|
public function user_id(Quote $quote)
|
||||||
|
{
|
||||||
return $quote->user->present()->name();
|
return $quote->user->present()->name();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,28 +35,43 @@ class RecurringInvoiceDecorator extends Decorator implements DecoratorInterface
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function status(RecurringInvoice $recurring_invoice) {
|
public function status(RecurringInvoice $recurring_invoice)
|
||||||
|
{
|
||||||
return $recurring_invoice->stringStatus($recurring_invoice->status_id);
|
return $recurring_invoice->stringStatus($recurring_invoice->status_id);
|
||||||
}
|
}
|
||||||
public function uses_inclusive_taxes(RecurringInvoice $recurring_invoice) {
|
|
||||||
|
public function uses_inclusive_taxes(RecurringInvoice $recurring_invoice)
|
||||||
|
{
|
||||||
return $recurring_invoice->uses_inclusive_taxes ? ctrans('texts.yes') : ctrans('texts.no');
|
return $recurring_invoice->uses_inclusive_taxes ? ctrans('texts.yes') : ctrans('texts.no');
|
||||||
}
|
}
|
||||||
public function is_amount_discount(RecurringInvoice $recurring_invoice) {
|
|
||||||
|
public function is_amount_discount(RecurringInvoice $recurring_invoice)
|
||||||
|
{
|
||||||
return $recurring_invoice->is_amount_discount ? ctrans('texts.yes') : ctrans('texts.no');
|
return $recurring_invoice->is_amount_discount ? ctrans('texts.yes') : ctrans('texts.no');
|
||||||
}
|
}
|
||||||
public function assigned_user_id(RecurringInvoice $recurring_invoice) {
|
|
||||||
|
public function assigned_user_id(RecurringInvoice $recurring_invoice)
|
||||||
|
{
|
||||||
return $recurring_invoice->assigned_user ? $recurring_invoice->assigned_user->present()->name() : '';
|
return $recurring_invoice->assigned_user ? $recurring_invoice->assigned_user->present()->name() : '';
|
||||||
}
|
}
|
||||||
public function user_id(RecurringInvoice $recurring_invoice) {
|
|
||||||
|
public function user_id(RecurringInvoice $recurring_invoice)
|
||||||
|
{
|
||||||
return $recurring_invoice->user->present()->name() ?? '';
|
return $recurring_invoice->user->present()->name() ?? '';
|
||||||
}
|
}
|
||||||
public function frequency_id(RecurringInvoice $recurring_invoice) {
|
|
||||||
|
public function frequency_id(RecurringInvoice $recurring_invoice)
|
||||||
|
{
|
||||||
return $recurring_invoice->frequency_id ? $recurring_invoice->frequencyForKey($recurring_invoice->frequency_id) : '';
|
return $recurring_invoice->frequency_id ? $recurring_invoice->frequencyForKey($recurring_invoice->frequency_id) : '';
|
||||||
}
|
}
|
||||||
public function auto_bill(RecurringInvoice $recurring_invoice) {
|
|
||||||
|
public function auto_bill(RecurringInvoice $recurring_invoice)
|
||||||
|
{
|
||||||
return $recurring_invoice->auto_bill ? ctrans("texts.{$recurring_invoice->auto_bill}") : '';
|
return $recurring_invoice->auto_bill ? ctrans("texts.{$recurring_invoice->auto_bill}") : '';
|
||||||
}
|
}
|
||||||
public function auto_bill_enabled(RecurringInvoice $recurring_invoice) {
|
|
||||||
|
public function auto_bill_enabled(RecurringInvoice $recurring_invoice)
|
||||||
|
{
|
||||||
return $recurring_invoice->auto_bill_enabled ? ctrans('texts.yes') : ctrans('texts.no');
|
return $recurring_invoice->auto_bill_enabled ? ctrans('texts.yes') : ctrans('texts.no');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,10 +11,10 @@
|
|||||||
|
|
||||||
namespace App\Export\Decorators;
|
namespace App\Export\Decorators;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use App\Models\DateFormat;
|
||||||
use App\Models\Task;
|
use App\Models\Task;
|
||||||
use App\Models\Timezone;
|
use App\Models\Timezone;
|
||||||
use App\Models\DateFormat;
|
use Carbon\Carbon;
|
||||||
|
|
||||||
class TaskDecorator extends Decorator implements DecoratorInterface
|
class TaskDecorator extends Decorator implements DecoratorInterface
|
||||||
{
|
{
|
||||||
@ -38,7 +38,8 @@ class TaskDecorator extends Decorator implements DecoratorInterface
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function start_date(Task $task){
|
public function start_date(Task $task)
|
||||||
|
{
|
||||||
|
|
||||||
$timezone = Timezone::find($task->company->settings->timezone_id);
|
$timezone = Timezone::find($task->company->settings->timezone_id);
|
||||||
$timezone_name = 'US/Eastern';
|
$timezone_name = 'US/Eastern';
|
||||||
@ -66,7 +67,8 @@ class TaskDecorator extends Decorator implements DecoratorInterface
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function end_date(Task $task){
|
public function end_date(Task $task)
|
||||||
|
{
|
||||||
|
|
||||||
$timezone = Timezone::find($task->company->settings->timezone_id);
|
$timezone = Timezone::find($task->company->settings->timezone_id);
|
||||||
$timezone_name = 'US/Eastern';
|
$timezone_name = 'US/Eastern';
|
||||||
@ -93,13 +95,18 @@ class TaskDecorator extends Decorator implements DecoratorInterface
|
|||||||
return '';
|
return '';
|
||||||
|
|
||||||
}
|
}
|
||||||
public function duration(Task $task){
|
public function duration(Task $task)
|
||||||
|
{
|
||||||
return $task->calcDuration();
|
return $task->calcDuration();
|
||||||
}
|
}
|
||||||
public function status_id(Task $task){
|
|
||||||
|
public function status_id(Task $task)
|
||||||
|
{
|
||||||
return $task->status()->exists() ? $task->status->name : '';
|
return $task->status()->exists() ? $task->status->name : '';
|
||||||
}
|
}
|
||||||
public function project_id(Task $task){
|
|
||||||
|
public function project_id(Task $task)
|
||||||
|
{
|
||||||
return $task->project()->exists() ? $task->project->name : '';
|
return $task->project()->exists() ? $task->project->name : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,9 +27,9 @@ class VendorContactDecorator implements DecoratorInterface
|
|||||||
|
|
||||||
if($contact && method_exists($this, $key)) {
|
if($contact && method_exists($this, $key)) {
|
||||||
return $this->{$key}($contact);
|
return $this->{$key}($contact);
|
||||||
}
|
} elseif($contact->{$key}) {
|
||||||
elseif($contact->{$key})
|
|
||||||
return $contact->{$key} ?? '';
|
return $contact->{$key} ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
|
@ -35,16 +35,23 @@ class VendorDecorator extends Decorator implements DecoratorInterface
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function country_id(Vendor $vendor){
|
public function country_id(Vendor $vendor)
|
||||||
|
{
|
||||||
return $vendor->country ? $vendor->country->name : '';
|
return $vendor->country ? $vendor->country->name : '';
|
||||||
}
|
}
|
||||||
public function name(Vendor $vendor){
|
|
||||||
|
public function name(Vendor $vendor)
|
||||||
|
{
|
||||||
return $vendor->present()->name();
|
return $vendor->present()->name();
|
||||||
}
|
}
|
||||||
public function currency(Vendor $vendor){
|
|
||||||
|
public function currency(Vendor $vendor)
|
||||||
|
{
|
||||||
return $vendor->currency_id ? $vendor->currency()->code : $vendor->company->currency()->code;
|
return $vendor->currency_id ? $vendor->currency()->code : $vendor->company->currency()->code;
|
||||||
}
|
}
|
||||||
public function classification(Vendor $vendor) {
|
|
||||||
|
public function classification(Vendor $vendor)
|
||||||
|
{
|
||||||
ctrans("texts.{$vendor->classification}") ?? '';
|
ctrans("texts.{$vendor->classification}") ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,13 +11,13 @@
|
|||||||
|
|
||||||
namespace App\Factory;
|
namespace App\Factory;
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
|
||||||
use App\Models\Company;
|
|
||||||
use App\Libraries\MultiDB;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\DataMapper\Tax\TaxModel;
|
|
||||||
use App\DataMapper\CompanySettings;
|
|
||||||
use App\DataMapper\ClientRegistrationFields;
|
use App\DataMapper\ClientRegistrationFields;
|
||||||
|
use App\DataMapper\CompanySettings;
|
||||||
|
use App\DataMapper\Tax\TaxModel;
|
||||||
|
use App\Libraries\MultiDB;
|
||||||
|
use App\Models\Company;
|
||||||
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
|
||||||
class CompanyFactory
|
class CompanyFactory
|
||||||
{
|
{
|
||||||
|
@ -529,8 +529,7 @@ class LoginController extends BaseController
|
|||||||
$user = $google->getTokenResponse(request()->input('id_token'));
|
$user = $google->getTokenResponse(request()->input('id_token'));
|
||||||
} elseif(request()->has('access_token')) {
|
} elseif(request()->has('access_token')) {
|
||||||
$user = $google->harvestUser(request()->input('access_token'));
|
$user = $google->harvestUser(request()->input('access_token'));
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return response()->json(['message' => 'Illegal request'], 403);
|
return response()->json(['message' => 'Illegal request'], 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,37 +11,37 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
|
||||||
use App\Models\Client;
|
|
||||||
use App\Models\Account;
|
|
||||||
use App\Models\Company;
|
|
||||||
use App\Models\SystemLog;
|
|
||||||
use Postmark\PostmarkClient;
|
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use App\Factory\ClientFactory;
|
|
||||||
use App\Filters\ClientFilters;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Utils\Traits\Uploadable;
|
|
||||||
use App\Utils\Traits\BulkOptions;
|
|
||||||
use App\Jobs\Client\UpdateTaxData;
|
|
||||||
use App\Utils\Traits\SavesDocuments;
|
|
||||||
use App\Repositories\ClientRepository;
|
|
||||||
use App\Events\Client\ClientWasCreated;
|
use App\Events\Client\ClientWasCreated;
|
||||||
use App\Events\Client\ClientWasUpdated;
|
use App\Events\Client\ClientWasUpdated;
|
||||||
use App\Transformers\ClientTransformer;
|
use App\Factory\ClientFactory;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use App\Filters\ClientFilters;
|
||||||
use App\Services\Template\TemplateAction;
|
|
||||||
use App\Jobs\PostMark\ProcessPostmarkWebhook;
|
|
||||||
use App\Http\Requests\Client\BulkClientRequest;
|
use App\Http\Requests\Client\BulkClientRequest;
|
||||||
use App\Http\Requests\Client\EditClientRequest;
|
|
||||||
use App\Http\Requests\Client\ShowClientRequest;
|
|
||||||
use App\Http\Requests\Client\PurgeClientRequest;
|
|
||||||
use App\Http\Requests\Client\StoreClientRequest;
|
|
||||||
use App\Http\Requests\Client\CreateClientRequest;
|
use App\Http\Requests\Client\CreateClientRequest;
|
||||||
|
use App\Http\Requests\Client\DestroyClientRequest;
|
||||||
|
use App\Http\Requests\Client\EditClientRequest;
|
||||||
|
use App\Http\Requests\Client\PurgeClientRequest;
|
||||||
|
use App\Http\Requests\Client\ReactivateClientEmailRequest;
|
||||||
|
use App\Http\Requests\Client\ShowClientRequest;
|
||||||
|
use App\Http\Requests\Client\StoreClientRequest;
|
||||||
use App\Http\Requests\Client\UpdateClientRequest;
|
use App\Http\Requests\Client\UpdateClientRequest;
|
||||||
use App\Http\Requests\Client\UploadClientRequest;
|
use App\Http\Requests\Client\UploadClientRequest;
|
||||||
use App\Http\Requests\Client\DestroyClientRequest;
|
use App\Jobs\Client\UpdateTaxData;
|
||||||
use App\Http\Requests\Client\ReactivateClientEmailRequest;
|
use App\Jobs\PostMark\ProcessPostmarkWebhook;
|
||||||
|
use App\Models\Account;
|
||||||
|
use App\Models\Client;
|
||||||
|
use App\Models\Company;
|
||||||
|
use App\Models\SystemLog;
|
||||||
|
use App\Repositories\ClientRepository;
|
||||||
|
use App\Services\Template\TemplateAction;
|
||||||
|
use App\Transformers\ClientTransformer;
|
||||||
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\Traits\BulkOptions;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use App\Utils\Traits\SavesDocuments;
|
||||||
|
use App\Utils\Traits\Uploadable;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
use Postmark\PostmarkClient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ClientController.
|
* Class ClientController.
|
||||||
|
@ -30,7 +30,6 @@ use Illuminate\Contracts\View\Factory;
|
|||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
use Illuminate\View\View;
|
use Illuminate\View\View;
|
||||||
|
|
||||||
class InvoiceController extends Controller
|
class InvoiceController extends Controller
|
||||||
|
@ -206,11 +206,11 @@ class CompanyGatewayController extends BaseController
|
|||||||
|
|
||||||
$fees_and_limits = $company_gateway->fees_and_limits;
|
$fees_and_limits = $company_gateway->fees_and_limits;
|
||||||
|
|
||||||
foreach($gateway_types as $key => $gateway_type)
|
foreach($gateway_types as $key => $gateway_type) {
|
||||||
{
|
if(!property_exists($fees_and_limits, $key)) {
|
||||||
if(!property_exists($fees_and_limits, $key))
|
|
||||||
$fees_and_limits->{$key} = new FeesAndLimits;
|
$fees_and_limits->{$key} = new FeesAndLimits;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$company_gateway->fees_and_limits = $fees_and_limits;
|
$company_gateway->fees_and_limits = $fees_and_limits;
|
||||||
$company_gateway->save();
|
$company_gateway->save();
|
||||||
|
@ -11,36 +11,36 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
|
||||||
use App\Models\Client;
|
|
||||||
use App\Models\Credit;
|
|
||||||
use App\Models\Account;
|
|
||||||
use App\Models\Invoice;
|
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use App\Factory\CreditFactory;
|
|
||||||
use App\Filters\CreditFilters;
|
|
||||||
use App\Jobs\Credit\ZipCredits;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Jobs\Entity\EmailEntity;
|
|
||||||
use App\Factory\CloneCreditFactory;
|
|
||||||
use App\Services\PdfMaker\PdfMerge;
|
|
||||||
use Illuminate\Support\Facades\App;
|
|
||||||
use App\Utils\Traits\SavesDocuments;
|
|
||||||
use App\Repositories\CreditRepository;
|
|
||||||
use App\Events\Credit\CreditWasCreated;
|
use App\Events\Credit\CreditWasCreated;
|
||||||
use App\Events\Credit\CreditWasUpdated;
|
use App\Events\Credit\CreditWasUpdated;
|
||||||
use App\Transformers\CreditTransformer;
|
use App\Factory\CloneCreditFactory;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use App\Factory\CreditFactory;
|
||||||
use App\Services\Template\TemplateAction;
|
use App\Filters\CreditFilters;
|
||||||
|
use App\Http\Requests\Credit\ActionCreditRequest;
|
||||||
use App\Http\Requests\Credit\BulkCreditRequest;
|
use App\Http\Requests\Credit\BulkCreditRequest;
|
||||||
|
use App\Http\Requests\Credit\CreateCreditRequest;
|
||||||
|
use App\Http\Requests\Credit\DestroyCreditRequest;
|
||||||
use App\Http\Requests\Credit\EditCreditRequest;
|
use App\Http\Requests\Credit\EditCreditRequest;
|
||||||
use App\Http\Requests\Credit\ShowCreditRequest;
|
use App\Http\Requests\Credit\ShowCreditRequest;
|
||||||
use App\Http\Requests\Credit\StoreCreditRequest;
|
use App\Http\Requests\Credit\StoreCreditRequest;
|
||||||
use App\Http\Requests\Credit\ActionCreditRequest;
|
|
||||||
use App\Http\Requests\Credit\CreateCreditRequest;
|
|
||||||
use App\Http\Requests\Credit\UpdateCreditRequest;
|
use App\Http\Requests\Credit\UpdateCreditRequest;
|
||||||
use App\Http\Requests\Credit\UploadCreditRequest;
|
use App\Http\Requests\Credit\UploadCreditRequest;
|
||||||
use App\Http\Requests\Credit\DestroyCreditRequest;
|
use App\Jobs\Credit\ZipCredits;
|
||||||
|
use App\Jobs\Entity\EmailEntity;
|
||||||
|
use App\Models\Account;
|
||||||
|
use App\Models\Client;
|
||||||
|
use App\Models\Credit;
|
||||||
|
use App\Models\Invoice;
|
||||||
|
use App\Repositories\CreditRepository;
|
||||||
|
use App\Services\PdfMaker\PdfMerge;
|
||||||
|
use App\Services\Template\TemplateAction;
|
||||||
|
use App\Transformers\CreditTransformer;
|
||||||
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use App\Utils\Traits\SavesDocuments;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreditController.
|
* Class CreditController.
|
||||||
|
@ -71,8 +71,9 @@ class EmailController extends BaseController
|
|||||||
|
|
||||||
if ($request->cc_email && (Ninja::isSelfHost() || $user->account->isPaidHostedClient())) {
|
if ($request->cc_email && (Ninja::isSelfHost() || $user->account->isPaidHostedClient())) {
|
||||||
|
|
||||||
foreach($request->cc_email as $email)
|
foreach($request->cc_email as $email) {
|
||||||
$mo->cc[] = new Address($email);
|
$mo->cc[] = new Address($email);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,28 +11,28 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
|
||||||
use App\Models\Account;
|
|
||||||
use App\Models\Expense;
|
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use App\Factory\ExpenseFactory;
|
|
||||||
use App\Filters\ExpenseFilters;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Utils\Traits\Uploadable;
|
|
||||||
use App\Utils\Traits\BulkOptions;
|
|
||||||
use App\Utils\Traits\SavesDocuments;
|
|
||||||
use App\Repositories\ExpenseRepository;
|
|
||||||
use App\Transformers\ExpenseTransformer;
|
|
||||||
use App\Events\Expense\ExpenseWasCreated;
|
use App\Events\Expense\ExpenseWasCreated;
|
||||||
use App\Events\Expense\ExpenseWasUpdated;
|
use App\Events\Expense\ExpenseWasUpdated;
|
||||||
|
use App\Factory\ExpenseFactory;
|
||||||
|
use App\Filters\ExpenseFilters;
|
||||||
use App\Http\Requests\Expense\BulkExpenseRequest;
|
use App\Http\Requests\Expense\BulkExpenseRequest;
|
||||||
|
use App\Http\Requests\Expense\CreateExpenseRequest;
|
||||||
|
use App\Http\Requests\Expense\DestroyExpenseRequest;
|
||||||
use App\Http\Requests\Expense\EditExpenseRequest;
|
use App\Http\Requests\Expense\EditExpenseRequest;
|
||||||
use App\Http\Requests\Expense\ShowExpenseRequest;
|
use App\Http\Requests\Expense\ShowExpenseRequest;
|
||||||
use App\Http\Requests\Expense\StoreExpenseRequest;
|
use App\Http\Requests\Expense\StoreExpenseRequest;
|
||||||
use App\Http\Requests\Expense\CreateExpenseRequest;
|
|
||||||
use App\Http\Requests\Expense\UpdateExpenseRequest;
|
use App\Http\Requests\Expense\UpdateExpenseRequest;
|
||||||
use App\Http\Requests\Expense\UploadExpenseRequest;
|
use App\Http\Requests\Expense\UploadExpenseRequest;
|
||||||
use App\Http\Requests\Expense\DestroyExpenseRequest;
|
use App\Models\Account;
|
||||||
|
use App\Models\Expense;
|
||||||
|
use App\Repositories\ExpenseRepository;
|
||||||
|
use App\Transformers\ExpenseTransformer;
|
||||||
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\Traits\BulkOptions;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use App\Utils\Traits\SavesDocuments;
|
||||||
|
use App\Utils\Traits\Uploadable;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ExpenseController.
|
* Class ExpenseController.
|
||||||
|
@ -11,27 +11,27 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
use App\Events\Payment\PaymentWasUpdated;
|
||||||
use App\Models\Account;
|
|
||||||
use App\Models\Payment;
|
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use App\Factory\PaymentFactory;
|
use App\Factory\PaymentFactory;
|
||||||
use App\Filters\PaymentFilters;
|
use App\Filters\PaymentFilters;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Http\Requests\Payment\BulkActionPaymentRequest;
|
||||||
use App\Utils\Traits\SavesDocuments;
|
use App\Http\Requests\Payment\CreatePaymentRequest;
|
||||||
use App\Repositories\PaymentRepository;
|
use App\Http\Requests\Payment\DestroyPaymentRequest;
|
||||||
use App\Transformers\PaymentTransformer;
|
|
||||||
use App\Events\Payment\PaymentWasUpdated;
|
|
||||||
use App\Services\Template\TemplateAction;
|
|
||||||
use App\Http\Requests\Payment\EditPaymentRequest;
|
use App\Http\Requests\Payment\EditPaymentRequest;
|
||||||
|
use App\Http\Requests\Payment\RefundPaymentRequest;
|
||||||
use App\Http\Requests\Payment\ShowPaymentRequest;
|
use App\Http\Requests\Payment\ShowPaymentRequest;
|
||||||
use App\Http\Requests\Payment\StorePaymentRequest;
|
use App\Http\Requests\Payment\StorePaymentRequest;
|
||||||
use App\Http\Requests\Payment\CreatePaymentRequest;
|
|
||||||
use App\Http\Requests\Payment\RefundPaymentRequest;
|
|
||||||
use App\Http\Requests\Payment\UpdatePaymentRequest;
|
use App\Http\Requests\Payment\UpdatePaymentRequest;
|
||||||
use App\Http\Requests\Payment\UploadPaymentRequest;
|
use App\Http\Requests\Payment\UploadPaymentRequest;
|
||||||
use App\Http\Requests\Payment\DestroyPaymentRequest;
|
use App\Models\Account;
|
||||||
use App\Http\Requests\Payment\BulkActionPaymentRequest;
|
use App\Models\Payment;
|
||||||
|
use App\Repositories\PaymentRepository;
|
||||||
|
use App\Services\Template\TemplateAction;
|
||||||
|
use App\Transformers\PaymentTransformer;
|
||||||
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use App\Utils\Traits\SavesDocuments;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class PaymentController.
|
* Class PaymentController.
|
||||||
|
@ -11,33 +11,31 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
|
||||||
use App\Models\Client;
|
|
||||||
use App\Models\Invoice;
|
|
||||||
use App\Utils\HtmlEngine;
|
|
||||||
use Twig\Error\SyntaxError;
|
|
||||||
use App\Jobs\Util\PreviewPdf;
|
|
||||||
use App\Models\ClientContact;
|
|
||||||
use App\Services\Pdf\PdfMock;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Services\Pdf\PdfService;
|
|
||||||
use App\Utils\PhantomJS\Phantom;
|
|
||||||
use App\Models\InvoiceInvitation;
|
|
||||||
use App\Services\PdfMaker\Design;
|
|
||||||
use App\Utils\HostedPDF\NinjaPdf;
|
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
use App\Services\PdfMaker\PdfMaker;
|
|
||||||
use Illuminate\Support\Facades\App;
|
|
||||||
use App\Utils\Traits\MakesInvoiceHtml;
|
|
||||||
use Turbo124\Beacon\Facades\LightLogs;
|
|
||||||
use App\Utils\Traits\Pdf\PageNumbering;
|
|
||||||
use Illuminate\Support\Facades\Response;
|
|
||||||
use App\DataMapper\Analytics\LivePreview;
|
use App\DataMapper\Analytics\LivePreview;
|
||||||
use App\Services\Template\TemplateService;
|
|
||||||
use App\Http\Requests\Preview\DesignPreviewRequest;
|
use App\Http\Requests\Preview\DesignPreviewRequest;
|
||||||
use App\Services\PdfMaker\Design as PdfDesignModel;
|
|
||||||
use App\Services\PdfMaker\Design as PdfMakerDesign;
|
|
||||||
use App\Http\Requests\Preview\PreviewInvoiceRequest;
|
use App\Http\Requests\Preview\PreviewInvoiceRequest;
|
||||||
|
use App\Jobs\Util\PreviewPdf;
|
||||||
|
use App\Models\Client;
|
||||||
|
use App\Models\ClientContact;
|
||||||
|
use App\Models\Invoice;
|
||||||
|
use App\Models\InvoiceInvitation;
|
||||||
|
use App\Services\Pdf\PdfMock;
|
||||||
|
use App\Services\Pdf\PdfService;
|
||||||
|
use App\Services\PdfMaker\Design;
|
||||||
|
use App\Services\PdfMaker\PdfMaker;
|
||||||
|
use App\Services\Template\TemplateService;
|
||||||
|
use App\Utils\HostedPDF\NinjaPdf;
|
||||||
|
use App\Utils\HtmlEngine;
|
||||||
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\PhantomJS\Phantom;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use App\Utils\Traits\MakesInvoiceHtml;
|
||||||
|
use App\Utils\Traits\Pdf\PageNumbering;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Response;
|
||||||
|
use Turbo124\Beacon\Facades\LightLogs;
|
||||||
|
use Twig\Error\SyntaxError;
|
||||||
|
|
||||||
class PreviewController extends BaseController
|
class PreviewController extends BaseController
|
||||||
{
|
{
|
||||||
|
@ -11,33 +11,33 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
|
||||||
use App\Models\Client;
|
|
||||||
use App\Models\Vendor;
|
|
||||||
use App\Libraries\MultiDB;
|
|
||||||
use App\Jobs\Util\PreviewPdf;
|
|
||||||
use App\Models\PurchaseOrder;
|
|
||||||
use App\Models\VendorContact;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Utils\VendorHtmlEngine;
|
|
||||||
use App\Services\Pdf\PdfService;
|
|
||||||
use App\Utils\PhantomJS\Phantom;
|
|
||||||
use App\Services\PdfMaker\Design;
|
|
||||||
use App\Utils\HostedPDF\NinjaPdf;
|
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
use App\Services\PdfMaker\PdfMaker;
|
|
||||||
use Illuminate\Support\Facades\App;
|
|
||||||
use App\Factory\PurchaseOrderFactory;
|
|
||||||
use App\Utils\Traits\MakesInvoiceHtml;
|
|
||||||
use Turbo124\Beacon\Facades\LightLogs;
|
|
||||||
use App\Models\PurchaseOrderInvitation;
|
|
||||||
use App\Utils\Traits\Pdf\PageNumbering;
|
|
||||||
use Illuminate\Support\Facades\Response;
|
|
||||||
use App\DataMapper\Analytics\LivePreview;
|
use App\DataMapper\Analytics\LivePreview;
|
||||||
|
use App\Factory\PurchaseOrderFactory;
|
||||||
|
use App\Http\Requests\Preview\PreviewPurchaseOrderRequest;
|
||||||
|
use App\Jobs\Util\PreviewPdf;
|
||||||
|
use App\Libraries\MultiDB;
|
||||||
|
use App\Models\Client;
|
||||||
|
use App\Models\PurchaseOrder;
|
||||||
|
use App\Models\PurchaseOrderInvitation;
|
||||||
|
use App\Models\Vendor;
|
||||||
|
use App\Models\VendorContact;
|
||||||
use App\Repositories\PurchaseOrderRepository;
|
use App\Repositories\PurchaseOrderRepository;
|
||||||
|
use App\Services\Pdf\PdfService;
|
||||||
|
use App\Services\PdfMaker\Design;
|
||||||
use App\Services\PdfMaker\Design as PdfDesignModel;
|
use App\Services\PdfMaker\Design as PdfDesignModel;
|
||||||
use App\Services\PdfMaker\Design as PdfMakerDesign;
|
use App\Services\PdfMaker\Design as PdfMakerDesign;
|
||||||
use App\Http\Requests\Preview\PreviewPurchaseOrderRequest;
|
use App\Services\PdfMaker\PdfMaker;
|
||||||
|
use App\Utils\HostedPDF\NinjaPdf;
|
||||||
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\PhantomJS\Phantom;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use App\Utils\Traits\MakesInvoiceHtml;
|
||||||
|
use App\Utils\Traits\Pdf\PageNumbering;
|
||||||
|
use App\Utils\VendorHtmlEngine;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Response;
|
||||||
|
use Turbo124\Beacon\Facades\LightLogs;
|
||||||
|
|
||||||
class PreviewPurchaseOrderController extends BaseController
|
class PreviewPurchaseOrderController extends BaseController
|
||||||
{
|
{
|
||||||
|
@ -11,25 +11,25 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Models\Account;
|
|
||||||
use App\Models\Project;
|
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use App\Factory\ProjectFactory;
|
use App\Factory\ProjectFactory;
|
||||||
use App\Filters\ProjectFilters;
|
use App\Filters\ProjectFilters;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Http\Requests\Project\BulkProjectRequest;
|
||||||
use App\Utils\Traits\SavesDocuments;
|
use App\Http\Requests\Project\CreateProjectRequest;
|
||||||
use App\Utils\Traits\GeneratesCounter;
|
use App\Http\Requests\Project\DestroyProjectRequest;
|
||||||
use App\Repositories\ProjectRepository;
|
|
||||||
use App\Transformers\ProjectTransformer;
|
|
||||||
use App\Services\Template\TemplateAction;
|
|
||||||
use App\Http\Requests\Project\EditProjectRequest;
|
use App\Http\Requests\Project\EditProjectRequest;
|
||||||
use App\Http\Requests\Project\ShowProjectRequest;
|
use App\Http\Requests\Project\ShowProjectRequest;
|
||||||
use App\Http\Requests\Project\StoreProjectRequest;
|
use App\Http\Requests\Project\StoreProjectRequest;
|
||||||
use App\Http\Requests\Project\CreateProjectRequest;
|
|
||||||
use App\Http\Requests\Project\UpdateProjectRequest;
|
use App\Http\Requests\Project\UpdateProjectRequest;
|
||||||
use App\Http\Requests\Project\UploadProjectRequest;
|
use App\Http\Requests\Project\UploadProjectRequest;
|
||||||
use App\Http\Requests\Project\DestroyProjectRequest;
|
use App\Models\Account;
|
||||||
use App\Http\Requests\Project\BulkProjectRequest;
|
use App\Models\Project;
|
||||||
|
use App\Repositories\ProjectRepository;
|
||||||
|
use App\Services\Template\TemplateAction;
|
||||||
|
use App\Transformers\ProjectTransformer;
|
||||||
|
use App\Utils\Traits\GeneratesCounter;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use App\Utils\Traits\SavesDocuments;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ProjectController.
|
* Class ProjectController.
|
||||||
|
@ -11,34 +11,34 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
|
||||||
use App\Models\Client;
|
|
||||||
use App\Models\Account;
|
|
||||||
use App\Models\PurchaseOrder;
|
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Jobs\Entity\CreateRawPdf;
|
|
||||||
use App\Services\PdfMaker\PdfMerge;
|
|
||||||
use App\Utils\Traits\SavesDocuments;
|
|
||||||
use App\Factory\PurchaseOrderFactory;
|
|
||||||
use App\Filters\PurchaseOrderFilters;
|
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
use App\Services\Template\TemplateAction;
|
|
||||||
use App\Jobs\PurchaseOrder\ZipPurchaseOrders;
|
|
||||||
use App\Repositories\PurchaseOrderRepository;
|
|
||||||
use App\Jobs\PurchaseOrder\PurchaseOrderEmail;
|
|
||||||
use App\Transformers\PurchaseOrderTransformer;
|
|
||||||
use App\Events\PurchaseOrder\PurchaseOrderWasCreated;
|
use App\Events\PurchaseOrder\PurchaseOrderWasCreated;
|
||||||
use App\Events\PurchaseOrder\PurchaseOrderWasUpdated;
|
use App\Events\PurchaseOrder\PurchaseOrderWasUpdated;
|
||||||
|
use App\Factory\PurchaseOrderFactory;
|
||||||
|
use App\Filters\PurchaseOrderFilters;
|
||||||
|
use App\Http\Requests\PurchaseOrder\ActionPurchaseOrderRequest;
|
||||||
use App\Http\Requests\PurchaseOrder\BulkPurchaseOrderRequest;
|
use App\Http\Requests\PurchaseOrder\BulkPurchaseOrderRequest;
|
||||||
|
use App\Http\Requests\PurchaseOrder\CreatePurchaseOrderRequest;
|
||||||
|
use App\Http\Requests\PurchaseOrder\DestroyPurchaseOrderRequest;
|
||||||
use App\Http\Requests\PurchaseOrder\EditPurchaseOrderRequest;
|
use App\Http\Requests\PurchaseOrder\EditPurchaseOrderRequest;
|
||||||
use App\Http\Requests\PurchaseOrder\ShowPurchaseOrderRequest;
|
use App\Http\Requests\PurchaseOrder\ShowPurchaseOrderRequest;
|
||||||
use App\Http\Requests\PurchaseOrder\StorePurchaseOrderRequest;
|
use App\Http\Requests\PurchaseOrder\StorePurchaseOrderRequest;
|
||||||
use App\Http\Requests\PurchaseOrder\ActionPurchaseOrderRequest;
|
|
||||||
use App\Http\Requests\PurchaseOrder\CreatePurchaseOrderRequest;
|
|
||||||
use App\Http\Requests\PurchaseOrder\UpdatePurchaseOrderRequest;
|
use App\Http\Requests\PurchaseOrder\UpdatePurchaseOrderRequest;
|
||||||
use App\Http\Requests\PurchaseOrder\UploadPurchaseOrderRequest;
|
use App\Http\Requests\PurchaseOrder\UploadPurchaseOrderRequest;
|
||||||
use App\Http\Requests\PurchaseOrder\DestroyPurchaseOrderRequest;
|
use App\Jobs\Entity\CreateRawPdf;
|
||||||
|
use App\Jobs\PurchaseOrder\PurchaseOrderEmail;
|
||||||
|
use App\Jobs\PurchaseOrder\ZipPurchaseOrders;
|
||||||
|
use App\Models\Account;
|
||||||
|
use App\Models\Client;
|
||||||
|
use App\Models\PurchaseOrder;
|
||||||
|
use App\Repositories\PurchaseOrderRepository;
|
||||||
|
use App\Services\PdfMaker\PdfMerge;
|
||||||
|
use App\Services\Template\TemplateAction;
|
||||||
|
use App\Transformers\PurchaseOrderTransformer;
|
||||||
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use App\Utils\Traits\SavesDocuments;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class PurchaseOrderController extends BaseController
|
class PurchaseOrderController extends BaseController
|
||||||
{
|
{
|
||||||
|
@ -11,41 +11,41 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
|
||||||
use App\Models\Quote;
|
|
||||||
use App\Models\Client;
|
|
||||||
use App\Models\Account;
|
|
||||||
use App\Models\Invoice;
|
|
||||||
use App\Models\Project;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use App\Factory\QuoteFactory;
|
|
||||||
use App\Filters\QuoteFilters;
|
|
||||||
use App\Jobs\Quote\ZipQuotes;
|
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Factory\CloneQuoteFactory;
|
|
||||||
use App\Services\PdfMaker\PdfMerge;
|
|
||||||
use Illuminate\Support\Facades\App;
|
|
||||||
use App\Utils\Traits\SavesDocuments;
|
|
||||||
use App\Events\Quote\QuoteWasCreated;
|
use App\Events\Quote\QuoteWasCreated;
|
||||||
use App\Events\Quote\QuoteWasUpdated;
|
use App\Events\Quote\QuoteWasUpdated;
|
||||||
use App\Repositories\QuoteRepository;
|
use App\Factory\CloneQuoteFactory;
|
||||||
use App\Transformers\QuoteTransformer;
|
|
||||||
use App\Utils\Traits\GeneratesCounter;
|
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
use App\Transformers\InvoiceTransformer;
|
|
||||||
use App\Transformers\ProjectTransformer;
|
|
||||||
use App\Services\Template\TemplateAction;
|
|
||||||
use App\Factory\CloneQuoteToInvoiceFactory;
|
use App\Factory\CloneQuoteToInvoiceFactory;
|
||||||
|
use App\Factory\QuoteFactory;
|
||||||
|
use App\Filters\QuoteFilters;
|
||||||
|
use App\Http\Requests\Quote\ActionQuoteRequest;
|
||||||
|
use App\Http\Requests\Quote\BulkActionQuoteRequest;
|
||||||
|
use App\Http\Requests\Quote\CreateQuoteRequest;
|
||||||
|
use App\Http\Requests\Quote\DestroyQuoteRequest;
|
||||||
use App\Http\Requests\Quote\EditQuoteRequest;
|
use App\Http\Requests\Quote\EditQuoteRequest;
|
||||||
use App\Http\Requests\Quote\ShowQuoteRequest;
|
use App\Http\Requests\Quote\ShowQuoteRequest;
|
||||||
use App\Http\Requests\Quote\StoreQuoteRequest;
|
use App\Http\Requests\Quote\StoreQuoteRequest;
|
||||||
use App\Http\Requests\Quote\ActionQuoteRequest;
|
|
||||||
use App\Http\Requests\Quote\CreateQuoteRequest;
|
|
||||||
use App\Http\Requests\Quote\UpdateQuoteRequest;
|
use App\Http\Requests\Quote\UpdateQuoteRequest;
|
||||||
use App\Http\Requests\Quote\UploadQuoteRequest;
|
use App\Http\Requests\Quote\UploadQuoteRequest;
|
||||||
use App\Http\Requests\Quote\DestroyQuoteRequest;
|
use App\Jobs\Quote\ZipQuotes;
|
||||||
use App\Http\Requests\Quote\BulkActionQuoteRequest;
|
use App\Models\Account;
|
||||||
|
use App\Models\Client;
|
||||||
|
use App\Models\Invoice;
|
||||||
|
use App\Models\Project;
|
||||||
|
use App\Models\Quote;
|
||||||
|
use App\Repositories\QuoteRepository;
|
||||||
|
use App\Services\PdfMaker\PdfMerge;
|
||||||
|
use App\Services\Template\TemplateAction;
|
||||||
|
use App\Transformers\InvoiceTransformer;
|
||||||
|
use App\Transformers\ProjectTransformer;
|
||||||
|
use App\Transformers\QuoteTransformer;
|
||||||
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\Traits\GeneratesCounter;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use App\Utils\Traits\SavesDocuments;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class QuoteController.
|
* Class QuoteController.
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Reports;
|
namespace App\Http\Controllers\Reports;
|
||||||
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Jobs\Report\SendToAdmin;
|
|
||||||
use App\Jobs\Report\PreviewReport;
|
|
||||||
use App\Services\Report\ARDetailReport;
|
|
||||||
use App\Http\Controllers\BaseController;
|
use App\Http\Controllers\BaseController;
|
||||||
use App\Http\Requests\Report\GenericReportRequest;
|
use App\Http\Requests\Report\GenericReportRequest;
|
||||||
|
use App\Jobs\Report\PreviewReport;
|
||||||
|
use App\Jobs\Report\SendToAdmin;
|
||||||
|
use App\Services\Report\ARDetailReport;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
|
||||||
class ARDetailReportController extends BaseController
|
class ARDetailReportController extends BaseController
|
||||||
{
|
{
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Reports;
|
namespace App\Http\Controllers\Reports;
|
||||||
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Jobs\Report\SendToAdmin;
|
|
||||||
use App\Jobs\Report\PreviewReport;
|
|
||||||
use App\Http\Controllers\BaseController;
|
use App\Http\Controllers\BaseController;
|
||||||
use App\Services\Report\ARSummaryReport;
|
|
||||||
use App\Http\Requests\Report\GenericReportRequest;
|
use App\Http\Requests\Report\GenericReportRequest;
|
||||||
|
use App\Jobs\Report\PreviewReport;
|
||||||
|
use App\Jobs\Report\SendToAdmin;
|
||||||
|
use App\Services\Report\ARSummaryReport;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
|
||||||
class ARSummaryReportController extends BaseController
|
class ARSummaryReportController extends BaseController
|
||||||
{
|
{
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Reports;
|
namespace App\Http\Controllers\Reports;
|
||||||
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Jobs\Report\SendToAdmin;
|
|
||||||
use App\Jobs\Report\PreviewReport;
|
|
||||||
use App\Http\Controllers\BaseController;
|
use App\Http\Controllers\BaseController;
|
||||||
use App\Services\Report\ClientBalanceReport;
|
|
||||||
use App\Http\Requests\Report\GenericReportRequest;
|
use App\Http\Requests\Report\GenericReportRequest;
|
||||||
|
use App\Jobs\Report\PreviewReport;
|
||||||
|
use App\Jobs\Report\SendToAdmin;
|
||||||
|
use App\Services\Report\ClientBalanceReport;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
|
||||||
class ClientBalanceReportController extends BaseController
|
class ClientBalanceReportController extends BaseController
|
||||||
{
|
{
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Reports;
|
namespace App\Http\Controllers\Reports;
|
||||||
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Jobs\Report\SendToAdmin;
|
|
||||||
use App\Jobs\Report\PreviewReport;
|
|
||||||
use App\Http\Controllers\BaseController;
|
use App\Http\Controllers\BaseController;
|
||||||
use App\Services\Report\ClientSalesReport;
|
|
||||||
use App\Http\Requests\Report\GenericReportRequest;
|
use App\Http\Requests\Report\GenericReportRequest;
|
||||||
|
use App\Jobs\Report\PreviewReport;
|
||||||
|
use App\Jobs\Report\SendToAdmin;
|
||||||
|
use App\Services\Report\ClientSalesReport;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
|
||||||
class ClientSalesReportController extends BaseController
|
class ClientSalesReportController extends BaseController
|
||||||
{
|
{
|
||||||
|
@ -11,14 +11,14 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Reports;
|
namespace App\Http\Controllers\Reports;
|
||||||
|
|
||||||
use App\Models\Client;
|
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Jobs\Report\SendToAdmin;
|
|
||||||
use App\Jobs\Report\PreviewReport;
|
|
||||||
use App\Export\CSV\ProductSalesExport;
|
use App\Export\CSV\ProductSalesExport;
|
||||||
use App\Http\Controllers\BaseController;
|
use App\Http\Controllers\BaseController;
|
||||||
use App\Http\Requests\Report\ProductSalesReportRequest;
|
use App\Http\Requests\Report\ProductSalesReportRequest;
|
||||||
|
use App\Jobs\Report\PreviewReport;
|
||||||
|
use App\Jobs\Report\SendToAdmin;
|
||||||
|
use App\Models\Client;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
|
||||||
class ProductSalesReportController extends BaseController
|
class ProductSalesReportController extends BaseController
|
||||||
{
|
{
|
||||||
|
@ -11,14 +11,14 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Reports;
|
namespace App\Http\Controllers\Reports;
|
||||||
|
|
||||||
use App\Models\Client;
|
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Jobs\Report\SendToAdmin;
|
|
||||||
use App\Jobs\Report\PreviewReport;
|
|
||||||
use App\Services\Report\ProfitLoss;
|
|
||||||
use App\Http\Controllers\BaseController;
|
use App\Http\Controllers\BaseController;
|
||||||
use App\Http\Requests\Report\ProfitLossRequest;
|
use App\Http\Requests\Report\ProfitLossRequest;
|
||||||
|
use App\Jobs\Report\PreviewReport;
|
||||||
|
use App\Jobs\Report\SendToAdmin;
|
||||||
|
use App\Models\Client;
|
||||||
|
use App\Services\Report\ProfitLoss;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
|
||||||
class ProfitAndLossController extends BaseController
|
class ProfitAndLossController extends BaseController
|
||||||
{
|
{
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Reports;
|
namespace App\Http\Controllers\Reports;
|
||||||
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Jobs\Report\SendToAdmin;
|
|
||||||
use App\Jobs\Report\PreviewReport;
|
|
||||||
use App\Http\Controllers\BaseController;
|
use App\Http\Controllers\BaseController;
|
||||||
use App\Services\Report\TaxSummaryReport;
|
|
||||||
use App\Http\Requests\Report\GenericReportRequest;
|
use App\Http\Requests\Report\GenericReportRequest;
|
||||||
|
use App\Jobs\Report\PreviewReport;
|
||||||
|
use App\Jobs\Report\SendToAdmin;
|
||||||
|
use App\Services\Report\TaxSummaryReport;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
|
||||||
class TaxSummaryReportController extends BaseController
|
class TaxSummaryReportController extends BaseController
|
||||||
{
|
{
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Reports;
|
namespace App\Http\Controllers\Reports;
|
||||||
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Jobs\Report\SendToAdmin;
|
|
||||||
use App\Jobs\Report\PreviewReport;
|
|
||||||
use App\Http\Controllers\BaseController;
|
use App\Http\Controllers\BaseController;
|
||||||
use App\Services\Report\UserSalesReport;
|
|
||||||
use App\Http\Requests\Report\GenericReportRequest;
|
use App\Http\Requests\Report\GenericReportRequest;
|
||||||
|
use App\Jobs\Report\PreviewReport;
|
||||||
|
use App\Jobs\Report\SendToAdmin;
|
||||||
|
use App\Services\Report\UserSalesReport;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
|
||||||
class UserSalesReportController extends BaseController
|
class UserSalesReportController extends BaseController
|
||||||
{
|
{
|
||||||
|
@ -11,31 +11,31 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Models\Task;
|
|
||||||
use App\Utils\Ninja;
|
|
||||||
use App\Models\Account;
|
|
||||||
use App\Models\TaskStatus;
|
|
||||||
use App\Factory\TaskFactory;
|
|
||||||
use App\Filters\TaskFilters;
|
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Utils\Traits\Uploadable;
|
|
||||||
use App\Utils\Traits\BulkOptions;
|
|
||||||
use App\Events\Task\TaskWasCreated;
|
use App\Events\Task\TaskWasCreated;
|
||||||
use App\Events\Task\TaskWasUpdated;
|
use App\Events\Task\TaskWasUpdated;
|
||||||
use App\Repositories\TaskRepository;
|
use App\Factory\TaskFactory;
|
||||||
use App\Utils\Traits\SavesDocuments;
|
use App\Filters\TaskFilters;
|
||||||
use App\Transformers\TaskTransformer;
|
|
||||||
use App\Services\Template\TemplateAction;
|
|
||||||
use App\Http\Requests\Task\BulkTaskRequest;
|
use App\Http\Requests\Task\BulkTaskRequest;
|
||||||
|
use App\Http\Requests\Task\CreateTaskRequest;
|
||||||
|
use App\Http\Requests\Task\DestroyTaskRequest;
|
||||||
use App\Http\Requests\Task\EditTaskRequest;
|
use App\Http\Requests\Task\EditTaskRequest;
|
||||||
use App\Http\Requests\Task\ShowTaskRequest;
|
use App\Http\Requests\Task\ShowTaskRequest;
|
||||||
use App\Http\Requests\Task\SortTaskRequest;
|
use App\Http\Requests\Task\SortTaskRequest;
|
||||||
use App\Http\Requests\Task\StoreTaskRequest;
|
use App\Http\Requests\Task\StoreTaskRequest;
|
||||||
use App\Http\Requests\Task\CreateTaskRequest;
|
|
||||||
use App\Http\Requests\Task\UpdateTaskRequest;
|
use App\Http\Requests\Task\UpdateTaskRequest;
|
||||||
use App\Http\Requests\Task\UploadTaskRequest;
|
use App\Http\Requests\Task\UploadTaskRequest;
|
||||||
use App\Http\Requests\Task\DestroyTaskRequest;
|
use App\Models\Account;
|
||||||
|
use App\Models\Task;
|
||||||
|
use App\Models\TaskStatus;
|
||||||
|
use App\Repositories\TaskRepository;
|
||||||
|
use App\Services\Template\TemplateAction;
|
||||||
|
use App\Transformers\TaskTransformer;
|
||||||
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\Traits\BulkOptions;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use App\Utils\Traits\SavesDocuments;
|
||||||
|
use App\Utils\Traits\Uploadable;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class TaskController.
|
* Class TaskController.
|
||||||
|
@ -11,23 +11,23 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\VendorPortal;
|
namespace App\Http\Controllers\VendorPortal;
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
|
||||||
use Illuminate\View\View;
|
|
||||||
use App\Models\PurchaseOrder;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Utils\Traits\MakesDates;
|
|
||||||
use App\Jobs\Entity\CreateRawPdf;
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use App\Jobs\Invoice\InjectSignature;
|
|
||||||
use Illuminate\Support\Facades\Cache;
|
|
||||||
use Illuminate\Contracts\View\Factory;
|
|
||||||
use App\Models\PurchaseOrderInvitation;
|
|
||||||
use App\Events\Misc\InvitationWasViewed;
|
use App\Events\Misc\InvitationWasViewed;
|
||||||
use App\Events\PurchaseOrder\PurchaseOrderWasViewed;
|
|
||||||
use App\Events\PurchaseOrder\PurchaseOrderWasAccepted;
|
use App\Events\PurchaseOrder\PurchaseOrderWasAccepted;
|
||||||
|
use App\Events\PurchaseOrder\PurchaseOrderWasViewed;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Requests\VendorPortal\PurchaseOrders\ProcessPurchaseOrdersInBulkRequest;
|
||||||
use App\Http\Requests\VendorPortal\PurchaseOrders\ShowPurchaseOrderRequest;
|
use App\Http\Requests\VendorPortal\PurchaseOrders\ShowPurchaseOrderRequest;
|
||||||
use App\Http\Requests\VendorPortal\PurchaseOrders\ShowPurchaseOrdersRequest;
|
use App\Http\Requests\VendorPortal\PurchaseOrders\ShowPurchaseOrdersRequest;
|
||||||
use App\Http\Requests\VendorPortal\PurchaseOrders\ProcessPurchaseOrdersInBulkRequest;
|
use App\Jobs\Entity\CreateRawPdf;
|
||||||
|
use App\Jobs\Invoice\InjectSignature;
|
||||||
|
use App\Models\PurchaseOrder;
|
||||||
|
use App\Models\PurchaseOrderInvitation;
|
||||||
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\Traits\MakesDates;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use Illuminate\Contracts\View\Factory;
|
||||||
|
use Illuminate\Support\Facades\Cache;
|
||||||
|
use Illuminate\View\View;
|
||||||
|
|
||||||
class PurchaseOrderController extends Controller
|
class PurchaseOrderController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
namespace App\Http\Requests\CompanyGateway;
|
namespace App\Http\Requests\CompanyGateway;
|
||||||
|
|
||||||
use App\DataMapper\FeesAndLimits;
|
|
||||||
use App\Http\Requests\Request;
|
use App\Http\Requests\Request;
|
||||||
use App\Http\ValidationRules\ValidCompanyGatewayFeesAndLimitsRule;
|
use App\Http\ValidationRules\ValidCompanyGatewayFeesAndLimitsRule;
|
||||||
use App\Models\Gateway;
|
use App\Models\Gateway;
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
namespace App\Http\Requests\Design;
|
namespace App\Http\Requests\Design;
|
||||||
|
|
||||||
use App\Models\Account;
|
|
||||||
use App\Http\Requests\Request;
|
use App\Http\Requests\Request;
|
||||||
|
use App\Models\Account;
|
||||||
use App\Utils\Traits\ChecksEntityStatus;
|
use App\Utils\Traits\ChecksEntityStatus;
|
||||||
|
|
||||||
class UpdateDesignRequest extends Request
|
class UpdateDesignRequest extends Request
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
namespace App\Http\Requests\Invoice;
|
namespace App\Http\Requests\Invoice;
|
||||||
|
|
||||||
use App\Http\Requests\Request;
|
use App\Http\Requests\Request;
|
||||||
use App\Models\Payment;
|
|
||||||
|
|
||||||
class BulkInvoiceRequest extends Request
|
class BulkInvoiceRequest extends Request
|
||||||
{
|
{
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
|
|
||||||
namespace App\Http\Requests\Preview;
|
namespace App\Http\Requests\Preview;
|
||||||
|
|
||||||
use App\Models\Vendor;
|
|
||||||
use App\Models\PurchaseOrder;
|
|
||||||
use App\Http\Requests\Request;
|
use App\Http\Requests\Request;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Models\PurchaseOrder;
|
||||||
use App\Utils\Traits\CleanLineItems;
|
|
||||||
use App\Models\PurchaseOrderInvitation;
|
use App\Models\PurchaseOrderInvitation;
|
||||||
|
use App\Models\Vendor;
|
||||||
|
use App\Utils\Traits\CleanLineItems;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
|
||||||
class PreviewPurchaseOrderRequest extends Request
|
class PreviewPurchaseOrderRequest extends Request
|
||||||
{
|
{
|
||||||
|
@ -56,8 +56,9 @@ class StoreTaskRequest extends Request
|
|||||||
|
|
||||||
$rules['time_log'] = ['bail',function ($attribute, $values, $fail) {
|
$rules['time_log'] = ['bail',function ($attribute, $values, $fail) {
|
||||||
|
|
||||||
if(is_string($values))
|
if(is_string($values)) {
|
||||||
$values = json_decode($values, true);
|
$values = json_decode($values, true);
|
||||||
|
}
|
||||||
|
|
||||||
if(!is_array($values)) {
|
if(!is_array($values)) {
|
||||||
$fail('The '.$attribute.' must be a valid array.');
|
$fail('The '.$attribute.' must be a valid array.');
|
||||||
|
@ -677,8 +677,9 @@ class BaseTransformer
|
|||||||
*/
|
*/
|
||||||
public function getProjectId($name, $clientId = null)
|
public function getProjectId($name, $clientId = null)
|
||||||
{
|
{
|
||||||
if(strlen($name) == 0)
|
if(strlen($name) == 0) {
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
$project = Project::query()->where('company_id', $this->company->id)
|
$project = Project::query()->where('company_id', $this->company->id)
|
||||||
->where('is_deleted', false)
|
->where('is_deleted', false)
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
namespace App\Import\Transformer\Csv;
|
namespace App\Import\Transformer\Csv;
|
||||||
|
|
||||||
use App\Models\TaskStatus;
|
|
||||||
use App\Import\Transformer\BaseTransformer;
|
use App\Import\Transformer\BaseTransformer;
|
||||||
|
use App\Models\TaskStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class TaskTransformer.
|
* Class TaskTransformer.
|
||||||
@ -29,10 +29,11 @@ class TaskTransformer extends BaseTransformer
|
|||||||
{
|
{
|
||||||
$this->stubbed_timestamp = time();
|
$this->stubbed_timestamp = time();
|
||||||
|
|
||||||
if(count($task_items_data) == count($task_items_data, COUNT_RECURSIVE))
|
if(count($task_items_data) == count($task_items_data, COUNT_RECURSIVE)) {
|
||||||
$task_data = $task_items_data;
|
$task_data = $task_items_data;
|
||||||
else
|
} else {
|
||||||
$task_data = reset($task_items_data);
|
$task_data = reset($task_items_data);
|
||||||
|
}
|
||||||
|
|
||||||
$clientId = $this->getClient(
|
$clientId = $this->getClient(
|
||||||
$this->getString($task_data, 'client.name'),
|
$this->getString($task_data, 'client.name'),
|
||||||
@ -79,12 +80,13 @@ class TaskTransformer extends BaseTransformer
|
|||||||
|
|
||||||
$notes = $item['task.notes'] ?? '';
|
$notes = $item['task.notes'] ?? '';
|
||||||
|
|
||||||
if(isset($item['task.is_billable']) && is_string($item['task.is_billable']) && in_array($item['task.is_billable'], ['yes', 'true', '1']))
|
if(isset($item['task.is_billable']) && is_string($item['task.is_billable']) && in_array($item['task.is_billable'], ['yes', 'true', '1'])) {
|
||||||
$is_billable = true;
|
$is_billable = true;
|
||||||
elseif(isset($item['task.is_billable']) && is_bool($item['task.is_billable']))
|
} elseif(isset($item['task.is_billable']) && is_bool($item['task.is_billable'])) {
|
||||||
$is_billable = $item['task.is_billable'];
|
$is_billable = $item['task.is_billable'];
|
||||||
else
|
} else {
|
||||||
$is_billable = false;
|
$is_billable = false;
|
||||||
|
}
|
||||||
|
|
||||||
if(isset($item['task.start_date']) &&
|
if(isset($item['task.start_date']) &&
|
||||||
isset($item['task.end_date'])) {
|
isset($item['task.end_date'])) {
|
||||||
@ -148,8 +150,7 @@ class TaskTransformer extends BaseTransformer
|
|||||||
|
|
||||||
private function getTaskStatusId($item): ?int
|
private function getTaskStatusId($item): ?int
|
||||||
{
|
{
|
||||||
if(isset($item['task.status']))
|
if(isset($item['task.status'])) {
|
||||||
{
|
|
||||||
$name = strtolower(trim($item['task.status']));
|
$name = strtolower(trim($item['task.status']));
|
||||||
|
|
||||||
$ts = TaskStatus::query()->where('company_id', $this->company->id)
|
$ts = TaskStatus::query()->where('company_id', $this->company->id)
|
||||||
@ -159,9 +160,10 @@ class TaskTransformer extends BaseTransformer
|
|||||||
])
|
])
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if($ts)
|
if($ts) {
|
||||||
return $ts->id;
|
return $ts->id;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return TaskStatus::where('company_id', $this->company->id)
|
return TaskStatus::where('company_id', $this->company->id)
|
||||||
->where('is_deleted', false)
|
->where('is_deleted', false)
|
||||||
|
@ -16,7 +16,6 @@ use App\Exceptions\NonExistingMigrationFile;
|
|||||||
use App\Factory\ClientContactFactory;
|
use App\Factory\ClientContactFactory;
|
||||||
use App\Jobs\Mail\NinjaMailerJob;
|
use App\Jobs\Mail\NinjaMailerJob;
|
||||||
use App\Jobs\Mail\NinjaMailerObject;
|
use App\Jobs\Mail\NinjaMailerObject;
|
||||||
use App\Jobs\Ninja\TaskScheduler;
|
|
||||||
use App\Libraries\MultiDB;
|
use App\Libraries\MultiDB;
|
||||||
use App\Mail\Import\CompanyImportFailure;
|
use App\Mail\Import\CompanyImportFailure;
|
||||||
use App\Mail\Import\ImportCompleted;
|
use App\Mail\Import\ImportCompleted;
|
||||||
@ -1367,8 +1366,9 @@ class CompanyImport implements ShouldQueue
|
|||||||
private function filterVersionProps($class, array $obj_array): array
|
private function filterVersionProps($class, array $obj_array): array
|
||||||
{
|
{
|
||||||
|
|
||||||
if($this->current_app_version == $this->import_version)
|
if($this->current_app_version == $this->import_version) {
|
||||||
return $obj_array;
|
return $obj_array;
|
||||||
|
}
|
||||||
|
|
||||||
$version_index = 0;
|
$version_index = 0;
|
||||||
$index = 0;
|
$index = 0;
|
||||||
|
@ -14,7 +14,6 @@ namespace App\Jobs\Company;
|
|||||||
use App\DataMapper\ClientRegistrationFields;
|
use App\DataMapper\ClientRegistrationFields;
|
||||||
use App\DataMapper\CompanySettings;
|
use App\DataMapper\CompanySettings;
|
||||||
use App\DataMapper\Tax\TaxModel;
|
use App\DataMapper\Tax\TaxModel;
|
||||||
use App\Factory\TaxRateFactory;
|
|
||||||
use App\Libraries\MultiDB;
|
use App\Libraries\MultiDB;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use App\Models\Country;
|
use App\Models\Country;
|
||||||
|
@ -11,23 +11,23 @@
|
|||||||
|
|
||||||
namespace App\Jobs\Entity;
|
namespace App\Jobs\Entity;
|
||||||
|
|
||||||
use App\Models\Quote;
|
|
||||||
use App\Models\Credit;
|
|
||||||
use App\Models\Invoice;
|
|
||||||
use App\Models\PurchaseOrder;
|
|
||||||
use App\Models\QuoteInvitation;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Models\CreditInvitation;
|
|
||||||
use App\Models\RecurringInvoice;
|
|
||||||
use App\Services\Pdf\PdfService;
|
|
||||||
use App\Models\InvoiceInvitation;
|
|
||||||
use App\Utils\Traits\Pdf\PdfMaker;
|
|
||||||
use App\Utils\Traits\NumberFormatter;
|
|
||||||
use App\Utils\Traits\MakesInvoiceHtml;
|
|
||||||
use App\Models\PurchaseOrderInvitation;
|
|
||||||
use App\Utils\Traits\Pdf\PageNumbering;
|
|
||||||
use App\Exceptions\FilePermissionsFailure;
|
use App\Exceptions\FilePermissionsFailure;
|
||||||
|
use App\Models\Credit;
|
||||||
|
use App\Models\CreditInvitation;
|
||||||
|
use App\Models\Invoice;
|
||||||
|
use App\Models\InvoiceInvitation;
|
||||||
|
use App\Models\PurchaseOrder;
|
||||||
|
use App\Models\PurchaseOrderInvitation;
|
||||||
|
use App\Models\Quote;
|
||||||
|
use App\Models\QuoteInvitation;
|
||||||
|
use App\Models\RecurringInvoice;
|
||||||
use App\Models\RecurringInvoiceInvitation;
|
use App\Models\RecurringInvoiceInvitation;
|
||||||
|
use App\Services\Pdf\PdfService;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use App\Utils\Traits\MakesInvoiceHtml;
|
||||||
|
use App\Utils\Traits\NumberFormatter;
|
||||||
|
use App\Utils\Traits\Pdf\PageNumbering;
|
||||||
|
use App\Utils\Traits\Pdf\PdfMaker;
|
||||||
|
|
||||||
class CreateRawPdf
|
class CreateRawPdf
|
||||||
{
|
{
|
||||||
@ -72,8 +72,9 @@ class CreateRawPdf
|
|||||||
|
|
||||||
private function resolveType(): string
|
private function resolveType(): string
|
||||||
{
|
{
|
||||||
if($this->type)
|
if($this->type) {
|
||||||
return $this->type;
|
return $this->type;
|
||||||
|
}
|
||||||
|
|
||||||
$type = 'product';
|
$type = 'product';
|
||||||
|
|
||||||
|
@ -11,21 +11,21 @@
|
|||||||
|
|
||||||
namespace App\Jobs\Expense;
|
namespace App\Jobs\Expense;
|
||||||
|
|
||||||
|
use App\Libraries\MultiDB;
|
||||||
|
use App\Models\Activity;
|
||||||
|
use App\Models\Expense;
|
||||||
|
use App\Models\VendorContact;
|
||||||
|
use App\Repositories\ActivityRepository;
|
||||||
|
use App\Services\Email\Email;
|
||||||
|
use App\Services\Email\EmailObject;
|
||||||
use App\Utils\Ninja;
|
use App\Utils\Ninja;
|
||||||
use App\Utils\Number;
|
use App\Utils\Number;
|
||||||
use App\Models\Expense;
|
|
||||||
use App\Models\Activity;
|
|
||||||
use App\Libraries\MultiDB;
|
|
||||||
use App\Models\VendorContact;
|
|
||||||
use App\Services\Email\Email;
|
|
||||||
use Illuminate\Bus\Queueable;
|
|
||||||
use App\Services\Email\EmailObject;
|
|
||||||
use Illuminate\Queue\SerializesModels;
|
|
||||||
use App\Repositories\ActivityRepository;
|
|
||||||
use App\Utils\Traits\MakesDates;
|
use App\Utils\Traits\MakesDates;
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
use Illuminate\Foundation\Bus\Dispatchable;
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
class VendorExpenseNotify implements ShouldQueue
|
class VendorExpenseNotify implements ShouldQueue
|
||||||
{
|
{
|
||||||
|
@ -14,11 +14,11 @@ namespace App\Jobs\Ledger;
|
|||||||
use App\Libraries\MultiDB;
|
use App\Libraries\MultiDB;
|
||||||
use App\Models\CompanyLedger;
|
use App\Models\CompanyLedger;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Queue\SerializesModels;
|
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
use Illuminate\Foundation\Bus\Dispatchable;
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
use Illuminate\Queue\Middleware\WithoutOverlapping;
|
use Illuminate\Queue\Middleware\WithoutOverlapping;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
//@deprecated
|
//@deprecated
|
||||||
class UpdateLedger implements ShouldQueue
|
class UpdateLedger implements ShouldQueue
|
||||||
@ -51,8 +51,9 @@ class UpdateLedger implements ShouldQueue
|
|||||||
|
|
||||||
nlog($cl->company_ledgerable->company_ledger()->count());
|
nlog($cl->company_ledgerable->company_ledger()->count());
|
||||||
|
|
||||||
if(!$cl)
|
if(!$cl) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$entity = $cl->company_ledgerable;
|
$entity = $cl->company_ledgerable;
|
||||||
$balance = $entity->calc()->getBalance();
|
$balance = $entity->calc()->getBalance();
|
||||||
|
@ -24,7 +24,6 @@ use App\Models\Invoice;
|
|||||||
use App\Models\Payment;
|
use App\Models\Payment;
|
||||||
use App\Models\SystemLog;
|
use App\Models\SystemLog;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Repositories\ActivityRepository;
|
|
||||||
use App\Utils\Ninja;
|
use App\Utils\Ninja;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
use GuzzleHttp\Exception\ClientException;
|
use GuzzleHttp\Exception\ClientException;
|
||||||
|
@ -11,21 +11,21 @@
|
|||||||
|
|
||||||
namespace App\Jobs\PurchaseOrder;
|
namespace App\Jobs\PurchaseOrder;
|
||||||
|
|
||||||
use App\Models\User;
|
|
||||||
use App\Models\Company;
|
|
||||||
use App\Libraries\MultiDB;
|
|
||||||
use App\Jobs\Util\UnlinkFile;
|
|
||||||
use Illuminate\Bus\Queueable;
|
|
||||||
use App\Jobs\Entity\CreateRawPdf;
|
use App\Jobs\Entity\CreateRawPdf;
|
||||||
use App\Jobs\Mail\NinjaMailerJob;
|
use App\Jobs\Mail\NinjaMailerJob;
|
||||||
use App\Jobs\Mail\NinjaMailerObject;
|
use App\Jobs\Mail\NinjaMailerObject;
|
||||||
|
use App\Jobs\Util\UnlinkFile;
|
||||||
|
use App\Libraries\MultiDB;
|
||||||
use App\Mail\DownloadPurchaseOrders;
|
use App\Mail\DownloadPurchaseOrders;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use App\Models\Company;
|
||||||
use App\Models\PurchaseOrderInvitation;
|
use App\Models\PurchaseOrderInvitation;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use App\Models\User;
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
use Illuminate\Foundation\Bus\Dispatchable;
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class ZipPurchaseOrders implements ShouldQueue
|
class ZipPurchaseOrders implements ShouldQueue
|
||||||
{
|
{
|
||||||
|
@ -39,10 +39,11 @@ class PreviewReport implements ShouldQueue
|
|||||||
/** @var \App\Export\CSV\CreditExport $export */
|
/** @var \App\Export\CSV\CreditExport $export */
|
||||||
$export = new $this->report_class($this->company, $this->request);
|
$export = new $this->report_class($this->company, $this->request);
|
||||||
|
|
||||||
if(isset($this->request['output']) && $this->request['output'] == 'json')
|
if(isset($this->request['output']) && $this->request['output'] == 'json') {
|
||||||
$report = $export->returnJson();
|
$report = $export->returnJson();
|
||||||
else
|
} else {
|
||||||
$report = $export->run();
|
$report = $export->run();
|
||||||
|
}
|
||||||
|
|
||||||
// nlog($report);
|
// nlog($report);
|
||||||
|
|
||||||
|
@ -364,23 +364,27 @@ class Import implements ShouldQueue
|
|||||||
if (isset($data['plan_expires'])) {
|
if (isset($data['plan_expires'])) {
|
||||||
unset($data['plan_expires']);
|
unset($data['plan_expires']);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
|
|
||||||
if(isset($data['plan']))
|
if(isset($data['plan'])) {
|
||||||
$account->plan = $data['plan'];
|
$account->plan = $data['plan'];
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($data['plan_term']))
|
if (isset($data['plan_term'])) {
|
||||||
$account->plan_term = $data['plan_term'];
|
$account->plan_term = $data['plan_term'];
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($data['plan_paid']))
|
if (isset($data['plan_paid'])) {
|
||||||
$account->plan_paid = $data['plan_paid'];
|
$account->plan_paid = $data['plan_paid'];
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($data['plan_started']))
|
if (isset($data['plan_started'])) {
|
||||||
$account->plan_started = $data['plan_started'];
|
$account->plan_started = $data['plan_started'];
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($data['plan_expires']))
|
if (isset($data['plan_expires'])) {
|
||||||
$account->plan_expires = $data['plan_expires'];
|
$account->plan_expires = $data['plan_expires'];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,20 +11,20 @@
|
|||||||
|
|
||||||
namespace App\Jobs\Util;
|
namespace App\Jobs\Util;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
|
||||||
use App\Utils\Ninja;
|
|
||||||
use App\Models\Client;
|
|
||||||
use App\Models\Vendor;
|
|
||||||
use App\Models\Account;
|
|
||||||
use Illuminate\Support\Str;
|
|
||||||
use App\Models\ClientContact;
|
|
||||||
use Illuminate\Bus\Queueable;
|
|
||||||
use App\Factory\ClientContactFactory;
|
use App\Factory\ClientContactFactory;
|
||||||
use App\Factory\VendorContactFactory;
|
use App\Factory\VendorContactFactory;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use App\Models\Account;
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
use App\Models\Client;
|
||||||
|
use App\Models\ClientContact;
|
||||||
|
use App\Models\Vendor;
|
||||||
|
use App\Utils\Ninja;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
use Illuminate\Foundation\Bus\Dispatchable;
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class VersionCheck implements ShouldQueue
|
class VersionCheck implements ShouldQueue
|
||||||
{
|
{
|
||||||
|
38
app/Jobs/Vendor/CreatePurchaseOrderPdf.php
vendored
38
app/Jobs/Vendor/CreatePurchaseOrderPdf.php
vendored
@ -11,29 +11,29 @@
|
|||||||
|
|
||||||
namespace App\Jobs\Vendor;
|
namespace App\Jobs\Vendor;
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
|
||||||
use App\Models\Design;
|
|
||||||
use App\Libraries\MultiDB;
|
|
||||||
use Illuminate\Bus\Queueable;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\Utils\VendorHtmlEngine;
|
|
||||||
use App\Services\Pdf\PdfService;
|
|
||||||
use App\Utils\PhantomJS\Phantom;
|
|
||||||
use App\Utils\HostedPDF\NinjaPdf;
|
|
||||||
use App\Utils\Traits\Pdf\PdfMaker;
|
|
||||||
use Illuminate\Support\Facades\App;
|
|
||||||
use App\Utils\Traits\NumberFormatter;
|
|
||||||
use App\Utils\Traits\MakesInvoiceHtml;
|
|
||||||
use Illuminate\Queue\SerializesModels;
|
|
||||||
use App\Utils\Traits\Pdf\PageNumbering;
|
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
|
||||||
use App\Exceptions\FilePermissionsFailure;
|
use App\Exceptions\FilePermissionsFailure;
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use App\Libraries\MultiDB;
|
||||||
use Illuminate\Foundation\Bus\Dispatchable;
|
use App\Models\Design;
|
||||||
|
use App\Services\Pdf\PdfService;
|
||||||
use App\Services\PdfMaker\Design as PdfDesignModel;
|
use App\Services\PdfMaker\Design as PdfDesignModel;
|
||||||
use App\Services\PdfMaker\Design as PdfMakerDesign;
|
use App\Services\PdfMaker\Design as PdfMakerDesign;
|
||||||
use App\Services\PdfMaker\PdfMaker as PdfMakerService;
|
use App\Services\PdfMaker\PdfMaker as PdfMakerService;
|
||||||
|
use App\Utils\HostedPDF\NinjaPdf;
|
||||||
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\PhantomJS\Phantom;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use App\Utils\Traits\MakesInvoiceHtml;
|
||||||
|
use App\Utils\Traits\NumberFormatter;
|
||||||
|
use App\Utils\Traits\Pdf\PageNumbering;
|
||||||
|
use App\Utils\Traits\Pdf\PdfMaker;
|
||||||
|
use App\Utils\VendorHtmlEngine;
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
/** @deprecated 26-10-2023 5.7.30x */
|
/** @deprecated 26-10-2023 5.7.30x */
|
||||||
class CreatePurchaseOrderPdf implements ShouldQueue
|
class CreatePurchaseOrderPdf implements ShouldQueue
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace App\Libraries\OAuth\Providers;
|
namespace App\Libraries\OAuth\Providers;
|
||||||
|
|
||||||
use Google_Client;
|
use Google_Client;
|
||||||
|
|
||||||
class Google implements ProviderInterface
|
class Google implements ProviderInterface
|
||||||
{
|
{
|
||||||
public function getTokenResponse($token)
|
public function getTokenResponse($token)
|
||||||
@ -38,8 +39,7 @@ class Google implements ProviderInterface
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$userInfo = $oauth2->userinfo->get();
|
$userInfo = $oauth2->userinfo->get();
|
||||||
}
|
} catch (\Exception $e) {
|
||||||
catch (\Exception $e) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,18 +11,10 @@
|
|||||||
|
|
||||||
namespace App\Listeners;
|
namespace App\Listeners;
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
|
||||||
use App\Libraries\MultiDB;
|
|
||||||
use App\Mail\User\UserAdded;
|
|
||||||
use Illuminate\Support\Carbon;
|
|
||||||
use App\Jobs\Mail\NinjaMailerJob;
|
|
||||||
use Illuminate\Support\Facades\App;
|
|
||||||
use App\Jobs\Mail\NinjaMailerObject;
|
|
||||||
use Illuminate\Queue\SerializesModels;
|
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
||||||
use Illuminate\Foundation\Events\Dispatchable;
|
|
||||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||||
|
use Illuminate\Foundation\Events\Dispatchable;
|
||||||
use Illuminate\Http\Client\Events\ResponseReceived;
|
use Illuminate\Http\Client\Events\ResponseReceived;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
class LogResponseReceived
|
class LogResponseReceived
|
||||||
{
|
{
|
||||||
|
@ -11,17 +11,17 @@
|
|||||||
|
|
||||||
namespace App\Mail\Engine;
|
namespace App\Mail\Engine;
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
use App\DataMapper\EmailTemplateDefaults;
|
||||||
use App\Utils\Number;
|
use App\Jobs\Entity\CreateRawPdf;
|
||||||
use App\Models\Vendor;
|
|
||||||
use App\Models\Account;
|
use App\Models\Account;
|
||||||
use App\Models\PurchaseOrder;
|
use App\Models\PurchaseOrder;
|
||||||
|
use App\Models\Vendor;
|
||||||
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\Number;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
use App\Utils\VendorHtmlEngine;
|
use App\Utils\VendorHtmlEngine;
|
||||||
use App\Jobs\Entity\CreateRawPdf;
|
|
||||||
use Illuminate\Support\Facades\App;
|
use Illuminate\Support\Facades\App;
|
||||||
use Illuminate\Support\Facades\URL;
|
use Illuminate\Support\Facades\URL;
|
||||||
use App\DataMapper\EmailTemplateDefaults;
|
|
||||||
|
|
||||||
class PurchaseOrderEmailEngine extends BaseEmailEngine
|
class PurchaseOrderEmailEngine extends BaseEmailEngine
|
||||||
{
|
{
|
||||||
|
@ -11,22 +11,21 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
|
||||||
use App\Casts\EncryptedCast;
|
use App\Casts\EncryptedCast;
|
||||||
use App\Models\VendorContact;
|
|
||||||
use App\Utils\Traits\AppSetup;
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\DataMapper\CompanySettings;
|
use App\DataMapper\CompanySettings;
|
||||||
use Illuminate\Support\Facades\App;
|
|
||||||
use Illuminate\Support\Facades\Cache;
|
|
||||||
use Laracasts\Presenter\PresentableTrait;
|
|
||||||
use App\Utils\Traits\CompanySettingsSaver;
|
|
||||||
use Illuminate\Notifications\Notification;
|
|
||||||
use App\Models\Presenters\CompanyPresenter;
|
use App\Models\Presenters\CompanyPresenter;
|
||||||
use App\Services\Company\CompanyService;
|
use App\Services\Company\CompanyService;
|
||||||
use App\Services\Notification\NotificationService;
|
use App\Services\Notification\NotificationService;
|
||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\Traits\AppSetup;
|
||||||
|
use App\Utils\Traits\CompanySettingsSaver;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
use Illuminate\Notifications\Notification;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
|
use Illuminate\Support\Facades\Cache;
|
||||||
|
use Laracasts\Presenter\PresentableTrait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* App\Models\Company
|
* App\Models\Company
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use App\Helpers\Document\WithTypeHelpers;
|
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
@ -211,8 +210,9 @@ class Document extends BaseModel
|
|||||||
$image = $this->getFile();
|
$image = $this->getFile();
|
||||||
$catch_image = $image;
|
$catch_image = $image;
|
||||||
|
|
||||||
if(!extension_loaded('imagick'))
|
if(!extension_loaded('imagick')) {
|
||||||
return $catch_image;
|
return $catch_image;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$file = base64_encode($image);
|
$file = base64_encode($image);
|
||||||
@ -224,8 +224,7 @@ class Document extends BaseModel
|
|||||||
|
|
||||||
return $img->getImageBlob();
|
return $img->getImageBlob();
|
||||||
|
|
||||||
}
|
} catch(\Exception $e) {
|
||||||
catch(\Exception $e){
|
|
||||||
|
|
||||||
nlog($e->getMessage());
|
nlog($e->getMessage());
|
||||||
return $catch_image;
|
return $catch_image;
|
||||||
|
@ -164,11 +164,13 @@ class Task extends BaseModel
|
|||||||
|
|
||||||
public function stringStatus()
|
public function stringStatus()
|
||||||
{
|
{
|
||||||
if($this->invoice_id)
|
if($this->invoice_id) {
|
||||||
return '<h5><span class="badge badge-success">'.ctrans('texts.invoiced').'</span></h5>';
|
return '<h5><span class="badge badge-success">'.ctrans('texts.invoiced').'</span></h5>';
|
||||||
|
}
|
||||||
|
|
||||||
if($this->status)
|
if($this->status) {
|
||||||
return '<h5><span class="badge badge-primary">' . $this->status?->name ?? '';
|
return '<h5><span class="badge badge-primary">' . $this->status?->name ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
@ -260,13 +262,15 @@ class Task extends BaseModel
|
|||||||
|
|
||||||
$parent_entity = $this->client ?? $this->company;
|
$parent_entity = $this->client ?? $this->company;
|
||||||
|
|
||||||
if($log[0])
|
if($log[0]) {
|
||||||
$log[0] = Carbon::createFromTimestamp($log[0])->format($parent_entity->date_format().' H:i:s');
|
$log[0] = Carbon::createFromTimestamp($log[0])->format($parent_entity->date_format().' H:i:s');
|
||||||
|
}
|
||||||
|
|
||||||
if($log[1] && $log[1] != 0)
|
if($log[1] && $log[1] != 0) {
|
||||||
$log[1] = Carbon::createFromTimestamp($log[1])->format($parent_entity->date_format().' H:i:s');
|
$log[1] = Carbon::createFromTimestamp($log[1])->format($parent_entity->date_format().' H:i:s');
|
||||||
else
|
} else {
|
||||||
$log[1] = ctrans('texts.running');
|
$log[1] = ctrans('texts.running');
|
||||||
|
}
|
||||||
|
|
||||||
return $log;
|
return $log;
|
||||||
})->toArray();
|
})->toArray();
|
||||||
@ -284,20 +288,19 @@ class Task extends BaseModel
|
|||||||
|
|
||||||
if($log[0] && $log[1] !=0) {
|
if($log[0] && $log[1] !=0) {
|
||||||
$duration = $log[1] - $log[0];
|
$duration = $log[1] - $log[0];
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$duration = 0;
|
$duration = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($log[0])
|
if($log[0]) {
|
||||||
$logged['start_date_raw'] = $log[0];
|
$logged['start_date_raw'] = $log[0];
|
||||||
|
}
|
||||||
$logged['start_date'] = Carbon::createFromTimestamp($log[0])->setTimeZone($this->company->timezone()->name)->format($parent_entity->date_format().' H:i:s');
|
$logged['start_date'] = Carbon::createFromTimestamp($log[0])->setTimeZone($this->company->timezone()->name)->format($parent_entity->date_format().' H:i:s');
|
||||||
|
|
||||||
if($log[1] && $log[1] != 0) {
|
if($log[1] && $log[1] != 0) {
|
||||||
$logged['end_date_raw'] = $log[1];
|
$logged['end_date_raw'] = $log[1];
|
||||||
$logged['end_date'] = Carbon::createFromTimestamp($log[1])->setTimeZone($this->company->timezone()->name)->format($parent_entity->date_format().' H:i:s');
|
$logged['end_date'] = Carbon::createFromTimestamp($log[1])->setTimeZone($this->company->timezone()->name)->format($parent_entity->date_format().' H:i:s');
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$logged['end_date_raw'] = 0;
|
$logged['end_date_raw'] = 0;
|
||||||
$logged['end_date'] = ctrans('texts.running');
|
$logged['end_date'] = ctrans('texts.running');
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@ use App\Models\SystemLog;
|
|||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
use Omnipay\Omnipay;
|
|
||||||
use Str;
|
use Str;
|
||||||
|
|
||||||
class PayPalPPCPPaymentDriver extends BaseDriver
|
class PayPalPPCPPaymentDriver extends BaseDriver
|
||||||
@ -145,8 +144,9 @@ class PayPalPPCPPaymentDriver extends BaseDriver
|
|||||||
$secret = config('ninja.paypal.secret');
|
$secret = config('ninja.paypal.secret');
|
||||||
$client_id = config('ninja.paypal.client_id');
|
$client_id = config('ninja.paypal.client_id');
|
||||||
|
|
||||||
if($this->access_token && $this->token_expiry && $this->token_expiry->isFuture())
|
if($this->access_token && $this->token_expiry && $this->token_expiry->isFuture()) {
|
||||||
return $this;
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
$response = Http::withBasicAuth($client_id, $secret)
|
$response = Http::withBasicAuth($client_id, $secret)
|
||||||
->withHeaders(['Content-Type' => 'application/x-www-form-urlencoded'])
|
->withHeaders(['Content-Type' => 'application/x-www-form-urlencoded'])
|
||||||
@ -203,8 +203,9 @@ class PayPalPPCPPaymentDriver extends BaseDriver
|
|||||||
$this->company_gateway = $this->company_gateway->fresh();
|
$this->company_gateway = $this->company_gateway->fresh();
|
||||||
$config = $this->company_gateway->getConfig();
|
$config = $this->company_gateway->getConfig();
|
||||||
|
|
||||||
if($config->status == 'activated')
|
if($config->status == 'activated') {
|
||||||
return $this;
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,8 +242,9 @@ class PayPalPPCPPaymentDriver extends BaseDriver
|
|||||||
|
|
||||||
$r = $this->gatewayRequest('/v1/identity/generate-token', 'post', ['body' => '']);
|
$r = $this->gatewayRequest('/v1/identity/generate-token', 'post', ['body' => '']);
|
||||||
|
|
||||||
if($r->successful())
|
if($r->successful()) {
|
||||||
return $r->json()['client_token'];
|
return $r->json()['client_token'];
|
||||||
|
}
|
||||||
|
|
||||||
throw new PaymentFailed('Unable to gain client token from Paypal. Check your configuration', 401);
|
throw new PaymentFailed('Unable to gain client token from Paypal. Check your configuration', 401);
|
||||||
|
|
||||||
@ -278,8 +280,9 @@ class PayPalPPCPPaymentDriver extends BaseDriver
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if(isset($response['headers']) ?? false)
|
if(isset($response['headers']) ?? false) {
|
||||||
unset($response['headers']);
|
unset($response['headers']);
|
||||||
|
}
|
||||||
|
|
||||||
SystemLogger::dispatch(
|
SystemLogger::dispatch(
|
||||||
['response' => $response],
|
['response' => $response],
|
||||||
|
@ -12,16 +12,16 @@
|
|||||||
|
|
||||||
namespace App\Repositories;
|
namespace App\Repositories;
|
||||||
|
|
||||||
use App\Models\Expense;
|
|
||||||
use Illuminate\Support\Carbon;
|
|
||||||
use App\Factory\ExpenseFactory;
|
use App\Factory\ExpenseFactory;
|
||||||
|
use App\Jobs\Expense\VendorExpenseNotify;
|
||||||
|
use App\Libraries\Currency\Conversion\CurrencyApi;
|
||||||
|
use App\Models\Expense;
|
||||||
use App\Models\ExpenseCategory;
|
use App\Models\ExpenseCategory;
|
||||||
use App\Utils\Traits\GeneratesCounter;
|
use App\Utils\Traits\GeneratesCounter;
|
||||||
use Illuminate\Database\QueryException;
|
|
||||||
use App\Jobs\Expense\VendorExpenseNotify;
|
|
||||||
use Illuminate\Database\Eloquent\Collection;
|
|
||||||
use Carbon\Exceptions\InvalidFormatException;
|
use Carbon\Exceptions\InvalidFormatException;
|
||||||
use App\Libraries\Currency\Conversion\CurrencyApi;
|
use Illuminate\Database\Eloquent\Collection;
|
||||||
|
use Illuminate\Database\QueryException;
|
||||||
|
use Illuminate\Support\Carbon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ExpenseRepository.
|
* ExpenseRepository.
|
||||||
@ -48,8 +48,7 @@ class ExpenseRepository extends BaseRepository
|
|||||||
|
|
||||||
if(isset($data['payment_date']) && $data['payment_date'] == $expense->payment_date) {
|
if(isset($data['payment_date']) && $data['payment_date'] == $expense->payment_date) {
|
||||||
//do nothing
|
//do nothing
|
||||||
}
|
} elseif(isset($data['payment_date']) && strlen($data['payment_date']) > 1 && $user->company()->notify_vendor_when_paid && ($data['vendor_id'] || $expense->vendor_id)) {
|
||||||
elseif(isset($data['payment_date']) && strlen($data['payment_date']) > 1 && $user->company()->notify_vendor_when_paid && ($data['vendor_id'] || $expense->vendor_id)) {
|
|
||||||
nlog("ping");
|
nlog("ping");
|
||||||
$this->notify_vendor = true;
|
$this->notify_vendor = true;
|
||||||
}
|
}
|
||||||
@ -62,16 +61,17 @@ class ExpenseRepository extends BaseRepository
|
|||||||
|
|
||||||
if (empty($expense->number)) {
|
if (empty($expense->number)) {
|
||||||
$expense = $this->findAndSaveNumber($expense);
|
$expense = $this->findAndSaveNumber($expense);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
$expense->saveQuietly();
|
$expense->saveQuietly();
|
||||||
|
}
|
||||||
|
|
||||||
if (array_key_exists('documents', $data)) {
|
if (array_key_exists('documents', $data)) {
|
||||||
$this->saveDocuments($data['documents'], $expense);
|
$this->saveDocuments($data['documents'], $expense);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->notify_vendor)
|
if($this->notify_vendor) {
|
||||||
VendorExpenseNotify::dispatch($expense, $expense->company->db);
|
VendorExpenseNotify::dispatch($expense, $expense->company->db);
|
||||||
|
}
|
||||||
|
|
||||||
return $expense;
|
return $expense;
|
||||||
}
|
}
|
||||||
|
@ -11,17 +11,16 @@
|
|||||||
|
|
||||||
namespace App\Services\Client;
|
namespace App\Services\Client;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
|
||||||
use App\Utils\Number;
|
|
||||||
use App\Models\Client;
|
use App\Models\Client;
|
||||||
use App\Models\Credit;
|
use App\Models\Credit;
|
||||||
use App\Models\Invoice;
|
use App\Models\Invoice;
|
||||||
use App\Models\Payment;
|
use App\Models\Payment;
|
||||||
use App\Services\Email\Email;
|
use App\Services\Email\Email;
|
||||||
use App\Utils\Traits\MakesDates;
|
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
use App\Services\Email\EmailObject;
|
use App\Services\Email\EmailObject;
|
||||||
|
use App\Utils\Number;
|
||||||
|
use App\Utils\Traits\MakesDates;
|
||||||
use Illuminate\Mail\Mailables\Address;
|
use Illuminate\Mail\Mailables\Address;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
class ClientService
|
class ClientService
|
||||||
{
|
{
|
||||||
|
@ -438,8 +438,7 @@ class Statement
|
|||||||
$query->where(function ($q) use ($to, $from) {
|
$query->where(function ($q) use ($to, $from) {
|
||||||
$q->whereBetween('due_date', [$to, $from])->orWhereNull('due_date');
|
$q->whereBetween('due_date', [$to, $from])->orWhereNull('due_date');
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$query->whereBetween('due_date', [$to, $from]);
|
$query->whereBetween('due_date', [$to, $from]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,11 +11,12 @@
|
|||||||
|
|
||||||
namespace App\Services\Company;
|
namespace App\Services\Company;
|
||||||
|
|
||||||
use App\Models\User;
|
|
||||||
use App\Models\Company;
|
|
||||||
use App\Factory\TaxRateFactory;
|
use App\Factory\TaxRateFactory;
|
||||||
|
use App\Models\Company;
|
||||||
|
use App\Models\User;
|
||||||
|
|
||||||
class CompanyService{
|
class CompanyService
|
||||||
|
{
|
||||||
|
|
||||||
public function __construct(public Company $company)
|
public function __construct(public Company $company)
|
||||||
{
|
{
|
||||||
|
@ -11,11 +11,10 @@
|
|||||||
|
|
||||||
namespace App\Services\Ledger;
|
namespace App\Services\Ledger;
|
||||||
|
|
||||||
use App\Models\Activity;
|
|
||||||
use App\Models\CompanyLedger;
|
|
||||||
use App\Jobs\Ledger\UpdateLedger;
|
|
||||||
use App\Factory\CompanyLedgerFactory;
|
use App\Factory\CompanyLedgerFactory;
|
||||||
use App\Jobs\Ledger\ClientLedgerBalanceUpdate;
|
use App\Jobs\Ledger\ClientLedgerBalanceUpdate;
|
||||||
|
use App\Models\Activity;
|
||||||
|
use App\Models\CompanyLedger;
|
||||||
|
|
||||||
class LedgerService
|
class LedgerService
|
||||||
{
|
{
|
||||||
@ -45,8 +44,9 @@ class LedgerService
|
|||||||
public function updateInvoiceBalance($adjustment, $notes = '')
|
public function updateInvoiceBalance($adjustment, $notes = '')
|
||||||
{
|
{
|
||||||
|
|
||||||
if($adjustment == 0)
|
if($adjustment == 0) {
|
||||||
return $this;
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
// $timestamp = \Carbon\Carbon::createFromTimestamp($this->entity->updated_at)->format('ymdhhmmssSS');
|
// $timestamp = \Carbon\Carbon::createFromTimestamp($this->entity->updated_at)->format('ymdhhmmssSS');
|
||||||
// $hash = sha1($adjustment.$notes.$this->entity->status_id.$this->entity->client_id.$this->entity->amount.$this->entity->balance.$this->entity->company_id.Activity::UPDATE_INVOICE);
|
// $hash = sha1($adjustment.$notes.$this->entity->status_id.$this->entity->client_id.$this->entity->amount.$this->entity->balance.$this->entity->company_id.Activity::UPDATE_INVOICE);
|
||||||
|
@ -11,20 +11,20 @@
|
|||||||
|
|
||||||
namespace App\Services\Pdf;
|
namespace App\Services\Pdf;
|
||||||
|
|
||||||
use App\Models\Company;
|
|
||||||
use App\Models\Invoice;
|
|
||||||
use App\Utils\HtmlEngine;
|
|
||||||
use App\Models\QuoteInvitation;
|
|
||||||
use App\Utils\VendorHtmlEngine;
|
|
||||||
use App\Models\CreditInvitation;
|
|
||||||
use App\Utils\PhantomJS\Phantom;
|
|
||||||
use App\Models\InvoiceInvitation;
|
|
||||||
use App\Utils\HostedPDF\NinjaPdf;
|
|
||||||
use App\Utils\Traits\Pdf\PdfMaker;
|
|
||||||
use App\Jobs\Invoice\CreateEInvoice;
|
use App\Jobs\Invoice\CreateEInvoice;
|
||||||
|
use App\Models\Company;
|
||||||
|
use App\Models\CreditInvitation;
|
||||||
|
use App\Models\Invoice;
|
||||||
|
use App\Models\InvoiceInvitation;
|
||||||
use App\Models\PurchaseOrderInvitation;
|
use App\Models\PurchaseOrderInvitation;
|
||||||
use App\Utils\Traits\Pdf\PageNumbering;
|
use App\Models\QuoteInvitation;
|
||||||
use App\Models\RecurringInvoiceInvitation;
|
use App\Models\RecurringInvoiceInvitation;
|
||||||
|
use App\Utils\HostedPDF\NinjaPdf;
|
||||||
|
use App\Utils\HtmlEngine;
|
||||||
|
use App\Utils\PhantomJS\Phantom;
|
||||||
|
use App\Utils\Traits\Pdf\PageNumbering;
|
||||||
|
use App\Utils\Traits\Pdf\PdfMaker;
|
||||||
|
use App\Utils\VendorHtmlEngine;
|
||||||
use horstoeko\zugferd\ZugferdDocumentPdfBuilder;
|
use horstoeko\zugferd\ZugferdDocumentPdfBuilder;
|
||||||
|
|
||||||
class PdfService
|
class PdfService
|
||||||
@ -179,8 +179,9 @@ class PdfService
|
|||||||
*/
|
*/
|
||||||
private function checkEInvoice(string $pdf): string
|
private function checkEInvoice(string $pdf): string
|
||||||
{
|
{
|
||||||
if(!$this->config->entity instanceof Invoice)
|
if(!$this->config->entity instanceof Invoice) {
|
||||||
return $pdf;
|
return $pdf;
|
||||||
|
}
|
||||||
|
|
||||||
$e_invoice_type = $this->config->settings->e_invoice_type;
|
$e_invoice_type = $this->config->settings->e_invoice_type;
|
||||||
|
|
||||||
|
@ -85,8 +85,9 @@ class TaxSummaryReport extends BaseExport
|
|||||||
$this->csv->insertOne([ctrans('texts.tax_summary')]);
|
$this->csv->insertOne([ctrans('texts.tax_summary')]);
|
||||||
$this->csv->insertOne([ctrans('texts.created_on'),' ',$this->translateDate(now()->format('Y-m-d'), $this->company->date_format(), $this->company->locale())]);
|
$this->csv->insertOne([ctrans('texts.created_on'),' ',$this->translateDate(now()->format('Y-m-d'), $this->company->date_format(), $this->company->locale())]);
|
||||||
|
|
||||||
if($this->input['date_range'] != 'all')
|
if($this->input['date_range'] != 'all') {
|
||||||
$this->csv->insertOne([ctrans('texts.date_range'),' ',$this->translateDate($this->start_date, $this->company->date_format(), $this->company->locale()),' - ',$this->translateDate($this->end_date, $this->company->date_format(), $this->company->locale())]);
|
$this->csv->insertOne([ctrans('texts.date_range'),' ',$this->translateDate($this->start_date, $this->company->date_format(), $this->company->locale()),' - ',$this->translateDate($this->end_date, $this->company->date_format(), $this->company->locale())]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,32 +11,32 @@
|
|||||||
|
|
||||||
namespace App\Services\Template;
|
namespace App\Services\Template;
|
||||||
|
|
||||||
use App\Models\User;
|
|
||||||
use App\Models\Quote;
|
|
||||||
use App\Utils\Number;
|
|
||||||
use Twig\Error\Error;
|
|
||||||
use App\Models\Client;
|
use App\Models\Client;
|
||||||
|
use App\Models\Company;
|
||||||
use App\Models\Credit;
|
use App\Models\Credit;
|
||||||
use App\Models\Design;
|
use App\Models\Design;
|
||||||
use App\Models\Vendor;
|
|
||||||
use App\Models\Company;
|
|
||||||
use App\Models\Invoice;
|
use App\Models\Invoice;
|
||||||
use App\Models\Payment;
|
use App\Models\Payment;
|
||||||
use App\Models\Project;
|
use App\Models\Project;
|
||||||
use App\Utils\HtmlEngine;
|
|
||||||
use Twig\Error\LoaderError;
|
|
||||||
use Twig\Error\SyntaxError;
|
|
||||||
use Twig\Error\RuntimeError;
|
|
||||||
use App\Models\PurchaseOrder;
|
use App\Models\PurchaseOrder;
|
||||||
use App\Utils\VendorHtmlEngine;
|
use App\Models\Quote;
|
||||||
use Twig\Sandbox\SecurityError;
|
|
||||||
use App\Models\RecurringInvoice;
|
use App\Models\RecurringInvoice;
|
||||||
|
use App\Models\User;
|
||||||
|
use App\Models\Vendor;
|
||||||
|
use App\Utils\HostedPDF\NinjaPdf;
|
||||||
|
use App\Utils\HtmlEngine;
|
||||||
|
use App\Utils\Number;
|
||||||
use App\Utils\PaymentHtmlEngine;
|
use App\Utils\PaymentHtmlEngine;
|
||||||
use App\Utils\Traits\MakesDates;
|
use App\Utils\Traits\MakesDates;
|
||||||
use App\Utils\HostedPDF\NinjaPdf;
|
|
||||||
use App\Utils\Traits\Pdf\PdfMaker;
|
use App\Utils\Traits\Pdf\PdfMaker;
|
||||||
use Twig\Extra\Intl\IntlExtension;
|
use App\Utils\VendorHtmlEngine;
|
||||||
use League\CommonMark\CommonMarkConverter;
|
use League\CommonMark\CommonMarkConverter;
|
||||||
|
use Twig\Error\Error;
|
||||||
|
use Twig\Error\LoaderError;
|
||||||
|
use Twig\Error\RuntimeError;
|
||||||
|
use Twig\Error\SyntaxError;
|
||||||
|
use Twig\Extra\Intl\IntlExtension;
|
||||||
|
use Twig\Sandbox\SecurityError;
|
||||||
|
|
||||||
class TemplateService
|
class TemplateService
|
||||||
{
|
{
|
||||||
@ -104,8 +104,9 @@ class TemplateService
|
|||||||
|
|
||||||
$filter = new \Twig\TwigFilter('sum', function (?array $array, ?string $column) {
|
$filter = new \Twig\TwigFilter('sum', function (?array $array, ?string $column) {
|
||||||
|
|
||||||
if(!is_array($array))
|
if(!is_array($array)) {
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return array_sum(array_column($array, $column));
|
return array_sum(array_column($array, $column));
|
||||||
});
|
});
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Imdhemy\Purchases\Events\AppStore\Refund;
|
|
||||||
use Imdhemy\Purchases\Events\AppStore\DidRenew;
|
|
||||||
use Imdhemy\Purchases\Events\AppStore\DidFailToRenew;
|
|
||||||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionPaused;
|
|
||||||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionExpired;
|
|
||||||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionRenewed;
|
|
||||||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionRevoked;
|
|
||||||
use Imdhemy\Purchases\Events\AppStore\DidChangeRenewalStatus;
|
use Imdhemy\Purchases\Events\AppStore\DidChangeRenewalStatus;
|
||||||
|
use Imdhemy\Purchases\Events\AppStore\DidFailToRenew;
|
||||||
|
use Imdhemy\Purchases\Events\AppStore\DidRenew;
|
||||||
use Imdhemy\Purchases\Events\AppStore\InitialBuy;
|
use Imdhemy\Purchases\Events\AppStore\InitialBuy;
|
||||||
use Imdhemy\Purchases\Events\AppStore\InteractiveRenewal;
|
use Imdhemy\Purchases\Events\AppStore\InteractiveRenewal;
|
||||||
|
use Imdhemy\Purchases\Events\AppStore\Refund;
|
||||||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionCanceled;
|
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionCanceled;
|
||||||
|
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionExpired;
|
||||||
|
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionPaused;
|
||||||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionPurchased;
|
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionPurchased;
|
||||||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionRecovered;
|
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionRecovered;
|
||||||
|
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionRenewed;
|
||||||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionRestarted;
|
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionRestarted;
|
||||||
|
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionRevoked;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
/*
|
/*
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
|
|
||||||
namespace Database\Factories;
|
namespace Database\Factories;
|
||||||
|
|
||||||
use App\Utils\Traits\MakesHash;
|
|
||||||
use App\DataMapper\Tax\TaxModel;
|
|
||||||
use App\DataMapper\CompanySettings;
|
use App\DataMapper\CompanySettings;
|
||||||
|
use App\DataMapper\Tax\TaxModel;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
class CompanyFactory extends Factory
|
class CompanyFactory extends Factory
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
namespace Database\Factories;
|
namespace Database\Factories;
|
||||||
|
|
||||||
use App\Models\Quote;
|
|
||||||
use App\Factory\InvoiceItemFactory;
|
use App\Factory\InvoiceItemFactory;
|
||||||
|
use App\Models\Quote;
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
class QuoteFactory extends Factory
|
class QuoteFactory extends Factory
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
use App\Models\GatewayType;
|
use App\Models\GatewayType;
|
||||||
use App\Models\PaymentType;
|
use App\Models\PaymentType;
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration {
|
||||||
/**
|
/**
|
||||||
@ -16,8 +14,7 @@ return new class extends Migration {
|
|||||||
{
|
{
|
||||||
$pt = PaymentType::find(49);
|
$pt = PaymentType::find(49);
|
||||||
|
|
||||||
if(!$pt)
|
if(!$pt) {
|
||||||
{
|
|
||||||
$type = new PaymentType();
|
$type = new PaymentType();
|
||||||
$type->id = 49;
|
$type->id = 49;
|
||||||
$type->name = 'BACS';
|
$type->name = 'BACS';
|
||||||
@ -27,8 +24,7 @@ return new class extends Migration {
|
|||||||
|
|
||||||
$gt = GatewayType::find(24);
|
$gt = GatewayType::find(24);
|
||||||
|
|
||||||
if(!$gt)
|
if(!$gt) {
|
||||||
{
|
|
||||||
$type = new GatewayType();
|
$type = new GatewayType();
|
||||||
$type->id = 24;
|
$type->id = 24;
|
||||||
$type->alias = 'bacs';
|
$type->alias = 'bacs';
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -2,12 +2,9 @@
|
|||||||
|
|
||||||
use App\DataMapper\ClientRegistrationFields;
|
use App\DataMapper\ClientRegistrationFields;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
@ -23,8 +20,7 @@ return new class extends Migration
|
|||||||
$crfs = ClientRegistrationFields::generate();
|
$crfs = ClientRegistrationFields::generate();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($crfs as $key => $crf)
|
foreach($crfs as $key => $crf) {
|
||||||
{
|
|
||||||
$crfs[$key]['visible'] = $crfs[$key]['required'];
|
$crfs[$key]['visible'] = $crfs[$key]['required'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
@ -25,8 +24,9 @@ return new class extends Migration
|
|||||||
|
|
||||||
$settings = $company->settings;
|
$settings = $company->settings;
|
||||||
|
|
||||||
if(!property_exists($settings, 'show_task_item_description'))
|
if(!property_exists($settings, 'show_task_item_description')) {
|
||||||
$company->saveSettings((array)$company->settings, $company);
|
$company->saveSettings((array)$company->settings, $company);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -4,8 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use App\Libraries\MultiDB;
|
|
||||||
use App\Models\CompanyUser;
|
use App\Models\CompanyUser;
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -1,19 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Utils\Ninja;
|
use App\Models\BankTransaction;
|
||||||
use App\Models\Client;
|
use App\Models\Client;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use App\Models\Product;
|
|
||||||
use App\Models\GatewayType;
|
use App\Models\GatewayType;
|
||||||
use App\Models\PaymentType;
|
use App\Models\PaymentType;
|
||||||
use App\Models\BankTransaction;
|
use App\Models\Product;
|
||||||
|
use App\Utils\Ninja;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
use MakesHash;
|
use MakesHash;
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
|
@ -4,8 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use App\DataMapper\Tax\TaxModel;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use App\Models\Language;
|
use App\Models\Language;
|
||||||
use App\DataMapper\Tax\TaxModel;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
@ -25,8 +24,7 @@ return new class extends Migration
|
|||||||
Language::create(['id' => 38, 'name' => 'Khmer', 'locale' => 'km_KH']);
|
Language::create(['id' => 38, 'name' => 'Khmer', 'locale' => 'km_KH']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Schema::hasColumn('companies', 'enable_e_invoice'))
|
if (Schema::hasColumn('companies', 'enable_e_invoice')) {
|
||||||
{
|
|
||||||
Schema::table('companies', function (Blueprint $table) {
|
Schema::table('companies', function (Blueprint $table) {
|
||||||
$table->dropColumn('enable_e_invoice');
|
$table->dropColumn('enable_e_invoice');
|
||||||
});
|
});
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Models\Language;
|
use App\Models\Language;
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Models\Gateway;
|
use App\Models\Gateway;
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
@ -15,8 +12,7 @@ return new class extends Migration
|
|||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
|
|
||||||
if(!Gateway::find(60))
|
if(!Gateway::find(60)) {
|
||||||
{
|
|
||||||
|
|
||||||
$fields = new \stdClass;
|
$fields = new \stdClass;
|
||||||
$fields->clientId = "";
|
$fields->clientId = "";
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Models\Language;
|
use App\Models\Language;
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -2,11 +2,8 @@
|
|||||||
|
|
||||||
use App\Models\Currency;
|
use App\Models\Currency;
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -4,8 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -4,8 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user