[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3846] trunk
- Subject: SF.net SVN: ledger-smb:[3846] trunk
- From: ..hidden..
- Date: Wed, 12 Oct 2011 13:10:33 +0000
Revision: 3846
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3846&view=rev
Author: einhverfr
Date: 2011-10-12 13:10:33 +0000 (Wed, 12 Oct 2011)
Log Message:
-----------
1.4 work so far changelog
Also merging other files from branches/1.3
Modified Paths:
--------------
trunk/Changelog
trunk/LedgerSMB/JC.pm
trunk/LedgerSMB/PE.pm
trunk/LedgerSMB/Scripts/employee.pm
trunk/LedgerSMB/Sysconfig.pm
trunk/LedgerSMB/Template.pm
trunk/UI/Contact/contact.html
trunk/bin/io.pl
trunk/bin/is.pl
trunk/ledgersmb.conf.default
trunk/sql/modules/Payment.sql
trunk/sql/upgrade/1.2-1.3-manual.sql
trunk/sql/upgrade/1.2-1.3.sql
Property Changed:
----------------
trunk/
trunk/LedgerSMB/Scripts/employee.pm
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3:3711-3827
+ /branches/1.3:3711-3845
Modified: trunk/Changelog
===================================================================
--- trunk/Changelog 2011-10-12 13:01:59 UTC (rev 3845)
+++ trunk/Changelog 2011-10-12 13:10:33 UTC (rev 3846)
@@ -1,3 +1,23 @@
+Changelog for 1.4 Series
+Forthcoming
+
+* scripts/* files moved to make inheritance possible (Chris T)
+* PostgreSQL contrib dependencies removed, now requre Pg 8.4 (Chris T)
+* Re-engineered schema for financial tables (Chris T)
+
+Changelog for 1.3 Series
+Initial Release: Monday, Oct 12 2011
+Supported Presently
+
+Changelog for LedgerSMB 1.3.1
+* Language selection for invoice templates fixed (Chris T)
+* Fixed DB errors on project search (Chris T)
+* Fixed DB errors on timecard entry (Chris T)
+* Fixed DB errors on timecard searches (Chris T)
+* String standardization in employee/user management (Herman V)
+* Fixed Employee record duplicted on save (Herman V)
+* Fixed upgrade script not bringing in entity.name for employees (Chris T)
+
Changelog for LedgerSMB 1.3.0
Security:
Modified: trunk/LedgerSMB/JC.pm
===================================================================
--- trunk/LedgerSMB/JC.pm 2011-10-12 13:01:59 UTC (rev 3845)
+++ trunk/LedgerSMB/JC.pm 2011-10-12 13:10:33 UTC (rev 3846)
@@ -67,7 +67,8 @@
pr.production, pr.completed,
pr.parts_id AS project
FROM jcitems j
- JOIN employee e ON (e.id = j.employee_id)
+ JOIN person ps ON (j.person_id = ps.id)
+ JOIN entity e ON (e.id = ps.entity_id)
JOIN parts p ON (p.id = j.parts_id)
JOIN project pr ON (pr.id = j.project_id)
WHERE j.id = ?|;
@@ -419,7 +420,7 @@
if ( $form->{employee} ) {
( $null, $var ) = split /--/, $form->{employee};
$var = $dbh->quote($var);
- $where .= " AND j.employee_id = $var";
+ $where .= " AND j.person_id = (select id from person where entity_id = $var)";
}
if ( $form->{open} || $form->{closed} ) {
unless ( $form->{open} && $form->{closed} ) {
@@ -481,13 +482,15 @@
to_char(j.checkedin, 'D') AS weekday,
p.partnumber,
pr.projectnumber, pr.description AS projectdescription,
- e.employeenumber, e.name AS employee,
+ ee.employeenumber, e.name AS employee,
to_char(j.checkedin, 'WW') AS workweek, pr.parts_id,
j.sellprice
FROM jcitems j
+ JOIN person pn ON pn.id = j.person_id
+ JOIN entity e ON pn.entity_id = e.id
+ JOIN entity_employee ee ON ee.entity_id = e.id
JOIN parts p ON (p.id = j.parts_id)
JOIN project pr ON (pr.id = j.project_id)
- JOIN employee e ON (e.entity_id = j.employee_id)
WHERE $where
ORDER BY employee, employeenumber, $sortorder|;
@@ -554,7 +557,9 @@
my $uid = localtime;
$uid .= "$$";
- $query = qq|INSERT INTO jcitems (description) VALUES ('$uid')|;
+ $query = qq|INSERT INTO jcitems (description, person_id)
+ SELECT '$uid', id
+ FROM person WHERE entity_id = person__get_my_entity_id()|;
$dbh->do($query) || $form->dberror($query);
$query = qq|SELECT id FROM jcitems WHERE description = '$uid'|;
@@ -596,7 +601,8 @@
serialnumber = ?,
checkedin = ?::timestamp,
checkedout = ?::timestamp,
- person_id = ?,
+ person_id = (SELECT id FROM person
+ WHERE entity_id = ?),
notes = ?
WHERE id = ?|;
$sth = $dbh->prepare($query);
Modified: trunk/LedgerSMB/PE.pm
===================================================================
--- trunk/LedgerSMB/PE.pm 2011-10-12 13:01:59 UTC (rev 3845)
+++ trunk/LedgerSMB/PE.pm 2011-10-12 13:10:33 UTC (rev 3846)
@@ -200,7 +200,7 @@
SELECT pr.*, e.name AS customer
FROM project pr
LEFT JOIN entity_credit_account c
- ON (c.id = pr.customer_id)
+ ON (c.id = pr.credit_id)
LEFT JOIN entity e ON (c.entity_id = e.id)
WHERE pr.id = ?|;
$sth = $dbh->prepare($query);
@@ -1832,7 +1832,7 @@
# future, this will be more generaly constructed.
$query = qq|
SELECT j.id, j.description, j.qty - j.allocated AS qty,
- j.sellprice, j.parts_id, pr.customer_id,
+ j.sellprice, j.parts_id, pr.credit_id as customer_id,
j.project_id, j.checkedin::date AS transdate,
j.notes, c.name AS customer, pr.projectnumber,
p.partnumber
@@ -1840,7 +1840,7 @@
JOIN project pr ON (pr.id = j.project_id)
JOIN employee e ON (e.id = j.employee_id)
JOIN parts p ON (p.id = j.parts_id)
- LEFT JOIN entity_credit_account eca ON (c.id = pr.customer_id)
+ LEFT JOIN entity_credit_account eca ON (c.id = pr.credit_id)
LEFT JOIN company c ON eca.entity_id = c.entity_id
WHERE pr.parts_id IS NULL
AND j.allocated != j.qty $where
Modified: trunk/LedgerSMB/Scripts/employee.pm
===================================================================
--- trunk/LedgerSMB/Scripts/employee.pm 2011-10-12 13:01:59 UTC (rev 3845)
+++ trunk/LedgerSMB/Scripts/employee.pm 2011-10-12 13:10:33 UTC (rev 3846)
@@ -234,8 +234,9 @@
procname => 'setting_increment',
args => ['employeenumber']
);
- ($employee->{employee_number}) = values %$ref;
+ ($employee->{employeenumber}) = values %$ref;
}
+ $employee->{employee_number}=$employee->{employeenumber};
$employee->save();
_render_main_screen($employee);
}
Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/1.3/LedgerSMB/Scripts/employee.pm:3843-3845
/branches/1.3/scripts/employee.pl:3842-3843
Modified: trunk/LedgerSMB/Sysconfig.pm
===================================================================
--- trunk/LedgerSMB/Sysconfig.pm 2011-10-12 13:01:59 UTC (rev 3845)
+++ trunk/LedgerSMB/Sysconfig.pm 2011-10-12 13:10:33 UTC (rev 3846)
@@ -114,6 +114,16 @@
${$var} = $config{''}{$var} if $config{''}{$var};
}
+if ($latex){
+ eval { require Template::Latex }; # Trap errors loading this optional module
+ if ($!) { # Couldn't load Template::Latex
+ print STDERR "WARNING: LedgerSMB configured to use LaTeX but module ";
+ print STDERR "Template::Latex did not load: $!\n";
+ print STDERR "Disabling LaTeX support\n";
+ $latex = 0;
+ };
+}
+
%printer = %{ $config{printers} } if $config{printers};
# ENV Paths
@@ -135,6 +145,14 @@
${$var} = $config{programs}{$var} if $config{programs}{$var};
}
+# LaTeX and friends
+for my $var (qw(pdflatex latex dvips)){
+ if ($latex and $config{programs}{$var}){
+ my $funcname = "${var}_path";
+ Template::Latex->$funcname( { $var => $config{programs}{$var} });
+ }
+}
+
# mail configuration
for my $var (qw(sendmail smtphost smtptimeout smtpuser
smtppass smtpauthmethod))
Modified: trunk/LedgerSMB/Template.pm
===================================================================
--- trunk/LedgerSMB/Template.pm 2011-10-12 13:01:59 UTC (rev 3845)
+++ trunk/LedgerSMB/Template.pm 2011-10-12 13:10:33 UTC (rev 3846)
@@ -183,7 +183,6 @@
throw Error::Simple "Invalid format";
}
if (!$self->{include_path}){
-## SC: XXX hardcoding due to config migration, will need adjustment
$self->{include_path} = $self->{'myconfig'}->{'templates'};
$self->{include_path} ||= 'templates/demo';
if (defined $self->{language}){
@@ -193,7 +192,9 @@
}
$self->{include_path} = "$self->{'include_path'}"
."/$self->{language}"
- .";$self->{'include_path'}"
+ .";$self->{'include_path'}";
+ $self->{locale}
+ = LedgerSMB::Locale->get_handle($self->{language});
}
}
Modified: trunk/UI/Contact/contact.html
===================================================================
--- trunk/UI/Contact/contact.html 2011-10-12 13:01:59 UTC (rev 3845)
+++ trunk/UI/Contact/contact.html 2011-10-12 13:10:33 UTC (rev 3846)
@@ -90,11 +90,16 @@
name = "form_id"
value = form_id
} ?>
+<?lsmb PROCESS input element_data = {
+ type = "hidden"
+ name = "entity_id"
+ value = entity_id
+} ?>
<div class="input" id="person_name_div"><?lsmb #text('Name:')?>
<div class="input_group">
<!-- TODO: Add Saluatation -->
<?lsmb PROCESS input element_data = {
- label = text('First')
+ label = text('First Name') #'
name = "first_name"
value = first_name
type = "text"
@@ -103,7 +108,7 @@
</div>
<div class="input_group">
<?lsmb PROCESS input element_data = {
- label = text('Middle')
+ label = text('Middle Name') #'
name = "middle_name"
value = middle_name
type = "text"
@@ -112,7 +117,7 @@
</div>
<div class="input_group">
<?lsmb PROCESS input element_data = {
- label = text('Last')
+ label = text('Last Name') #'
name = "last_name"
value = last_name
type = "text"
@@ -158,8 +163,8 @@
<div class="input_group">
<?lsmb PROCESS input element_data = {
label = text('Employee Number')
- value = employee_number
- name = "employee_number"
+ value = employeenumber
+ name = "employeenumber"
type = "text"
size = 20
} # ' ?>
Modified: trunk/bin/io.pl
===================================================================
--- trunk/bin/io.pl 2011-10-12 13:01:59 UTC (rev 3845)
+++ trunk/bin/io.pl 2011-10-12 13:10:33 UTC (rev 3846)
@@ -1843,6 +1843,7 @@
user => \%myconfig,
locale => $locale,
template => $form->{'formname'},
+ language => $form->{language_code},
format => uc $form->{format},
method => $form->{media},
output_options => \%output_options,
Modified: trunk/bin/is.pl
===================================================================
--- trunk/bin/is.pl 2011-10-12 13:01:59 UTC (rev 3845)
+++ trunk/bin/is.pl 2011-10-12 13:10:33 UTC (rev 3846)
@@ -879,6 +879,7 @@
]
};
print_select($form, $formname);
+ print_select($form, $printops->{lang});
print_select($form, $printops->{format});
print_select($form, $printops->{media});
print qq|
Modified: trunk/ledgersmb.conf.default
===================================================================
--- trunk/ledgersmb.conf.default 2011-10-12 13:01:59 UTC (rev 3845)
+++ trunk/ledgersmb.conf.default 2011-10-12 13:10:33 UTC (rev 3846)
@@ -58,6 +58,19 @@
# program to use for file compression
gzip = gzip -S .gz
+# For latex and pdflatex, specify full path. These will be used to configure
+# Template::Latex so it can find them. This can be used to specify programs
+# other than vanilla latex and pdflatex, such as the xe varieties of either one,
+# if unicode is required.
+#
+# If these are not set, the package defaults (set when you installed
+# Template::Latex) will be used
+#
+# pdflatex = /usr/bin/pdflatex
+# latex = /usr/bin/latex
+# dvips = /usr/bin/dvips
+#
+
[mail]
### How to send mail. The sendmail command is used unless smtphost is set.
sendmail = /usr/bin/sendmail -t
Modified: trunk/sql/modules/Payment.sql
===================================================================
--- trunk/sql/modules/Payment.sql 2011-10-12 13:01:59 UTC (rev 3845)
+++ trunk/sql/modules/Payment.sql 2011-10-12 13:10:33 UTC (rev 3846)
@@ -551,7 +551,7 @@
COMMENT ON FUNCTION payment_bulk_post
(in_transactions numeric[], in_batch_id int, in_source text, in_total numeric,
in_ar_ap_accno text, in_cash_accno text,
- in_payment_date date, in_account_class int, int,
+ in_payment_date date, in_account_class int,
in_exchangerate numeric, in_curr text)
IS
$$ This posts the payments for large batch workflows.
Modified: trunk/sql/upgrade/1.2-1.3-manual.sql
===================================================================
--- trunk/sql/upgrade/1.2-1.3-manual.sql 2011-10-12 13:01:59 UTC (rev 3845)
+++ trunk/sql/upgrade/1.2-1.3-manual.sql 2011-10-12 13:10:33 UTC (rev 3846)
@@ -370,8 +370,8 @@
ALTER TABLE lsmb12.employee ADD entity_id int;
-INSERT INTO entity(control_code, entity_class, country_id)
-select 'E-' || employeenumber, 3,
+INSERT INTO entity(control_code, entity_class, name, country_id)
+select 'E-' || employeenumber, 3, name,
(select id from country where lower(short_name) = :default_country)
FROM lsmb12.employee;
Modified: trunk/sql/upgrade/1.2-1.3.sql
===================================================================
--- trunk/sql/upgrade/1.2-1.3.sql 2011-10-12 13:01:59 UTC (rev 3845)
+++ trunk/sql/upgrade/1.2-1.3.sql 2011-10-12 13:10:33 UTC (rev 3846)
@@ -368,8 +368,8 @@
ALTER TABLE lsmb12.employee ADD entity_id int;
-INSERT INTO entity(control_code, entity_class, country_id)
-select 'E-' || employeenumber, 3,
+INSERT INTO entity(control_code, entity_class, name, country_id)
+select 'E-' || employeenumber, 3, name,
(select id from country where lower(short_name) = :default_country)
FROM lsmb12.employee;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.