1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Bug fixes

This commit is contained in:
Hillel Coren 2014-05-01 22:54:02 +03:00
parent 6912b04063
commit 0208ea1e75
4 changed files with 16 additions and 7 deletions

View File

@ -141,6 +141,11 @@ class Invoice extends EntityModel
return false;
}
if ($this->end_date && strtotime($this->end_date) < strtotime('now'))
{
return false;
}
$dayOfWeekToday = date('w');
$dayOfWeekStart = date('w', strtotime($this->start_date));

View File

@ -504,7 +504,7 @@
refreshPDF();
}); //.trigger('change');
$('#terms, #public_notes, #invoice_number, #invoice_date, #due_date, #po_number, #discount, #currency_id, #invoice_design_id').change(function() {
$('#terms, #public_notes, #invoice_number, #invoice_date, #due_date, #po_number, #discount, #currency_id, #invoice_design_id, #recurring').change(function() {
refreshPDF();
});

View File

@ -37054,9 +37054,11 @@ function displayInvoiceItems(doc, invoice, layout) {
shownItem = true;
// process date variables
notes = processVariables(notes);
productKey = processVariables(productKey);
if (invoice.is_recurring) {
notes = processVariables(notes);
productKey = processVariables(productKey);
}
var lineTotal = NINJA.parseFloat(item.cost) * NINJA.parseFloat(item.qty);
if (tax) {
lineTotal += lineTotal * tax / 100;

View File

@ -1587,9 +1587,11 @@ function displayInvoiceItems(doc, invoice, layout) {
shownItem = true;
// process date variables
notes = processVariables(notes);
productKey = processVariables(productKey);
if (invoice.is_recurring) {
notes = processVariables(notes);
productKey = processVariables(productKey);
}
var lineTotal = NINJA.parseFloat(item.cost) * NINJA.parseFloat(item.qty);
if (tax) {
lineTotal += lineTotal * tax / 100;