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
1 Commits
dependabot
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c9cf7c136 |
5968
package-lock.json
generated
5968
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -37,7 +37,7 @@
|
||||
"zone.js": "~0.8.26"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^0.13.10",
|
||||
"@angular-devkit/build-angular": "~0.8.0",
|
||||
"@angular/cli": "~6.2.5",
|
||||
"@angular/compiler-cli": "^6.1.0",
|
||||
"@angular/language-service": "^6.1.0",
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<p>Copyright © 2020 Open Accounting, LLC<br>
|
||||
<p>Copyright © 2019 Open Accounting, LLC<br>
|
||||
<a href="/tou">Terms of Use</a> | <a href="/privacy-policy">Privacy Policy</a></p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import 'rxjs/add/operator/filter';
|
||||
import 'rxjs/add/operator/debounceTime';
|
||||
import 'rxjs/add/operator/take';
|
||||
import { Util } from '../shared/util';
|
||||
import { businessAccounts } from '../fixtures/businessAccounts';
|
||||
import { personalAccounts } from '../fixtures/personalAccounts';
|
||||
import { ErrorObservable } from 'rxjs/observable/ErrorObservable';
|
||||
|
||||
@@ -63,7 +62,7 @@ export class AccountService {
|
||||
|
||||
if(options.createDefaultAccounts) {
|
||||
this.getAccountTree().take(1).switchMap(tree => {
|
||||
return this.createDefaultAccounts(tree, options.createDefaultAccounts);
|
||||
return this.createDefaultAccounts(tree);
|
||||
}).subscribe(accounts => {
|
||||
log.debug('Created default accounts');
|
||||
log.debug(accounts);
|
||||
@@ -591,7 +590,7 @@ export class AccountService {
|
||||
return this.apiService.deleteAccount(id);
|
||||
}
|
||||
|
||||
createDefaultAccounts(tree: AccountTree, type: string): Observable<any> {
|
||||
createDefaultAccounts(tree: AccountTree): Observable<any> {
|
||||
let assetAccount = tree.getAccountByName('Assets', 1);
|
||||
let equityAccount = tree.getAccountByName('Equity', 1);
|
||||
let liabilityAccount = tree.getAccountByName('Liabilities', 1);
|
||||
@@ -609,10 +608,10 @@ export class AccountService {
|
||||
'Expenses': [expenseAccount.id, true]
|
||||
};
|
||||
|
||||
let newAccounts = type === 'business' ? businessAccounts : personalAccounts;
|
||||
let newAccounts;
|
||||
|
||||
try {
|
||||
newAccounts = newAccounts.map(data => {
|
||||
newAccounts = personalAccounts.map(data => {
|
||||
let id = Util.newGuid();
|
||||
let [parentId, debitBalance] = accountNameMap[data.parent];
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ export class OrgService {
|
||||
return this.apiService.getOrgs();
|
||||
}
|
||||
|
||||
newOrg(org: Org, createDefaultAccounts: string): Observable<Org> {
|
||||
newOrg(org: Org, createDefaultAccounts: boolean): Observable<Org> {
|
||||
let sessionOptions = new SessionOptions({
|
||||
createDefaultAccounts: createDefaultAccounts
|
||||
});
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
export const businessAccounts: any =
|
||||
[
|
||||
{
|
||||
"name": "Checking",
|
||||
"parent": "Assets"
|
||||
},
|
||||
{
|
||||
"name": "Petty Cash",
|
||||
"parent": "Assets"
|
||||
},
|
||||
{
|
||||
"name": "Accounting",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Accounts Receivable",
|
||||
"parent": "Assets"
|
||||
},
|
||||
{
|
||||
"name": "Capital",
|
||||
"parent": "Equity"
|
||||
},
|
||||
{
|
||||
"name": "Drawing",
|
||||
"parent": "Equity"
|
||||
},
|
||||
{
|
||||
"name": "Accounts Payable",
|
||||
"parent": "Liabilities"
|
||||
},
|
||||
{
|
||||
"name": "Credit Card",
|
||||
"parent": "Liabilities"
|
||||
},
|
||||
{
|
||||
"name": "Auto",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Bank Fees",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Computer Equipment",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Cost of Goods Sold",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Dining / Entertainment",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Internet",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Legal",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Licenses / Fees",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Marketing",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Miscellaneous",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Office Furniture",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Office Rent",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Office Supplies",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Payment Processing",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Payroll",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Phone",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Shipping",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Software",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Tax Preparation",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Travel",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Web Domains / Hosting",
|
||||
"parent": "Expenses"
|
||||
},
|
||||
{
|
||||
"name": "Sales",
|
||||
"parent": "Income"
|
||||
}
|
||||
];
|
||||
@@ -41,20 +41,9 @@
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<p>Create default accounts (can be customized later)</p>
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input formControlName="createDefaultAccounts" id="createDefaultAccounts1" type="radio" class="form-check-input" value="" />
|
||||
<label for="createDefaultAccounts1" class="form-check-label">None</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input formControlName="createDefaultAccounts" id="createDefaultAccounts2" type="radio" class="form-check-input" value="business" />
|
||||
<label for="createDefaultAccounts2" class="form-check-label">Business accounts</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input formControlName="createDefaultAccounts" id="createDefaultAccounts3" type="radio" class="form-check-input" value="personal" />
|
||||
<label for="createDefaultAccounts2" class="form-check-label">Personal accounts</label>
|
||||
</div>
|
||||
<label for="createDefaultAccounts">Create default accounts<br>(can be customized later)</label>
|
||||
<input formControlName="createDefaultAccounts" id="createDefaultAccounts" type="checkbox" class="form-control" />
|
||||
</div>
|
||||
<p *ngIf="error" class="error">
|
||||
{{error.message}}
|
||||
|
||||
@@ -39,7 +39,7 @@ export class NewOrgPage {
|
||||
'currency': ['USD', Validators.required],
|
||||
'precision': [2, Validators.required],
|
||||
'timezone': [this.defaultTz, Validators.required],
|
||||
'createDefaultAccounts': ['business']
|
||||
'createDefaultAccounts': [true, Validators.required]
|
||||
});
|
||||
|
||||
this.joinOrgForm = fb.group({
|
||||
|
||||
@@ -148,19 +148,10 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<p>Create default accounts (can be customized later)</p>
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input formControlName="createDefaultAccounts" id="createDefaultAccounts1" type="radio" class="form-check-input" value="" />
|
||||
<label for="createDefaultAccounts1" class="form-check-label">None</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input formControlName="createDefaultAccounts" id="createDefaultAccounts2" type="radio" class="form-check-input" value="business" />
|
||||
<label for="createDefaultAccounts2" class="form-check-label">Business accounts</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input formControlName="createDefaultAccounts" id="createDefaultAccounts3" type="radio" class="form-check-input" value="personal" />
|
||||
<label for="createDefaultAccounts2" class="form-check-label">Personal accounts</label>
|
||||
<div class="form-group row">
|
||||
<label for="createDefaultAccounts" class="col-sm-3 col-form-label">Create default accounts<br>(can be customized later)</label>
|
||||
<div class="col-sm-9">
|
||||
<input formControlName="createDefaultAccounts" id="createDefaultAccounts" type="checkbox" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<p *ngIf="newOrgError" class="error">{{newOrgError.message}}</p>
|
||||
|
||||
@@ -72,7 +72,7 @@ export class OrgPage {
|
||||
'currency': ['', Validators.required],
|
||||
'precision': [null, Validators.required],
|
||||
'timezone': [this.defaultTz, Validators.required],
|
||||
'createDefaultAccounts': ['']
|
||||
'createDefaultAccounts': [true, Validators.required]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ export class OrgPage {
|
||||
currency: this.currentOrg.currency,
|
||||
precision: this.currentOrg.precision,
|
||||
timezone: this.defaultTz,
|
||||
createDefaultAccounts: ''
|
||||
createDefaultAccounts: true
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export class SessionOptions {
|
||||
createDefaultAccounts: string;
|
||||
createDefaultAccounts: boolean;
|
||||
constructor(options: any = {}) {
|
||||
this.createDefaultAccounts = options.createDefaultAccounts;
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ export class Transaction {
|
||||
splits: Split[];
|
||||
constructor(options: any = {}) {
|
||||
this.id = options.id;
|
||||
this.orgId = options.orgId;
|
||||
this.userId = options.userId;
|
||||
this.orgId = options.id;
|
||||
this.userId = options.id;
|
||||
this.date = options.date ? new Date(options.date) : null;
|
||||
this.inserted = options.inserted ? new Date(options.inserted) : null;
|
||||
this.updated = options.updated ? new Date(options.updated) : null;
|
||||
|
||||
Reference in New Issue
Block a user