mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:54:41 -04:00
Added Swiss Franc
This commit is contained in:
parent
ffebf2eb26
commit
c1bc3f5a3f
@ -138,6 +138,8 @@ class ConstantsSeeder extends Seeder
|
|||||||
Currency::create(array('name' => 'Norske Kroner', 'code' => 'NOK', 'symbol' => 'kr ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
Currency::create(array('name' => 'Norske Kroner', 'code' => 'NOK', 'symbol' => 'kr ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||||
Currency::create(array('name' => 'New Zealand Dollar', 'code' => 'NZD', 'symbol' => '$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
Currency::create(array('name' => 'New Zealand Dollar', 'code' => 'NZD', 'symbol' => '$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||||
Currency::create(array('name' => 'Vietnamese Dong', 'code' => 'VND', 'symbol' => 'VND ', 'precision' => '0', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
Currency::create(array('name' => 'Vietnamese Dong', 'code' => 'VND', 'symbol' => 'VND ', 'precision' => '0', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||||
|
Currency::create(array('name' => 'Swiss Franc', 'code' => 'CHF', 'symbol' => 'CHF ', 'precision' => '2', 'thousand_separator' => '\'', 'decimal_separator' => '.'));
|
||||||
|
|
||||||
|
|
||||||
DatetimeFormat::create(array('format' => 'd/M/Y g:i a', 'label' => '10/Mar/2013'));
|
DatetimeFormat::create(array('format' => 'd/M/Y g:i a', 'label' => '10/Mar/2013'));
|
||||||
DatetimeFormat::create(array('format' => 'd-M-Yk g:i a', 'label' => '10-Mar-2013'));
|
DatetimeFormat::create(array('format' => 'd-M-Yk g:i a', 'label' => '10-Mar-2013'));
|
||||||
|
@ -1201,60 +1201,60 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.totals.total = ko.computed(function() {
|
this.totals.total = ko.computed(function() {
|
||||||
var total = accounting.toFixed(self.totals.rawSubtotal(),2);
|
var total = accounting.toFixed(self.totals.rawSubtotal(),2);
|
||||||
var discount = self.totals.rawDiscounted();
|
var discount = self.totals.rawDiscounted();
|
||||||
total -= discount;
|
total -= discount;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
var discount = parseFloat(self.discount());
|
var discount = parseFloat(self.discount());
|
||||||
if (discount > 0) {
|
if (discount > 0) {
|
||||||
total = roundToTwo(total * ((100 - discount)/100));
|
total = roundToTwo(total * ((100 - discount)/100));
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var customValue1 = roundToTwo(self.custom_value1());
|
var customValue1 = roundToTwo(self.custom_value1());
|
||||||
var customValue2 = roundToTwo(self.custom_value2());
|
var customValue2 = roundToTwo(self.custom_value2());
|
||||||
var customTaxes1 = self.custom_taxes1() == 1;
|
var customTaxes1 = self.custom_taxes1() == 1;
|
||||||
var customTaxes2 = self.custom_taxes2() == 1;
|
var customTaxes2 = self.custom_taxes2() == 1;
|
||||||
|
|
||||||
if (customValue1 && customTaxes1) {
|
if (customValue1 && customTaxes1) {
|
||||||
total = NINJA.parseFloat(total) + customValue1;
|
total = NINJA.parseFloat(total) + customValue1;
|
||||||
}
|
}
|
||||||
if (customValue2 && customTaxes2) {
|
if (customValue2 && customTaxes2) {
|
||||||
total = NINJA.parseFloat(total) + customValue2;
|
total = NINJA.parseFloat(total) + customValue2;
|
||||||
}
|
}
|
||||||
|
|
||||||
var taxRate = parseFloat(self.tax_rate());
|
var taxRate = parseFloat(self.tax_rate());
|
||||||
if (taxRate > 0) {
|
if (taxRate > 0) {
|
||||||
total = NINJA.parseFloat(total) + roundToTwo((total * (taxRate/100)));
|
total = NINJA.parseFloat(total) + roundToTwo((total * (taxRate/100)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (customValue1 && !customTaxes1) {
|
if (customValue1 && !customTaxes1) {
|
||||||
total = NINJA.parseFloat(total) + customValue1;
|
total = NINJA.parseFloat(total) + customValue1;
|
||||||
}
|
}
|
||||||
if (customValue2 && !customTaxes2) {
|
if (customValue2 && !customTaxes2) {
|
||||||
total = NINJA.parseFloat(total) + customValue2;
|
total = NINJA.parseFloat(total) + customValue2;
|
||||||
}
|
}
|
||||||
|
|
||||||
var paid = self.totals.rawPaidToDate();
|
var paid = self.totals.rawPaidToDate();
|
||||||
if (paid > 0) {
|
if (paid > 0) {
|
||||||
total -= paid;
|
total -= paid;
|
||||||
}
|
}
|
||||||
|
|
||||||
return formatMoney(total, self.client().currency_id());
|
return formatMoney(total, self.client().currency_id());
|
||||||
});
|
});
|
||||||
|
|
||||||
self.onDragged = function(item) {
|
self.onDragged = function(item) {
|
||||||
refreshPDF();
|
refreshPDF();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ClientModel(data) {
|
function ClientModel(data) {
|
||||||
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('');
|
||||||
|
@ -33024,7 +33024,7 @@ function toggleDatePicker(field) {
|
|||||||
|
|
||||||
function roundToTwo(num, toString) {
|
function roundToTwo(num, toString) {
|
||||||
var val = +(Math.round(num + "e+2") + "e-2");
|
var val = +(Math.round(num + "e+2") + "e-2");
|
||||||
return toString ? val.toFixed(2) : val;
|
return toString ? val.toFixed(2) : val || 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function truncate(str, length) {
|
function truncate(str, length) {
|
||||||
|
@ -1501,7 +1501,7 @@ function toggleDatePicker(field) {
|
|||||||
|
|
||||||
function roundToTwo(num, toString) {
|
function roundToTwo(num, toString) {
|
||||||
var val = +(Math.round(num + "e+2") + "e-2");
|
var val = +(Math.round(num + "e+2") + "e-2");
|
||||||
return toString ? val.toFixed(2) : val;
|
return toString ? val.toFixed(2) : (val || 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function truncate(str, length) {
|
function truncate(str, length) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user