Track CLIN type change

- emit a new event when CLIN type changes
- update totals based on new CLIN type
This commit is contained in:
dandds
2019-06-17 10:10:42 -04:00
committed by montana
parent 23b7df2153
commit 0c58ad07fb
2 changed files with 18 additions and 14 deletions

View File

@@ -61,14 +61,12 @@ export default {
let newTotal = 0
let newObligated = 0
Object.values(this.clinChildren).forEach(
function(clin) {
newTotal += clin.amount
if (clin.type.includes('1', '3')) {
newObligated += clin.amount
}
Object.values(this.clinChildren).forEach(function(clin) {
newTotal += clin.amount
if (clin.type.includes('1', '3')) {
newObligated += clin.amount
}
)
})
this.total = newTotal
this.obligated = newObligated
},