mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +01:00
bug fixes
This commit is contained in:
parent
c517dc07fc
commit
94a9c42369
0
app/config/gae-development/database.php
Executable file → Normal file
0
app/config/gae-development/database.php
Executable file → Normal file
0
app/config/gae-production/cache.php
Executable file → Normal file
0
app/config/gae-production/cache.php
Executable file → Normal file
0
app/config/gae-production/database.php
Executable file → Normal file
0
app/config/gae-production/database.php
Executable file → Normal file
0
app/config/gae-production/session.php
Executable file → Normal file
0
app/config/gae-production/session.php
Executable file → Normal file
@ -301,11 +301,6 @@ class InvoiceController extends \BaseController {
|
||||
$invoice = Invoice::scope($publicId)->with('account.country', 'client.contacts', 'invoice_items')->firstOrFail();
|
||||
Utils::trackViewed($invoice->invoice_number . ' - ' . $invoice->client->getDisplayName(), ENTITY_INVOICE);
|
||||
|
||||
$invoice->invoice_date = Utils::fromSqlDate($invoice->invoice_date);
|
||||
$invoice->due_date = Utils::fromSqlDate($invoice->due_date);
|
||||
$invoice->start_date = Utils::fromSqlDate($invoice->start_date);
|
||||
$invoice->end_date = Utils::fromSqlDate($invoice->end_date);
|
||||
|
||||
$contactIds = DB::table('invitations')
|
||||
->join('contacts', 'contacts.id', '=','invitations.contact_id')
|
||||
->where('invitations.invoice_id', '=', $invoice->id)
|
||||
@ -453,6 +448,7 @@ class InvoiceController extends \BaseController {
|
||||
{
|
||||
$message = ' and created client';
|
||||
$url = URL::to('clients/' . $client->public_id);
|
||||
|
||||
Utils::trackViewed($client->getDisplayName(), ENTITY_CLIENT, $url);
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ class Client extends EntityModel
|
||||
|
||||
$contact = $this->contacts()->first();
|
||||
|
||||
return $contact->getFullName();
|
||||
return $contact->getDisplayName();
|
||||
}
|
||||
|
||||
public function getEntityType()
|
||||
|
@ -37,6 +37,26 @@ class Invoice extends EntityModel
|
||||
return ENTITY_INVOICE;
|
||||
}
|
||||
|
||||
public function getInvoiceDateAttribute($value)
|
||||
{
|
||||
return Utils::fromSqlDate($value);
|
||||
}
|
||||
|
||||
public function getDueDateAttribute($value)
|
||||
{
|
||||
return Utils::fromSqlDate($value);
|
||||
}
|
||||
|
||||
public function getStartDateAttribute($value)
|
||||
{
|
||||
return Utils::fromSqlDate($value);
|
||||
}
|
||||
|
||||
public function getEndDateAttribute($value)
|
||||
{
|
||||
return Utils::fromSqlDate($value);
|
||||
}
|
||||
|
||||
public function isSent()
|
||||
{
|
||||
return $this->invoice_status_id >= INVOICE_STATUS_SENT;
|
||||
|
@ -12,14 +12,15 @@ class ContactMailer extends Mailer {
|
||||
public function sendInvoice(Invoice $invoice)
|
||||
{
|
||||
$view = 'invoice';
|
||||
$data = array('link' => URL::to('view') . '/' . $invoice->invoice_key);
|
||||
$subject = '';
|
||||
|
||||
foreach ($invoice->invitations as $invitation)
|
||||
{
|
||||
//$invitation->date_sent =
|
||||
$invitation->sent_date = Carbon::now()->toDateTimeString();
|
||||
$invitation->save();
|
||||
|
||||
$data = array('link' => URL::to('view') . '/' . $invitation->invitation_key);
|
||||
|
||||
$this->sendTo($invitation->contact->email, $subject, $view, $data);
|
||||
|
||||
Activity::emailInvoice($invitation);
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
@section('onReady')
|
||||
$('input#first_name').focus();
|
||||
$('input#name').focus();
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
@ -383,7 +383,7 @@
|
||||
@if (Session::has('message'))
|
||||
setTimeout(function() {
|
||||
$('.alert-info').fadeOut();
|
||||
}, 5000);
|
||||
}, 3000);
|
||||
@endif
|
||||
|
||||
@yield('onReady')
|
||||
|
@ -86,7 +86,7 @@
|
||||
<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 tax rates</a>
|
||||
<a href="#" data-bind="click: $root.showTaxesForm">Manage rates</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -347,9 +347,11 @@
|
||||
|
||||
{{ Former::checkbox('invoice_taxes')->text('Enable specifying an <b>invoice tax</b>')
|
||||
->label('Settings')->data_bind('checked: $root.invoice_taxes, enable: $root.tax_rates().length > 1') }}
|
||||
{{ Former::checkbox('invoice_item_taxes')->text('Enable specifying <b>line item taxes</b>')
|
||||
{{ Former::checkbox('invoice_item_taxes')->text('Enable specifying <b>line item taxes</b>')->addOnGroupClass('no-space-bottom')
|
||||
->label(' ')->data_bind('checked: $root.invoice_item_taxes, enable: $root.tax_rates().length > 1') }}
|
||||
|
||||
<br/>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer" style="margin-top: 0px">
|
||||
@ -408,7 +410,7 @@
|
||||
@endif
|
||||
|
||||
$('#clientModal').on('shown.bs.modal', function () {
|
||||
$('#email').focus();
|
||||
$('#name').focus();
|
||||
}).on('hidden.bs.modal', function () {
|
||||
if (model.clientBackup) {
|
||||
model.loadClient(model.clientBackup);
|
||||
@ -765,7 +767,6 @@
|
||||
self.enable = {};
|
||||
self.enable.save = ko.computed(function() {
|
||||
var isValid = false;
|
||||
|
||||
for (var i=0; i<self.invoice().client().contacts().length; i++) {
|
||||
var contact = self.invoice().client().contacts()[i];
|
||||
if (isValidEmailAddress(contact.email())) {
|
||||
@ -775,6 +776,7 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return isValid ? "enabled" : "disabled";
|
||||
});
|
||||
|
||||
|
@ -21,6 +21,10 @@ div.panel {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.no-space-bottom {
|
||||
padding-bottom: 0px !important;
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
/* DataTables and BootStrap */
|
||||
.dataTables_wrapper {
|
||||
|
Loading…
Reference in New Issue
Block a user