The codes (Department, Product Code, Weight) come when order was scanned by barcode scanner and those information is multiplied by the price by selecting the product over the order number and adds it to the ticket.

Example: 27 00252 05234 1

27            Department number, indicates that the product is a weighed product.
00252     ID number of product, consists of 5 digits.
05234     Indicates the weight of product, consists of 5 digits.
            Check point