[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [908] trunk
- Subject: SF.net SVN: ledger-smb: [908] trunk
- From: ..hidden..
- Date: Wed, 14 Mar 2007 22:21:31 -0700
Revision: 908
http://svn.sourceforge.net/ledger-smb/?rev=908&view=rev
Author: einhverfr
Date: 2007-03-14 22:21:31 -0700 (Wed, 14 Mar 2007)
Log Message:
-----------
Adding ledgersmb.conf.default
Modified Paths:
--------------
trunk/LedgerSMB.pm
Added Paths:
-----------
trunk/ledgersmb.conf.default
Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm 2007-03-15 04:23:01 UTC (rev 907)
+++ trunk/LedgerSMB.pm 2007-03-15 05:21:31 UTC (rev 908)
@@ -12,6 +12,10 @@
=item new ()
This method creates a new base request instance.
+=item date_to_number (user => $LedgerSMB::User, date => $string);
+This function takes the date in the format provided and returns a numeric
+string in YYMMDD format. This may be moved to User in the future.
+
=item debug (file => $path);
This dumps the current object to the file if that is defined and otherwise to
@@ -28,8 +32,13 @@
=item format_amount (user => $LedgerSMB::User::hash, amount => $string, precision => $integer, neg_format => (-|DRCR));
The function takes a monetary amount and formats it according to the user
-preferences, the negative format (- or DR/CR).
+preferences, the negative format (- or DR/CR). Note that it may move to
+LedgerSMB::User at some point in the future.
+=item parse_amount (user => $LedgerSMB::User::hash, amount => $variable);
+If $amount is a Bigfloat, it is returned as is. If it is a string, it is
+parsed according to the user preferences stored in the LedgerSMB::User object.
+
=item format_fields (fields => ..hidden..);
This function converts fields to their appropriate representation in
HTML/SGML/XML or LaTeX.
@@ -368,11 +377,13 @@
$amount;
}
-
+# This should probably go to the User object too.
sub parse_amount {
+ my $self = shift @_;
+ my %args = @_;
+ my $myconfig = $args{user};
+ my $amount = $args{amount};
- my ($self, $myconfig, $amount) = @_;
-
if ($amount eq '' or $amount == undef){
return 0;
}
@@ -447,10 +458,13 @@
@results;
}
-sub datetonum {
+# This should probably be moved to User too...
+sub date_to_number {
+ my $self = shift @_;
+ my %args = @_;
+ my $myconfig = $args{user};
+ my $date = $args{date};
- my ($self, $myconfig, $date, $picture) = @_;
-
my ($yy, $mm, $dd);
if ($date && $date =~ /\D/) {
@@ -483,7 +497,10 @@
# Database routines used throughout
sub db_init {
- my ($self, $myconfig) = @_;
+ my $self = shift @_;
+ my %args = @_;
+ my $myconfig = $args{user};
+
$self->{dbh} = $self->dbconnect_noauto($myconfig) || $self->dberror();
my $query =
@@ -501,6 +518,8 @@
}
}
+# Will merge this into db_init in the future.
+# Deprecated and hence undocumented. Chris.
sub dbconnect_noauto {
my ($self, $myconfig) = @_;
Added: trunk/ledgersmb.conf.default
===================================================================
--- trunk/ledgersmb.conf.default (rev 0)
+++ trunk/ledgersmb.conf.default 2007-03-15 05:21:31 UTC (rev 908)
@@ -0,0 +1,55 @@
+session : DB
+logging : 0
+
+# Set language for login and admin pages
+language :
+
+# If you have LaTeX installed, set to 1
+latex : 1
+
+# Maximum number of invoices that can be printed on a cheque
+check_max_invoices : 5
+
+[environment]
+# If the server can't find applications, append to the path
+PATH: /usr/local/pgsql/bin
+PATH: /usr/local/bin
+
+# If on Mac OS X using Fink's Perl libs, append to the path
+#PERL5LIB = /sw/lib/perl5
+
+[paths]
+# spool directory for batch printing
+spool = spool
+# path to user configuration files
+userspath = users
+# templates base directory
+templates = templates
+# images base directory
+images = images
+# member file
+memberfile = users/members
+localepath = locale/po
+
+[programs]
+# program to use for file compression
+gzip = gzip -S .gz
+
+[mail]
+### How to send mail. The sendmail command is used unless smtphost is set.
+sendmail = /usr/bin/sendmail -t
+# smtphost = 127.0.0.1
+# smtptimeout = 60
+
+[printers]
+# Available printers
+Laser = lpr -Plaser
+Epson = lpr -PEpson
+
+[globaldb]
+# These paramaters *must* be set correctly
+# for LedgerSMB >= 1.2 to work
+DBUserName = ledgersmb
+DBPassword = set me to correct password
+DBport: 5432
+DBName: Set me to your database name
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.