[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6226] trunk
- Subject: SF.net SVN: ledger-smb:[6226] trunk
- From: ..hidden..
- Date: Wed, 6 Nov 2013 07:53:44 +0000
Revision: 6226
http://sourceforge.net/p/ledger-smb/code/6226
Author: einhverfr
Date: 2013-11-06 07:53:43 +0000 (Wed, 06 Nov 2013)
Log Message:
-----------
Fixes to Timecard.pm, making it closer to saving timecards
Modified Paths:
--------------
trunk/LedgerSMB/Scripts/timecard.pm
trunk/LedgerSMB/Timecard.pm
trunk/UI/timecards/timecard.html
Modified: trunk/LedgerSMB/Scripts/timecard.pm
===================================================================
--- trunk/LedgerSMB/Scripts/timecard.pm 2013-11-06 06:32:26 UTC (rev 6225)
+++ trunk/LedgerSMB/Scripts/timecard.pm 2013-11-06 07:53:43 UTC (rev 6226)
@@ -22,6 +22,7 @@
use LedgerSMB::Company_Config;
use LedgerSMB::Business_Unit_Class;
use LedgerSMB::Business_Unit;
+use LedgerSMB::Setting;
use DateTime;
=head1 ROUTINES
@@ -78,6 +79,8 @@
@{$request->{b_units}} = LedgerSMB::Business_Unit->list(
$request->{bu_class_id}, undef, 0, $request->{transdate}
);
+ my $curr = LedgerSMB::Setting->get('curr');
+ @{$request->{currencies}} = split /:/, $curr;
$request->{total} = $request->{qty} + $request->{non_billable};
my $template = LedgerSMB::Template->new(
user => $request->{_user},
Modified: trunk/LedgerSMB/Timecard.pm
===================================================================
--- trunk/LedgerSMB/Timecard.pm 2013-11-06 06:32:26 UTC (rev 6225)
+++ trunk/LedgerSMB/Timecard.pm 2013-11-06 07:53:43 UTC (rev 6226)
@@ -88,7 +88,7 @@
=cut
has allocated => (isa => 'LedgerSMB::Moose::Number', is => 'ro',
- required => '1', coerce => 1);
+ required => '0', coerce => 1);
=item sellprice numeric
@@ -97,7 +97,7 @@
=cut
has sellprice => (isa => 'LedgerSMB::Moose::Number', is => 'ro',
- required => '1', coerce => 1);
+ required => '0', coerce => 1);
=item fxsellprice numeric
@@ -107,7 +107,7 @@
=cut
has fxsellprice => (isa => 'LedgerSMB::Moose::Number', is => 'ro',
- required => '1', coerce => 1);
+ required => '0', coerce => 1);
=item serialnumber text
@@ -124,7 +124,7 @@
=cut
-has checkedin => (isa => 'LedgerSMB::Moose::Date', is => 'ro', required => '1',
+has checkedin => (isa => 'LedgerSMB::Moose::Date', is => 'ro', required => '0',
coerce => 1);
=item checkedout timestamp
@@ -134,7 +134,7 @@
=cut
has checkedout => (isa => 'LedgerSMB::Moose::Date', is => 'ro',
- required => '1', coerce => 1);
+ required => '0', coerce => 1);
=item person_id int
@@ -172,7 +172,7 @@
=cut
-has jctype => (is => 'ro', isa => 'Int', required => 1);
+has jctype => (is => 'ro', isa => 'Int', required => 0);
=item curr str
Modified: trunk/UI/timecards/timecard.html
===================================================================
--- trunk/UI/timecards/timecard.html 2013-11-06 06:32:26 UTC (rev 6225)
+++ trunk/UI/timecards/timecard.html 2013-11-06 07:53:43 UTC (rev 6226)
@@ -108,6 +108,17 @@
class = 'qty'
size = 16 } ?></td>
</tr>
+<tr><th><?lsmb text('Currency') ?></th>
+ <td><?lsmb
+ currencies2 = [];
+ FOREACH curr IN currencies;
+ currencies2.push({text = curr, value = curr });
+ END;
+ PROCESS select element_data = {
+ name = "curr"
+ options = currencies2
+ default_values = [curr]
+ }; ?>
<tr><th><?lsmb text('Allocated') ?></th>
<td><?lsmb allocated ?></td>
</tr>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits