1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 00:11:35 +02:00

Merge pull request #7919 from turbo124/v5-develop

Bug fixes and improvements
This commit is contained in:
David Bomba 2022-11-04 16:32:09 +11:00 committed by GitHub
commit 42ba197a6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
216 changed files with 688 additions and 202 deletions

View File

@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
operating-system: ['ubuntu-20.04', 'ubuntu-22.04']
php-versions: ['8.1']
php-versions: ['8.1.11']
phpunit-versions: ['latest']
env:

View File

@ -0,0 +1,80 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\Analytics;
use Turbo124\Beacon\ExampleMetric\GenericMixedMetric;
class AccountSignup extends GenericMixedMetric
{
/**
* The type of Sample.
*
* Monotonically incrementing counter
*
* - counter
*
* @var string
*/
public $type = 'mixed_metric';
/**
* The name of the counter.
* @var string
*/
public $name = 'account.signup';
/**
* The datetime of the counter measurement.
*
* date("Y-m-d H:i:s")
*
* @var DateTime
*/
public $datetime;
/**
* The Class failure name
* set to 0.
*
* @var string
*/
public $string_metric5 = 'plan';
/**
* The exception string
* set to 0.
*
* @var string
*/
public $string_metric6 = 'term';
/**
* The counter
* set to 1.
*
* @var string
*/
public $int_metric1 = 1;
/**
* Company Key
* @var string
*/
public $string_metric7 = 'key';
public function __construct($string_metric5, $string_metric6, $string_metric7)
{
$this->string_metric5 = $string_metric5 ?: 'free';
$this->string_metric6 = $string_metric6 ?: 'year';
$this->string_metric7 = $string_metric7;
}
}

View File

@ -174,6 +174,20 @@ class Yodlee
}
public function getAccount($account_id)
{
$token = $this->getAccessToken();
$response = Http::withHeaders($this->getHeaders(["Authorization" => "Bearer {$token}"]))->get($this->getEndpoint(). "/accounts/{$account_id}", []);
if($response->successful())
return true;
if($response->failed())
return false;
}
public function deleteAccount($account_id)
{

View File

@ -33,6 +33,8 @@ class YodleeController extends BaseController
$company = $request->getCompany();
//ensure user is enterprise!!
if($company->account->bank_integration_account_id){
$flow = 'edit';

View File

@ -126,7 +126,7 @@ class ImportController extends Controller
private function getEntityMap($entity_type)
{
return sprintf('App\\Import\\Definitions\%sMap', ucfirst($entity_type));
return sprintf('App\\Import\\Definitions\%sMap', ucfirst(Str::camel($entity_type)));
}
private function getCsvData($csvfile)

View File

@ -26,7 +26,7 @@
* @OA\Property(property="tax_name3", type="string", example="", description="The tax name"),
* @OA\Property(property="tax_rate3", type="number", format="float", example="10.00", description="The tax rate"),
* @OA\Property(property="total_taxes", type="number", format="float", example="10.00", description="The total taxes for the quote"),
* @OA\Property(property="line_items", type="object", example="[{"product_key":"test", "unit_cost":10},{"product_key":"test", "unit_cost":10}]", description="An array of line items of the quote"),
* @OA\Property(property="line_items", type="object", example="", description="An array of line items of the quote"),
* @OA\Property(property="amount", type="number", format="float", example="10.00", description="The total amount of the quote"),
* @OA\Property(property="balance", type="number", format="float", example="10.00", description="The balance due of the quote"),
* @OA\Property(property="paid_to_date", type="number", format="float", example="10.00", description="The amount that has been paid to date on the quote"),

View File

@ -97,6 +97,11 @@ class TwilioController extends BaseController
$account->account_sms_verified = true;
$account->save();
//on confirmation we set the users phone number.
$user = auth()->user();
$user->phone = $account->account_sms_verification_number;
$user->save();
return response()->json(['message' => 'SMS verified'], 200);
}

View File

@ -33,9 +33,9 @@ class MatchBankTransactionRequest extends Request
'transactions' => 'bail|array',
'transactions.*.id' => 'bail|required',
'transactions.*.invoice_ids' => 'nullable|string|sometimes',
'transactions.*.ninja_category_id' => 'nullable|string|sometimes'
];
$rules['transactions.*.ninja_category_id'] = 'bail|nullable|sometimes|exists:expense_categories,id,company_id,'.auth()->user()->company()->id.',is_deleted,0';
$rules['transactions.*.vendor_id'] = 'bail|sometimes|exists:vendors,id,company_id,'.auth()->user()->company()->id.',is_deleted,0';
return $rules;

View File

@ -16,6 +16,7 @@ use App\Factory\UserFactory;
use App\Http\Requests\Request;
use App\Http\ValidationRules\Ninja\CanAddUserRule;
use App\Http\ValidationRules\User\AttachableUser;
use App\Http\ValidationRules\User\HasValidPhoneNumber;
use App\Http\ValidationRules\ValidUserForCompany;
use App\Libraries\MultiDB;
use App\Models\User;
@ -49,6 +50,7 @@ class StoreUserRequest extends Request
if (Ninja::isHosted()) {
$rules['id'] = new CanAddUserRule();
$rules['phone'] = ['sometimes', new HasValidPhoneNumber()];
}
return $rules;

View File

@ -13,9 +13,14 @@ namespace App\Http\Requests\User;
use App\Http\Requests\Request;
use App\Http\ValidationRules\UniqueUserRule;
use App\Http\ValidationRules\User\HasValidPhoneNumber;
use App\Utils\Ninja;
class UpdateUserRequest extends Request
{
private bool $phone_has_changed = false;
/**
* Determine if the user is authorized to make this request.
*
@ -38,6 +43,9 @@ class UpdateUserRequest extends Request
$rules['email'] = ['email', 'sometimes', new UniqueUserRule($this->user, $input['email'])];
}
if(Ninja::isHosted() && $this->phone_has_changed)
$rules['phone'] = ['sometimes', new HasValidPhoneNumber()];
return $rules;
}
@ -57,6 +65,10 @@ class UpdateUserRequest extends Request
$input['last_name'] = strip_tags($input['last_name']);
}
if(array_key_exists('phone', $input) && strlen($input['phone']) > 1 && ($this->user->phone != $input['phone']))
$this->phone_has_changed = true;
$this->replace($input);
}
}

View File

@ -0,0 +1,80 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Http\ValidationRules\User;
use App\Models\CompanyUser;
use App\Models\User;
use Illuminate\Contracts\Validation\Rule;
/**
* Class HasValidPhoneNumber.
*/
class HasValidPhoneNumber implements Rule
{
public $message;
public function __construct()
{
}
public function message()
{
return [
'phone' => ctrans('texts.phone_validation_error'),
];
}
/**
* @param string $attribute
* @param mixed $value
* @return bool
*/
public function passes($attribute, $value)
{
$sid = config('ninja.twilio_account_sid');
$token = config('ninja.twilio_auth_token');
if(!$sid)
return true;
$twilio = new \Twilio\Rest\Client($sid, $token);
$country = auth()->user()->account?->companies()?->first()?->country();
if(!$country || strlen(auth()->user()->phone) < 2)
return true;
$countryCode = $country->iso_3166_2;
try{
$phone_number = $twilio->lookups->v1->phoneNumbers($value)
->fetch(["countryCode" => $countryCode]);
$user = auth()->user();
request()->merge(['validated_phone' => $phone_number->phoneNumber ]);
$user->verified_phone_number = true;
$user->save();
return true;
}
catch(\Exception $e) {
return false;
}
}
}

View File

@ -46,11 +46,14 @@ use App\Repositories\PaymentRepository;
use App\Repositories\ProductRepository;
use App\Repositories\QuoteRepository;
use App\Repositories\VendorRepository;
use App\Utils\Traits\MakesHash;
use Illuminate\Support\Facades\Validator;
use Symfony\Component\HttpFoundation\ParameterBag;
class Csv extends BaseImport implements ImportInterface
{
use MakesHash;
public array $entity_count = [];
public function import(string $entity)
@ -77,24 +80,20 @@ class Csv extends BaseImport implements ImportInterface
$data = $this->getCsvData($entity_type);
if (is_array($data)) {
if (is_array($data))
{
$data = $this->preTransformCsv($data, $entity_type);
if(array_key_exists('bank_integration_id', $this->request)){
foreach($data as $key => $value)
{
$data['bank_integration_id'][$key] = $this->request['bank_integration_id'];
}
foreach($data as $key => $value)
{
$data[$key]['bank.bank_integration_id'] = $this->decodePrimaryKey($this->request['bank_integration_id']);
}
}
if (empty($data)) {
$this->entity_count['bank_transactions'] = 0;
return;
}
@ -102,6 +101,8 @@ class Csv extends BaseImport implements ImportInterface
$this->repository_name = BankTransactionRepository::class;
$this->factory_name = BankTransactionFactory::class;
$this->repository = app()->make($this->repository_name);
$this->transformer = new BankTransformer($this->company);
$bank_transaction_count = $this->ingest($data, $entity_type);
$this->entity_count['bank_transactions'] = $bank_transaction_count;

View File

@ -68,6 +68,11 @@ class BaseTransformer
}
public function getNumber($data, $field)
{
return (isset($data->$field) && $data->$field) ? (int)$data->$field : 0;
}
public function getString($data, $field)
{
return isset($data[$field]) && $data[$field] ? trim($data[$field]) : '';

View File

@ -11,6 +11,7 @@
namespace App\Import\Transformer\Csv;
use App\DataMapper\ClientSettings;
use App\Import\ImportException;
use App\Import\Transformer\BaseTransformer;
use Illuminate\Support\Str;
@ -31,7 +32,7 @@ class ClientTransformer extends BaseTransformer
throw new ImportException('Client already exists');
}
$settings = new \stdClass();
$settings = ClientSettings::defaults();
$settings->currency_id = (string) $this->getCurrencyByCode($data);
return [

View File

@ -12,7 +12,7 @@
namespace App\Import\Transformers\Bank;
use App\Import\ImportException;
use App\Import\Transformers\BaseTransformer;
use App\Import\Transformer\BaseTransformer;
use App\Models\BankTransaction;
use App\Utils\Number;
@ -31,17 +31,17 @@ class BankTransformer extends BaseTransformer
$now = now();
$transformed = [
// 'bank_integration_id' => $this->bank_integration->id,
'bank_integration_id' => $transaction['bank.bank_integration_id'],
'transaction_id' => $this->getNumber($transaction,'bank.transaction_id'),
'amount' => abs($this->getFloat($transaction, 'bank.amount')),
'currency_id' => $this->getCurrencyByCode($transaction, 'bank.currency'),
'account_type' => strlen($this->getString($transaction, 'bank.account_type')) > 1 ? $this->getString($transaction, 'bank.account_type') : 'bank',
'category_id' => $this->getNumber($transaction, 'bank.category_id') > 0 ? $this->getNumber($transaction, 'bank.category_id') : null,
'category_type' => $this->getString($transaction, 'category_type'),
'date' => array_key_exists('date', $transaction) ? date('Y-m-d', strtotime(str_replace("/","-",$transaction['date'])))
'category_type' => $this->getString($transaction, 'bank.category_type'),
'date' => array_key_exists('bank.date', $transaction) ? $this->parseDate($transaction['bank.date'])
: now()->format('Y-m-d'),
'bank_account_id' => array_key_exists('bank_account_id', $transaction) ? $transaction['bank_account_id'] : 0,
'description' => array_key_exists('description', $transaction)? $transaction['description'] : '',
'bank_account_id' => array_key_exists('bank.bank_account_id', $transaction) ? $transaction['bank.bank_account_id'] : 0,
'description' => array_key_exists('bank.description', $transaction) ? $transaction['bank.description'] : '',
'base_type' => $this->calculateType($transaction),
'created_at' => $now,
'updated_at' => $now,
@ -56,22 +56,22 @@ class BankTransformer extends BaseTransformer
private function calculateType($transaction)
{
if(array_key_exists('base_type', $transaction) && $transaction['base_type'] == 'CREDIT')
if(array_key_exists('bank.base_type', $transaction) && $transaction['bank.base_type'] == 'CREDIT')
return 'CREDIT';
if(array_key_exists('base_type', $transaction) && $transaction['base_type'] == 'DEBIT')
if(array_key_exists('bank.base_type', $transaction) && $transaction['bank.base_type'] == 'DEBIT')
return 'DEBIT';
if(array_key_exists('category_id',$transaction))
if(array_key_exists('bank.category_id', $transaction))
return 'DEBIT';
if(array_key_exists('category_type', $transaction) && $transaction['category_type'] == 'Income')
if(array_key_exists('bank.category_type', $transaction) && $transaction['bank.category_type'] == 'Income')
return 'CREDIT';
if(array_key_exists('category_type', $transaction))
if(array_key_exists('bank.category_type', $transaction))
return 'DEBIT';
if(array_key_exists('amount', $transaction) && is_numeric($transaction['amount']) && $transaction['amount'] > 0)
if(array_key_exists('bank.amount', $transaction) && is_numeric($transaction['bank.amount']) && $transaction['bank.amount'] > 0)
return 'CREDIT';
return 'DEBIT';

View File

@ -68,7 +68,13 @@ class ProcessBankTransactions implements ShouldQueue
do{
$this->processTransactions();
try {
$this->processTransactions();
}
catch(\Exception $e) {
nlog("{$this->bank_integration_account_id} - exited abnormally => ". $e->getMessage());
return;
}
}
while($this->stop_loop);
@ -83,6 +89,14 @@ class ProcessBankTransactions implements ShouldQueue
$yodlee = new Yodlee($this->bank_integration_account_id);
if(!$yodlee->getAccount($this->bank_integration->bank_account_id))
{
$this->bank_integration->disabled_upstream = true;
$this->bank_integration->save();
$this->stop_loop = false;
return;
}
$data = [
'top' => 500,
'fromDate' => $this->from_date,
@ -102,7 +116,8 @@ class ProcessBankTransactions implements ShouldQueue
//if no transactions, update the from_date and move on
if(count($transactions) == 0){
$this->bank_integration->from_date = now();
$this->bank_integration->from_date = now()->subDays(2);
$this->bank_integration->disabled_upstream = false;
$this->bank_integration->save();
$this->stop_loop = false;
return;
@ -144,8 +159,7 @@ class ProcessBankTransactions implements ShouldQueue
if($count < 500){
$this->stop_loop = false;
$this->bank_integration->from_date = now();
$this->bank_integration->from_date = now()->subDays(2);
$this->bank_integration->save();
}

View File

@ -133,10 +133,7 @@ class NinjaMailerJob implements ShouldQueue
$this->nmo = null;
$this->company = null;
$mem_usage = memory_get_usage();
nlog('The script is now using: ' . round($mem_usage / 1024) . 'KBof memory.');
app('queue.worker')->shouldQuit = 1;
} catch (\Exception | \RuntimeException | \Google\Service\Exception $e) {
@ -179,7 +176,6 @@ class NinjaMailerJob implements ShouldQueue
$message = null;
$this->nmo = null;
$this->company = null;
app('queue.worker')->shouldQuit = 1;
}
@ -232,8 +228,34 @@ class NinjaMailerJob implements ShouldQueue
break;
}
if(Ninja::isSelfHost())
$this->setSelfHostMultiMailer();
}
private function setSelfHostMultiMailer()
{
if (env($this->company->id . '_MAIL_HOST'))
{
config([
'mail.mailers.smtp' => [
'transport' => 'smtp',
'host' => env($this->company->id . '_MAIL_HOST'),
'port' => env($this->company->id . '_MAIL_PORT'),
'username' => env($this->company->id . '_MAIL_USERNAME'),
'password' => env($this->company->id . '_MAIL_PASSWORD'),
],
]);
}
}
private function setOfficeMailer()
{
$sending_user = $this->nmo->settings->gmail_sending_user_id;

View File

@ -64,8 +64,8 @@ class BankTransactionSync implements ShouldQueue
// $queue = Ninja::isHosted() ? 'bank' : 'default';
// if($account->isPaid())
// {
if($account->isPaid() && $account->plan == 'enterprise')
{
$account->bank_integrations->each(function ($bank_integration) use ($account){
@ -73,7 +73,7 @@ class BankTransactionSync implements ShouldQueue
});
// }
}
});
}

View File

@ -0,0 +1,83 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Jobs\User;
use App\DataMapper\CompanySettings;
use App\DataMapper\DefaultSettings;
use App\Events\User\UserWasCreated;
use App\Libraries\MultiDB;
use App\Models\User;
use App\Utils\Ninja;
use App\Utils\Traits\MakesHash;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Http\Request;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class VerifyPhone implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels, MakesHash;
/**
* Create a new job instance.
*
* @param User $user
*/
public function __construct(private User $user){}
/**
* Execute the job.
*
* @return User|null
*/
public function handle() : void
{
MultiDB::checkUserEmailExists($this->user->email);
$sid = config('ninja.twilio_account_sid');
$token = config('ninja.twilio_auth_token');
if(!$sid)
return; // no twilio api credentials provided, bail.
$twilio = new \Twilio\Rest\Client($sid, $token);
$country = $this->user->account?->companies()?->first()?->country();
if(!$country || strlen($this->user->phone) < 2)
return;
$countryCode = $country->iso_3166_2;
try{
$phone_number = $twilio->lookups->v1->phoneNumbers($this->user->phone)
->fetch(["countryCode" => $countryCode]);
}
catch(\Exception $e) {
$this->user->verified_phone_number = false;
$this->user->save();
}
if($phone_number && strlen($phone_number->phoneNumber) > 1)
{
$this->user->phone = $phone_number->phoneNumber;
$this->user->verified_phone_number = true;
$this->user->save();
}
}
}

View File

@ -575,7 +575,7 @@ class Import implements ShouldQueue
foreach ($data as $resource) {
$modified = $resource;
unset($modified['id']);
unset($modified['password']); //cant import passwords.
// unset($modified['password']); //cant import passwords.
unset($modified['confirmation_code']); //cant import passwords.
unset($modified['oauth_user_id']);
unset($modified['oauth_provider_id']);
@ -587,6 +587,7 @@ class Import implements ShouldQueue
if($modified['deleted_at'])
$user->deleted_at = now();
$user->password = $modified['password'];
$user->save();
$user_agent = array_key_exists('token_name', $resource) ?: request()->server('HTTP_USER_AGENT');

View File

@ -12,6 +12,7 @@
namespace App\Jobs\Util;
use App\Models\Account;
use App\Utils\Ninja;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
@ -38,6 +39,10 @@ class SchedulerCheck implements ShouldQueue
{
set_time_limit(0);
if(Ninja::isHosted())
return;
if (config('ninja.app_version') != base_path('VERSION.txt')) {
try {
Artisan::call('migrate', ['--force' => true]);

View File

@ -11,7 +11,9 @@
namespace App\Observers;
use App\Jobs\User\VerifyPhone;
use App\Models\User;
use App\Utils\Ninja;
class UserObserver
{
@ -23,7 +25,9 @@ class UserObserver
*/
public function created(User $user)
{
if (Ninja::isHosted() && isset($user->phone)) {
VerifyPhone::dispatch($user);
}
}
/**
@ -34,7 +38,9 @@ class UserObserver
*/
public function updated(User $user)
{
// if (Ninja::isHosted() && $user->isDirty('phone')) {
// VerifyPhone::dispatch($user);
// }
}
/**

View File

@ -130,13 +130,38 @@ class CreditCard implements MethodInterface
$http_status_code = $e->http_status_code;
$error_details = $e->error_details;
throw new PaymentFailed($e->getMessage());
if(is_array($error_details)) {
$error_details = end($e->error_details['error_codes']);
}
$human_exception = $error_details ? new \Exception($error_details, 400) : $e;
throw new PaymentFailed($human_exception);
} catch (CheckoutArgumentException $e) {
// Bad arguments
throw new PaymentFailed($e->getMessage());
$error_details = $e->error_details;
if(is_array($error_details)) {
$error_details = end($e->error_details['error_codes']);
}
$human_exception = $error_details ? new \Exception($error_details, 400) : $e;
throw new PaymentFailed($human_exception);
} catch (CheckoutAuthorizationException $e) {
// Bad Invalid authorization
throw new PaymentFailed($e->getMessage());
$error_details = $e->error_details;
if(is_array($error_details)) {
$error_details = end($e->error_details['error_codes']);
}
$human_exception = $error_details ? new \Exception($error_details, 400) : $e;
throw new PaymentFailed($human_exception);
}
}
@ -230,7 +255,6 @@ class CreditCard implements MethodInterface
}
try {
// $response = $this->checkout->gateway->payments()->request($payment);
$response = $this->checkout->gateway->getPaymentsClient()->requestPayment($paymentRequest);
@ -265,21 +289,71 @@ class CreditCard implements MethodInterface
$http_status_code = $e->http_status_code;
$error_details = $e->error_details;
if(is_array($error_details)) {
$error_details = end($e->error_details['error_codes']);
}
$this->checkout->unWindGatewayFees($this->checkout->payment_hash);
return $this->checkout->processInternallyFailedPayment($this->checkout, $e);
$human_exception = $error_details ? new \Exception($error_details, 400) : $e;
SystemLogger::dispatch(
$human_exception->getMessage(),
SystemLog::CATEGORY_GATEWAY_RESPONSE,
SystemLog::EVENT_GATEWAY_ERROR,
SystemLog::TYPE_CHECKOUT,
$this->checkout->client,
$this->checkout->client->company,
);
return $this->checkout->processInternallyFailedPayment($this->checkout, $human_exception);
} catch (CheckoutArgumentException $e) {
// Bad arguments
$error_details = $e->error_details;
if(is_array($error_details)) {
$error_details = end($e->error_details['error_codes']);
}
$this->checkout->unWindGatewayFees($this->checkout->payment_hash);
return $this->checkout->processInternallyFailedPayment($this->checkout, $e);
$human_exception = $error_details ? new \Exception($error_details, 400) : $e;
SystemLogger::dispatch(
$human_exception->getMessage(),
SystemLog::CATEGORY_GATEWAY_RESPONSE,
SystemLog::EVENT_GATEWAY_ERROR,
SystemLog::TYPE_CHECKOUT,
$this->checkout->client,
$this->checkout->client->company,
);
return $this->checkout->processInternallyFailedPayment($this->checkout, $human_exception);
} catch (CheckoutAuthorizationException $e) {
// Bad Invalid authorization
$error_details = $e->error_details;
if(is_array($error_details)) {
$error_details = end($e->error_details['error_codes']);
}
$this->checkout->unWindGatewayFees($this->checkout->payment_hash);
return $this->checkout->processInternallyFailedPayment($this->checkout, $e);
$human_exception = $error_details ? new \Exception($error_details, 400) : $e;
SystemLogger::dispatch(
$human_exception->getMessage(),
SystemLog::CATEGORY_GATEWAY_RESPONSE,
SystemLog::EVENT_GATEWAY_ERROR,
SystemLog::TYPE_CHECKOUT,
$this->checkout->client,
$this->checkout->client->company,
);
return $this->checkout->processInternallyFailedPayment($this->checkout, $human_exception);
}
}
}

View File

@ -84,10 +84,11 @@ trait Utilities
public function processUnsuccessfulPayment($_payment, $throw_exception = true)
{
$error_message = '';
if (array_key_exists('response_summary', $_payment)) {
$error_message = $_payment['response_summary'];
if (array_key_exists('actions', $_payment) && array_key_exists('response_summary', end($_payment['actions']))) {
$error_message = end($_payment['actions'])['response_summary'];
} elseif (array_key_exists('status', $_payment)) {
$error_message = $_payment['status'];
}

View File

@ -401,8 +401,13 @@ class CheckoutComPaymentDriver extends BaseDriver
$this->unWindGatewayFees($payment_hash);
$message = $e->getMessage();
$error_details = '';
if(property_exists($e, 'error_details'))
$error_details = $e->error_details;
$data = [
'status' => '',
'status' => $e->error_details,
'error_type' => '',
'error_code' => $e->getCode(),
'param' => '',

View File

@ -75,7 +75,15 @@ class ClientRepository extends BaseRepository
$client->country_id = $company->settings->country_id;
}
$client->save();
try{
$client->save();
}
catch(\Exception $e) {
nlog("client save failed");
nlog($data);
}
if (! isset($client->number) || empty($client->number) || strlen($client->number) == 0) {
// $client->number = $this->getNextClientNumber($client);

View File

@ -56,15 +56,12 @@ class UserRepository extends BaseRepository
$company = auth()->user()->company();
$account = $company->account;
/* If hosted and Enterprise we need to increment the num_users field on the accounts table*/
// 05-08-2022 This is an error, the num_users should _never_ increment
// if (! $user->id && $account->isEnterpriseClient()) {
// $account->num_users++;
// $account->save();
// }
if(array_key_exists('oauth_provider_id', $details))
unset($details['oauth_provider_id']);
if (request()->has('validated_phone'))
$details['phone'] = request()->input('validated_phone');
$user->fill($details);
//allow users to change only their passwords - not others!
@ -140,7 +137,7 @@ class UserRepository extends BaseRepository
$cu->forceDelete();
}
event(new UserWasDeleted($user, $company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
event(new UserWasDeleted($user, auth()->user(), $company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
$user->delete();

View File

@ -60,6 +60,7 @@ class BankIntegrationTransformer extends EntityTransformer
'nickname' => (string)$bank_integration->nickname ?: '',
'from_date' => (string)$bank_integration->from_date ?: '',
'is_deleted' => (bool) $bank_integration->is_deleted,
'disabled_upstream' => (bool) $bank_integration->disabled_upstream,
'created_at' => (int) $bank_integration->created_at,
'updated_at' => (int) $bank_integration->updated_at,
'archived_at' => (int) $bank_integration->deleted_at,

View File

@ -267,6 +267,12 @@ class HtmlEngine
$data['$amount_raw'] = ['value' => $this->entity->amount, 'label' => ctrans('texts.amount')];
}
if ($this->entity_string == 'credit' && $this->entity->status_id == 1) {
$data['$balance_due'] = ['value' => Number::formatMoney($this->entity->amount, $this->client) ?: '&nbsp;', 'label' => ctrans('texts.credit_balance')];
$data['$balance_due_raw'] = ['value' => $this->entity->amount, 'label' => ctrans('texts.credit_balance')];
$data['$amount_raw'] = ['value' => $this->entity->amount, 'label' => ctrans('texts.amount')];
}
// $data['$balance_due'] = $data['$balance_due'];
$data['$outstanding'] = &$data['$balance_due'];
$data['$partial_due'] = ['value' => Number::formatMoney($this->entity->partial, $this->client) ?: '&nbsp;', 'label' => ctrans('texts.partial_due')];

0
artisan Executable file → Normal file
View File

0
bootstrap/app.php Executable file → Normal file
View File

0
bootstrap/cache/.gitignore vendored Executable file → Normal file
View File

263
composer.lock generated
View File

@ -378,16 +378,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.240.4",
"version": "3.240.7",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "69c7fa97862694d8c0c03f2e905c7fe05683bee9"
"reference": "afad16e102229de8da15f07cc48436955811ef7f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/69c7fa97862694d8c0c03f2e905c7fe05683bee9",
"reference": "69c7fa97862694d8c0c03f2e905c7fe05683bee9",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/afad16e102229de8da15f07cc48436955811ef7f",
"reference": "afad16e102229de8da15f07cc48436955811ef7f",
"shasum": ""
},
"require": {
@ -466,9 +466,9 @@
"support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.240.4"
"source": "https://github.com/aws/aws-sdk-php/tree/3.240.7"
},
"time": "2022-10-27T19:19:40+00:00"
"time": "2022-11-01T18:23:34+00:00"
},
{
"name": "bacon/bacon-qr-code",
@ -1906,16 +1906,16 @@
},
{
"name": "firebase/php-jwt",
"version": "v6.3.0",
"version": "v6.3.1",
"source": {
"type": "git",
"url": "https://github.com/firebase/php-jwt.git",
"reference": "018dfc4e1da92ad8a1b90adc4893f476a3b41cb8"
"reference": "ddfaddcb520488b42bca3a75e17e9dd53c3667da"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/018dfc4e1da92ad8a1b90adc4893f476a3b41cb8",
"reference": "018dfc4e1da92ad8a1b90adc4893f476a3b41cb8",
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/ddfaddcb520488b42bca3a75e17e9dd53c3667da",
"reference": "ddfaddcb520488b42bca3a75e17e9dd53c3667da",
"shasum": ""
},
"require": {
@ -1962,9 +1962,9 @@
],
"support": {
"issues": "https://github.com/firebase/php-jwt/issues",
"source": "https://github.com/firebase/php-jwt/tree/v6.3.0"
"source": "https://github.com/firebase/php-jwt/tree/v6.3.1"
},
"time": "2022-07-15T16:48:45+00:00"
"time": "2022-11-01T21:20:08+00:00"
},
{
"name": "fruitcake/php-cors",
@ -2164,16 +2164,16 @@
},
{
"name": "google/apiclient-services",
"version": "v0.272.0",
"version": "v0.272.1",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-api-php-client-services.git",
"reference": "52b494231f6b531983d12aefac057d0eeec2861c"
"reference": "436943c42277545c2310fe5852835d7e3628a35a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/52b494231f6b531983d12aefac057d0eeec2861c",
"reference": "52b494231f6b531983d12aefac057d0eeec2861c",
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/436943c42277545c2310fe5852835d7e3628a35a",
"reference": "436943c42277545c2310fe5852835d7e3628a35a",
"shasum": ""
},
"require": {
@ -2202,9 +2202,9 @@
],
"support": {
"issues": "https://github.com/googleapis/google-api-php-client-services/issues",
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.272.0"
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.272.1"
},
"time": "2022-10-21T01:18:13+00:00"
"time": "2022-10-31T01:22:13+00:00"
},
{
"name": "google/auth",
@ -3483,16 +3483,16 @@
},
{
"name": "laravel/framework",
"version": "v9.37.0",
"version": "v9.38.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "0c9675abf6d966e834b2ebeca3319f524e07a330"
"reference": "abf198e443e06696af3f356b44de67c0fa516107"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/0c9675abf6d966e834b2ebeca3319f524e07a330",
"reference": "0c9675abf6d966e834b2ebeca3319f524e07a330",
"url": "https://api.github.com/repos/laravel/framework/zipball/abf198e443e06696af3f356b44de67c0fa516107",
"reference": "abf198e443e06696af3f356b44de67c0fa516107",
"shasum": ""
},
"require": {
@ -3665,7 +3665,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2022-10-25T15:43:46+00:00"
"time": "2022-11-01T14:05:55+00:00"
},
{
"name": "laravel/serializable-closure",
@ -4123,16 +4123,16 @@
},
{
"name": "league/commonmark",
"version": "2.3.5",
"version": "2.3.6",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/commonmark.git",
"reference": "84d74485fdb7074f4f9dd6f02ab957b1de513257"
"reference": "857afc47ce113454bd629037213378ba3219dd40"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/84d74485fdb7074f4f9dd6f02ab957b1de513257",
"reference": "84d74485fdb7074f4f9dd6f02ab957b1de513257",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/857afc47ce113454bd629037213378ba3219dd40",
"reference": "857afc47ce113454bd629037213378ba3219dd40",
"shasum": ""
},
"require": {
@ -4152,7 +4152,7 @@
"erusev/parsedown": "^1.0",
"ext-json": "*",
"github/gfm": "0.29.0",
"michelf/php-markdown": "^1.4",
"michelf/php-markdown": "^1.4 || ^2.0",
"nyholm/psr7": "^1.5",
"phpstan/phpstan": "^1.8.2",
"phpunit/phpunit": "^9.5.21",
@ -4225,7 +4225,7 @@
"type": "tidelift"
}
],
"time": "2022-07-29T10:59:45+00:00"
"time": "2022-10-30T16:45:38+00:00"
},
{
"name": "league/config",
@ -5727,16 +5727,16 @@
},
{
"name": "nunomaduro/termwind",
"version": "v1.14.1",
"version": "v1.14.2",
"source": {
"type": "git",
"url": "https://github.com/nunomaduro/termwind.git",
"reference": "86fc30eace93b9b6d4c844ba6de76db84184e01b"
"reference": "9a8218511eb1a0965629ff820dda25985440aefc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nunomaduro/termwind/zipball/86fc30eace93b9b6d4c844ba6de76db84184e01b",
"reference": "86fc30eace93b9b6d4c844ba6de76db84184e01b",
"url": "https://api.github.com/repos/nunomaduro/termwind/zipball/9a8218511eb1a0965629ff820dda25985440aefc",
"reference": "9a8218511eb1a0965629ff820dda25985440aefc",
"shasum": ""
},
"require": {
@ -5793,7 +5793,7 @@
],
"support": {
"issues": "https://github.com/nunomaduro/termwind/issues",
"source": "https://github.com/nunomaduro/termwind/tree/v1.14.1"
"source": "https://github.com/nunomaduro/termwind/tree/v1.14.2"
},
"funding": [
{
@ -5809,7 +5809,7 @@
"type": "github"
}
],
"time": "2022-10-17T15:20:29+00:00"
"time": "2022-10-28T22:51:32+00:00"
},
{
"name": "nwidart/laravel-modules",
@ -8746,16 +8746,16 @@
},
{
"name": "symfony/console",
"version": "v6.1.6",
"version": "v6.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "7fa3b9cf17363468795e539231a5c91b02b608fc"
"reference": "a1282bd0c096e0bdb8800b104177e2ce404d8815"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/7fa3b9cf17363468795e539231a5c91b02b608fc",
"reference": "7fa3b9cf17363468795e539231a5c91b02b608fc",
"url": "https://api.github.com/repos/symfony/console/zipball/a1282bd0c096e0bdb8800b104177e2ce404d8815",
"reference": "a1282bd0c096e0bdb8800b104177e2ce404d8815",
"shasum": ""
},
"require": {
@ -8822,7 +8822,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v6.1.6"
"source": "https://github.com/symfony/console/tree/v6.1.7"
},
"funding": [
{
@ -8838,7 +8838,7 @@
"type": "tidelift"
}
],
"time": "2022-10-07T08:04:03+00:00"
"time": "2022-10-26T21:42:49+00:00"
},
{
"name": "symfony/css-selector",
@ -8974,16 +8974,16 @@
},
{
"name": "symfony/error-handler",
"version": "v6.1.6",
"version": "v6.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/error-handler.git",
"reference": "49f718e41f1b6f0fd5730895ca5b1c37defd828d"
"reference": "699a26ce5ec656c198bf6e26398b0f0818c7e504"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/49f718e41f1b6f0fd5730895ca5b1c37defd828d",
"reference": "49f718e41f1b6f0fd5730895ca5b1c37defd828d",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/699a26ce5ec656c198bf6e26398b0f0818c7e504",
"reference": "699a26ce5ec656c198bf6e26398b0f0818c7e504",
"shasum": ""
},
"require": {
@ -9025,7 +9025,7 @@
"description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/error-handler/tree/v6.1.6"
"source": "https://github.com/symfony/error-handler/tree/v6.1.7"
},
"funding": [
{
@ -9041,7 +9041,7 @@
"type": "tidelift"
}
],
"time": "2022-10-07T08:04:03+00:00"
"time": "2022-10-28T16:23:08+00:00"
},
{
"name": "symfony/event-dispatcher",
@ -9334,16 +9334,16 @@
},
{
"name": "symfony/http-client",
"version": "v6.1.6",
"version": "v6.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client.git",
"reference": "c8c887f4813370550147afd27d9eb8a8523e53b2"
"reference": "f515d066728774efb34347a87580621416ca8968"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-client/zipball/c8c887f4813370550147afd27d9eb8a8523e53b2",
"reference": "c8c887f4813370550147afd27d9eb8a8523e53b2",
"url": "https://api.github.com/repos/symfony/http-client/zipball/f515d066728774efb34347a87580621416ca8968",
"reference": "f515d066728774efb34347a87580621416ca8968",
"shasum": ""
},
"require": {
@ -9398,7 +9398,7 @@
"description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-client/tree/v6.1.6"
"source": "https://github.com/symfony/http-client/tree/v6.1.7"
},
"funding": [
{
@ -9414,7 +9414,7 @@
"type": "tidelift"
}
],
"time": "2022-10-12T05:10:31+00:00"
"time": "2022-10-28T16:23:08+00:00"
},
{
"name": "symfony/http-client-contracts",
@ -9499,16 +9499,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v6.1.6",
"version": "v6.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "3ae8e9c57155fc48930493a629da293b32efbde0"
"reference": "792a1856d2b95273f0e1c3435785f1d01a60ecc6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/3ae8e9c57155fc48930493a629da293b32efbde0",
"reference": "3ae8e9c57155fc48930493a629da293b32efbde0",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/792a1856d2b95273f0e1c3435785f1d01a60ecc6",
"reference": "792a1856d2b95273f0e1c3435785f1d01a60ecc6",
"shasum": ""
},
"require": {
@ -9554,7 +9554,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v6.1.6"
"source": "https://github.com/symfony/http-foundation/tree/v6.1.7"
},
"funding": [
{
@ -9570,20 +9570,20 @@
"type": "tidelift"
}
],
"time": "2022-10-02T08:30:52+00:00"
"time": "2022-10-12T09:44:59+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v6.1.6",
"version": "v6.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "102f99bf81799e93f61b9a73b2f38b309c587a94"
"reference": "8fc1ffe753948c47a103a809cdd6a4a8458b3254"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/102f99bf81799e93f61b9a73b2f38b309c587a94",
"reference": "102f99bf81799e93f61b9a73b2f38b309c587a94",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/8fc1ffe753948c47a103a809cdd6a4a8458b3254",
"reference": "8fc1ffe753948c47a103a809cdd6a4a8458b3254",
"shasum": ""
},
"require": {
@ -9664,7 +9664,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v6.1.6"
"source": "https://github.com/symfony/http-kernel/tree/v6.1.7"
},
"funding": [
{
@ -9680,20 +9680,20 @@
"type": "tidelift"
}
],
"time": "2022-10-12T07:48:47+00:00"
"time": "2022-10-28T18:06:36+00:00"
},
{
"name": "symfony/intl",
"version": "v6.1.6",
"version": "v6.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/intl.git",
"reference": "9ab546d9054b34feb2cb728349f6b8e8f18d4c43"
"reference": "8025e5b651512b21d3e768321d45a2e5e32e8c66"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/intl/zipball/9ab546d9054b34feb2cb728349f6b8e8f18d4c43",
"reference": "9ab546d9054b34feb2cb728349f6b8e8f18d4c43",
"url": "https://api.github.com/repos/symfony/intl/zipball/8025e5b651512b21d3e768321d45a2e5e32e8c66",
"reference": "8025e5b651512b21d3e768321d45a2e5e32e8c66",
"shasum": ""
},
"require": {
@ -9744,7 +9744,7 @@
"localization"
],
"support": {
"source": "https://github.com/symfony/intl/tree/v6.1.6"
"source": "https://github.com/symfony/intl/tree/v6.1.7"
},
"funding": [
{
@ -9760,20 +9760,20 @@
"type": "tidelift"
}
],
"time": "2022-10-07T08:04:03+00:00"
"time": "2022-10-23T10:33:34+00:00"
},
{
"name": "symfony/mailer",
"version": "v6.1.5",
"version": "v6.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/mailer.git",
"reference": "e1b32deb9efc48def0c76b876860ad36f2123e89"
"reference": "7e19813c0b43387c55665780c4caea505cc48391"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/mailer/zipball/e1b32deb9efc48def0c76b876860ad36f2123e89",
"reference": "e1b32deb9efc48def0c76b876860ad36f2123e89",
"url": "https://api.github.com/repos/symfony/mailer/zipball/7e19813c0b43387c55665780c4caea505cc48391",
"reference": "7e19813c0b43387c55665780c4caea505cc48391",
"shasum": ""
},
"require": {
@ -9818,7 +9818,7 @@
"description": "Helps sending emails",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/mailer/tree/v6.1.5"
"source": "https://github.com/symfony/mailer/tree/v6.1.7"
},
"funding": [
{
@ -9834,7 +9834,7 @@
"type": "tidelift"
}
],
"time": "2022-08-29T06:58:39+00:00"
"time": "2022-10-28T16:23:08+00:00"
},
{
"name": "symfony/mailgun-mailer",
@ -9903,16 +9903,16 @@
},
{
"name": "symfony/mime",
"version": "v6.1.6",
"version": "v6.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/mime.git",
"reference": "5ae192b9a39730435cfec025a499f79d05ac68a3"
"reference": "f440f066d57691088d998d6e437ce98771144618"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/mime/zipball/5ae192b9a39730435cfec025a499f79d05ac68a3",
"reference": "5ae192b9a39730435cfec025a499f79d05ac68a3",
"url": "https://api.github.com/repos/symfony/mime/zipball/f440f066d57691088d998d6e437ce98771144618",
"reference": "f440f066d57691088d998d6e437ce98771144618",
"shasum": ""
},
"require": {
@ -9924,8 +9924,7 @@
"egulias/email-validator": "~3.0.0",
"phpdocumentor/reflection-docblock": "<3.2.2",
"phpdocumentor/type-resolver": "<1.4.0",
"symfony/mailer": "<5.4",
"symfony/serializer": "<5.4.14|>=6.0,<6.0.14|>=6.1,<6.1.6"
"symfony/mailer": "<5.4"
},
"require-dev": {
"egulias/email-validator": "^2.1.10|^3.1",
@ -9933,7 +9932,7 @@
"symfony/dependency-injection": "^5.4|^6.0",
"symfony/property-access": "^5.4|^6.0",
"symfony/property-info": "^5.4|^6.0",
"symfony/serializer": "^5.4.14|~6.0.14|^6.1.6"
"symfony/serializer": "^5.2|^6.0"
},
"type": "library",
"autoload": {
@ -9965,7 +9964,7 @@
"mime-type"
],
"support": {
"source": "https://github.com/symfony/mime/tree/v6.1.6"
"source": "https://github.com/symfony/mime/tree/v6.1.7"
},
"funding": [
{
@ -9981,7 +9980,7 @@
"type": "tidelift"
}
],
"time": "2022-10-07T08:04:03+00:00"
"time": "2022-10-19T08:10:53+00:00"
},
{
"name": "symfony/options-resolver",
@ -11083,16 +11082,16 @@
},
{
"name": "symfony/property-access",
"version": "v5.4.11",
"version": "v5.4.15",
"source": {
"type": "git",
"url": "https://github.com/symfony/property-access.git",
"reference": "c641d63e943ed31981bad4b4dcf29fe7da2ffa8c"
"reference": "0f3e8f40a1d3da90f674b3dd772e4777ccde4273"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/property-access/zipball/c641d63e943ed31981bad4b4dcf29fe7da2ffa8c",
"reference": "c641d63e943ed31981bad4b4dcf29fe7da2ffa8c",
"url": "https://api.github.com/repos/symfony/property-access/zipball/0f3e8f40a1d3da90f674b3dd772e4777ccde4273",
"reference": "0f3e8f40a1d3da90f674b3dd772e4777ccde4273",
"shasum": ""
},
"require": {
@ -11144,7 +11143,7 @@
"reflection"
],
"support": {
"source": "https://github.com/symfony/property-access/tree/v5.4.11"
"source": "https://github.com/symfony/property-access/tree/v5.4.15"
},
"funding": [
{
@ -11160,20 +11159,20 @@
"type": "tidelift"
}
],
"time": "2022-06-27T16:58:25+00:00"
"time": "2022-10-27T07:55:40+00:00"
},
{
"name": "symfony/property-info",
"version": "v6.1.6",
"version": "v6.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/property-info.git",
"reference": "f28d0db9d2687f81d68d0dc6b2e42817647f5d64"
"reference": "b5a46ec66a4b77d4bd39d58c22710be888e55b68"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/property-info/zipball/f28d0db9d2687f81d68d0dc6b2e42817647f5d64",
"reference": "f28d0db9d2687f81d68d0dc6b2e42817647f5d64",
"url": "https://api.github.com/repos/symfony/property-info/zipball/b5a46ec66a4b77d4bd39d58c22710be888e55b68",
"reference": "b5a46ec66a4b77d4bd39d58c22710be888e55b68",
"shasum": ""
},
"require": {
@ -11233,7 +11232,7 @@
"validator"
],
"support": {
"source": "https://github.com/symfony/property-info/tree/v6.1.6"
"source": "https://github.com/symfony/property-info/tree/v6.1.7"
},
"funding": [
{
@ -11249,7 +11248,7 @@
"type": "tidelift"
}
],
"time": "2022-10-07T08:04:03+00:00"
"time": "2022-10-28T16:23:08+00:00"
},
{
"name": "symfony/psr-http-message-bridge",
@ -11341,16 +11340,16 @@
},
{
"name": "symfony/routing",
"version": "v6.1.5",
"version": "v6.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
"reference": "f8c1ebb43d0f39e5ecd12a732ba1952a3dd8455c"
"reference": "95effeb9d6e2cec861cee06bf5bbf82d09aea7f5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/f8c1ebb43d0f39e5ecd12a732ba1952a3dd8455c",
"reference": "f8c1ebb43d0f39e5ecd12a732ba1952a3dd8455c",
"url": "https://api.github.com/repos/symfony/routing/zipball/95effeb9d6e2cec861cee06bf5bbf82d09aea7f5",
"reference": "95effeb9d6e2cec861cee06bf5bbf82d09aea7f5",
"shasum": ""
},
"require": {
@ -11409,7 +11408,7 @@
"url"
],
"support": {
"source": "https://github.com/symfony/routing/tree/v6.1.5"
"source": "https://github.com/symfony/routing/tree/v6.1.7"
},
"funding": [
{
@ -11425,7 +11424,7 @@
"type": "tidelift"
}
],
"time": "2022-09-09T09:26:14+00:00"
"time": "2022-10-18T13:12:43+00:00"
},
{
"name": "symfony/service-contracts",
@ -11514,16 +11513,16 @@
},
{
"name": "symfony/string",
"version": "v6.1.6",
"version": "v6.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "7e7e0ff180d4c5a6636eaad57b65092014b61864"
"reference": "823f143370880efcbdfa2dbca946b3358c4707e5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/7e7e0ff180d4c5a6636eaad57b65092014b61864",
"reference": "7e7e0ff180d4c5a6636eaad57b65092014b61864",
"url": "https://api.github.com/repos/symfony/string/zipball/823f143370880efcbdfa2dbca946b3358c4707e5",
"reference": "823f143370880efcbdfa2dbca946b3358c4707e5",
"shasum": ""
},
"require": {
@ -11579,7 +11578,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v6.1.6"
"source": "https://github.com/symfony/string/tree/v6.1.7"
},
"funding": [
{
@ -11850,16 +11849,16 @@
},
{
"name": "symfony/validator",
"version": "v6.1.6",
"version": "v6.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/validator.git",
"reference": "e5589882403e1e19774d7c5ffb65d9c6466d216c"
"reference": "0cc147f2e4a0d78221db85545751cd8764bbc156"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/validator/zipball/e5589882403e1e19774d7c5ffb65d9c6466d216c",
"reference": "e5589882403e1e19774d7c5ffb65d9c6466d216c",
"url": "https://api.github.com/repos/symfony/validator/zipball/0cc147f2e4a0d78221db85545751cd8764bbc156",
"reference": "0cc147f2e4a0d78221db85545751cd8764bbc156",
"shasum": ""
},
"require": {
@ -11938,7 +11937,7 @@
"description": "Provides tools to validate values",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/validator/tree/v6.1.6"
"source": "https://github.com/symfony/validator/tree/v6.1.7"
},
"funding": [
{
@ -11954,7 +11953,7 @@
"type": "tidelift"
}
],
"time": "2022-10-02T08:30:52+00:00"
"time": "2022-10-28T16:23:08+00:00"
},
{
"name": "symfony/var-dumper",
@ -12227,16 +12226,16 @@
},
{
"name": "twilio/sdk",
"version": "6.43.0",
"version": "6.43.1",
"source": {
"type": "git",
"url": "git@github.com:twilio/twilio-php.git",
"reference": "687245ed07dc807eec94389f715323cf13c1e316"
"reference": "040e989adccc39437371b14da5f20f068e586509"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twilio/twilio-php/zipball/687245ed07dc807eec94389f715323cf13c1e316",
"reference": "687245ed07dc807eec94389f715323cf13c1e316",
"url": "https://api.github.com/repos/twilio/twilio-php/zipball/040e989adccc39437371b14da5f20f068e586509",
"reference": "040e989adccc39437371b14da5f20f068e586509",
"shasum": ""
},
"require": {
@ -12272,7 +12271,7 @@
"sms",
"twilio"
],
"time": "2022-10-19T19:27:21+00:00"
"time": "2022-10-31T19:29:12+00:00"
},
{
"name": "vlucas/phpdotenv",
@ -12922,16 +12921,16 @@
},
{
"name": "brianium/paratest",
"version": "v6.6.4",
"version": "v6.6.5",
"source": {
"type": "git",
"url": "https://github.com/paratestphp/paratest.git",
"reference": "4ce800dc32fd0292a4f05c00f347142dce1ecdda"
"reference": "31fd5d69b41725f383c9a083831eefcc7ecd9061"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/4ce800dc32fd0292a4f05c00f347142dce1ecdda",
"reference": "4ce800dc32fd0292a4f05c00f347142dce1ecdda",
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/31fd5d69b41725f383c9a083831eefcc7ecd9061",
"reference": "31fd5d69b41725f383c9a083831eefcc7ecd9061",
"shasum": ""
},
"require": {
@ -12998,7 +12997,7 @@
],
"support": {
"issues": "https://github.com/paratestphp/paratest/issues",
"source": "https://github.com/paratestphp/paratest/tree/v6.6.4"
"source": "https://github.com/paratestphp/paratest/tree/v6.6.5"
},
"funding": [
{
@ -13010,7 +13009,7 @@
"type": "paypal"
}
],
"time": "2022-09-13T10:47:01+00:00"
"time": "2022-10-28T12:22:26+00:00"
},
{
"name": "composer/package-versions-deprecated",
@ -14908,16 +14907,16 @@
},
{
"name": "phpunit/phpunit",
"version": "9.5.25",
"version": "9.5.26",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d"
"reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d",
"reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/851867efcbb6a1b992ec515c71cdcf20d895e9d2",
"reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2",
"shasum": ""
},
"require": {
@ -14990,7 +14989,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.25"
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.26"
},
"funding": [
{
@ -15006,7 +15005,7 @@
"type": "tidelift"
}
],
"time": "2022-09-25T03:44:45+00:00"
"time": "2022-10-28T06:00:21+00:00"
},
{
"name": "sebastian/cli-parser",

View File

@ -0,0 +1,29 @@
<?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('users', function (Blueprint $table) {
$table->boolean('verified_phone_number')->default(false);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
};

View File

@ -0,0 +1,32 @@
<?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('bank_integrations', function (Blueprint $table) {
$table->boolean('disabled_upstream')->default(false);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
};

0
dusk.sh Executable file → Normal file
View File

View File

@ -4777,7 +4777,7 @@ $LANG = array(
'invoice_task_project' => 'Invoice Task Project',
'invoice_task_project_help' => 'Add the project to the invoice line items',
'bulk_action' => 'Bulk Action',
'phone_validation_error' => 'This phone number is not valid, please enter in E.164 format',
);
return $LANG;

0
public/.htaccess Executable file → Normal file
View File

0
public/assets/AssetManifest.json Executable file → Normal file
View File

0
public/assets/FontManifest.json Executable file → Normal file
View File

0
public/assets/LICENSE Executable file → Normal file
View File

0
public/assets/NOTICES Executable file → Normal file
View File

0
public/assets/assets/images/google-icon.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

0
public/assets/assets/images/logo.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

0
public/assets/assets/images/payment_types/ach.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

0
public/assets/assets/images/payment_types/amex.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

0
public/assets/assets/images/payment_types/discover.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

0
public/assets/assets/images/payment_types/jcb.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

0
public/assets/assets/images/payment_types/laser.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

0
public/assets/assets/images/payment_types/maestro.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

0
public/assets/assets/images/payment_types/other.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

0
public/assets/assets/images/payment_types/paypal.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
public/assets/assets/images/payment_types/solo.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

0
public/assets/assets/images/payment_types/switch.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 938 B

After

Width:  |  Height:  |  Size: 938 B

0
public/assets/assets/images/payment_types/unionpay.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

0
public/assets/assets/images/payment_types/visa.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

0
public/assets/fonts/MaterialIcons-Regular.otf Executable file → Normal file
View File

0
public/assets/fonts/MaterialIcons-Regular.ttf Executable file → Normal file
View File

0
public/assets/fonts/Roboto-Regular.ttf Executable file → Normal file
View File

View File

View File

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 881 B

After

Width:  |  Height:  |  Size: 881 B

View File

Before

Width:  |  Height:  |  Size: 704 B

After

Width:  |  Height:  |  Size: 704 B

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

Before

Width:  |  Height:  |  Size: 162 B

After

Width:  |  Height:  |  Size: 162 B

View File

0
public/assets/web/assets/fonts/Roboto-Regular.ttf Executable file → Normal file
View File

0
public/css/app.css vendored Executable file → Normal file
View File

0
public/css/ninja.css vendored Executable file → Normal file
View File

0
public/css/ninja.min.css vendored Executable file → Normal file
View File

0
public/favicon.ico Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

0
public/favicon.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

0
public/flutter_service_worker.js vendored Executable file → Normal file
View File

0
public/icons/Icon-192.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

0
public/icons/Icon-512.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

0
public/images/american-express.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

0
public/images/created-by-invoiceninja-new.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

0
public/images/created-by-invoiceninja.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

0
public/images/diners-club.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

0
public/images/discover.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

0
public/images/invoiceninja-black-logo-2.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

0
public/images/invoiceninja-white-logo.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

0
public/images/logo.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

0
public/images/mastercard.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

0
public/images/paypal.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

0
public/images/svg/activity.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

0
public/images/svg/align-left.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 388 B

0
public/images/svg/clock.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 299 B

After

Width:  |  Height:  |  Size: 299 B

0
public/images/svg/credit-card.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 324 B

After

Width:  |  Height:  |  Size: 324 B

0
public/images/svg/dark/activity.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 278 B

After

Width:  |  Height:  |  Size: 278 B

0
public/images/svg/dark/align-left.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 391 B

After

Width:  |  Height:  |  Size: 391 B

0
public/images/svg/dark/clock.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 299 B

After

Width:  |  Height:  |  Size: 299 B

0
public/images/svg/dark/credit-card.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 324 B

After

Width:  |  Height:  |  Size: 324 B

Some files were not shown because too many files have changed in this diff Show More