mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-18 00:53:10 +01:00
bug fixes
This commit is contained in:
parent
ea92b116d2
commit
cd2c8147c1
@ -47,7 +47,7 @@ class Activity extends Eloquent
|
|||||||
$activity->user_id = $entity->user_id;
|
$activity->user_id = $entity->user_id;
|
||||||
$activity->account_id = $entity->account_id;
|
$activity->account_id = $entity->account_id;
|
||||||
}
|
}
|
||||||
else if (Auth::check())
|
else if (Auth::check())
|
||||||
{
|
{
|
||||||
$activity->user_id = Auth::user()->id;
|
$activity->user_id = Auth::user()->id;
|
||||||
$activity->account_id = Auth::user()->account_id;
|
$activity->account_id = Auth::user()->account_id;
|
||||||
@ -257,18 +257,18 @@ class Activity extends Eloquent
|
|||||||
$client->paid_to_date = $client->paid_to_date + $payment->amount;
|
$client->paid_to_date = $client->paid_to_date + $payment->amount;
|
||||||
$client->save();
|
$client->save();
|
||||||
|
|
||||||
if (Auth::check())
|
if ($payment->contact_id)
|
||||||
{
|
|
||||||
$activity = Activity::getBlank();
|
|
||||||
$message = $payment->payment_type_id == PAYMENT_TYPE_CREDIT ? 'applied credit' : 'entered payment';
|
|
||||||
$activity->message = Utils::encodeActivity(Auth::user(), $message);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
$activity = new Activity;
|
$activity = new Activity;
|
||||||
$activity->contact_id = $payment->contact_id;
|
$activity->contact_id = $payment->contact_id;
|
||||||
$activity->message = Utils::encodeActivity($payment->invitation->contact, 'entered payment');
|
$activity->message = Utils::encodeActivity($payment->invitation->contact, 'entered payment');
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$activity = Activity::getBlank();
|
||||||
|
$message = $payment->payment_type_id == PAYMENT_TYPE_CREDIT ? 'applied credit' : 'entered payment';
|
||||||
|
$activity->message = Utils::encodeActivity(Auth::user(), $message);
|
||||||
|
}
|
||||||
|
|
||||||
$activity->payment_id = $payment->id;
|
$activity->payment_id = $payment->id;
|
||||||
|
|
||||||
|
@ -217,7 +217,8 @@ define('DEFAULT_DATETIME_FORMAT', 'F j, Y, g:i a');
|
|||||||
define('DEFAULT_QUERY_CACHE', 120);
|
define('DEFAULT_QUERY_CACHE', 120);
|
||||||
|
|
||||||
|
|
||||||
if (Auth::check() && !Session::has(SESSION_TIMEZONE)) {
|
if (Auth::check() && !Session::has(SESSION_TIMEZONE))
|
||||||
|
{
|
||||||
Event::fire('user.refresh');
|
Event::fire('user.refresh');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@
|
|||||||
<tbody data-bind="sortable: { data: invoice_items, afterMove: onDragged }">
|
<tbody data-bind="sortable: { data: invoice_items, afterMove: onDragged }">
|
||||||
<tr data-bind="event: { mouseover: showActions, mouseout: hideActions }" class="sortable-row">
|
<tr data-bind="event: { mouseover: showActions, mouseout: hideActions }" class="sortable-row">
|
||||||
<td style="min-width:20px;" class="hide-border td-icon">
|
<td style="min-width:20px;" class="hide-border td-icon">
|
||||||
<i data-bind="visible: actionsVisible() && $parent.invoice_items().length > 1" class="fa fa-sort"></i>
|
<i style="display:none" data-bind="visible: actionsVisible() && $parent.invoice_items().length > 1" class="fa fa-sort"></i>
|
||||||
</td>
|
</td>
|
||||||
<td style="min-width:160px">
|
<td style="min-width:160px">
|
||||||
{{ Former::text('product_key')->useDatalist(Product::getProductKeys($products), 'key')->onkeyup('onItemChange()')
|
{{ Former::text('product_key')->useDatalist(Product::getProductKeys($products), 'key')->onkeyup('onItemChange()')
|
||||||
@ -128,13 +128,13 @@
|
|||||||
<td style="min-width:120px">
|
<td style="min-width:120px">
|
||||||
<input onkeyup="onItemChange()" data-bind="value: prettyQty, valueUpdate: 'afterkeydown'" style="text-align: right" class="form-control"//>
|
<input onkeyup="onItemChange()" data-bind="value: prettyQty, valueUpdate: 'afterkeydown'" style="text-align: right" class="form-control"//>
|
||||||
</td>
|
</td>
|
||||||
<td style="min-width:120px; vertical-align:middle" data-bind="visible: $root.invoice_item_taxes.show">
|
<td style="display:none" style="min-width:120px; vertical-align:middle" data-bind="visible: $root.invoice_item_taxes.show">
|
||||||
<select class="form-control" style="width:100%" data-bind="value: tax, options: $root.tax_rates, optionsText: 'displayName'"></select>
|
<select class="form-control" style="width:100%" data-bind="value: tax, options: $root.tax_rates, optionsText: 'displayName'"></select>
|
||||||
</td>
|
</td>
|
||||||
<td style="min-width:120px;text-align: right;padding-top:9px !important">
|
<td style="min-width:120px;text-align: right;padding-top:9px !important">
|
||||||
<span data-bind="text: totals.total"></span>
|
<span data-bind="text: totals.total"></span>
|
||||||
</td>
|
</td>
|
||||||
<td style="min-width:20px; cursor:pointer" class="hide-border td-icon">
|
<td style="display:none" style="min-width:20px; cursor:pointer" class="hide-border td-icon">
|
||||||
<i data-bind="click: $parent.removeItem, visible: actionsVisible() && $parent.invoice_items().length > 1" class="fa fa-minus-circle" title="Remove item"/>
|
<i data-bind="click: $parent.removeItem, visible: actionsVisible() && $parent.invoice_items().length > 1" class="fa fa-minus-circle" title="Remove item"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -157,17 +157,17 @@
|
|||||||
<td colspan="2">Subtotal</td>
|
<td colspan="2">Subtotal</td>
|
||||||
<td style="text-align: right"><span data-bind="text: totals.subtotal"/></td>
|
<td style="text-align: right"><span data-bind="text: totals.subtotal"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr data-bind="visible: discount() > 0">
|
<tr style="display:none" data-bind="visible: discount() > 0">
|
||||||
<td class="hide-border" colspan="3"/>
|
<td class="hide-border" colspan="3"/>
|
||||||
<td class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
<td class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
||||||
<td colspan="2">Discount</td>
|
<td colspan="2">Discount</td>
|
||||||
<td style="text-align: right"><span data-bind="text: totals.discounted"/></td>
|
<td style="text-align: right"><span data-bind="text: totals.discounted"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr data-bind="visible: $root.invoice_taxes.show">
|
<tr style="display:none" data-bind="visible: $root.invoice_taxes.show">
|
||||||
<td class="hide-border" colspan="3"/>
|
<td class="hide-border" colspan="3"/>
|
||||||
<td class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
<td class="hide-border" data-bind="visible: $root.invoice_item_taxes.show"/>
|
||||||
<td style="vertical-align: middle">Tax</td>
|
<td style="vertical-align: middle">Tax</td>
|
||||||
<td><select class="form-control" style="width:100%" data-bind="value: tax, options: $root.tax_rates, optionsText: 'displayName'"></select></td>
|
<td style="min-width:120px"><select class="form-control" style="width:100%" data-bind="value: tax, options: $root.tax_rates, optionsText: 'displayName'"></select></td>
|
||||||
<td style="vertical-align: middle; text-align: right"><span data-bind="text: totals.taxAmount"/></td>
|
<td style="vertical-align: middle; text-align: right"><span data-bind="text: totals.taxAmount"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -973,9 +973,12 @@
|
|||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
ko.mapping.fromJS(data, self.mapping, self);
|
ko.mapping.fromJS(data, self.mapping, self);
|
||||||
|
self.is_recurring(parseInt(data.is_recurring));
|
||||||
|
console.log('is rec %s', parseInt(data.is_recurring));
|
||||||
} else {
|
} else {
|
||||||
self.addItem();
|
self.addItem();
|
||||||
}
|
}
|
||||||
|
console.log('test')
|
||||||
|
|
||||||
self._tax = ko.observable();
|
self._tax = ko.observable();
|
||||||
this.tax = ko.computed({
|
this.tax = ko.computed({
|
||||||
|
@ -147,7 +147,7 @@
|
|||||||
<section class="hero2">
|
<section class="hero2">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
<h1>SIMPLE, INTUITIVE INVOICING</h1>
|
<h1>SIMPLE, INTUITIVE INVOICING.</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
@ -7,7 +7,7 @@ div.required > label {
|
|||||||
}
|
}
|
||||||
|
|
||||||
label.checkbox,
|
label.checkbox,
|
||||||
div > label.control-label {
|
label.control-label {
|
||||||
font-weight: normal !important;
|
font-weight: normal !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 4.1 KiB |
@ -294,7 +294,7 @@ function generatePDF(invoice, checkMath) {
|
|||||||
|
|
||||||
doc.setLineWidth(1);
|
doc.setLineWidth(1);
|
||||||
doc.line(tableLeft - tablePadding, x, lineTotalRight+tablePadding, x);
|
doc.line(tableLeft - tablePadding, x, lineTotalRight+tablePadding, x);
|
||||||
console.log('%s %s %s', lineTotalRight, tableLeft, (lineTotalRight-tableLeft));
|
//console.log('%s %s %s', lineTotalRight, tableLeft, (lineTotalRight-tableLeft));
|
||||||
|
|
||||||
doc.text(tableLeft, x+16, invoice.public_notes);
|
doc.text(tableLeft, x+16, invoice.public_notes);
|
||||||
if (invoice.terms) {
|
if (invoice.terms) {
|
||||||
@ -369,9 +369,6 @@ function generatePDF(invoice, checkMath) {
|
|||||||
doc.setFontType("bold");
|
doc.setFontType("bold");
|
||||||
doc.text(footerLeft, x, 'Balance Due');
|
doc.text(footerLeft, x, 'Balance Due');
|
||||||
|
|
||||||
console.log('total %s', total);
|
|
||||||
console.log('inovice.amount %s', invoice.amount);
|
|
||||||
console.log('invoice.blance %s', invoice.balance);
|
|
||||||
total = formatMoney(total - (invoice.amount - invoice.balance), currencyId);
|
total = formatMoney(total - (invoice.amount - invoice.balance), currencyId);
|
||||||
var totalX = headerRight - (doc.getStringUnitWidth(total) * doc.internal.getFontSize());
|
var totalX = headerRight - (doc.getStringUnitWidth(total) * doc.internal.getFontSize());
|
||||||
doc.text(totalX, x, total);
|
doc.text(totalX, x, total);
|
||||||
@ -872,7 +869,7 @@ function populateInvoiceComboboxes(clientId, invoiceId) {
|
|||||||
if (invoiceId) {
|
if (invoiceId) {
|
||||||
var invoice = invoiceMap[invoiceId];
|
var invoice = invoiceMap[invoiceId];
|
||||||
var client = clientMap[invoice.client.public_id];
|
var client = clientMap[invoice.client.public_id];
|
||||||
console.log(invoice);
|
//console.log(invoice);
|
||||||
setComboboxValue($('.invoice-select'), invoice.public_id, (invoice.invoice_number + ' - ' + invoice.invoice_status.name + ' - ' + getClientDisplayName(client) + ' - ' + formatMoney(invoice.amount, invoice.currency_id) + ' | ' + formatMoney(invoice.balance, invoice.currency_id)));
|
setComboboxValue($('.invoice-select'), invoice.public_id, (invoice.invoice_number + ' - ' + invoice.invoice_status.name + ' - ' + getClientDisplayName(client) + ' - ' + formatMoney(invoice.amount, invoice.currency_id) + ' | ' + formatMoney(invoice.balance, invoice.currency_id)));
|
||||||
$invoiceSelect.trigger('change');
|
$invoiceSelect.trigger('change');
|
||||||
} else if (clientId) {
|
} else if (clientId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user