Skip to content

Commit ba1e8a5

Browse files
committed
Default quote & invoice terms setting
1 parent 222d422 commit ba1e8a5

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

resources/lang/en/lang.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,5 +382,5 @@
382382
'delivery' => 'delivery',
383383
'delivered' => 'delivered',
384384
'quote_terms' => 'quote terms',
385-
'invoice_terms' => 'invoice terms'
385+
'invoice_terms' => 'invoice terms',
386386
];

resources/views/invoices/partials/fields.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
'name' => 'terms',
9595
'label' => ucfirst(__('laravel-crm::lang.terms')),
9696
'rows' => 5,
97-
'value' => old('terms', $invoice->terms ?? null)
97+
'value' => old('terms', $invoice->terms ?? $invoiceTerms->value ?? null)
9898
])
9999
{{--@include('laravel-crm::partials.form.multiselect',[
100100
'name' => 'labels',

resources/views/quotes/partials/fields.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
'name' => 'terms',
9696
'label' => ucfirst(__('laravel-crm::lang.terms')),
9797
'rows' => 5,
98-
'value' => old('terms', $quote->terms ?? null)
98+
'value' => old('terms', $quote->terms ?? $quoteTerms->value ?? null)
9999
])
100100

101101
@include('laravel-crm::partials.form.multiselect',[

src/Http/Controllers/InvoiceController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,15 @@ public function create(Request $request)
9191
break;
9292
}
9393

94+
$invoiceTerms = $this->settingService->get('invoice_terms');
95+
9496
return view('laravel-crm::invoices.create', [
9597
'person' => $person ?? null,
9698
'organisation' => $organisation ?? null,
9799
'order' => $order ?? null,
98100
'prefix' => $this->settingService->get('invoice_prefix'),
99101
'number' => (Invoice::latest()->first()->number ?? 1000) + 1,
102+
'invoiceTerms' => $invoiceTerms,
100103
]);
101104
}
102105

src/Http/Controllers/QuoteController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,12 @@ public function create(Request $request)
9595
break;
9696
}
9797

98+
$quoteTerms = $this->settingService->get('quote_terms');
99+
98100
return view('laravel-crm::quotes.create', [
99101
'person' => $person ?? null,
100102
'organisation' => $organisation ?? null,
103+
'quoteTerms' => $quoteTerms,
101104
]);
102105
}
103106

0 commit comments

Comments
 (0)