Skip to content

Commit c2d8d63

Browse files
committed
Added invoice payment to settings
1 parent 6ce76cd commit c2d8d63

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

resources/lang/en/lang.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,4 +511,5 @@
511511
'edit_pipeline_stage' => 'edit pipeline stage',
512512
'lead_prefix' => 'lead prefix',
513513
'deal_prefix' => 'deal prefix',
514+
'create_and_add_another' => 'create & add another',
514515
];

resources/views/purchase-orders/partials/card-create.blade.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@
3131

3232
@component('laravel-crm::components.card-footer')
3333
<a href="{{ url(route('laravel-crm.purchase-orders.index')) }}" class="btn btn-outline-secondary">{{ ucfirst(__('laravel-crm::lang.cancel')) }}</a>
34-
<button type="submit" class="btn btn-primary">{{ ucfirst(__('laravel-crm::lang.save')) }}</button>
34+
{{--
35+
<button type="submit" class="btn btn-primary">{{ ucfirst(__('laravel-crm::lang.create_and_add_another')) }}</button>
36+
--}}
37+
<button type="submit" class="btn btn-primary">{{ ucfirst(__('laravel-crm::lang.create_purchase_order')) }}</button>
3538
@endcomponent
3639

3740
@endcomponent
38-
</form>
41+
</form>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@
147147
'rows' => 5,
148148
'value' => old('invoice_terms', $invoiceTerms->value ?? null)
149149
])
150+
@include('laravel-crm::partials.form.textarea',[
151+
'name' => 'invoice_payment_instructions',
152+
'label' => ucfirst(trans('laravel-crm::lang.invoice_payment_instructions')),
153+
'rows' => 5,
154+
'value' => old('invoice_payment_instructions', $invoicePaymentInstructions->value ?? null)
155+
])
150156
@endhasinvoicesenabled
151157
@haspurchaseordersenabled
152158
@include('laravel-crm::partials.form.textarea',[

src/Http/Controllers/SettingController.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public function edit()
4646
$quoteTerms = $this->settingService->get('quote_terms');
4747
$invoiceContactDetails = $this->settingService->get('invoice_contact_details');
4848
$invoiceTerms = $this->settingService->get('invoice_terms');
49+
$invoicePaymentInstructions = $this->settingService->get('invoice_payment_instructions');
4950
$purchaseOrderTerms = $this->settingService->get('purchase_order_terms');
5051
$purchaseOrderDeliveryInstructions = $this->settingService->get('purchase_order_delivery_instructions');
5152
$dateFormatSetting = $this->settingService->get('date_format');
@@ -74,6 +75,7 @@ public function edit()
7475
'quoteTerms' => $quoteTerms,
7576
'invoiceContactDetails' => $invoiceContactDetails,
7677
'invoiceTerms' => $invoiceTerms,
78+
'invoicePaymentInstructions' => $invoicePaymentInstructions,
7779
'purchaseOrderTerms' => $purchaseOrderTerms,
7880
'purchaseOrderDeliveryInstructions' => $purchaseOrderDeliveryInstructions,
7981
'dateFormatSetting' => $dateFormatSetting,
@@ -156,6 +158,10 @@ public function update(UpdateSettingRequest $request)
156158
$this->settingService->set('invoice_terms', $request->invoice_terms);
157159
}
158160

161+
if ($request->invoice_payment_instructions) {
162+
$this->settingService->set('invoice_payment_instructions', $request->invoice_payment_instructions);
163+
}
164+
159165
if ($request->purchase_order_terms) {
160166
$this->settingService->set('purchase_order_terms', $request->purchase_order_terms);
161167
}

0 commit comments

Comments
 (0)