[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5895] trunk



Revision: 5895
          http://sourceforge.net/p/ledger-smb/code/5895
Author:   einhverfr
Date:     2013-07-02 07:09:05 +0000 (Tue, 02 Jul 2013)
Log Message:
-----------
Descriptions can now be locked on invoices and orders ensuring correct links between the description and the inventory record.

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/Form.pm
    trunk/LedgerSMB/Scripts/configuration.pm
    trunk/bin/io.pl
    trunk/bin/is.pl

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2013-06-19 08:11:07 UTC (rev 5894)
+++ trunk/Changelog	2013-07-02 07:09:05 UTC (rev 5895)
@@ -16,6 +16,7 @@
 * Can now print envelopes or shipping labels from many screens (Chris T)
 * Can now select default formats for printed invoices (Chris T)
 * Shipvia is now a text area. (Chris T)
+* Descriptions can now be locked on invoices and orders (Chris T)
 
 Enhancing data integrity
 * No longer allow NULL amounts in acc_trans (Chris T)

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2013-06-19 08:11:07 UTC (rev 5894)
+++ trunk/LedgerSMB/Form.pm	2013-07-02 07:09:05 UTC (rev 5895)
@@ -2518,7 +2518,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: trunk/LedgerSMB/Scripts/configuration.pm
===================================================================
--- trunk/LedgerSMB/Scripts/configuration.pm	2013-06-19 08:11:07 UTC (rev 5894)
+++ trunk/LedgerSMB/Scripts/configuration.pm	2013-07-02 07:09:05 UTC (rev 5895)
@@ -63,6 +63,9 @@
        { name => 'separate_duties',
         label => $locale->text('Separate Duties'),
          type => 'YES_NO', },
+       { name => 'lock_description',
+        label => 'Lock Item Description',
+         type => 'YES_NO', },
      ] },
  { title => $locale->text('Default Accounts'),
    items => [

Modified: trunk/bin/io.pl
===================================================================
--- trunk/bin/io.pl	2013-06-19 08:11:07 UTC (rev 5894)
+++ trunk/bin/io.pl	2013-07-02 07:09:05 UTC (rev 5895)
@@ -153,6 +153,8 @@
 sub display_row {
     my $numrows = shift;
     my $lsmb_module;
+    my $desc_disabled = "";
+    $desc_disabled = 'DISABLED="DISABLED"' if $form->{lock_description};
     if ($form->{vc} eq 'customer'){
        $lsmb_module = 'AR';
     } elsif ($form->{vc} eq 'vendor'){
@@ -276,6 +278,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"};
         }
@@ -330,13 +333,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: trunk/bin/is.pl
===================================================================
--- trunk/bin/is.pl	2013-06-19 08:11:07 UTC (rev 5894)
+++ trunk/bin/is.pl	2013-07-02 07:09:05 UTC (rev 5895)
@@ -472,7 +472,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 separate_duties nextsub default_reportable address city)
+           meta_number separate_duties lock_description nextsub default_reportable address city)
     );
 
     if ($form->{notice}){

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.