Quote Detail View smart template issue

I changed the layout of the quotes detailview by dragging the line items panel to the top and then running repair. Now the lineitems display is completely screwed up. The problem is with the colspan statement in the columns. The lineitems display properly if I change colspan=β€˜3’ to colspan=β€˜10’. This is coming from a smarty template file in cache/modules/AOS_Quotes/detailview.tpl. I cannot edit the smart template because it being built dynamically and alway reverts back to colspan=β€˜3’ on the the line items columns. i have tried creating my own custom detailview.tpl file in custom/modules/AOS_Quotes, but this doesn’t work. I would really appreciate some help here as i have been unable to find any documentation on how suiteCRM uses smarty to dynamically generate the template files. This was working fine until I used β€œStudio Manager” and repair to customise a layout in the Quotes module.