[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5900] branches/1.3
- Subject: SF.net SVN: ledger-smb:[5900] branches/1.3
- From: ..hidden..
- Date: Thu, 4 Jul 2013 07:12:25 +0000
Revision: 5900
http://sourceforge.net/p/ledger-smb/code/5900
Author: einhverfr
Date: 2013-07-04 07:12:24 +0000 (Thu, 04 Jul 2013)
Log Message:
-----------
merging in abiity to lock descriptions as a developers-only feature, exposed and fully supported in 1.4
Modified Paths:
--------------
branches/1.3/LedgerSMB/Form.pm
branches/1.3/bin/io.pl
branches/1.3/bin/is.pl
branches/1.3/sql/modules/Settings.sql
Modified: branches/1.3/LedgerSMB/Form.pm
===================================================================
--- branches/1.3/LedgerSMB/Form.pm 2013-07-03 16:10:13 UTC (rev 5899)
+++ branches/1.3/LedgerSMB/Form.pm 2013-07-04 07:12:24 UTC (rev 5900)
@@ -2696,7 +2696,7 @@
$self->lastname_used( $myconfig, $dbh, $vc, $module );
}
}
- for (qw(separate_duties current_date curr closedto revtrans)) {
+ for (qw(separate_duties current_date curr closedto revtrans lock_description)) {
if ($_ eq 'closedto'){
$query = qq|
SELECT value::date FROM defaults
Modified: branches/1.3/bin/io.pl
===================================================================
--- branches/1.3/bin/io.pl 2013-07-03 16:10:13 UTC (rev 5899)
+++ branches/1.3/bin/io.pl 2013-07-04 07:12:24 UTC (rev 5900)
@@ -127,7 +127,8 @@
sub display_row {
my $numrows = shift;
-
+ my $desc_disabled = "";
+ $desc_disabled = 'DISABLED="DISABLED"' if $form->{lock_description};
@column_index = qw(runningnumber partnumber description qty);
if ( $form->{type} eq "sales_order" ) {
@@ -236,6 +237,7 @@
$spc = substr( $myconfig{numberformat}, -3, 1 );
for $i ( 1 .. $numrows ) {
+ $desc_disabled = '' if $i == $numrows;
if ( $spc eq '.' ) {
( $null, $dec ) = split /\./, $form->{"sellprice_$i"};
}
@@ -290,13 +292,13 @@
$form->{"description_$i"} =
$form->quote( $form->{"description_$i"} );
$column_data{description} =
-qq|<td><textarea name="description_$i" rows=$rows cols=46 wrap=soft>$form->{"description_$i"}</textarea></td>|;
+qq|<td><textarea name="description_$i" rows=$rows $desc_disabled cols=46 wrap=soft>$form->{"description_$i"}</textarea></td>|;
}
else {
$form->{"description_$i"} =
$form->quote( $form->{"description_$i"} );
$column_data{description} =
-qq|<td><input name="description_$i" size=48 value="$form->{"description_$i"}"></td>|;
+qq|<td><input name="description_$i" $desc_disabled size=48 value="$form->{"description_$i"}"></td>|;
}
for (qw(partnumber sku unit)) {
Modified: branches/1.3/bin/is.pl
===================================================================
--- branches/1.3/bin/is.pl 2013-07-03 16:10:13 UTC (rev 5899)
+++ branches/1.3/bin/is.pl 2013-07-04 07:12:24 UTC (rev 5900)
@@ -466,7 +466,7 @@
qw(form_id id type printed emailed queued title vc terms discount
creditlimit creditremaining tradediscount business closedto locked
shipped oldtransdate recurring reverse batch_id subtype
- meta_number nextsub default_reportable address city)
+ meta_number nextsub default_reportable address city lock_description)
);
if ($form->{notice}){
Modified: branches/1.3/sql/modules/Settings.sql
===================================================================
--- branches/1.3/sql/modules/Settings.sql 2013-07-03 16:10:13 UTC (rev 5899)
+++ branches/1.3/sql/modules/Settings.sql 2013-07-04 07:12:24 UTC (rev 5900)
@@ -13,7 +13,7 @@
UPDATE defaults SET value = in_value WHERE setting_key = in_key;
IF NOT FOUND THEN
INSERT INTO defaults (setting_key, value)
- VALUES (in_setting_key, in_value);
+ VALUES (in_key, in_value);
END IF;
RETURN TRUE;
END;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.