56 |
-query => <<SQL, |
-query => <<SQL, |
57 |
|
|
58 |
SELECT customer_id,customer_name, |
SELECT customer_id,customer_name, |
59 |
order_id,order_date,order_qty, |
orders_id,orders_date,orders_qty, |
60 |
product_hid,product_description |
product_hid,product_description |
61 |
FROM customer,order,product |
FROM customer,orders,product |
62 |
WHERE order_product=product_id |
WHERE orders_product=product_id |
63 |
AND customer_id = ? |
AND customer_id = ? |
64 |
AND order_customer = customer_id |
AND orders_customer = customer_id |
65 |
AND order_date >= ? |
AND orders_date >= ? |
66 |
AND order_date <= ? |
AND orders_date <= ? |
67 |
ORDER BY customer_id,order_date,order_id |
ORDER BY customer_id,orders_date,orders_id |
68 |
|
|
69 |
SQL |
SQL |
70 |
-param => [ $p->{customer},$p->{start},$p->{end}] |
-param => [ $p->{customer},$p->{start},$p->{end}] |
79 |
-foot => sub { "Total Items Shipped :".rpcnt($field{product_id})."\n" } |
-foot => sub { "Total Items Shipped :".rpcnt($field{product_id})."\n" } |
80 |
); |
); |
81 |
|
|
82 |
$rep->group |
$rep->group( |
83 |
( -trigger => sub { $field{order_date} }, |
-trigger => sub { $field{orders_date} }, |
84 |
-head => sub { Orders for $field{order_date}\n"} |
-head => sub { "Orders for $field{orders_date}\n" } |
85 |
); |
); |
86 |
|
|
87 |
$rep->body |
$rep->body |
88 |
( -contents => sub { |
( -contents => sub { |
89 |
sprintf " %10d %7d %8s %s\n", |
sprintf " %10d %7d %8s %s\n", |
90 |
$field{order_id}, |
$field{orders_id}, |
91 |
$field{order_qty}, |
$field{orders_qty}, |
92 |
$field{product_hid}, |
$field{product_hid}, |
93 |
$field{product_desc} } ); |
$field{product_desc} } ); |
94 |
|
|