[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3984] trunk
- Subject: SF.net SVN: ledger-smb:[3984] trunk
- From: ..hidden..
- Date: Fri, 11 Nov 2011 08:14:49 +0000
Revision: 3984
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3984&view=rev
Author: einhverfr
Date: 2011-11-11 08:14:49 +0000 (Fri, 11 Nov 2011)
Log Message:
-----------
Merging from branches/1.3
Modified Paths:
--------------
trunk/Changelog
trunk/LedgerSMB/DBObject/Company.pm
trunk/LedgerSMB/Database.pm
trunk/LedgerSMB/Form.pm
trunk/LedgerSMB/IR.pm
trunk/LedgerSMB/PE.pm
trunk/LedgerSMB/SODA.pm
trunk/LedgerSMB/Sysconfig.pm
trunk/LedgerSMB/Template/HTML.pm
trunk/LedgerSMB/Template.pm
trunk/UI/Contact/contact.html
trunk/UI/am-defaults.html
trunk/bin/am.pl
trunk/bin/ir.pl
trunk/bin/pe.pl
trunk/sql/Pg-database.sql
trunk/sql/modules/Fixes.sql
trunk/sql/modules/Roles.sql
trunk/templates/demo/invoice.html
Property Changed:
----------------
trunk/
trunk/LedgerSMB/Scripts/admin.pm
trunk/LedgerSMB/Scripts/employee.pm
trunk/LedgerSMB/Scripts/setup.pm
trunk/sql/upgrade/1.2-1.3-manual.sql
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3:3711-3967
+ /branches/1.3:3711-3983
Modified: trunk/Changelog
===================================================================
--- trunk/Changelog 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/Changelog 2011-11-11 08:14:49 UTC (rev 3984)
@@ -9,6 +9,23 @@
Initial Release: Monday, Oct 12 2011
Supported Presently
+Changelog for LedgerSMB 1.3.5
+* Fixing Menu and Permissions bug 3430820 (Chris T)
+* Fixing permissions bug 3433644 (Chris T)
+* Fixing file not found printing HTML invoice (Chris T)
+* Corrected join issues in generating sales orders (Erik H)
+* Removed commits in child subroutines (Herman V)
+* Correcting warnings about HOME not set (Chris T)
+* Corrected debian-specific db creation issue (Pongracz I)
+* Corrected company name representation in timecard->sales order (Chris T)
+* Better error handling when currency not set (Chris T)
+* Exposed adding currency for customer/vendor to UI (Chris T)
+
+Chris T is Chris Travers
+Erik H is Erik Huelsmann
+Herman V is Herman Vierendeels
+Pongracz I is Pongracz Istvan
+
Changelog for LedgerSMB 1.3.4
* Corrected case matching error in upgrade script (Chris T)
* Corrected version number on new databases (Chris T)
Modified: trunk/LedgerSMB/DBObject/Company.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Company.pm 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/LedgerSMB/DBObject/Company.pm 2011-11-11 08:14:49 UTC (rev 3984)
@@ -427,6 +427,14 @@
@{$self->{country_list}} =
$self->exec_method(funcname => 'location_list_country');
+ ($self->{all_currencies}) =
+ $self->exec_method(funcname => 'setting__get_currencies');
+ $self->{all_currencies} = $self->{all_currencies}->{setting__get_currencies};
+
+ for my $curr (@{$self->{all_currencies}}){
+ $curr = { text => $curr };
+ }
+
@{$self->{contact_class_list}} =
$self->exec_method(funcname => 'entity_list_contact_class');
my $country_setting = LedgerSMB::Setting->new({base => $self, copy => 'base'});
Modified: trunk/LedgerSMB/Database.pm
===================================================================
--- trunk/LedgerSMB/Database.pm 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/LedgerSMB/Database.pm 2011-11-11 08:14:49 UTC (rev 3984)
@@ -268,7 +268,7 @@
# We have to use template0 because of issues that Debian has with database
# encoding. Apparently that causes problems for us, so template0 must be
# used.
- my $rc = system("createdb -t template0 -E UTF8 > $temp/dblog");
+ my $rc = system("createdb -T template0 -E UTF8 > $temp/dblog");
if ($rc) {
return $rc;
}
Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/LedgerSMB/Form.pm 2011-11-11 08:14:49 UTC (rev 3984)
@@ -3538,147 +3538,12 @@
=item $form->audittrail($dbh, $myconfig, $audittrail);
-$audittrail is a hashref. If $audittrail->{id} is false, this function
-retrieves the current time from the database and return a string of the form
-"tablename|reference|formname|action|timestamp|" where all the values save
-timestamp are taken directly from the $audittrail hashref.
+Audit trail has been replaced by triggers which work on a very similar manner.
-If $audittrail->{id} is true but the value of audittrail in the defaults table
-is '0', do nothing and return.
-
-If $form->{audittrail} is true and $myconfig is false, $form->{audittrail} is
-treated as a pipe seperated list (trailing pipe required) of the form:
- table1|ref1|form1|action1|date1|...|tablen|refn|formn|actionn|daten|
-
-All the entries described by $form->{audittrail} are inserted into the audit
-table, taking on a transaction id of $audittrail->{id} and the employee id of
-the calling user.
-
-Irrespective of $form->{audittrail} and $myconfig status, this function will add
-a record to the audittrail using the values contained within $audittrail,
-substituting the current date if $audittrail->{transdate} is not set and the
-employee id of the calling user.
-
=cut
sub audittrail {
-
- my ( $self, $dbh, $myconfig, $audittrail ) = @_;
-
- # table, $reference, $formname, $action, $id, $transdate) = @_;
-
- my $query;
- my $rv;
- my $disconnect;
-
- if ( !$dbh ) {
- $dbh = $self->{dbh};
- }
- my $sth;
-
- # if we have an id add audittrail, otherwise get a new timestamp
-
- my @queryargs;
-
- if ( $audittrail->{id} ) {
-
- $query = qq|
- SELECT value FROM defaults
- WHERE setting_key = 'audittrail'|;
-
- if ( $dbh->selectrow_array($query) ) {
-
- my ( $null, $employee_id ) = $self->get_employee($dbh);
-
- if ( $self->{audittrail} && !$myconfig ) {
-
- chop $self->{audittrail};
-
- my @a = split /\|/, $self->{audittrail};
- my %newtrail = ();
- my $key;
- my $i;
- my @flds = qw(tablename reference formname action transdate);
-
- # put into hash and remove dups
- while (@a) {
- $key = "$a[2]$a[3]";
- $i = 0;
- $newtrail{$key} = { map { $_ => $a[ $i++ ] } @flds };
- splice @a, 0, 5;
- }
-
- $query = qq|
- INSERT INTO audittrail
- (trans_id, tablename, reference,
- formname, action, transdate,
- employee_id)
- VALUES (?, ?, ?, ?, ?, ?, ?)|;
-
- my $sth = $dbh->prepare($query) || $self->dberror($query);
-
- foreach $key (
- sort {
- $newtrail{$a}{transdate} cmp $newtrail{$b}{transdate}
- } keys %newtrail
- )
- {
-
- $i = 2;
- $sth->bind_param( 1, $audittrail->{id} );
-
- for (@flds) {
- $sth->bind_param( $i++, $newtrail{$key}{$_} );
- }
- $sth->bind_param( $i++, $employee_id );
- $sth->execute() || $self->dberror($query);
- $sth->finish;
- }
- }
-
- if ( $audittrail->{transdate} ) {
-
- $query = qq|
- INSERT INTO audittrail (
- trans_id, tablename, reference,
- formname, action, employee_id,
- transdate)
- VALUES (?, ?, ?, ?, ?, ?, ?)|;
- @queryargs = (
- $audittrail->{id}, $audittrail->{tablename},
- $audittrail->{reference}, $audittrail->{formname},
- $audittrail->{action}, $employee_id,
- $audittrail->{transdate}
- );
- }
- else {
- $query = qq|
- INSERT INTO audittrail
- (trans_id, tablename, reference,
- formname, action, employee_id)
- VALUES (?, ?, ?, ?, ?, ?)|;
- @queryargs = (
- $audittrail->{id}, $audittrail->{tablename},
- $audittrail->{reference}, $audittrail->{formname},
- $audittrail->{action}, $employee_id,
- );
- }
-
- $sth = $dbh->prepare($query);
- $sth->execute(@queryargs) || $self->dberror($query);
- }
-
- }
- else {
-
- $query = qq|SELECT current_timestamp|;
- my ($timestamp) = $dbh->selectrow_array($query);
-
- $rv =
-"$audittrail->{tablename}|$audittrail->{reference}|$audittrail->{formname}|$audittrail->{action}|$timestamp|";
- }
-
- $rv;
+ return;
}
Modified: trunk/LedgerSMB/IR.pm
===================================================================
--- trunk/LedgerSMB/IR.pm 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/LedgerSMB/IR.pm 2011-11-11 08:14:49 UTC (rev 3984)
@@ -197,7 +197,7 @@
: $form->parse_amount( $myconfig, $form->{exchangerate} );
- my $taxformfound=IR->taxform_exist($form,$form->{"vendor_id"});
+ my $taxformfound=IR->taxform_exist($form,$form->{"vendor_id"});#tshvr this always returns true!!
for my $i ( 1 .. $form->{rowcount} ) {
$form->{"qty_$i"} = $form->parse_amount( $myconfig, $form->{"qty_$i"} );
@@ -620,11 +620,13 @@
for $taccno (split / /, $form->{taxaccounts}){
my $taxamount;
my $taxbasis;
+ my $taxrate;
my $fx = $form->{exchangerate} || 1;
$taxamount = $form->parse_amount($myconfig,
$form->{"mt_amount_$taccno"});
$taxbasis = $form->parse_amount($myconfig,
$form->{"mt_basis_$taccno"});
+ $taxrate=$form->parse_amount($myconfig,$form->{"mt_rate_$taccno"});
my $fx_taxamount = $taxamount * $fx;
my $fx_taxbasis = $taxbasis * $fx;
$form->{payables} += $fx_taxamount;
@@ -632,7 +634,7 @@
$ac_sth->execute($taccno, $form->{id}, $fx_taxamount * -1,
$form->{"mt_ref_$taccno"},
$form->{"mt_desc_$taccno"});
- $tax_sth->execute($fx_taxbasis * -1, $form->{"mt_rate_$taccno"});
+ $tax_sth->execute($fx_taxbasis * -1, $taxrate);
}
$ac_sth->finish;
$tax_sth->finish;
@@ -981,6 +983,28 @@
}
$sth->finish;
+ #tshvr delete tax_extended invoice_tax_form
+ $query=qq|SELECT entry_id FROM acc_trans ac JOIN tax_extended t using(entry_id) WHERE ac.trans_id = ?|;
+ $sth = $dbh->prepare($query);
+ $sth->execute($form->{id}) || $form->dberror($query);
+ while ( my $entry_id=$sth->fetchrow_array ) {
+ my $query1="DELETE FROM tax_extended WHERE entry_id=?";
+ my $sth1 = $dbh->prepare($query1);
+ $sth1->execute($entry_id) || $form->dberror($query);
+ $sth1->finish;
+ }#while entry_id
+ $sth->finish;
+ $query=qq|select id from invoice WHERE trans_id=?|;
+ $sth = $dbh->prepare($query);
+ $sth->execute($form->{id}) || $form->dberror($query);
+ while(my $invoice_id=$sth->fetchrow()){
+ my $query1=qq|delete from invoice_tax_form where invoice_id=?|;
+ my $sth1 = $dbh->prepare($query1);
+ $sth1->execute($invoice_id) || $form->dberror($query);
+ $sth1->finish;
+ }#while invoice_id
+ $sth->finish;
+ #tshvr delete tax_extended invoice_tax_form end
# delete acc_trans
$query = qq|DELETE FROM acc_trans WHERE trans_id = ?|;
$sth = $dbh->prepare($query);
@@ -995,7 +1019,7 @@
$sth = $dbh->prepare($query);
$sth->execute( $form->{id} ) || $form->dberror($query);
- $dbh->commit;
+ #$dbh->commit;#tshvr lower-level sub should not commit on behalf of higher-level sub
}
@@ -1067,9 +1091,9 @@
if $spoolfile;
}
}
- $query = "DELETE FROM invoice WHERE trans_id = ?";
- $sth = $dbh->prepare($query);
- $sth->execute($form->{id});
+ #$query = "DELETE FROM invoice WHERE trans_id = ?";#tshvr already done in reverse_invoice
+ #$sth = $dbh->prepare($query);
+ #$sth->execute($form->{id});
# delete AP record
$query = qq|DELETE FROM ap WHERE id = ?|;
$sth = $dbh->prepare($query);
@@ -1098,11 +1122,12 @@
WHERE ac.trans_id = ?|);
$tax_sth->execute($form->{id});
while (my $taxref = $tax_sth->fetchrow_hashref('NAME_lc')){
+ $form->db_parse_numeric(sth=>$tax_sth,hashref=>$taxref);
$form->{manual_tax} = 1;
my $taccno = $taxref->{accno};
- $form->{"mt_amount_$taccno"} = $taxref->{amount} * -1;
+ $form->{"mt_amount_$taccno"} = Math::BigFloat->new($taxref->{amount} * -1);
$form->{"mt_rate_$taccno"} = $taxref->{rate};
- $form->{"mt_basis_$taccno"} = $taxref->{tax_basis} * -1;
+ $form->{"mt_basis_$taccno"} = Math::BigFloat->new($taxref->{tax_basis} * -1);
$form->{"mt_memo_$taccno"} = $taxref->{memo};
$form->{"mt_ref_$taccno"} = $taxref->{source};
}
@@ -1638,7 +1663,7 @@
$sth->execute($invoice_id,$report) || $form->dberror("$query");
}
- $dbh->commit();
+ #$dbh->commit();#tshvr lower-level sub should not commit on behalf of higher-level sub
}
Modified: trunk/LedgerSMB/PE.pm
===================================================================
--- trunk/LedgerSMB/PE.pm 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/LedgerSMB/PE.pm 2011-11-11 08:14:49 UTC (rev 3984)
@@ -1722,9 +1722,10 @@
my $dbh = $form->{dbh};
my $query = qq|SELECT curr FROM entity_credit_account WHERE id = ?|;
my $sth = $dbh->prepare($query) || $form->dberror($query);
- $sth->execute( $form->{customer_id} ) || $form->dberror($query);
- my ($curr) = $sth->fetchrow_array || $form->dberror($query);
+ $sth->execute( $form->{customer_id} );# || $form->dberror($query);
+ my ($curr) = $sth->fetchrow_array;# || $form->dberror($query);
$form->{currency} = $curr;
+ $curr || $form->error('No currency found');
}
=item PE::project_sales_order("", $myconfig, $form)
@@ -1834,7 +1835,7 @@
SELECT j.id, j.description, j.qty - j.allocated AS qty,
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,
+ j.notes, c.legal_name AS customer, pr.projectnumber,
p.partnumber
FROM jcitems j
JOIN project pr ON (pr.id = j.project_id)
@@ -1844,12 +1845,11 @@
WHERE pr.parts_id IS NULL
AND j.allocated != j.qty $where
ORDER BY pr.projectnumber, c.name, j.checkedin::date|;
-
if ( $form->{summary} ) {
$query =~ s/j\.description/p\.description/;
$query =~ s/c\.name,/c\.name, j\.parts_id, /;
}
-
+
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
Modified: trunk/LedgerSMB/SODA.pm
===================================================================
--- trunk/LedgerSMB/SODA.pm 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/LedgerSMB/SODA.pm 2011-11-11 08:14:49 UTC (rev 3984)
@@ -650,7 +650,8 @@
}
} else {
my $attquery = "
- SELECT attname, attnum FROM pg_attribute
+ SELECT attname, attnum
+ FROM pg_attribute
WHERE attrelid = (SELECT oid FROM pg_class WHERE relname = ?)
";
my $attsth = $dbh->prepare($attquery);
Property changes on: trunk/LedgerSMB/Scripts/admin.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-3967
/branches/1.3/scripts/admin.pl:3711-3903
+ /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-3983
/branches/1.3/scripts/admin.pl:3711-3903
Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-3967
/branches/1.3/scripts/employee.pl:3842-3843
+ /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-3983
/branches/1.3/scripts/employee.pl:3842-3843
Property changes on: trunk/LedgerSMB/Scripts/setup.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-3967
/branches/1.3/scripts/setup.pl:3711-3967
+ /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-3983
/branches/1.3/scripts/setup.pl:3711-3967
Modified: trunk/LedgerSMB/Sysconfig.pm
===================================================================
--- trunk/LedgerSMB/Sysconfig.pm 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/LedgerSMB/Sysconfig.pm 2011-11-11 08:14:49 UTC (rev 3984)
@@ -67,6 +67,7 @@
# Temporary files stored at"
our $tempdir = ( $ENV{TEMP} || '/tmp' );
+$ENV{HOME} = $tempdir;
our $cache_template_dir = "$tempdir/lsmb_templates";
# Backup path
Modified: trunk/LedgerSMB/Template/HTML.pm
===================================================================
--- trunk/LedgerSMB/Template/HTML.pm 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/LedgerSMB/Template/HTML.pm 2011-11-11 08:14:49 UTC (rev 3984)
@@ -64,7 +64,6 @@
my $vars;
my $type = ref $rawvars;
- #XXX fix escaping function
return $rawvars if $type =~ /^LedgerSMB::Locale/;
return unless defined $rawvars;
if ( $type eq 'ARRAY' ) {
@@ -124,14 +123,14 @@
$tempdir = undef;
}
$template = Template->new({
- INCLUDE_PATH => [$parent->{include_path}, 'UI/lib'],
+ INCLUDE_PATH => [$parent->{include_path_lang}, $parent->{include_path}, 'UI/lib'],
+ ENCODING => 'utf8',
START_TAG => quotemeta('<?lsmb'),
END_TAG => quotemeta('?>'),
DELIMITER => ';',
TRIM => 1,
COMPILE_DIR=> $tempdir,
DEBUG => ($parent->{debug})? 'dirs': undef,
- ENCODING => 'utf8',
DEBUG_FORMAT => '',
}) || throw Error::Simple Template->error();
if (not $template->process(
Modified: trunk/LedgerSMB/Template.pm
===================================================================
--- trunk/LedgerSMB/Template.pm 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/LedgerSMB/Template.pm 2011-11-11 08:14:49 UTC (rev 3984)
@@ -190,9 +190,8 @@
throw Error::Simple 'Invalid language';
return undef;
}
- $self->{include_path} = "$self->{'include_path'}"
- ."/$self->{language}"
- .";$self->{'include_path'}";
+ $self->{include_path_lang} = "$self->{'include_path'}"
+ ."/$self->{language}";
$self->{locale}
= LedgerSMB::Locale->get_handle($self->{language});
}
@@ -343,13 +342,11 @@
}
if ($self->{mimetype} =~ /^text/) {
print "Content-Type: $self->{mimetype}; charset=utf-8$disposition\n\n";
- binmode STDOUT, ':utf8';
} else {
print "Content-Type: $self->{mimetype}$disposition\n\n";
- binmode STDOUT, ':bytes';
}
- print $data;
binmode STDOUT, ':utf8';
+ print $data;
}
sub _http_output_file {
Modified: trunk/UI/Contact/contact.html
===================================================================
--- trunk/UI/Contact/contact.html 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/UI/Contact/contact.html 2011-11-11 08:14:49 UTC (rev 3984)
@@ -9,6 +9,7 @@
?>
<?lsmb PROCESS 'elements.html' ?>
<?lsmb IF !country_id; country_id = default_country; END -?>
+<?lsmb IF !country_id_t; country_id_t = default_country; END -?>
<?lsmb
# Adding the action requirement to the conditional because otherwise it still
# breaks. --CT
@@ -43,6 +44,7 @@
<?lsmb IF meta_number ?>
<div class="pageheading"><?lsmb text('Account') ?>: <?lsmb meta_number ?></div>
<?lsmb END ?>
+<?lsmb notice = line_one ?>
<?lsmb IF notice ?>
<div class="notice"><?lsmb notice ?></div>
<?lsmb END ?>
@@ -96,7 +98,7 @@
name = "entity_id"
value = entity_id
} ?>
-<div class="input" id="person_name_div"><?lsmb #text('Name')?>
+<div class="input" id="person_name_div"><?lsmb #text('Name:')?>
<div class="input_group">
<!-- TODO: Add Saluatation -->
<?lsmb PROCESS input element_data = {
@@ -323,7 +325,7 @@
value_attr = "id"
default_values = [country_id]
options = country_list
- name = "country_id"
+ name = "country_id_t"
label = text('Country')
} ?>
</div>
@@ -583,6 +585,15 @@
label = text('Taxforms')
} ?>
</td>
+ <td> <?lsmb INCLUDE select element_data = {
+ name = 'curr'
+ options = all_currencies
+ text_attr = 'text'
+ value_attr = 'text'
+ default_values = [curr]
+ label = text('Currency')
+ } ?>
+ </td>
</tr>
@@ -766,7 +777,7 @@
</select>
</div>
<div>
- <?lsmb PROCESS input element_data = {
+ <?lsmb INCLUDE input element_data = {
label = text('Address'),
name = "line_one",
value = line_one,
Modified: trunk/UI/am-defaults.html
===================================================================
--- trunk/UI/am-defaults.html 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/UI/am-defaults.html 2011-11-11 08:14:49 UTC (rev 3984)
@@ -30,6 +30,10 @@
<th align="right"><?lsmb text('Weight Unit') ?></th>
<td><input name="weightunit" size="5" value="<?lsmb form.weightunit ?>" /></td>
</tr>
+ <tr>
+ <th align="right"><?lsmb text('Separate Duties') ?></th>
+ <td><input name="separate_duties" size="5" value="<?lsmb form.separate_duties ?>" /></td>
+ </tr
</table>
</td>
</tr>
Modified: trunk/bin/am.pl
===================================================================
--- trunk/bin/am.pl 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/bin/am.pl 2011-11-11 08:14:49 UTC (rev 3984)
@@ -77,7 +77,7 @@
{ name => 'company_fax', label => $locale->text('Company Fax') },
);
-my @default_others = qw(businessnumber weightunit
+my @default_others = qw(businessnumber weightunit separate_duties
IC IC_income IC_expense
FX_gain FX_loss default_country templates curr);
Modified: trunk/bin/ir.pl
===================================================================
--- trunk/bin/ir.pl 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/bin/ir.pl 2011-11-11 08:14:49 UTC (rev 3984)
@@ -571,16 +571,28 @@
!defined $form->{"mt_rate_$item"}){
$form->{"mt_rate_$item"} = $form->{tax_obj}{$item}->rate;
}
+ else
+ {
+ $form->{"mt_rate_$item"}=$form->parse_amount(\%myconfig,$form->{"mt_rate_$item"});
+ }
if ($form->{"mt_basis_$item"} eq '' or
!defined $form->{"mt_basis_$item"}){
$form->{"mt_basis_$item"} = $form->{taxbasis}{$item};
}
+ else
+ {
+ $form->{"mt_basis_$item"}=$form->parse_amount(\%myconfig,$form->{"mt_basis_$item"});
+ }
if ($form->{"mt_amount_$item"} eq '' or
!defined $form->{"mt_amount_$item"}){
$form->{"mt_amount_$item"} =
$form->{"mt_rate_$item"}
* $form->{"mt_basis_$item"};
}
+ else
+ {
+ $form->{"mt_amount_$item"}=$form->parse_amount(\%myconfig,$form->{"mt_amount_$item"});
+ }
$form->{invtotal} += $form->round_amount(
$form->{"mt_amount_$item"}, 2);
# Setting this up as a table
@@ -591,13 +603,13 @@
<th align=right>$form->{"${taccno}_description"}</th>
<td><input type="text" name="mt_amount_$item"
id="mt-amount-$item" value="|
- .$form->{"mt_amount_$item"} .qq|" size="10"/></td>
+ .$form->format_amount(\%myconfig,$form->{"mt_amount_$item"}).qq|" size="10"/></td>
<td><input type="text" name="mt_rate_$item"
id="mt-rate-$item" value="|
- .$form->{"mt_rate_$item"} .qq|" size="6"/></td>
+ .$form->format_amount(\%myconfig,$form->{"mt_rate_$item"}).qq|" size="6"/></td>
<td><input type="text" name="mt_basis_$item"
id="mt-basis-$item" value="|
- .$form->{"mt_basis_$item"} .qq|" size="10" /></td>
+ .$form->format_amount(\%myconfig,$form->{"mt_basis_$item"}).qq|" size="10" /></td>
<td><input type="text" name="mt_ref_$item"
id="mt-ref-$item" value="|
.$form->{"mt_ref_$item"} .qq|" size="10"/></td>
@@ -1372,12 +1384,14 @@
{
IR->update_invoice_tax_form($form,$form->{dbh},$form->{"invoice_id_$i"},"true") if($form->{"invoice_id_$i"});
+ $form->{$dbh}->commit();#highest-level sub should commit
}
else
{
IR->update_invoice_tax_form($form,$form->{dbh},$form->{"invoice_id_$i"},"false") if($form->{"invoice_id_$i"});
+ $form->{$dbh}->commit();#highest-level sub should commit
}
Modified: trunk/bin/pe.pl
===================================================================
--- trunk/bin/pe.pl 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/bin/pe.pl 2011-11-11 08:14:49 UTC (rev 3984)
@@ -2571,7 +2571,6 @@
# flatten array
$i = 1;
foreach $ref ( @{ $form->{jcitems} } ) {
-
if ( $form->{summary} ) {
$thisitem =
Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/sql/Pg-database.sql 2011-11-11 08:14:49 UTC (rev 3984)
@@ -2603,8 +2603,8 @@
82 module pe.pl 196
83 action add 198
83 module pe.pl 199
-83 type partsgroup 200
-82 type pricegroup 197
+83 type pricegroup 200
+82 type partsgroup 197
84 module ic.pl 202
84 action stock_assembly 203
85 menu 1 204
@@ -2623,10 +2623,10 @@
90 module ic.pl 217
90 searchitems labor 218
91 module pe.pl 221
-91 type pricegroup 222
+91 type partsgroup 222
91 action search 220
92 module pe.pl 224
-92 type partsgroup 225
+92 type pricegroup 225
92 action search 223
93 action search 226
93 module ic.pl 227
Modified: trunk/sql/modules/Fixes.sql
===================================================================
--- trunk/sql/modules/Fixes.sql 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/sql/modules/Fixes.sql 2011-11-11 08:14:49 UTC (rev 3984)
@@ -17,4 +17,11 @@
update menu_attribute set id = '152' where value =
'consolidate_sales_order' and node_id = '64';
+-- fix for bug 3430820
+update menu_attribute set value = 'pricegroup' where node_id = '83' and attribute = 'type';
+update menu_attribute set value = 'partsgroup' where node_id = '82' and attribute = 'type';
+
+UPDATE menu_attribute SET value = 'partsgroup' WHERE node_id = 91 and attribute = 'type';
+UPDATE menu_attribute SET value = 'pricegroup' WHERE node_id = 92 and attribute = 'type';
+
COMMIT;
Modified: trunk/sql/modules/Roles.sql
===================================================================
--- trunk/sql/modules/Roles.sql 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/sql/modules/Roles.sql 2011-11-11 08:14:49 UTC (rev 3984)
@@ -749,7 +749,7 @@
IN ROLE "lsmb_<?lsmb dbname ?>__contact_read";
GRANT ALL ON partsvendor, partscustomer TO "lsmb_<?lsmb dbname ?>__part_create";
-GRANT INSERT ON parts, makemodel TO "lsmb_<?lsmb dbname ?>__part_create";
+GRANT INSERT ON parts, makemodel, partsgroup, assembly TO "lsmb_<?lsmb dbname ?>__part_create";
GRANT ALL ON parts_id_seq TO "lsmb_<?lsmb dbname ?>__part_create";
GRANT INSERT ON partstax TO "lsmb_<?lsmb dbname ?>__part_create";
@@ -770,7 +770,7 @@
CREATE ROLE "lsmb_<?lsmb dbname ?>__part_edit"
WITH INHERIT NOLOGIN;
-GRANT UPDATE ON parts TO "lsmb_<?lsmb dbname ?>__part_edit";
+GRANT UPDATE ON parts, partsgroup, assembly TO "lsmb_<?lsmb dbname ?>__part_edit";
GRANT ALL ON makemodel TO "lsmb_<?lsmb dbname ?>__part_edit";
--###oldcode: Should have been UPDATE
GRANT ALL ON partstax TO "lsmb_<?lsmb dbname ?>__part_edit";
Property changes on: trunk/sql/upgrade/1.2-1.3-manual.sql
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-3967
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
+ /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-3983
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
Modified: trunk/templates/demo/invoice.html
===================================================================
--- trunk/templates/demo/invoice.html 2011-11-11 08:05:07 UTC (rev 3983)
+++ trunk/templates/demo/invoice.html 2011-11-11 08:14:49 UTC (rev 3984)
@@ -1,9 +1,8 @@
-
-<body bgcolor=ffffff>
-
+<html>
+<body>
<table width="100%">
- <?lsmb INCLUDE letterhead.html ?>
+ <?lsmb INCLUDE "letterhead.html" ?>
<tr>
<td width=10> </td>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.