Adding splitAttachSales() function to attach data and split into record types.