|
@@ -121,12 +121,14 @@ async function calculateQuantityPerGLJ(glj,ration,coeList,assList,adjustState,is
|
|
|
|
|
|
function calculateAss(quantity,assList,glj) {
|
|
|
for(let i=0;i<assList.length;i++){
|
|
|
- let assglj = _.find(assList[i].assRation.rationGljList,function (aglj) {
|
|
|
- return aglj.gljId == glj.GLJID
|
|
|
- })
|
|
|
- if(assglj){
|
|
|
- let calQuantity = assglj.consumeAmt*assList[i].times;
|
|
|
- quantity += calQuantity
|
|
|
+ if(assList[i].assRation){
|
|
|
+ let assglj = _.find(assList[i].assRation.rationGljList,function (aglj) {
|
|
|
+ return aglj.gljId == glj.GLJID
|
|
|
+ })
|
|
|
+ if(assglj){
|
|
|
+ let calQuantity = assglj.consumeAmt*assList[i].times;
|
|
|
+ quantity += calQuantity
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return quantity;
|