forked from Kispi/Core
feat(webapp): remove cents as this is impossbile with this currency
This commit is contained in:
parent
cc043acad5
commit
f172a2c338
2 changed files with 16 additions and 16 deletions
|
@ -1,12 +1,12 @@
|
||||||
export class CurrencyService {
|
export class CurrencyService {
|
||||||
public static toString(value: number): string {
|
public static toString(value: number): string {
|
||||||
return `${(value / 100).toLocaleString('de-DE', {
|
return `${value.toLocaleString('de-DE', {
|
||||||
minimumFractionDigits: 2,
|
minimumFractionDigits: 2,
|
||||||
maximumFractionDigits: 2,
|
maximumFractionDigits: 2,
|
||||||
})} Öro`;
|
})} Öro`;
|
||||||
}
|
}
|
||||||
public static toSignedString(value: number): string {
|
public static toSignedString(value: number): string {
|
||||||
return `${value > 0 ? '+' : ''}${(value / 100).toLocaleString('de', {
|
return `${value > 0 ? '+' : ''}${value.toLocaleString('de', {
|
||||||
minimumFractionDigits: 2,
|
minimumFractionDigits: 2,
|
||||||
maximumFractionDigits: 2,
|
maximumFractionDigits: 2,
|
||||||
})} Öro`;
|
})} Öro`;
|
||||||
|
|
|
@ -66,72 +66,72 @@ import { onKeyStroke } from '@vueuse/core';
|
||||||
const depositModalId = 'deposit-modal';
|
const depositModalId = 'deposit-modal';
|
||||||
const salaryModalId = 'salary-modal';
|
const salaryModalId = 'salary-modal';
|
||||||
const withdrawModalId = 'withdraw-modal';
|
const withdrawModalId = 'withdraw-modal';
|
||||||
const balance = 13500;
|
const balance = 135;
|
||||||
const transactions: ITransaction[] = [
|
const transactions: ITransaction[] = [
|
||||||
{
|
{
|
||||||
type: 'Kontoeröffnung',
|
type: 'Kontoeröffnung',
|
||||||
date: new Date(2022, 7, 12, 17, 30, 0),
|
date: new Date(2022, 7, 12, 17, 30, 0),
|
||||||
amount: 500,
|
amount: 5,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'Bargeldeinzahlung',
|
type: 'Bargeldeinzahlung',
|
||||||
date: new Date(2022, 7, 12, 17, 30, 10),
|
date: new Date(2022, 7, 12, 17, 30, 10),
|
||||||
amount: 10000,
|
amount: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'Gehalt',
|
type: 'Gehalt',
|
||||||
date: new Date(2022, 7, 12, 17, 34, 10),
|
date: new Date(2022, 7, 12, 17, 34, 10),
|
||||||
amount: 5000,
|
amount: 50,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'Gehalt',
|
type: 'Gehalt',
|
||||||
date: new Date(2022, 7, 12, 17, 34, 10),
|
date: new Date(2022, 7, 12, 17, 34, 10),
|
||||||
amount: 5000,
|
amount: 50,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'Gehalt',
|
type: 'Gehalt',
|
||||||
date: new Date(2022, 7, 12, 17, 34, 10),
|
date: new Date(2022, 7, 12, 17, 34, 10),
|
||||||
amount: 5000,
|
amount: 50,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'Gehalt',
|
type: 'Gehalt',
|
||||||
date: new Date(2022, 7, 12, 17, 34, 10),
|
date: new Date(2022, 7, 12, 17, 34, 10),
|
||||||
amount: 5000,
|
amount: 50,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'Gehalt',
|
type: 'Gehalt',
|
||||||
date: new Date(2022, 7, 12, 17, 34, 10),
|
date: new Date(2022, 7, 12, 17, 34, 10),
|
||||||
amount: 5000,
|
amount: 50,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'Gehalt',
|
type: 'Gehalt',
|
||||||
date: new Date(2022, 7, 12, 17, 34, 10),
|
date: new Date(2022, 7, 12, 17, 34, 10),
|
||||||
amount: 5000,
|
amount: 50,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'Gehalt',
|
type: 'Gehalt',
|
||||||
date: new Date(2022, 7, 12, 17, 34, 10),
|
date: new Date(2022, 7, 12, 17, 34, 10),
|
||||||
amount: 5000,
|
amount: 50,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'Gehalt',
|
type: 'Gehalt',
|
||||||
date: new Date(2022, 7, 12, 17, 34, 10),
|
date: new Date(2022, 7, 12, 17, 34, 10),
|
||||||
amount: 5000,
|
amount: 50,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'Gehalt',
|
type: 'Gehalt',
|
||||||
date: new Date(2022, 7, 12, 17, 34, 10),
|
date: new Date(2022, 7, 12, 17, 34, 10),
|
||||||
amount: 5000,
|
amount: 50,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'Gehalt',
|
type: 'Gehalt',
|
||||||
date: new Date(2022, 7, 12, 17, 34, 10),
|
date: new Date(2022, 7, 12, 17, 34, 10),
|
||||||
amount: 5000,
|
amount: 50,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'Bargeldauszahlung',
|
type: 'Bargeldauszahlung',
|
||||||
date: new Date(2022, 7, 15, 18, 26, 0),
|
date: new Date(2022, 7, 15, 18, 26, 0),
|
||||||
amount: -2000,
|
amount: -20,
|
||||||
},
|
},
|
||||||
].sort((a, b) => b.date.getTime() - a.date.getTime());
|
].sort((a, b) => b.date.getTime() - a.date.getTime());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue