Add units per packs to Order Receipt - xmpie-users/uStore-js GitHub Wiki
- Open SQL
- Open Databases
- Open uStore
- Open Tables
- Open dbo.TextCompositionParameter
- Find OrderItems
- Check which SQL Parameter its using *The default is Receipt_GetOrderItems
- Close the Tables section
- Open Programmability
- Find the SQL Parameter that was listed
- Right Click on it
- Select Modify
Find the line of code:
<td><span>' + cast(OP.TotalQuantity AS nvarchar) + ' ' + dbo.fn_GetProductUnitName(OP.TotalQuantity, OP.ProductUnitID, @CultureID) + '</span></td>
Delete that and paste the following:
<td><span>'+ Case when pu.ProductUnitID > 1
Then '1 ' + dbo.fn_GetProductUnitName(OP.TotalQuantity, OP.ProductUnitID, @CultureID) + ' = ' + Cast(pu.Amount as nvarchar) + ' Items'
Else cast(OP.TotalQuantity AS nvarchar) + ' ' + dbo.fn_GetProductUnitName(OP.TotalQuantity, OP.ProductUnitID, @CultureID) END + '</span></td>
Hit Execute