Merge branch 'v5-develop' of https://github.com/invoiceninja/invoiceninja into feature-inbound-email-expenses

This commit is contained in:
paulwer 2024-09-15 07:42:43 +02:00
commit 9ced189262
122 changed files with 305290 additions and 294644 deletions

View File

@ -14,7 +14,7 @@ jobs:
strategy: strategy:
matrix: matrix:
operating-system: ['ubuntu-22.04','ubuntu-24.04'] operating-system: ['ubuntu-22.04','ubuntu-24.04']
php-versions: ['8.2'] php-versions: ['8.3']
phpunit-versions: ['latest'] phpunit-versions: ['latest']
ci_node_total: [ 8 ] ci_node_total: [ 8 ]
ci_node_index: [ 0, 1, 2, 3, 4, 5, 6, 7] ci_node_index: [ 0, 1, 2, 3, 4, 5, 6, 7]

View File

@ -1 +1 @@
5.10.26 5.10.27

View File

@ -0,0 +1,83 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\Analytics;
use Turbo124\Beacon\ExampleMetric\GenericMixedMetric;
class LegalEntityCreated 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 = 'einvoice.legal_entity.created';
/**
* The datetime of the counter measurement.
*
* date("Y-m-d H:i:s")
*
*/
public $datetime;
/**
* The Class failure name
* set to 0.
*
* @var string
*/
public $string_metric5 = 'stub';
/**
* The exception string
* set to 0.
*
* @var string
*/
public $string_metric6 = 'stub';
/**
* The counter
* set to 1.
*
*/
public $int_metric1 = 1;
/**
* Company Key
* @var string
*/
public $string_metric7 = '';
/**
* Subject
* @var string
*/
public $string_metric8 = '';
public function __construct($string_metric7 = '', $string_metric8 = '')
{
$this->string_metric7 = $string_metric7;
$this->string_metric8 = $string_metric8;
}
}

View File

@ -518,7 +518,12 @@ class CompanySettings extends BaseSettings
public string $payment_flow = 'default'; //smooth public string $payment_flow = 'default'; //smooth
public string $email_subject_payment_failed = '';
public string $email_template_payment_failed = '';
public static $casts = [ public static $casts = [
'email_template_payment_failed' => 'string',
'email_subject_payment_failed' => 'string',
'payment_flow' => 'string', 'payment_flow' => 'string',
'enable_quote_reminder1' => 'bool', 'enable_quote_reminder1' => 'bool',
'quote_num_days_reminder1' => 'int', 'quote_num_days_reminder1' => 'int',

View File

@ -30,6 +30,7 @@ class EmailTemplateDefaults
'email_template_custom2', 'email_template_custom2',
'email_template_custom3', 'email_template_custom3',
'email_template_purchase_order', 'email_template_purchase_order',
'email_template_payment_failed'
]; ];
public static function getDefaultTemplate($template, $locale) public static function getDefaultTemplate($template, $locale)
@ -39,6 +40,8 @@ class EmailTemplateDefaults
switch ($template) { switch ($template) {
/* Template */ /* Template */
case 'email_template_payment_failed':
return self::emailPaymentFailedTemplate();
case 'email_template_invoice': case 'email_template_invoice':
return self::emailInvoiceTemplate(); return self::emailInvoiceTemplate();
case 'email_template_quote': case 'email_template_quote':
@ -73,6 +76,9 @@ class EmailTemplateDefaults
case 'email_subject_invoice': case 'email_subject_invoice':
return self::emailInvoiceSubject(); return self::emailInvoiceSubject();
case 'email_subject_payment_failed':
return self::emailPaymentFailedSubject();
case 'email_subject_quote': case 'email_subject_quote':
return self::emailQuoteSubject(); return self::emailQuoteSubject();
@ -127,6 +133,16 @@ class EmailTemplateDefaults
} }
} }
public static function emailPaymentFailedSubject()
{
return ctrans('texts.notification_invoice_payment_failed_subject', ['invoice' => '$number']);
}
public static function emailPaymentFailedTemplate()
{
return '<p>$client<br><br>'.ctrans('texts.client_payment_failure_body', ['invoice' => '$number', 'amount' => '$amount']).'</p><div>$payment_error</div><br><div>$payment_button</div>';
}
public static function emailQuoteReminder1Subject() public static function emailQuoteReminder1Subject()
{ {
return ctrans('texts.quote_reminder_subject', ['quote' => '$number', 'company' => '$company.name']); return ctrans('texts.quote_reminder_subject', ['quote' => '$number', 'company' => '$company.name']);
@ -135,9 +151,7 @@ class EmailTemplateDefaults
public static function emailQuoteReminder1Body() public static function emailQuoteReminder1Body()
{ {
$invoice_message = '<p>$client<br><br>'.self::transformText('quote_reminder_message').'</p><div class="center">$view_button</div>'; return '<p>$client<br><br>'.self::transformText('quote_reminder_message').'</p><div>$view_button</div>';
return $invoice_message;
} }
@ -163,14 +177,14 @@ class EmailTemplateDefaults
public static function emailInvoiceTemplate() public static function emailInvoiceTemplate()
{ {
$invoice_message = '<p>$client<br><br>'.self::transformText('invoice_message').'</p><div class="center">$view_button</div>'; $invoice_message = '<p>$client<br><br>'.self::transformText('invoice_message').'</p><div>$view_button</div>';
return $invoice_message; return $invoice_message;
} }
public static function emailInvoiceReminderTemplate() public static function emailInvoiceReminderTemplate()
{ {
$invoice_message = '<p>$client<br><br>'.self::transformText('reminder_message').'</p><div class="center">$view_button</div>'; $invoice_message = '<p>$client<br><br>'.self::transformText('reminder_message').'</p><div>$view_button</div>';
return $invoice_message; return $invoice_message;
} }
@ -182,7 +196,7 @@ class EmailTemplateDefaults
public static function emailQuoteTemplate() public static function emailQuoteTemplate()
{ {
$quote_message = '<p>$client<br><br>'.self::transformText('quote_message').'</p><div class="center">$view_button</div>'; $quote_message = '<p>$client<br><br>'.self::transformText('quote_message').'</p><div>$view_button</div>';
return $quote_message; return $quote_message;
} }
@ -199,28 +213,28 @@ class EmailTemplateDefaults
public static function emailPurchaseOrderTemplate() public static function emailPurchaseOrderTemplate()
{ {
$purchase_order_message = '<p>$vendor<br><br>'.self::transformText('purchase_order_message').'</p><div class="center">$view_button</div>'; $purchase_order_message = '<p>$vendor<br><br>'.self::transformText('purchase_order_message').'</p><div>$view_button</div>';
return $purchase_order_message; return $purchase_order_message;
} }
public static function emailPaymentTemplate() public static function emailPaymentTemplate()
{ {
$payment_message = '<p>$client<br><br>'.self::transformText('payment_message').'<br><br>$invoices</p><div class="center">$view_button</div>'; $payment_message = '<p>$client<br><br>'.self::transformText('payment_message').'<br><br>$invoices</p><div>$view_button</div>';
return $payment_message; return $payment_message;
} }
public static function emailCreditTemplate() public static function emailCreditTemplate()
{ {
$credit_message = '<p>$client<br><br>'.self::transformText('credit_message').'</p><div class="center">$view_button</div>'; $credit_message = '<p>$client<br><br>'.self::transformText('credit_message').'</p><div>$view_button</div>';
return $credit_message; return $credit_message;
} }
public static function emailPaymentPartialTemplate() public static function emailPaymentPartialTemplate()
{ {
$payment_message = '<p>$client<br><br>'.self::transformText('payment_message').'<br><br>$invoices</p><div class="center">$view_button</div>'; $payment_message = '<p>$client<br><br>'.self::transformText('payment_message').'<br><br>$invoices</p><div>$view_button</div>';
return $payment_message; return $payment_message;
} }

View File

@ -29,6 +29,7 @@ class QuickbooksSettings implements Castable
public int $refreshTokenExpiresAt; public int $refreshTokenExpiresAt;
public string $baseURL;
/** /**
* entity client,invoice,quote,purchase_order,vendor,payment * entity client,invoice,quote,purchase_order,vendor,payment
* sync true/false * sync true/false

View File

@ -0,0 +1,35 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Events\Invoice;
use App\Models\Company;
use App\Models\Invoice;
use Illuminate\Queue\SerializesModels;
/**
* Class InvoiceAutoBillFailed.
*/
class InvoiceAutoBillFailed
{
use SerializesModels;
/**
* Create a new event instance.
*
* @param Invoice $invoice
* @param Company $company
* @param array $event_vars
*/
public function __construct(public Invoice $invoice, public Company $company, public array $event_vars, public ?string $notes)
{
}
}

View File

@ -0,0 +1,35 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Events\Invoice;
use App\Models\Company;
use App\Models\Invoice;
use Illuminate\Queue\SerializesModels;
/**
* Class InvoiceAutoBillSuccess.
*/
class InvoiceAutoBillSuccess
{
use SerializesModels;
/**
* Create a new event instance.
*
* @param Invoice $invoice
* @param Company $company
* @param array $event_vars
*/
public function __construct(public Invoice $invoice, public Company $company, public array $event_vars)
{
}
}

View File

@ -76,6 +76,26 @@ class InvoiceItemFactory
$data[] = $item; $data[] = $item;
} }
$item = self::create();
$item->quantity = $faker->numberBetween(1, 10);
$item->cost = $faker->randomFloat(2, 1, 1000);
$item->line_total = $item->quantity * $item->cost;
$item->is_amount_discount = true;
$item->discount = $faker->numberBetween(1, 10);
$item->notes = str_replace(['"',"'"], ['',""], $faker->realText(20));
$item->product_key = $faker->word();
// $item->custom_value1 = $faker->realText(10);
// $item->custom_value2 = $faker->realText(10);
// $item->custom_value3 = $faker->realText(10);
// $item->custom_value4 = $faker->realText(10);
$item->tax_name1 = 'GST';
$item->tax_rate1 = 10.00;
$item->type_id = '2';
$data[] = $item;
return $data; return $data;
} }

View File

@ -99,6 +99,12 @@ class ExpenseFilters extends QueryFilters
}); });
} }
if (in_array('uninvoiced', $status_parameters)) {
$query->orWhere(function ($query) {
$query->whereNull('invoice_id');
});
}
if (in_array('paid', $status_parameters)) { if (in_array('paid', $status_parameters)) {
$query->orWhere(function ($query) { $query->orWhere(function ($query) {
$query->whereNotNull('payment_date'); $query->whereNotNull('payment_date');

View File

@ -266,58 +266,6 @@ class InvoiceFilters extends QueryFilters
return $this->builder->where('due_date', '>=', $date); return $this->builder->where('due_date', '>=', $date);
} }
/**
* Filter by date range
*
* @param string $date_range
* @return Builder
*/
public function date_range(string $date_range = ''): Builder
{
$parts = explode(",", $date_range);
if (count($parts) != 2) {
return $this->builder;
}
try {
$start_date = Carbon::parse($parts[0]);
$end_date = Carbon::parse($parts[1]);
return $this->builder->whereBetween('date', [$start_date, $end_date]);
} catch(\Exception $e) {
return $this->builder;
}
}
/**
* Filter by due date range
*
* @param string $date_range
* @return Builder
*/
public function due_date_range(string $date_range = ''): Builder
{
$parts = explode(",", $date_range);
if (count($parts) != 2) {
return $this->builder;
}
try {
$start_date = Carbon::parse($parts[0]);
$end_date = Carbon::parse($parts[1]);
return $this->builder->whereBetween('due_date', [$start_date, $end_date]);
} catch(\Exception $e) {
return $this->builder;
}
}
/** /**
* Sorts the list based on $sort. * Sorts the list based on $sort.
* *

View File

@ -331,4 +331,61 @@ abstract class QueryFilters
->orderByRaw("{$this->with_property} = ? DESC", [$value]) ->orderByRaw("{$this->with_property} = ? DESC", [$value])
->company(); ->company();
} }
/**
* Filter by date range
*
* @param string $date_range
* @return Builder
*/
public function date_range(string $date_range = ''): Builder
{
$parts = explode(",", $date_range);
if (count($parts) != 2 || !in_array('date', \Illuminate\Support\Facades\Schema::getColumnListing($this->builder->getModel()->getTable()))) {
return $this->builder;
}
try {
$start_date = Carbon::parse($parts[0]);
$end_date = Carbon::parse($parts[1]);
return $this->builder->whereBetween('date', [$start_date, $end_date]);
} catch(\Exception $e) {
return $this->builder;
}
}
/**
* Filter by due date range
*
* @param string $date_range
* @return Builder
*/
public function due_date_range(string $date_range = ''): Builder
{
$parts = explode(",", $date_range);
if (count($parts) != 2 || !in_array('due_date', \Illuminate\Support\Facades\Schema::getColumnListing($this->builder->getModel()->getTable()))) {
return $this->builder;
}
try {
$start_date = Carbon::parse($parts[0]);
$end_date = Carbon::parse($parts[1]);
return $this->builder->whereBetween('due_date', [$start_date, $end_date]);
} catch(\Exception $e) {
return $this->builder;
}
}
} }

View File

@ -104,6 +104,7 @@ class TransactionTransformer implements BankRevenueInterface
} }
$amount = (float) $transaction["transactionAmount"]["amount"]; $amount = (float) $transaction["transactionAmount"]["amount"];
$base_type = $amount < 0 ? 'DEBIT' : 'CREDIT';
// description could be in varios places // description could be in varios places
$description = ''; $description = '';
@ -140,7 +141,7 @@ class TransactionTransformer implements BankRevenueInterface
return [ return [
'transaction_id' => 0, 'transaction_id' => 0,
'nordigen_transaction_id' => $transactionId, 'nordigen_transaction_id' => $transactionId,
'amount' => $amount, 'amount' => abs($amount),
'currency_id' => $this->convertCurrency($transaction["transactionAmount"]["currency"]), 'currency_id' => $this->convertCurrency($transaction["transactionAmount"]["currency"]),
'category_id' => null, 'category_id' => null,
'category_type' => array_key_exists('additionalInformation', $transaction) ? $transaction["additionalInformation"] : '', 'category_type' => array_key_exists('additionalInformation', $transaction) ? $transaction["additionalInformation"] : '',
@ -148,7 +149,7 @@ class TransactionTransformer implements BankRevenueInterface
'description' => $description, 'description' => $description,
'participant' => $participant, 'participant' => $participant,
'participant_name' => $participant_name, 'participant_name' => $participant_name,
'base_type' => $amount < 0 ? 'DEBIT' : 'CREDIT', 'base_type' => $base_type,
]; ];
} }

View File

@ -23,12 +23,12 @@ class ProRata
* the time interval and the frequency duration * the time interval and the frequency duration
* *
* @param float $amount * @param float $amount
* @param Carbon $from_date * @param \Illuminate\Support\Carbon | \Carbon\Carbon $from_date
* @param Carbon $to_date * @param \Illuminate\Support\Carbon | \Carbon\Carbon $to_date
* @param int $frequency * @param int $frequency
* @return float * @return float
*/ */
public function refund(float $amount, Carbon $from_date, Carbon $to_date, int $frequency): float public function refund(float $amount, $from_date, $to_date, int $frequency): float
{ {
$days = intval(abs($from_date->copy()->diffInDays($to_date))); $days = intval(abs($from_date->copy()->diffInDays($to_date)));
$days_in_frequency = $this->getDaysInFrequency($frequency); $days_in_frequency = $this->getDaysInFrequency($frequency);
@ -41,12 +41,12 @@ class ProRata
* the time interval and the frequency duration * the time interval and the frequency duration
* *
* @param float $amount * @param float $amount
* @param Carbon $from_date * @param \Illuminate\Support\Carbon | \Carbon\Carbon $from_date
* @param Carbon $to_date * @param \Illuminate\Support\Carbon | \Carbon\Carbon $to_date
* @param int $frequency * @param int $frequency
* @return float * @return float
*/ */
public function charge(float $amount, Carbon $from_date, Carbon $to_date, int $frequency): float public function charge(float $amount, $from_date, $to_date, int $frequency): float
{ {
$days = intval(abs($from_date->copy()->diffInDays($to_date))); $days = intval(abs($from_date->copy()->diffInDays($to_date)));
$days_in_frequency = $this->getDaysInFrequency($frequency); $days_in_frequency = $this->getDaysInFrequency($frequency);

View File

@ -117,6 +117,7 @@ class InvitationController extends Controller
if(!auth()->guard('contact')->check()) { if(!auth()->guard('contact')->check()) {
$this->middleware('auth:contact'); $this->middleware('auth:contact');
/** @var \App\Models\InvoiceInvitation | \App\Models\QuoteInvitation | \App\Models\CreditInvitation | \App\Models\RecurringInvoiceInvitation $invitation */
return redirect()->route('client.login', ['intended' => route('client.'.$entity.'.show', [$entity => $this->encodePrimaryKey($invitation->{$key}), 'silent' => $is_silent])]); return redirect()->route('client.login', ['intended' => route('client.'.$entity.'.show', [$entity => $this->encodePrimaryKey($invitation->{$key}), 'silent' => $is_silent])]);
} }

View File

@ -35,11 +35,16 @@ class PrePaymentController extends Controller
/** /**
* Show the list of payments. * Show the list of payments.
* *
* @return Factory|View * @return Factory|View|\Illuminate\Http\RedirectResponse
*/ */
public function index() public function index()
{ {
$client = auth()->guard('contact')->user()->client; $client = auth()->guard('contact')->user()->client;
if(!$client->getSetting('client_initiated_payments'))
return redirect()->route('client.dashboard');
$minimum = $client->getSetting('client_initiated_payments_minimum'); $minimum = $client->getSetting('client_initiated_payments_minimum');
$minimum_amount = $minimum == 0 ? "" : Number::formatMoney($minimum, $client); $minimum_amount = $minimum == 0 ? "" : Number::formatMoney($minimum, $client);

View File

@ -0,0 +1,26 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Http\Controllers\EInvoice;
use App\Http\Controllers\Controller;
use App\Http\Requests\EInvoice\SignupRequest;
class SelfhostController extends Controller
{
public function index(SignupRequest $request)
{
return view('einvoice.index');
}
}

View File

@ -118,9 +118,36 @@ class ImportController extends Controller
})->toArray(); })->toArray();
//Exact string match
foreach($headers as $key => $value) { foreach($headers as $key => $value) {
foreach($translated_keys as $tkey => $tvalue) {
$concat_needle = str_ireplace(" ", "", $tvalue['index'].$tvalue['label']);
$concat_value = str_ireplace(" ", "", $value);
if($this->testMatch($concat_value, $concat_needle)) {
$hit = $tvalue['key'];
$hints[$key] = $hit;
unset($translated_keys[$tkey]);
break;
} else {
$hints[$key] = null;
}
}
}
//Label Match
foreach($headers as $key => $value) {
if(isset($hints[$key])) {
continue;
}
foreach($translated_keys as $tkey => $tvalue) { foreach($translated_keys as $tkey => $tvalue) {
if($this->testMatch($value, $tvalue['label'])) { if($this->testMatch($value, $tvalue['label'])) {
@ -134,10 +161,9 @@ class ImportController extends Controller
} }
} }
//second pass using the index of the translation here //Index matching pass using the index of the translation here
foreach($headers as $key => $value) { foreach($headers as $key => $value) {
if(isset($hints[$key])) { if(isset($hints[$key])) {
continue; continue;

View File

@ -60,75 +60,4 @@ class ImportQuickbooksController extends BaseController
return redirect()->to($authorizationUrl); return redirect()->to($authorizationUrl);
} }
public function preimport(string $type, string $hash)
{
// // Check for authorization otherwise
// // Create a reference
// $data = [
// 'hash' => $hash,
// 'type' => $type
// ];
// $this->getData($data);
}
protected function getData($data)
{
// $entity = $this->import_entities[$data['type']];
// $cache_name = "{$data['hash']}-{$data['type']}";
// // TODO: Get or put cache or DB?
// if(! Cache::has($cache_name)) {
// $contents = call_user_func([$this->service, "fetch{$entity}s"]);
// if($contents->isEmpty()) {
// return;
// }
// Cache::put($cache_name, base64_encode($contents->toJson()), 600);
// }
}
/**
* @OA\Post(
* path="/api/v1/import_json",
* operationId="getImportJson",
* tags={"import"},
* summary="Import data from the system",
* description="Import data from the system",
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Response(
* response=200,
* description="success",
* @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"),
* @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"),
* @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"),
* ),
* @OA\Response(
* response=422,
* description="Validation error",
* @OA\JsonContent(ref="#/components/schemas/ValidationError"),
* ),
* @OA\Response(
* response="default",
* description="Unexpected Error",
* @OA\JsonContent(ref="#/components/schemas/Error"),
* ),
* )
*/
public function import(Request $request)
{
// $hash = Str::random(32);
// foreach($request->input('import_types') as $type) {
// $this->preimport($type, $hash);
// }
// /** @var \App\Models\User $user */
// // $user = auth()->user() ?? Auth::loginUsingId(60);
// $data = ['import_types' => $request->input('import_types') ] + compact('hash');
// if (Ninja::isHosted()) {
// QuickbooksIngest::dispatch($data, $user->company());
// } else {
// QuickbooksIngest::dispatch($data, $user->company());
// }
// return response()->json(['message' => 'Processing'], 200);
}
} }

View File

@ -13,13 +13,11 @@ namespace App\Http\Requests\Client;
use App\DataMapper\ClientSettings; use App\DataMapper\ClientSettings;
use App\Http\Requests\Request; use App\Http\Requests\Request;
use App\Http\ValidationRules\Client\CountryCodeExistsRule;
use App\Http\ValidationRules\Ninja\CanStoreClientsRule; use App\Http\ValidationRules\Ninja\CanStoreClientsRule;
use App\Http\ValidationRules\ValidClientGroupSettingsRule; use App\Http\ValidationRules\ValidClientGroupSettingsRule;
use App\Models\Client; use App\Models\Client;
use App\Models\GroupSetting; use App\Models\GroupSetting;
use App\Utils\Traits\MakesHash; use App\Utils\Traits\MakesHash;
use Illuminate\Support\Facades\Cache;
use Illuminate\Validation\Rule; use Illuminate\Validation\Rule;
class StoreClientRequest extends Request class StoreClientRequest extends Request

View File

@ -51,7 +51,7 @@ class StoreCompanyRequest extends Request
$rules['portal_domain'] = 'sometimes|url'; $rules['portal_domain'] = 'sometimes|url';
} else { } else {
if (Ninja::isHosted()) { if (Ninja::isHosted()) {
$rules['subdomain'] = ['nullable', 'regex:/^[a-zA-Z0-9][a-zA-Z0-9.-]+[a-zA-Z0-9]$/', new ValidSubdomain()]; $rules['subdomain'] = ['nullable', 'regex:/^[a-zA-Z0-9-]{1,63}$/', new ValidSubdomain()];
} else { } else {
$rules['subdomain'] = 'nullable|alpha_num'; $rules['subdomain'] = 'nullable|alpha_num';
} }

View File

@ -0,0 +1,28 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Http\Requests\EInvoice;
use App\Utils\Ninja;
use App\Http\Requests\Request;
class SignupRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize(): bool
{
return Ninja::isSelfHost();
}
}

View File

@ -1,59 +0,0 @@
<?php
/**
* Credit Ninja (https://creditninja.com).
*
* @link https://github.com/creditninja/creditninja source repository
*
* @copyright Copyright (c) 2022. Credit Ninja LLC (https://creditninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Http\ValidationRules\Client;
use App\Models\Country;
use Illuminate\Contracts\Validation\Rule;
/**
* Class UniqueCreditNumberRule.
*/
class CountryCodeExistsRule implements Rule
{
public function __construct()
{
}
/**
* @param string $attribute
* @param mixed $value
* @return bool
*/
public function passes($attribute, $value)
{
return $this->checkIfCodeExists($value); //if it exists, return false!
}
/**
* @return string
*/
public function message()
{
return 'Country code does not exist';
}
/**
* @return bool
*/
private function checkIfCodeExists($value): bool
{
$country = Country::where('iso_3166_2', $value)
->orWhere('iso_3166_3', $value)
->exists();
if ($country) {
return true;
}
return false;
}
}

View File

@ -12,36 +12,26 @@
namespace App\Http\ValidationRules\Company; namespace App\Http\ValidationRules\Company;
use App\Utils\Ninja; use App\Utils\Ninja;
use Illuminate\Contracts\Validation\Rule; use Closure;
use Illuminate\Contracts\Validation\ValidationRule;
/** /**
* Class ValidCompanyQuantity. * Class ValidCompanyQuantity.
*/ */
class ValidCompanyQuantity implements Rule class ValidCompanyQuantity implements ValidationRule
{ {
/**
* @param string $attribute public function validate(string $attribute, mixed $value, Closure $fail): void
* @param mixed $value
* @return bool
*/
public function passes($attribute, $value)
{ {
if (config('ninja.testvars.travis')) { $message = ctrans('texts.company_limit_reached', ['limit' => Ninja::isSelfHost() ? 10 : auth()->user()->company()->account->hosted_company_count]);
return true;
}
if (Ninja::isSelfHost()) { $test = Ninja::isSelfHost() ?
return auth()->user()->company()->account->companies->count() < 10; auth()->user()->company()->account->companies->count() < 10 :
} (auth()->user()->account->isPaid() || auth()->user()->account->isTrial()) && auth()->user()->company()->account->companies->count() < 10 ;
return (auth()->user()->account->isPaid() || auth()->user()->account->isTrial()) && auth()->user()->company()->account->companies->count() < 10 ; if (!$test) {
$fail($message);
}
} }
/**
* @return string
*/
public function message()
{
return ctrans('texts.company_limit_reached', ['limit' => Ninja::isSelfHost() ? 10 : auth()->user()->company()->account->hosted_company_count]);
}
} }

View File

@ -12,31 +12,22 @@
namespace App\Http\ValidationRules\Company; namespace App\Http\ValidationRules\Company;
use App\Libraries\MultiDB; use App\Libraries\MultiDB;
use Illuminate\Contracts\Validation\Rule; use Closure;
use Illuminate\Contracts\Validation\ValidationRule;
/** /**
* Class ValidCompanyQuantity. * Class ValidSubdomain.
*/ */
class ValidSubdomain implements Rule class ValidSubdomain implements ValidationRule
{ {
public function __construct() public function validate(string $attribute, mixed $value, Closure $fail): void
{ {
}
public function passes($attribute, $value) if(empty($value))
{ return;
if (empty($value)) {
return true; if (!MultiDB::checkDomainAvailable($value)) {
$fail(ctrans('texts.subdomain_taken'));
} }
return MultiDB::checkDomainAvailable($value);
}
/**
* @return string
*/
public function message()
{
return ctrans('texts.subdomain_taken');
} }
} }

View File

@ -1,253 +0,0 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Import\Providers;
use App\Models\Invoice;
use App\Factory\ClientFactory;
use App\Factory\InvoiceFactory;
use App\Factory\PaymentFactory;
use App\Factory\ProductFactory;
use App\Import\ImportException;
use Illuminate\Support\Facades\Cache;
use App\Repositories\ClientRepository;
use App\Repositories\InvoiceRepository;
use App\Repositories\PaymentRepository;
use App\Repositories\ProductRepository;
use App\Http\Requests\Client\StoreClientRequest;
use App\Http\Requests\Invoice\StoreInvoiceRequest;
use App\Http\Requests\Payment\StorePaymentRequest;
use App\Http\Requests\Product\StoreProductRequest;
use App\Import\Transformer\Quickbooks\ClientTransformer;
use App\Import\Transformer\Quickbooks\InvoiceTransformer;
use App\Import\Transformer\Quickbooks\PaymentTransformer;
use App\Import\Transformer\Quickbooks\ProductTransformer;
class Quickbooks extends BaseImport
{
public array $entity_count = [];
public function import(string $entity)
{
if (
in_array($entity, [
'client',
'invoice',
'product',
'payment',
// 'vendor',
// 'expense',
])
) {
$this->{$entity}();
}
//collate any errors
// $this->finalizeImport();
}
public function client()
{
$entity_type = 'client';
$data = $this->getData($entity_type);
if (empty($data)) {
$this->entity_count['clients'] = 0;
return;
}
$this->request_name = StoreClientRequest::class;
$this->repository_name = ClientRepository::class;
$this->factory_name = ClientFactory::class;
$this->repository = app()->make($this->repository_name);
$this->repository->import_mode = true;
$this->transformer = new ClientTransformer($this->company);
$client_count = $this->ingest($data, $entity_type);
$this->entity_count['clients'] = $client_count;
}
public function product()
{
$entity_type = 'product';
$data = $this->getData($entity_type);
if (empty($data)) {
$this->entity_count['products'] = 0;
return;
}
$this->request_name = StoreProductRequest::class;
$this->repository_name = ProductRepository::class;
$this->factory_name = ProductFactory::class;
$this->repository = app()->make($this->repository_name);
$this->repository->import_mode = true;
$this->transformer = new ProductTransformer($this->company);
$count = $this->ingest($data, $entity_type);
$this->entity_count['products'] = $count;
}
public function getData($type)
{
// get the data from cache? file? or api ?
return json_decode(base64_decode(Cache::get("{$this->hash}-{$type}")), true);
}
public function payment()
{
$entity_type = 'payment';
$data = $this->getData($entity_type);
if (empty($data)) {
$this->entity_count['payments'] = 0;
return;
}
$this->request_name = StorePaymentRequest::class;
$this->repository_name = PaymentRepository::class;
$this->factory_name = PaymentFactory::class;
$this->repository = app()->make($this->repository_name);
$this->repository->import_mode = true;
$this->transformer = new PaymentTransformer($this->company);
$count = $this->ingest($data, $entity_type);
$this->entity_count['payments'] = $count;
}
public function invoice()
{
//make sure we update and create products
$initial_update_products_value = $this->company->update_products;
$this->company->update_products = true;
$this->company->save();
$entity_type = 'invoice';
$data = $this->getData($entity_type);
if (empty($data)) {
$this->entity_count['invoices'] = 0;
return;
}
$this->request_name = StoreInvoiceRequest::class;
$this->repository_name = InvoiceRepository::class;
$this->factory_name = InvoiceFactory::class;
$this->repository = app()->make($this->repository_name);
$this->repository->import_mode = true;
$this->transformer = new InvoiceTransformer($this->company);
$invoice_count = $this->ingestInvoices($data, '');
$this->entity_count['invoices'] = $invoice_count;
$this->company->update_products = $initial_update_products_value;
$this->company->save();
}
public function ingestInvoices($invoices, $invoice_number_key)
{
$count = 0;
$invoice_transformer = $this->transformer;
/** @var ClientRepository $client_repository */
$client_repository = app()->make(ClientRepository::class);
$client_repository->import_mode = true;
$invoice_repository = new InvoiceRepository();
$invoice_repository->import_mode = true;
foreach ($invoices as $raw_invoice) {
if(!is_array($raw_invoice)) {
continue;
}
try {
$invoice_data = $invoice_transformer->transform($raw_invoice);
$invoice_data['user_id'] = $this->company->owner()->id;
$invoice_data['line_items'] = (array) $invoice_data['line_items'];
$invoice_data['line_items'] = $this->cleanItems(
$invoice_data['line_items'] ?? []
);
if (
empty($invoice_data['client_id']) &&
! empty($invoice_data['client'])
) {
$client_data = $invoice_data['client'];
$client_data['user_id'] = $this->getUserIDForRecord(
$invoice_data
);
$client_repository->save(
$client_data,
$client = ClientFactory::create(
$this->company->id,
$client_data['user_id']
)
);
$invoice_data['client_id'] = $client->id;
unset($invoice_data['client']);
}
$validator = $this->request_name::runFormRequest($invoice_data);
if ($validator->fails()) {
$this->error_array['invoice'][] = [
'invoice' => $invoice_data,
'error' => $validator->errors()->all(),
];
} else {
if(!Invoice::where('number', $invoice_data['number'])->first()) {
$invoice = InvoiceFactory::create(
$this->company->id,
$this->company->owner()->id
);
$invoice->mergeFillable(['partial','amount','balance','line_items']);
if (! empty($invoice_data['status_id'])) {
$invoice->status_id = $invoice_data['status_id'];
}
$saveable_invoice_data = $invoice_data;
if(array_key_exists('payments', $saveable_invoice_data)) {
unset($saveable_invoice_data['payments']);
}
$invoice->fill($saveable_invoice_data);
$invoice->save();
$count++;
}
// $this->actionInvoiceStatus(
// $invoice,
// $invoice_data,
// $invoice_repository
// );
}
} catch (\Exception $ex) {
if (\DB::connection(config('database.default'))->transactionLevel() > 0) {
\DB::connection(config('database.default'))->rollBack();
}
if ($ex instanceof ImportException) {
$message = $ex->getMessage();
} else {
report($ex);
$message = 'Unknown error ';
nlog($ex->getMessage());
nlog($raw_invoice);
}
$this->error_array['invoice'][] = [
'invoice' => $raw_invoice,
'error' => $message,
];
}
}
return $count;
}
}

View File

@ -238,6 +238,7 @@ class MatchBankTransactions implements ShouldQueue
$amount = $this->bt->amount; $amount = $this->bt->amount;
if ($_invoices->count() > 0 && $this->checkPayable($_invoices)) { if ($_invoices->count() > 0 && $this->checkPayable($_invoices)) {
$this->createPayment($_invoices, $amount); $this->createPayment($_invoices, $amount);
$this->bts->push($this->bt->id); $this->bts->push($this->bt->id);
@ -293,6 +294,8 @@ class MatchBankTransactions implements ShouldQueue
$this->attachable_invoices = []; $this->attachable_invoices = [];
$this->available_balance = $amount; $this->available_balance = $amount;
nlog($invoices->count());
\DB::connection(config('database.default'))->transaction(function () use ($invoices) { \DB::connection(config('database.default'))->transaction(function () use ($invoices) {
$invoices->each(function ($invoice) { $invoices->each(function ($invoice) {
$this->invoice = Invoice::withTrashed()->where('id', $invoice->id)->lockForUpdate()->first(); $this->invoice = Invoice::withTrashed()->where('id', $invoice->id)->lockForUpdate()->first();
@ -326,11 +329,16 @@ class MatchBankTransactions implements ShouldQueue
}); });
}, 2); }, 2);
nlog("pre");
// @phpstan-ignore-next-line // @phpstan-ignore-next-line
if (!$this->invoice) { if (!$this->invoice) {
return; return;
} }
nlog("post");
/* Create Payment */ /* Create Payment */
$payment = PaymentFactory::create($this->invoice->company_id, $this->invoice->user_id); $payment = PaymentFactory::create($this->invoice->company_id, $this->invoice->user_id);
@ -395,6 +403,9 @@ class MatchBankTransactions implements ShouldQueue
$this->bt->status_id = BankTransaction::STATUS_CONVERTED; $this->bt->status_id = BankTransaction::STATUS_CONVERTED;
$this->bt->payment_id = $payment->id; $this->bt->payment_id = $payment->id;
$this->bt->save(); $this->bt->save();
nlog($this->bt->toArray());
} }
private function resolveCategory($input): ?int private function resolveCategory($input): ?int

View File

@ -70,7 +70,7 @@ class CreateEDocument implements ShouldQueue
if ($this->document instanceof Invoice) { if ($this->document instanceof Invoice) {
switch ($e_document_type) { switch ($e_document_type) {
case "PEPPOL": case "PEPPOL":
return (new Peppol($this->document))->toXml(); return (new Peppol($this->document))->run()->toXml();
case "FACT1": case "FACT1":
return (new RoEInvoice($this->document))->generateXml(); return (new RoEInvoice($this->document))->generateXml();
case "FatturaPA": case "FatturaPA":

View File

@ -1,48 +0,0 @@
<?php
namespace App\Jobs\Import;
use App\Libraries\MultiDB;
use Illuminate\Bus\Queueable;
use App\Import\Providers\Quickbooks;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
class QuickbooksIngest implements ShouldQueue
{
use Dispatchable;
use InteractsWithQueue;
use Queueable;
use SerializesModels;
protected $engine;
protected $request;
protected $company;
/**
* Create a new job instance.
*/
public function __construct(array $request, $company)
{
$this->company = $company;
$this->request = $request;
}
/**
* Execute the job.
*/
public function handle(): void
{
MultiDB::setDb($this->company->db);
set_time_limit(0);
$engine = new Quickbooks(['import_type' => 'client', 'hash' => $this->request['hash'] ], $this->company);
foreach ($this->request['import_types'] as $entity) {
$engine->import($entity);
}
$engine->finalizeImport();
}
}

View File

@ -48,6 +48,7 @@ class NinjaMailerJob implements ShouldQueue
use MakesHash; use MakesHash;
public $tries = 4; //number of retries public $tries = 4; //number of retries
public $deleteWhenMissingModels = true; public $deleteWhenMissingModels = true;
/** @var null|\App\Models\Company $company **/ /** @var null|\App\Models\Company $company **/

View File

@ -84,7 +84,7 @@ class PaymentFailedMailer implements ShouldQueue
$invoice = false; $invoice = false;
if ($this->payment_hash) { if ($this->payment_hash) {
// $amount = array_sum(array_column($this->payment_hash->invoices(), 'amount')) + $this->payment_hash->fee_total;
$amount = $this->payment_hash?->amount_with_fee() ?: 0; $amount = $this->payment_hash?->amount_with_fee() ?: 0;
$invoice = Invoice::query()->whereIn('id', $this->transformKeys(array_column($this->payment_hash->invoices(), 'invoice_id')))->withTrashed()->first(); $invoice = Invoice::query()->whereIn('id', $this->transformKeys(array_column($this->payment_hash->invoices(), 'invoice_id')))->withTrashed()->first();
} }

View File

@ -0,0 +1,59 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Listeners\Invoice;
use App\Libraries\MultiDB;
use App\Models\Activity;
use App\Repositories\ActivityRepository;
use Illuminate\Contracts\Queue\ShouldQueue;
use stdClass;
class InvoiceAutoBillFailedActivity implements ShouldQueue
{
protected $activity_repo;
public $delay = 10;
/**
* Create the event listener.
*
* @param ActivityRepository $activity_repo
*/
public function __construct(ActivityRepository $activity_repo)
{
$this->activity_repo = $activity_repo;
}
/**
* Handle the event.
*
* @param object $event
* @return void
*/
public function handle($event)
{
MultiDB::setDB($event->company->db);
$fields = new stdClass();
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invoice->user_id;
$fields->user_id = $user_id;
$fields->client_id = $event->invoice->client_id;
$fields->company_id = $event->invoice->company_id;
$fields->activity_type_id = Activity::AUTOBILL_FAILURE;
$fields->invoice_id = $event->invoice->id;
$fields->notes = $event->notes ?? '';
$this->activity_repo->save($fields, $event->invoice, $event->event_vars);
}
}

View File

@ -0,0 +1,58 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Listeners\Invoice;
use App\Libraries\MultiDB;
use App\Models\Activity;
use App\Repositories\ActivityRepository;
use Illuminate\Contracts\Queue\ShouldQueue;
use stdClass;
class InvoiceAutoBillSuccessActivity implements ShouldQueue
{
protected $activity_repo;
public $delay = 10;
/**
* Create the event listener.
*
* @param ActivityRepository $activity_repo
*/
public function __construct(ActivityRepository $activity_repo)
{
$this->activity_repo = $activity_repo;
}
/**
* Handle the event.
*
* @param object $event
* @return void
*/
public function handle($event)
{
MultiDB::setDB($event->company->db);
$fields = new stdClass();
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invoice->user_id;
$fields->user_id = $user_id;
$fields->client_id = $event->invoice->client_id;
$fields->company_id = $event->invoice->company_id;
$fields->activity_type_id = Activity::AUTOBILL_SUCCESS;
$fields->invoice_id = $event->invoice->id;
$this->activity_repo->save($fields, $event->invoice, $event->event_vars);
}
}

View File

@ -0,0 +1,142 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Livewire\EInvoice;
use Livewire\Component;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Http;
class Portal extends Component
{
public $email = '';
public $password = '';
public array $companies;
private string $api_url = '';
public function mount()
{
$this->api_url = config('ninja.hosted_ninja_url');
$this->getCompanies();
}
private function getCompanies(): self
{
$this->companies = auth()->guard('user')->check() ? auth()->guard('user')->user()->account->companies->map(function ($company) {
return [
'key' => $company->company_key,
'city' => $company->settings->city,
'country' => $company->country()->iso_3166_2,
'county' => $company->settings->state,
'line1' => $company->settings->address1,
'line2' => $company->settings->address2,
'party_name' => $company->settings->name,
'vat_number' => $company->settings->vat_number,
'zip' => $company->settings->postal_code,
'legal_entity_id' => $company->legal_entity_id,
'tax_registered' => (bool) strlen($company->settings->vat_number ?? '') > 2,
'tenant_id' => $company->company_key,
'classification' => strlen($company->settings->classification ?? '') > 2 ? $company->settings->classification : 'business',
];
})->toArray() : [];
return $this;
}
public function login()
{
$credentials = ['email' => $this->email, 'password' => $this->password];
if (Auth::attempt($credentials)) {
session()->flash('message', 'Logged in successfully.');
App::setLocale(auth()->guard('user')->user()->account->companies->first()->getLocale());
$this->getCOmpanies();
} else {
session()->flash('error', 'Invalid credentials.');
}
}
public function logout()
{
Auth::logout();
session()->flash('message', 'Logged out!');
}
public function register(string $company_key)
{
$register_company = [
'acts_as_receiver' => true,
'acts_as_sender' => true,
'advertisements' => ['invoice']
];
foreach($this->companies as $company)
{
if($company['key'] == $company_key)
$register_company = array_merge($company, $register_company);
}
$r = Http::withHeaders($this->getHeaders())
->post("{$this->api_url}/api/einvoice/createLegalEntity", $register_company);
if($r->successful())
{
nlog($r->body());
$response = $r->json();
$_company = auth()->guard('user')->user()->account->companies()->where('company_key', $company_key)->first();
$_company->legal_entity_id = $response['id'];
$_company->save();
$this->getCompanies();
return;
}
if($r->failed())
nlog($r->getBody()->getContents());
$error = json_decode($r->getBody()->getContents(),true);
session()->flash('error', $error['message']);
}
private function getHeaders()
{
return [
'X-API-SELF-HOST-TOKEN' => config('ninja.license_key'),
"X-Requested-With" => "XMLHttpRequest",
"Content-Type" => "application/json",
];
}
public function render()
{
return view('livewire.e-invoice.portal');
}
}

View File

@ -165,6 +165,7 @@ class InvoicePay extends Component
return $this->required_fields = true; return $this->required_fields = true;
} }
/** @var \App\Models\ClientContact $contact */
$contact = $this->getContext()['contact']; $contact = $this->getContext()['contact'];
foreach ($fields as $index => $field) { foreach ($fields as $index => $field) {
@ -173,7 +174,7 @@ class InvoicePay extends Component
if (\Illuminate\Support\Str::startsWith($field['name'], 'client_')) { if (\Illuminate\Support\Str::startsWith($field['name'], 'client_')) {
if ( if (
empty($contact->client->{$_field}) empty($contact->client->{$_field})
|| is_null($contact->client->{$_field}) || is_null($contact->client->{$_field}) //@phpstan-ignore-line
) { ) {
return $this->required_fields = true; return $this->required_fields = true;
@ -182,7 +183,7 @@ class InvoicePay extends Component
} }
if (\Illuminate\Support\Str::startsWith($field['name'], 'contact_')) { if (\Illuminate\Support\Str::startsWith($field['name'], 'contact_')) {
if (empty($contact->{$_field}) || is_null($contact->{$_field}) || str_contains($contact->{$_field}, '@example.com')) { if (empty($contact->{$_field}) || is_null($contact->{$_field}) || str_contains($contact->{$_field}, '@example.com')) { //@phpstan-ignore-line
return $this->required_fields = true; return $this->required_fields = true;
} }
} }

View File

@ -59,7 +59,7 @@ class ProcessPayment extends Component
} }
$driver = $company_gateway $driver = $company_gateway
->driver($invitation->contact->client) ->driver($invitation->contact->client) // @phpstan-ignore-line
->setPaymentMethod($data['payment_method_id']) ->setPaymentMethod($data['payment_method_id'])
->setPaymentHash($responder_data['payload']['ph']); ->setPaymentHash($responder_data['payload']['ph']);

View File

@ -88,7 +88,7 @@ class RequiredFields extends Component
$rff = new RFFService( $rff = new RFFService(
fields: $this->getContext()['fields'], fields: $this->getContext()['fields'],
database: $this->getContext()['db'], database: $this->getContext()['db'],
company_gateway_id: $this->company_gateway->id, company_gateway_id: (string)$this->company_gateway->id,
); );
/** @var \App\Models\ClientContact $contact */ /** @var \App\Models\ClientContact $contact */
@ -111,7 +111,7 @@ class RequiredFields extends Component
$rff = new RFFService( $rff = new RFFService(
fields: $this->fields, fields: $this->fields,
database: $this->getContext()['db'], database: $this->getContext()['db'],
company_gateway_id: $this->company_gateway->id, company_gateway_id: (string) $this->company_gateway->id,
); );
$contact = auth()->user(); $contact = auth()->user();

View File

@ -11,12 +11,14 @@
namespace App\Mail\Admin; namespace App\Mail\Admin;
use stdClass;
use App\Utils\Ninja;
use App\Models\Invoice; use App\Models\Invoice;
use App\Utils\HtmlEngine; use App\Utils\HtmlEngine;
use App\Utils\Ninja;
use App\Utils\Traits\MakesHash; use App\Utils\Traits\MakesHash;
use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\App;
use stdClass; use App\DataMapper\EmailTemplateDefaults;
use App\Utils\Number;
class ClientPaymentFailureObject class ClientPaymentFailureObject
{ {
@ -60,20 +62,20 @@ class ClientPaymentFailureObject
} }
App::forgetInstance('translator'); App::forgetInstance('translator');
/* Init a new copy of the translator*/
$t = app('translator'); $t = app('translator');
/* Set the locale*/
App::setLocale($this->client->locale()); App::setLocale($this->client->locale());
/* Set customized translations _NOW_ */
$t->replace(Ninja::transformTranslations($this->company->settings)); $t->replace(Ninja::transformTranslations($this->company->settings));
$this->invoices = Invoice::withTrashed()->whereIn('id', $this->transformKeys(array_column($this->payment_hash->invoices(), 'invoice_id')))->get(); $this->invoices = Invoice::withTrashed()->whereIn('id', $this->transformKeys(array_column($this->payment_hash->invoices(), 'invoice_id')))->get();
$data = $this->getData();
$mail_obj = new stdClass(); $mail_obj = new stdClass();
$mail_obj->amount = $this->getAmount(); $mail_obj->amount = $this->getAmount();
$mail_obj->subject = $this->getSubject(); $mail_obj->subject = $data['subject'];
$mail_obj->data = $this->getData(); $mail_obj->data = $this->getData();
$mail_obj->markdown = 'email.client.generic';
$mail_obj->markdown = 'email.template.client';
$mail_obj->tag = $this->company->company_key; $mail_obj->tag = $this->company->company_key;
$mail_obj->text_view = 'email.template.text'; $mail_obj->text_view = 'email.template.text';
@ -82,16 +84,32 @@ class ClientPaymentFailureObject
private function getAmount() private function getAmount()
{ {
return array_sum(array_column($this->payment_hash->invoices(), 'amount')) + $this->payment_hash->fee_total; $amount = array_sum(array_column($this->payment_hash->invoices(), 'amount')) + $this->payment_hash->fee_total;
return Number::formatMoney($amount, $this->client);
} }
private function getSubject() private function getSubject()
{ {
return
ctrans( if(strlen($this->client->getSetting('email_subject_payment_failed') ?? '') > 2){
'texts.notification_invoice_payment_failed_subject', return $this->client->getSetting('email_subject_payment_failed');
['invoice' => implode(',', $this->invoices->pluck('number')->toArray())] }
); else {
return EmailTemplateDefaults::getDefaultTemplate('email_subject_payment_failed', $this->client->locale());
}
}
private function getBody()
{
if(strlen($this->client->getSetting('email_template_payment_failed') ?? '') > 2) {
return $this->client->getSetting('email_template_payment_failed');
} else {
return EmailTemplateDefaults::getDefaultTemplate('email_template_payment_failed', $this->client->locale());
}
} }
private function getData() private function getData()
@ -104,17 +122,17 @@ class ClientPaymentFailureObject
$signature = $this->client->getSetting('email_signature'); $signature = $this->client->getSetting('email_signature');
$html_variables = (new HtmlEngine($invitation))->makeValues(); $html_variables = (new HtmlEngine($invitation))->makeValues();
$html_variables['$payment_error'] = $this->error ?? '';
$html_variables['$total'] = $this->getAmount();
$signature = str_replace(array_keys($html_variables), array_values($html_variables), $signature); $signature = str_replace(array_keys($html_variables), array_values($html_variables), $signature);
$subject = str_replace(array_keys($html_variables), array_values($html_variables), $this->getSubject());
$content = str_replace(array_keys($html_variables), array_values($html_variables), $this->getBody());
$data = [ $data = [
'title' => ctrans( 'subject' => $subject,
'texts.notification_invoice_payment_failed_subject', 'body' => $content,
[
'invoice' => $this->invoices->first()->number,
]
),
'greeting' => ctrans('texts.email_salutation', ['name' => $this->client->present()->name()]),
'content' => ctrans('texts.client_payment_failure_body', ['invoice' => implode(',', $this->invoices->pluck('number')->toArray()), 'amount' => $this->getAmount()]),
'signature' => $signature, 'signature' => $signature,
'logo' => $this->company->present()->logo(), 'logo' => $this->company->present()->logo(),
'settings' => $this->client->getMergedSettings(), 'settings' => $this->client->getMergedSettings(),

View File

@ -265,6 +265,12 @@ class Activity extends StaticModel
public const QUOTE_REMINDER1_SENT = 142; public const QUOTE_REMINDER1_SENT = 142;
public const AUTOBILL_SUCCESS = 143;
public const AUTOBILL_FAILURE = 144;
public const EMAIL_EINVOICE_SUCCESS = 145;
protected $casts = [ protected $casts = [
'is_system' => 'boolean', 'is_system' => 'boolean',
'updated_at' => 'timestamp', 'updated_at' => 'timestamp',
@ -280,13 +286,11 @@ class Activity extends StaticModel
'backup', 'backup',
]; ];
public function getHashedIdAttribute(): string public function getHashedIdAttribute(): string
{ {
return $this->encodePrimaryKey($this->id); return $this->encodePrimaryKey($this->id);
} }
public function getEntityType() public function getEntityType()
{ {
return self::class; return self::class;

View File

@ -17,6 +17,7 @@ use App\Utils\Traits\MakesHash;
use App\Jobs\Entity\CreateRawPdf; use App\Jobs\Entity\CreateRawPdf;
use App\Jobs\Util\WebhookHandler; use App\Jobs\Util\WebhookHandler;
use App\Models\Traits\Excludable; use App\Models\Traits\Excludable;
use App\Services\EDocument\Jobes\SendEDocument;
use App\Services\PdfMaker\PdfMerge; use App\Services\PdfMaker\PdfMerge;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use App\Utils\Traits\UserSessionAttributes; use App\Utils\Traits\UserSessionAttributes;
@ -31,6 +32,7 @@ use Illuminate\Database\Eloquent\ModelNotFoundException as ModelNotFoundExceptio
* @package App\Models * @package App\Models
* @property-read mixed $hashed_id * @property-read mixed $hashed_id
* @property string $number * @property string $number
* @property object|array|null $e_invoice
* @property int $company_id * @property int $company_id
* @property int $id * @property int $id
* @property int $user_id * @property int $user_id
@ -294,6 +296,37 @@ class BaseModel extends Model
if ($subscriptions) { if ($subscriptions) {
WebhookHandler::dispatch($event_id, $this->withoutRelations(), $this->company, $additional_data); WebhookHandler::dispatch($event_id, $this->withoutRelations(), $this->company, $additional_data);
} }
// special catch here for einvoicing eventing
if($event_id == Webhook::EVENT_SENT_INVOICE && ($this instanceof Invoice) && is_null($this->backup) && $this->client->getSetting('e_invoice_type') == 'PEPPOL'){
\App\Services\EDocument\Jobs\SendEDocument::dispatch(get_class($this), $this->id, $this->company->db);
}
}
/**
* arrayFilterRecursive
*
* Removes null properties from an array
*
* @param array $array
* @return array
*/
public function arrayFilterRecursive(array $array): array
{
foreach ($array as $key => $value) {
if (is_array($value)) {
// Recursively filter the nested array
$array[$key] = $this->arrayFilterRecursive($value);
}
// Remove null values
if (is_null($array[$key])) {
unset($array[$key]);
}
}
return $array;
} }
/** /**

View File

@ -50,7 +50,7 @@ use Laracasts\Presenter\PresentableTrait;
* @property int|null $last_login * @property int|null $last_login
* @property int|null $industry_id * @property int|null $industry_id
* @property int|null $size_id * @property int|null $size_id
* @property object|null $e_invoice * @property object|array|null $e_invoice
* @property string|null $address1 * @property string|null $address1
* @property string|null $address2 * @property string|null $address2
* @property string|null $city * @property string|null $city

View File

@ -129,6 +129,7 @@ use Laracasts\Presenter\PresentableTrait;
* @property string|null $smtp_local_domain * @property string|null $smtp_local_domain
* @property \App\DataMapper\QuickbooksSettings|null $quickbooks * @property \App\DataMapper\QuickbooksSettings|null $quickbooks
* @property boolean $smtp_verify_peer * @property boolean $smtp_verify_peer
* @property int|null $legal_entity_id
* @property-read \App\Models\Account $account * @property-read \App\Models\Account $account
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities * @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
* @property-read int|null $activities_count * @property-read int|null $activities_count
@ -382,7 +383,7 @@ class Company extends BaseModel
'smtp_encryption', 'smtp_encryption',
'smtp_local_domain', 'smtp_local_domain',
'smtp_verify_peer', 'smtp_verify_peer',
'e_invoice', // 'e_invoice',
]; ];
protected $hidden = [ protected $hidden = [

View File

@ -37,6 +37,7 @@ use Laracasts\Presenter\PresentableTrait;
* @property-read Project|null $project * @property-read Project|null $project
* @property-read int|null $tasks_count * @property-read int|null $tasks_count
* @property-read \App\Models\User $user * @property-read \App\Models\User $user
* @property-read \App\Models\User $assigned_user
* @property-read \App\Models\Vendor|null $vendor * @property-read \App\Models\Vendor|null $vendor
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel company() * @method static \Illuminate\Database\Eloquent\Builder|BaseModel company()
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel exclude($columns) * @method static \Illuminate\Database\Eloquent\Builder|BaseModel exclude($columns)
@ -117,6 +118,11 @@ class Project extends BaseModel
return $this->belongsTo(User::class)->withTrashed(); return $this->belongsTo(User::class)->withTrashed();
} }
public function assigned_user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(User::class, 'assigned_user_id', 'id')->withTrashed();
}
public function tasks(): \Illuminate\Database\Eloquent\Relations\HasMany public function tasks(): \Illuminate\Database\Eloquent\Relations\HasMany
{ {
return $this->hasMany(Task::class); return $this->hasMany(Task::class);

View File

@ -12,18 +12,19 @@
namespace App\PaymentDrivers; namespace App\PaymentDrivers;
use App\Utils\Traits\MakesHash;
use App\Models\PaymentHash;
use App\Models\GatewayType;
use App\PaymentDrivers\BTCPay\BTCPay;
use App\Models\SystemLog;
use App\Models\Payment;
use App\Models\Client; use App\Models\Client;
use App\Exceptions\PaymentFailed;
use App\Models\PaymentType;
use BTCPayServer\Client\Webhook;
use App\Http\Requests\Payments\PaymentWebhookRequest;
use App\Models\Invoice; use App\Models\Invoice;
use App\Models\Payment;
use App\Models\SystemLog;
use App\Models\GatewayType;
use App\Models\PaymentHash;
use App\Models\PaymentType;
use App\Utils\Traits\MakesHash;
use BTCPayServer\Client\Webhook;
use App\Exceptions\PaymentFailed;
use App\PaymentDrivers\BTCPay\BTCPay;
use App\Jobs\Mail\PaymentFailedMailer;
use App\Http\Requests\Payments\PaymentWebhookRequest;
class BTCPayPaymentDriver extends BaseDriver class BTCPayPaymentDriver extends BaseDriver
{ {
@ -138,8 +139,6 @@ class BTCPayPaymentDriver extends BaseDriver
$_invoice = $this->payment_hash->fee_invoice; $_invoice = $this->payment_hash->fee_invoice;
// Invoice::with('client')->withTrashed()->find($this->payment_hash->fee_invoice_id);
$this->client = $_invoice->client; $this->client = $_invoice->client;
$dataPayment = [ $dataPayment = [
@ -158,21 +157,49 @@ class BTCPayPaymentDriver extends BaseDriver
} }
switch ($btcpayRep->type) { switch ($btcpayRep->type) {
case "InvoiceExpired": case "InvoiceExpired":
if ($payment->status_id == Payment::STATUS_PENDING) {
$payment->service()->deletePayment();
$this->failedPaymentNotification($payment);
}
$StatusId = Payment::STATUS_CANCELLED; $StatusId = Payment::STATUS_CANCELLED;
break; break;
case "InvoiceInvalid": case "InvoiceInvalid":
if ($payment->status_id == Payment::STATUS_PENDING) {
$payment->service()->deletePayment();
$this->failedPaymentNotification($payment);
}
$StatusId = Payment::STATUS_FAILED; $StatusId = Payment::STATUS_FAILED;
break; break;
case "InvoiceSettled": case "InvoiceSettled":
$StatusId = Payment::STATUS_COMPLETED; $StatusId = Payment::STATUS_COMPLETED;
break; break;
} }
if ($payment->status_id != $StatusId) { if ($payment->status_id != $StatusId) {
$payment->status_id = $StatusId; $payment->status_id = $StatusId;
$payment->save(); $payment->save();
} }
} }
private function failedPaymentNotification(Payment $payment): void
{
$error = ctrans('texts.client_payment_failure_body', [
'invoice' => implode(',', $payment->invoices->pluck('number')->toArray()),
'amount' => array_sum(array_column($this->payment_hash->invoices(), 'amount')) + $this->payment_hash->fee_total, ]);
PaymentFailedMailer::dispatch(
$this->payment_hash,
$payment->client->company,
$payment->client,
$error
);
}
public function refund(Payment $payment, $amount, $return_client_response = false) public function refund(Payment $payment, $amount, $return_client_response = false)
{ {

View File

@ -232,7 +232,6 @@ class BaseDriver extends AbstractPaymentDriver
* *
* @param ClientGatewayToken $cgt The client gateway token object * @param ClientGatewayToken $cgt The client gateway token object
* @param PaymentHash $payment_hash The Payment hash containing the payment meta data * @param PaymentHash $payment_hash The Payment hash containing the payment meta data
* @return ?Payment|bool The payment response
*/ */
public function tokenBilling(ClientGatewayToken $cgt, PaymentHash $payment_hash) public function tokenBilling(ClientGatewayToken $cgt, PaymentHash $payment_hash)
{ {
@ -401,8 +400,12 @@ class BaseDriver extends AbstractPaymentDriver
$invoice = $this->payment_hash->fee_invoice; $invoice = $this->payment_hash->fee_invoice;
$fee_count = collect($invoice->line_items) $fee_count = collect($invoice->line_items)
->map(function ($item){
$item->gross_line_total = round($item->gross_line_total, 2);
return $item;
})
->whereIn('type_id', ['3','4']) ->whereIn('type_id', ['3','4'])
->where('gross_line_total', $fee_total) ->where('gross_line_total', round($fee_total,2))
->count(); ->count();
if($invoice && $fee_count == 0){ if($invoice && $fee_count == 0){
@ -426,15 +429,15 @@ class BaseDriver extends AbstractPaymentDriver
$invoice_items = (array) $invoice->line_items; $invoice_items = (array) $invoice->line_items;
$invoice_items[] = $invoice_item; $invoice_items[] = $invoice_item;
if (isset($data['gateway_type_id']) && $fees_and_limits = $this->company_gateway->getFeesAndLimits($data['gateway_type_id'])) { if (isset($data['gateway_type_id']) && $fees_and_limits = $this->company_gateway->getFeesAndLimits($data['gateway_type_id'])) {
$invoice_item->tax_rate1 = $fees_and_limits->fee_tax_rate1; $invoice_item->tax_rate1 = $fees_and_limits->fee_tax_rate1;
$invoice_item->tax_name1 = $fees_and_limits->fee_tax_name1; $invoice_item->tax_name1 = $fees_and_limits->fee_tax_name1;
$invoice_item->tax_rate2 = $fees_and_limits->fee_tax_rate2; $invoice_item->tax_rate2 = $fees_and_limits->fee_tax_rate2;
$invoice_item->tax_name2 = $fees_and_limits->fee_tax_name2; $invoice_item->tax_name2 = $fees_and_limits->fee_tax_name2;
$invoice_item->tax_rate3 = $fees_and_limits->fee_tax_rate3; $invoice_item->tax_rate3 = $fees_and_limits->fee_tax_rate3;
$invoice_item->tax_name3 = $fees_and_limits->fee_tax_name3; $invoice_item->tax_name3 = $fees_and_limits->fee_tax_name3;
$invoice_item->tax_id = (string)\App\Models\Product::PRODUCT_TYPE_OVERRIDE_TAX; $invoice_item->tax_id = (string)\App\Models\Product::PRODUCT_TYPE_OVERRIDE_TAX;
} }
$invoice->line_items = $invoice_items; $invoice->line_items = $invoice_items;

View File

@ -109,8 +109,8 @@ class CreditCard
SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::CATEGORY_GATEWAY_RESPONSE,
SystemLog::EVENT_GATEWAY_FAILURE, SystemLog::EVENT_GATEWAY_FAILURE,
SystemLog::TYPE_FORTE, SystemLog::TYPE_FORTE,
$this->client, $this->forte->client,
$this->client->company, $this->forte->client->company,
); );
throw new \App\Exceptions\PaymentFailed("Unable to store payment method: {$error->response->response_desc}", 400); throw new \App\Exceptions\PaymentFailed("Unable to store payment method: {$error->response->response_desc}", 400);

View File

@ -105,6 +105,9 @@ class InstantBankPay implements MethodInterface
$this->go_cardless->payment_hash->data->billing_request $this->go_cardless->payment_hash->data->billing_request
); );
nlog($billing_request);
$payment = $this->go_cardless->gateway->payments()->get( $payment = $this->go_cardless->gateway->payments()->get(
$billing_request->payment_request->links->payment $billing_request->payment_request->links->payment
); );

View File

@ -286,7 +286,8 @@ class MolliePaymentDriver extends BaseDriver
public function processWebhookRequest(PaymentWebhookRequest $request) public function processWebhookRequest(PaymentWebhookRequest $request)
{ {
// Allow app to catch up with webhook request. // Allow app to catch up with webhook request.
sleep(4); // sleep(4);
usleep(rand(2800000, 4000000));
$validator = Validator::make($request->all(), [ $validator = Validator::make($request->all(), [
'id' => ['required', 'starts_with:tr'], 'id' => ['required', 'starts_with:tr'],

View File

@ -1,261 +0,0 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\PaymentDrivers;
use App\Exceptions\PaymentFailed;
use App\Jobs\Util\SystemLogger;
use App\Models\GatewayType;
use App\Models\Invoice;
use App\Models\PaymentType;
use App\Models\SystemLog;
use App\Utils\Traits\MakesHash;
use Omnipay\Common\Item;
use Omnipay\Omnipay;
class PayPalExpressPaymentDriver extends BaseDriver
{
use MakesHash;
public $token_billing = false;
public $can_authorise_credit_card = false;
private $omnipay_gateway;
private float $fee = 0;
public const SYSTEM_LOG_TYPE = SystemLog::TYPE_PAYPAL;
public function gatewayTypes()
{
return [
GatewayType::PAYPAL,
];
}
public function init()
{
return $this;
}
/**
* Initialize Omnipay PayPal_Express gateway.
*
* @return void
*/
private function initializeOmnipayGateway(): void
{
$this->omnipay_gateway = Omnipay::create(
$this->company_gateway->gateway->provider
);
$this->omnipay_gateway->initialize((array) $this->company_gateway->getConfig());
}
public function setPaymentMethod($payment_method_id)
{
// PayPal doesn't have multiple ways of paying.
// There's just one, off-site redirect.
return $this;
}
public function authorizeView($payment_method)
{
// PayPal doesn't support direct authorization.
return $this;
}
public function authorizeResponse($request)
{
// PayPal doesn't support direct authorization.
return $this;
}
public function processPaymentView($data)
{
$this->initializeOmnipayGateway();
$this->payment_hash->data = array_merge((array) $this->payment_hash->data, ['amount' => $data['total']['amount_with_fee']]);
$this->payment_hash->save();
$response = $this->omnipay_gateway
->purchase($this->generatePaymentDetails($data))
->setItems($this->generatePaymentItems($data))
->send();
if ($response->isRedirect()) {
return redirect($response->getRedirectUrl());
}
// $this->sendFailureMail($response->getMessage() ?: '');
$message = [
'server_response' => $response->getMessage(),
'data' => $this->payment_hash->data,
];
SystemLogger::dispatch(
$message,
SystemLog::CATEGORY_GATEWAY_RESPONSE,
SystemLog::EVENT_GATEWAY_FAILURE,
SystemLog::TYPE_PAYPAL,
$this->client,
$this->client->company,
);
throw new PaymentFailed($response->getMessage(), $response->getCode());
}
public function processPaymentResponse($request)
{
$this->initializeOmnipayGateway();
$response = $this->omnipay_gateway
->completePurchase(['amount' => $this->payment_hash->data->amount, 'currency' => $this->client->getCurrencyCode()])
->send();
if ($response->isCancelled() && $this->client->getSetting('enable_client_portal')) {
return redirect()->route('client.invoices.index')->with('warning', ctrans('texts.status_cancelled'));
} elseif($response->isCancelled() && !$this->client->getSetting('enable_client_portal')) {
redirect()->route('client.invoices.show', ['invoice' => $this->payment_hash->fee_invoice])->with('warning', ctrans('texts.status_cancelled'));
}
if ($response->isSuccessful()) {
$data = [
'payment_method' => $response->getData()['TOKEN'],
'payment_type' => PaymentType::PAYPAL,
'amount' => $this->payment_hash->data->amount,
'transaction_reference' => $response->getTransactionReference(),
'gateway_type_id' => GatewayType::PAYPAL,
];
$payment = $this->createPayment($data, \App\Models\Payment::STATUS_COMPLETED);
SystemLogger::dispatch(
['response' => (array) $response->getData(), 'data' => $data],
SystemLog::CATEGORY_GATEWAY_RESPONSE,
SystemLog::EVENT_GATEWAY_SUCCESS,
SystemLog::TYPE_PAYPAL,
$this->client,
$this->client->company,
);
return redirect()->route('client.payments.show', ['payment' => $this->encodePrimaryKey($payment->id)]);
}
if (! $response->isSuccessful()) {
$data = $response->getData();
$this->sendFailureMail($response->getMessage() ?: '');
$message = [
'server_response' => $data['L_LONGMESSAGE0'],
'data' => $this->payment_hash->data,
];
SystemLogger::dispatch(
$message,
SystemLog::CATEGORY_GATEWAY_RESPONSE,
SystemLog::EVENT_GATEWAY_FAILURE,
SystemLog::TYPE_PAYPAL,
$this->client,
$this->client->company,
);
throw new PaymentFailed($response->getMessage(), $response->getCode());
}
}
public function generatePaymentDetails(array $data)
{
$_invoice = collect($this->payment_hash->data->invoices)->first();
$invoice = Invoice::withTrashed()->find($this->decodePrimaryKey($_invoice->invoice_id));
// $this->fee = $this->feeCalc($invoice, $data['total']['amount_with_fee']);
return [
'currency' => $this->client->getCurrencyCode(),
'transactionType' => 'Purchase',
'clientIp' => request()->getClientIp(),
// 'amount' => round(($data['total']['amount_with_fee'] + $this->fee),2),
'amount' => round($data['total']['amount_with_fee'], 2),
'returnUrl' => route('client.payments.response', [
'company_gateway_id' => $this->company_gateway->id,
'payment_hash' => $this->payment_hash->hash,
'payment_method_id' => GatewayType::PAYPAL,
]),
'cancelUrl' => $this->client->company->domain()."/client/invoices/{$invoice->hashed_id}",
'description' => implode(',', collect($this->payment_hash->data->invoices)
->map(function ($invoice) {
return sprintf('%s: %s', ctrans('texts.invoice_number'), $invoice->invoice_number);
})->toArray()),
'transactionId' => $this->payment_hash->hash.'-'.time(),
'ButtonSource' => 'InvoiceNinja_SP',
'solutionType' => 'Sole',
'no_shipping' => $this->company_gateway->require_shipping_address ? 0 : 1,
];
}
public function generatePaymentItems(array $data)
{
$_invoice = collect($this->payment_hash->data->invoices)->first();
$invoice = Invoice::withTrashed()->find($this->decodePrimaryKey($_invoice->invoice_id));
$items = [];
$items[] = new Item([
'name' => ' ',
'description' => ctrans('texts.invoice_number').'# '.$invoice->number,
'price' => $data['total']['amount_with_fee'],
'quantity' => 1,
]);
return $items;
}
private function feeCalc($invoice, $invoice_total)
{
$invoice->service()->removeUnpaidGatewayFees();
$invoice = $invoice->fresh();
$balance = floatval($invoice->balance);
$_updated_invoice = $invoice->service()->addGatewayFee($this->company_gateway, GatewayType::PAYPAL, $invoice_total)->save();
if (floatval($_updated_invoice->balance) > $balance) {
$fee = floatval($_updated_invoice->balance) - $balance;
$this->payment_hash->fee_total = $fee;
$this->payment_hash->save();
return $fee;
}
return 0;
}
public function livewirePaymentView(array $data): string
{
$this->processPaymentView($data);
return ''; // Gateway is offsite.
}
public function processPaymentViewData(array $data): array
{
return $data;
}
}

View File

@ -125,6 +125,13 @@ class ImportCustomers
$settings->currency_id = (string) $currency->id; $settings->currency_id = (string) $currency->id;
$client->settings = $settings; $client->settings = $settings;
} }
}else {
$settings = $client->settings;
$settings->currency_id = (string) $this->stripe->company_gateway->company->settings->currency_id;
$client->settings = $settings;
} }
$client->name = $customer->name ? $customer->name : $customer->email; $client->name = $customer->name ? $customer->name : $customer->email;

View File

@ -49,6 +49,18 @@ class UpdatePaymentMethods
$this->addOrUpdateCard($method, $customer->id, $client, GatewayType::CREDIT_CARD); $this->addOrUpdateCard($method, $customer->id, $client, GatewayType::CREDIT_CARD);
} }
$link_methods = PaymentMethod::all(
[
'customer' => $customer->id,
'type' => 'link',
],
$this->stripe->stripe_connect_auth
);
foreach ($link_methods as $method) {
$this->addOrUpdateCard($method, $customer->id, $client, GatewayType::CREDIT_CARD);
}
$alipay_methods = PaymentMethod::all( $alipay_methods = PaymentMethod::all(
[ [
'customer' => $customer->id, 'customer' => $customer->id,
@ -217,9 +229,14 @@ class UpdatePaymentMethods
private function buildPaymentMethodMeta(PaymentMethod $method, $type_id) private function buildPaymentMethodMeta(PaymentMethod $method, $type_id)
{ {
nlog($method->type);
switch ($type_id) { switch ($type_id) {
case GatewayType::CREDIT_CARD: case GatewayType::CREDIT_CARD:
if($method->type == 'link')
return new \stdClass();
/** /**
* @class \Stripe\PaymentMethod $method * @class \Stripe\PaymentMethod $method
* @property \Stripe\StripeObject $card * @property \Stripe\StripeObject $card

View File

@ -155,6 +155,8 @@ use App\Listeners\Activity\TaskUpdatedActivity;
use App\Listeners\Invoice\InvoiceEmailActivity; use App\Listeners\Invoice\InvoiceEmailActivity;
use App\Listeners\SendVerificationNotification; use App\Listeners\SendVerificationNotification;
use App\Events\Credit\CreditWasEmailedAndFailed; use App\Events\Credit\CreditWasEmailedAndFailed;
use App\Events\Invoice\InvoiceAutoBillFailed;
use App\Events\Invoice\InvoiceAutoBillSuccess;
use App\Listeners\Activity\CreatedQuoteActivity; use App\Listeners\Activity\CreatedQuoteActivity;
use App\Listeners\Activity\DeleteClientActivity; use App\Listeners\Activity\DeleteClientActivity;
use App\Listeners\Activity\DeleteCreditActivity; use App\Listeners\Activity\DeleteCreditActivity;
@ -250,6 +252,8 @@ use App\Events\RecurringExpense\RecurringExpenseWasArchived;
use App\Events\RecurringExpense\RecurringExpenseWasRestored; use App\Events\RecurringExpense\RecurringExpenseWasRestored;
use App\Events\RecurringInvoice\RecurringInvoiceWasArchived; use App\Events\RecurringInvoice\RecurringInvoiceWasArchived;
use App\Events\RecurringInvoice\RecurringInvoiceWasRestored; use App\Events\RecurringInvoice\RecurringInvoiceWasRestored;
use App\Listeners\Invoice\InvoiceAutoBillFailedActivity;
use App\Listeners\Invoice\InvoiceAutoBillSuccessActivity;
use App\Listeners\PurchaseOrder\CreatePurchaseOrderActivity; use App\Listeners\PurchaseOrder\CreatePurchaseOrderActivity;
use App\Listeners\PurchaseOrder\PurchaseOrderViewedActivity; use App\Listeners\PurchaseOrder\PurchaseOrderViewedActivity;
use App\Listeners\PurchaseOrder\UpdatePurchaseOrderActivity; use App\Listeners\PurchaseOrder\UpdatePurchaseOrderActivity;
@ -426,6 +430,12 @@ class EventServiceProvider extends ServiceProvider
ExpenseRestoredActivity::class, ExpenseRestoredActivity::class,
], ],
//Invoices //Invoices
InvoiceAutoBillSuccess::class => [
InvoiceAutoBillSuccessActivity::class,
],
InvoiceAutoBillFailed::class => [
InvoiceAutoBillFailedActivity::class,
],
InvoiceWasMarkedSent::class => [ InvoiceWasMarkedSent::class => [
], ],
InvoiceWasUpdated::class => [ InvoiceWasUpdated::class => [

View File

@ -222,6 +222,10 @@ class StaticServiceProvider extends ServiceProvider
'subject' => EmailTemplateDefaults::emailPaymentSubject(), 'subject' => EmailTemplateDefaults::emailPaymentSubject(),
'body' => EmailTemplateDefaults::emailPaymentTemplate(), 'body' => EmailTemplateDefaults::emailPaymentTemplate(),
], ],
'payment_failed' => [
'subject' => EmailTemplateDefaults::emailPaymentFailedSubject(),
'body' => EmailTemplateDefaults::emailPaymentFailedTemplate(),
],
'quote_reminder1' => [ 'quote_reminder1' => [
'subject' => EmailTemplateDefaults::emailQuoteReminder1Subject(), 'subject' => EmailTemplateDefaults::emailQuoteReminder1Subject(),
'body' => EmailTemplateDefaults::emailQuoteReminder1Body(), 'body' => EmailTemplateDefaults::emailQuoteReminder1Body(),

View File

@ -147,8 +147,7 @@ class BaseRepository
* @throws \ReflectionException * @throws \ReflectionException
*/ */
protected function alternativeSave($data, $model) protected function alternativeSave($data, $model)
{ //$start = microtime(true); {
//forces the client_id if it doesn't exist
if (array_key_exists('client_id', $data)) { if (array_key_exists('client_id', $data)) {
$model->client_id = $data['client_id']; $model->client_id = $data['client_id'];
} }
@ -167,7 +166,7 @@ class BaseRepository
$company_defaults = $client->setCompanyDefaults($data, lcfirst($resource)); $company_defaults = $client->setCompanyDefaults($data, lcfirst($resource));
$data['exchange_rate'] = $company_defaults['exchange_rate']; $data['exchange_rate'] = $company_defaults['exchange_rate'];
$model->uses_inclusive_taxes = $client->getSetting('inclusive_taxes'); $model->uses_inclusive_taxes = $client->getSetting('inclusive_taxes');
// $data = array_merge($company_defaults, $data);
$data = array_merge($data, $company_defaults); $data = array_merge($data, $company_defaults);
} }
@ -321,6 +320,17 @@ class BaseRepository
UpdateTaxData::dispatch($client, $client->company); UpdateTaxData::dispatch($client, $client->company);
} }
/** If Peppol is enabled - we will save the e_invoice document here at this point, document will not update after being sent */
if(strlen($model->backup ?? '') == 0 && $client->getSetting('e_invoice_type') == 'PEPPOL' && $model->company->legal_entity_id)
{
try{
$model->service()->getEInvoice();
}
catch(\Exception $e){
nlog("EXCEPTION:: BASEREPOSITORY:: Error generating e_invoice for model {$model->id}");
nlog($e->getMessage());
}
}
} }
if ($model instanceof Credit) { if ($model instanceof Credit) {

View File

@ -76,6 +76,13 @@ class ClientRepository extends BaseRepository
$client->country_id = $company->settings->country_id; $client->country_id = $company->settings->country_id;
} }
if(isset($data['e_invoice']) && is_array($data['e_invoice'])) {
//ensure it is normalized first!
$data['e_invoice'] = $client->arrayFilterRecursive($data['e_invoice']);
$client->e_invoice = $data['e_invoice'];
}
$client->save(); $client->save();
if (! isset($client->number) || empty($client->number) || strlen($client->number) == 0) { if (! isset($client->number) || empty($client->number) || strlen($client->number) == 0) {
@ -107,6 +114,7 @@ class ClientRepository extends BaseRepository
$this->contact_repo->save($contact_data, $client); $this->contact_repo->save($contact_data, $client);
} }
return $client; return $client;
} }

View File

@ -11,8 +11,9 @@
namespace App\Repositories; namespace App\Repositories;
use App\Models\Company;
use App\Utils\Ninja; use App\Utils\Ninja;
use App\Models\Company;
use App\Repositories\BaseRepository;
/** /**
* CompanyRepository. * CompanyRepository.
@ -57,6 +58,13 @@ class CompanyRepository extends BaseRepository
$company->smtp_password = $data['smtp_password']; $company->smtp_password = $data['smtp_password'];
} }
if(isset($data['e_invoice']) && is_array($data['e_invoice'])){
//ensure it is normalized first!
$data['e_invoice'] = $company->arrayFilterRecursive($data['e_invoice']);
$company->e_invoice = $data['e_invoice'];
}
$company->save(); $company->save();
return $company; return $company;

View File

@ -13,6 +13,7 @@ namespace App\Services\Bank;
use App\Factory\ExpenseCategoryFactory; use App\Factory\ExpenseCategoryFactory;
use App\Factory\ExpenseFactory; use App\Factory\ExpenseFactory;
use App\Jobs\Bank\MatchBankTransactions;
use App\Models\BankTransaction; use App\Models\BankTransaction;
use App\Models\Client; use App\Models\Client;
use App\Models\ExpenseCategory; use App\Models\ExpenseCategory;
@ -20,12 +21,14 @@ use App\Models\Invoice;
use App\Models\Payment; use App\Models\Payment;
use App\Services\AbstractService; use App\Services\AbstractService;
use App\Utils\Traits\GeneratesCounter; use App\Utils\Traits\GeneratesCounter;
use App\Utils\Traits\MakesHash;
use Illuminate\Support\Carbon; use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Cache;
class ProcessBankRules extends AbstractService class ProcessBankRules extends AbstractService
{ {
use GeneratesCounter; use GeneratesCounter;
use MakesHash;
protected $credit_rules; protected $credit_rules;
@ -87,6 +90,8 @@ class ProcessBankRules extends AbstractService
foreach ($bank_transaction_rule['rules'] as $rule) { foreach ($bank_transaction_rule['rules'] as $rule) {
$results = [];
$payments = Payment::query() $payments = Payment::query()
->withTrashed() ->withTrashed()
->whereIn('status_id', [1,4]) ->whereIn('status_id', [1,4])
@ -101,28 +106,26 @@ class ProcessBankRules extends AbstractService
->where('is_deleted', 0) ->where('is_deleted', 0)
->get(); ->get();
$results = [];
match($rule['search_key']) { match($rule['search_key']) {
'$payment.amount' => $results = [Payment::class, $this->searchPaymentResource('amount', $rule, $payments)], '$payment.amount' => $results = [Payment::class, $this->searchPaymentResource('amount', $rule, $payments)],
'$payment.transaction_reference' => $results = [Payment::class, $this->searchPaymentResource('transaction_reference', $rule, $payments)], '$payment.transaction_reference' => $results = [Payment::class, $this->searchPaymentResource('transaction_reference', $rule, $payments)],
'$payment.custom1' => $results = [Payment::class, $this->searchPaymentResource('custom1', $rule, $payments)], '$payment.custom1' => $results = [Payment::class, $this->searchPaymentResource('custom_value1', $rule, $payments)],
'$payment.custom2' => $results = [Payment::class, $this->searchPaymentResource('custom2', $rule, $payments)], '$payment.custom2' => $results = [Payment::class, $this->searchPaymentResource('custom_value2', $rule, $payments)],
'$payment.custom3' => $results = [Payment::class, $this->searchPaymentResource('custom3', $rule, $payments)], '$payment.custom3' => $results = [Payment::class, $this->searchPaymentResource('custom_value3', $rule, $payments)],
'$payment.custom4' => $results = [Payment::class, $this->searchPaymentResource('custom4', $rule, $payments)], '$payment.custom4' => $results = [Payment::class, $this->searchPaymentResource('custom_value4', $rule, $payments)],
'$invoice.amount' => $results = [Invoice::class, $this->searchInvoiceResource('amount', $rule, $invoices)], '$invoice.amount' => $results = [Invoice::class, $this->searchInvoiceResource('amount', $rule, $invoices)],
'$invoice.number' => $results = [Invoice::class, $this->searchInvoiceResource('number', $rule, $invoices)], '$invoice.number' => $results = [Invoice::class, $this->searchInvoiceResource('number', $rule, $invoices)],
'$invoice.po_number' => $results = [Invoice::class, $this->searchInvoiceResource('po_number', $rule, $invoices)], '$invoice.po_number' => $results = [Invoice::class, $this->searchInvoiceResource('po_number', $rule, $invoices)],
'$invoice.custom1' => $results = [Invoice::class, $this->searchInvoiceResource('custom1', $rule, $invoices)], '$invoice.custom1' => $results = [Invoice::class, $this->searchInvoiceResource('custom_value1', $rule, $invoices)],
'$invoice.custom2' => $results = [Invoice::class, $this->searchInvoiceResource('custom2', $rule, $invoices)], '$invoice.custom2' => $results = [Invoice::class, $this->searchInvoiceResource('custom_value2', $rule, $invoices)],
'$invoice.custom3' => $results = [Invoice::class, $this->searchInvoiceResource('custom3', $rule, $invoices)], '$invoice.custom3' => $results = [Invoice::class, $this->searchInvoiceResource('custom_value3', $rule, $invoices)],
'$invoice.custom4' => $results = [Invoice::class, $this->searchInvoiceResource('custom4', $rule, $invoices)], '$invoice.custom4' => $results = [Invoice::class, $this->searchInvoiceResource('custom_value4', $rule, $invoices)],
'$client.id_number' => $results = [Client::class, $this->searchClientResource('id_number', $rule, $invoices, $payments)], '$client.id_number' => $results = [Client::class, $this->searchClientResource('id_number', $rule, $invoices, $payments)],
'$client.email' => $results = [Client::class, $this->searchClientResource('email', $rule, $invoices, $payments)], '$client.email' => $results = [Client::class, $this->searchClientResource('email', $rule, $invoices, $payments)],
'$client.custom1' => $results = [Client::class, $this->searchClientResource('custom1', $rule, $invoices, $payments)], '$client.custom1' => $results = [Client::class, $this->searchClientResource('custom_value1', $rule, $invoices, $payments)],
'$client.custom2' => $results = [Client::class, $this->searchClientResource('custom2', $rule, $invoices, $payments)], '$client.custom2' => $results = [Client::class, $this->searchClientResource('custom_value2', $rule, $invoices, $payments)],
'$client.custom3' => $results = [Client::class, $this->searchClientResource('custom3', $rule, $invoices, $payments)], '$client.custom3' => $results = [Client::class, $this->searchClientResource('custom_value3', $rule, $invoices, $payments)],
'$client.custom4' => $results = [Client::class, $this->searchClientResource('custom4', $rule, $invoices, $payments)], '$client.custom4' => $results = [Client::class, $this->searchClientResource('custom_value4', $rule, $invoices, $payments)],
default => $results = [Client::class, [collect([]), Invoice::class]], default => $results = [Client::class, [collect([]), Invoice::class]],
}; };
@ -140,73 +143,49 @@ class ProcessBankRules extends AbstractService
} }
} }
if (($bank_transaction_rule['matches_on_all'] && $this->checkMatchSetForKey($match_set, $rule_count)) || (!$bank_transaction_rule['matches_on_all'] && count($match_set) > 0)) { if (($bank_transaction_rule['matches_on_all'] && $this->checkMatchSetForKey($match_set, $rule_count)) || (!$bank_transaction_rule['matches_on_all'] && count($match_set) > 0))
{
$this->bank_transaction->vendor_id = $bank_transaction_rule->vendor_id;
$this->bank_transaction->ninja_category_id = $bank_transaction_rule->category_id;
$this->bank_transaction->status_id = BankTransaction::STATUS_MATCHED; $this->bank_transaction->status_id = BankTransaction::STATUS_MATCHED;
$this->bank_transaction->bank_transaction_rule_id = $bank_transaction_rule->id; $this->bank_transaction->bank_transaction_rule_id = $bank_transaction_rule->id;
$this->bank_transaction->save(); $this->bank_transaction->save();
$first_result = reset($match_set);
//auto-convert $invoice_id = false;
$payment_id = false;
if($first_result[0] == Payment::class) {
$payment_id = $first_result[1][0];
}
elseif($first_result[0] == Invoice::class) {
$invoice_id = $first_result[1][0];
}
if ($bank_transaction_rule['auto_convert']) { if ($bank_transaction_rule['auto_convert']) {
(new MatchBankTransactions($this->bank_transaction->company->id, $this->bank_transaction->company->db, [
'transactions' => [
[
'id' => $this->bank_transaction->id,
'invoice_ids' => $invoice_id ?? '',
'payment_id' => $payment_id ?? '',
],
],
]))->handle();
}
else {
//all types must match. if($invoice_id){
$entity = $match_set[0][0]; $this->bank_transaction->invoice_ids = $this->encodePrimaryKey($invoice_id);
}
foreach($match_set as $set) elseif($payment_id){
{ $this->bank_transaction->payment_id = $payment_id;
if($set[0] != $entity)
return false;
} }
// $result_set = [];
// foreach($match_set as $key => $set) {
// $parseable_set = $match_set;
// unset($parseable_set[$key]);
// $entity_ids = $set[1];
// foreach($parseable_set as $kkey => $vvalue) {
// $i = array_intersect($vvalue[1], $entity_ids);
// if(count($i) == 0) {
// return false;
// }
// $result_set[] = $i;
// }
// $commonValues = $result_set[0]; // Start with the first sub-array
// foreach ($result_set as $subArray) {
// $commonValues = array_intersect($commonValues, $subArray);
// }
// echo print_r($commonValues, true);
//just need to ensure the result count = rule count
// }
//there must be a key in each set
//no misses allowed
$this->bank_transaction->status_id = BankTransaction::STATUS_CONVERTED;
$this->bank_transaction->save(); $this->bank_transaction->save();
} }
} }
} }
@ -221,13 +200,13 @@ class ProcessBankRules extends AbstractService
private function searchInvoiceResource(string $column, array $rule, $invoices) private function searchInvoiceResource(string $column, array $rule, $invoices)
{ {
return $invoices->when($rule['search_key'] == 'description', function ($q) use ($rule, $column) { return $invoices->when($column != 'amount', function ($q) use ($rule, $column) {
return $q->cursor()->filter(function ($record) use ($rule, $column) { return $q->filter(function ($record) use ($rule, $column) {
return $this->matchStringOperator($this->bank_transaction->description, $record->{$column}, $rule['operator']); return $this->matchStringOperator($this->bank_transaction->description, $record->{$column}, $rule['operator']);
}); });
}) })
->when($rule['search_key'] == 'amount', function ($q) use ($rule, $column) { ->when($column == 'amount', function ($q) use ($rule, $column) {
return $q->cursor()->filter(function ($record) use ($rule, $column) { return $q->filter(function ($record) use ($rule, $column) {
return $this->matchNumberOperator($this->bank_transaction->amount, $record->{$column}, $rule['operator']); return $this->matchNumberOperator($this->bank_transaction->amount, $record->{$column}, $rule['operator']);
}); });
})->pluck("id"); })->pluck("id");
@ -236,17 +215,18 @@ class ProcessBankRules extends AbstractService
private function searchPaymentResource(string $column, array $rule, $payments) private function searchPaymentResource(string $column, array $rule, $payments)
{ {
return $payments->when($column != 'amount', function ($q) use ($rule, $column) {
return $q->filter(function ($record) use ($rule, $column) {
return $payments->when($rule['search_key'] == 'description', function ($q) use ($rule, $column) { $bool = $this->matchStringOperator($this->bank_transaction->description, $record->{$column}, $rule['operator']);
return $q->cursor()->filter(function ($record) use ($rule, $column) { return $bool;
return $this->matchStringOperator($this->bank_transaction->description, $record->{$column}, $rule['operator']);
}); });
}) })
->when($rule['search_key'] == 'amount', function ($q) use ($rule, $column) { ->when($column == 'amount', function ($q) use ($rule, $column) {
return $q->cursor()->filter(function ($record) use ($rule, $column) { return $q->filter(function ($record) use ($rule, $column) {
return $this->matchNumberOperator($this->bank_transaction->amount, $record->{$column}, $rule['operator']); return $this->matchNumberOperator($this->bank_transaction->amount, $record->{$column}, $rule['operator']);
}); });
})->pluck("id"); })->pluck("id");
} }
@ -297,324 +277,6 @@ class ProcessBankRules extends AbstractService
return [Client::class, collect([])]; return [Client::class, collect([])];
} }
// $payment.amount => "Payment Amount", float
// $payment.transaction_reference => "Payment Transaction Reference", string
// $invoice.amount => "Invoice Amount", float
// $invoice.number => "Invoice Number", string
// $client.id_number => "Client ID Number", string
// $client.email => "Client Email", string
// $invoice.po_number => "Invoice Purchase Order Number", string
// private function matchCredit()
// {
// $this->invoices = Invoice::query()->where('company_id', $this->bank_transaction->company_id)
// ->whereIn('status_id', [1,2,3])
// ->where('is_deleted', 0)
// ->get();
// $invoice = $this->invoices->first(function ($value, $key) {
// return str_contains($this->bank_transaction->description, $value->number) || str_contains(str_replace("\n", "", $this->bank_transaction->description), $value->number);
// });
// if ($invoice) {
// $this->bank_transaction->invoice_ids = $invoice->hashed_id;
// $this->bank_transaction->status_id = BankTransaction::STATUS_MATCHED;
// $this->bank_transaction->save();
// return;
// }
// $this->credit_rules = $this->bank_transaction->company->credit_rules();
// //stub for credit rules
// foreach ($this->credit_rules as $bank_transaction_rule) {
// $matches = 0;
// if (!is_array($bank_transaction_rule['rules'])) {
// continue;
// }
// foreach ($bank_transaction_rule['rules'] as $rule) {
// $rule_count = count($bank_transaction_rule['rules']);
// $invoiceNumbers = false;
// $invoiceNumber = false;
// $invoiceAmounts = false;
// $paymentAmounts = false;
// $paymentReferences = false;
// $clientIdNumbers = false;
// $clientEmails = false;
// $invoicePONumbers = false;
// if ($rule['search_key'] == '$invoice.number') {
// $invoiceNumbers = Invoice::query()->where('company_id', $this->bank_transaction->company_id)
// ->whereIn('status_id', [1,2,3])
// ->where('is_deleted', 0)
// ->get();
// $invoiceNumber = $invoiceNumbers->first(function ($value, $key) {
// return str_contains($this->bank_transaction->description, $value->number) || str_contains(str_replace("\n", "", $this->bank_transaction->description), $value->number);
// });
// if($invoiceNumber)
// $matches++;
// }
// if ($rule['search_key'] == '$invoice.po_number') {
// $invoicePONumbers = Invoice::query()->where('company_id', $this->bank_transaction->company_id)
// ->whereIn('status_id', [1,2,3])
// ->where('is_deleted', 0)
// ->where('po_number', $this->bank_transaction->description)
// ->get();
// if($invoicePONumbers->count() > 0) {
// $matches++;
// }
// }
// if ($rule['search_key'] == '$invoice.amount') {
// $$invoiceAmounts = Invoice::query()->where('company_id', $this->bank_transaction->company_id)
// ->whereIn('status_id', [1,2,3])
// ->where('is_deleted', 0)
// ->where('amount', $rule['operator'], $this->bank_transaction->amount)
// ->get();
// $invoiceAmounts = $this->invoices;
// if($invoiceAmounts->count() > 0) {
// $matches++;
// }
// }
// if ($rule['search_key'] == '$payment.amount') {
// $paymentAmounts = Payment::query()->where('company_id', $this->bank_transaction->company_id)
// ->whereIn('status_id', [1,4])
// ->where('is_deleted', 0)
// ->whereNull('transaction_id')
// ->where('amount', $rule['operator'], $this->bank_transaction->amount)
// ->get();
// if($paymentAmounts->count() > 0) {
// $matches++;
// }
// }
// if ($rule['search_key'] == '$payment.transaction_reference') {
// $ref_search = $this->bank_transaction->description;
// switch ($rule['operator']) {
// case 'is':
// $operator = '=';
// break;
// case 'contains':
// $ref_search = "%".$ref_search."%";
// $operator = 'LIKE';
// break;
// default:
// $operator = '=';
// break;
// }
// $paymentReferences = Payment::query()->where('company_id', $this->bank_transaction->company_id)
// ->whereIn('status_id', [1,4])
// ->where('is_deleted', 0)
// ->whereNull('transaction_id')
// ->where('transaction_reference', $operator, $ref_search)
// ->get();
// if($paymentReferences->count() > 0) {
// $matches++;
// }
// }
// if ($rule['search_key'] == '$client.id_number') {
// $ref_search = $this->bank_transaction->description;
// switch ($rule['operator']) {
// case 'is':
// $operator = '=';
// break;
// case 'contains':
// $ref_search = "%".$ref_search."%";
// $operator = 'LIKE';
// break;
// default:
// $operator = '=';
// break;
// }
// $clientIdNumbers = Client::query()->where('company_id', $this->bank_transaction->company_id)
// ->where('id_number', $operator, $ref_search)
// ->get();
// if($clientIdNumbers->count() > 0) {
// $matches++;
// }
// }
// if ($rule['search_key'] == '$client.email') {
// $clientEmails = Client::query()
// ->where('company_id', $this->bank_transaction->company_id)
// ->whereHas('contacts', function ($q){
// $q->where('email', $this->bank_transaction->description);
// })
// ->get();
// if($clientEmails->count() > 0) {
// $matches++;
// }
// if (($bank_transaction_rule['matches_on_all'] && ($matches == $rule_count)) || (!$bank_transaction_rule['matches_on_all'] && $matches > 0)) {
// //determine which combination has succeeded, ie link a payment / or / invoice
// $invoice_ids = null;
// $payment_id = null;
// if($invoiceNumber){
// $invoice_ids = $invoiceNumber->hashed_id;
// }
// if($invoicePONumbers && strlen($invoice_ids ?? '') == 0){
// if($clientEmails){ // @phpstan-ignore-line
// $invoice_ids = $this->matchInvoiceAndClient($invoicePONumbers, $clientEmails);
// }
// if($clientIdNumbers && strlen($invoice_ids ?? '') == 0)
// {
// $invoice_ids = $this->matchInvoiceAndClient($invoicePONumbers, $clientIdNumbers);
// }
// if(strlen($invoice_ids ?? '') == 0)
// {
// $invoice_ids = $invoicePONumbers->first()->hashed_id;
// }
// }
// if($invoiceAmounts && strlen($invoice_ids ?? '') == 0) {
// if($clientEmails) {// @phpstan-ignore-line
// $invoice_ids = $this->matchInvoiceAndClient($invoiceAmounts, $clientEmails);
// }
// if($clientIdNumbers && strlen($invoice_ids ?? '') == 0) {
// $invoice_ids = $this->matchInvoiceAndClient($invoiceAmounts, $clientIdNumbers);
// }
// if(strlen($invoice_ids ?? '') == 0) {
// $invoice_ids = $invoiceAmounts->first()->hashed_id;
// }
// }
// if($paymentAmounts && strlen($invoice_ids ?? '') == 0 && is_null($payment_id)) {
// if($clientEmails) {// @phpstan-ignore-line
// $payment_id = $this->matchPaymentAndClient($paymentAmounts, $clientEmails);
// }
// if($clientIdNumbers && is_null($payment_id)) {
// $payment_id = $this->matchPaymentAndClient($paymentAmounts, $clientEmails);
// }
// if(is_null($payment_id)) {
// $payment_id = $paymentAmounts->first()->id;
// }
// }
// if(strlen($invoice_ids ?? '') > 1 || is_int($payment_id))
// {
// $this->bank_transaction->payment_id = $payment_id;
// $this->bank_transaction->invoice_ids = $invoice_ids;
// $this->bank_transaction->status_id = BankTransaction::STATUS_MATCHED;
// $this->bank_transaction->bank_transaction_rule_id = $bank_transaction_rule->id;
// $this->bank_transaction->save();
// }
// }
// }
// }
// }
// }
// private function matchPaymentAndClient($payments, $clients): ?int
// {
// /** @var \Illuminate\Support\Collection<Payment> $payments */
// foreach($payments as $payment) {
// foreach($clients as $client) {
// if($payment->client_id == $client->id) {
// return $payment->id;
// }
// }
// }
// return null;
// }
// private function matchInvoiceAndClient($invoices, $clients): ?Invoice
// {
// /** @var \Illuminate\Support\Collection<Invoice> $invoices */
// foreach($invoices as $invoice) {
// foreach($clients as $client) {
// if($invoice->client_id == $client->id) {
// return $invoice->hashed_id;
// }
// }
// }
// return null;
// }
private function matchDebit() private function matchDebit()
{ {
@ -726,13 +388,336 @@ class ProcessBankRules extends AbstractService
$bt_value = strtolower(str_replace(" ", "", $bt_value)); $bt_value = strtolower(str_replace(" ", "", $bt_value));
$rule_value = strtolower(str_replace(" ", "", $rule_value)); $rule_value = strtolower(str_replace(" ", "", $rule_value));
$rule_length = iconv_strlen($rule_value); $rule_length = iconv_strlen($rule_value);
// nlog($bt_value);
// nlog($rule_value);
// nlog($rule_length);
return match ($operator) { return match ($operator) {
'is' => $bt_value == $rule_value, 'is' => $bt_value == $rule_value,
'contains' => stripos($bt_value, $rule_value) !== false, 'contains' => stripos($bt_value, $rule_value) !== false && strlen($rule_value) > 1,
'starts_with' => substr($bt_value, 0, $rule_length) == $rule_value, 'starts_with' => substr($bt_value, 0, $rule_length) == $rule_value && strlen($rule_value) > 1,
'is_empty' => empty($bt_value), 'is_empty' => empty($bt_value),
default => false, default => false,
}; };
} }
} }
// $payment.amount => "Payment Amount", float
// $payment.transaction_reference => "Payment Transaction Reference", string
// $invoice.amount => "Invoice Amount", float
// $invoice.number => "Invoice Number", string
// $client.id_number => "Client ID Number", string
// $client.email => "Client Email", string
// $invoice.po_number => "Invoice Purchase Order Number", string
// private function matchCredit()
// {
// $this->invoices = Invoice::query()->where('company_id', $this->bank_transaction->company_id)
// ->whereIn('status_id', [1,2,3])
// ->where('is_deleted', 0)
// ->get();
// $invoice = $this->invoices->first(function ($value, $key) {
// return str_contains($this->bank_transaction->description, $value->number) || str_contains(str_replace("\n", "", $this->bank_transaction->description), $value->number);
// });
// if ($invoice) {
// $this->bank_transaction->invoice_ids = $invoice->hashed_id;
// $this->bank_transaction->status_id = BankTransaction::STATUS_MATCHED;
// $this->bank_transaction->save();
// return;
// }
// $this->credit_rules = $this->bank_transaction->company->credit_rules();
// //stub for credit rules
// foreach ($this->credit_rules as $bank_transaction_rule) {
// $matches = 0;
// if (!is_array($bank_transaction_rule['rules'])) {
// continue;
// }
// foreach ($bank_transaction_rule['rules'] as $rule) {
// $rule_count = count($bank_transaction_rule['rules']);
// $invoiceNumbers = false;
// $invoiceNumber = false;
// $invoiceAmounts = false;
// $paymentAmounts = false;
// $paymentReferences = false;
// $clientIdNumbers = false;
// $clientEmails = false;
// $invoicePONumbers = false;
// if ($rule['search_key'] == '$invoice.number') {
// $invoiceNumbers = Invoice::query()->where('company_id', $this->bank_transaction->company_id)
// ->whereIn('status_id', [1,2,3])
// ->where('is_deleted', 0)
// ->get();
// $invoiceNumber = $invoiceNumbers->first(function ($value, $key) {
// return str_contains($this->bank_transaction->description, $value->number) || str_contains(str_replace("\n", "", $this->bank_transaction->description), $value->number);
// });
// if($invoiceNumber)
// $matches++;
// }
// if ($rule['search_key'] == '$invoice.po_number') {
// $invoicePONumbers = Invoice::query()->where('company_id', $this->bank_transaction->company_id)
// ->whereIn('status_id', [1,2,3])
// ->where('is_deleted', 0)
// ->where('po_number', $this->bank_transaction->description)
// ->get();
// if($invoicePONumbers->count() > 0) {
// $matches++;
// }
// }
// if ($rule['search_key'] == '$invoice.amount') {
// $$invoiceAmounts = Invoice::query()->where('company_id', $this->bank_transaction->company_id)
// ->whereIn('status_id', [1,2,3])
// ->where('is_deleted', 0)
// ->where('amount', $rule['operator'], $this->bank_transaction->amount)
// ->get();
// $invoiceAmounts = $this->invoices;
// if($invoiceAmounts->count() > 0) {
// $matches++;
// }
// }
// if ($rule['search_key'] == '$payment.amount') {
// $paymentAmounts = Payment::query()->where('company_id', $this->bank_transaction->company_id)
// ->whereIn('status_id', [1,4])
// ->where('is_deleted', 0)
// ->whereNull('transaction_id')
// ->where('amount', $rule['operator'], $this->bank_transaction->amount)
// ->get();
// if($paymentAmounts->count() > 0) {
// $matches++;
// }
// }
// if ($rule['search_key'] == '$payment.transaction_reference') {
// $ref_search = $this->bank_transaction->description;
// switch ($rule['operator']) {
// case 'is':
// $operator = '=';
// break;
// case 'contains':
// $ref_search = "%".$ref_search."%";
// $operator = 'LIKE';
// break;
// default:
// $operator = '=';
// break;
// }
// $paymentReferences = Payment::query()->where('company_id', $this->bank_transaction->company_id)
// ->whereIn('status_id', [1,4])
// ->where('is_deleted', 0)
// ->whereNull('transaction_id')
// ->where('transaction_reference', $operator, $ref_search)
// ->get();
// if($paymentReferences->count() > 0) {
// $matches++;
// }
// }
// if ($rule['search_key'] == '$client.id_number') {
// $ref_search = $this->bank_transaction->description;
// switch ($rule['operator']) {
// case 'is':
// $operator = '=';
// break;
// case 'contains':
// $ref_search = "%".$ref_search."%";
// $operator = 'LIKE';
// break;
// default:
// $operator = '=';
// break;
// }
// $clientIdNumbers = Client::query()->where('company_id', $this->bank_transaction->company_id)
// ->where('id_number', $operator, $ref_search)
// ->get();
// if($clientIdNumbers->count() > 0) {
// $matches++;
// }
// }
// if ($rule['search_key'] == '$client.email') {
// $clientEmails = Client::query()
// ->where('company_id', $this->bank_transaction->company_id)
// ->whereHas('contacts', function ($q){
// $q->where('email', $this->bank_transaction->description);
// })
// ->get();
// if($clientEmails->count() > 0) {
// $matches++;
// }
// if (($bank_transaction_rule['matches_on_all'] && ($matches == $rule_count)) || (!$bank_transaction_rule['matches_on_all'] && $matches > 0)) {
// //determine which combination has succeeded, ie link a payment / or / invoice
// $invoice_ids = null;
// $payment_id = null;
// if($invoiceNumber){
// $invoice_ids = $invoiceNumber->hashed_id;
// }
// if($invoicePONumbers && strlen($invoice_ids ?? '') == 0){
// if($clientEmails){ // @phpstan-ignore-line
// $invoice_ids = $this->matchInvoiceAndClient($invoicePONumbers, $clientEmails);
// }
// if($clientIdNumbers && strlen($invoice_ids ?? '') == 0)
// {
// $invoice_ids = $this->matchInvoiceAndClient($invoicePONumbers, $clientIdNumbers);
// }
// if(strlen($invoice_ids ?? '') == 0)
// {
// $invoice_ids = $invoicePONumbers->first()->hashed_id;
// }
// }
// if($invoiceAmounts && strlen($invoice_ids ?? '') == 0) {
// if($clientEmails) {// @phpstan-ignore-line
// $invoice_ids = $this->matchInvoiceAndClient($invoiceAmounts, $clientEmails);
// }
// if($clientIdNumbers && strlen($invoice_ids ?? '') == 0) {
// $invoice_ids = $this->matchInvoiceAndClient($invoiceAmounts, $clientIdNumbers);
// }
// if(strlen($invoice_ids ?? '') == 0) {
// $invoice_ids = $invoiceAmounts->first()->hashed_id;
// }
// }
// if($paymentAmounts && strlen($invoice_ids ?? '') == 0 && is_null($payment_id)) {
// if($clientEmails) {// @phpstan-ignore-line
// $payment_id = $this->matchPaymentAndClient($paymentAmounts, $clientEmails);
// }
// if($clientIdNumbers && is_null($payment_id)) {
// $payment_id = $this->matchPaymentAndClient($paymentAmounts, $clientEmails);
// }
// if(is_null($payment_id)) {
// $payment_id = $paymentAmounts->first()->id;
// }
// }
// if(strlen($invoice_ids ?? '') > 1 || is_int($payment_id))
// {
// $this->bank_transaction->payment_id = $payment_id;
// $this->bank_transaction->invoice_ids = $invoice_ids;
// $this->bank_transaction->status_id = BankTransaction::STATUS_MATCHED;
// $this->bank_transaction->bank_transaction_rule_id = $bank_transaction_rule->id;
// $this->bank_transaction->save();
// }
// }
// }
// }
// }
// }
// private function matchPaymentAndClient($payments, $clients): ?int
// {
// /** @var \Illuminate\Support\Collection<Payment> $payments */
// foreach($payments as $payment) {
// foreach($clients as $client) {
// if($payment->client_id == $client->id) {
// return $payment->id;
// }
// }
// }
// return null;
// }
// private function matchInvoiceAndClient($invoices, $clients): ?Invoice
// {
// /** @var \Illuminate\Support\Collection<Invoice> $invoices */
// foreach($invoices as $invoice) {
// foreach($clients as $client) {
// if($invoice->client_id == $client->id) {
// return $invoice->hashed_id;
// }
// }
// }
// return null;
// }

View File

@ -69,7 +69,7 @@ class RFFService
if (Str::startsWith($field['name'], 'client_')) { if (Str::startsWith($field['name'], 'client_')) {
if ( if (
empty($_contact->client->{$_field}) empty($_contact->client->{$_field})
|| is_null($_contact->client->{$_field}) || is_null($_contact->client->{$_field}) //@phpstan-ignore-line
) { ) {
// $this->show_form = true; // $this->show_form = true;
$this->unfilled_fields++; $this->unfilled_fields++;
@ -79,7 +79,7 @@ class RFFService
} }
if (Str::startsWith($field['name'], 'contact_')) { if (Str::startsWith($field['name'], 'contact_')) {
if (empty($_contact->{$_field}) || is_null($_contact->{$_field}) || str_contains($_contact->{$_field}, '@example.com')) { if (empty($_contact->{$_field}) || is_null($_contact->{$_field}) || str_contains($_contact->{$_field}, '@example.com')) { //@phpstan-ignore-line
$this->unfilled_fields++; $this->unfilled_fields++;
} else { } else {
$this->fields[$index]['filled'] = true; $this->fields[$index]['filled'] = true;

View File

@ -109,11 +109,10 @@ class LivewireInstantPayment
$client = $invoices->first()->client; $client = $invoices->first()->client;
/* pop non payable invoice from the $payable_invoices array */ /* pop non payable invoice from the $payable_invoices array */
$payable_invoices = $payable_invoices->filter(function ($payable_invoice) use ($invoices) { $payable_invoices = $payable_invoices->filter(function ($payable_invoice) use ($invoices) { // @phpstan-ignore-line
return $invoices->where('hashed_id', $payable_invoice['invoice_id'])->first(); return $invoices->where('hashed_id', $payable_invoice['invoice_id'])->first();
}); });
//$payable_invoices = $payable_invoices->map(function ($payable_invoice) use ($invoices, $settings) {
$payable_invoice_collection = collect(); $payable_invoice_collection = collect();
foreach ($payable_invoices as $payable_invoice) { foreach ($payable_invoices as $payable_invoice) {

View File

@ -11,8 +11,13 @@
namespace App\Services\EDocument\Gateway\Storecove; namespace App\Services\EDocument\Gateway\Storecove;
use App\DataMapper\Analytics\LegalEntityCreated;
use App\Models\Company; use App\Models\Company;
use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Http;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\ServerException;
use Illuminate\Http\Client\RequestException;
use Turbo124\Beacon\Facades\LightLogs;
enum HttpVerb: string enum HttpVerb: string
{ {
@ -25,8 +30,10 @@ enum HttpVerb: string
class Storecove class Storecove
{ {
/** @var string $base_url */
private string $base_url = 'https://api.storecove.com/api/v2/'; private string $base_url = 'https://api.storecove.com/api/v2/';
/** @var array $peppol_discovery */
private array $peppol_discovery = [ private array $peppol_discovery = [
"documentTypes" => ["invoice"], "documentTypes" => ["invoice"],
"network" => "peppol", "network" => "peppol",
@ -35,6 +42,7 @@ class Storecove
"identifier" => "DE:VAT" "identifier" => "DE:VAT"
]; ];
/** @var array $dbn_discovery */
private array $dbn_discovery = [ private array $dbn_discovery = [
"documentTypes" => ["invoice"], "documentTypes" => ["invoice"],
"network" => "dbnalliance", "network" => "dbnalliance",
@ -43,18 +51,22 @@ class Storecove
"identifier" => "1200109963131" "identifier" => "1200109963131"
]; ];
public StorecoveRouter $router;
public function __construct() public function __construct()
{ {
$this->router = new StorecoveRouter();
} }
//config('ninja.storecove_api_key'); /**
* Discovery
//https://app.storecove.com/en/docs#_test_identifiers *
//check if identifier is able to send on the network. * @param string $identifier
* @param string $scheme
//response = { "code": "OK", "email": false} * @param string $network
public function discovery($identifier, $scheme, $network = 'peppol') * @return bool
*/
public function discovery(string $identifier, string $scheme, string $network = 'peppol'): bool
{ {
$network_data = []; $network_data = [];
@ -72,49 +84,22 @@ class Storecove
} }
//response = "guid" : "xx",
/** /**
* If the receiver cannot be found, then an * Unused as yet
* email is sent to that user if a appropriate
* email is included in the document payload
* *
* { * @param mixed $document
"routing": { * @return string|bool
"emails": [
"test@example.com"
],
"eIdentifiers": []
}
}
*
*
*
// documentType : invoice/invoice_response/order
// rawDocumentData : {
// document: base64_encode($ubl)
// parse: true
// parseStrategy: ubl
// }
*/ */
public function sendJsonDocument($document) public function sendJsonDocument($document)
{ {
$payload = [ $payload = [
"legalEntityId" => 290868, // "legalEntityId" => 290868,
"idempotencyGuid" => \Illuminate\Support\Str::uuid(), "idempotencyGuid" => \Illuminate\Support\Str::uuid(),
"routing" => [ "routing" => [
"eIdentifiers" => [], "eIdentifiers" => [],
"emails" => ["david@invoiceninja.com"] "emails" => ["david@invoiceninja.com"]
], ],
// "document" => [
// 'documentType' => 'invoice',
// "rawDocumentData" => [
// "document" => base64_encode($document),
// "parse" => true,
// "parseStrategy" => "ubl",
// ],
// ],
"document" => [ "document" => [
"documentType" => "invoice", "documentType" => "invoice",
"invoice" => $document, "invoice" => $document,
@ -123,13 +108,8 @@ class Storecove
$uri = "document_submissions"; $uri = "document_submissions";
nlog($payload);
$r = $this->httpClient($uri, (HttpVerb::POST)->value, $payload, $this->getHeaders()); $r = $this->httpClient($uri, (HttpVerb::POST)->value, $payload, $this->getHeaders());
nlog($r->body());
nlog($r->json());
if($r->successful()) { if($r->successful()) {
return $r->json()['guid']; return $r->json()['guid'];
} }
@ -138,6 +118,15 @@ class Storecove
} }
/**
* Send Document via StoreCove
*
* @param string $document
* @param int $routing_id
* @param array $override_payload
*
* @return string|\Illuminate\Http\Client\Response
*/
public function sendDocument(string $document, int $routing_id, array $override_payload = []) public function sendDocument(string $document, int $routing_id, array $override_payload = [])
{ {
@ -155,7 +144,6 @@ class Storecove
$payload = array_merge($payload, $override_payload); $payload = array_merge($payload, $override_payload);
$payload['document']['documentType'] = 'invoice'; $payload['document']['documentType'] = 'invoice';
$payload['document']["rawDocumentData"] = [ $payload['document']["rawDocumentData"] = [
"document" => base64_encode($document), "document" => base64_encode($document),
@ -165,103 +153,72 @@ class Storecove
$uri = "document_submissions"; $uri = "document_submissions";
nlog($payload);
$r = $this->httpClient($uri, (HttpVerb::POST)->value, $payload, $this->getHeaders()); $r = $this->httpClient($uri, (HttpVerb::POST)->value, $payload, $this->getHeaders());
nlog($r->body()); nlog($r->body());
nlog($r->json()); // nlog($r->json());
if($r->successful()) { if($r->successful()) {
return $r->json()['guid']; return $r->json()['guid'];
} }
return false; return $r;
} }
//document submission sending evidence /**
* Get Sending Evidence
*
* @param string $guid
* @return mixed
*/
public function getSendingEvidence(string $guid) public function getSendingEvidence(string $guid)
{ {
$uri = "document_submissions/{$guid}"; $uri = "document_submissions/{$guid}";
$r = $this->httpClient($uri, (HttpVerb::GET)->value, [], $this->getHeaders()); $r = $this->httpClient($uri, (HttpVerb::GET)->value, [], $this->getHeaders());
if($r->successful())
return $r->json();
return $r;
} }
// {
// "party_name": "<string>",
// "line1": "<string>",
// "city": "<string>",
// "zip": "<string>",
// "country": "EH",
// "line2": "<string>",
// "county": "<string>",
// "tenant_id": "<string>",
// "public": true,
// "advertisements": [
// "invoice"
// ],
// "third_party_username": "<string>",
// "third_party_password": "<string>",
// "rea": {
// "province": "AR",
// "identifier": "<string>",
// "capital": "<number>",
// "partners": "SM",
// "liquidation_status": "LN"
// },
// "acts_as_sender": true,
// "acts_as_receiver": true,
// "tax_registered": true
// }
// acts_as_receiver - optional - Default : true
// acts_as_sender - optional - Default : true
// advertisements - optional < enum (invoice, invoice_response, order, ordering, order_response, selfbilling) > array
// city - required - Length : 2 - 64
// country - required - ISO 3166-1 alpha-2
// county - optional - Maximal length : 64
// line1 - required - The first address line - Length : 2 - 192
// line2 - optional - The second address line, if applicable Maximal length : 192
// party_name - required - The name of the company. Length : 2 - 64
// public - optional - Whether or not this LegalEntity is public. Public means it will be entered into the PEPPOL directory at https://directory.peppol.eu/ Default : true
// rea - optional - The REA details for the LegalEntity. Only applies to IT (Italian) LegalEntities. - https://www.storecove.com/docs/#_openapi_rea (schema)
// capital - optional - The captial for the company. - number
// identifier - optional - The identifier. Length : 2 - 20
// liquidation_status - optional - The liquidation status of the company. enum (LN, LS)
// partners - optional - The number of partners. enum (SU, SM)
// province - optional - The provincia of the ufficio that issued the identifier.enum (AG, AL, AN, AO, AQ, AR, AP, AT, AV, BA, BT, BL, BN, BG, BI, BO, BZ, BS, BR, CA, CL, CB, CI, CE, CT, CZ, CH, CO, CS, CR, KR, CN, EN, FM, FE, FI, FG, FC, FR, GE, GO, GR, IM, IS, SP, LT, LE, LC, LI, LO, LU, MC, MN, MS, MT, VS, ME, MI, MO, MB, NA, NO, NU, OG, OT, OR, PD, PA, PR, PV, PG, PU, PE, PC, PI, PT, PN, PZ, PO, RG, RA, RC, RE, RI, RN, RO, SA, SS, SV, SI, SR, SO, TA, TE, TR, TO, TP, TN, TV, TS, UD, VA, VE, VB, VC, VR, VV, VI, VT)
// tax_registered - optional - Whether or not this LegalEntity is tax registered. This influences the validation of the data presented when sending documents. Default : true
// tenant_id - optional - The id of the tenant, to be used in case of single-tenant solutions that share webhook URLs. This property will included in webhook events. Maximal length : 64
// third_party_password - optional - The password to use to authenticate to a system through which to send the document, or to obtain tax authority approval to send it. This field is currently relevant only for India and mandatory when creating an IN LegalEntity. Length : 2 - 64
// third_party_username - optional - The username to use to authenticate to a system through which to send the document, or to obtain tax authority approval to send it. This field is currently relevant only for India and mandatory when creating an IN LegalEntity. Length : 2 - 64
// zip - required - The zipcode. Length : 2 - 32
/** /**
* CreateLegalEntity * CreateLegalEntity
* *
* Creates a base entity.
*
* Following creation, you will also need to create a Peppol Identifier
*
* @url https://www.storecove.com/docs/#_openapi_legalentitycreate * @url https://www.storecove.com/docs/#_openapi_legalentitycreate
*
* @return mixed * @return mixed
*/ */
public function createLegalEntity(array $data, Company $company) public function createLegalEntity(array $data, ?Company $company = null)
{ {
$uri = 'legal_entities'; $uri = 'legal_entities';
if($company){
$data = array_merge([
'city' => $company->settings->city,
'country' => $company->country()->iso_3166_2,
'county' => $company->settings->state,
'line1' => $company->settings->address1,
'line2' => $company->settings->address2,
'party_name' => $company->settings->name,
'tax_registered' => (bool)strlen($company->settings->vat_number ?? '') > 2,
'tenant_id' => $company->company_key,
'zip' => $company->settings->postal_code,
], $data);
}
$company_defaults = [ $company_defaults = [
'acts_as_receiver' => true, 'acts_as_receiver' => true,
'acts_as_sender' => true, 'acts_as_sender' => true,
'advertisements' => ['invoice'], 'advertisements' => ['invoice'],
'city' => $company->settings->city,
'country' => $company->country()->iso_3166_2,
'county' => $company->settings->state,
'line1' => $company->settings->address1,
'line2' => $company->settings->address2,
'party_name' => $company->settings->name,
'tax_registered' => true,
'tenant_id' => $company->company_key,
'zip' => $company->settings->postal_code,
]; ];
$payload = array_merge($company_defaults, $data); $payload = array_merge($company_defaults, $data);
@ -276,9 +233,17 @@ class Storecove
} }
/**
* GetLegalEntity
*
* @param int $id
* @return mixed
*/
public function getLegalEntity($id) public function getLegalEntity($id)
{ {
// $uri = "legal_entities";
$uri = "legal_entities/{$id}"; $uri = "legal_entities/{$id}";
$r = $this->httpClient($uri, (HttpVerb::GET)->value, []); $r = $this->httpClient($uri, (HttpVerb::GET)->value, []);
@ -291,7 +256,14 @@ class Storecove
} }
public function updateLegalEntity($id, array $data) /**
* UpdateLegalEntity
*
* @param int $id
* @param array $data
* @return mixed
*/
public function updateLegalEntity(int $id, array $data)
{ {
$uri = "legal_entities/{$id}"; $uri = "legal_entities/{$id}";
@ -306,6 +278,16 @@ class Storecove
} }
/**
* AddIdentifier
*
* Add a Peppol identifier to the legal entity
*
* @param int $legal_entity_id
* @param string $identifier
* @param string $scheme
* @return mixed
*/
public function addIdentifier(int $legal_entity_id, string $identifier, string $scheme) public function addIdentifier(int $legal_entity_id, string $identifier, string $scheme)
{ {
$uri = "legal_entities/{$legal_entity_id}/peppol_identifiers"; $uri = "legal_entities/{$legal_entity_id}/peppol_identifiers";
@ -319,13 +301,30 @@ class Storecove
$r = $this->httpClient($uri, (HttpVerb::POST)->value, $data); $r = $this->httpClient($uri, (HttpVerb::POST)->value, $data);
if($r->successful()) { if($r->successful()) {
return $r->json(); $data = $r->json();
return $data;
} }
return $r; return $r;
} }
/**
* deleteIdentifier
*
* @param int $legal_entity_id
* @return bool
*/
public function deleteIdentifier(int $legal_entity_id): bool
{
$uri = "/legal_entities/{$legal_entity_id}";
$r = $this->httpClient($uri, (HttpVerb::DELETE)->value, []);
return $r->successful();
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
private function getHeaders(array $headers = []) private function getHeaders(array $headers = [])
{ {
@ -337,14 +336,36 @@ class Storecove
} }
/**
* httpClient
*
* @param string $uri
* @param string $verb
* @param array $data
* @param array $headers
* @return \Illuminate\Http\Client\Response
*/
private function httpClient(string $uri, string $verb, array $data, ?array $headers = []) private function httpClient(string $uri, string $verb, array $data, ?array $headers = [])
{ {
$r = Http::withToken(config('ninja.storecove_api_key')) try {
->withHeaders($this->getHeaders($headers)) $r = Http::withToken(config('ninja.storecove_api_key'))
->{$verb}("{$this->base_url}{$uri}", $data); ->withHeaders($this->getHeaders($headers))
->{$verb}("{$this->base_url}{$uri}", $data)->throw();
}
catch (ClientException $e) {
// 4xx errors
nlog("Client error: " . $e->getMessage());
nlog("Response body: " . $e->getResponse()->getBody()->getContents());
} catch (ServerException $e) {
// 5xx errors
nlog("Server error: " . $e->getMessage());
nlog("Response body: " . $e->getResponse()->getBody()->getContents());
} catch (RequestException $e) {
nlog("Request error: {$e->getCode()}: " . $e->getMessage());
}
return $r; return $r; // @phpstan-ignore-line
} }
} }

View File

@ -0,0 +1,165 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Services\EDocument\Gateway\Storecove;
class StorecoveRouter
{
private array $routing_rules = [
"US" => [
["B","DUNS, GLN, LEI","US:EIN","DUNS, GLN, LEI"],
// ["B","DUNS, GLN, LEI","US:SSN","DUNS, GLN, LEI"],
],
"CA" => ["B","CA:CBN",false,"CA:CBN"],
"MX" => ["B","MX:RFC",false,"MX:RFC"],
"AU" => ["B+G","AU:ABN",false,"AU:ABN"],
"NZ" => ["B+G","GLN","NZ:GST","GLN"],
"CH" => ["B+G","CH:UIDB","CH:VAT","CH:UIDB"],
"IS" => ["B+G","IS:KTNR","IS:VAT","IS:KTNR"],
"LI" => ["B+G","","LI:VAT","LI:VAT"],
"NO" => ["B+G","NO:ORG","NO:VAT","NO:ORG"],
"AD" => ["B+G","","AD:VAT","AD:VAT"],
"AL" => ["B+G","","AL:VAT","AL:VAT"],
"AT" => [
["G","AT:GOV",false,"9915:b"],
["B","","AT:VAT","AT:VAT"],
],
"BA" => ["B+G","","BA:VAT","BA:VAT"],
"BE" => ["B+G","BE:EN","BE:VAT","BE:EN"],
"BG" => ["B+G","","BG:VAT","BG:VAT"],
"CY" => ["B+G","","CY:VAT","CY:VAT"],
"CZ" => ["B+G","","CZ:VAT","CZ:VAT"],
"DE" => [
["G","DE:LWID",false,"DE:LWID"],
["B","","DE:VAT","DE:VAT"],
],
"DK" => ["B+G","DK:DIGST","DK:ERST","DK:DIGST"],
"EE" => ["B+G","EE:CC","EE:VAT","EE:CC"],
"ES" => ["B","","ES:VAT","ES:VAT"],
"FI" => ["B+G","FI:OVT","FI:VAT","FI:OVT"],
"FR" => [
["G","FR:SIRET + customerAssignedAccountIdValue",false,"0009:11000201100044"],
["B","FR:SIRENE or FR:SIRET","FR:VAT","FR:SIRENE or FR:SIRET"],
],
"GR" => ["B+G","","GR:VAT","GR:VAT"],
"HR" => ["B+G","","HR:VAT","HR:VAT"],
"HU" => ["B+G","","HU:VAT","HU:VAT"],
"IE" => ["B+G","","IE:VAT","IE:VAT"],
"IT" => [
["G","","IT:IVA","IT:CUUO"], // (Peppol)
["B","","IT:IVA","IT:CUUO"], // (SDI)
// ["B","","IT:CF","IT:CUUO"], // (SDI)
["C","","IT:CF","Email"],// (SDI)
["G","","IT:IVA","IT:CUUO"],// (SDI)
],
"LT" => ["B+G","LT:LEC","LT:VAT","LT:LEC"],
"LU" => ["B+G","LU:MAT","LU:VAT","LU:VAT"],
"LV" => ["B+G","","LV:VAT","LV:VAT"],
"MC" => ["B+G","","MC:VAT","MC:VAT"],
"ME" => ["B+G","","ME:VAT","ME:VAT"],
"MK" => ["B+G","","MK:VAT","MK:VAT"],
"MT" => ["B+G","","MT:VAT","MT:VAT"],
"NL" => ["G","NL:OINO",false,"NL:OINO"],
"NL" => ["B","NL:KVK","NL:VAT","NL:KVK or NL:VAT"],
"PL" => ["G+B","","PL:VAT","PL:VAT"],
"PT" => ["G+B","","PT:VAT","PT:VAT"],
"RO" => ["G+B","","RO:VAT","RO:VAT"],
"RS" => ["G+B","","RS:VAT","RS:VAT"],
"SE" => ["G+B","SE:ORGNR","SE:VAT","SE:ORGNR"],
"SI" => ["G+B","","SI:VAT","SI:VAT"],
"SK" => ["G+B","","SK:VAT","SK:VAT"],
"SM" => ["G+B","","SM:VAT","SM:VAT"],
"TR" => ["G+B","","TR:VAT","TR:VAT"],
"VA" => ["G+B","","VA:VAT","VA:VAT"],
"IN" => ["B","","IN:GSTIN","Email"],
"JP" => ["B","JP:SST","JP:IIN","JP:SST"],
"MY" => ["B","MY:EIF","MY:TIN","MY:EIF"],
"SG" => [
["G","SG:UEN",false,"0195:SGUENT08GA0028A"],
["B","SG:UEN","SG:GST","SG:UEN"],
],
"GB" => ["B","","GB:VAT","GB:VAT"],
"SA" => ["B","","SA:TIN","Email"],
"Other" => ["B","DUNS, GLN, LEI",false,"DUNS, GLN, LEI"],
];
public function __construct()
{
}
/**
* Return the routing code based on country and entity classification
*
* @param string $country
* @param ?string $classification
* @return string
*/
public function resolveRouting(string $country, ?string $classification = 'business'): string
{
$rules = $this->routing_rules[$country];
if(is_array($rules) && !is_array($rules[0])) {
return $rules[3];
}
$code = 'B';
match($classification) {
"business" => $code = "B",
"government" => $code = "G",
"individual" => $code = "C",
default => $code = "B",
};
foreach($rules as $rule) {
if(stripos($rule[0], $code) !== false) {
return $rule[3];
}
}
return $rules[0][3];
}
/**
* resolveTaxScheme
*
* @param string $country
* @param ?string $classification
* @return string
*/
public function resolveTaxScheme(string $country, ?string $classification = "business"): string
{
$rules = isset($this->routing_rules[$country]) ? $this->routing_rules[$country] : [false, false, false, false];
$code = "B";
match($classification) {
"business" => $code = "B",
"government" => $code = "G",
"individual" => $code = "C",
default => $code = "B",
};
//single array
if(is_array($rules) && !is_array($rules[0])) {
return $rules[2];
}
foreach($rules as $rule) {
if(stripos($rule[0], $code) !== false) {
return $rule[2];
}
}
return $rules[0][2];
}
}

View File

@ -0,0 +1,163 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Services\EDocument\Jobs;
use App\Utils\Ninja;
use App\Models\Invoice;
use App\Libraries\MultiDB;
use App\Models\Activity;
use Illuminate\Bus\Queueable;
use Illuminate\Support\Facades\Http;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use App\Services\EDocument\Standards\Peppol;
use Illuminate\Queue\Middleware\WithoutOverlapping;
use App\Services\EDocument\Gateway\Storecove\Storecove;
class SendEDocument implements ShouldQueue
{
use Dispatchable;
use InteractsWithQueue;
use Queueable;
use SerializesModels;
public $tries = 2;
public $deleteWhenMissingModels = true;
public function __construct(private string $entity, private int $id, private string $db)
{
}
public function backoff()
{
return [rand(5, 29), rand(30, 59)];
}
public function handle()
{
MultiDB::setDB($this->db);
$model = $this->entity::find($this->id);
// $e_invoice_standard = $model->client ? $model->client->getSetting('e_invoice_type') : $model->company->getSetting('e_invoice_type');
// if($e_invoice_standard != 'PEPPOL')
// return;
if(Ninja::isSelfHost() && ($model instanceof Invoice) && $model->company->legal_entity_id)
{
$p = new Peppol($model);
$p->run();
$xml = $p->toXml();
$identifiers = $p->getStorecoveMeta();
$payload = [
'legal_entity_id' => $model->company->legal_entity_id,
'document' => base64_encode($xml),
'tenant_id' => $model->company->company_key,
'identifiers' => $identifiers,
];
$r = Http::withHeaders($this->getHeaders())
->post(config('ninja.hosted_ninja_url')."/api/einvoice/submission", $payload);
if($r->successful()) {
nlog("Model {$model->number} was successfully sent for third party processing via hosted Invoice Ninja");
$data = $r->json();
return $this->writeActivity($model, $data['guid']);
}
if($r->failed()) {
nlog("Model {$model->number} failed to be accepted by invoice ninja, error follows:");
nlog($r->getBody()->getContents());
}
//self hosted sender
}
if(Ninja::isHosted() && ($model instanceof Invoice) && $model->company->legal_entity_id)
{
//hosted sender
$p = new Peppol($model);
$p->run();
$xml = $p->toXml();
$identifiers = $p->getStorecoveMeta();
$sc = new \App\Services\EDocument\Gateway\Storecove\Storecove();
$r = $sc->sendDocument($xml, $model->company->legal_entity_id, $identifiers);
if(is_string($r))
return $this->writeActivity($model, $r);
if($r->failed()) {
nlog("Model {$model->number} failed to be accepted by invoice ninja, error follows:");
nlog($r->getBody()->getContents());
}
}
}
private function writeActivity($model, string $guid)
{
$activity = new Activity();
$activity->user_id = $model->user_id;
$activity->client_id = $model->client_id ?? $model->vendor_id;
$activity->company_id = $model->company_id;
$activity->activity_type_id = Activity::EMAIL_EINVOICE_SUCCESS;
$activity->invoice_id = $model->id;
$activity->notes = str_replace('"', '', $guid);
$activity->save();
$model->backup = str_replace('"', '', $guid);
$model->saveQuietly();
}
/**
* Self hosted request headers
*
* @return array
*/
private function getHeaders(): array
{
return [
'X-API-SELF-HOST-TOKEN' => config('ninja.license_key'),
"X-Requested-With" => "XMLHttpRequest",
"Content-Type" => "application/json",
];
}
public function failed($exception = null)
{
if ($exception) {
nlog("EXCEPTION:: SENDEDOCUMENT::");
nlog($exception->getMessage());
}
config(['queue.failed.driver' => null]);
}
public function middleware()
{
return [new WithoutOverlapping($this->entity.$this->id.$this->db)];
}
}

View File

@ -100,7 +100,7 @@ class OrderXDocument extends AbstractService
$this->orderxdocument->setDocumentShipToAddress($settings_entity->shipping_address1, $settings_entity->shipping_address2, "", $settings_entity->shipping_postal_code, $settings_entity->shipping_city, $settings_entity->shipping_country->iso_3166_2, $settings_entity->shipping_state); $this->orderxdocument->setDocumentShipToAddress($settings_entity->shipping_address1, $settings_entity->shipping_address2, "", $settings_entity->shipping_postal_code, $settings_entity->shipping_city, $settings_entity->shipping_country->iso_3166_2, $settings_entity->shipping_state);
} }
$this->orderxdocument->addDocumentPaymentMean(68, ctrans("texts.xinvoice_online_payment")); $this->orderxdocument->addDocumentPaymentMean('68', ctrans("texts.xinvoice_online_payment"));
if (str_contains($company->getSetting('vat_number'), "/")) { if (str_contains($company->getSetting('vat_number'), "/")) {
$this->orderxdocument->addDocumentSellerTaxRegistration("FC", $company->getSetting('vat_number')); $this->orderxdocument->addDocumentSellerTaxRegistration("FC", $company->getSetting('vat_number'));

View File

@ -29,6 +29,7 @@ use InvoiceNinja\EInvoice\Models\Peppol\AddressType\Address;
use InvoiceNinja\EInvoice\Models\Peppol\ContactType\Contact; use InvoiceNinja\EInvoice\Models\Peppol\ContactType\Contact;
use InvoiceNinja\EInvoice\Models\Peppol\CountryType\Country; use InvoiceNinja\EInvoice\Models\Peppol\CountryType\Country;
use InvoiceNinja\EInvoice\Models\Peppol\PartyIdentification; use InvoiceNinja\EInvoice\Models\Peppol\PartyIdentification;
use App\Services\EDocument\Gateway\Storecove\StorecoveRouter;
use InvoiceNinja\EInvoice\Models\Peppol\AmountType\TaxAmount; use InvoiceNinja\EInvoice\Models\Peppol\AmountType\TaxAmount;
use InvoiceNinja\EInvoice\Models\Peppol\Party as PeppolParty; use InvoiceNinja\EInvoice\Models\Peppol\Party as PeppolParty;
use InvoiceNinja\EInvoice\Models\Peppol\TaxTotalType\TaxTotal; use InvoiceNinja\EInvoice\Models\Peppol\TaxTotalType\TaxTotal;
@ -42,18 +43,17 @@ use InvoiceNinja\EInvoice\Models\Peppol\TaxTotal as PeppolTaxTotal;
use InvoiceNinja\EInvoice\Models\Peppol\InvoiceLineType\InvoiceLine; use InvoiceNinja\EInvoice\Models\Peppol\InvoiceLineType\InvoiceLine;
use InvoiceNinja\EInvoice\Models\Peppol\TaxCategoryType\TaxCategory; use InvoiceNinja\EInvoice\Models\Peppol\TaxCategoryType\TaxCategory;
use InvoiceNinja\EInvoice\Models\Peppol\TaxSubtotalType\TaxSubtotal; use InvoiceNinja\EInvoice\Models\Peppol\TaxSubtotalType\TaxSubtotal;
use InvoiceNinja\EInvoice\Models\Peppol\TaxScheme as PeppolTaxScheme;
use InvoiceNinja\EInvoice\Models\Peppol\AmountType\TaxExclusiveAmount; use InvoiceNinja\EInvoice\Models\Peppol\AmountType\TaxExclusiveAmount;
use InvoiceNinja\EInvoice\Models\Peppol\AmountType\TaxInclusiveAmount; use InvoiceNinja\EInvoice\Models\Peppol\AmountType\TaxInclusiveAmount;
use InvoiceNinja\EInvoice\Models\Peppol\LocationType\PhysicalLocation;
use InvoiceNinja\EInvoice\Models\Peppol\AmountType\LineExtensionAmount; use InvoiceNinja\EInvoice\Models\Peppol\AmountType\LineExtensionAmount;
use InvoiceNinja\EInvoice\Models\Peppol\OrderReferenceType\OrderReference; use InvoiceNinja\EInvoice\Models\Peppol\OrderReferenceType\OrderReference;
use InvoiceNinja\EInvoice\Models\Peppol\MonetaryTotalType\LegalMonetaryTotal; use InvoiceNinja\EInvoice\Models\Peppol\MonetaryTotalType\LegalMonetaryTotal;
use InvoiceNinja\EInvoice\Models\Peppol\TaxCategoryType\ClassifiedTaxCategory; use InvoiceNinja\EInvoice\Models\Peppol\TaxCategoryType\ClassifiedTaxCategory;
use InvoiceNinja\EInvoice\Models\Peppol\IdentifierType\CustomerAssignedAccountID;
use InvoiceNinja\EInvoice\Models\Peppol\CustomerPartyType\AccountingCustomerParty; use InvoiceNinja\EInvoice\Models\Peppol\CustomerPartyType\AccountingCustomerParty;
use InvoiceNinja\EInvoice\Models\Peppol\SupplierPartyType\AccountingSupplierParty; use InvoiceNinja\EInvoice\Models\Peppol\SupplierPartyType\AccountingSupplierParty;
use InvoiceNinja\EInvoice\Models\Peppol\FinancialAccountType\PayeeFinancialAccount; use InvoiceNinja\EInvoice\Models\Peppol\FinancialAccountType\PayeeFinancialAccount;
use InvoiceNinja\EInvoice\Models\Peppol\IdentifierType\CustomerAssignedAccountID;
use InvoiceNinja\EInvoice\Models\Peppol\LocationType\PhysicalLocation;
class Peppol extends AbstractService class Peppol extends AbstractService
{ {
@ -262,6 +262,41 @@ class Peppol extends AbstractService
$this->setSettings()->setInvoice(); $this->setSettings()->setInvoice();
} }
/**
* Entry point for building document
*
* @return self
*/
public function run(): self
{
$this->p_invoice->ID = $this->invoice->number;
$this->p_invoice->IssueDate = new \DateTime($this->invoice->date);
if($this->invoice->due_date) {
$this->p_invoice->DueDate = new \DateTime($this->invoice->due_date);
}
$this->p_invoice->InvoiceTypeCode = ($this->invoice->amount >= 0) ? 380 : 381; //
$this->p_invoice->AccountingSupplierParty = $this->getAccountingSupplierParty();
$this->p_invoice->AccountingCustomerParty = $this->getAccountingCustomerParty();
$this->p_invoice->InvoiceLine = $this->getInvoiceLines();
// $this->p_invoice->TaxTotal = $this->getTotalTaxes(); it only wants the aggregate here!!
$this->p_invoice->LegalMonetaryTotal = $this->getLegalMonetaryTotal();
$this->senderSpecificLevelMutators()
->receiverSpecificLevelMutators();
if(strlen($this->invoice->backup ?? '') == 0)
{
$this->invoice->e_invoice = $this->toObject();
$this->invoice->save();
}
return $this;
}
/** /**
* Rehydrates an existing e invoice - or - scaffolds a new one * Rehydrates an existing e invoice - or - scaffolds a new one
* *
@ -272,7 +307,7 @@ class Peppol extends AbstractService
if($this->invoice->e_invoice) { if($this->invoice->e_invoice) {
$this->p_invoice = $this->e->decode('Peppol', json_encode($this->invoice->e_invoice->Invoice), 'json'); $this->p_invoice = $this->e->decode('Peppol', json_encode($this->invoice->e_invoice), 'json');
return $this; return $this;
@ -300,6 +335,11 @@ class Peppol extends AbstractService
} }
/**
* getInvoice
*
* @return \InvoiceNinja\EInvoice\Models\Peppol\Invoice
*/
public function getInvoice(): \InvoiceNinja\EInvoice\Models\Peppol\Invoice public function getInvoice(): \InvoiceNinja\EInvoice\Models\Peppol\Invoice
{ {
//@todo - need to process this and remove null values //@todo - need to process this and remove null values
@ -307,6 +347,11 @@ class Peppol extends AbstractService
} }
/**
* toXml
*
* @return string
*/
public function toXml(): string public function toXml(): string
{ {
$e = new EInvoice(); $e = new EInvoice();
@ -322,6 +367,11 @@ class Peppol extends AbstractService
} }
/**
* toJson
*
* @return string
*/
public function toJson(): string public function toJson(): string
{ {
$e = new EInvoice(); $e = new EInvoice();
@ -331,35 +381,31 @@ class Peppol extends AbstractService
} }
/**
* toObject
*
* @return mixed
*/
public function toObject(): mixed
{
return json_decode($this->toJson());
}
/**
* toArray
*
* @return array
*/
public function toArray(): array public function toArray(): array
{ {
return json_decode($this->toJson(), true); return json_decode($this->toJson(), true);
} }
public function run() /**
{ * getLegalMonetaryTotal
$this->p_invoice->ID = $this->invoice->number; *
$this->p_invoice->IssueDate = new \DateTime($this->invoice->date); * @return LegalMonetaryTotal
*/
if($this->invoice->due_date) {
$this->p_invoice->DueDate = new \DateTime($this->invoice->due_date);
}
$this->p_invoice->InvoiceTypeCode = 380; //
$this->p_invoice->AccountingSupplierParty = $this->getAccountingSupplierParty();
$this->p_invoice->AccountingCustomerParty = $this->getAccountingCustomerParty();
$this->p_invoice->InvoiceLine = $this->getInvoiceLines();
// $this->p_invoice->TaxTotal = $this->getTotalTaxes(); it only wants the aggregate here!!
$this->p_invoice->LegalMonetaryTotal = $this->getLegalMonetaryTotal();
$this->senderSpecificLevelMutators()
->receiverSpecificLevelMutators();
return $this;
}
private function getLegalMonetaryTotal(): LegalMonetaryTotal private function getLegalMonetaryTotal(): LegalMonetaryTotal
{ {
$taxable = $this->getTaxable(); $taxable = $this->getTaxable();
@ -389,6 +435,11 @@ class Peppol extends AbstractService
return $lmt; return $lmt;
} }
/**
* getTotalTaxAmount
*
* @return float
*/
private function getTotalTaxAmount(): float private function getTotalTaxAmount(): float
{ {
if(!$this->invoice->total_taxes) { if(!$this->invoice->total_taxes) {
@ -400,6 +451,11 @@ class Peppol extends AbstractService
return $this->calcAmountLineTax($this->invoice->tax_rate1, $this->invoice->amount) ?? 0; return $this->calcAmountLineTax($this->invoice->tax_rate1, $this->invoice->amount) ?? 0;
} }
/**
* getTotalTaxes
*
* @return array
*/
private function getTotalTaxes(): array private function getTotalTaxes(): array
{ {
$taxes = []; $taxes = [];
@ -421,10 +477,14 @@ class Peppol extends AbstractService
$tax_subtotal->TaxableAmount = $taxable_amount; $tax_subtotal->TaxableAmount = $taxable_amount;
$tc = new TaxCategory(); $tc = new TaxCategory();
$tc->ID = $type_id == '2' ? 'HUR' : 'C62'; $id = new ID();
$id->value = $type_id == '2' ? 'HUR' : 'C62';
$tc->ID = $id;
$tc->Percent = $this->invoice->tax_rate1; $tc->Percent = $this->invoice->tax_rate1;
$ts = new PeppolTaxScheme(); $ts = new TaxScheme();
$ts->ID = strlen($this->invoice->tax_name1 ?? '') > 1 ? $this->invoice->tax_name1 : '0'; $id = new ID();
$id->value = strlen($this->invoice->tax_name1 ?? '') > 1 ? $this->invoice->tax_name1 : '0';
$ts->ID = $id;
$tc->TaxScheme = $ts; $tc->TaxScheme = $ts;
$tax_subtotal->TaxCategory = $tc; $tax_subtotal->TaxCategory = $tc;
@ -453,10 +513,14 @@ class Peppol extends AbstractService
$tc = new TaxCategory(); $tc = new TaxCategory();
$tc->ID = $type_id == '2' ? 'HUR' : 'C62'; $id = new ID();
$id->value = $type_id == '2' ? 'HUR' : 'C62';
$tc->ID = $id;
$tc->Percent = $this->invoice->tax_rate2; $tc->Percent = $this->invoice->tax_rate2;
$ts = new PeppolTaxScheme(); $ts = new TaxScheme();
$ts->ID = $this->invoice->tax_name2; $id = new ID();
$id->value = $this->invoice->tax_name2;
$ts->ID = $id;
$tc->TaxScheme = $ts; $tc->TaxScheme = $ts;
$tax_subtotal->TaxCategory = $tc; $tax_subtotal->TaxCategory = $tc;
@ -483,16 +547,21 @@ class Peppol extends AbstractService
$taxable_amount->amount = $this->invoice->uses_inclusive_taxes ? $this->invoice->amount - $this->invoice->total_taxes : $this->invoice->amount; $taxable_amount->amount = $this->invoice->uses_inclusive_taxes ? $this->invoice->amount - $this->invoice->total_taxes : $this->invoice->amount;
$tax_subtotal->TaxableAmount = $taxable_amount; $tax_subtotal->TaxableAmount = $taxable_amount;
$tc = new TaxCategory(); $tc = new TaxCategory();
$tc->ID = $type_id == '2' ? 'HUR' : 'C62';
$id = new ID();
$id->value = $type_id == '2' ? 'HUR' : 'C62';
$tc->ID = $id;
$tc->Percent = $this->invoice->tax_rate3; $tc->Percent = $this->invoice->tax_rate3;
$ts = new PeppolTaxScheme(); $ts = new TaxScheme();
$ts->ID = $this->invoice->tax_name3;
$id = new ID();
$id->value = $this->invoice->tax_name3;
$ts->ID = $id;
$tc->TaxScheme = $ts; $tc->TaxScheme = $ts;
$tax_subtotal->TaxCategory = $tc; $tax_subtotal->TaxCategory = $tc;
$tax_total = new TaxTotal(); $tax_total = new TaxTotal();
$tax_total->TaxAmount = $tax_amount; $tax_total->TaxAmount = $tax_amount;
$tax_total->TaxSubtotal[] = $tax_subtotal; $tax_total->TaxSubtotal[] = $tax_subtotal;
@ -501,7 +570,6 @@ class Peppol extends AbstractService
} }
return $taxes; return $taxes;
} }
@ -516,7 +584,10 @@ class Peppol extends AbstractService
$_item->Description = $item->notes; $_item->Description = $item->notes;
$line = new InvoiceLine(); $line = new InvoiceLine();
$line->ID = $key + 1;
$id = new ID();
$id->value = (string) ($key+1);
$line->ID = $id;
$line->InvoicedQuantity = $item->quantity; $line->InvoicedQuantity = $item->quantity;
$lea = new LineExtensionAmount(); $lea = new LineExtensionAmount();
@ -538,7 +609,7 @@ class Peppol extends AbstractService
$price = new Price(); $price = new Price();
$pa = new PriceAmount(); $pa = new PriceAmount();
$pa->currencyID = $this->invoice->client->currency()->code; $pa->currencyID = $this->invoice->client->currency()->code;
$pa->amount = $this->costWithDiscount($item) - ($this->invoice->uses_inclusive_taxes ? ($this->calcInclusiveLineTax($item->tax_rate1, $item->line_total) / $item->quantity) : 0); $pa->amount = (string) ($this->costWithDiscount($item) - ($this->invoice->uses_inclusive_taxes ? ($this->calcInclusiveLineTax($item->tax_rate1, $item->line_total) / $item->quantity) : 0));
$price->PriceAmount = $pa; $price->PriceAmount = $pa;
$line->Price = $price; $line->Price = $price;
@ -549,7 +620,13 @@ class Peppol extends AbstractService
return $lines; return $lines;
} }
private function costWithDiscount($item) /**
* costWithDiscount
*
* @param mixed $item
* @return float
*/
private function costWithDiscount($item): float
{ {
$cost = $item->cost; $cost = $item->cost;
@ -564,6 +641,11 @@ class Peppol extends AbstractService
return $cost; return $cost;
} }
/**
* zeroTaxAmount
*
* @return array
*/
private function zeroTaxAmount(): array private function zeroTaxAmount(): array
{ {
$blank_tax = []; $blank_tax = [];
@ -579,10 +661,15 @@ class Peppol extends AbstractService
$taxable_amount->amount = '0'; $taxable_amount->amount = '0';
$tax_subtotal->TaxableAmount = $taxable_amount; $tax_subtotal->TaxableAmount = $taxable_amount;
$tc = new TaxCategory(); $tc = new TaxCategory();
$tc->ID = 'Z'; $id = new ID();
$tc->Percent = 0; $id->value = 'Z';
$ts = new PeppolTaxScheme(); $tc->ID = $id;
$ts->ID = '0'; $tc->Percent = '0';
$ts = new TaxScheme();
$id = new ID();
$id->value = '0';
$ts->ID = $id;
$tc->TaxScheme = $ts; $tc->TaxScheme = $ts;
$tax_subtotal->TaxCategory = $tc; $tax_subtotal->TaxCategory = $tc;
@ -595,6 +682,12 @@ class Peppol extends AbstractService
return $blank_tax; return $blank_tax;
} }
/**
* getItemTaxes
*
* @param object $item
* @return array
*/
private function getItemTaxes(object $item): array private function getItemTaxes(object $item): array
{ {
$item_taxes = []; $item_taxes = [];
@ -612,10 +705,18 @@ class Peppol extends AbstractService
$taxable_amount->amount = $this->invoice->uses_inclusive_taxes ? $item->line_total - $tax_amount->amount : $item->line_total; $taxable_amount->amount = $this->invoice->uses_inclusive_taxes ? $item->line_total - $tax_amount->amount : $item->line_total;
$tax_subtotal->TaxableAmount = $taxable_amount; $tax_subtotal->TaxableAmount = $taxable_amount;
$tc = new TaxCategory(); $tc = new TaxCategory();
$tc->ID = $item->type_id == '2' ? 'HUR' : 'C62';
$id = new ID();
$id->value = $item->type_id == '2' ? 'HUR' : 'C62';
$tc->ID = $id;
$tc->Percent = $item->tax_rate1; $tc->Percent = $item->tax_rate1;
$ts = new PeppolTaxScheme(); $ts = new TaxScheme();
$ts->ID = $item->tax_name1;
$id = new ID();
$id->value = $item->tax_name1;
$ts->ID = $id;
$tc->TaxScheme = $ts; $tc->TaxScheme = $ts;
$tax_subtotal->TaxCategory = $tc; $tax_subtotal->TaxCategory = $tc;
@ -645,10 +746,18 @@ class Peppol extends AbstractService
$tc = new TaxCategory(); $tc = new TaxCategory();
$tc->ID = $item->type_id == '2' ? 'HUR' : 'C62';
$id = new ID();
$id->value = $item->type_id == '2' ? 'HUR' : 'C62';
$tc->ID = $id;
$tc->Percent = $item->tax_rate2; $tc->Percent = $item->tax_rate2;
$ts = new PeppolTaxScheme(); $ts = new TaxScheme();
$ts->ID = $item->tax_name2;
$id = new ID();
$id->value = $item->tax_name2;
$ts->ID = $id;
$tc->TaxScheme = $ts; $tc->TaxScheme = $ts;
$tax_subtotal->TaxCategory = $tc; $tax_subtotal->TaxCategory = $tc;
@ -658,7 +767,6 @@ class Peppol extends AbstractService
$tax_total->TaxSubtotal[] = $tax_subtotal; $tax_total->TaxSubtotal[] = $tax_subtotal;
$item_taxes[] = $tax_total; $item_taxes[] = $tax_total;
} }
@ -679,10 +787,18 @@ class Peppol extends AbstractService
$tc = new TaxCategory(); $tc = new TaxCategory();
$tc->ID = $item->type_id == '2' ? 'HUR' : 'C62';
$id = new ID();
$id->value = $item->type_id == '2' ? 'HUR' : 'C62';
$tc->ID = $id;
$tc->Percent = $item->tax_rate3; $tc->Percent = $item->tax_rate3;
$ts = new PeppolTaxScheme(); $ts = new TaxScheme();
$ts->ID = $item->tax_name3;
$id = new ID();
$id->value = $item->tax_name3;
$ts->ID = $id;
$tc->TaxScheme = $ts; $tc->TaxScheme = $ts;
$tax_subtotal->TaxCategory = $tc; $tax_subtotal->TaxCategory = $tc;
@ -697,6 +813,11 @@ class Peppol extends AbstractService
return $item_taxes; return $item_taxes;
} }
/**
* getAccountingSupplierParty
*
* @return AccountingSupplierParty
*/
private function getAccountingSupplierParty(): AccountingSupplierParty private function getAccountingSupplierParty(): AccountingSupplierParty
{ {
@ -734,33 +855,45 @@ class Peppol extends AbstractService
return $asp; return $asp;
} }
private function resolveTaxScheme(): mixed /**
* resolveTaxScheme
*
* @return string
*/
private function resolveTaxScheme(): string
{ {
$rules = isset($this->routing_rules[$this->invoice->client->country->iso_3166_2]) ? $this->routing_rules[$this->invoice->client->country->iso_3166_2] : [false, false, false, false,]; return (new StorecoveRouter())->resolveTaxScheme($this->invoice->client->country->iso_3166_2, $this->invoice->client->classification);
$code = false; // $rules = isset($this->routing_rules[$this->invoice->client->country->iso_3166_2]) ? $this->routing_rules[$this->invoice->client->country->iso_3166_2] : [false, false, false, false,];
match($this->invoice->client->classification) { // $code = false;
"business" => $code = "B",
"government" => $code = "G",
"individual" => $code = "C",
default => $code = false,
};
//single array // match($this->invoice->client->classification) {
if(is_array($rules) && !is_array($rules[0])) { // "business" => $code = "B",
return $rules[2]; // "government" => $code = "G",
} // "individual" => $code = "C",
// default => $code = false,
// };
foreach($rules as $rule) { // //single array
if(stripos($rule[0], $code) !== false) { // if(is_array($rules) && !is_array($rules[0])) {
return $rule[2]; // return $rules[2];
} // }
}
return false; // foreach($rules as $rule) {
// if(stripos($rule[0], $code) !== false) {
// return $rule[2];
// }
// }
// return false;
} }
/**
* getAccountingCustomerParty
*
* @return AccountingCustomerParty
*/
private function getAccountingCustomerParty(): AccountingCustomerParty private function getAccountingCustomerParty(): AccountingCustomerParty
{ {
@ -820,6 +953,11 @@ class Peppol extends AbstractService
return $acp; return $acp;
} }
/**
* getTaxable
*
* @return float
*/
private function getTaxable(): float private function getTaxable(): float
{ {
$total = 0; $total = 0;
@ -868,24 +1006,31 @@ class Peppol extends AbstractService
///////////////// Helper Methods ///////////////////////// ///////////////// Helper Methods /////////////////////////
/**
* getClientRoutingCode
*
* @return string
*/
private function getClientRoutingCode(): string private function getClientRoutingCode(): string
{ {
$receiver_identifiers = $this->routing_rules[$this->invoice->client->country->iso_3166_2]; // $receiver_identifiers = $this->routing_rules[$this->invoice->client->country->iso_3166_2];
$client_classification = $this->invoice->client->classification == 'government' ? 'G' : 'B'; // $client_classification = $this->invoice->client->classification == 'government' ? 'G' : 'B';
if(count($receiver_identifiers) > 1) { // if(count($receiver_identifiers) > 1) {
foreach($receiver_identifiers as $ident) { // foreach($receiver_identifiers as $ident) {
if(str_contains($ident[0], $client_classification)) { // if(str_contains($ident[0], $client_classification)) {
return $ident[3]; // return $ident[3];
} // }
} // }
} elseif(count($receiver_identifiers) == 1) { // } elseif(count($receiver_identifiers) == 1) {
return $receiver_identifiers[3]; // return $receiver_identifiers[3];
} // }
throw new \Exception("e-invoice generation halted:: Could not resolve the Tax Code for this client? {$this->invoice->client->hashed_id}"); return (new StorecoveRouter())->resolveRouting($this->invoice->client->country->iso_3166_2, $this->invoice->client->classification);
// throw new \Exception("e-invoice generation halted:: Could not resolve the Tax Code for this client? {$this->invoice->client->hashed_id}");
} }
@ -947,15 +1092,28 @@ class Peppol extends AbstractService
} }
/**
* getClientSetting
*
* @param string $property_path
* @return mixed
*/
private function getClientSetting(string $property_path): mixed private function getClientSetting(string $property_path): mixed
{ {
return PropertyResolver::resolve($this->_client_settings, $property_path); return PropertyResolver::resolve($this->_client_settings, $property_path);
} }
/**
* getCompanySetting
*
* @param string $property_path
* @return mixed
*/
private function getCompanySetting(string $property_path): mixed private function getCompanySetting(string $property_path): mixed
{ {
return PropertyResolver::resolve($this->_company_settings, $property_path); return PropertyResolver::resolve($this->_company_settings, $property_path);
} }
/** /**
* senderSpecificLevelMutators * senderSpecificLevelMutators
* *
@ -1111,7 +1269,6 @@ class Peppol extends AbstractService
*/ */
private function buildRouting(array $identifiers): array private function buildRouting(array $identifiers): array
{ {
return return
[ [
"routing" => [ "routing" => [
@ -1122,6 +1279,12 @@ class Peppol extends AbstractService
]; ];
} }
/**
* setEmailRouting
*
* @param string $email
* @return self
*/
private function setEmailRouting(string $email): self private function setEmailRouting(string $email): self
{ {
nlog($email); nlog($email);
@ -1157,6 +1320,11 @@ class Peppol extends AbstractService
return $this; return $this;
} }
/**
* getStorecoveMeta
*
* @return array
*/
public function getStorecoveMeta(): array public function getStorecoveMeta(): array
{ {
return $this->storecove_meta; return $this->storecove_meta;
@ -1165,9 +1333,6 @@ class Peppol extends AbstractService
////////////////////////// Country level mutators ///////////////////////////////////// ////////////////////////// Country level mutators /////////////////////////////////////
/** /**
@ -1282,6 +1447,11 @@ class Peppol extends AbstractService
return $this; return $this;
} }
/**
* FI
*
* @return self
*/
private function FI(): self private function FI(): self
{ {
@ -1345,6 +1515,11 @@ class Peppol extends AbstractService
return $this; return $this;
} }
/**
* IT
*
* @return self
*/
private function IT(): self private function IT(): self
{ {
@ -1391,6 +1566,11 @@ class Peppol extends AbstractService
return $this; return $this;
} }
/**
* client_IT
*
* @return self
*/
private function client_IT(): self private function client_IT(): self
{ {
@ -1408,12 +1588,22 @@ class Peppol extends AbstractService
} }
/**
* MY
*
* @return self
*/
private function MY(): self private function MY(): self
{ {
//way too much to digest here, delayed. //way too much to digest here, delayed.
return $this; return $this;
} }
/**
* NL
*
* @return self
*/
private function NL(): self private function NL(): self
{ {
@ -1424,12 +1614,22 @@ class Peppol extends AbstractService
return $this; return $this;
} }
/**
* NZ
*
* @return self
*/
private function NZ(): self private function NZ(): self
{ {
// New Zealand uses a GLN to identify businesses. In addition, when sending invoices to a New Zealand customer, make sure you include the pseudo identifier NZ:GST as their tax identifier. // New Zealand uses a GLN to identify businesses. In addition, when sending invoices to a New Zealand customer, make sure you include the pseudo identifier NZ:GST as their tax identifier.
return $this; return $this;
} }
/**
* PL
*
* @return self
*/
private function PL(): self private function PL(): self
{ {
@ -1456,6 +1656,11 @@ class Peppol extends AbstractService
return $this; return $this;
} }
/**
* RO
*
* @return self
*/
private function RO(): self private function RO(): self
{ {
// Because using this network is not yet mandatory, the default workflow is to not use this network. Therefore, you have to force its use, as follows: // Because using this network is not yet mandatory, the default workflow is to not use this network. Therefore, you have to force its use, as follows:
@ -1490,6 +1695,11 @@ class Peppol extends AbstractService
return $this; return $this;
} }
/**
* SG
*
* @return self
*/
private function SG(): self private function SG(): self
{ {
//delayed - stage 2 //delayed - stage 2

View File

@ -121,12 +121,13 @@ class ZugferdEDokument extends AbstractService
if (isset($client->shipping_address1) && $client->shipping_country) { if (isset($client->shipping_address1) && $client->shipping_country) {
$this->xdocument->setDocumentShipToAddress($client->shipping_address1, $client->shipping_address2, "", $client->shipping_postal_code, $client->shipping_city, $client->shipping_country->iso_3166_2, $client->shipping_state); $this->xdocument->setDocumentShipToAddress($client->shipping_address1, $client->shipping_address2, "", $client->shipping_postal_code, $client->shipping_city, $client->shipping_country->iso_3166_2, $client->shipping_state);
} }
$custom_value1=$company->settings->custom_value1;
//BR-DE-23 - If „Payment means type code“ (BT-81) contains a code for credit transfer (30, 58), „CREDIT TRANSFER“ (BG-17) shall be provided.
//Payment Means - Switcher //Payment Means - Switcher
if($company->settings->custom_value1 == '42') { if(isset($custom_value1) && !empty($custom_value1) && ($custom_value1 == '30'|| $custom_value1=='58')) {
$this->xdocument->addDocumentPaymentMean(typecode: 42, payeeIban: $company->settings->custom_value2, payeeAccountName: $company->settings->custom_value4, payeeBic: $company->settings->custom_value3); $this->xdocument->addDocumentPaymentMean(typecode: $company->settings->custom_value1, payeeIban: $company->settings->custom_value2, payeeAccountName: $company->settings->custom_value4, payeeBic: $company->settings->custom_value3);
} else { } else {
$this->xdocument->addDocumentPaymentMean(68, ctrans("texts.xinvoice_online_payment")); $this->xdocument->addDocumentPaymentMean('68', ctrans("texts.xinvoice_online_payment"));
} }
if (str_contains($company->getSetting('vat_number'), "/")) { if (str_contains($company->getSetting('vat_number'), "/")) {

View File

@ -646,7 +646,7 @@ class Email implements ShouldQueue
$user = $this->resolveSendingUser(); $user = $this->resolveSendingUser();
$sending_email = (isset($this->email_object->settings->custom_sending_email) && stripos($this->email_object->settings->custom_sending_email, "@")) ? $this->email_object->settings->custom_sending_email : $user->email; $sending_email = (isset($this->email_object->settings->custom_sending_email) && (stripos($this->email_object->settings->custom_sending_email, "@")) !== false) ? $this->email_object->settings->custom_sending_email : $user->email;
$sending_user = (isset($this->email_object->settings->email_from_name) && strlen($this->email_object->settings->email_from_name) > 2) ? $this->email_object->settings->email_from_name : $user->name(); $sending_user = (isset($this->email_object->settings->email_from_name) && strlen($this->email_object->settings->email_from_name) > 2) ? $this->email_object->settings->email_from_name : $user->name();
$this->mailable $this->mailable

View File

@ -92,6 +92,8 @@ class AddGatewayFee extends AbstractService
/**Refresh Invoice values*/ /**Refresh Invoice values*/
$this->invoice = $this->invoice->calc()->getInvoice(); $this->invoice = $this->invoice->calc()->getInvoice();
nlog($this->invoice->line_items);
$new_balance = $this->invoice->balance; $new_balance = $this->invoice->balance;
if (floatval($new_balance) - floatval($balance) != 0) { if (floatval($new_balance) - floatval($balance) != 0) {
@ -141,12 +143,6 @@ class AddGatewayFee extends AbstractService
if (floatval($new_balance) - floatval($balance) != 0) { if (floatval($new_balance) - floatval($balance) != 0) {
$adjustment = $new_balance - $balance; $adjustment = $new_balance - $balance;
// $this->invoice
// ->client
// ->service()
// ->updateBalance($adjustment * -1)
// ->save();
$this->invoice $this->invoice
->ledger() ->ledger()
->updateInvoiceBalance($adjustment * -1, 'Adjustment for adding gateway DISCOUNT'); ->updateInvoiceBalance($adjustment * -1, 'Adjustment for adding gateway DISCOUNT');

View File

@ -23,6 +23,8 @@ use App\Models\PaymentHash;
use App\Models\PaymentType; use App\Models\PaymentType;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use App\DataMapper\InvoiceItem; use App\DataMapper\InvoiceItem;
use App\Events\Invoice\InvoiceAutoBillFailed;
use App\Events\Invoice\InvoiceAutoBillSuccess;
use App\Factory\PaymentFactory; use App\Factory\PaymentFactory;
use App\Services\AbstractService; use App\Services\AbstractService;
use App\Models\ClientGatewayToken; use App\Models\ClientGatewayToken;
@ -146,9 +148,9 @@ class AutoBillInvoice extends AbstractService
]); ]);
nlog("Payment hash created => {$payment_hash->id}"); nlog("Payment hash created => {$payment_hash->id}");
$this->invoice->saveQuietly();
$payment = false; $payment = false;
try { try {
$payment = $gateway_token->gateway $payment = $gateway_token->gateway
->driver($this->client) ->driver($this->client)
@ -157,8 +159,11 @@ class AutoBillInvoice extends AbstractService
} catch (\Exception $e) { } catch (\Exception $e) {
nlog('payment NOT captured for '.$this->invoice->number.' with error '.$e->getMessage()); nlog('payment NOT captured for '.$this->invoice->number.' with error '.$e->getMessage());
event(new InvoiceAutoBillFailed($this->invoice, $this->invoice->company, Ninja::eventVars(), $e->getMessage()));
} }
$this->invoice = $this->invoice->fresh();
$this->invoice->auto_bill_tries += 1; $this->invoice->auto_bill_tries += 1;
if ($this->invoice->auto_bill_tries == 3) { if ($this->invoice->auto_bill_tries == 3) {
@ -170,6 +175,7 @@ class AutoBillInvoice extends AbstractService
if ($payment) { if ($payment) {
info('Auto Bill payment captured for '.$this->invoice->number); info('Auto Bill payment captured for '.$this->invoice->number);
event(new InvoiceAutoBillSuccess($this->invoice, $this->invoice->company, Ninja::eventVars()));
} }
} }

View File

@ -66,7 +66,7 @@ class QuickbooksSync implements ShouldQueue
{ {
MultiDB::setDb($this->db); MultiDB::setDb($this->db);
$this->company = Company::find($this->company_id); $this->company = Company::query()->find($this->company_id);
$this->qbs = new QuickbooksService($this->company); $this->qbs = new QuickbooksService($this->company);
$this->settings = $this->company->quickbooks->settings; $this->settings = $this->company->quickbooks->settings;
@ -102,9 +102,9 @@ class QuickbooksSync implements ShouldQueue
private function processEntitySync(string $entity, $records) private function processEntitySync(string $entity, $records)
{ {
match($entity){ match($entity){
// 'client' => $this->syncQbToNinjaClients($records), 'client' => $this->syncQbToNinjaClients($records),
'product' => $this->syncQbToNinjaProducts($records), 'product' => $this->syncQbToNinjaProducts($records),
// 'invoice' => $this->syncQbToNinjaInvoices($records), 'invoice' => $this->syncQbToNinjaInvoices($records),
// 'vendor' => $this->syncQbToNinjaClients($records), // 'vendor' => $this->syncQbToNinjaClients($records),
// 'quote' => $this->syncInvoices($records), // 'quote' => $this->syncInvoices($records),
// 'purchase_order' => $this->syncInvoices($records), // 'purchase_order' => $this->syncInvoices($records),

View File

@ -88,7 +88,7 @@ class QuickbooksService
*/ */
public function syncFromQb() public function syncFromQb()
{ {
QuickbooksSync::dispatch($this->company); QuickbooksSync::dispatch($this->company->id, $this->company->db);
} }
} }

View File

@ -97,8 +97,8 @@ class SdkWrapper
8726400 8726400
); );
$token->setAccessTokenExpiresAt($token_object->accessTokenExpiresAt); $token->setAccessTokenExpiresAt($token_object->accessTokenExpiresAt); //@phpstan-ignore-line
$token->setRefreshTokenExpiresAt($token_object->refreshTokenExpiresAt); $token->setRefreshTokenExpiresAt($token_object->refreshTokenExpiresAt); //@phpstan-ignore-line
$token->setAccessTokenValidationPeriodInSeconds(3600); $token->setAccessTokenValidationPeriodInSeconds(3600);
$token->setRefreshTokenValidationPeriodInSeconds(8726400); $token->setRefreshTokenValidationPeriodInSeconds(8726400);

View File

@ -39,6 +39,7 @@ class ClientBalanceReport extends BaseExport
'invoices', 'invoices',
'invoice_balance', 'invoice_balance',
'credit_balance', 'credit_balance',
'payment_balance',
]; ];
/** /**
@ -119,6 +120,7 @@ class ClientBalanceReport extends BaseExport
$query->count(), $query->count(),
$query->sum('balance'), $query->sum('balance'),
$client->credit_balance, $client->credit_balance,
$client->payment_balance,
]; ];
} }
} }

File diff suppressed because one or more lines are too long

View File

@ -221,6 +221,7 @@ class TemplateService
$this->entity = $this->company->invoices()->first() ?? $this->company->quotes()->first(); $this->entity = $this->company->invoices()->first() ?? $this->company->quotes()->first();
$this->data = $tm->engines; $this->data = $tm->engines;
$this->variables = $tm->variables[0]; $this->variables = $tm->variables[0];
$this->twig->addGlobal('currency_code', $this->company->currency()->code); $this->twig->addGlobal('currency_code', $this->company->currency()->code);
$this->twig->addGlobal('show_credits', true); $this->twig->addGlobal('show_credits', true);
@ -948,6 +949,7 @@ class TemplateService
'custom_value4' => $task->custom_value4 ?: '', 'custom_value4' => $task->custom_value4 ?: '',
'status' => $task->status ? $task->status->name : '', 'status' => $task->status ? $task->status->name : '',
'user' => $this->userInfo($task->user), 'user' => $this->userInfo($task->user),
'assigned_user' => $task->assigned_user ? $this->userInfo($task->assigned_user) : [],
'client' => $this->getClient($task), 'client' => $this->getClient($task),
]; ];
@ -979,6 +981,7 @@ class TemplateService
return [ return [
'name' => $user->present()->name(), 'name' => $user->present()->name(),
'email' => $user->email, 'email' => $user->email,
'signature' => $user->signature ?? '',
]; ];
} }
@ -1005,6 +1008,7 @@ class TemplateService
'tasks' => ($project->tasks && !$nested) ? $this->processTasks($project->tasks, true) : [], //@phpstan-ignore-line 'tasks' => ($project->tasks && !$nested) ? $this->processTasks($project->tasks, true) : [], //@phpstan-ignore-line
'client' => $this->getClient($project), 'client' => $this->getClient($project),
'user' => $this->userInfo($project->user), 'user' => $this->userInfo($project->user),
'assigned_user' => $project->assigned_user ? $this->userInfo($project->assigned_user) : [],
'invoices' => $this->processInvoices($project->invoices) 'invoices' => $this->processInvoices($project->invoices)
]; ];

View File

@ -399,11 +399,19 @@ class HtmlEngine
$data['$taxes'] = ['value' => Number::formatMoney($this->entity_calc->getItemTotalTaxes(), $this->client) ?: ' ', 'label' => ctrans('texts.taxes')]; $data['$taxes'] = ['value' => Number::formatMoney($this->entity_calc->getItemTotalTaxes(), $this->client) ?: ' ', 'label' => ctrans('texts.taxes')];
$data['$invoice.taxes'] = &$data['$taxes']; $data['$invoice.taxes'] = &$data['$taxes'];
$data['$user.name'] = ['value' => $this->entity->user->present()->name(), 'label' => ctrans('texts.name')]; $data['$user.name'] = ['value' => $this->entity->user->present()->name(), 'label' => ctrans('texts.name')];
$data['$user.signature'] = ['value' => $this->entity->user->signature ?? '', 'label' => ctrans('texts.signature')];
$data['$user.first_name'] = ['value' => $this->entity->user->first_name, 'label' => ctrans('texts.first_name')]; $data['$user.first_name'] = ['value' => $this->entity->user->first_name, 'label' => ctrans('texts.first_name')];
$data['$user.last_name'] = ['value' => $this->entity->user->last_name, 'label' => ctrans('texts.last_name')]; $data['$user.last_name'] = ['value' => $this->entity->user->last_name, 'label' => ctrans('texts.last_name')];
$data['$created_by_user'] = &$data['$user.name']; $data['$created_by_user'] = &$data['$user.name'];
$data['$assigned_to_user'] = ['value' => $this->entity->assigned_user ? $this->entity->assigned_user->present()->name() : '', 'label' => ctrans('texts.name')]; $data['$assigned_to_user'] = ['value' => $this->entity->assigned_user ? $this->entity->assigned_user->present()->name() : '', 'label' => ctrans('texts.name')];
$data['$assigned_user.signature'] = ['value' => $this->entity->assigned_user ? $this->entity->assigned_user->signature : '', 'label' => ctrans('texts.signature')];
$data['$assigned_user.first_name'] = ['value' => $this->entity->assigned_user ? $this->entity->assigned_user->first_name : '', 'label' => ctrans('texts.first_name')];
$data['$assigned_user.last_name'] = ['value' => $this->entity->assigned_user ? $this->entity->assigned_user->last_name : '', 'label' => ctrans('texts.last_name')];
$data['$user_iban'] = ['value' => $this->helpers->formatCustomFieldValue($this->company->custom_fields, 'company1', $this->settings->custom_value1, $this->client) ?: ' ', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'company1')]; $data['$user_iban'] = ['value' => $this->helpers->formatCustomFieldValue($this->company->custom_fields, 'company1', $this->settings->custom_value1, $this->client) ?: ' ', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'company1')];
@ -664,7 +672,7 @@ class HtmlEngine
} }
$data['$contact.signature_raw'] = ['value' => $this->invitation->signature_base64, 'label' => ctrans('texts.signature')]; $data['$contact.signature_raw'] = ['value' => $this->invitation->signature_base64, 'label' => ctrans('texts.signature')];
$data['$contact.signature_date'] = ['value' => $this->translateDate($this->invitation->signature_date ?? '1970-01-01', $this->client->date_format(), $this->client->locale()), 'label' => ctrans('texts.date')]; $data['$contact.signature_date'] = ['value' => $this->invitation->signature_date ? $this->translateDate($this->invitation->signature_date, $this->client->date_format(), $this->client->locale()) : ' ', 'label' => ctrans('texts.date')];
$data['$contact.signature_ip'] = ['value' => $this->invitation->signature_ip ?? '', 'label' => ctrans('texts.address')]; $data['$contact.signature_ip'] = ['value' => $this->invitation->signature_ip ?? '', 'label' => ctrans('texts.address')];
$data['$thanks'] = ['value' => '', 'label' => ctrans('texts.thanks')]; $data['$thanks'] = ['value' => '', 'label' => ctrans('texts.thanks')];
@ -731,6 +739,7 @@ class HtmlEngine
$data['$payment.number'] = ['value' => '', 'label' => ctrans('texts.payment_number')]; $data['$payment.number'] = ['value' => '', 'label' => ctrans('texts.payment_number')];
$data['$payment.transaction_reference'] = ['value' => '', 'label' => ctrans('texts.transaction_reference')]; $data['$payment.transaction_reference'] = ['value' => '', 'label' => ctrans('texts.transaction_reference')];
$data['$payment.refunded'] = ['value' => '', 'label' => ctrans('texts.refund')]; $data['$payment.refunded'] = ['value' => '', 'label' => ctrans('texts.refund')];
$data['$payment_error'] = ['value' => '', 'label' => ctrans('texts.error')];
if ($this->entity_string == 'invoice' && $this->entity->net_payments()->exists()) { if ($this->entity_string == 'invoice' && $this->entity->net_payments()->exists()) {
$payment_list = '<br><br>'; $payment_list = '<br><br>';
@ -1163,7 +1172,7 @@ class HtmlEngine
} }
return ' return '
<div> <div class=\"center\">
<!--[if (gte mso 9)|(IE)]> <!--[if (gte mso 9)|(IE)]>
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;"> <table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
<tr> <tr>

View File

@ -83,7 +83,7 @@
"nelexa/zip": "^4.0", "nelexa/zip": "^4.0",
"nordigen/nordigen-php": "^1.1", "nordigen/nordigen-php": "^1.1",
"nwidart/laravel-modules": "^11.0", "nwidart/laravel-modules": "^11.0",
"phpoffice/phpspreadsheet": "^1.29", "phpoffice/phpspreadsheet": "^2.2",
"pragmarx/google2fa": "^8.0", "pragmarx/google2fa": "^8.0",
"predis/predis": "^2", "predis/predis": "^2",
"psr/http-message": "^1.0", "psr/http-message": "^1.0",
@ -203,8 +203,8 @@
"url": "https://github.com/turbo124/snappdf" "url": "https://github.com/turbo124/snappdf"
}, },
{ {
"type":"vcs", "type": "vcs",
"url":"https://github.com/karneaud/QuickBooks-V3-PHP-SDK.git" "url": "https://github.com/karneaud/QuickBooks-V3-PHP-SDK.git"
} }
], ],
"minimum-stability": "dev", "minimum-stability": "dev",

1088
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -38,7 +38,7 @@ return [
| |
*/ */
'layout' => 'layouts.app', 'layout' => 'components.layouts.app',
/* /*
|--------------------------------------------------------------------------- |---------------------------------------------------------------------------
@ -74,6 +74,7 @@ return [
'jpg', 'jpeg', 'mpga', 'webp', 'wma', 'jpg', 'jpeg', 'mpga', 'webp', 'wma',
], ],
'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated... 'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated...
'cleanup' => true, // Should cleanup temporary uploads older than 24 hrs...
], ],
/* /*
@ -100,7 +101,7 @@ return [
| |
*/ */
'legacy_model_binding' => true, 'legacy_model_binding' => false,
/* /*
|--------------------------------------------------------------------------- |---------------------------------------------------------------------------

View File

@ -17,8 +17,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true), 'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => env('APP_VERSION', '5.10.26'), 'app_version' => env('APP_VERSION', '5.10.27'),
'app_tag' => env('APP_TAG', '5.10.26'), 'app_tag' => env('APP_TAG', '5.10.27'),
'minimum_client_version' => '5.0.16', 'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1', 'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', false), 'api_secret' => env('API_SECRET', false),
@ -46,6 +46,7 @@ return [
'preconfigured_install' => env('PRECONFIGURED_INSTALL', false), 'preconfigured_install' => env('PRECONFIGURED_INSTALL', false),
'update_secret' => env('UPDATE_SECRET', ''), 'update_secret' => env('UPDATE_SECRET', ''),
'license_key' => env('LICENSE_KEY', false), 'license_key' => env('LICENSE_KEY', false),
'hosted_ninja_url' => env('HOSTED_NINJA_URL', 'https://invoicing.co'),
// Settings used by invoiceninja.com // Settings used by invoiceninja.com
'disks' => [ 'disks' => [
'backup' => env('BACKUP_DISK', 's3'), 'backup' => env('BACKUP_DISK', 's3'),

View File

@ -1,5 +1,6 @@
<?php <?php
use App\Models\Gateway;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
@ -14,6 +15,23 @@ return new class extends Migration
Schema::table('products', function (Blueprint $table){ Schema::table('products', function (Blueprint $table){
$table->string('hash')->nullable(); $table->string('hash')->nullable();
}); });
Schema::table('companies', function (Blueprint $table){
$table->bigInteger('legal_entity_id')->nullable();
});
if($currency = \App\Models\Currency::find(39))
{
$currency->symbol = 'лв';
$currency->save();
}
if($gateway = Gateway::find(15))
{
$gateway->visible = 0;
$gateway->save();
}
} }
/** /**

View File

@ -61,7 +61,7 @@ class CurrenciesSeeder extends Seeder
['id' => 36, 'name' => 'Trinidad and Tobago Dollar', 'code' => 'TTD', 'symbol' => 'TT$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 36, 'name' => 'Trinidad and Tobago Dollar', 'code' => 'TTD', 'symbol' => 'TT$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
['id' => 37, 'name' => 'East Caribbean Dollar', 'code' => 'XCD', 'symbol' => 'EC$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 37, 'name' => 'East Caribbean Dollar', 'code' => 'XCD', 'symbol' => 'EC$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
['id' => 38, 'name' => 'Ghanaian Cedi', 'code' => 'GHS', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 38, 'name' => 'Ghanaian Cedi', 'code' => 'GHS', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
['id' => 39, 'name' => 'Bulgarian Lev', 'code' => 'BGN', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => '.'], ['id' => 39, 'name' => 'Bulgarian Lev', 'code' => 'BGN', 'symbol' => 'лв', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => '.'],
['id' => 40, 'name' => 'Aruban Florin', 'code' => 'AWG', 'symbol' => 'Afl. ', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => '.'], ['id' => 40, 'name' => 'Aruban Florin', 'code' => 'AWG', 'symbol' => 'Afl. ', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => '.'],
['id' => 41, 'name' => 'Turkish Lira', 'code' => 'TRY', 'symbol' => 'TL ', 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ','], ['id' => 41, 'name' => 'Turkish Lira', 'code' => 'TRY', 'symbol' => 'TL ', 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ','],
['id' => 42, 'name' => 'Romanian New Leu', 'code' => 'RON', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 42, 'name' => 'Romanian New Leu', 'code' => 'RON', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],

View File

@ -105,7 +105,7 @@ class PaymentLibrariesSeeder extends Seeder
Gateway::query()->update(['visible' => 0]); Gateway::query()->update(['visible' => 0]);
Gateway::whereIn('id', [1, 3, 7, 11, 15, 20, 39, 46, 55, 50, 57, 52, 58, 59, 60, 62, 63])->update(['visible' => 1]); Gateway::whereIn('id', [1, 3, 7, 11, 20, 39, 46, 55, 50, 57, 52, 58, 59, 60, 62, 63])->update(['visible' => 1]);
if (Ninja::isHosted()) { if (Ninja::isHosted()) {
Gateway::whereIn('id', [20, 49])->update(['visible' => 0]); Gateway::whereIn('id', [20, 49])->update(['visible' => 0]);

View File

@ -5323,6 +5323,13 @@ $lang = array(
'applies_to' => 'Applies To', 'applies_to' => 'Applies To',
'accept_purchase_order' => 'Accept Purchase Order', 'accept_purchase_order' => 'Accept Purchase Order',
'round_to_seconds' => 'Round To Seconds', 'round_to_seconds' => 'Round To Seconds',
'activity_142' => 'Quote :number reminder 1 sent',
'activity_143' => 'Auto Bill succeeded for invoice :invoice',
'activity_144' => 'Auto Bill failed for invoice :invoice. :notes',
'activity_145' => 'EInvoice :invoice for :client was e-delivered. :notes',
'payment_failed' => 'Payment Failed',
'ssl_host_override' => 'SSL Host Override',
'upload_logo_short' => 'Upload Logo',
); );
return $lang; return $lang;

View File

@ -5319,6 +5319,13 @@ E-mail: :email<b><br><b>',
'one_page_checkout' => 'Afrekenen op één pagina', 'one_page_checkout' => 'Afrekenen op één pagina',
'one_page_checkout_help' => 'Schakel de nieuwe betaalflow \'afrekenen op één pagina\' in', 'one_page_checkout_help' => 'Schakel de nieuwe betaalflow \'afrekenen op één pagina\' in',
'applies_to' => 'Is van toepassing op', 'applies_to' => 'Is van toepassing op',
'accept_purchase_order' => 'Accepteer inkooporder',
'round_to_seconds' => 'Afronden op seconden',
'activity_142' => 'Quote :number reminder 1 sent',
'activity_143' => 'Auto Bill succeeded for invoice :invoice',
'activity_144' => 'Auto Bill failed for invoice :invoice. :notes',
'activity_145' => 'EInvoice :invoice for :client was e-delivered. :notes',
); );
return $lang; return $lang;

1
package-lock.json generated
View File

@ -4,7 +4,6 @@
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "invoiceninja",
"dependencies": { "dependencies": {
"@invoiceninja/simple-card": "^0.0.2", "@invoiceninja/simple-card": "^0.0.2",
"axios": "^0.25", "axios": "^0.25",

View File

@ -37,4 +37,6 @@ parameters:
- '#Expression on left side of ?? is not nullable.#' - '#Expression on left side of ?? is not nullable.#'
- '#Left side of && is always true.#' - '#Left side of && is always true.#'
- '#Right side of && is always true.#' - '#Right side of && is always true.#'
- '#is never read, only written.#'
- '#is never written#'

View File

@ -5495,72 +5495,6 @@ quiver
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--------------------------------------------------------------------------------
connectivity_plus
device_info_plus
package_info_plus
package_info_plus_platform_interface
share_plus_platform_interface
Copyright 2017 The Chromium Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
connectivity_plus_platform_interface
Copyright 2020 The Chromium Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
contacts_service contacts_service
@ -6347,383 +6281,6 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
dbus
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
desktop_drop desktop_drop
@ -6929,6 +6486,40 @@ desktop_drop
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--------------------------------------------------------------------------------
device_info_plus
package_info_plus
package_info_plus_platform_interface
share_plus_platform_interface
Copyright 2017 The Chromium Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
device_info_plus_platform_interface device_info_plus_platform_interface
@ -33767,383 +33358,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
nm
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
node_preamble node_preamble

File diff suppressed because one or more lines are too long

109
public/build/assets/app-e0713224.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@
] ]
}, },
"resources/js/app.js": { "resources/js/app.js": {
"file": "assets/app-234e3402.js", "file": "assets/app-e0713224.js",
"imports": [ "imports": [
"_index-08e160a7.js", "_index-08e160a7.js",
"__commonjsHelpers-725317a4.js" "__commonjsHelpers-725317a4.js"

View File

@ -3,312 +3,312 @@ const MANIFEST = 'flutter-app-manifest';
const TEMP = 'flutter-temp-cache'; const TEMP = 'flutter-temp-cache';
const CACHE_NAME = 'flutter-app-cache'; const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {"icons/Icon-192.png": "bb1cf5f6982006952211c7c8404ffbed", const RESOURCES = {"main.dart.js": "fb97335da7eff058bbb79faca45886d0",
"/": "d897faab76ef8d2c8da94ebf0959cc5e",
"icons/Icon-512.png": "0f9aff01367f0a0c69773d25ca16ef35", "icons/Icon-512.png": "0f9aff01367f0a0c69773d25ca16ef35",
"assets/FontManifest.json": "087fb858dc3cbfbf6baf6a30004922f1", "icons/Icon-192.png": "bb1cf5f6982006952211c7c8404ffbed",
"assets/AssetManifest.bin.json": "611449d46e56c96b3baef404bfc56246", "manifest.json": "ef43d90e57aa7682d7e2cfba2f484a40",
"version.json": "ecbd6a1b18f9aa7ebef1684017494326",
"favicon.png": "dca91c54388f52eded692718d5a98b8b",
"assets/fonts/MaterialIcons-Regular.otf": "a57618538ab8b4c4081d4491870ac333",
"assets/NOTICES": "412b336cf9e33e70058d612857effae1",
"assets/shaders/ink_sparkle.frag": "ecc85a2e95f5e9f53123dcaf8cb9b6ce", "assets/shaders/ink_sparkle.frag": "ecc85a2e95f5e9f53123dcaf8cb9b6ce",
"assets/assets/google_fonts/Roboto-Regular.ttf": "8a36205bd9b83e03af0591a004bc97f4",
"assets/assets/images/icon.png": "090f69e23311a4b6d851b3880ae52541", "assets/assets/images/icon.png": "090f69e23311a4b6d851b3880ae52541",
"assets/assets/images/logo_light.png": "e5f46d5a78e226e7a9553d4ca6f69219", "assets/assets/images/logo_light.png": "e5f46d5a78e226e7a9553d4ca6f69219",
"assets/assets/images/google_logo.png": "0f118259ce403274f407f5e982e681c3",
"assets/assets/images/logo_dark.png": "a233ed1d4d0f7414bf97a9a10f11fb0a", "assets/assets/images/logo_dark.png": "a233ed1d4d0f7414bf97a9a10f11fb0a",
"assets/assets/images/payment_types/maestro.png": "e533b92bfb50339fdbfa79e3dfe81f08", "assets/assets/images/google_logo.png": "0f118259ce403274f407f5e982e681c3",
"assets/assets/images/payment_types/unionpay.png": "7002f52004e0ab8cc0b7450b0208ccb2",
"assets/assets/images/payment_types/mastercard.png": "6f6cdc29ee2e22e06b1ac029cb52ef71",
"assets/assets/images/payment_types/jcb.png": "07e0942d16c5592118b72e74f2f7198c", "assets/assets/images/payment_types/jcb.png": "07e0942d16c5592118b72e74f2f7198c",
"assets/assets/images/payment_types/carteblanche.png": "d936e11fa3884b8c9f1bd5c914be8629",
"assets/assets/images/payment_types/switch.png": "4fa11c45327f5fdc20205821b2cfd9cc",
"assets/assets/images/payment_types/laser.png": "b4e6e93dd35517ac429301119ff05868",
"assets/assets/images/payment_types/solo.png": "2030c3ccaccf5d5e87916a62f5b084d6",
"assets/assets/images/payment_types/ach.png": "7433f0aff779dc98a649b7a2daf777cf", "assets/assets/images/payment_types/ach.png": "7433f0aff779dc98a649b7a2daf777cf",
"assets/assets/images/payment_types/visa.png": "3ddc4a4d25c946e8ad7e6998f30fd4e3", "assets/assets/images/payment_types/mastercard.png": "6f6cdc29ee2e22e06b1ac029cb52ef71",
"assets/assets/images/payment_types/other.png": "d936e11fa3884b8c9f1bd5c914be8629",
"assets/assets/images/payment_types/amex.png": "c49a4247984b3732a4af50a3390aa978",
"assets/assets/images/payment_types/paypal.png": "8e06c094c1871376dfea1da8088c29d1", "assets/assets/images/payment_types/paypal.png": "8e06c094c1871376dfea1da8088c29d1",
"assets/assets/images/payment_types/visa.png": "3ddc4a4d25c946e8ad7e6998f30fd4e3",
"assets/assets/images/payment_types/carteblanche.png": "d936e11fa3884b8c9f1bd5c914be8629",
"assets/assets/images/payment_types/other.png": "d936e11fa3884b8c9f1bd5c914be8629",
"assets/assets/images/payment_types/solo.png": "2030c3ccaccf5d5e87916a62f5b084d6",
"assets/assets/images/payment_types/amex.png": "c49a4247984b3732a4af50a3390aa978",
"assets/assets/images/payment_types/maestro.png": "e533b92bfb50339fdbfa79e3dfe81f08",
"assets/assets/images/payment_types/laser.png": "b4e6e93dd35517ac429301119ff05868",
"assets/assets/images/payment_types/dinerscard.png": "06d85186ba858c18ab7c9caa42c92024", "assets/assets/images/payment_types/dinerscard.png": "06d85186ba858c18ab7c9caa42c92024",
"assets/assets/images/payment_types/switch.png": "4fa11c45327f5fdc20205821b2cfd9cc",
"assets/assets/images/payment_types/unionpay.png": "7002f52004e0ab8cc0b7450b0208ccb2",
"assets/assets/images/payment_types/discover.png": "6c0a386a00307f87db7bea366cca35f5", "assets/assets/images/payment_types/discover.png": "6c0a386a00307f87db7bea366cca35f5",
"assets/assets/google_fonts/Roboto-Regular.ttf": "8a36205bd9b83e03af0591a004bc97f4", "assets/AssetManifest.json": "759f9ef9973f7e26c2a51450b55bb9fa",
"assets/fonts/MaterialIcons-Regular.otf": "a57618538ab8b4c4081d4491870ac333", "assets/FontManifest.json": "087fb858dc3cbfbf6baf6a30004922f1",
"assets/AssetManifest.bin": "bf3be26e7055ad9a32f66b3a56138224",
"assets/packages/intl_phone_field/assets/flags/gs.png": "419dd57836797a3f1bf6258ea6589f9a",
"assets/packages/intl_phone_field/assets/flags/ve.png": "893391d65cbd10ca787a73578c77d3a7",
"assets/packages/intl_phone_field/assets/flags/do.png": "ed35983a9263bb5713be37d9a52caddc",
"assets/packages/intl_phone_field/assets/flags/vc.png": "da3ca14a978717467abbcdece05d3544",
"assets/packages/intl_phone_field/assets/flags/gb-wls.png": "d7d7c77c72cd425d993bdc50720f4d04",
"assets/packages/intl_phone_field/assets/flags/pa.png": "78e3e4fd56f0064837098fe3f22fb41b",
"assets/packages/intl_phone_field/assets/flags/tn.png": "6612e9fec4bef022cbd45cbb7c02b2b6",
"assets/packages/intl_phone_field/assets/flags/pt.png": "eba93d33545c78cc67915d9be8323661",
"assets/packages/intl_phone_field/assets/flags/kh.png": "d48d51e8769a26930da6edfc15de97fe",
"assets/packages/intl_phone_field/assets/flags/gn.png": "b2287c03c88a72d968aa796a076ba056",
"assets/packages/intl_phone_field/assets/flags/lr.png": "b92c75e18dd97349c75d6a43bd17ee94",
"assets/packages/intl_phone_field/assets/flags/ga.png": "b0e5b2fa1b7106c7652a955db24c11c4",
"assets/packages/intl_phone_field/assets/flags/nz.png": "65c811e96eb6c9da65538f899c110895",
"assets/packages/intl_phone_field/assets/flags/li.png": "ecdf7b3fe932378b110851674335d9ab",
"assets/packages/intl_phone_field/assets/flags/an.png": "4e4b90fbca1275d1839ca5b44fc51071",
"assets/packages/intl_phone_field/assets/flags/si.png": "24237e53b34752554915e71e346bb405",
"assets/packages/intl_phone_field/assets/flags/ps.png": "52a25a48658ca9274830ffa124a8c1db",
"assets/packages/intl_phone_field/assets/flags/sa.png": "7c95c1a877148e2aa21a213d720ff4fd",
"assets/packages/intl_phone_field/assets/flags/cg.png": "eca97338cc1cb5b5e91bec72af57b3d4",
"assets/packages/intl_phone_field/assets/flags/la.png": "e8cd9c3ee6e134adcbe3e986e1974e4a",
"assets/packages/intl_phone_field/assets/flags/nr.png": "1316f3a8a419d8be1975912c712535ea",
"assets/packages/intl_phone_field/assets/flags/cr.png": "bfd8b41e63fc3cc829c72c4b2e170532",
"assets/packages/intl_phone_field/assets/flags/gp.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/fr.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/gg.png": "eed435d25bd755aa7f9cd7004b9ed49d",
"assets/packages/intl_phone_field/assets/flags/at.png": "570c070177a5ea0fe03e20107ebf5283",
"assets/packages/intl_phone_field/assets/flags/wf.png": "6f1644b8f907d197c0ff7ed2f366ad64",
"assets/packages/intl_phone_field/assets/flags/je.png": "288f8dca26098e83ff0455b08cceca1b",
"assets/packages/intl_phone_field/assets/flags/il.png": "1e06ad7783f24332405d36561024cc4c",
"assets/packages/intl_phone_field/assets/flags/uz.png": "3adad3bac322220cac8abc1c7cbaacac",
"assets/packages/intl_phone_field/assets/flags/tw.png": "b1101fd5f871a9ffe7c9ad191a7d3304",
"assets/packages/intl_phone_field/assets/flags/ai.png": "ce5e91ed1725f0499b9231b69a7fd448",
"assets/packages/intl_phone_field/assets/flags/gi.png": "446aa44aaa063d240adab88243b460d3",
"assets/packages/intl_phone_field/assets/flags/it.png": "5c8e910e6a33ec63dfcda6e8960dd19c",
"assets/packages/intl_phone_field/assets/flags/ar.png": "3bd245f8c28f70c9ef9626dae27adc65",
"assets/packages/intl_phone_field/assets/flags/mv.png": "d9245f74e34d5c054413ace4b86b4f16",
"assets/packages/intl_phone_field/assets/flags/pl.png": "f20e9ef473a9ed24176f5ad74dd0d50a",
"assets/packages/intl_phone_field/assets/flags/gd.png": "7a4864ccfa2a0564041c2d1f8a13a8c9",
"assets/packages/intl_phone_field/assets/flags/pr.png": "b97b2f4432c430bc340d893f36527e31",
"assets/packages/intl_phone_field/assets/flags/bm.png": "b366ba84cbc8286c830f392bb9086be5",
"assets/packages/intl_phone_field/assets/flags/rs.png": "9dff535d2d08c504be63062f39eff0b7",
"assets/packages/intl_phone_field/assets/flags/gb-eng.png": "0d9f2a6775fd52b79e1d78eb1dda10cf",
"assets/packages/intl_phone_field/assets/flags/vn.png": "32ff65ccbf31a707a195be2a5141a89b",
"assets/packages/intl_phone_field/assets/flags/my.png": "f7f962e8a074387fd568c9d4024e0959",
"assets/packages/intl_phone_field/assets/flags/py.png": "154d4add03b4878caf00bd3249e14f40",
"assets/packages/intl_phone_field/assets/flags/za.png": "b28280c6c3eb4624c18b5455d4a1b1ff",
"assets/packages/intl_phone_field/assets/flags/es.png": "654965f9722f6706586476fb2f5d30dd",
"assets/packages/intl_phone_field/assets/flags/md.png": "8911d3d821b95b00abbba8771e997eb3",
"assets/packages/intl_phone_field/assets/flags/cm.png": "42d52fa71e8b4dbb182ff431749e8d0d",
"assets/packages/intl_phone_field/assets/flags/iq.png": "bc3e6f68c5188dbf99b473e2bea066f2",
"assets/packages/intl_phone_field/assets/flags/pw.png": "2e697cc6907a7b94c7f94f5d9b3bdccc",
"assets/packages/intl_phone_field/assets/flags/ls.png": "2bca756f9313957347404557acb532b0",
"assets/packages/intl_phone_field/assets/flags/ck.png": "39f343868a8dc8ca95d27b27a5caf480",
"assets/packages/intl_phone_field/assets/flags/na.png": "cdc00e9267a873609b0abea944939ff7",
"assets/packages/intl_phone_field/assets/flags/pe.png": "4d9249aab70a26fadabb14380b3b55d2",
"assets/packages/intl_phone_field/assets/flags/mk.png": "835f2263974de523fa779d29c90595bf",
"assets/packages/intl_phone_field/assets/flags/so.png": "1ce20d052f9d057250be96f42647513b",
"assets/packages/intl_phone_field/assets/flags/ni.png": "e398dc23e79d9ccd702546cc25f126bf",
"assets/packages/intl_phone_field/assets/flags/lb.png": "f80cde345f0d9bd0086531808ce5166a",
"assets/packages/intl_phone_field/assets/flags/pm.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/fk.png": "da8b0fe48829aae2c8feb4839895de63",
"assets/packages/intl_phone_field/assets/flags/ss.png": "b0120cb000b31bb1a5c801c3592139bc",
"assets/packages/intl_phone_field/assets/flags/tr.png": "27feab1a5ca390610d07e0c6bd4720d5",
"assets/packages/intl_phone_field/assets/flags/ag.png": "41c11d5668c93ba6e452f811defdbb24",
"assets/packages/intl_phone_field/assets/flags/bn.png": "ed650de06fff61ff27ec92a872197948",
"assets/packages/intl_phone_field/assets/flags/kw.png": "3ca448e219d0df506fb2efd5b91be092",
"assets/packages/intl_phone_field/assets/flags/ge.png": "6fbd41f07921fa415347ebf6dff5b0f7",
"assets/packages/intl_phone_field/assets/flags/eg.png": "311d780e8e3dd43f87e6070f6feb74c7",
"assets/packages/intl_phone_field/assets/flags/ch.png": "a251702f7760b0aac141428ed60b7b66",
"assets/packages/intl_phone_field/assets/flags/fo.png": "2c7d9233582e83a86927e634897a2a90",
"assets/packages/intl_phone_field/assets/flags/pn.png": "0b0641b356af4c3e3489192ff4b0be77",
"assets/packages/intl_phone_field/assets/flags/cz.png": "73ecd64c6144786c4d03729b1dd9b1f3",
"assets/packages/intl_phone_field/assets/flags/mw.png": "ffc1f18eeedc1dfbb1080aa985ce7d05",
"assets/packages/intl_phone_field/assets/flags/um.png": "8fe7c4fed0a065fdfb9bd3125c6ecaa1",
"assets/packages/intl_phone_field/assets/flags/ms.png": "9c955a926cf7d57fccb450a97192afa7",
"assets/packages/intl_phone_field/assets/flags/dm.png": "8886b222ed9ccd00f67e8bcf86dadcc2",
"assets/packages/intl_phone_field/assets/flags/ly.png": "8d65057351859065d64b4c118ff9e30e",
"assets/packages/intl_phone_field/assets/flags/by.png": "beabf61e94fb3a4f7c7a7890488b213d",
"assets/packages/intl_phone_field/assets/flags/ro.png": "85af99741fe20664d9a7112cfd8d9722",
"assets/packages/intl_phone_field/assets/flags/ci.png": "7f5ca3779d5ff6ce0c803a6efa0d2da7",
"assets/packages/intl_phone_field/assets/flags/xk.png": "079259fbcb1f3c78dafa944464295c16",
"assets/packages/intl_phone_field/assets/flags/zw.png": "078a3267ea8eabf88b2d43fe4aed5ce5",
"assets/packages/intl_phone_field/assets/flags/id.png": "80bb82d11d5bc144a21042e77972bca9",
"assets/packages/intl_phone_field/assets/flags/tz.png": "56ec99c7e0f68b88a2210620d873683a",
"assets/packages/intl_phone_field/assets/flags/tm.png": "0980fb40ec450f70896f2c588510f933",
"assets/packages/intl_phone_field/assets/flags/vi.png": "3f317c56f31971b3179abd4e03847036",
"assets/packages/intl_phone_field/assets/flags/mh.png": "18dda388ef5c1cf37cae5e7d5fef39bc",
"assets/packages/intl_phone_field/assets/flags/bo.png": "3ccf6fa7f9cbc27949b8418925e4e89c",
"assets/packages/intl_phone_field/assets/flags/fm.png": "d571b8bc4b80980a81a5edbde788b6d2",
"assets/packages/intl_phone_field/assets/flags/bf.png": "63f1c67fca7ce8b52b3418a90af6ad37",
"assets/packages/intl_phone_field/assets/flags/de.png": "5d9561246523cf6183928756fd605e25",
"assets/packages/intl_phone_field/assets/flags/kn.png": "f318e2fd87e5fd2cabefe9ff252bba46",
"assets/packages/intl_phone_field/assets/flags/gu.png": "2acb614b442e55864411b6e418df6eab",
"assets/packages/intl_phone_field/assets/flags/to.png": "1cdd716b5b5502f85d6161dac6ee6c5b",
"assets/packages/intl_phone_field/assets/flags/dj.png": "078bd37d41f746c3cb2d84c1e9611c55",
"assets/packages/intl_phone_field/assets/flags/gb-nir.png": "98773db151c150cabe845183241bfe6b",
"assets/packages/intl_phone_field/assets/flags/cd.png": "5b5f832ed6cd9f9240cb31229d8763dc",
"assets/packages/intl_phone_field/assets/flags/ml.png": "0c50dfd539e87bb4313da0d4556e2d13",
"assets/packages/intl_phone_field/assets/flags/st.png": "fef62c31713ff1063da2564df3f43eea",
"assets/packages/intl_phone_field/assets/flags/sx.png": "9c19254973d8acf81581ad95b408c7e6",
"assets/packages/intl_phone_field/assets/flags/tg.png": "7f91f02b26b74899ff882868bd611714",
"assets/packages/intl_phone_field/assets/flags/mo.png": "849848a26bbfc87024017418ad7a6233",
"assets/packages/intl_phone_field/assets/flags/ru.png": "6974dcb42ad7eb3add1009ea0c6003e3",
"assets/packages/intl_phone_field/assets/flags/pf.png": "1ae72c24380d087cbe2d0cd6c3b58821",
"assets/packages/intl_phone_field/assets/flags/jm.png": "074400103847c56c37425a73f9d23665",
"assets/packages/intl_phone_field/assets/flags/sn.png": "68eaa89bbc83b3f356e1ba2096b09b3c",
"assets/packages/intl_phone_field/assets/flags/sb.png": "296ecedbd8d1c2a6422c3ba8e5cd54bd",
"assets/packages/intl_phone_field/assets/flags/ph.png": "e4025d1395a8455f1ba038597a95228c",
"assets/packages/intl_phone_field/assets/flags/np.png": "6e099fb1e063930bdd00e8df5cef73d4",
"assets/packages/intl_phone_field/assets/flags/rw.png": "d1aae0647a5b1ab977ae43ab894ce2c3",
"assets/packages/intl_phone_field/assets/flags/ng.png": "aedbe364bd1543832e88e64b5817e877",
"assets/packages/intl_phone_field/assets/flags/be.png": "7e5e1831cdd91935b38415479a7110eb",
"assets/packages/intl_phone_field/assets/flags/se.png": "25dd5434891ac1ca2ad1af59cda70f80",
"assets/packages/intl_phone_field/assets/flags/nf.png": "1c2069b299ce3660a2a95ec574dfde25",
"assets/packages/intl_phone_field/assets/flags/mn.png": "16086e8d89c9067d29fd0f2ea7021a45",
"assets/packages/intl_phone_field/assets/flags/hu.png": "281582a753e643b46bdd894047db08bb",
"assets/packages/intl_phone_field/assets/flags/bj.png": "6fdc6449f73d23ad3f07060f92db4423",
"assets/packages/intl_phone_field/assets/flags/az.png": "6ffa766f6883d2d3d350cdc22a062ca3",
"assets/packages/intl_phone_field/assets/flags/tv.png": "c57025ed7ae482210f29b9da86b0d211",
"assets/packages/intl_phone_field/assets/flags/et.png": "57edff61c7fddf2761a19948acef1498",
"assets/packages/intl_phone_field/assets/flags/tt.png": "a8e1fc5c65dc8bc362a9453fadf9c4b3",
"assets/packages/intl_phone_field/assets/flags/tl.png": "c80876dc80cda5ab6bb8ef078bc6b05d",
"assets/packages/intl_phone_field/assets/flags/sd.png": "65ce270762dfc87475ea99bd18f79025",
"assets/packages/intl_phone_field/assets/flags/kg.png": "c4aa6d221d9a9d332155518d6b82dbc7",
"assets/packages/intl_phone_field/assets/flags/au.png": "72be14316f0af3903cdca7a726c0c589",
"assets/packages/intl_phone_field/assets/flags/hk.png": "4b5ec424348c98ec71a46ad3dce3931d",
"assets/packages/intl_phone_field/assets/flags/bw.png": "fac8b90d7404728c08686dc39bab4fb3",
"assets/packages/intl_phone_field/assets/flags/ie.png": "1d91912afc591dd120b47b56ea78cdbf",
"assets/packages/intl_phone_field/assets/flags/hm.png": "72be14316f0af3903cdca7a726c0c589",
"assets/packages/intl_phone_field/assets/flags/gt.png": "706a0c3b5e0b589c843e2539e813839e",
"assets/packages/intl_phone_field/assets/flags/zm.png": "81cec35b715f227328cad8f314acd797",
"assets/packages/intl_phone_field/assets/flags/mf.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/in.png": "1dec13ba525529cffd4c7f8a35d51121",
"assets/packages/intl_phone_field/assets/flags/sv.png": "217b691efbef7a0f48cdd53e91997f0e",
"assets/packages/intl_phone_field/assets/flags/vu.png": "3f201fdfb6d669a64c35c20a801016d1",
"assets/packages/intl_phone_field/assets/flags/bs.png": "2b9540c4fa514f71911a48de0bd77e71",
"assets/packages/intl_phone_field/assets/flags/mg.png": "0ef6271ad284ebc0069ff0aeb5a3ad1e",
"assets/packages/intl_phone_field/assets/flags/br.png": "5093e0cd8fd3c094664cd17ea8a36fd1",
"assets/packages/intl_phone_field/assets/flags/gh.png": "b35464dca793fa33e51bf890b5f3d92b",
"assets/packages/intl_phone_field/assets/flags/ht.png": "630f7f8567d87409a32955107ad11a86",
"assets/packages/intl_phone_field/assets/flags/af.png": "ba710b50a060b5351381b55366396c30",
"assets/packages/intl_phone_field/assets/flags/me.png": "590284bc85810635ace30a173e615ca4",
"assets/packages/intl_phone_field/assets/flags/mu.png": "c5228d1e94501d846b5bf203f038ae49",
"assets/packages/intl_phone_field/assets/flags/co.png": "e3b1be16dcdae6cb72e9c238fdddce3c",
"assets/packages/intl_phone_field/assets/flags/aq.png": "0c586e7b91aa192758fdd0f03adb84d8",
"assets/packages/intl_phone_field/assets/flags/aw.png": "a93ddf8e32d246dc47f6631f38e0ed92",
"assets/packages/intl_phone_field/assets/flags/vg.png": "fc095e11f5b58604d6f4d3c2b43d167f",
"assets/packages/intl_phone_field/assets/flags/gy.png": "159a260bf0217128ea7475ba5b272b6a",
"assets/packages/intl_phone_field/assets/flags/sj.png": "33bc70259c4908b7b9adeef9436f7a9f",
"assets/packages/intl_phone_field/assets/flags/pk.png": "7a6a621f7062589677b3296ca16c6718",
"assets/packages/intl_phone_field/assets/flags/io.png": "83d45bbbff087d47b2b39f1c20598f52",
"assets/packages/intl_phone_field/assets/flags/cl.png": "6735e0e2d88c119e9ed1533be5249ef1",
"assets/packages/intl_phone_field/assets/flags/kr.png": "a3b7da3b76b20a70e9cd63cc2315b51b",
"assets/packages/intl_phone_field/assets/flags/nu.png": "f4169998548e312584c67873e0d9352d",
"assets/packages/intl_phone_field/assets/flags/cy.png": "7b36f4af86257a3f15f5a5a16f4a2fcd",
"assets/packages/intl_phone_field/assets/flags/gf.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/hn.png": "9ecf68aed83c4a9b3f1e6275d96bfb04",
"assets/packages/intl_phone_field/assets/flags/tc.png": "d728d6763c17c520ad6bcf3c24282a29",
"assets/packages/intl_phone_field/assets/flags/sy.png": "24186a0f4ce804a16c91592db5a16a3a",
"assets/packages/intl_phone_field/assets/flags/sc.png": "e969fd5afb1eb5902675b6bcf49a8c2e",
"assets/packages/intl_phone_field/assets/flags/mt.png": "f3119401ae0c3a9d6e2dc23803928c06",
"assets/packages/intl_phone_field/assets/flags/fi.png": "3ccd69a842e55183415b7ea2c04b15c8",
"assets/packages/intl_phone_field/assets/flags/ye.png": "4cf73209d90e9f02ead1565c8fdf59e5",
"assets/packages/intl_phone_field/assets/flags/re.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/tj.png": "c73b793f2acd262e71b9236e64c77636",
"assets/packages/intl_phone_field/assets/flags/kz.png": "cb3b0095281c9d7e7fb5ce1716ef8ee5",
"assets/packages/intl_phone_field/assets/flags/mr.png": "f2a62602d43a1ee14625af165b96ce2f",
"assets/packages/intl_phone_field/assets/flags/tk.png": "60428ff1cdbae680e5a0b8cde4677dd5",
"assets/packages/intl_phone_field/assets/flags/ae.png": "792efc5eb6c31d780bd34bf4bad69f3f",
"assets/packages/intl_phone_field/assets/flags/lv.png": "53105fea0cc9cc554e0ceaabc53a2d5d",
"assets/packages/intl_phone_field/assets/flags/eu.png": "c58ece3931acb87faadc5b940d4f7755",
"assets/packages/intl_phone_field/assets/flags/cv.png": "9b1f31f9fc0795d728328dedd33eb1c0",
"assets/packages/intl_phone_field/assets/flags/gm.png": "7148d3715527544c2e7d8d6f4a445bb6",
"assets/packages/intl_phone_field/assets/flags/gb-sct.png": "75106a5e49e3e16da76cb33bdac102ab",
"assets/packages/intl_phone_field/assets/flags/ki.png": "14db0fc29398730064503907bd696176",
"assets/packages/intl_phone_field/assets/flags/ug.png": "9a0f358b1eb19863e21ae2063fab51c0",
"assets/packages/intl_phone_field/assets/flags/qa.png": "eb9b3388e554cf85aea1e739247548df",
"assets/packages/intl_phone_field/assets/flags/cf.png": "263583ffdf7a888ce4fba8487d1da0b2",
"assets/packages/intl_phone_field/assets/flags/jo.png": "c01cb41f74f9db0cf07ba20f0af83011",
"assets/packages/intl_phone_field/assets/flags/km.png": "5554c8746c16d4f482986fb78ffd9b36",
"assets/packages/intl_phone_field/assets/flags/ma.png": "057ea2e08587f1361b3547556adae0c2",
"assets/packages/intl_phone_field/assets/flags/no.png": "33bc70259c4908b7b9adeef9436f7a9f",
"assets/packages/intl_phone_field/assets/flags/yt.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/sk.png": "2a1ee716d4b41c017ff1dbf3fd3ffc64",
"assets/packages/intl_phone_field/assets/flags/tf.png": "b2c044b86509e7960b5ba66b094ea285",
"assets/packages/intl_phone_field/assets/flags/bd.png": "86a0e4bd8787dc8542137a407e0f987f",
"assets/packages/intl_phone_field/assets/flags/sz.png": "d1829842e45c2b2b29222c1b7e201591",
"assets/packages/intl_phone_field/assets/flags/ba.png": "d415bad33b35de3f095177e8e86cbc82",
"assets/packages/intl_phone_field/assets/flags/is.png": "907840430252c431518005b562707831",
"assets/packages/intl_phone_field/assets/flags/td.png": "009303b6188ca0e30bd50074b16f0b16",
"assets/packages/intl_phone_field/assets/flags/sr.png": "9f912879f2829a625436ccd15e643e39",
"assets/packages/intl_phone_field/assets/flags/sg.png": "bc772e50b8c79f08f3c2189f5d8ce491",
"assets/packages/intl_phone_field/assets/flags/bb.png": "a8473747387e4e7a8450c499529f1c93",
"assets/packages/intl_phone_field/assets/flags/bh.png": "a1acd86ef0e19ea5f0297bbe1de6cfd4",
"assets/packages/intl_phone_field/assets/flags/mq.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/us.png": "83b065848d14d33c0d10a13e01862f34",
"assets/packages/intl_phone_field/assets/flags/ky.png": "38e39eba673e82c48a1f25bd103a7e97",
"assets/packages/intl_phone_field/assets/flags/ua.png": "b4b10d893611470661b079cb30473871",
"assets/packages/intl_phone_field/assets/flags/sh.png": "98773db151c150cabe845183241bfe6b",
"assets/packages/intl_phone_field/assets/flags/ca.png": "76f2fac1d3b2cc52ba6695c2e2941632",
"assets/packages/intl_phone_field/assets/flags/mx.png": "84b12a569b209e213daccfcbdd1fc799",
"assets/packages/intl_phone_field/assets/flags/bq.png": "3649c177693bfee9c2fcc63c191a51f1",
"assets/packages/intl_phone_field/assets/flags/om.png": "cebd9ab4b9ab071b2142e21ae2129efc",
"assets/packages/intl_phone_field/assets/flags/am.png": "aaa39141fbc80205bebaa0200b55a13a",
"assets/packages/intl_phone_field/assets/flags/mz.png": "1ab1ac750fbbb453d33e9f25850ac2a0",
"assets/packages/intl_phone_field/assets/flags/gl.png": "b79e24ee1889b7446ba3d65564b86810",
"assets/packages/intl_phone_field/assets/flags/jp.png": "25ac778acd990bedcfdc02a9b4570045",
"assets/packages/intl_phone_field/assets/flags/bg.png": "1d24bc616e3389684ed2c9f18bcb0209",
"assets/packages/intl_phone_field/assets/flags/bv.png": "33bc70259c4908b7b9adeef9436f7a9f",
"assets/packages/intl_phone_field/assets/flags/mc.png": "90c2ad7f144d73d4650cbea9dd621275",
"assets/packages/intl_phone_field/assets/flags/lu.png": "6274fd1cae3c7a425d25e4ccb0941bb8",
"assets/packages/intl_phone_field/assets/flags/kp.png": "e1c8bb52f31fca22d3368d8f492d8f27",
"assets/packages/intl_phone_field/assets/flags/dk.png": "abcd01bdbcc02b4a29cbac237f29cd1d",
"assets/packages/intl_phone_field/assets/flags/va.png": "c010bf145f695d5c8fb551bafc081f77",
"assets/packages/intl_phone_field/assets/flags/er.png": "8ca78e10878a2e97c1371b38c5d258a7",
"assets/packages/intl_phone_field/assets/flags/nl.png": "3649c177693bfee9c2fcc63c191a51f1",
"assets/packages/intl_phone_field/assets/flags/ad.png": "384e9845debe9aca8f8586d9bedcb7e6",
"assets/packages/intl_phone_field/assets/flags/lc.png": "8c1a03a592aa0a99fcaf2b81508a87eb",
"assets/packages/intl_phone_field/assets/flags/ne.png": "a20724c177e86d6a27143aa9c9664a6f",
"assets/packages/intl_phone_field/assets/flags/cc.png": "31a475216e12fef447382c97b42876ce",
"assets/packages/intl_phone_field/assets/flags/fj.png": "1c6a86752578eb132390febf12789cd6",
"assets/packages/intl_phone_field/assets/flags/sm.png": "a8d6801cb7c5360e18f0a2ed146b396d",
"assets/packages/intl_phone_field/assets/flags/cn.png": "040539c2cdb60ebd9dc8957cdc6a8ad0",
"assets/packages/intl_phone_field/assets/flags/gq.png": "4286e56f388a37f64b21eb56550c06d9",
"assets/packages/intl_phone_field/assets/flags/mp.png": "87351c30a529071ee9a4bb67765fea4f",
"assets/packages/intl_phone_field/assets/flags/gb.png": "98773db151c150cabe845183241bfe6b",
"assets/packages/intl_phone_field/assets/flags/ws.png": "f206322f3e22f175869869dbfadb6ce8",
"assets/packages/intl_phone_field/assets/flags/hr.png": "69711b2ea009a3e7c40045b538768d4e",
"assets/packages/intl_phone_field/assets/flags/cu.png": "f41715bd51f63a9aebf543788543b4c4",
"assets/packages/intl_phone_field/assets/flags/dz.png": "132ceca353a95c8214676b2e94ecd40f",
"assets/packages/intl_phone_field/assets/flags/ax.png": "ec2062c36f09ed8fb90ac8992d010024",
"assets/packages/intl_phone_field/assets/flags/lt.png": "7df2cd6566725685f7feb2051f916a3e",
"assets/packages/intl_phone_field/assets/flags/gw.png": "05606b9a6393971bd87718b809e054f9",
"assets/packages/intl_phone_field/assets/flags/pg.png": "0f7e03465a93e0b4e3e1c9d3dd5814a4",
"assets/packages/intl_phone_field/assets/flags/bz.png": "fd2d7d27a5ddabe4eb9a10b1d3a433e4",
"assets/packages/intl_phone_field/assets/flags/sl.png": "61b9d992c8a6a83abc4d432069617811",
"assets/packages/intl_phone_field/assets/flags/uy.png": "da4247b21fcbd9e30dc2b3f7c5dccb64",
"assets/packages/intl_phone_field/assets/flags/bi.png": "adda8121501f0543f1075244a1acc275",
"assets/packages/intl_phone_field/assets/flags/cx.png": "8efa3231c8a3900a78f2b51d829f8c52",
"assets/packages/intl_phone_field/assets/flags/nc.png": "cb36e0c945b79d56def11b23c6a9c7e9",
"assets/packages/intl_phone_field/assets/flags/cw.png": "6c598eb0d331d6b238da57055ec00d33",
"assets/packages/intl_phone_field/assets/flags/ao.png": "5f0a372aa3aa7150a3dafea97acfc10d",
"assets/packages/intl_phone_field/assets/flags/as.png": "d9c1da515c6f945c2e2554592a9dfaae",
"assets/packages/intl_phone_field/assets/flags/eh.png": "515a9cf2620c802e305b5412ac81aed2",
"assets/packages/intl_phone_field/assets/flags/ir.png": "37f67c3141e9843196cb94815be7bd37",
"assets/packages/intl_phone_field/assets/flags/al.png": "722cf9e5c7a1d9c9e4608fb44dbb427d",
"assets/packages/intl_phone_field/assets/flags/th.png": "11ce0c9f8c738fd217ea52b9bc29014b",
"assets/packages/intl_phone_field/assets/flags/im.png": "7c9ccb825f0fca557d795c4330cf4f50",
"assets/packages/intl_phone_field/assets/flags/ee.png": "e242645cae28bd5291116ea211f9a566",
"assets/packages/intl_phone_field/assets/flags/ke.png": "cf5aae3699d3cacb39db9803edae172b",
"assets/packages/intl_phone_field/assets/flags/lk.png": "5a3a063cfff4a92fb0ba6158e610e025",
"assets/packages/intl_phone_field/assets/flags/bt.png": "3cfe1440e952bc7266d71f7f1454fa23",
"assets/packages/intl_phone_field/assets/flags/bl.png": "dae94f5465d3390fdc5929e4f74d3f5f",
"assets/packages/intl_phone_field/assets/flags/mm.png": "32e5293d6029d8294c7dfc3c3835c222",
"assets/packages/intl_phone_field/assets/flags/ec.png": "c1ae60d080be91f3be31e92e0a2d9555",
"assets/packages/intl_phone_field/assets/flags/gr.png": "ec11281d7decbf07b81a23a72a609b59",
"assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf": "3759b2f7a51e83c64a58cfe07b96a8ee",
"assets/packages/window_manager/images/ic_chrome_minimize.png": "4282cd84cb36edf2efb950ad9269ca62",
"assets/packages/window_manager/images/ic_chrome_unmaximize.png": "4a90c1909cb74e8f0d35794e2f61d8bf", "assets/packages/window_manager/images/ic_chrome_unmaximize.png": "4a90c1909cb74e8f0d35794e2f61d8bf",
"assets/packages/window_manager/images/ic_chrome_minimize.png": "4282cd84cb36edf2efb950ad9269ca62",
"assets/packages/window_manager/images/ic_chrome_maximize.png": "af7499d7657c8b69d23b85156b60298c", "assets/packages/window_manager/images/ic_chrome_maximize.png": "af7499d7657c8b69d23b85156b60298c",
"assets/packages/window_manager/images/ic_chrome_close.png": "75f4b8ab3608a05461a31fc18d6b47c2", "assets/packages/window_manager/images/ic_chrome_close.png": "75f4b8ab3608a05461a31fc18d6b47c2",
"assets/AssetManifest.json": "759f9ef9973f7e26c2a51450b55bb9fa", "assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf": "3759b2f7a51e83c64a58cfe07b96a8ee",
"assets/NOTICES": "74e6eb6cef54930e86993332f0eb3868", "assets/packages/intl_phone_field/assets/flags/pn.png": "0b0641b356af4c3e3489192ff4b0be77",
"/": "acc791ffda8aa0874a4b7dfc1931592d", "assets/packages/intl_phone_field/assets/flags/pg.png": "0f7e03465a93e0b4e3e1c9d3dd5814a4",
"main.dart.js": "1231d399ad9c6e9f3b1a5ffa9e66fbb1", "assets/packages/intl_phone_field/assets/flags/nu.png": "f4169998548e312584c67873e0d9352d",
"favicon.png": "dca91c54388f52eded692718d5a98b8b", "assets/packages/intl_phone_field/assets/flags/gm.png": "7148d3715527544c2e7d8d6f4a445bb6",
"version.json": "1ba5a588aca2224667efcdcfc82b6cf1", "assets/packages/intl_phone_field/assets/flags/va.png": "c010bf145f695d5c8fb551bafc081f77",
"favicon.ico": "51636d3a390451561744c42188ccd628", "assets/packages/intl_phone_field/assets/flags/kr.png": "a3b7da3b76b20a70e9cd63cc2315b51b",
"assets/packages/intl_phone_field/assets/flags/yt.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/uz.png": "3adad3bac322220cac8abc1c7cbaacac",
"assets/packages/intl_phone_field/assets/flags/pk.png": "7a6a621f7062589677b3296ca16c6718",
"assets/packages/intl_phone_field/assets/flags/ch.png": "a251702f7760b0aac141428ed60b7b66",
"assets/packages/intl_phone_field/assets/flags/gl.png": "b79e24ee1889b7446ba3d65564b86810",
"assets/packages/intl_phone_field/assets/flags/tj.png": "c73b793f2acd262e71b9236e64c77636",
"assets/packages/intl_phone_field/assets/flags/id.png": "80bb82d11d5bc144a21042e77972bca9",
"assets/packages/intl_phone_field/assets/flags/sz.png": "d1829842e45c2b2b29222c1b7e201591",
"assets/packages/intl_phone_field/assets/flags/gg.png": "eed435d25bd755aa7f9cd7004b9ed49d",
"assets/packages/intl_phone_field/assets/flags/vn.png": "32ff65ccbf31a707a195be2a5141a89b",
"assets/packages/intl_phone_field/assets/flags/pt.png": "eba93d33545c78cc67915d9be8323661",
"assets/packages/intl_phone_field/assets/flags/pm.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/pf.png": "1ae72c24380d087cbe2d0cd6c3b58821",
"assets/packages/intl_phone_field/assets/flags/an.png": "4e4b90fbca1275d1839ca5b44fc51071",
"assets/packages/intl_phone_field/assets/flags/al.png": "722cf9e5c7a1d9c9e4608fb44dbb427d",
"assets/packages/intl_phone_field/assets/flags/bs.png": "2b9540c4fa514f71911a48de0bd77e71",
"assets/packages/intl_phone_field/assets/flags/br.png": "5093e0cd8fd3c094664cd17ea8a36fd1",
"assets/packages/intl_phone_field/assets/flags/fk.png": "da8b0fe48829aae2c8feb4839895de63",
"assets/packages/intl_phone_field/assets/flags/mf.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/mm.png": "32e5293d6029d8294c7dfc3c3835c222",
"assets/packages/intl_phone_field/assets/flags/dm.png": "8886b222ed9ccd00f67e8bcf86dadcc2",
"assets/packages/intl_phone_field/assets/flags/gf.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/sa.png": "7c95c1a877148e2aa21a213d720ff4fd",
"assets/packages/intl_phone_field/assets/flags/de.png": "5d9561246523cf6183928756fd605e25",
"assets/packages/intl_phone_field/assets/flags/pr.png": "b97b2f4432c430bc340d893f36527e31",
"assets/packages/intl_phone_field/assets/flags/jm.png": "074400103847c56c37425a73f9d23665",
"assets/packages/intl_phone_field/assets/flags/pa.png": "78e3e4fd56f0064837098fe3f22fb41b",
"assets/packages/intl_phone_field/assets/flags/fm.png": "d571b8bc4b80980a81a5edbde788b6d2",
"assets/packages/intl_phone_field/assets/flags/cz.png": "73ecd64c6144786c4d03729b1dd9b1f3",
"assets/packages/intl_phone_field/assets/flags/cc.png": "31a475216e12fef447382c97b42876ce",
"assets/packages/intl_phone_field/assets/flags/bv.png": "33bc70259c4908b7b9adeef9436f7a9f",
"assets/packages/intl_phone_field/assets/flags/sy.png": "24186a0f4ce804a16c91592db5a16a3a",
"assets/packages/intl_phone_field/assets/flags/gn.png": "b2287c03c88a72d968aa796a076ba056",
"assets/packages/intl_phone_field/assets/flags/tn.png": "6612e9fec4bef022cbd45cbb7c02b2b6",
"assets/packages/intl_phone_field/assets/flags/mz.png": "1ab1ac750fbbb453d33e9f25850ac2a0",
"assets/packages/intl_phone_field/assets/flags/gw.png": "05606b9a6393971bd87718b809e054f9",
"assets/packages/intl_phone_field/assets/flags/ly.png": "8d65057351859065d64b4c118ff9e30e",
"assets/packages/intl_phone_field/assets/flags/bb.png": "a8473747387e4e7a8450c499529f1c93",
"assets/packages/intl_phone_field/assets/flags/bn.png": "ed650de06fff61ff27ec92a872197948",
"assets/packages/intl_phone_field/assets/flags/bq.png": "3649c177693bfee9c2fcc63c191a51f1",
"assets/packages/intl_phone_field/assets/flags/gp.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/jp.png": "25ac778acd990bedcfdc02a9b4570045",
"assets/packages/intl_phone_field/assets/flags/vg.png": "fc095e11f5b58604d6f4d3c2b43d167f",
"assets/packages/intl_phone_field/assets/flags/pw.png": "2e697cc6907a7b94c7f94f5d9b3bdccc",
"assets/packages/intl_phone_field/assets/flags/om.png": "cebd9ab4b9ab071b2142e21ae2129efc",
"assets/packages/intl_phone_field/assets/flags/fj.png": "1c6a86752578eb132390febf12789cd6",
"assets/packages/intl_phone_field/assets/flags/ru.png": "6974dcb42ad7eb3add1009ea0c6003e3",
"assets/packages/intl_phone_field/assets/flags/as.png": "d9c1da515c6f945c2e2554592a9dfaae",
"assets/packages/intl_phone_field/assets/flags/uy.png": "da4247b21fcbd9e30dc2b3f7c5dccb64",
"assets/packages/intl_phone_field/assets/flags/td.png": "009303b6188ca0e30bd50074b16f0b16",
"assets/packages/intl_phone_field/assets/flags/au.png": "72be14316f0af3903cdca7a726c0c589",
"assets/packages/intl_phone_field/assets/flags/hu.png": "281582a753e643b46bdd894047db08bb",
"assets/packages/intl_phone_field/assets/flags/fo.png": "2c7d9233582e83a86927e634897a2a90",
"assets/packages/intl_phone_field/assets/flags/tl.png": "c80876dc80cda5ab6bb8ef078bc6b05d",
"assets/packages/intl_phone_field/assets/flags/nf.png": "1c2069b299ce3660a2a95ec574dfde25",
"assets/packages/intl_phone_field/assets/flags/kg.png": "c4aa6d221d9a9d332155518d6b82dbc7",
"assets/packages/intl_phone_field/assets/flags/ga.png": "b0e5b2fa1b7106c7652a955db24c11c4",
"assets/packages/intl_phone_field/assets/flags/lr.png": "b92c75e18dd97349c75d6a43bd17ee94",
"assets/packages/intl_phone_field/assets/flags/tc.png": "d728d6763c17c520ad6bcf3c24282a29",
"assets/packages/intl_phone_field/assets/flags/ph.png": "e4025d1395a8455f1ba038597a95228c",
"assets/packages/intl_phone_field/assets/flags/ar.png": "3bd245f8c28f70c9ef9626dae27adc65",
"assets/packages/intl_phone_field/assets/flags/ma.png": "057ea2e08587f1361b3547556adae0c2",
"assets/packages/intl_phone_field/assets/flags/tf.png": "b2c044b86509e7960b5ba66b094ea285",
"assets/packages/intl_phone_field/assets/flags/ki.png": "14db0fc29398730064503907bd696176",
"assets/packages/intl_phone_field/assets/flags/qa.png": "eb9b3388e554cf85aea1e739247548df",
"assets/packages/intl_phone_field/assets/flags/ge.png": "6fbd41f07921fa415347ebf6dff5b0f7",
"assets/packages/intl_phone_field/assets/flags/ie.png": "1d91912afc591dd120b47b56ea78cdbf",
"assets/packages/intl_phone_field/assets/flags/bz.png": "fd2d7d27a5ddabe4eb9a10b1d3a433e4",
"assets/packages/intl_phone_field/assets/flags/ml.png": "0c50dfd539e87bb4313da0d4556e2d13",
"assets/packages/intl_phone_field/assets/flags/sd.png": "65ce270762dfc87475ea99bd18f79025",
"assets/packages/intl_phone_field/assets/flags/ss.png": "b0120cb000b31bb1a5c801c3592139bc",
"assets/packages/intl_phone_field/assets/flags/cw.png": "6c598eb0d331d6b238da57055ec00d33",
"assets/packages/intl_phone_field/assets/flags/be.png": "7e5e1831cdd91935b38415479a7110eb",
"assets/packages/intl_phone_field/assets/flags/mq.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/sn.png": "68eaa89bbc83b3f356e1ba2096b09b3c",
"assets/packages/intl_phone_field/assets/flags/rs.png": "9dff535d2d08c504be63062f39eff0b7",
"assets/packages/intl_phone_field/assets/flags/ee.png": "e242645cae28bd5291116ea211f9a566",
"assets/packages/intl_phone_field/assets/flags/mh.png": "18dda388ef5c1cf37cae5e7d5fef39bc",
"assets/packages/intl_phone_field/assets/flags/rw.png": "d1aae0647a5b1ab977ae43ab894ce2c3",
"assets/packages/intl_phone_field/assets/flags/bh.png": "a1acd86ef0e19ea5f0297bbe1de6cfd4",
"assets/packages/intl_phone_field/assets/flags/ad.png": "384e9845debe9aca8f8586d9bedcb7e6",
"assets/packages/intl_phone_field/assets/flags/hm.png": "72be14316f0af3903cdca7a726c0c589",
"assets/packages/intl_phone_field/assets/flags/eu.png": "c58ece3931acb87faadc5b940d4f7755",
"assets/packages/intl_phone_field/assets/flags/ca.png": "76f2fac1d3b2cc52ba6695c2e2941632",
"assets/packages/intl_phone_field/assets/flags/ae.png": "792efc5eb6c31d780bd34bf4bad69f3f",
"assets/packages/intl_phone_field/assets/flags/py.png": "154d4add03b4878caf00bd3249e14f40",
"assets/packages/intl_phone_field/assets/flags/nr.png": "1316f3a8a419d8be1975912c712535ea",
"assets/packages/intl_phone_field/assets/flags/cy.png": "7b36f4af86257a3f15f5a5a16f4a2fcd",
"assets/packages/intl_phone_field/assets/flags/ht.png": "630f7f8567d87409a32955107ad11a86",
"assets/packages/intl_phone_field/assets/flags/gu.png": "2acb614b442e55864411b6e418df6eab",
"assets/packages/intl_phone_field/assets/flags/cm.png": "42d52fa71e8b4dbb182ff431749e8d0d",
"assets/packages/intl_phone_field/assets/flags/sr.png": "9f912879f2829a625436ccd15e643e39",
"assets/packages/intl_phone_field/assets/flags/so.png": "1ce20d052f9d057250be96f42647513b",
"assets/packages/intl_phone_field/assets/flags/tv.png": "c57025ed7ae482210f29b9da86b0d211",
"assets/packages/intl_phone_field/assets/flags/tg.png": "7f91f02b26b74899ff882868bd611714",
"assets/packages/intl_phone_field/assets/flags/fr.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/ag.png": "41c11d5668c93ba6e452f811defdbb24",
"assets/packages/intl_phone_field/assets/flags/ir.png": "37f67c3141e9843196cb94815be7bd37",
"assets/packages/intl_phone_field/assets/flags/cn.png": "040539c2cdb60ebd9dc8957cdc6a8ad0",
"assets/packages/intl_phone_field/assets/flags/gd.png": "7a4864ccfa2a0564041c2d1f8a13a8c9",
"assets/packages/intl_phone_field/assets/flags/es.png": "654965f9722f6706586476fb2f5d30dd",
"assets/packages/intl_phone_field/assets/flags/cr.png": "bfd8b41e63fc3cc829c72c4b2e170532",
"assets/packages/intl_phone_field/assets/flags/sb.png": "296ecedbd8d1c2a6422c3ba8e5cd54bd",
"assets/packages/intl_phone_field/assets/flags/sj.png": "33bc70259c4908b7b9adeef9436f7a9f",
"assets/packages/intl_phone_field/assets/flags/wf.png": "6f1644b8f907d197c0ff7ed2f366ad64",
"assets/packages/intl_phone_field/assets/flags/ec.png": "c1ae60d080be91f3be31e92e0a2d9555",
"assets/packages/intl_phone_field/assets/flags/af.png": "ba710b50a060b5351381b55366396c30",
"assets/packages/intl_phone_field/assets/flags/bj.png": "6fdc6449f73d23ad3f07060f92db4423",
"assets/packages/intl_phone_field/assets/flags/pe.png": "4d9249aab70a26fadabb14380b3b55d2",
"assets/packages/intl_phone_field/assets/flags/sg.png": "bc772e50b8c79f08f3c2189f5d8ce491",
"assets/packages/intl_phone_field/assets/flags/mu.png": "c5228d1e94501d846b5bf203f038ae49",
"assets/packages/intl_phone_field/assets/flags/kn.png": "f318e2fd87e5fd2cabefe9ff252bba46",
"assets/packages/intl_phone_field/assets/flags/mx.png": "84b12a569b209e213daccfcbdd1fc799",
"assets/packages/intl_phone_field/assets/flags/hr.png": "69711b2ea009a3e7c40045b538768d4e",
"assets/packages/intl_phone_field/assets/flags/in.png": "1dec13ba525529cffd4c7f8a35d51121",
"assets/packages/intl_phone_field/assets/flags/gr.png": "ec11281d7decbf07b81a23a72a609b59",
"assets/packages/intl_phone_field/assets/flags/cg.png": "eca97338cc1cb5b5e91bec72af57b3d4",
"assets/packages/intl_phone_field/assets/flags/vc.png": "da3ca14a978717467abbcdece05d3544",
"assets/packages/intl_phone_field/assets/flags/us.png": "83b065848d14d33c0d10a13e01862f34",
"assets/packages/intl_phone_field/assets/flags/tt.png": "a8e1fc5c65dc8bc362a9453fadf9c4b3",
"assets/packages/intl_phone_field/assets/flags/gb.png": "98773db151c150cabe845183241bfe6b",
"assets/packages/intl_phone_field/assets/flags/ky.png": "38e39eba673e82c48a1f25bd103a7e97",
"assets/packages/intl_phone_field/assets/flags/bm.png": "b366ba84cbc8286c830f392bb9086be5",
"assets/packages/intl_phone_field/assets/flags/za.png": "b28280c6c3eb4624c18b5455d4a1b1ff",
"assets/packages/intl_phone_field/assets/flags/lt.png": "7df2cd6566725685f7feb2051f916a3e",
"assets/packages/intl_phone_field/assets/flags/nz.png": "65c811e96eb6c9da65538f899c110895",
"assets/packages/intl_phone_field/assets/flags/la.png": "e8cd9c3ee6e134adcbe3e986e1974e4a",
"assets/packages/intl_phone_field/assets/flags/tk.png": "60428ff1cdbae680e5a0b8cde4677dd5",
"assets/packages/intl_phone_field/assets/flags/si.png": "24237e53b34752554915e71e346bb405",
"assets/packages/intl_phone_field/assets/flags/mt.png": "f3119401ae0c3a9d6e2dc23803928c06",
"assets/packages/intl_phone_field/assets/flags/np.png": "6e099fb1e063930bdd00e8df5cef73d4",
"assets/packages/intl_phone_field/assets/flags/do.png": "ed35983a9263bb5713be37d9a52caddc",
"assets/packages/intl_phone_field/assets/flags/tr.png": "27feab1a5ca390610d07e0c6bd4720d5",
"assets/packages/intl_phone_field/assets/flags/eg.png": "311d780e8e3dd43f87e6070f6feb74c7",
"assets/packages/intl_phone_field/assets/flags/ve.png": "893391d65cbd10ca787a73578c77d3a7",
"assets/packages/intl_phone_field/assets/flags/sc.png": "e969fd5afb1eb5902675b6bcf49a8c2e",
"assets/packages/intl_phone_field/assets/flags/ck.png": "39f343868a8dc8ca95d27b27a5caf480",
"assets/packages/intl_phone_field/assets/flags/bt.png": "3cfe1440e952bc7266d71f7f1454fa23",
"assets/packages/intl_phone_field/assets/flags/to.png": "1cdd716b5b5502f85d6161dac6ee6c5b",
"assets/packages/intl_phone_field/assets/flags/ng.png": "aedbe364bd1543832e88e64b5817e877",
"assets/packages/intl_phone_field/assets/flags/at.png": "570c070177a5ea0fe03e20107ebf5283",
"assets/packages/intl_phone_field/assets/flags/tw.png": "b1101fd5f871a9ffe7c9ad191a7d3304",
"assets/packages/intl_phone_field/assets/flags/eh.png": "515a9cf2620c802e305b5412ac81aed2",
"assets/packages/intl_phone_field/assets/flags/gh.png": "b35464dca793fa33e51bf890b5f3d92b",
"assets/packages/intl_phone_field/assets/flags/dz.png": "132ceca353a95c8214676b2e94ecd40f",
"assets/packages/intl_phone_field/assets/flags/ne.png": "a20724c177e86d6a27143aa9c9664a6f",
"assets/packages/intl_phone_field/assets/flags/mw.png": "ffc1f18eeedc1dfbb1080aa985ce7d05",
"assets/packages/intl_phone_field/assets/flags/ye.png": "4cf73209d90e9f02ead1565c8fdf59e5",
"assets/packages/intl_phone_field/assets/flags/ba.png": "d415bad33b35de3f095177e8e86cbc82",
"assets/packages/intl_phone_field/assets/flags/ws.png": "f206322f3e22f175869869dbfadb6ce8",
"assets/packages/intl_phone_field/assets/flags/je.png": "288f8dca26098e83ff0455b08cceca1b",
"assets/packages/intl_phone_field/assets/flags/bf.png": "63f1c67fca7ce8b52b3418a90af6ad37",
"assets/packages/intl_phone_field/assets/flags/kh.png": "d48d51e8769a26930da6edfc15de97fe",
"assets/packages/intl_phone_field/assets/flags/kp.png": "e1c8bb52f31fca22d3368d8f492d8f27",
"assets/packages/intl_phone_field/assets/flags/im.png": "7c9ccb825f0fca557d795c4330cf4f50",
"assets/packages/intl_phone_field/assets/flags/ms.png": "9c955a926cf7d57fccb450a97192afa7",
"assets/packages/intl_phone_field/assets/flags/cx.png": "8efa3231c8a3900a78f2b51d829f8c52",
"assets/packages/intl_phone_field/assets/flags/tm.png": "0980fb40ec450f70896f2c588510f933",
"assets/packages/intl_phone_field/assets/flags/gs.png": "419dd57836797a3f1bf6258ea6589f9a",
"assets/packages/intl_phone_field/assets/flags/se.png": "25dd5434891ac1ca2ad1af59cda70f80",
"assets/packages/intl_phone_field/assets/flags/bi.png": "adda8121501f0543f1075244a1acc275",
"assets/packages/intl_phone_field/assets/flags/vi.png": "3f317c56f31971b3179abd4e03847036",
"assets/packages/intl_phone_field/assets/flags/am.png": "aaa39141fbc80205bebaa0200b55a13a",
"assets/packages/intl_phone_field/assets/flags/my.png": "f7f962e8a074387fd568c9d4024e0959",
"assets/packages/intl_phone_field/assets/flags/um.png": "8fe7c4fed0a065fdfb9bd3125c6ecaa1",
"assets/packages/intl_phone_field/assets/flags/na.png": "cdc00e9267a873609b0abea944939ff7",
"assets/packages/intl_phone_field/assets/flags/mk.png": "835f2263974de523fa779d29c90595bf",
"assets/packages/intl_phone_field/assets/flags/aw.png": "a93ddf8e32d246dc47f6631f38e0ed92",
"assets/packages/intl_phone_field/assets/flags/zw.png": "078a3267ea8eabf88b2d43fe4aed5ce5",
"assets/packages/intl_phone_field/assets/flags/no.png": "33bc70259c4908b7b9adeef9436f7a9f",
"assets/packages/intl_phone_field/assets/flags/sh.png": "98773db151c150cabe845183241bfe6b",
"assets/packages/intl_phone_field/assets/flags/sx.png": "9c19254973d8acf81581ad95b408c7e6",
"assets/packages/intl_phone_field/assets/flags/ua.png": "b4b10d893611470661b079cb30473871",
"assets/packages/intl_phone_field/assets/flags/it.png": "5c8e910e6a33ec63dfcda6e8960dd19c",
"assets/packages/intl_phone_field/assets/flags/bg.png": "1d24bc616e3389684ed2c9f18bcb0209",
"assets/packages/intl_phone_field/assets/flags/il.png": "1e06ad7783f24332405d36561024cc4c",
"assets/packages/intl_phone_field/assets/flags/gy.png": "159a260bf0217128ea7475ba5b272b6a",
"assets/packages/intl_phone_field/assets/flags/zm.png": "81cec35b715f227328cad8f314acd797",
"assets/packages/intl_phone_field/assets/flags/ug.png": "9a0f358b1eb19863e21ae2063fab51c0",
"assets/packages/intl_phone_field/assets/flags/jo.png": "c01cb41f74f9db0cf07ba20f0af83011",
"assets/packages/intl_phone_field/assets/flags/sv.png": "217b691efbef7a0f48cdd53e91997f0e",
"assets/packages/intl_phone_field/assets/flags/li.png": "ecdf7b3fe932378b110851674335d9ab",
"assets/packages/intl_phone_field/assets/flags/mc.png": "90c2ad7f144d73d4650cbea9dd621275",
"assets/packages/intl_phone_field/assets/flags/bl.png": "dae94f5465d3390fdc5929e4f74d3f5f",
"assets/packages/intl_phone_field/assets/flags/bw.png": "fac8b90d7404728c08686dc39bab4fb3",
"assets/packages/intl_phone_field/assets/flags/ps.png": "52a25a48658ca9274830ffa124a8c1db",
"assets/packages/intl_phone_field/assets/flags/co.png": "e3b1be16dcdae6cb72e9c238fdddce3c",
"assets/packages/intl_phone_field/assets/flags/gb-eng.png": "0d9f2a6775fd52b79e1d78eb1dda10cf",
"assets/packages/intl_phone_field/assets/flags/hn.png": "9ecf68aed83c4a9b3f1e6275d96bfb04",
"assets/packages/intl_phone_field/assets/flags/gb-sct.png": "75106a5e49e3e16da76cb33bdac102ab",
"assets/packages/intl_phone_field/assets/flags/gi.png": "446aa44aaa063d240adab88243b460d3",
"assets/packages/intl_phone_field/assets/flags/me.png": "590284bc85810635ace30a173e615ca4",
"assets/packages/intl_phone_field/assets/flags/gb-wls.png": "d7d7c77c72cd425d993bdc50720f4d04",
"assets/packages/intl_phone_field/assets/flags/pl.png": "f20e9ef473a9ed24176f5ad74dd0d50a",
"assets/packages/intl_phone_field/assets/flags/cl.png": "6735e0e2d88c119e9ed1533be5249ef1",
"assets/packages/intl_phone_field/assets/flags/dk.png": "abcd01bdbcc02b4a29cbac237f29cd1d",
"assets/packages/intl_phone_field/assets/flags/sk.png": "2a1ee716d4b41c017ff1dbf3fd3ffc64",
"assets/packages/intl_phone_field/assets/flags/dj.png": "078bd37d41f746c3cb2d84c1e9611c55",
"assets/packages/intl_phone_field/assets/flags/cv.png": "9b1f31f9fc0795d728328dedd33eb1c0",
"assets/packages/intl_phone_field/assets/flags/et.png": "57edff61c7fddf2761a19948acef1498",
"assets/packages/intl_phone_field/assets/flags/az.png": "6ffa766f6883d2d3d350cdc22a062ca3",
"assets/packages/intl_phone_field/assets/flags/ni.png": "e398dc23e79d9ccd702546cc25f126bf",
"assets/packages/intl_phone_field/assets/flags/st.png": "fef62c31713ff1063da2564df3f43eea",
"assets/packages/intl_phone_field/assets/flags/fi.png": "3ccd69a842e55183415b7ea2c04b15c8",
"assets/packages/intl_phone_field/assets/flags/io.png": "83d45bbbff087d47b2b39f1c20598f52",
"assets/packages/intl_phone_field/assets/flags/ci.png": "7f5ca3779d5ff6ce0c803a6efa0d2da7",
"assets/packages/intl_phone_field/assets/flags/mo.png": "849848a26bbfc87024017418ad7a6233",
"assets/packages/intl_phone_field/assets/flags/er.png": "8ca78e10878a2e97c1371b38c5d258a7",
"assets/packages/intl_phone_field/assets/flags/kz.png": "cb3b0095281c9d7e7fb5ce1716ef8ee5",
"assets/packages/intl_phone_field/assets/flags/by.png": "beabf61e94fb3a4f7c7a7890488b213d",
"assets/packages/intl_phone_field/assets/flags/re.png": "134bee9f9d794dc5c0922d1b9bdbb710",
"assets/packages/intl_phone_field/assets/flags/mp.png": "87351c30a529071ee9a4bb67765fea4f",
"assets/packages/intl_phone_field/assets/flags/ke.png": "cf5aae3699d3cacb39db9803edae172b",
"assets/packages/intl_phone_field/assets/flags/md.png": "8911d3d821b95b00abbba8771e997eb3",
"assets/packages/intl_phone_field/assets/flags/mr.png": "f2a62602d43a1ee14625af165b96ce2f",
"assets/packages/intl_phone_field/assets/flags/cd.png": "5b5f832ed6cd9f9240cb31229d8763dc",
"assets/packages/intl_phone_field/assets/flags/xk.png": "079259fbcb1f3c78dafa944464295c16",
"assets/packages/intl_phone_field/assets/flags/kw.png": "3ca448e219d0df506fb2efd5b91be092",
"assets/packages/intl_phone_field/assets/flags/gq.png": "4286e56f388a37f64b21eb56550c06d9",
"assets/packages/intl_phone_field/assets/flags/is.png": "907840430252c431518005b562707831",
"assets/packages/intl_phone_field/assets/flags/nl.png": "3649c177693bfee9c2fcc63c191a51f1",
"assets/packages/intl_phone_field/assets/flags/hk.png": "4b5ec424348c98ec71a46ad3dce3931d",
"assets/packages/intl_phone_field/assets/flags/th.png": "11ce0c9f8c738fd217ea52b9bc29014b",
"assets/packages/intl_phone_field/assets/flags/gt.png": "706a0c3b5e0b589c843e2539e813839e",
"assets/packages/intl_phone_field/assets/flags/nc.png": "cb36e0c945b79d56def11b23c6a9c7e9",
"assets/packages/intl_phone_field/assets/flags/iq.png": "bc3e6f68c5188dbf99b473e2bea066f2",
"assets/packages/intl_phone_field/assets/flags/km.png": "5554c8746c16d4f482986fb78ffd9b36",
"assets/packages/intl_phone_field/assets/flags/cu.png": "f41715bd51f63a9aebf543788543b4c4",
"assets/packages/intl_phone_field/assets/flags/ax.png": "ec2062c36f09ed8fb90ac8992d010024",
"assets/packages/intl_phone_field/assets/flags/lb.png": "f80cde345f0d9bd0086531808ce5166a",
"assets/packages/intl_phone_field/assets/flags/lu.png": "6274fd1cae3c7a425d25e4ccb0941bb8",
"assets/packages/intl_phone_field/assets/flags/tz.png": "56ec99c7e0f68b88a2210620d873683a",
"assets/packages/intl_phone_field/assets/flags/vu.png": "3f201fdfb6d669a64c35c20a801016d1",
"assets/packages/intl_phone_field/assets/flags/cf.png": "263583ffdf7a888ce4fba8487d1da0b2",
"assets/packages/intl_phone_field/assets/flags/sl.png": "61b9d992c8a6a83abc4d432069617811",
"assets/packages/intl_phone_field/assets/flags/mv.png": "d9245f74e34d5c054413ace4b86b4f16",
"assets/packages/intl_phone_field/assets/flags/lv.png": "53105fea0cc9cc554e0ceaabc53a2d5d",
"assets/packages/intl_phone_field/assets/flags/bd.png": "86a0e4bd8787dc8542137a407e0f987f",
"assets/packages/intl_phone_field/assets/flags/lc.png": "8c1a03a592aa0a99fcaf2b81508a87eb",
"assets/packages/intl_phone_field/assets/flags/mn.png": "16086e8d89c9067d29fd0f2ea7021a45",
"assets/packages/intl_phone_field/assets/flags/gb-nir.png": "98773db151c150cabe845183241bfe6b",
"assets/packages/intl_phone_field/assets/flags/sm.png": "a8d6801cb7c5360e18f0a2ed146b396d",
"assets/packages/intl_phone_field/assets/flags/ao.png": "5f0a372aa3aa7150a3dafea97acfc10d",
"assets/packages/intl_phone_field/assets/flags/mg.png": "0ef6271ad284ebc0069ff0aeb5a3ad1e",
"assets/packages/intl_phone_field/assets/flags/ls.png": "2bca756f9313957347404557acb532b0",
"assets/packages/intl_phone_field/assets/flags/lk.png": "5a3a063cfff4a92fb0ba6158e610e025",
"assets/packages/intl_phone_field/assets/flags/ai.png": "ce5e91ed1725f0499b9231b69a7fd448",
"assets/packages/intl_phone_field/assets/flags/ro.png": "85af99741fe20664d9a7112cfd8d9722",
"assets/packages/intl_phone_field/assets/flags/aq.png": "0c586e7b91aa192758fdd0f03adb84d8",
"assets/packages/intl_phone_field/assets/flags/bo.png": "3ccf6fa7f9cbc27949b8418925e4e89c",
"assets/AssetManifest.bin.json": "611449d46e56c96b3baef404bfc56246",
"assets/AssetManifest.bin": "bf3be26e7055ad9a32f66b3a56138224",
"canvaskit/skwasm.js": "445e9e400085faead4493be2224d95aa",
"canvaskit/chromium/canvaskit.wasm": "f5934e694f12929ed56a671617acd254",
"canvaskit/chromium/canvaskit.js": "43787ac5098c648979c27c13c6f804c3",
"canvaskit/chromium/canvaskit.js.symbols": "4525682ef039faeb11f24f37436dca06",
"canvaskit/canvaskit.wasm": "3d2a2d663e8c5111ac61a46367f751ac",
"canvaskit/skwasm.js.symbols": "741d50ffba71f89345996b0aa8426af8", "canvaskit/skwasm.js.symbols": "741d50ffba71f89345996b0aa8426af8",
"canvaskit/skwasm.wasm": "e42815763c5d05bba43f9d0337fa7d84", "canvaskit/skwasm.wasm": "e42815763c5d05bba43f9d0337fa7d84",
"canvaskit/chromium/canvaskit.wasm": "f5934e694f12929ed56a671617acd254",
"canvaskit/chromium/canvaskit.js.symbols": "4525682ef039faeb11f24f37436dca06",
"canvaskit/chromium/canvaskit.js": "43787ac5098c648979c27c13c6f804c3",
"canvaskit/canvaskit.wasm": "3d2a2d663e8c5111ac61a46367f751ac",
"canvaskit/canvaskit.js.symbols": "38cba9233b92472a36ff011dc21c2c9f",
"canvaskit/canvaskit.js": "c86fbd9e7b17accae76e5ad116583dc4", "canvaskit/canvaskit.js": "c86fbd9e7b17accae76e5ad116583dc4",
"canvaskit/skwasm.worker.js": "bfb704a6c714a75da9ef320991e88b03", "canvaskit/skwasm.worker.js": "bfb704a6c714a75da9ef320991e88b03",
"canvaskit/skwasm.js": "445e9e400085faead4493be2224d95aa", "canvaskit/canvaskit.js.symbols": "38cba9233b92472a36ff011dc21c2c9f",
"manifest.json": "ef43d90e57aa7682d7e2cfba2f484a40", "favicon.ico": "51636d3a390451561744c42188ccd628",
"flutter.js": "c71a09214cb6f5f8996a531350400a9a"}; "flutter.js": "c71a09214cb6f5f8996a531350400a9a"};
// The application shell files that are downloaded before a service worker can // The application shell files that are downloaded before a service worker can
// start. // start.

12
public/js/manifest.json Normal file
View File

@ -0,0 +1,12 @@
{
"Resources/assets/css/app.css": {
"file": "assets/app-2d547327.css",
"isEntry": true,
"src": "Resources/assets/css/app.css"
},
"Resources/assets/js/admin.js": {
"file": "assets/admin-4ed993c7.js",
"isEntry": true,
"src": "Resources/assets/js/admin.js"
}
}

288073
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

274718
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

10870
public/vendor/livewire/livewire.esm.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

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