Track CLIN type change
- emit a new event when CLIN type changes - update totals based on new CLIN type
This commit is contained in:
@@ -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
|
||||
},
|
||||
|
Reference in New Issue
Block a user