diff --git a/app/Mail/Engine/PaymentEmailEngine.php b/app/Mail/Engine/PaymentEmailEngine.php index 25a4df8c64..c6a3f46480 100644 --- a/app/Mail/Engine/PaymentEmailEngine.php +++ b/app/Mail/Engine/PaymentEmailEngine.php @@ -96,11 +96,13 @@ class PaymentEmailEngine extends BaseEmailEngine $this->setAttachments([['file' => base64_encode($pdf), 'name' => $invoice->numberFormatter().'.pdf']]); + foreach ($invoice->documents as $document) { + $this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, ]]); + } + }); - // foreach ($this->payment->documents as $document) { - // $this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, ]]); - // } + } return $this; diff --git a/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php b/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php index d1bf5b8a94..a1f72cf5ce 100644 --- a/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php +++ b/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php @@ -8,28 +8,27 @@ + @if(isset($invoice)) +
+
+ @csrf -@if(isset($invoice)) -
- - @csrf + @if($invoice instanceof \App\Models\Invoice) + + + + @endif - @if($invoice instanceof \App\Models\Invoice) - - - - @endif - - - - - -
-@endif + + + + +
+ @endif
@@ -65,7 +64,6 @@ @endfor - @endif @error("data.{$index}.recurring_qty") @@ -83,7 +81,7 @@ @foreach($products as $product)
  • @if(filter_var($product->custom_value1, FILTER_VALIDATE_URL)) -
    +
    @endif @@ -121,18 +119,17 @@ @if(!empty($subscription->optional_recurring_product_ids)) @foreach($optional_recurring_products as $index => $product)
  • - @if(filter_var($product->custom_value1, FILTER_VALIDATE_URL)) -
    - -
    - @endif + @if(filter_var($product->custom_value1, FILTER_VALIDATE_URL)) +
    + +
    + @endif

    {!! nl2br($product->notes) !!}

    -

    {{ \App\Utils\Number::formatMoney($product->price, $subscription->company) }}

    +

    {{ \App\Utils\Number::formatMoney($product->price, $subscription->company) }} / {{ App\Models\RecurringInvoice::frequencyForKey($subscription->frequency_id) }}

    -
    @if(is_numeric($product->custom_value2)) @@ -149,7 +146,7 @@ @endif > - @for ($i = 1; $i <= ($subscription->use_inventory_management ? min($product->in_stock_quantity,$product->custom_value2) : $product->custom_value2); $i++) + @for ($i = 1; $i <= ($subscription->use_inventory_management ? min($product->in_stock_quantity, max(100,$product->custom_value2)) : max(100,$product->custom_value2)); $i++) @endfor @@ -164,7 +161,7 @@ @foreach($optional_products as $index => $product)
  • @if(filter_var($product->custom_value1, FILTER_VALIDATE_URL)) -
    +
    @endif @@ -187,7 +184,7 @@ @endif