|
Lines 2186-2192
sub GetLateOrders {
Link Here
|
| 2186 |
|
2186 |
|
| 2187 |
=head3 GetHistory |
2187 |
=head3 GetHistory |
| 2188 |
|
2188 |
|
| 2189 |
(\@order_loop, $total_qty, $total_price, $total_qtyreceived) = GetHistory( %params ); |
2189 |
\@order_loop = GetHistory( %params ); |
| 2190 |
|
2190 |
|
| 2191 |
Retreives some acquisition history information |
2191 |
Retreives some acquisition history information |
| 2192 |
|
2192 |
|
|
Lines 2226-2234
returns:
Link Here
|
| 2226 |
'quantityreceived' => undef, |
2226 |
'quantityreceived' => undef, |
| 2227 |
'title' => 'The Adventures of Huckleberry Finn' |
2227 |
'title' => 'The Adventures of Huckleberry Finn' |
| 2228 |
} |
2228 |
} |
| 2229 |
$total_qty is the sum of all of the quantities in $order_loop |
|
|
| 2230 |
$total_price is the cost of each in $order_loop times the quantity |
| 2231 |
$total_qtyreceived is the sum of all of the quantityreceived entries in $order_loop |
| 2232 |
|
2229 |
|
| 2233 |
=cut |
2230 |
=cut |
| 2234 |
|
2231 |
|
|
Lines 2397-2414
sub GetHistory {
Link Here
|
| 2397 |
} |
2394 |
} |
| 2398 |
} |
2395 |
} |
| 2399 |
$query .= " ORDER BY id"; |
2396 |
$query .= " ORDER BY id"; |
| 2400 |
my $sth = $dbh->prepare($query); |
2397 |
|
| 2401 |
$sth->execute( @query_params ); |
2398 |
return $dbh->selectall_arrayref( $query, { Slice => {} }, @query_params ); |
| 2402 |
my $cnt = 1; |
|
|
| 2403 |
while ( my $line = $sth->fetchrow_hashref ) { |
| 2404 |
$line->{count} = $cnt++; |
| 2405 |
$line->{toggle} = 1 if $cnt % 2; |
| 2406 |
push @order_loop, $line; |
| 2407 |
$total_qty += ( $line->{quantity} ) ? $line->{quantity} : 0; |
| 2408 |
$total_qtyreceived += ( $line->{quantityreceived} ) ? $line->{quantityreceived} : 0; |
| 2409 |
$total_price += ( $line->{quantity} and $line->{ecost} ) ? $line->{quantity} * $line->{ecost} : 0; |
| 2410 |
} |
| 2411 |
return \@order_loop, $total_qty, $total_price, $total_qtyreceived; |
| 2412 |
} |
2399 |
} |
| 2413 |
|
2400 |
|
| 2414 |
=head2 GetRecentAcqui |
2401 |
=head2 GetRecentAcqui |