misc templating
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 Nov 2005 19:00:31 +0000 (19:00 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 Nov 2005 19:00:31 +0000 (19:00 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2031 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/staff_client/chrome/content/evergreen/util/datetime.js
Evergreen/staff_client/chrome/content/evergreen/util/print.js

index 859c748..a8ae14e 100644 (file)
@@ -28,6 +28,8 @@ function formatted_date(date,format) {
                } else {
                        date = new Date( parseInt( date + '000' ) );
                }
+       } else if (typeof(date) == 'undefined') {
+               date = new Date( parseInt( date + '000' ) );
        }
        var mm = date.getMonth() + 1; mm = mm.toString(); if (mm.length == 1) mm = '0' +mm;
        var dd = date.getDate().toString(); if (dd.length == 1) dd = '0' +dd;
index 309b8a7..6cedd5e 100644 (file)
@@ -101,8 +101,8 @@ function print_template_replace(s,params) {
                        catch(E){sdump('D_ERROR','string = <' + s + '> error = ' + js2JSON(E)+'\n');}
                try{s=s.replace(/%STAFF_MIDDLENAME%/g,trunc(params.staff.second_given_name()));}
                        catch(E){sdump('D_ERROR','string = <' + s + '> error = ' + js2JSON(E)+'\n');}
-               try{s=s.replace(/%STAFF_BARCODE%/g,trunc(params.staff.card().barcode()));}
-                       catch(E){sdump('D_ERROR','string = <' + s + '> error = ' + js2JSON(E)+'\n');}
+               //try{s=s.replace(/%STAFF_BARCODE%/g,trunc(params.staff.card().barcode()));}
+               //      catch(E){sdump('D_ERROR','string = <' + s + '> error = ' + js2JSON(E)+'\n');}
 
                try{s=s.replace(/%TODAY%/g,trunc(new Date()));}
                        catch(E){sdump('D_ERROR','string = <' + s + '> error = ' + js2JSON(E)+'\n');}