#------------------------------------------------------------
# Copyright (C) 2007 RoyaltyShare, Inc.   All Rights Reserved
#------------------------------------------------------------
package RPS::Report::ProductsWithoutPrices;
use strict;
use warnings;

use lib '/app/tools/common/lib';
use Common::FormObject;
use Common::Assert;

use lib '/app/tools/rps/lib';
use RPS::DB::Item::ReportQueries;
use RPS::DB::Item::ReportQueries::ProductWithoutPrices;

use base 'RPS::Report';

sub _baseXMLName { 'Product' }

sub _getDBItem() {
    my $self = shift;
    return RPS::DB::Item::ReportQueries::ProductWithoutPrices->GetProductsWithoutPrices();
}

sub _reportColumns {
    my $self = shift;

    return (
        "LabelName"         => "Label",
        "CatalogNumber"     => "Catalog #",
        "AlbumTitle"        => "Album Title",
        "ArtistName"        => "Artist",
        "ProductType"       => "Product Type",
        "ProductCode"       => "Product ID",
        "UPC_EAN"           => "UPC",
        "MissingPriceLevel" => "Missing Price Level"
    );
}

sub _fillInHash {
    my ( $self, $product ) = @_;

    my %data;

    $data{LabelName}         = $product->label_name;
    $data{CatalogNumber}     = $product->catalog_number;
    $data{AlbumTitle}        = $product->album_title;
    $data{ArtistName}        = $product->artist_name;
    $data{ProductType}       = $product->product_type;
    $data{ProductID}         = $product->product_id;
    $data{ProductCode}       = $product->product_code;
    $data{UPC_EAN}           = $product->upc_ean;
    $data{AlbumID}           = $product->album_id;
    $data{MissingPriceLevel} = $product->missing_price_level;

    return \%data;
}

###
1;    #
###
