mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Private Notes for Invoices/Quotes #1293
This commit is contained in:
parent
efe8d870d3
commit
7d466f5569
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class AddDefaultNoteToClient extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('clients', function ($table) {
|
||||||
|
$table->text('public_notes')->nullable();
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('invoices', function ($table) {
|
||||||
|
$table->text('private_notes')->nullable();
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('payments', function ($table) {
|
||||||
|
$table->text('private_notes')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('clients', function ($table) {
|
||||||
|
$table->dropColumn('public_notes');
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('invoices', function ($table) {
|
||||||
|
$table->dropColumn('private_notes');
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('payments', function ($table) {
|
||||||
|
$table->dropColumn('private_notes');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
2
public/css/built.css
vendored
2
public/css/built.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
resources/assets/css/style.css
vendored
2
resources/assets/css/style.css
vendored
@ -1093,7 +1093,7 @@ div.panel-body div.panel-body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.invoice-table #document-upload{
|
.invoice-table #document-upload{
|
||||||
width:500px;
|
width:550px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#document-upload .dropzone{
|
#document-upload .dropzone{
|
||||||
|
@ -340,7 +340,8 @@
|
|||||||
<div role="tabpanel">
|
<div role="tabpanel">
|
||||||
|
|
||||||
<ul class="nav nav-tabs" role="tablist" style="border: none">
|
<ul class="nav nav-tabs" role="tablist" style="border: none">
|
||||||
<li role="presentation" class="active"><a href="#notes" aria-controls="notes" role="tab" data-toggle="tab">{{ trans('texts.note_to_client') }}</a></li>
|
<li role="presentation" class="active"><a href="#public_notes" aria-controls="notes" role="tab" data-toggle="tab">{{ trans('texts.public_notes') }}</a></li>
|
||||||
|
<li role="presentation"><a href="#private_notes" aria-controls="terms" role="tab" data-toggle="tab">{{ trans("texts.private_notes") }}</a></li>
|
||||||
<li role="presentation"><a href="#terms" aria-controls="terms" role="tab" data-toggle="tab">{{ trans("texts.terms") }}</a></li>
|
<li role="presentation"><a href="#terms" aria-controls="terms" role="tab" data-toggle="tab">{{ trans("texts.terms") }}</a></li>
|
||||||
<li role="presentation"><a href="#footer" aria-controls="footer" role="tab" data-toggle="tab">{{ trans("texts.footer") }}</a></li>
|
<li role="presentation"><a href="#footer" aria-controls="footer" role="tab" data-toggle="tab">{{ trans("texts.footer") }}</a></li>
|
||||||
@if ($account->hasFeature(FEATURE_DOCUMENTS))
|
@if ($account->hasFeature(FEATURE_DOCUMENTS))
|
||||||
@ -354,13 +355,20 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div role="tabpanel" class="tab-pane active" id="notes" style="padding-bottom:44px">
|
<div role="tabpanel" class="tab-pane active" id="public_notes" style="padding-bottom:44px">
|
||||||
{!! Former::textarea('public_notes')->data_bind("value: public_notes, valueUpdate: 'afterkeydown'")
|
{!! Former::textarea('public_notes')
|
||||||
->label(null)->style('width: 500px;')->rows(4) !!}
|
->data_bind("value: public_notes, valueUpdate: 'afterkeydown'")
|
||||||
|
->label(null)->style('width: 550px')->rows(4) !!}
|
||||||
|
</div>
|
||||||
|
<div role="tabpanel" class="tab-pane" id="private_notes" style="padding-bottom:44px">
|
||||||
|
{!! Former::textarea('private_notes')
|
||||||
|
->data_bind("value: private_notes, valueUpdate: 'afterkeydown'")
|
||||||
|
->label(null)->style('width: 550px')->rows(4) !!}
|
||||||
</div>
|
</div>
|
||||||
<div role="tabpanel" class="tab-pane" id="terms">
|
<div role="tabpanel" class="tab-pane" id="terms">
|
||||||
{!! Former::textarea('terms')->data_bind("value:terms, placeholder: terms_placeholder, valueUpdate: 'afterkeydown'")
|
{!! Former::textarea('terms')
|
||||||
->label(false)->style('width: 500px')->rows(4)
|
->data_bind("value:terms, placeholder: terms_placeholder, valueUpdate: 'afterkeydown'")
|
||||||
|
->label(false)->style('width: 550px')->rows(4)
|
||||||
->help('<div class="checkbox">
|
->help('<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input name="set_default_terms" type="checkbox" style="width: 24px" data-bind="checked: set_default_terms"/>'.trans('texts.save_as_default_terms').'
|
<input name="set_default_terms" type="checkbox" style="width: 24px" data-bind="checked: set_default_terms"/>'.trans('texts.save_as_default_terms').'
|
||||||
@ -371,8 +379,9 @@
|
|||||||
</div>') !!}
|
</div>') !!}
|
||||||
</div>
|
</div>
|
||||||
<div role="tabpanel" class="tab-pane" id="footer">
|
<div role="tabpanel" class="tab-pane" id="footer">
|
||||||
{!! Former::textarea('invoice_footer')->data_bind("value:invoice_footer, placeholder: footer_placeholder, valueUpdate: 'afterkeydown'")
|
{!! Former::textarea('invoice_footer')
|
||||||
->label(false)->style('width: 500px')->rows(4)
|
->data_bind("value:invoice_footer, placeholder: footer_placeholder, valueUpdate: 'afterkeydown'")
|
||||||
|
->label(false)->style('width: 550px')->rows(4)
|
||||||
->help('<div class="checkbox">
|
->help('<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input name="set_default_footer" type="checkbox" style="width: 24px" data-bind="checked: set_default_footer"/>'.trans('texts.save_as_default_footer').'
|
<input name="set_default_footer" type="checkbox" style="width: 24px" data-bind="checked: set_default_footer"/>'.trans('texts.save_as_default_footer').'
|
||||||
|
@ -13,9 +13,9 @@ function ViewModel(data) {
|
|||||||
ko.mapping.fromJS(client, model.invoice().client().mapping, model.invoice().client);
|
ko.mapping.fromJS(client, model.invoice().client().mapping, model.invoice().client);
|
||||||
@if (!$invoice->id)
|
@if (!$invoice->id)
|
||||||
self.setDueDate();
|
self.setDueDate();
|
||||||
@endif
|
|
||||||
// copy default note from the client to the invoice
|
// copy default note from the client to the invoice
|
||||||
model.invoice().public_notes(client.public_notes);
|
model.invoice().public_notes(client.public_notes);
|
||||||
|
@endif
|
||||||
}
|
}
|
||||||
|
|
||||||
self.showMoreFields = function() {
|
self.showMoreFields = function() {
|
||||||
@ -190,6 +190,7 @@ function InvoiceModel(data) {
|
|||||||
self.footer_placeholder = ko.observable({{ (!$invoice->id || $invoice->is_recurring) && $account->invoice_footer ? 'account.invoice_footer' : false}});
|
self.footer_placeholder = ko.observable({{ (!$invoice->id || $invoice->is_recurring) && $account->invoice_footer ? 'account.invoice_footer' : false}});
|
||||||
self.set_default_footer = ko.observable(false);
|
self.set_default_footer = ko.observable(false);
|
||||||
self.public_notes = ko.observable('');
|
self.public_notes = ko.observable('');
|
||||||
|
self.private_notes = ko.observable('');
|
||||||
self.po_number = ko.observable('');
|
self.po_number = ko.observable('');
|
||||||
self.invoice_date = ko.observable('');
|
self.invoice_date = ko.observable('');
|
||||||
self.invoice_number = ko.observable('');
|
self.invoice_number = ko.observable('');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user