Adding Cost Per Unit to OrderDetails.xml - xmpie-users/uStore-js GitHub Wiki

Add Cost per Unit for each product in OrderDetails.xml

  • Open the SQL DB on the uStore app server
  • Open the Databases
  • Open uStore db
  • Open Programability
  • Open Functions
  • Open Scaler-valued Functions
  • Find dbo.fn_Get_OrderProduct_DetailsXml
  • Right click and select Modify
  • Do a find or search for "Prices/Cost"
  • Paste this line of code directly under that:

_ Format((Cost/TotalQuantity), 'N2') "Prices/CostPerUnit",_

  • Hit execute

Alt