The problem arises on the line:
PAsubtotal=0;
I get the error: "'undefined' is null or not an object"
Expand|Select|Wrap|Line Numbers
- var details = new Array();
- var cntr=0;
- var PAtemp = new String();
- var PAsubtotal;
- for( var current in me.items ){
- var item = me.items[current];
- /*This is where I set matrix values*/
- PAsubtotal = PAsubtotal + item.price*item.quantity
- if (cntr > 0){
- if (!(item.size == PAtemp)){
- cntr++;
- details[cntr][5]= "<TD><b>" + PAsubtotal + "</b></TD></TR>";
- PAsubtotal=0;
- }
- }
- cntr++;
- PAtemp = item.size;
- }