Art all the way down?
This commit is contained in:
parent
f186cf598f
commit
e375afbde0
2 changed files with 45 additions and 49 deletions
36
f20-budget.config.pl
Normal file
36
f20-budget.config.pl
Normal file
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
##############################################################################
|
||||
# #
|
||||
# configuration options for f20-budget.pl #
|
||||
# #
|
||||
##############################################################################
|
||||
|
||||
## project
|
||||
$projectname='f20 budget';
|
||||
$script_name='f20-budget.pl';
|
||||
$currency='€';
|
||||
|
||||
## server
|
||||
$website_url='https://be.fo.am';
|
||||
$feral_logo="https://www.feraltrade.org/budget/feral_pigeon.jpg";
|
||||
|
||||
## database connection
|
||||
$db_conect="DBI:mysql:feralbudget";
|
||||
$db_user="feraltrade";
|
||||
$db_pass="********";
|
||||
|
||||
## css options
|
||||
$css_screen_url="/css/styles.css";
|
||||
$css_print_url="/css/print.css";
|
||||
|
||||
## possibly unused
|
||||
# $logo_url="$website_url/budget/logo/";
|
||||
# $logo_path='/home/feraltrade/htdocs/budget/logo/';
|
||||
# $arrow="$website_url/im6/arrow.jpg";
|
||||
|
||||
# $locations_script_name='./locations.pl';
|
||||
# $agents_script_name='./agents/agents.pl';
|
||||
|
||||
# $locations_image_url="$website_url/locn_image/thumb/";
|
||||
# $locations_image_path='/home/feraltrade/htdocs/budget/locn_image/thumb/';
|
|
@ -8,38 +8,11 @@ no warnings qw(experimental::smartmatch);
|
|||
|
||||
##############################################################################
|
||||
# #
|
||||
# configuration #
|
||||
# configuration details are kept in a separate file #
|
||||
# #
|
||||
##############################################################################
|
||||
|
||||
## project
|
||||
$projectname='f20 budget';
|
||||
$script_name='f20-budget.pl';
|
||||
$currency='€';
|
||||
|
||||
## server
|
||||
$website_url='https://be.fo.am';
|
||||
$feral_logo="https://www.feraltrade.org/budget/feral_pigeon.jpg";
|
||||
|
||||
## database connection
|
||||
$db_conect="DBI:mysql:feralbudget";
|
||||
$db_user="feraltrade";
|
||||
$db_pass="********";
|
||||
|
||||
## css options
|
||||
$css_screen_url="/css/styles.css";
|
||||
$css_print_url="/css/print.css";
|
||||
|
||||
## possibly unused
|
||||
# $logo_url="$website_url/budget/logo/";
|
||||
# $logo_path='/home/feraltrade/htdocs/budget/logo/';
|
||||
# $arrow="$website_url/im6/arrow.jpg";
|
||||
|
||||
# $locations_script_name='./locations.pl';
|
||||
# $agents_script_name='./agents/agents.pl';
|
||||
|
||||
# $locations_image_url="$website_url/locn_image/thumb/";
|
||||
# $locations_image_path='/home/feraltrade/htdocs/budget/locn_image/thumb/';
|
||||
do "f20-budget.config.pl";
|
||||
|
||||
##############################################################################
|
||||
# #
|
||||
|
@ -492,23 +465,6 @@ END
|
|||
|
||||
sub input_budget {
|
||||
|
||||
#for ($i=1; $i<=8; $i++) {
|
||||
# if (('$type{$i}' eq 'select category') && ('$new_item{$i}' ne '')) {
|
||||
|
||||
# print(qq(<center>));
|
||||
# print(qq(<table width="700" cellspacing="20" cellpadding="0" bgcolor="#ffffff">));
|
||||
# print(qq(<FORM ACTION="$script_name"METHOD="GET">));
|
||||
# print(qq(<input type="hidden" name="action" value="prepare_budget">));
|
||||
# print(qq(<input type="hidden" name="new_name" value="$record->{name}">));
|
||||
# print(qq(<input type="hidden" name="budget_id" value="$budget_id">));
|
||||
# print(qq(<input type="hidden" name="agent_id" value="$agent_id">));
|
||||
# print(qq(<input type="hidden" name="new_agent" value="$record->{fullname}">));
|
||||
# print(qq(<input type="hidden" name="new_codename" value="$record->{codename}">));
|
||||
# print(qq(<tr><td colspan="1"><INPUT TYPE="submit" VALUE="please go back and select a category for each expenditure"></td></tr>));
|
||||
# print(qq(</FORM>));
|
||||
|
||||
#} else {
|
||||
|
||||
my $dbh = DBI->connect($db_conect,$db_user,$db_pass)
|
||||
or die ("can't connect: $DBI::errstr");
|
||||
|
||||
|
@ -532,7 +488,6 @@ sub input_budget {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
## read in finance for agent
|
||||
|
||||
my $sql = qq( SELECT * from finance LEFT JOIN agents ON finance.agent_id=agents.id
|
||||
|
@ -771,7 +726,13 @@ sub compile_budget {
|
|||
my $sthr = $dbh->prepare($sqlr);
|
||||
$sthr->execute;
|
||||
|
||||
my $sqlef = qq( SELECT budget_id, item, cost, currency, type FROM expenditure LEFT JOIN budgets on expenditure.budget_id=budgets.id WHERE expenditure.budget_id = '$budget_id' AND type='fee' ORDER BY expenditure.item);
|
||||
my $sqlef = qq(
|
||||
SELECT budget_id, item, cost, currency, type
|
||||
FROM expenditure
|
||||
LEFT JOIN budgets on expenditure.budget_id=budgets.id
|
||||
WHERE expenditure.budget_id = '$budget_id'
|
||||
AND type='fee'
|
||||
ORDER BY expenditure.item);
|
||||
my $sthef = $dbh->prepare($sqlef);
|
||||
$sthef->execute;
|
||||
|
||||
|
@ -1006,7 +967,6 @@ END
|
|||
}
|
||||
|
||||
|
||||
|
||||
############################################################################
|
||||
# prepare expenditure
|
||||
|
||||
|
|
Loading…
Reference in a new issue