[freeside-commits] freeside/httemplate/edit/elements svc_Common.html, 1.11, 1.12

Ivan,,, ivan at wavetail.420.am
Mon Mar 1 14:18:13 PST 2010


Update of /home/cvs/cvsroot/freeside/httemplate/edit/elements
In directory wavetail.420.am:/tmp/cvs-serv28907/httemplate/edit/elements

Modified Files:
	svc_Common.html 
Log Message:
fixup editing w/manual inventory, RT#7010

Index: svc_Common.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/elements/svc_Common.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -d -r1.11 -r1.12
--- svc_Common.html	1 Mar 2010 19:29:18 -0000	1.11
+++ svc_Common.html	1 Mar 2010 22:18:11 -0000	1.12
@@ -65,15 +65,20 @@
                    } elsif ( $flag eq 'A' ) {
                      $f->{'type'} = 'hidden';
                    } elsif ( $flag eq 'M' ) {
+                     $f->{'empty_label'} = 'Select inventory item';
                      $f->{'type'}      = 'select-table';
                      $f->{'table'}     = 'inventory_item';
                      $f->{'name_col'}  = 'item'; 
                      $f->{'value_col'} = 'item'; 
                      $f->{'hashref'}   = {
                                           'classnum' => $columndef->columnvalue,
-                                          'svcnum'   => '',
+                                            #'svcnum'  => '',
                                          };
-                     $f->{'empty_label'} = 'Select inventory item';
+                     $f->{'extra_sql'}   = 'AND ( svcnum IS NULL ';
+                     $f->{'extra_sql'}  .= ' OR svcnum = '. $object->svcnum
+                       if $object->svcnum;
+                     $f->{'extra_sql'}  .= ' ) ';
+                     $f->{'disable_empty'} = $object->svcnum ? 1 : 0,
                    }
 
                    if ( $f->{'type'} eq 'select-svc_pbx' ) {



More information about the freeside-commits mailing list