|
Lines 343-350
sub GetBudgetSpent {
Link Here
|
| 343 |
SELECT SUM(shipmentcost) AS sum |
343 |
SELECT SUM(shipmentcost) AS sum |
| 344 |
FROM aqinvoices |
344 |
FROM aqinvoices |
| 345 |
WHERE shipmentcost_budgetid = ? |
345 |
WHERE shipmentcost_budgetid = ? |
| 346 |
AND closedate IS NOT NULL |
|
|
| 347 |
|); |
346 |
|); |
|
|
347 |
|
| 348 |
$sth->execute($budget_id); |
348 |
$sth->execute($budget_id); |
| 349 |
my ($shipmentcost_sum) = $sth->fetchrow_array; |
349 |
my ($shipmentcost_sum) = $sth->fetchrow_array; |
| 350 |
$sum += $shipmentcost_sum; |
350 |
$sum += $shipmentcost_sum; |
|
Lines 365-380
sub GetBudgetOrdered {
Link Here
|
| 365 |
$sth->execute($budget_id); |
365 |
$sth->execute($budget_id); |
| 366 |
my $sum = $sth->fetchrow_array; |
366 |
my $sum = $sth->fetchrow_array; |
| 367 |
|
367 |
|
| 368 |
$sth = $dbh->prepare(qq| |
|
|
| 369 |
SELECT SUM(shipmentcost) AS sum |
| 370 |
FROM aqinvoices |
| 371 |
WHERE shipmentcost_budgetid = ? |
| 372 |
AND closedate IS NULL |
| 373 |
|); |
| 374 |
$sth->execute($budget_id); |
| 375 |
my ($shipmentcost_sum) = $sth->fetchrow_array; |
| 376 |
$sum += $shipmentcost_sum; |
| 377 |
|
| 378 |
return $sum; |
368 |
return $sum; |
| 379 |
} |
369 |
} |
| 380 |
|
370 |
|
| 381 |
- |
|
|