mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 19:24:33 -04:00
Fixes for select box background color
This commit is contained in:
parent
c5de797e04
commit
d79b374eda
@ -21,6 +21,7 @@ class ContactRegister
|
|||||||
{
|
{
|
||||||
$domain_name = $request->getHost();
|
$domain_name = $request->getHost();
|
||||||
|
|
||||||
|
/* Hosted */
|
||||||
if (strpos($domain_name, 'invoicing.co') !== false) {
|
if (strpos($domain_name, 'invoicing.co') !== false) {
|
||||||
$subdomain = explode('.', $domain_name)[0];
|
$subdomain = explode('.', $domain_name)[0];
|
||||||
|
|
||||||
@ -42,6 +43,7 @@ class ContactRegister
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Hosted */
|
||||||
if (Ninja::isHosted()) {
|
if (Ninja::isHosted()) {
|
||||||
$query = [
|
$query = [
|
||||||
'portal_domain' => $request->getSchemeAndHttpHost(),
|
'portal_domain' => $request->getSchemeAndHttpHost(),
|
||||||
|
@ -45,8 +45,7 @@ class MarkInvoiceDeleted extends AbstractService
|
|||||||
->setAdjustmentAmount()
|
->setAdjustmentAmount()
|
||||||
->deletePaymentables()
|
->deletePaymentables()
|
||||||
->adjustPayments()
|
->adjustPayments()
|
||||||
->adjustPaidToDate()
|
->adjustPaidToDateAndBalance()
|
||||||
->adjustBalance()
|
|
||||||
->adjustLedger();
|
->adjustLedger();
|
||||||
|
|
||||||
$transaction = [
|
$transaction = [
|
||||||
@ -70,21 +69,29 @@ class MarkInvoiceDeleted extends AbstractService
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function adjustPaidToDate()
|
private function adjustPaidToDateAndBalance()
|
||||||
{
|
{
|
||||||
$client = $this->invoice->client->fresh();
|
// $client = $this->invoice->client->fresh();
|
||||||
$client->paid_to_date += $this->adjustment_amount * -1;
|
// $client->paid_to_date += $this->adjustment_amount * -1;
|
||||||
$client->save();
|
// $client->balance += $this->balance_adjustment * -1;
|
||||||
// $this->invoice->client->service()->updatePaidToDate($this->adjustment_amount * -1)->save(); //reduces the paid to date by the payment totals
|
// $client->save();
|
||||||
|
|
||||||
|
// 06-09-2022
|
||||||
|
$this->invoice
|
||||||
|
->client
|
||||||
|
->service()
|
||||||
|
->updateBalanceAndPaidToDate($this->balance_adjustment * -1, $this->adjustment_amount * -1)
|
||||||
|
->save(); //reduces the paid to date by the payment totals
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @deprecated
|
||||||
private function adjustBalance()
|
private function adjustBalance()
|
||||||
{
|
{
|
||||||
$client = $this->invoice->client->fresh();
|
// $client = $this->invoice->client->fresh();
|
||||||
$client->balance += $this->balance_adjustment * -1;
|
// $client->balance += $this->balance_adjustment * -1;
|
||||||
$client->save();
|
// $client->save();
|
||||||
|
|
||||||
// $this->invoice->client->service()->updateBalance($this->balance_adjustment * -1)->save(); //reduces the client balance by the invoice amount.
|
// $this->invoice->client->service()->updateBalance($this->balance_adjustment * -1)->save(); //reduces the client balance by the invoice amount.
|
||||||
|
|
||||||
|
@ -117,16 +117,12 @@ class MarkPaid extends AbstractService
|
|||||||
$payment->ledger()
|
$payment->ledger()
|
||||||
->updatePaymentBalance($this->payable_balance * -1);
|
->updatePaymentBalance($this->payable_balance * -1);
|
||||||
|
|
||||||
// \DB::connection(config('database.default'))->transaction(function () use ($payment) {
|
//06-09-2022
|
||||||
|
$this->invoice
|
||||||
// /* Get the last record for the client and set the current balance*/
|
->client
|
||||||
// $client = Client::withTrashed()->where('id', $this->invoice->client_id)->lockForUpdate()->first();
|
->service()
|
||||||
// $client->paid_to_date += $payment->amount;
|
->updateBalanceAndPaidToDate($payment->amount*-1, $payment->amount)
|
||||||
// $client->balance -= $payment->amount;
|
->save();
|
||||||
// $client->save();
|
|
||||||
// }, 1);
|
|
||||||
|
|
||||||
$this->invoice->client->service()->updateBalanceAndPaidToDate($payment->amount*-1, $payment->amount)->save();
|
|
||||||
|
|
||||||
$this->invoice = $this->invoice
|
$this->invoice = $this->invoice
|
||||||
->service()
|
->service()
|
||||||
|
@ -62,16 +62,6 @@ class MarkSent extends AbstractService
|
|||||||
->save();
|
->save();
|
||||||
|
|
||||||
/*Adjust client balance*/
|
/*Adjust client balance*/
|
||||||
|
|
||||||
// \DB::connection(config('database.default'))->transaction(function () use ($adjustment) {
|
|
||||||
|
|
||||||
// /* Get the last record for the client and set the current balance*/
|
|
||||||
// $client = Client::withTrashed()->where('id', $this->client->id)->lockForUpdate()->first();
|
|
||||||
// $client->balance += $adjustment;
|
|
||||||
// $client->save();
|
|
||||||
|
|
||||||
// }, 1);
|
|
||||||
|
|
||||||
$this->invoice->client->service()->updateBalance($adjustment)->save();
|
$this->invoice->client->service()->updateBalance($adjustment)->save();
|
||||||
|
|
||||||
$this->invoice->markInvitationsSent();
|
$this->invoice->markInvitationsSent();
|
||||||
|
@ -28,6 +28,7 @@ trait Refundable
|
|||||||
/**
|
/**
|
||||||
* Entry point for processing of refunds.
|
* Entry point for processing of refunds.
|
||||||
* @param array $data
|
* @param array $data
|
||||||
|
* @deprecated ???? 06-09-2022
|
||||||
* @return Refundable
|
* @return Refundable
|
||||||
* @throws PaymentRefundFailed
|
* @throws PaymentRefundFailed
|
||||||
*/
|
*/
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
@elseif($field['key'] === 'country_id')
|
@elseif($field['key'] === 'country_id')
|
||||||
<select
|
<select
|
||||||
id="shipping_country"
|
id="shipping_country"
|
||||||
class="input w-full form-select"
|
class="input w-full form-select bg-white"
|
||||||
name="country_id">
|
name="country_id">
|
||||||
<option value="none"></option>
|
<option value="none"></option>
|
||||||
@foreach(App\Utils\TranslationHelper::getCountries() as $country)
|
@foreach(App\Utils\TranslationHelper::getCountries() as $country)
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
@if(!array_key_exists('filled', $field))
|
@if(!array_key_exists('filled', $field))
|
||||||
@component('portal.ninja2020.components.general.card-element', ['title' => $field['label']])
|
@component('portal.ninja2020.components.general.card-element', ['title' => $field['label']])
|
||||||
@if($field['name'] == 'client_country_id' || $field['name'] == 'client_shipping_country_id')
|
@if($field['name'] == 'client_country_id' || $field['name'] == 'client_shipping_country_id')
|
||||||
<select id="client_country" class="input w-full form-select" name="{{ $field['name'] }}" wire:model.lazy="{{ str_replace(["client_","_line_","contact_"], ["client.","","contact."], $field['name']) }}">
|
<select id="client_country" class="input w-full form-select bg-white" name="{{ $field['name'] }}" wire:model.lazy="{{ str_replace(["client_","_line_","contact_"], ["client.","","contact."], $field['name']) }}">
|
||||||
<option value="none"></option>
|
<option value="none"></option>
|
||||||
|
|
||||||
@foreach($countries as $country)
|
@foreach($countries as $country)
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
||||||
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.country')])
|
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.country')])
|
||||||
<select name="countries" id="country" name="country" class="form-select input w-full" required>
|
<select name="countries" id="country" name="country" class="form-select input w-full bg-white" required>
|
||||||
@foreach($countries as $country)
|
@foreach($countries as $country)
|
||||||
<option value="{{ $country->iso_3166_2 }}" {{$country->iso_3166_2 == 'US' ? "selected" : ""}}>{{ $country->iso_3166_2 }} ({{ $country->name }})</option>
|
<option value="{{ $country->iso_3166_2 }}" {{$country->iso_3166_2 == 'US' ? "selected" : ""}}>{{ $country->iso_3166_2 }} ({{ $country->name }})</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
||||||
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.country')])
|
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.country')])
|
||||||
<select name="countries" id="country" class="form-select input w-full">
|
<select name="countries" id="country" class="form-select input w-full bg-white">
|
||||||
<option disabled selected></option>
|
<option disabled selected></option>
|
||||||
@foreach($countries as $country)
|
@foreach($countries as $country)
|
||||||
@if($country->iso_3166_2 == 'US')
|
@if($country->iso_3166_2 == 'US')
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
||||||
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.country')])
|
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.country')])
|
||||||
<select name="countries" id="country" class="form-select input w-full" required>
|
<select name="countries" id="country" class="form-select input w-full bg-white" required>
|
||||||
@foreach($countries as $country)
|
@foreach($countries as $country)
|
||||||
<option value="{{ $country->iso_3166_2 }}">{{ $country->iso_3166_2 }} ({{ $country->name }})</option>
|
<option value="{{ $country->iso_3166_2 }}">{{ $country->iso_3166_2 }} ({{ $country->name }})</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
||||||
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.country')])
|
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.country')])
|
||||||
<select name="countries" id="country" class="form-select input w-full" required>
|
<select name="countries" id="country" class="form-select input w-full bg-white" required>
|
||||||
@foreach($countries as $country)
|
@foreach($countries as $country)
|
||||||
<option value="{{ $country->iso_3166_2 }}">{{ $country->iso_3166_2 }} ({{ $country->name }})</option>
|
<option value="{{ $country->iso_3166_2 }}">{{ $country->iso_3166_2 }} ({{ $country->name }})</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
||||||
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.country')])
|
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.country')])
|
||||||
<select name="countries" id="country" class="form-select input w-full" required>
|
<select name="countries" id="country" class="form-select input w-full bg-white" required>
|
||||||
@foreach($countries as $country)
|
@foreach($countries as $country)
|
||||||
<option value="{{ $country->iso_3166_2 }}">{{ $country->iso_3166_2 }} ({{ $country->name }})</option>
|
<option value="{{ $country->iso_3166_2 }}">{{ $country->iso_3166_2 }} ({{ $country->name }})</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-span-6 sm:col-span-2">
|
<div class="col-span-6 sm:col-span-2">
|
||||||
<label for="country" class="input-label">@lang('texts.country')</label>
|
<label for="country" class="input-label">@lang('texts.country')</label>
|
||||||
<select id="country" class="input w-full form-select {{ in_array('billing_country', (array) session('missing_required_fields')) ? 'border border-red-400' : '' }}" wire:model.defer="country_id">
|
<select id="country" class="input w-full form-select bg-white {{ in_array('billing_country', (array) session('missing_required_fields')) ? 'border border-red-400' : '' }}" wire:model.defer="country_id">
|
||||||
<option value="none"></option>
|
<option value="none"></option>
|
||||||
@foreach($countries as $country)
|
@foreach($countries as $country)
|
||||||
<option value="{{ $country->id }}">
|
<option value="{{ $country->id }}">
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-span-4 sm:col-span-2">
|
<div class="col-span-4 sm:col-span-2">
|
||||||
<label for="shipping_country" class="input-label">@lang('texts.shipping_country')</label>
|
<label for="shipping_country" class="input-label">@lang('texts.shipping_country')</label>
|
||||||
<select id="shipping_country" class="input w-full form-select" wire:model.defer="shipping_country_id">
|
<select id="shipping_country" class="input w-full form-select bg-white" wire:model.defer="shipping_country_id">
|
||||||
<option value="none"></option>
|
<option value="none"></option>
|
||||||
@foreach($countries as $country)
|
@foreach($countries as $country)
|
||||||
<option value="{{ $country->id }}">
|
<option value="{{ $country->id }}">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user