I have checked your form, I added the below script in the mentioned field, and its working.
FormPurchaseOrderConfirmation.PageA.tblTable.footter.GrandTotal::calculate - (FormCalc, client)this.rawValue = sum(rowTableSection.rowTableItem[*].colQuantity[*]);
https://help.adobe.com/en_US/livecycle/...