Merge pull request #7850 from turbo124/v5-stable

v5.5.26
This commit is contained in:
David Bomba 2022-10-06 08:23:05 +11:00 committed by GitHub
commit 4853b7b680
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 149322 additions and 149325 deletions

View File

@ -1 +1 @@
5.5.25
5.5.26

View File

@ -703,13 +703,23 @@ class CheckData extends Command
->count();
if($count == 0){
$this->logMessage("# {$client->id} # {$client->name} {$client->balance} is invalid should be 0");
//factor in over payments to the client balance
$over_payment = Payment::where('client_id', $client->id)
->where('is_deleted', 0)
->whereIn('status_id', [1,4])
->selectRaw('sum(amount - applied) as p')
->pluck('p')
->first();
if($this->option('client_balance')){
$this->logMessage("# {$client->id} # {$client->name} {$client->balance} is invalid should be {$over_payment}");
if($this->option('client_balance') && (floatval($over_payment) != floatval($client->balance) )){
$this->logMessage("# {$client->id} " . $client->present()->name().' - '.$client->number." Fixing {$client->balance} to 0");
$client->balance = 0;
$client->balance = $over_payment * -1;
$client->save();
}

View File

@ -90,7 +90,7 @@ class SwissQrGenerator
$this->client->address1 ? substr($this->client->address1, 0 , 70) : '',
$this->client->address2 ? substr($this->client->address2, 0 , 16) : '',
$this->client->postal_code ? substr($this->client->postal_code, 0, 16) : '',
$this->client->city ? substr($this->client->postal_code, 0, 35) : '',
$this->client->city ? substr($this->client->city, 0, 35) : '',
'CH'
));
@ -173,4 +173,4 @@ class SwissQrGenerator
}
}
}

View File

@ -40,7 +40,10 @@ class WePayController extends BaseController
$company = Company::where('company_key', $hash['company_key'])->firstOrFail();
$data['user_id'] = $user->id;
$data['company'] = $company;
$data['user_company'] = $company;
// $data['company_key'] = $company->company_key;
// $data['db'] = $company->db;
$wepay_driver = new WePayPaymentDriver(new CompanyGateway, null, null);

View File

@ -158,6 +158,10 @@ class StoreClientRequest extends Request
unset($input['number']);
}
if (array_key_exists('name', $input)) {
$input['name'] = strip_tags($input['name']);
}
$this->replace($input);
}

View File

@ -112,6 +112,10 @@ class UpdateClientRequest extends Request
$input['settings'] = $this->filterSaveableSettings($input['settings']);
}
if (array_key_exists('name', $input)) {
$input['name'] = strip_tags($input['name']);
}
$this->replace($input);
}

View File

@ -65,15 +65,15 @@ class StoreCompanyRequest extends Request
$input['google_analytics_key'] = $input['google_analytics_url'];
}
$company_settings = CompanySettings::defaults();
// $company_settings = CompanySettings::defaults();
//@todo this code doesn't make sense as we never return $company_settings anywhere
//@deprecated???
if (array_key_exists('settings', $input) && ! empty($input['settings'])) {
foreach ($input['settings'] as $key => $value) {
$company_settings->{$key} = $value;
}
}
// if (array_key_exists('settings', $input) && ! empty($input['settings'])) {
// foreach ($input['settings'] as $key => $value) {
// $company_settings->{$key} = $value;
// }
// }
if (array_key_exists('portal_domain', $input)) {
$input['portal_domain'] = strtolower($input['portal_domain']);

View File

@ -85,6 +85,14 @@ class StoreUserRequest extends Request
];
}
if (array_key_exists('first_name', $input)) {
$input['first_name'] = strip_tags($input['first_name']);
}
if (array_key_exists('last_name', $input)) {
$input['last_name'] = strip_tags($input['last_name']);
}
$this->replace($input);
}

View File

@ -49,6 +49,14 @@ class UpdateUserRequest extends Request
$input['email'] = trim($input['email']);
}
if (array_key_exists('first_name', $input)) {
$input['first_name'] = strip_tags($input['first_name']);
}
if (array_key_exists('last_name', $input)) {
$input['last_name'] = strip_tags($input['last_name']);
}
$this->replace($input);
}
}

View File

@ -37,7 +37,7 @@ class AdjustProductInventory implements ShouldQueue
public array $old_invoice;
public function __construct(Company $company, Invoice $invoice, ?array $old_invoice = [])
public function __construct(Company $company, Invoice $invoice, $old_invoice = [])
{
$this->company = $company;
$this->invoice = $invoice;

View File

@ -91,7 +91,8 @@ class TemplateEmail extends Mailable
if (strlen($settings->bcc_email) > 1) {
if (Ninja::isHosted()) {
$bccs = explode(',', str_replace(' ', '', $settings->bcc_email));
$this->bcc(reset($bccs)); //remove whitespace if any has been inserted.
$this->bcc(array_slice($bccs, 0, 2));
//$this->bcc(reset($bccs)); //remove whitespace if any has been inserted.
} else {
$this->bcc(explode(',', str_replace(' ', '', $settings->bcc_email)));
}//remove whitespace if any has been inserted.
@ -116,11 +117,6 @@ class TemplateEmail extends Mailable
'whitelabel' => $this->client->user->account->isPaid() ? true : false,
'logo' => $this->company->present()->logo($settings),
]);
// ->withSymfonyMessage(function ($message) use ($company) {
// $message->getHeaders()->addTextHeader('Tag', $company->company_key);
// $message->invitation = $this->invitation;
//});
// ->tag($company->company_key);
/*In the hosted platform we need to slow things down a little for Storage to catch up.*/

View File

@ -53,6 +53,8 @@ class ACH
public function authorizeView(array $data)
{
$data['gateway'] = $this->forte;
return render('gateways.forte.ach.authorize', $data);
}
@ -81,7 +83,7 @@ class ACH
$this->forte->payment_hash->data = array_merge((array) $this->forte->payment_hash->data, $data);
$this->forte->payment_hash->save();
$data['gateway'] = $this;
$data['gateway'] = $this->forte;
return render('gateways.forte.ach.pay', $data);
}

View File

@ -39,6 +39,7 @@ class SEPA
$data['client'] = $this->stripe->client;
$data['country'] = $this->stripe->client->country->iso_3166_2;
$data['currency'] = $this->stripe->client->currency();
$data['payment_hash'] = 'x';
return render('gateways.stripe.sepa.authorize', $data);
}

View File

@ -41,6 +41,7 @@ class ACH
public function authorizeView($data)
{
$data['gateway'] = $this->wepay_payment_driver;
$data['country_code'] = $this->wepay_payment_driver->client ? $this->wepay_payment_driver->client->country->iso_3166_2 : $this->wepay_payment_driver->company_gateway->company()->iso_3166_2;
return render('gateways.wepay.authorize.bank_transfer', $data);
}

View File

@ -27,7 +27,7 @@ class Setup
{
/*
'user_id',
'company',
'user_company',
*/
return render('gateways.wepay.signup.index', $data);

View File

@ -144,7 +144,7 @@ class PaymentRepository extends BaseRepository {
$invoice_totals = array_sum(array_column($data['invoices'], 'amount'));
$invoices = Invoice::whereIn('id', array_column($data['invoices'], 'invoice_id'))->get();
$invoices = Invoice::withTrashed()->whereIn('id', array_column($data['invoices'], 'invoice_id'))->get();
$payment->invoices()->saveMany($invoices);

View File

@ -44,6 +44,10 @@ class TriggeredActions extends AbstractService
$this->invoice = $this->invoice->service()->markPaid()->save();
}
if ($this->request->has('mark_sent') && $this->request->input('mark_sent') == 'true') {
$this->invoice = $this->invoice->service()->markSent()->save();
}
if ($this->request->has('amount_paid') && is_numeric($this->request->input('amount_paid'))) {
$this->invoice = $this->invoice->service()->applyPaymentAmount($this->request->input('amount_paid'))->save();
}
@ -53,10 +57,6 @@ class TriggeredActions extends AbstractService
$this->sendEmail();
}
if ($this->request->has('mark_sent') && $this->request->input('mark_sent') == 'true') {
$this->invoice = $this->invoice->service()->markSent()->save();
}
if ($this->request->has('cancel') && $this->request->input('cancel') == 'true') {
$this->invoice = $this->invoice->service()->handleCancellation()->save();
}

View File

@ -33,17 +33,29 @@ class DeletePayment
public function run()
{
if ($this->payment->is_deleted) {
return $this->payment;
}
return $this->setStatus(Payment::STATUS_CANCELLED) //sets status of payment
->updateCreditables() //return the credits first
->adjustInvoices()
->updateClient()
->deletePaymentables()
->cleanupPayment()
->save();
\DB::connection(config('database.default'))->transaction(function () {
if ($this->payment->is_deleted) {
return $this->payment;
}
$this->payment = Payment::withTrashed()->where('id', $this->payment->id)->lockForUpdate()->first();
$this->setStatus(Payment::STATUS_CANCELLED) //sets status of payment
->updateCreditables() //return the credits first
->adjustInvoices()
->updateClient()
->deletePaymentables()
->cleanupPayment()
->save();
}, 2);
return $this->payment;
}
private function cleanupPayment()

View File

@ -114,6 +114,22 @@ class Helpers
return '';
}
// 04-10-2022 Return Early if no reserved keywords are present, this is a very expenseive process
$string_hit = false;
foreach ( [':MONTH',':YEAR',':QUARTER',':WEEK'] as $string )
{
if(stripos($value, $string) !== FALSE) {
$string_hit = true;
}
}
if(!$string_hit)
return $value;
// 04-10-2022 Return Early if no reserved keywords are present, this is a very expenseive process
Carbon::setLocale($entity->locale());
$replacements = [

View File

@ -33,6 +33,9 @@ use Illuminate\Support\Str;
*/
trait GeneratesConvertedQuoteCounter
{
private int $update_counter;
private function harvestQuoteCounter($quote, $invoice, Client $client)
{
$settings = $client->getMergedSettings();

View File

@ -34,6 +34,9 @@ use Illuminate\Support\Str;
*/
trait GeneratesCounter
{
private int $update_counter;
//todo in the form validation, we need to ensure that if a prefix and pattern is set we throw a validation error,
//only one type is allow else this will cause confusion to the end user
@ -418,7 +421,7 @@ trait GeneratesCounter
$check_counter = 1;
do {
$number = $this->padCounter($counter, $padding);
$number = $this->applyNumberPattern($entity, $number, $pattern);
@ -432,12 +435,16 @@ trait GeneratesCounter
if ($check_counter > 100) {
$this->update_counter = $counter--;
return $number.'_'.Str::random(5);
}
} while ($check);
$this->update_counter = $counter--;
return $number;
}
@ -469,7 +476,8 @@ trait GeneratesCounter
$settings->{$counter_name} = 1;
}
$settings->{$counter_name} = $settings->{$counter_name} + 1;
// $settings->{$counter_name} = $settings->{$counter_name} + 1;
$settings->{$counter_name} = $this->update_counter;
$entity->settings = $settings;

View File

@ -264,7 +264,8 @@ trait MakesInvoiceValues
* @return array
*/
public function transformLineItems($items, $table_type = '$product') :array
{
{ //$start = microtime(true);
$entity = $this->client ? $this->client : $this->company;
$data = [];
@ -274,6 +275,8 @@ trait MakesInvoiceValues
$locale_info = localeconv();
$entity_currency = $entity->currency();
foreach ($items as $key => $item) {
if ($table_type == '$product' && $item->type_id != 1) {
if ($item->type_id != 4 && $item->type_id != 6 && $item->type_id != 5) {
@ -297,13 +300,13 @@ trait MakesInvoiceValues
$data[$key][$table_type.'.notes'] = Helpers::processReservedKeywords($item->notes, $entity);
$data[$key][$table_type.'.description'] = Helpers::processReservedKeywords($item->notes, $entity);
$data[$key][$table_type.".{$_table_type}1"] = $helpers->formatCustomFieldValue($this->company->custom_fields, "{$_table_type}1", $item->custom_value1, $entity);
$data[$key][$table_type.".{$_table_type}2"] = $helpers->formatCustomFieldValue($this->company->custom_fields, "{$_table_type}2", $item->custom_value2, $entity);
$data[$key][$table_type.".{$_table_type}3"] = $helpers->formatCustomFieldValue($this->company->custom_fields, "{$_table_type}3", $item->custom_value3, $entity);
$data[$key][$table_type.".{$_table_type}4"] = $helpers->formatCustomFieldValue($this->company->custom_fields, "{$_table_type}4", $item->custom_value4, $entity);
$data[$key][$table_type.".{$_table_type}1"] = strlen($item->custom_value1) > 1 ? $helpers->formatCustomFieldValue($this->company->custom_fields, "{$_table_type}1", $item->custom_value1, $entity) : '';
$data[$key][$table_type.".{$_table_type}2"] = strlen($item->custom_value1) > 2 ? $helpers->formatCustomFieldValue($this->company->custom_fields, "{$_table_type}2", $item->custom_value2, $entity) : '';
$data[$key][$table_type.".{$_table_type}3"] = strlen($item->custom_value1) > 3 ? $helpers->formatCustomFieldValue($this->company->custom_fields, "{$_table_type}3", $item->custom_value3, $entity) : '';
$data[$key][$table_type.".{$_table_type}4"] = strlen($item->custom_value1) > 4 ? $helpers->formatCustomFieldValue($this->company->custom_fields, "{$_table_type}4", $item->custom_value4, $entity) : '';
if ($item->quantity > 0 || $item->cost > 0) {
$data[$key][$table_type.'.quantity'] = Number::formatValueNoTrailingZeroes($item->quantity, $entity->currency());
$data[$key][$table_type.'.quantity'] = Number::formatValueNoTrailingZeroes($item->quantity, $entity_currency);
$data[$key][$table_type.'.unit_cost'] = Number::formatMoneyNoRounding($item->cost, $entity);
@ -357,6 +360,8 @@ trait MakesInvoiceValues
$data[$key]['task_id'] = property_exists($item, 'task_id') ? $item->task_id : '';
}
//nlog(microtime(true) - $start);
return $data;
}

View File

@ -14,8 +14,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => '5.5.25',
'app_tag' => '5.5.25',
'app_version' => '5.5.26',
'app_tag' => '5.5.26',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''),

View File

@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('clients', function (Blueprint $table) {
$table->index([\DB::raw('client_hash(20)')]);
});
Schema::table('client_contacts', function (Blueprint $table) {
$table->index([\DB::raw('contact_key(20)')]);
$table->index('email');
});
Schema::table('vendor_contacts', function (Blueprint $table) {
$table->index([\DB::raw('contact_key(20)')]);
$table->index('email');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
};

View File

@ -41,6 +41,12 @@ CREATE TABLE `accounts` (
`hosted_client_count` int(10) unsigned DEFAULT NULL,
`hosted_company_count` int(10) unsigned DEFAULT NULL,
`inapp_transaction_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`set_react_as_default_ap` tinyint(1) NOT NULL DEFAULT 0,
`is_flagged` tinyint(1) NOT NULL DEFAULT 0,
`is_verified_account` tinyint(1) NOT NULL DEFAULT 0,
`account_sms_verification_code` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`account_sms_verification_number` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`account_sms_verified` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `accounts_payment_id_index` (`payment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
@ -75,6 +81,8 @@ CREATE TABLE `activities` (
`recurring_invoice_id` int(10) unsigned DEFAULT NULL,
`recurring_expense_id` int(10) unsigned DEFAULT NULL,
`recurring_quote_id` int(10) unsigned DEFAULT NULL,
`purchase_order_id` int(10) unsigned DEFAULT NULL,
`vendor_contact_id` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `activities_vendor_id_company_id_index` (`vendor_id`,`company_id`),
KEY `activities_project_id_company_id_index` (`project_id`,`company_id`),
@ -88,6 +96,10 @@ CREATE TABLE `activities` (
KEY `activities_expense_id_company_id_index` (`expense_id`,`company_id`),
KEY `activities_client_contact_id_company_id_index` (`client_contact_id`,`company_id`),
KEY `activities_company_id_foreign` (`company_id`),
KEY `activities_quote_id_company_id_index` (`quote_id`,`company_id`),
KEY `activities_recurring_invoice_id_company_id_index` (`recurring_invoice_id`,`company_id`),
KEY `activities_purchase_order_id_company_id_index` (`purchase_order_id`,`company_id`),
KEY `activities_vendor_contact_id_company_id_index` (`vendor_contact_id`,`company_id`),
CONSTRAINT `activities_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -210,6 +222,8 @@ CREATE TABLE `client_contacts` (
KEY `client_contacts_company_id_index` (`company_id`),
KEY `client_contacts_client_id_index` (`client_id`),
KEY `client_contacts_user_id_index` (`user_id`),
KEY `client_contacts_contact_key(20)_index` (`contact_key`(20)),
KEY `client_contacts_email_index` (`email`),
CONSTRAINT `client_contacts_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -321,6 +335,7 @@ CREATE TABLE `clients` (
KEY `clients_size_id_foreign` (`size_id`),
KEY `clients_company_id_index` (`company_id`),
KEY `clients_user_id_index` (`user_id`),
KEY `clients_client_hash(20)_index` (`client_hash`(20)),
CONSTRAINT `clients_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `clients_industry_id_foreign` FOREIGN KEY (`industry_id`) REFERENCES `industries` (`id`),
CONSTRAINT `clients_size_id_foreign` FOREIGN KEY (`size_id`) REFERENCES `sizes` (`id`)
@ -393,6 +408,13 @@ CREATE TABLE `companies` (
`markdown_email_enabled` tinyint(1) NOT NULL DEFAULT 0,
`stop_on_unpaid_recurring` tinyint(1) NOT NULL DEFAULT 0,
`use_quote_terms_on_conversion` tinyint(1) NOT NULL DEFAULT 0,
`enable_applying_payments` tinyint(1) NOT NULL DEFAULT 0,
`track_inventory` tinyint(1) NOT NULL DEFAULT 0,
`inventory_notification_threshold` int(11) NOT NULL DEFAULT 0,
`stock_notification` tinyint(1) NOT NULL DEFAULT 1,
`enabled_expense_tax_rates` int(10) unsigned NOT NULL DEFAULT 0,
`invoice_task_project` tinyint(1) NOT NULL DEFAULT 0,
`report_include_deleted` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `companies_company_key_unique` (`company_key`),
KEY `companies_industry_id_foreign` (`industry_id`),
@ -833,12 +855,14 @@ DROP TABLE IF EXISTS `failed_jobs`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `failed_jobs` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`uuid` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `gateway_types`;
@ -1009,6 +1033,8 @@ CREATE TABLE `invoices` (
KEY `invoices_company_id_deleted_at_index` (`company_id`,`deleted_at`),
KEY `invoices_client_id_index` (`client_id`),
KEY `invoices_company_id_index` (`company_id`),
KEY `invoices_recurring_id_index` (`recurring_id`),
KEY `invoices_status_id_balance_index` (`status_id`,`balance`),
CONSTRAINT `invoices_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `invoices_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `invoices_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
@ -1054,6 +1080,7 @@ CREATE TABLE `licenses` (
`is_claimed` tinyint(1) DEFAULT NULL,
`transaction_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`product_id` int(10) unsigned DEFAULT NULL,
`recurring_invoice_id` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `licenses_license_key_unique` (`license_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
@ -1092,6 +1119,7 @@ CREATE TABLE `payment_hashes` (
`updated_at` timestamp(6) NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `payment_hashes_payment_id_foreign` (`payment_id`),
KEY `payment_hashes_hash_index` (`hash`),
CONSTRAINT `payment_hashes_payment_id_foreign` FOREIGN KEY (`payment_id`) REFERENCES `payments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -1152,6 +1180,7 @@ CREATE TABLE `paymentables` (
`deleted_at` timestamp(6) NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `paymentables_payment_id_foreign` (`payment_id`),
KEY `paymentables_paymentable_id_index` (`paymentable_id`),
CONSTRAINT `paymentables_payment_id_foreign` FOREIGN KEY (`payment_id`) REFERENCES `payments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -1193,8 +1222,10 @@ CREATE TABLE `payments` (
`custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`idempotency_key` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `payments_company_id_number_unique` (`company_id`,`number`),
UNIQUE KEY `payments_company_id_idempotency_key_unique` (`company_id`,`idempotency_key`),
KEY `payments_company_id_deleted_at_index` (`company_id`,`deleted_at`),
KEY `payments_client_contact_id_foreign` (`client_contact_id`),
KEY `payments_company_gateway_id_foreign` (`company_gateway_id`),
@ -1202,6 +1233,8 @@ CREATE TABLE `payments` (
KEY `payments_company_id_index` (`company_id`),
KEY `payments_client_id_index` (`client_id`),
KEY `payments_status_id_index` (`status_id`),
KEY `payments_transaction_reference_index` (`transaction_reference`),
KEY `payments_idempotency_key_index` (`idempotency_key`),
CONSTRAINT `payments_client_contact_id_foreign` FOREIGN KEY (`client_contact_id`) REFERENCES `client_contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `payments_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `payments_company_gateway_id_foreign` FOREIGN KEY (`company_gateway_id`) REFERENCES `company_gateways` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
@ -1238,10 +1271,14 @@ CREATE TABLE `products` (
`created_at` timestamp(6) NULL DEFAULT NULL,
`updated_at` timestamp(6) NULL DEFAULT NULL,
`is_deleted` tinyint(1) NOT NULL DEFAULT 0,
`in_stock_quantity` int(11) NOT NULL DEFAULT 0,
`stock_notification` tinyint(1) NOT NULL DEFAULT 1,
`stock_notification_threshold` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `products_company_id_deleted_at_index` (`company_id`,`deleted_at`),
KEY `products_user_id_foreign` (`user_id`),
KEY `products_company_id_index` (`company_id`),
KEY `pro_co_us_up_index` (`company_id`,`user_id`,`assigned_user_id`,`updated_at`),
CONSTRAINT `products_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `products_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
@ -1280,6 +1317,118 @@ CREATE TABLE `projects` (
CONSTRAINT `projects_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `purchase_order_invitations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `purchase_order_invitations` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`company_id` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`vendor_contact_id` int(10) unsigned NOT NULL,
`purchase_order_id` bigint(20) unsigned NOT NULL,
`key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`transaction_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`message_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`email_error` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`signature_base64` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`signature_date` datetime DEFAULT NULL,
`sent_date` datetime DEFAULT NULL,
`viewed_date` datetime DEFAULT NULL,
`opened_date` datetime DEFAULT NULL,
`created_at` timestamp(6) NULL DEFAULT NULL,
`updated_at` timestamp(6) NULL DEFAULT NULL,
`deleted_at` timestamp(6) NULL DEFAULT NULL,
`email_status` enum('delivered','bounced','spam') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `vendor_purchase_unique` (`vendor_contact_id`,`purchase_order_id`),
KEY `purchase_order_invitations_user_id_foreign` (`user_id`),
KEY `purchase_order_invitations_company_id_foreign` (`company_id`),
KEY `vendor_purchase_company_index` (`deleted_at`,`purchase_order_id`,`company_id`),
KEY `purchase_order_invitations_purchase_order_id_index` (`purchase_order_id`),
KEY `purchase_order_invitations_key_index` (`key`),
KEY `purchase_order_invitations_message_id_index` (`message_id`),
CONSTRAINT `purchase_order_invitations_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `purchase_order_invitations_purchase_order_id_foreign` FOREIGN KEY (`purchase_order_id`) REFERENCES `purchase_orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `purchase_order_invitations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `purchase_order_invitations_vendor_contact_id_foreign` FOREIGN KEY (`vendor_contact_id`) REFERENCES `vendor_contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `purchase_orders`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `purchase_orders` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`client_id` int(10) unsigned DEFAULT NULL,
`user_id` int(10) unsigned NOT NULL,
`assigned_user_id` int(10) unsigned DEFAULT NULL,
`company_id` int(10) unsigned NOT NULL,
`status_id` int(10) unsigned NOT NULL,
`project_id` int(10) unsigned DEFAULT NULL,
`vendor_id` int(10) unsigned DEFAULT NULL,
`recurring_id` int(10) unsigned DEFAULT NULL,
`design_id` int(10) unsigned DEFAULT NULL,
`invoice_id` int(10) unsigned DEFAULT NULL,
`number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`discount` double(8,2) NOT NULL DEFAULT 0.00,
`is_amount_discount` tinyint(1) NOT NULL DEFAULT 0,
`po_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`date` date DEFAULT NULL,
`last_sent_date` datetime DEFAULT NULL,
`due_date` date DEFAULT NULL,
`is_deleted` tinyint(1) NOT NULL DEFAULT 0,
`line_items` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`backup` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`footer` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`public_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`private_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`terms` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`tax_name1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`tax_rate1` decimal(20,6) NOT NULL DEFAULT 0.000000,
`tax_name2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`tax_rate2` decimal(20,6) NOT NULL DEFAULT 0.000000,
`tax_name3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`tax_rate3` decimal(20,6) NOT NULL DEFAULT 0.000000,
`total_taxes` decimal(20,6) NOT NULL DEFAULT 0.000000,
`uses_inclusive_taxes` tinyint(1) NOT NULL DEFAULT 0,
`reminder1_sent` date DEFAULT NULL,
`reminder2_sent` date DEFAULT NULL,
`reminder3_sent` date DEFAULT NULL,
`reminder_last_sent` date DEFAULT NULL,
`custom_value1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`custom_value2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`custom_value3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`custom_value4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`next_send_date` datetime DEFAULT NULL,
`custom_surcharge1` decimal(20,6) DEFAULT NULL,
`custom_surcharge2` decimal(20,6) DEFAULT NULL,
`custom_surcharge3` decimal(20,6) DEFAULT NULL,
`custom_surcharge4` decimal(20,6) DEFAULT NULL,
`custom_surcharge_tax1` tinyint(1) NOT NULL DEFAULT 0,
`custom_surcharge_tax2` tinyint(1) NOT NULL DEFAULT 0,
`custom_surcharge_tax3` tinyint(1) NOT NULL DEFAULT 0,
`custom_surcharge_tax4` tinyint(1) NOT NULL DEFAULT 0,
`exchange_rate` decimal(20,6) NOT NULL DEFAULT 1.000000,
`balance` decimal(20,6) NOT NULL,
`partial` decimal(20,6) DEFAULT NULL,
`amount` decimal(20,6) NOT NULL,
`paid_to_date` decimal(20,6) NOT NULL DEFAULT 0.000000,
`partial_due_date` datetime DEFAULT NULL,
`last_viewed` datetime DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`expense_id` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `purchase_orders_user_id_foreign` (`user_id`),
KEY `purchase_orders_company_id_deleted_at_index` (`company_id`,`deleted_at`),
KEY `purchase_orders_client_id_index` (`client_id`),
KEY `purchase_orders_company_id_index` (`company_id`),
KEY `purchase_orders_expense_id_index` (`expense_id`),
CONSTRAINT `purchase_orders_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `purchase_orders_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `purchase_orders_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `quote_invitations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
@ -1388,6 +1537,7 @@ CREATE TABLE `quotes` (
KEY `quotes_company_id_deleted_at_index` (`company_id`,`deleted_at`),
KEY `quotes_client_id_index` (`client_id`),
KEY `quotes_company_id_index` (`company_id`),
KEY `quotes_company_id_updated_at_index` (`company_id`,`updated_at`),
CONSTRAINT `quotes_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `quotes_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `quotes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
@ -1447,6 +1597,7 @@ CREATE TABLE `recurring_expenses` (
`last_sent_date` datetime DEFAULT NULL,
`next_send_date` datetime DEFAULT NULL,
`remaining_cycles` int(11) DEFAULT NULL,
`next_send_date_client` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `recurring_expenses_company_id_number_unique` (`company_id`,`number`),
KEY `recurring_expenses_company_id_deleted_at_index` (`company_id`,`deleted_at`),
@ -1555,6 +1706,7 @@ CREATE TABLE `recurring_invoices` (
`exchange_rate` decimal(13,6) NOT NULL DEFAULT 1.000000,
`paid_to_date` decimal(20,6) NOT NULL DEFAULT 0.000000,
`subscription_id` int(10) unsigned DEFAULT NULL,
`next_send_date_client` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `recurring_invoices_company_id_number_unique` (`company_id`,`number`),
KEY `recurring_invoices_company_id_deleted_at_index` (`company_id`,`deleted_at`),
@ -1676,6 +1828,27 @@ CREATE TABLE `recurring_quotes` (
CONSTRAINT `recurring_quotes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `schedulers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `schedulers` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`paused` tinyint(1) NOT NULL DEFAULT 0,
`is_deleted` tinyint(1) NOT NULL DEFAULT 0,
`repeat_every` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`start_from` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`scheduled_run` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`company_id` bigint(20) unsigned NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`action_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`action_class` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`parameters` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `schedulers_action_name_index` (`action_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `sizes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
@ -1917,9 +2090,10 @@ CREATE TABLE `users` (
`created_at` timestamp(6) NULL DEFAULT NULL,
`updated_at` timestamp(6) NULL DEFAULT NULL,
`deleted_at` timestamp(6) NULL DEFAULT NULL,
`oauth_user_refresh_token` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`oauth_user_refresh_token` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`last_confirmed_email_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`has_password` tinyint(1) NOT NULL DEFAULT 0,
`oauth_user_token_expiry` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`),
UNIQUE KEY `users_oauth_user_id_oauth_provider_id_unique` (`oauth_user_id`,`oauth_provider_id`),
@ -1972,6 +2146,8 @@ CREATE TABLE `vendor_contacts` (
KEY `vendor_contacts_user_id_foreign` (`user_id`),
KEY `vendor_contacts_vendor_id_index` (`vendor_id`),
KEY `vendor_contacts_company_id_email_deleted_at_index` (`company_id`,`email`,`deleted_at`),
KEY `vendor_contacts_contact_key(20)_index` (`contact_key`(20)),
KEY `vendor_contacts_email_index` (`email`),
CONSTRAINT `vendor_contacts_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `vendor_contacts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `vendor_contacts_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
@ -2182,3 +2358,35 @@ INSERT INTO `migrations` VALUES (128,'2022_05_08_004937_heal_stripe_gateway_conf
INSERT INTO `migrations` VALUES (129,'2022_05_16_224917_add_auto_bill_tries_to_invoices_table',1);
INSERT INTO `migrations` VALUES (130,'2022_05_18_055442_update_custom_value_four_columns',1);
INSERT INTO `migrations` VALUES (131,'2022_05_23_050754_drop_redundant_column_show_production_description_dropdown',1);
INSERT INTO `migrations` VALUES (132,'2022_04_14_121548_forte_payment_gateway',2);
INSERT INTO `migrations` VALUES (133,'2022_05_18_162152_create_scheduled_jobs_table',2);
INSERT INTO `migrations` VALUES (134,'2022_05_18_162443_create_schedulers_table',2);
INSERT INTO `migrations` VALUES (135,'2022_05_28_234651_create_purchase_orders_table',2);
INSERT INTO `migrations` VALUES (136,'2022_05_30_181109_drop_scheduled_jobs_table',2);
INSERT INTO `migrations` VALUES (137,'2022_05_30_184320_add_job_related_fields_to_schedulers_table',2);
INSERT INTO `migrations` VALUES (138,'2022_05_31_101504_inventory_management_schema',2);
INSERT INTO `migrations` VALUES (139,'2022_06_01_215859_set_recurring_client_timestamp',2);
INSERT INTO `migrations` VALUES (140,'2022_06_01_224339_create_purchase_order_invitations_table',2);
INSERT INTO `migrations` VALUES (141,'2022_06_10_030503_set_account_flag_for_react',2);
INSERT INTO `migrations` VALUES (142,'2022_06_16_025156_add_react_switching_flag',2);
INSERT INTO `migrations` VALUES (143,'2022_06_17_082627_change_refresh_token_column_size',2);
INSERT INTO `migrations` VALUES (144,'2022_06_21_104350_fixes_for_description_in_pdf_designs',2);
INSERT INTO `migrations` VALUES (145,'2022_06_22_090547_set_oauth_expiry_column',2);
INSERT INTO `migrations` VALUES (146,'2022_06_24_141018_upgrade_failed_jobs_table',2);
INSERT INTO `migrations` VALUES (147,'2022_06_30_000126_add_flag_to_accounts_table',2);
INSERT INTO `migrations` VALUES (148,'2022_07_06_080127_add_purchase_order_to_expense',2);
INSERT INTO `migrations` VALUES (149,'2022_07_09_235510_add_index_to_payment_hash',2);
INSERT INTO `migrations` VALUES (150,'2022_07_18_033756_fixes_for_date_formats_table_react',2);
INSERT INTO `migrations` VALUES (151,'2022_07_21_023805_add_hebrew_language',2);
INSERT INTO `migrations` VALUES (152,'2022_07_26_091216_add_sms_verification_to_hosted_account',2);
INSERT INTO `migrations` VALUES (153,'2022_07_28_232340_enabled_expense_tax_rates_to_companies_table',2);
INSERT INTO `migrations` VALUES (154,'2022_07_29_091235_correction_for_companies_table_types',2);
INSERT INTO `migrations` VALUES (155,'2022_08_11_011534_licenses_table_for_self_host',2);
INSERT INTO `migrations` VALUES (156,'2022_08_24_215917_invoice_task_project_companies_table',2);
INSERT INTO `migrations` VALUES (157,'2022_08_26_232500_add_email_status_column_to_purchase_order_invitations_table',2);
INSERT INTO `migrations` VALUES (158,'2022_08_28_210111_add_index_to_payments_table',2);
INSERT INTO `migrations` VALUES (159,'2022_09_05_024719_update_designs_for_tech_template',2);
INSERT INTO `migrations` VALUES (160,'2022_09_07_101731_add_reporting_option_to_companies_table',2);
INSERT INTO `migrations` VALUES (161,'2022_09_21_012417_add_threeds_to_braintree',2);
INSERT INTO `migrations` VALUES (162,'2022_09_30_235337_add_idempotency_key_to_payments',2);
INSERT INTO `migrations` VALUES (163,'2022_10_05_205645_add_indexes_to_client_hash',2);

View File

@ -4219,7 +4219,7 @@ $LANG = array(
'max_companies_desc' => 'You have reached your maximum number of companies. Delete existing companies to migrate new ones.',
'migration_already_completed' => 'Company already migrated',
'migration_already_completed_desc' => 'Looks like you already migrated <b> :company_name </b>to the V5 version of the Invoice Ninja. In case you want to start over, you can force migrate to wipe existing data.',
'payment_method_cannot_be_authorized_first' => 'This payment method can be can saved for future use, once you complete your first transaction. Don\'t forget to check "Store credit card details" during payment process.',
'payment_method_cannot_be_authorized_first' => 'This payment method can be can saved for future use, once you complete your first transaction. Don\'t forget to check "Store details" during payment process.',
'new_account' => 'New account',
'activity_100' => ':user created recurring invoice :recurring_invoice',
'activity_101' => ':user updated recurring invoice :recurring_invoice',

View File

@ -4,9 +4,9 @@ const TEMP = 'flutter-temp-cache';
const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {
"favicon.png": "dca91c54388f52eded692718d5a98b8b",
"main.dart.js": "e339f12c38421420b7a8d4c647c41252",
"main.dart.js": "5b1a19e00c074ba73b725b51f90da896",
"favicon.ico": "51636d3a390451561744c42188ccd628",
"/": "a521806c672349a6153841b796d093fd",
"/": "eb40da80095b8fd3e80ef1eeb7fb0e22",
"flutter.js": "f85e6fb278b0fd20c349186fb46ae36d",
"manifest.json": "ef43d90e57aa7682d7e2cfba2f484a40",
"canvaskit/canvaskit.js": "2bc454a691c631b07a9307ac4ca47797",

141856
public/main.dart.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

149816
public/main.foss.dart.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,78 +7,14 @@
@else
<meta name="stripe-publishable-key" content="{{ $gateway->company_gateway->getPublishableKey() }}">
@endif
@endsection
@section('gateway_content')
@if(session()->has('sepa_error'))
<div class="alert alert-failure mb-4">
<p>{{ session('sepa_error') }}</p>
</div>
@endif
<form action="{{ route('client.payment_methods.store', ['method' => App\Models\GatewayType::SEPA]) }}" method="post" id="server_response">
@csrf
@component('portal.ninja2020.components.general.card-element-single', ['title' => 'SEPA', 'show_title' => false])
{{ __('texts.payment_method_cannot_be_authorized_first') }}
@endcomponent
<input type="hidden" name="company_gateway_id" value="{{ $gateway->company_gateway->id }}">
<input type="hidden" name="gateway_type_id" value="{{ $payment_method_id }}">
<input type="hidden" name="gateway_response" id="gateway_response">
<input type="hidden" name="payment_hash" value="{{ $payment_hash }}">
<input type="hidden" name="is_default" id="is_default">
</form>
<div class="alert alert-failure mb-4" hidden id="errors"></div>
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.account_holder_type')])
<span class="flex items-center mr-4">
<input class="form-radio mr-2" type="radio" value="individual" name="account-holder-type" checked>
<span>{{ __('texts.individual_account') }}</span>
</span>
<span class="flex items-center">
<input class="form-radio mr-2" type="radio" value="company" name="account-holder-type">
<span>{{ __('texts.company_account') }}</span>
</span>
@endcomponent
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.account_holder_name')])
<input class="input w-full" id="account-holder-name" type="text" placeholder="{{ ctrans('texts.name') }}" required>
@endcomponent
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.country')])
<select name="countries" id="country" class="form-select input w-full bg-white" required>
@foreach($countries as $country)
<option value="{{ $country->iso_3166_2 }}">{{ $country->iso_3166_2 }} ({{ $country->name }})</option>
@endforeach
</select>
@endcomponent
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.currency')])
<select name="currencies" id="currency" class="form-select input w-full">
@foreach($currencies as $currency)
<option value="{{ $currency->code }}">{{ $currency->code }} ({{ $currency->name }})</option>
@endforeach
</select>
@endcomponent
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.routing_number')])
<input class="input w-full" id="routing-number" type="text" required>
@endcomponent
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.account_number')])
<input class="input w-full" id="account-number" type="text" required>
@endcomponent
@component('portal.ninja2020.components.general.card-element-single')
<input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required>
<label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->user()->company->present()->name, 'email' => auth()->guard('contact')->user()->client->company->settings->email]) }}</label>
@endcomponent
@component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'save-button'])
{{ ctrans('texts.add_payment_method') }}
@endcomponent
@endsection
@section('gateway_footer')
<script src="https://js.stripe.com/v3/"></script>
<script src="{{ asset('js/clients/payments/stripe-sepa.js') }}"></script>
@endsection

View File

@ -7,7 +7,7 @@
<img src="{{ asset('images/wepay.svg') }}" alt="We Pay">
</div>
@livewire('wepay-signup', ['user_id' => $user_id, 'company' => $company])
@livewire('wepay-signup', ['user_id' => $user_id, 'company' => $user_company])
</div>
@endsection

View File

@ -179,7 +179,7 @@ class GeneratesCounterTest extends TestCase
$invoice_number = $this->getNextInvoiceNumber($this->client->fresh(), $this->invoice->fresh());
$this->assertEquals($invoice_number, '0002');
$this->assertEquals($invoice_number, '0003');
}
public function testQuoteNumberValue()
@ -351,7 +351,7 @@ class GeneratesCounterTest extends TestCase
$invoice_number = $this->getNextInvoiceNumber($cliz->fresh(), $this->invoice);
$this->assertEquals($invoice_number, '0002');
$this->assertEquals($invoice_number, '0003');
}
public function testClientNumber()