13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'app/notifications/cats/core/allocation_notification.rb', line 13
def message
allocation_item = params[:allocation_item]
commodity = allocation_item.commodity.name
source = allocation_item.source.name
destination = allocation_item.destination.name
title = "Allocation Notification - #{commodity}"
date = Date.today
body = " Commodity with the following specification has been allocated to you:\n Batch No. = \#{allocation_item.commodity.batch_no}\n Commodity = \#{commodity}\n Quantity = \#{allocation_item.quantity}\n The commodity is expected to be delivered from \#{source} to \#{destination}\n BODY\n {title: title, date: date, body: body}\nend\n"
|