[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6172] trunk
- Subject: SF.net SVN: ledger-smb:[6172] trunk
- From: ..hidden..
- Date: Wed, 23 Oct 2013 13:53:58 +0000
Revision: 6172
http://sourceforge.net/p/ledger-smb/code/6172
Author: einhverfr
Date: 2013-10-23 13:53:58 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Series code is coded for business units but relatively untested
Modified Paths:
--------------
trunk/LedgerSMB/Scripts/business_unit.pm
trunk/LedgerSMB/Scripts/configuration.pm
trunk/UI/business_units/edit.html
Modified: trunk/LedgerSMB/Scripts/business_unit.pm
===================================================================
--- trunk/LedgerSMB/Scripts/business_unit.pm 2013-10-23 13:45:49 UTC (rev 6171)
+++ trunk/LedgerSMB/Scripts/business_unit.pm 2013-10-23 13:53:58 UTC (rev 6172)
@@ -9,6 +9,7 @@
use LedgerSMB::DBObject::App_Module;
use LedgerSMB::Business_Unit;
use LedgerSMB::Template;
+use LedgerSMB::Setting::Sequence;
use Carp;
$Carp::Verbose = 1;
@@ -53,7 +54,11 @@
my ($request) = @_;
if (!$request->{class_id}){
$request->{class_id} = $request->{id};
+ delete $request->{id};
}
+ @{$request->{sequences}} =
+ LedgerSMB::Setting::Sequence->list('projectnumber')
+ unless $request->{id};
$request->{control_code} = '';
my $b_unit = LedgerSMB::Business_Unit->new(%$request);
@{$request->{parent_options}} = $b_unit->list($request->{class_id});
@@ -195,6 +200,13 @@
sub save {
my ($request) = @_;
+ if ($request->{sequence}){
+ $request->{control_code} =
+ LedgerSMB::Setting::Sequence->increment($request->{sequence},
+ $request)
+ if LedgerSMB::Setting::Sequence->should_increment(
+ $request, 'control_code', $request->{sequence});
+ }
$request->{start_date} = LedgerSMB::PGDate->from_input($request->{start_date}, 0)
if defined $request->{start_date};
$request->{end_date} = LedgerSMB::PGDate->from_input($request->{end_date}, 0)
Modified: trunk/LedgerSMB/Scripts/configuration.pm
===================================================================
--- trunk/LedgerSMB/Scripts/configuration.pm 2013-10-23 13:45:49 UTC (rev 6171)
+++ trunk/LedgerSMB/Scripts/configuration.pm 2013-10-23 13:53:58 UTC (rev 6172)
@@ -100,7 +100,7 @@
{ name => 'ponumber', label => $locale->text('Purchase Order Number') },
{ name => 'rfqnumber', label => $locale->text('RFQ Number') },
{ name => 'partnumber', label => $locale->text('Part Number') },
- { name => 'projectnumber', label => $locale->text('Job/Project Number') },
+ { name => 'projectnumber', label => $locale->text('Business Unit Number') },
{ name => 'employeenumber', label => $locale->text('Employee Number') },
{ name => 'customernumber', label => $locale->text('Customer Number') },
{ name => 'vendornumber', label => $locale->text('Vendor Number') },
Modified: trunk/UI/business_units/edit.html
===================================================================
--- trunk/UI/business_units/edit.html 2013-10-23 13:45:49 UTC (rev 6171)
+++ trunk/UI/business_units/edit.html 2013-10-23 13:53:58 UTC (rev 6172)
@@ -3,7 +3,7 @@
stylesheet = USER.stylesheet
?>
<?lsmb PROCESS 'elements.html' ?>
-<body onLoad="init()">
+<body onLoad="init()" class="<?lsmb dojo_theme ?>">
<div class="listtop">
<?lsmb
IF id;
@@ -26,8 +26,18 @@
value = control_code
label = text('Control Code') #'
size = 16
-} ?>
-<?lsmb PROCESS select element_data = {
+};
+IF sequences;
+ PROCESS select element_data = {
+ class = "sequence"
+ name = "sequence"
+ options = sequences
+ default_values = [sequence]
+ text_attr = 'label'
+ value_attr = 'label'
+ };
+END;
+PROCESS select element_data = {
label = text('Parent')
class = "parent"
options = parent_options
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits