Zoho Creater Custom Actions

Zoho Creater Custom Actions

I installed the default module "order management" within this module there is a page called "active" which shows all active purchases.  Within this, there is a custom action with the following script.

  1. void purchase.postToInvent(Purchase purRow)
  2. {
  3. proRowList = purRow.Add_Product;
  4. for each  proRow in proRowList
  5. {
  6. fet = Products[ID == proRow.Product];
  7. fet.Available_Stock=fet.Available_Stock + proRow.Quantity;
  8. thisapp.inventReportColor(fet.ID);
  9. }
  10. purRow.Order_Status="Received";
  11. purRow.Handled_By=zoho.loginuserid;
  12. }
Line 7 seems to be pulling an error, any one know why?  This is the stock code, with out any change.