/* From within RentalPoint, right click on your booking and print-->packing list */
/* OR change the value of @Booking_no below and execute this query */
You can execute this query using Excel Query Builder in RentalPoint..... |
DECLARE @BOOKING_NO VARCHAR(13)
SET @BOOKING_NO = 'MYTEST00016'
SELECT O.Booking_no as [Booking Number],
B.showName as [SHOWNAME],
B.ddate as [WH OUT],
B.rdate as [WH IN],
O.Product_code as [Product Code],
A.DESCRIPTION as [Asset Description],
A.ASSET_CODE as [Barcode],
A.SERIAL_NO AS [Serial #],
CAST(A.Cost as decimal(9,2)) as [Cost]
FROM tblAssetran O INNER JOIN tblasset01 A ON A.product_code = O.Product_code and A.stock_number = O.stock_number
INNER JOIN tblbookings B on O.Booking_no = B.booking_no
LEFT OUTER JOIN TBLINVMAS M ON M.product_code = O.product_code
Where O.Booking_no = @BOOKING_NO
order by M.SEQ_NO