1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Bug fixes

This commit is contained in:
Hillel Coren 2015-10-18 13:37:04 +03:00
parent 394efccea8
commit 420de05ebc
4 changed files with 6 additions and 6 deletions

View File

@ -327,7 +327,7 @@ class InvoiceController extends BaseController
if ($invitation->contact_id == $contact->id) { if ($invitation->contact_id == $contact->id) {
$contact->email_error = $invitation->email_error; $contact->email_error = $invitation->email_error;
$contact->invitation_link = $invitation->getLink(); $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(); $contact->invitation_status = $contact->email_error ? false : $invitation->getStatus();
} }
} }

View File

@ -57,7 +57,7 @@ class Invitation extends EntityModel
foreach ($statuses as $status) { foreach ($statuses as $status) {
$field = "{$status}_date"; $field = "{$status}_date";
$date = ''; $date = '';
if ($this->$field) { if ($this->$field && $this->field != '0000-00-00 00:00:00') {
$date = Utils::dateToString($this->$field); $date = Utils::dateToString($this->$field);
$hasValue = true; $hasValue = true;
} }

View File

@ -230,10 +230,10 @@ class Invoice extends EntityModel
return false; 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 .= ' ' . DEFAULT_SEND_RECURRING_HOUR . ':00:00';
$startDate = $this->account->getDateTime($startDate); $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(); $timezone = $this->account->getTimezone();
$rule = $this->getRecurrenceRule(); $rule = $this->getRecurrenceRule();
@ -257,7 +257,7 @@ class Invoice extends EntityModel
public function getNextSendDate() public function getNextSendDate()
{ {
if ($this->start_date && !$this->last_sent_date) { 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); return $this->account->getDateTime($startDate);
} }

View File

@ -119,9 +119,9 @@
'<span class="glyphicon glyphicon-info-sign" style="padding-left:10px;color:#B1B5BA"></span></span>']) !!} '<span class="glyphicon glyphicon-info-sign" style="padding-left:10px;color:#B1B5BA"></span></span>']) !!}
@endif @endif
@endif @endif
@endif
</div> </div>
</div> </div>
@endif
</div> </div>
<div class="col-md-4" id="col_2"> <div class="col-md-4" id="col_2">