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
9cec0dc33d
commit
703d61a22b
@ -29,7 +29,6 @@ class SendRecurringInvoices extends Command {
|
||||
|
||||
foreach ($invoices as $recurInvoice)
|
||||
{
|
||||
$this->info($recurInvoice->invoice_date);
|
||||
$this->info('Processing Invoice ' . $recurInvoice->id . ' - Should send ' . ($recurInvoice->shouldSendToday() ? 'YES' : 'NO'));
|
||||
|
||||
if (!$recurInvoice->shouldSendToday())
|
||||
|
@ -26,7 +26,7 @@ return array(
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => 'http://localhost',
|
||||
'url' => 'http://www.invoiceninja.com',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -136,6 +136,9 @@ class InvoiceController extends \BaseController {
|
||||
|
||||
$client->account->loadLocalizationSettings();
|
||||
|
||||
$invoice->invoice_date = Utils::fromSqlDate($invoice->invoice_date);
|
||||
$invoice->due_date = Utils::fromSqlDate($invoice->due_date);
|
||||
|
||||
$data = array(
|
||||
'invoice' => $invoice->hidePrivateFields(),
|
||||
'invitation' => $invitation
|
||||
@ -289,7 +292,12 @@ class InvoiceController extends \BaseController {
|
||||
{
|
||||
$invoice = Invoice::scope($publicId)->with('account.country', 'client.contacts', 'client.country', '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)
|
||||
|
@ -36,27 +36,7 @@ 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;
|
||||
@ -89,9 +69,6 @@ class Invoice extends EntityModel
|
||||
|
||||
public function shouldSendToday()
|
||||
{
|
||||
//$dayOfWeekStart = strtotime($this->start_date);
|
||||
return false;
|
||||
|
||||
$dayOfWeekToday = date('w');
|
||||
$dayOfWeekStart = date('w', strtotime($this->start_date));
|
||||
|
||||
|
@ -27,9 +27,7 @@ class ContactMailer extends Mailer {
|
||||
$invitation->save();
|
||||
|
||||
$data = array('link' => URL::to('view') . '/' . $invitation->invitation_key);
|
||||
|
||||
$this->sendTo($invitation->contact->email, $invitation->user->email, $subject, $view, $data);
|
||||
//$this->sendTo($invitation->contact->email, $subject, $view, $data);
|
||||
|
||||
Activity::emailInvoice($invitation);
|
||||
}
|
||||
|
@ -11,6 +11,8 @@
|
||||
|
|
||||
*/
|
||||
|
||||
//apc_clear_cache();
|
||||
|
||||
//dd(DB::getQueryLog());
|
||||
//dd(Client::getPrivateId(1));
|
||||
//dd(new DateTime());
|
||||
|
Loading…
x
Reference in New Issue
Block a user