fix premise account stuff
This commit is contained in:
@ -50,6 +50,12 @@ export class PremiseDetailsComponent implements OnInit {
|
||||
this.messageService.add(JSON.stringify(this.premise, undefined, 4))
|
||||
if (this.premise.id == 0) {
|
||||
this.messageService.add("about to insert new premise")
|
||||
this.overheadAccount = {
|
||||
"id": 0,
|
||||
"description": `overhead_account_${this.premise.description}`
|
||||
}
|
||||
this.overheadAccount = await this.accountService.postAccount(this.overheadAccount)
|
||||
this.premise.account = this.overheadAccount.id
|
||||
this.premise = await this.premiseService.postPremise(this.premise)
|
||||
this.messageService.add(`Successfully added premises with id ${this.premise.id}`)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user