[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4053] trunk
- Subject: SF.net SVN: ledger-smb:[4053] trunk
- From: ..hidden..
- Date: Thu, 24 Nov 2011 14:34:42 +0000
Revision: 4053
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4053&view=rev
Author: einhverfr
Date: 2011-11-24 14:34:41 +0000 (Thu, 24 Nov 2011)
Log Message:
-----------
Merging from 1.3
Modified Paths:
--------------
trunk/Changelog
trunk/LedgerSMB/AM.pm
trunk/LedgerSMB/Form.pm
trunk/LedgerSMB/ScriptLib/Company.pm
trunk/UI/Contact/pricelist.html
trunk/bin/am.pl
Property Changed:
----------------
trunk/
trunk/LedgerSMB/Scripts/admin.pm
trunk/LedgerSMB/Scripts/employee.pm
trunk/LedgerSMB/Scripts/payment.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-4046
+ /branches/1.3:3711-4052
Modified: trunk/Changelog
===================================================================
--- trunk/Changelog 2011-11-24 14:27:22 UTC (rev 4052)
+++ trunk/Changelog 2011-11-24 14:34:41 UTC (rev 4053)
@@ -11,6 +11,8 @@
Changelog for LedgerSMB 1.3.7
* Added foreign key of entity_credit_account.language_code (Herman V)
+* Fixed pricelist button (customer/vendor) producing error (Chris T)
+* Fixed date error when processing recurring transactions (Chris T)
Changelog for LedgerSMB 1.3.6
* Including xelatex templates under directory templates/xedemo (Chris T)
Modified: trunk/LedgerSMB/AM.pm
===================================================================
--- trunk/LedgerSMB/AM.pm 2011-11-24 14:27:22 UTC (rev 4052)
+++ trunk/LedgerSMB/AM.pm 2011-11-24 14:34:41 UTC (rev 4053)
@@ -1276,7 +1276,8 @@
chop $form->{recurringemail};
chop $form->{recurringprint};
- for (qw(arinvoice apinvoice)) { delete $form->{$_} }
+ for (qw(arinvoice apinvoice invnumber)) { delete $form->{$_} }
+
$dbh->commit;
Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm 2011-11-24 14:27:22 UTC (rev 4052)
+++ trunk/LedgerSMB/Form.pm 2011-11-24 14:34:41 UTC (rev 4053)
@@ -759,6 +759,35 @@
$sortorder;
}
+=item $form->convert_date($date, $myconfig)
+
+This takes a date in YYYY-MM-DD format and returns it in the format of the user.
+
+=cut
+
+sub convert_date {
+ my $self = shift @_;
+ my ($date, $myconfig) = @_;
+ my $newdate;
+ my $format = $myconfig->{dateformat};
+ my ($YYYY, $MM, $DD) = split /-/, $date;
+ $format =~ /(\w+)(\W)(\w+)\W(\w+)/;
+ my $first = $1;
+ my $sep = $2;
+ my $second = $3;
+ my $third = $4;
+
+ my @elems;
+ for my $pos ($first, $second, $third){
+ push @elems, $YYYY if uc($pos) eq 'YYYY';
+ push @elems, $MM if uc($pos) eq 'MM';
+ push @elems, $DD if uc($pos) eq 'DD';
+ }
+ $newdate = "$elems[0]$sep$elems[1]$sep$elems[2]";
+
+ return $newdate;
+}
+
=item $form->format_amount($myconfig, $amount, $places, $dash);
Returns $amount as formatted in the form specified by $form->{numberformat}.
Modified: trunk/LedgerSMB/ScriptLib/Company.pm
===================================================================
--- trunk/LedgerSMB/ScriptLib/Company.pm 2011-11-24 14:27:22 UTC (rev 4052)
+++ trunk/LedgerSMB/ScriptLib/Company.pm 2011-11-24 14:34:41 UTC (rev 4053)
@@ -992,6 +992,19 @@
my $company = new_company($request);
$company->get();
$company->get_pricematrix();
+ for my $l (qw(pricematrix pricematrix_pricegroup)){
+ for my $p (@{$company->{$l}}){
+ $p->{sellprice} = $company->format_amount(
+ {amount => $p->{sellprice}, money => 1}
+ );
+ $p->{pricebreak} = $company->format_amount(
+ {amount => $p->{sellprice}, money => 1}
+ );
+ $p->{lastcost} = $company->format_amount(
+ {amount => $p->{sellprice}, money => 1}
+ );
+ }
+ }
my $template = LedgerSMB::Template->new(
user => $request->{_user},
path => 'UI/Contact' ,
@@ -1000,7 +1013,7 @@
locale => $company->{_locale},
);
- $template->render($request);
+ $template->render($company);
}
Property changes on: trunk/LedgerSMB/Scripts/admin.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4046
/branches/1.3/scripts/admin.pl:3711-3903
+ /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4052
/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-4046
/branches/1.3/scripts/employee.pl:3842-3843
+ /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4052
/branches/1.3/scripts/employee.pl:3842-3843
Property changes on: trunk/LedgerSMB/Scripts/payment.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4046
/branches/1.3/scripts/payment.pl:3711-4011
+ /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4052
/branches/1.3/scripts/payment.pl:3711-4011
Property changes on: trunk/LedgerSMB/Scripts/setup.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4046
/branches/1.3/scripts/setup.pl:3711-3967
+ /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4052
/branches/1.3/scripts/setup.pl:3711-3967
Modified: trunk/UI/Contact/pricelist.html
===================================================================
--- trunk/UI/Contact/pricelist.html 2011-11-24 14:27:22 UTC (rev 4052)
+++ trunk/UI/Contact/pricelist.html 2011-11-24 14:34:41 UTC (rev 4053)
@@ -10,6 +10,7 @@
-CT
-->
+<?lsmb account_class = entity_class ?>
<body>
<div class="listtop"><?lsmb text('Pricelist') ?> <?lsmb pricematrix.length ?></div>
<table>
Modified: trunk/bin/am.pl
===================================================================
--- trunk/bin/am.pl 2011-11-24 14:27:22 UTC (rev 4052)
+++ trunk/bin/am.pl 2011-11-24 14:34:41 UTC (rev 4053)
@@ -2522,12 +2522,13 @@
}
$form->{invnumber} = $pt->{reference};
- $form->{transdate} = $pt->{nextdate};
# tax accounts
$form->all_taxaccounts( \%myconfig, undef,
$form->{transdate} );
-
+ $form->{transdate} = $form->convert_date(
+ $pt->{nextdate}, \%myconfig
+ );
# calculate duedate
$form->{duedate} =
$form->add_date( \%myconfig, $form->{transdate},
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-4046
/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-4052
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.