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
394efccea8
commit
420de05ebc
@ -327,7 +327,7 @@ class InvoiceController extends BaseController
|
||||
if ($invitation->contact_id == $contact->id) {
|
||||
$contact->email_error = $invitation->email_error;
|
||||
$contact->invitation_link = $invitation->getLink();
|
||||
$contact->invitation_viewed = $invitation->viewed_date;
|
||||
$contact->invitation_viewed = $invitation->viewed_date && $invitation->viewed_date != '0000-00-00 00:00:00' ? $invitation->viewed_date : false;
|
||||
$contact->invitation_status = $contact->email_error ? false : $invitation->getStatus();
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ class Invitation extends EntityModel
|
||||
foreach ($statuses as $status) {
|
||||
$field = "{$status}_date";
|
||||
$date = '';
|
||||
if ($this->$field) {
|
||||
if ($this->$field && $this->field != '0000-00-00 00:00:00') {
|
||||
$date = Utils::dateToString($this->$field);
|
||||
$hasValue = true;
|
||||
}
|
||||
|
@ -230,10 +230,10 @@ class Invoice extends EntityModel
|
||||
return false;
|
||||
}
|
||||
|
||||
$startDate = $this->last_sent_date ?: $this->start_date;
|
||||
$startDate = $this->last_sent_date ?: $this->getOriginal('start_date');
|
||||
$startDate .= ' ' . DEFAULT_SEND_RECURRING_HOUR . ':00:00';
|
||||
$startDate = $this->account->getDateTime($startDate);
|
||||
$endDate = $this->end_date ? $this->account->getDateTime($this->end_date) : null;
|
||||
$endDate = $this->end_date ? $this->account->getDateTime($this->getOriginal('end_date')) : null;
|
||||
$timezone = $this->account->getTimezone();
|
||||
|
||||
$rule = $this->getRecurrenceRule();
|
||||
@ -257,7 +257,7 @@ class Invoice extends EntityModel
|
||||
public function getNextSendDate()
|
||||
{
|
||||
if ($this->start_date && !$this->last_sent_date) {
|
||||
$startDate = $this->start_date . ' ' . DEFAULT_SEND_RECURRING_HOUR . ':00:00';
|
||||
$startDate = $this->getOriginal('start_date') . ' ' . DEFAULT_SEND_RECURRING_HOUR . ':00:00';
|
||||
return $this->account->getDateTime($startDate);
|
||||
}
|
||||
|
||||
|
@ -119,9 +119,9 @@
|
||||
'<span class="glyphicon glyphicon-info-sign" style="padding-left:10px;color:#B1B5BA"></span></span>']) !!}
|
||||
@endif
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" id="col_2">
|
||||
|
Loading…
Reference in New Issue
Block a user