Minor bug fixes

This commit is contained in:
Hillel Coren 2014-12-07 10:47:58 +02:00
parent dcc852eafa
commit b6d6758169
6 changed files with 36 additions and 10 deletions

View File

@ -57,6 +57,11 @@ class SendRecurringInvoices extends Command {
$invoice->tax_name = $recurInvoice->tax_name; $invoice->tax_name = $recurInvoice->tax_name;
$invoice->tax_rate = $recurInvoice->tax_rate; $invoice->tax_rate = $recurInvoice->tax_rate;
$invoice->invoice_design_id = $recurInvoice->invoice_design_id; $invoice->invoice_design_id = $recurInvoice->invoice_design_id;
$invoice->custom_value1 = $recurInvoice->custom_value1;
$invoice->custom_value2 = $recurInvoice->custom_value2;
$invoice->custom_taxes1 = $recurInvoice->custom_taxes1;
$invoice->custom_taxes2 = $recurInvoice->custom_taxes2;
$invoice->is_amount_discount = $recurInvoice->is_amount_discount;
if ($invoice->client->payment_terms) if ($invoice->client->payment_terms)
{ {

View File

@ -878,7 +878,7 @@ class AccountController extends \BaseController {
} }
else else
{ {
//$this->accountRepo->registerUser($user); $this->accountRepo->registerUser($user);
} }
$activities = Activity::scope()->get(); $activities = Activity::scope()->get();

View File

@ -99,7 +99,7 @@ class AppController extends BaseController {
$user->amend(); $user->amend();
//Auth::login($user, true); //Auth::login($user, true);
//$this->accountRepo->registerUser($user); $this->accountRepo->registerUser($user);
return Redirect::to('/invoices/create'); return Redirect::to('/invoices/create');
} }

View File

@ -310,6 +310,17 @@ class InvoiceController extends \BaseController {
private static function getViewModel() private static function getViewModel()
{ {
$recurringHelp = '';
foreach(preg_split("/((\r?\n)|(\r\n?))/", trans('texts.recurring_help')) as $line){
$parts = explode("=>", $line);
if (count($parts) > 1) {
$line = $parts[0] . ' => ' . Utils::processVariables($parts[0]);
$recurringHelp .= '<li>' . strip_tags($line) . '</li>';
} else {
$recurringHelp .= $line;
}
}
return [ return [
'account' => Auth::user()->account, 'account' => Auth::user()->account,
'products' => Product::scope()->orderBy('id')->get(array('product_key','notes','cost','qty')), 'products' => Product::scope()->orderBy('id')->get(array('product_key','notes','cost','qty')),
@ -330,7 +341,8 @@ class InvoiceController extends \BaseController {
5 => 'Three months', 5 => 'Three months',
6 => 'Six months', 6 => 'Six months',
7 => 'Annually' 7 => 'Annually'
) ),
'recurringHelp' => $recurringHelp
]; ];
} }
@ -490,7 +502,7 @@ class InvoiceController extends \BaseController {
public function bulk($entityType = ENTITY_INVOICE) public function bulk($entityType = ENTITY_INVOICE)
{ {
$action = Input::get('action'); $action = Input::get('action');
$statusId = Input::get('statusId'); $statusId = Input::get('statusId', INVOICE_STATUS_SENT);
$ids = Input::get('id') ? Input::get('id') : Input::get('ids'); $ids = Input::get('id') ? Input::get('id') : Input::get('ids');
$count = $this->invoiceRepo->bulk($ids, $action, $statusId); $count = $this->invoiceRepo->bulk($ids, $action, $statusId);

View File

@ -257,7 +257,7 @@ define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET);
define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}'); define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}');
define('NINJA_WEB_URL', 'https://www.invoiceninja.com'); define('NINJA_WEB_URL', 'https://www.invoiceninja.com');
define('NINJA_APP_URL', 'https://app.invoiceninja.com'); define('NINJA_APP_URL', 'https://app.invoiceninja.com');
define('NINJA_VERSION', '1.5.2'); define('NINJA_VERSION', '1.6.0');
define('NINJA_DATE', '2000-01-01'); define('NINJA_DATE', '2000-01-01');
define('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com'); define('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com');
define('RELEASES_URL', 'https://github.com/hillelcoren/invoice-ninja/releases/'); define('RELEASES_URL', 'https://github.com/hillelcoren/invoice-ninja/releases/');

View File

@ -303,6 +303,11 @@
@endif @endif
@endif @endif
@if ($invoice->invoice_status_id < INVOICE_STATUS_SENT)
<li class="divider"></li>
<li><a href="javascript:onMarkClick()">{{ trans("texts.mark_sent") }}</a></li>
@endif
<li class="divider"></li> <li class="divider"></li>
<li><a href="javascript:onArchiveClick()">{{ trans("texts.archive_{$entityType}") }}</a></li> <li><a href="javascript:onArchiveClick()">{{ trans("texts.archive_{$entityType}") }}</a></li>
<li><a href="javascript:onDeleteClick()">{{ trans("texts.delete_{$entityType}") }}</a></li> <li><a href="javascript:onDeleteClick()">{{ trans("texts.delete_{$entityType}") }}</a></li>
@ -487,7 +492,7 @@
</div> </div>
<div style="background-color: #fff; padding-left: 16px; padding-right: 16px"> <div style="background-color: #fff; padding-left: 16px; padding-right: 16px">
&nbsp; {{ trans('texts.recurring_help') }} &nbsp; &nbsp; {{ $recurringHelp }} &nbsp;
</div> </div>
<div class="modal-footer" style="margin-top: 0px"> <div class="modal-footer" style="margin-top: 0px">
@ -741,6 +746,10 @@
return (isValid && sendTo) return (isValid && sendTo)
} }
function onMarkClick() {
submitAction('mark');
}
function onCloneClick() { function onCloneClick() {
submitAction('clone'); submitAction('clone');
} }
@ -1187,7 +1196,7 @@
this.totals.paidToDate = ko.computed(function() { this.totals.paidToDate = ko.computed(function() {
var total = self.totals.rawPaidToDate(); var total = self.totals.rawPaidToDate();
return total > 0 ? formatMoney(total, self.client().currency_id()) : ''; return formatMoney(total, self.client().currency_id());
}); });
this.totals.total = ko.computed(function() { this.totals.total = ko.computed(function() {
@ -1231,7 +1240,7 @@
total -= paid; total -= paid;
} }
return total != 0 ? formatMoney(total, self.client().currency_id()) : ''; return formatMoney(total, self.client().currency_id());
}); });
self.onDragged = function(item) { self.onDragged = function(item) {
@ -1243,8 +1252,8 @@
var self = this; var self = this;
self.public_id = ko.observable(0); self.public_id = ko.observable(0);
self.name = ko.observable(''); self.name = ko.observable('');
self.id_number = ko.observable(''); self.id_number = ko.observable('');
self.vat_number = ko.observable(''); self.vat_number = ko.observable('');
self.work_phone = ko.observable(''); self.work_phone = ko.observable('');
self.custom_value1 = ko.observable(''); self.custom_value1 = ko.observable('');
self.custom_value2 = ko.observable(''); self.custom_value2 = ko.observable('');