mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
bug fixes
This commit is contained in:
parent
0144f5b0f2
commit
7ef27d5a96
@ -15,7 +15,7 @@ class ClientController extends \BaseController {
|
||||
return View::make('list', array(
|
||||
'entityType'=>ENTITY_CLIENT,
|
||||
'title' => '- Clients',
|
||||
'columns'=>['checkbox', 'Client', 'Contact', 'Email', 'Date Created', 'Phone', 'Last Login', 'Balance', 'Action']
|
||||
'columns'=>['checkbox', 'Client', 'Contact', 'Email', 'Date Created', 'Last Login', 'Balance', 'Action']
|
||||
));
|
||||
}
|
||||
|
||||
@ -49,7 +49,6 @@ class ClientController extends \BaseController {
|
||||
->addColumn('first_name', function($model) { return link_to('clients/' . $model->public_id, $model->first_name . ' ' . $model->last_name); })
|
||||
->addColumn('email', function($model) { return link_to('clients/' . $model->public_id, $model->email); })
|
||||
->addColumn('created_at', function($model) { return Utils::timestampToDateString(strtotime($model->created_at)); })
|
||||
->addColumn('work_phone', function($model) { return Utils::formatPhoneNumber($model->work_phone); })
|
||||
->addColumn('last_login', function($model) { return Utils::timestampToDateString($model->last_login); })
|
||||
->addColumn('balance', function($model) { return Utils::formatMoney($model->balance, $model->currency_id); })
|
||||
->addColumn('dropdown', function($model)
|
||||
|
@ -79,9 +79,19 @@ class ConstantsSeeder extends Seeder
|
||||
Currency::create(array('name' => 'US Dollar', 'symbol' => '$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||
Currency::create(array('name' => 'Pound Sterling', 'symbol' => '£', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||
|
||||
DatetimeFormat::create(array('format' => 'F j, Y, g:i a', 'label' => 'March 10, 2013, 6:15 pm'));
|
||||
DatetimeFormat::create(array('format' => 'D M jS, Y g:ia', 'label' => 'Mon March 10th, 2013, 6:15 pm'));
|
||||
DatetimeFormat::create(array('format' => 'd/M/Y g:i a', 'label' => '10/Mar/2013'));
|
||||
DatetimeFormat::create(array('format' => 'd-M-Yk g:i a', 'label' => '10-Mar-2013'));
|
||||
DatetimeFormat::create(array('format' => 'd/F/Y g:i a', 'label' => '10/March/2013'));
|
||||
DatetimeFormat::create(array('format' => 'd-F-Y g:i a', 'label' => '10-March-2013'));
|
||||
DatetimeFormat::create(array('format' => 'M j, Y g:i a', 'label' => 'Mar 10, 2013 6:15 pm'));
|
||||
DatetimeFormat::create(array('format' => 'F j, Y g:i a', 'label' => 'March 10, 2013 6:15 pm'));
|
||||
DatetimeFormat::create(array('format' => 'D M jS, Y g:ia', 'label' => 'Mon March 10th, 2013 6:15 pm'));
|
||||
|
||||
DateFormat::create(array('format' => 'd/M/Y', 'picker_format' => 'dd/M/yyyy', 'label' => '10/Mar/2013'));
|
||||
DateFormat::create(array('format' => 'd-M-Y', 'picker_format' => 'dd-M-yyyy', 'label' => '10-Mar-2013'));
|
||||
DateFormat::create(array('format' => 'd/F/Y', 'picker_format' => 'dd/MM/yyyy', 'label' => '10/March/2013'));
|
||||
DateFormat::create(array('format' => 'd-F-Y', 'picker_format' => 'dd-MM-yyyy', 'label' => '10-March-2013'));
|
||||
DateFormat::create(array('format' => 'M j, Y', 'picker_format' => 'M d, yyyy', 'label' => 'Mar 10, 2013'));
|
||||
DateFormat::create(array('format' => 'F j, Y', 'picker_format' => 'MM d, yyyy', 'label' => 'March 10, 2013'));
|
||||
DateFormat::create(array('format' => 'D M j, Y', 'picker_format' => 'D MM d, yyyy', 'label' => 'Mon March 10, 2013'));
|
||||
|
||||
|
@ -119,7 +119,7 @@ class Activity extends Eloquent
|
||||
$activity->invoice_id = $invitation->invoice_id;
|
||||
$activity->contact_id = $invitation->contact_id;
|
||||
$activity->activity_type_id = ACTIVITY_TYPE_EMAIL_INVOICE;
|
||||
$activity->message = $userName . ' emailed invoice ' . link_to('invoices/'.$invitation->invoice->public_id, $invitation->invoice->invoice_number) . ' to ' . $invitation->contact->getFullName() . ' - ' . $invitation->contact->email;
|
||||
$activity->message = $userName . ' emailed invoice ' . link_to('invoices/'.$invitation->invoice->public_id, $invitation->invoice->invoice_number) . ' to ' . $invitation->contact->getDisplayName();
|
||||
$activity->balance = $client->balance;
|
||||
$activity->adjustment = $adjustment;
|
||||
$activity->save();
|
||||
|
@ -148,7 +148,7 @@ class Client extends EntityModel
|
||||
return '';
|
||||
}
|
||||
|
||||
return link_to($this->website, $this->website);
|
||||
return link_to($this->website, $this->website, array('target'=>'_blank'));
|
||||
}
|
||||
|
||||
public function getDateCreated()
|
||||
|
@ -31,13 +31,21 @@ class Contact extends EntityModel
|
||||
}
|
||||
*/
|
||||
|
||||
public function getFullName()
|
||||
public function getDisplayName()
|
||||
{
|
||||
if (!$this->first_name && !$this->last_name)
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->getFullName();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getFullName()
|
||||
{
|
||||
$fullName = $this->first_name . ' ' . $this->last_name;
|
||||
|
||||
if ($fullName == ' ')
|
||||
|
@ -100,11 +100,11 @@ class Invoice extends EntityModel
|
||||
case FREQUENCY_MONTHLY:
|
||||
return $dayOfMonthStart == $dayOfMonthToday || $daysSinceLastSent > 31;
|
||||
case FREQUENCY_THREE_MONTHS:
|
||||
return ($dayOfMonthStart == $dayOfMonthToday && (!$daysSinceLastSent || $monthsSinceLastSent == 3)) || $daysSinceLastSent > (3 * 31);
|
||||
return ($dayOfMonthStart == $dayOfMonthToday && (!$daysSinceLastSent || $monthsSinceLastSent == 3)) || $daysSinceLastSent > 92;
|
||||
case FREQUENCY_SIX_MONTHS:
|
||||
return ($dayOfMonthStart == $dayOfMonthToday && (!$daysSinceLastSent || $monthsSinceLastSent == 6)) || $daysSinceLastSent > (6 * 31);
|
||||
return ($dayOfMonthStart == $dayOfMonthToday && (!$daysSinceLastSent || $monthsSinceLastSent == 6)) || $daysSinceLastSent > 183;
|
||||
case FREQUENCY_ANNUALLY:
|
||||
return ($dayOfMonthStart == $dayOfMonthToday && (!$daysSinceLastSent || $monthsSinceLastSent == 12)) || $daysSinceLastSent > (12 *31);
|
||||
return ($dayOfMonthStart == $dayOfMonthToday && (!$daysSinceLastSent || $monthsSinceLastSent == 12)) || $daysSinceLastSent > 365;
|
||||
default:
|
||||
Utils::fatalError("Invalid frequency supplied: " . $this->frequency_id);
|
||||
break;
|
||||
|
@ -80,7 +80,8 @@ class InvoiceRepository
|
||||
}
|
||||
|
||||
$invoice = (array) $input;
|
||||
$rules = ['invoice_number' => 'unique:invoices,invoice_number,' . $invoice['invoice_number'] . ',id,account_id,' . \Auth::user()->account_id];
|
||||
$invoiceId = isset($invoice['public_id']) && $invoice['public_id'] ? Invoice::getPrivateId($invoice['public_id']) : null;
|
||||
$rules = ['invoice_number' => 'unique:invoices,invoice_number,' . $invoiceId . ',id,account_id,' . \Auth::user()->account_id];
|
||||
$validator = \Validator::make($invoice, $rules);
|
||||
|
||||
if ($validator->fails())
|
||||
|
@ -37,9 +37,9 @@
|
||||
|
||||
{{ Former::legend('Address') }}
|
||||
{{ Former::text('address1')->label('Street') }}
|
||||
{{ Former::text('address2')->label('Apt/Floor') }}
|
||||
{{ Former::text('address2')->label('Apt/Suite') }}
|
||||
{{ Former::text('city') }}
|
||||
{{ Former::text('state') }}
|
||||
{{ Former::text('state')->label('State/Province') }}
|
||||
{{ Former::text('postal_code') }}
|
||||
{{ Former::select('country_id')->addOption('','')->label('Country')
|
||||
->fromQuery($countries, 'name', 'id')->select($account ? $account->country_id : '') }}
|
||||
|
@ -30,9 +30,9 @@
|
||||
|
||||
{{ Former::legend('Address') }}
|
||||
{{ Former::text('address1')->label('Street') }}
|
||||
{{ Former::text('address2')->label('Apt/Floor') }}
|
||||
{{ Former::text('address2')->label('Apt/Suite') }}
|
||||
{{ Former::text('city') }}
|
||||
{{ Former::text('state') }}
|
||||
{{ Former::text('state')->label('State/Province') }}
|
||||
{{ Former::text('postal_code') }}
|
||||
{{ Former::select('country_id')->addOption('','')->label('Country')
|
||||
->fromQuery($countries, 'name', 'id')->select($client ? $client->country_id : '') }}
|
||||
|
@ -6,10 +6,12 @@
|
||||
|
||||
<meta name="csrf-token" content="<?= csrf_token() ?>">
|
||||
<script src="{{ asset('js/jquery-ui.min.js') }}" type="text/javascript"></script>
|
||||
|
||||
@if (Auth::check() && Auth::user()->theme_id)
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('css/themes/'.Auth::user()->theme->name.'.min.css') }}"/>
|
||||
@else
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('css/bootstrap.css') }}"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('css/style.css') }}"/>
|
||||
@endif
|
||||
<script src="{{ asset('js/bootstrap.js') }}" type="text/javascript"></script>
|
||||
|
||||
@ -37,7 +39,6 @@
|
||||
<script src="{{ asset('js/script.js') }}" type="text/javascript"></script>
|
||||
<script src="{{ asset('js/accounting.js') }}" type="text/javascript"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('css/style.css') }}"/>
|
||||
<style type="text/css">
|
||||
|
||||
@if (!Auth::check() || Auth::user()->showGreyBackground())
|
||||
@ -90,12 +91,12 @@
|
||||
{{ HTML::menu_link('invoice') }}
|
||||
{{ HTML::menu_link('payment') }}
|
||||
{{ HTML::menu_link('credit') }}
|
||||
{{ HTML::nav_link('reports', 'Reports') }}
|
||||
{{-- HTML::nav_link('reports', 'Reports') --}}
|
||||
</ul>
|
||||
|
||||
<div class="navbar-form navbar-right">
|
||||
@if (!Auth::check() || !Auth::user()->registered)
|
||||
{{ Button::sm_primary('Sign up', array('data-toggle'=>'modal', 'data-target'=>'#signUpModal')) }}
|
||||
{{ Button::sm_success_primary('Sign up', array('data-toggle'=>'modal', 'data-target'=>'#signUpModal')) }}
|
||||
@endif
|
||||
|
||||
<div class="btn-group">
|
||||
@ -143,6 +144,8 @@
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</nav>
|
||||
|
||||
<p> </p>
|
||||
|
||||
@if (Session::has('message'))
|
||||
<div class="alert alert-info">{{ Session::get('message') }}</div>
|
||||
@endif
|
||||
@ -153,6 +156,7 @@
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="footer" style="padding-top: 32px">
|
||||
@if (false)
|
||||
<div class="pull-right">
|
||||
{{ Former::open('user/setTheme')->addClass('themeForm') }}
|
||||
<div style="display:none">
|
||||
@ -172,6 +176,7 @@
|
||||
</div>
|
||||
{{ Former::close() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice-ninja', 'open source', array('target'=>'_blank')) }}, email us at {{ link_to('mailto:contact@invoiceninja.com', 'contact@invoiceninja.com') }}.
|
||||
<p class="text-danger">This is a demo site, the data is erased.</p>
|
||||
|
@ -10,8 +10,6 @@
|
||||
@section('content')
|
||||
|
||||
|
||||
<p> </p>
|
||||
|
||||
{{ Former::open($url)->method($method)->addClass('main_form')->rules(array(
|
||||
'client' => 'required',
|
||||
'email' => 'required',
|
||||
@ -54,8 +52,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Former::textarea('terms')->data_bind("value: wrapped_terms, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::textarea('public_notes')->data_bind("value: wrapped_notes, valueUpdate: 'afterkeydown'") }}
|
||||
|
||||
</div>
|
||||
<div class="col-md-4" id="col_2">
|
||||
@ -85,12 +81,12 @@
|
||||
<div class="col-md-3" id="col_2">
|
||||
{{ Former::text('po_number')->label('PO number')->data_bind("value: po_number, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('discount')->data_bind("value: discount, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::select('currency_id')->label('Currency')->fromQuery($currencies, 'name', 'id')->data_bind("value: currency_id") }}
|
||||
{{ Former::select('currency_id')->label('Currency')->addOption('', '')->fromQuery($currencies, 'name', 'id')->data_bind("value: currency_id") }}
|
||||
|
||||
<div class="form-group" style="margin-bottom: 8px">
|
||||
<label for="recurring" class="control-label col-lg-4 col-sm-4">Taxes</label>
|
||||
<div class="col-lg-8 col-sm-8" style="padding-top: 7px">
|
||||
<a href="#" data-bind="click: $root.showTaxesForm">Manage taxe rates</a>
|
||||
<a href="#" data-bind="click: $root.showTaxesForm">Manage tax rates</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -146,7 +142,13 @@
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="hide-border"/>
|
||||
<td colspan="2"/>
|
||||
<td colspan="2" rowspan="5">
|
||||
<br/>
|
||||
{{ Former::textarea('public_notes')->data_bind("value: wrapped_notes, valueUpdate: 'afterkeydown'")
|
||||
->label(false)->placeholder('Note to client')->style('width: 520px; resize: none') }}
|
||||
{{ Former::textarea('terms')->data_bind("value: wrapped_terms, valueUpdate: 'afterkeydown'")
|
||||
->label(false)->placeholder('Invoice terms')->style('width: 520px; resize: none') }}
|
||||
</td>
|
||||
<td data-bind="visible: $root.invoice_item_taxes.show"/>
|
||||
<td colspan="2">Subtotal</td>
|
||||
<td style="text-align: right"><span data-bind="text: totals.subtotal"/></td>
|
||||
@ -201,7 +203,7 @@
|
||||
array('Create Credit', "javascript:onCreditClick()"),
|
||||
)
|
||||
)
|
||||
, array('id'=>'actionDropDown', 'style'=>'text-align:left', 'data-bind'=>'css: $root.enable.save'))->split(); }}
|
||||
, array('id'=>'relatedActions', 'style'=>'text-align:left'))->split(); }}
|
||||
|
||||
{{ DropdownButton::primary('Save Invoice',
|
||||
Navigation::links(
|
||||
@ -213,7 +215,7 @@
|
||||
array('Delete Invoice', "javascript:onDeleteClick()"),
|
||||
)
|
||||
)
|
||||
, array('id'=>'actionDropDown', 'style'=>'text-align:left', 'data-bind'=>'css: $root.enable.save'))->split(); }}
|
||||
, array('id'=>'primaryActions', 'style'=>'text-align:left', 'data-bind'=>'css: $root.enable.save'))->split(); }}
|
||||
@else
|
||||
{{ Button::normal('Download PDF', array('onclick' => 'onDownloadClick()')) }}
|
||||
{{ Button::primary_submit('Save Invoice', array('data-bind'=>'css: $root.enable.save')) }}
|
||||
@ -249,9 +251,9 @@
|
||||
|
||||
{{ Former::legend('Address') }}
|
||||
{{ Former::text('address1')->label('Street')->data_bind("value: address1, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('address2')->label('Apt/Floor')->data_bind("value: address2, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('address2')->label('Apt/Suite')->data_bind("value: address2, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('city')->data_bind("value: city, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('state')->data_bind("value: state, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('state')->label('State/Province')->data_bind("value: state, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::text('postal_code')->data_bind("value: postal_code, valueUpdate: 'afterkeydown'") }}
|
||||
{{ Former::select('country_id')->addOption('','')->label('Country')->addGroupClass('country_select')
|
||||
->fromQuery($countries, 'name', 'id')->data_bind("dropdown: country_id") }}
|
||||
@ -387,7 +389,7 @@
|
||||
console.log('load blank client');
|
||||
}
|
||||
refreshPDF();
|
||||
}); //.trigger('change');
|
||||
}).trigger('change');
|
||||
|
||||
$('#terms, #public_notes, #invoice_number, #invoice_date, #due_date, #po_number, #discout, #currency_id').change(function() {
|
||||
refreshPDF();
|
||||
@ -422,7 +424,11 @@
|
||||
$('table.invoice-table select').trigger('change');
|
||||
})
|
||||
|
||||
$('#actionDropDown > button:first').click(function() {
|
||||
$('#relatedActions > button:first').click(function() {
|
||||
onDownloadClick();
|
||||
});
|
||||
|
||||
$('#primaryActions > button:first').click(function() {
|
||||
onSaveClick();
|
||||
});
|
||||
|
||||
@ -434,7 +440,7 @@
|
||||
client.name.display());
|
||||
|
||||
applyComboboxListeners();
|
||||
refreshPDF();
|
||||
//refreshPDF();
|
||||
});
|
||||
|
||||
function applyComboboxListeners() {
|
||||
@ -801,7 +807,8 @@
|
||||
this.id = ko.observable('');
|
||||
self.discount = ko.observable('');
|
||||
self.frequency_id = ko.observable('');
|
||||
self.currency_id = ko.observable({{ Session::get(SESSION_CURRENCY) }});
|
||||
//self.currency_id = ko.observable({{ Session::get(SESSION_CURRENCY) }});
|
||||
self.currency_id = ko.observable({{ $client && $client->currency_id ? $client->currency_id : Session::get(SESSION_CURRENCY) }});
|
||||
self.terms = ko.observable(wordWrapText('{{ $account->invoice_terms }}', 340));
|
||||
self.public_notes = ko.observable('');
|
||||
self.po_number = ko.observable('');
|
||||
|
@ -135,7 +135,7 @@ table.table thead .sorting_desc_disabled { background: url('../images/sort_desc_
|
||||
}
|
||||
|
||||
|
||||
.invoice-table {
|
||||
.invoice-table tbody {
|
||||
border-style: none !important;
|
||||
}
|
||||
|
||||
@ -184,3 +184,72 @@ body {
|
||||
-o-transition: all 0.5s ease;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.navbar-default {
|
||||
background-color: #428bff;
|
||||
border-color: #3276b1;
|
||||
}
|
||||
.navbar-default .navbar-brand {
|
||||
color: #ecf0f1;
|
||||
}
|
||||
.navbar-default .navbar-brand:hover,
|
||||
.navbar-default .navbar-brand:focus {
|
||||
color: #ffffff;
|
||||
}
|
||||
.navbar-default .navbar-nav > li > a {
|
||||
color: #ecf0f1;
|
||||
}
|
||||
.navbar-default .navbar-nav > li > a:hover,
|
||||
.navbar-default .navbar-nav > li > a:focus {
|
||||
color: #ffffff;
|
||||
}
|
||||
.navbar-default .navbar-nav > .active > a,
|
||||
.navbar-default .navbar-nav > .active > a:hover,
|
||||
.navbar-default .navbar-nav > .active > a:focus {
|
||||
color: #ffffff;
|
||||
background-color: #3276b1;
|
||||
}
|
||||
.navbar-default .navbar-nav > .open > a,
|
||||
.navbar-default .navbar-nav > .open > a:hover,
|
||||
.navbar-default .navbar-nav > .open > a:focus {
|
||||
color: #ffffff;
|
||||
background-color: #3276b1;
|
||||
}
|
||||
.navbar-default .navbar-nav > .dropdown > a .caret {
|
||||
border-top-color: #ecf0f1;
|
||||
border-bottom-color: #ecf0f1;
|
||||
}
|
||||
.navbar-default .navbar-nav > .dropdown > a:hover .caret,
|
||||
.navbar-default .navbar-nav > .dropdown > a:focus .caret {
|
||||
border-top-color: #ffffff;
|
||||
border-bottom-color: #ffffff;
|
||||
}
|
||||
.navbar-default .navbar-nav > .open > a .caret,
|
||||
.navbar-default .navbar-nav > .open > a:hover .caret,
|
||||
.navbar-default .navbar-nav > .open > a:focus .caret {
|
||||
border-top-color: #ffffff;
|
||||
border-bottom-color: #ffffff;
|
||||
}
|
||||
.navbar-default .navbar-toggle {
|
||||
border-color: #3276b1;
|
||||
}
|
||||
.navbar-default .navbar-toggle:hover,
|
||||
.navbar-default .navbar-toggle:focus {
|
||||
background-color: #3276b1;
|
||||
}
|
||||
.navbar-default .navbar-toggle .icon-bar {
|
||||
background-color: #ecf0f1;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.navbar-default .navbar-nav .open .dropdown-menu > li > a {
|
||||
color: #ecf0f1;
|
||||
}
|
||||
.navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
|
||||
.navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
@ -104,6 +104,14 @@ function generatePDF(invoice) {
|
||||
doc.text(headerLeft, headerY, 'Invoice Date');
|
||||
doc.text(issuedOnX, headerY, issuedOn);
|
||||
|
||||
/*
|
||||
if (invoice.due_date) {
|
||||
headerY += rowHeight;
|
||||
doc.text(headerLeft, headerY, 'Due Date');
|
||||
doc.text(poNumberX, headerY, invoice.po_number);
|
||||
}
|
||||
*/
|
||||
|
||||
headerY += rowHeight;
|
||||
doc.setFontType("bold");
|
||||
doc.text(headerLeft, headerY, 'Amount Due');
|
||||
@ -198,8 +206,8 @@ function generatePDF(invoice) {
|
||||
doc.lines([[0,0],[headerRight-tableLeft+5,0]],tableLeft - 8, x);
|
||||
|
||||
|
||||
doc.text(tableLeft, x+16, invoice.terms);
|
||||
doc.text(tableLeft, x+16 + (doc.splitTextToSize(invoice.terms, 340).length * rowHeight), invoice.public_notes);
|
||||
doc.text(tableLeft, x+16, invoice.public_notes);
|
||||
doc.text(tableLeft, x+16 + (doc.splitTextToSize(invoice.public_notes, 340).length * rowHeight) + (rowHeight/2), invoice.terms);
|
||||
|
||||
x += 16;
|
||||
doc.text(footerLeft, x, 'Subtotal');
|
||||
@ -669,12 +677,12 @@ ko.bindingHandlers.datePicker = {
|
||||
init: function (element, valueAccessor, allBindingsAccessor) {
|
||||
var value = ko.utils.unwrapObservable(valueAccessor());
|
||||
if (value) $(element).datepicker('update', value);
|
||||
console.log("datePicker-init: %s", value);
|
||||
//console.log("datePicker-init: %s", value);
|
||||
},
|
||||
update: function (element, valueAccessor) {
|
||||
var value = ko.utils.unwrapObservable(valueAccessor());
|
||||
if (value) $(element).datepicker('update', value);
|
||||
console.log("datePicker-init: %s", value);
|
||||
//console.log("datePicker-init: %s", value);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user