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

Bug fixes

This commit is contained in:
Hillel Coren 2015-12-17 10:19:56 +02:00
parent 4dc7a8d5f1
commit 372ffb0ea9
10 changed files with 32 additions and 14 deletions

View File

@ -334,7 +334,7 @@ if (!defined('CONTACT_EMAIL')) {
define('MAX_SUBDOMAIN_LENGTH', 30);
define('MAX_IFRAME_URL_LENGTH', 250);
define('MAX_LOGO_FILE_SIZE', 200); // KB
define('MAX_FAILED_LOGINS', 5);
define('MAX_FAILED_LOGINS', 10);
define('DEFAULT_FONT_SIZE', 9);
define('DEFAULT_SEND_RECURRING_HOUR', 8);

View File

@ -684,7 +684,7 @@ class Utils
public static function isEmpty($value)
{
return !$value || $value == '0.00' || $value == '0,00';
return !$value || $value == '0' || $value == '0.00' || $value == '0,00';
}
public static function startsWith($haystack, $needle)

View File

@ -81,7 +81,7 @@ class TaskRepository
} else {
$timeLog = [];
}
array_multisort($timeLog);
if (isset($data['action'])) {

View File

@ -45,7 +45,7 @@ class InvoiceTransformer extends EntityTransformer
'po_number' => $invoice->po_number,
'invoice_date' => $invoice->invoice_date,
'due_date' => $invoice->due_date,
'terms' => $invoice->terms,
'invoice_terms' => $invoice->terms,
'public_notes' => $invoice->public_notes,
'is_deleted' => (bool) $invoice->is_deleted,
'is_recurring' => (bool) $invoice->is_recurring,

View File

@ -21,6 +21,7 @@ class QuoteTransformer extends EntityTransformer
'id' => (int) $invoice->public_id,
'quote_number' => $invoice->invoice_number,
'amount' => (float) $invoice->amount,
'quote_terms' => $invoice->terms,
];
}
}

View File

@ -34,7 +34,7 @@ class ImportService
public static $sources = [
IMPORT_CSV,
IMPORT_FRESHBOOKS,
IMPORT_HARVEST,
//IMPORT_HARVEST,
IMPORT_HIVEAGE,
IMPORT_INVOICEABLE,
IMPORT_NUTCACHE,

View File

@ -30968,7 +30968,7 @@ function GetPdfMake(invoice, javascript, callback) {
dd.footer[1].columns[0].stack.push({image: logoImages.imageLogo3, alignment: 'left', width: 130, margin: [40, 6, 0, 0]});
}
}
/*
var fonts = {
Roboto: {
@ -31179,7 +31179,7 @@ NINJA.invoiceLines = function(invoice) {
}
// show at most one blank line
if (shownItem && (!cost || cost == '0.00' || cost == '0,00') && !notes && !productKey) {
if (shownItem && !notes && !productKey && (!cost || cost == '0' || cost == '0.00' || cost == '0,00')) {
continue;
}

View File

@ -89,7 +89,7 @@ function GetPdfMake(invoice, javascript, callback) {
dd.footer[1].columns[0].stack.push({image: logoImages.imageLogo3, alignment: 'left', width: 130, margin: [40, 6, 0, 0]});
}
}
/*
var fonts = {
Roboto: {
@ -300,7 +300,7 @@ NINJA.invoiceLines = function(invoice) {
}
// show at most one blank line
if (shownItem && (!cost || cost == '0.00' || cost == '0,00') && !notes && !productKey) {
if (shownItem && !notes && !productKey && (!cost || cost == '0' || cost == '0.00' || cost == '0,00')) {
continue;
}

View File

@ -862,10 +862,10 @@
@if (!$invoice->id)
if (!invoice.terms) {
invoice.terms = wordWrapText('{!! str_replace(["\r\n","\r","\n"], '\n', addslashes($account->{"{$entityType}_terms"})) !!}', 300);
invoice.terms = account['{{ $entityType }}_terms'];
}
if (!invoice.invoice_footer) {
invoice.invoice_footer = wordWrapText('{!! str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_footer)) !!}', 600);
invoice.invoice_footer = account['invoice_footer'];
}
@endif

View File

@ -138,7 +138,7 @@
->large()
->dropup() !!}
@else
{!! Button::success(trans('texts.save'))->large()->appendIcon(Icon::create('floppy-disk'))->withAttributes(['id' => 'save-button', 'style' => 'display:none']) !!}
{!! Button::success(trans('texts.save'))->large()->appendIcon(Icon::create('floppy-disk'))->withAttributes(['id' => 'save-button']) !!}
{!! Button::success(trans('texts.start'))->large()->appendIcon(Icon::create('play'))->withAttributes(['id' => 'start-button']) !!}
@endif
@endif
@ -348,6 +348,11 @@
self.refresh();
}
self.removeItems = function() {
self.time_log.removeAll();
self.refresh();
}
self.refresh = function() {
var hasEmpty = false;
var lastTime = 0;
@ -416,10 +421,22 @@
} else {
$('#datetime-details').fadeIn();
}
$('#start-button').toggle();
$('#save-button').toggle();
setButtonsVisible();
})
function setButtonsVisible() {
//model.removeItems();
var val = $('input[name=task_type]:checked').val();
if (val == 'timer') {
$('#start-button').show();
$('#save-button').hide();
} else {
$('#start-button').hide();
$('#save-button').show();
}
}
setButtonsVisible();
$('#start-button').click(function() {
submitAction('start');
});