You've already forked openaccounting-web
mirror of
https://github.com/openaccounting/oa-web.git
synced 2025-12-09 00:51:01 +13:00
Compare commits
22 Commits
bug/api-ne
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e35200fc44 | ||
|
|
f61f59c801 | ||
|
|
8a1d62dd44 | ||
|
|
486feef2c4 | ||
|
|
2340c2f208 | ||
|
|
e4e63e1b5f | ||
|
|
ca125f2e13 | ||
|
|
3e104bfa6c | ||
|
|
9d2e7f3131 | ||
|
|
cf46c3f0fd | ||
|
|
5875dfcb65 | ||
|
|
7245741c8b | ||
|
|
1aeed8ef97 | ||
|
|
0a370adf6c | ||
|
|
37634fe970 | ||
|
|
851a43e6fc | ||
|
|
d3f8e6c3ab | ||
|
|
ab62ff7d17 | ||
|
|
096147855e | ||
|
|
cd5ddf5e63 | ||
|
|
ce1afb221d | ||
|
|
f31572737b |
2208
package-lock.json
generated
2208
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -29,7 +29,7 @@
|
|||||||
"@angular/router": "^6.1.0",
|
"@angular/router": "^6.1.0",
|
||||||
"@ng-bootstrap/ng-bootstrap": "^3.3.1",
|
"@ng-bootstrap/ng-bootstrap": "^3.3.1",
|
||||||
"@types/moment-timezone": "^0.5.12",
|
"@types/moment-timezone": "^0.5.12",
|
||||||
"bootstrap": "^4.1.3",
|
"bootstrap": "^4.3.1",
|
||||||
"core-js": "^2.5.4",
|
"core-js": "^2.5.4",
|
||||||
"moment-timezone": "^0.5.25",
|
"moment-timezone": "^0.5.25",
|
||||||
"rxjs": "~6.2.0",
|
"rxjs": "~6.2.0",
|
||||||
|
|||||||
40
src/app/shared/debit-credit.pipe.ts
Normal file
40
src/app/shared/debit-credit.pipe.ts
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
|
import { Account } from './account';
|
||||||
|
|
||||||
|
@Pipe({name: 'debitCredit'})
|
||||||
|
export class DebitCreditPipe implements PipeTransform {
|
||||||
|
debitNames: any;
|
||||||
|
creditNames: any;
|
||||||
|
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.debitNames = {
|
||||||
|
'Assets': 'Deposit',
|
||||||
|
'Liabilities': 'Payment',
|
||||||
|
'Equity': 'Decrease',
|
||||||
|
'Income': 'Deduction',
|
||||||
|
'Expenses': 'Expense'
|
||||||
|
};
|
||||||
|
|
||||||
|
this.creditNames = {
|
||||||
|
'Assets': 'Withdrawal',
|
||||||
|
'Liabilities': 'Charge',
|
||||||
|
'Equity': 'Increase',
|
||||||
|
'Income': 'Income',
|
||||||
|
'Expenses': 'Refund'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
transform(account: Account, type: string): string {
|
||||||
|
if(!account) {
|
||||||
|
return type === 'credit' ? 'Credit' : 'Debit';
|
||||||
|
}
|
||||||
|
|
||||||
|
let parent = account.fullName.split(':')[0];
|
||||||
|
if(type === 'credit') {
|
||||||
|
return this.creditNames[parent];
|
||||||
|
} else {
|
||||||
|
return this.debitNames[parent];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,11 +4,12 @@ import { CurrencyFormatPipe } from './currency-format.pipe';
|
|||||||
import { AccountNamePipe } from './account-name.pipe';
|
import { AccountNamePipe } from './account-name.pipe';
|
||||||
import { AccountBalancePipe } from './account-balance.pipe';
|
import { AccountBalancePipe } from './account-balance.pipe';
|
||||||
import { DateTzPipe } from './datetz.pipe';
|
import { DateTzPipe } from './datetz.pipe';
|
||||||
|
import { DebitCreditPipe } from './debit-credit.pipe';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [],
|
imports: [],
|
||||||
declarations: [CurrencyFormatPipe, AccountNamePipe, AccountBalancePipe, DateTzPipe],
|
declarations: [CurrencyFormatPipe, AccountNamePipe, AccountBalancePipe, DateTzPipe, DebitCreditPipe],
|
||||||
exports: [CurrencyFormatPipe, AccountNamePipe, AccountBalancePipe, DateTzPipe],
|
exports: [CurrencyFormatPipe, AccountNamePipe, AccountBalancePipe, DateTzPipe, DebitCreditPipe],
|
||||||
providers: [DecimalPipe, CurrencyFormatPipe]
|
providers: [DecimalPipe, CurrencyFormatPipe]
|
||||||
})
|
})
|
||||||
export class SharedModule { }
|
export class SharedModule { }
|
||||||
@@ -19,10 +19,10 @@
|
|||||||
<span>Transfer</span>
|
<span>Transfer</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col custom-3">
|
<div class="col custom-3">
|
||||||
<span>Debit</span>
|
<span>{{account | debitCredit:'debit'}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col custom-3">
|
<div class="col custom-3">
|
||||||
<span>Credit</span>
|
<span>{{account | debitCredit:'credit'}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col custom-3">
|
<div class="col custom-3">
|
||||||
<span>Balance</span>
|
<span>Balance</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user