1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #8080 from turbo124/v5-develop

minor fixes for subscriptions
This commit is contained in:
David Bomba 2022-12-16 23:37:30 +11:00 committed by GitHub
commit 51b5357aed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 12 deletions

View File

@ -292,9 +292,6 @@ class BaseRepository
if (($state['finished_amount'] != $state['starting_amount']) && ($model->status_id != Invoice::STATUS_DRAFT)) { if (($state['finished_amount'] != $state['starting_amount']) && ($model->status_id != Invoice::STATUS_DRAFT)) {
//14-09-2022 log when we make changes to the invoice balance.
nlog("Adjustment - {$model->number} - " .$state['finished_amount']. " - " . $state['starting_amount']);
$model->service()->updateStatus()->save(); $model->service()->updateStatus()->save();
$model->client->service()->updateBalance(($state['finished_amount'] - $state['starting_amount']))->save(); $model->client->service()->updateBalance(($state['finished_amount'] - $state['starting_amount']))->save();
$model->ledger()->updateInvoiceBalance(($state['finished_amount'] - $state['starting_amount']), "Update adjustment for invoice {$model->number}"); $model->ledger()->updateInvoiceBalance(($state['finished_amount'] - $state['starting_amount']), "Update adjustment for invoice {$model->number}");

View File

@ -3,7 +3,7 @@
<div class="w-full p-4 md:max-w-3xl"> <div class="w-full p-4 md:max-w-3xl">
<div class="w-full mb-4"> <div class="w-full mb-4">
<img class="object-scale-down" style="max-height: 100px;"src="{{ $subscription->company->present()->logo }}" alt="{{ $subscription->company->present()->name }}"> <img class="object-scale-down" style="max-height: 100px;"src="{{ $subscription->company->present()->logo }}" alt="{{ $subscription->company->present()->name }}">
<h1 id="billing-page-company-logo" class="text-3xl font-bold tracking-wide mt-6"> <h1 id="billing-page-company-logo" class="text-3xl font-bold tracking-wide mt-6 border-b-2">
{{ $subscription->name }} {{ $subscription->name }}
</h1> </h1>
</div> </div>
@ -38,7 +38,7 @@
<li class="flex py-6"> <li class="flex py-6">
@if(filter_var($product->custom_value1, FILTER_VALIDATE_URL)) @if(filter_var($product->custom_value1, FILTER_VALIDATE_URL))
<div class="h-24 w-24 flex-shrink-0 overflow-hidden rounded-md border border-gray-200 mr-2"> <div class="h-24 w-24 flex-shrink-0 overflow-hidden rounded-md border border-gray-200 mr-2">
<img src="{{$product->custom_value1}}" alt="" class="h-full w-full object-cover object-center"> <img src="{{$product->custom_value1}}" alt="" class="h-full w-full object-cover object-center p-2">
</div> </div>
@endif @endif
<div class="ml-0 flex flex-1 flex-col"> <div class="ml-0 flex flex-1 flex-col">
@ -82,7 +82,7 @@
<li class="flex py-6"> <li class="flex py-6">
@if(filter_var($product->custom_value1, FILTER_VALIDATE_URL)) @if(filter_var($product->custom_value1, FILTER_VALIDATE_URL))
<div class="h-24 w-24 flex-shrink-0 overflow-hidden rounded-md border border-gray-200 mr-2"> <div class="h-24 w-24 flex-shrink-0 overflow-hidden rounded-md border border-gray-200 mr-2">
<img src="{{$product->custom_value1}}" alt="" class="h-full w-full object-cover object-center"> <img src="{{$product->custom_value1}}" alt="" class="h-full w-full object-cover object-center p-2">
</div> </div>
@endif @endif
<div class="ml-0 flex flex-1 flex-col"> <div class="ml-0 flex flex-1 flex-col">
@ -109,7 +109,7 @@
@if(!empty($subscription->optional_recurring_product_ids) || !empty($subscription->optional_product_ids)) @if(!empty($subscription->optional_recurring_product_ids) || !empty($subscription->optional_product_ids))
<div class="w-full p-4 md:max-w-3xl"> <div class="w-full p-4 md:max-w-3xl">
<h2 class="text-2xl font-normal text-left border-b-4">Optional products</h2> <h2 class="text-2xl font-normal text-left border-b-2">{{ ctrans('texts.optional_products') }}</h2>
</div> </div>
@endif @endif
<div class="w-full px-4 md:max-w-3xl"> <div class="w-full px-4 md:max-w-3xl">
@ -121,7 +121,7 @@
<li class="flex py-6"> <li class="flex py-6">
@if(filter_var($product->custom_value1, FILTER_VALIDATE_URL)) @if(filter_var($product->custom_value1, FILTER_VALIDATE_URL))
<div class="h-24 w-24 flex-shrink-0 overflow-hidden rounded-md border border-gray-200 mr-2"> <div class="h-24 w-24 flex-shrink-0 overflow-hidden rounded-md border border-gray-200 mr-2">
<img src="{{$product->custom_value1}}" alt="" class="h-full w-full object-cover object-center"> <img src="{{$product->custom_value1}}" alt="" class="h-full w-full object-cover object-center p-2">
</div> </div>
@endif @endif
<div class="ml-0 flex flex-1 flex-col"> <div class="ml-0 flex flex-1 flex-col">
@ -162,7 +162,7 @@
<li class="flex py-6"> <li class="flex py-6">
@if(filter_var($product->custom_value1, FILTER_VALIDATE_URL)) @if(filter_var($product->custom_value1, FILTER_VALIDATE_URL))
<div class="h-24 w-24 flex-shrink-0 overflow-hidden rounded-md border border-gray-200 mr-2"> <div class="h-24 w-24 flex-shrink-0 overflow-hidden rounded-md border border-gray-200 mr-2">
<img src="{{$product->custom_value1}}" alt="" class="h-full w-full object-cover object-center"> <img src="{{$product->custom_value1}}" alt="" class="h-full w-full object-cover object-center p-2">
</div> </div>
@endif @endif
<div class="ml-0 flex flex-1 flex-col"> <div class="ml-0 flex flex-1 flex-col">
@ -210,7 +210,7 @@
@foreach($bundle->toArray() as $item) @foreach($bundle->toArray() as $item)
<div class="flex justify-between mt-1 mb-1"> <div class="flex justify-between mt-1 mb-1">
<span class="font-light text-sm uppercase">{{$item['product']}} x {{$item['qty']}}</span> <span class="font-light text-sm uppercase">{{$item['product']}} x {{$item['qty']}}</span>
<span class="font-semibold text-sm">{{ $item['price'] }}</span> <span class="font-bold text-sm">{{ $item['price'] }}</span>
</div> </div>
@endforeach @endforeach
@ -234,7 +234,7 @@
</form> </form>
@endif @endif
<div class="border-t-2 border-gray-200 border-opacity-50 mt-4"> <div class="border-gray-200 border-opacity-50 mt-4">
@if($discount) @if($discount)
<div class="flex font-semibold justify-between py-1 text-sm uppercase"> <div class="flex font-semibold justify-between py-1 text-sm uppercase">
<span>{{ ctrans('texts.subtotal') }}</span> <span>{{ ctrans('texts.subtotal') }}</span>
@ -316,7 +316,7 @@
</div> </div>
@error("email") @error("email")
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative" role="alert"> <div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative" role="alert">
<span class="block sm:inline">{{ $message }} </span> <span class="block sm:inline text-sm">{{ $message }} </span>
<span class="absolute top-0 bottom-0 right-0 px-4 py-3"> <span class="absolute top-0 bottom-0 right-0 px-4 py-3">
</div> </div>
@enderror @enderror