LP 1772053: Cleanup Dan's code.
authorJason Stephenson <jason@sigio.com>
Mon, 10 Sep 2018 20:09:26 +0000 (16:09 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 28 Apr 2020 17:24:18 +0000 (13:24 -0400)
Mostly whitespace cleanup, but I did restore a line or two that appear
to have been accidentally deleted.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/src/templates/staff/share/print_templates/t_bills_current.tt2
Open-ILS/web/js/ui/default/staff/admin/workstation/app.js
Open-ILS/web/js/ui/default/staff/circ/patron/bills.js
Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js
Open-ILS/web/js/ui/default/staff/circ/services/circ.js

index af7dd0c..f3bf386 100644 (file)
@@ -7,11 +7,11 @@ to this template includes:
     current_location.name - Current location's name
     current_location.shortname - Current location's shortname
 * patron - the patron who was billed, which contains:
-    patron.prefix - Prefix of the patron 
-    patron.first_given_name - First given name of the patron 
-    patron.second_given_name - Second given name of the patron 
-    patron.family_name - Family name of the patron 
-    patron.suffix - Suffix of the patron 
+    patron.prefix - Prefix of the patron
+    patron.first_given_name - First given name of the patron
+    patron.second_given_name - Second given name of the patron
+    patron.family_name - Family name of the patron
+    patron.suffix - Suffix of the patron
     patron.card - The patron's barcode number
     patron.expire_date - The patron's expiration date
     patron.alias - The patron's alias
@@ -30,11 +30,11 @@ to this template includes:
     xact.summary.last_billing_note - Last billing note
     xact.summary.last_billing_type - Last billing type
     xact.summary.last_payment_note - Last payment note
-    xact.summary.last_payment_ts - Last payment date and time 
+    xact.summary.last_payment_ts - Last payment date and time
     xact.summary.last_payment_type - Last payment type
-    xact.summary.total_owed - Total billed 
+    xact.summary.total_owed - Total billed
     xact.summary.total_paid - Total paid
-    xact.summary.xact_type - Billing type 
+    xact.summary.xact_type - Billing type
     xact.call_number - Information about the copy
     xact.call_number.label - Copy call number
     xact.call_number.prefix - Copy call number prefix
@@ -49,39 +49,39 @@ You have the following bills:
   <div ng-repeat="xact in transactions">
     <dt><b>Bill #{{xact.id}}</b></dt>
     <dd>
-    <table> 
+    <table>
       <tr valign="top">
         <td>[% l('Date:') %]</td>
         <td>{{xact.xact_start | date:$root.egDateAndTimeFormat}}</td>
-      </tr> 
+      </tr>
       <tr valign="top">
         <td>[% l('Type') %]:</td>
         <td>{{xact.summary.xact_type}}</td>
-      </tr> 
+      </tr>
       <tr valign="top">
         <td>[% l('Last Billing') %]:</td>
         <td>{{xact.summary.last_billing_type}}<br/>
             {{xact.summary.last_billing_note}}
         </td>
-      </tr> 
+      </tr>
       <tr valign="top">
         <td>[% l('Total Billed') %]:</td>
         <td>{{xact.summary.total_owed | currency}}</td>
-      </tr> 
+      </tr>
       <tr valign="top">
         <td>[% l('Last Payment') %]:</td>
         <td>{{xact.summary.last_payment_type}}<br/>
             {{xact.summary.last_payment_note}}
         </td>
-      </tr> 
+      </tr>
       <tr valign="top">
         <td>[% l('Total Paid') %]:</td>
         <td>{{xact.summary.total_paid | currency}}</td>
-      </tr> 
+      </tr>
       <tr valign="top">
         <td><b>[% l('Balance') %]:</b></td>
         <td><b>{{xact.summary.balance_owed | currency}}</b></td>
-      </tr> 
+      </tr>
     </table>
     </dd>
     <br/>
index dbb4f80..83988f3 100644 (file)
@@ -514,15 +514,15 @@ function($scope , $q , egCore , ngToast) {
                 id : 1,
                 xact_start : new Date().toISOString(),
                 xact_finish : new Date().toISOString(),
-               call_number : {
-                       label : "spindler",
-                       prefix : "biography",
-                       suffix : "Closed Stacks",
-                       owning_lib : {
-                          name : "Mineola Public Library",
-                           shortname : "Mineola"
-                                     }
-                               },
+                call_number : {
+                    label : "spindler",
+                    prefix : "biography",
+                    suffix : "Closed Stacks",
+                    owning_lib : {
+                        name : "Mineola Public Library",
+                        shortname : "Mineola"
+                    }
+                },
                 summary : {
                     xact_type : 'circulation',
                     last_billing_type : 'Overdue materials',
index 2ccac23..539fe6c 100644 (file)
@@ -623,19 +623,18 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location,
                     xact_start : xact.xact_start(),
                 }
                 if (xact.circulation()) {
-                    newXact.copy_barcode = xact.circulation().target_copy().barcode(),
+                    newXact.copy_barcode = xact.circulation().target_copy().barcode();
                     newXact.title = xact.circulation().target_copy().call_number().record().simple_record().title();
                     newXact.call_number = {
                         label : xact.circulation().target_copy().call_number().label(),
-                       prefix : xact.circulation().target_copy().call_number().prefix().label(),
-                       suffix : xact.circulation().target_copy().call_number().suffix().label(),
+                                   prefix : xact.circulation().target_copy().call_number().prefix().label(),
+                                   suffix : xact.circulation().target_copy().call_number().suffix().label(),
                         owning_lib : {
-                             name : xact.circulation().target_copy().call_number().owning_lib().name(),
-                             shortname : xact.circulation().target_copy().call_number().owning_lib().shortname()
+                            name : xact.circulation().target_copy().call_number().owning_lib().name(),
+                            shortname : xact.circulation().target_copy().call_number().owning_lib().shortname()
                         }
                     }
                 }
-
                 xacts.push(newXact);
             }
         );
@@ -1157,15 +1156,15 @@ function($scope,  $q , egCore , patronSvc , billSvc , egPromptDialog , $location
                     xact_start : xact.xact_start(),
                 }
                 if (xact.circulation()) {
-                    newXact.copy_barcode = xact.circulation().target_copy().barcode(),
-                    newXact.title = xact.circulation().target_copy().call_number().record().simple_record().title()
+                    newXact.copy_barcode = xact.circulation().target_copy().barcode();
+                    newXact.title = xact.circulation().target_copy().call_number().record().simple_record().title();
                     newXact.call_number = {
                         label : xact.circulation().target_copy().call_number().label(),
-                       prefix : xact.circulation().target_copy().call_number().prefix().label(),
-                       suffix : xact.circulation().target_copy().call_number().suffix().label(),
+                                   prefix : xact.circulation().target_copy().call_number().prefix().label(),
+                                   suffix : xact.circulation().target_copy().call_number().suffix().label(),
                         owning_lib : {
-                             name : xact.circulation().target_copy().call_number().owning_lib().name(),
-                             shortname : xact.circulation().target_copy().call_number().owning_lib().shortname()
+                            name : xact.circulation().target_copy().call_number().owning_lib().name(),
+                            shortname : xact.circulation().target_copy().call_number().owning_lib().shortname()
                         }
                     }
                 }
index fb9072b..9510546 100644 (file)
@@ -315,14 +315,11 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc ,
                 print_data.circulations.push({
                     circ : egCore.idl.toHash(co.circ),
                     copy : egCore.idl.toHash(co.acp),
+                    call_number : egCore.idl.toHash(co.acn), // Wrong?
+                    owning_lib : egCore.idl.toHash(co.aou), // Wrong?
                     title : co.title,
                     author : co.author
                 });
-                // Flesh selected fields of this circulation 
-                print_data.circulations[0].copy.call_number =
-                    egCore.idl.toHash(co.acn);
-                print_data.circulations[0].copy.owning_lib =
-                   egCore.ils.toHash(co.aou);
             };
         });
 
index 15849f6..6bed816 100644 (file)
@@ -713,6 +713,7 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog,  egAddCopyAl
         return egCore.pcrud.retrieveAll('ccs', {}, {atomic : true}).then(
             function(list) {
                 egCore.env.absorbList(list, 'ccs');
+                copy.status(egCore.env.ccs.map[copy.status()]);
             }
         );
     }