show circ rules in Item Details given an active circulation
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 22 Dec 2009 19:39:46 +0000 (19:39 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 22 Dec 2009 19:39:46 +0000 (19:39 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15225 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul
Open-ILS/xul/staff_client/server/locale/en-US/circ.properties

index e54cbdc..cacdf24 100644 (file)
 <!ENTITY staff.circ.alternate_copy_summary.Total_Circs___Current_Year.label "Total Circs - Current Year">
 <!ENTITY staff.circ.alternate_copy_summary.Total_Circs.label "Total Circs">
 <!ENTITY staff.circ.alternate_copy_summary.Total_Circs___Prev_Year.label "Total Circs - Prev Year">
+<!ENTITY staff.circ.alternate_copy_summary.Duration_Rule.label "Duration Rule">
+<!ENTITY staff.circ.alternate_copy_summary.Recurring_Fine_Rule.label "Recurring Fine Rule">
+<!ENTITY staff.circ.alternate_copy_summary.Max_Fine_Rule.label "Max Fine Rule">
 <!ENTITY staff.util.timestamp_dialog.title "Select Date or Timestamp:">
 <!ENTITY staff.util.timestamp_dialog.date.label "Date:">
 <!ENTITY staff.util.timestamp_dialog.date.accesskey "D">
index 403797d..e79edcc 100644 (file)
@@ -323,16 +323,13 @@ function load_item() {
             set("desk_renewal", details.circ.desk_renewal()); 
             set("due_date", details.circ.due_date()); 
             set("duration", details.circ.duration()); 
-            set("duration_rule", details.circ.duration_rule()); 
             set("fine_interval", details.circ.fine_interval()); 
             set("circ_id", details.circ.id()); 
             set("max_fine", details.circ.max_fine()); 
-            set("max_fine_rule", details.circ.max_fine_rule()); 
             set("opac_renewal", details.circ.opac_renewal()); 
             set("phone_renewal", details.circ.phone_renewal()); 
             set("renewal_type", renewal_composite_kludge(details.circ));
             set("recurring_fine", details.circ.recurring_fine()); 
-            set("recurring_fine_rule", details.circ.recurring_fine_rule()); 
             set("renewal_remaining", details.circ.renewal_remaining()); 
             set("stop_fines", details.circ.stop_fines()); 
             set("stop_fines_time", details.circ.stop_fines_time()); 
@@ -361,6 +358,70 @@ function load_item() {
             set("circ_type", details.circ.circ_type()); 
             set("billing_total", details.circ.billing_total()); 
             set("payment_total", details.circ.payment_total()); 
+            if (! details.circ.checkin_time() ) {
+                set("recurring_fine_rule", document.getElementById('circStrings').getFormattedString(
+                    'staff.circ.copy_details.recurring_fine_rule_format',
+                    [
+                        details.circ.recurring_fine_rule().name(),
+                        details.circ.recurring_fine_rule().id(),
+                        details.circ.recurring_fine_rule().low(),
+                        details.circ.recurring_fine_rule().normal(),
+                        details.circ.recurring_fine_rule().high(),
+                        details.circ.recurring_fine_rule().recurrence_interval()
+                    ]
+                )); 
+                set_tooltip("recurring_fine_rule", document.getElementById('circStrings').getFormattedString(
+                    'staff.circ.copy_details.recurring_fine_rule_tooltip_format',
+                    [
+                        details.circ.recurring_fine_rule().name(),
+                        details.circ.recurring_fine_rule().id(),
+                        details.circ.recurring_fine_rule().low(),
+                        details.circ.recurring_fine_rule().normal(),
+                        details.circ.recurring_fine_rule().high(),
+                        details.circ.recurring_fine_rule().recurrence_interval()
+                    ]
+                )); 
+                set("duration_rule", document.getElementById('circStrings').getFormattedString(
+                    'staff.circ.copy_details.duration_rule_format',
+                    [
+                        details.circ.duration_rule().name(),
+                        details.circ.duration_rule().id(),
+                        details.circ.duration_rule().shrt(),
+                        details.circ.duration_rule().normal(),
+                        details.circ.duration_rule().extended(),
+                        details.circ.duration_rule().max_renewals()
+                    ]
+                )); 
+                set_tooltip("duration_rule", document.getElementById('circStrings').getFormattedString(
+                    'staff.circ.copy_details.duration_rule_tooltip_format',
+                    [
+                        details.circ.duration_rule().name(),
+                        details.circ.duration_rule().id(),
+                        details.circ.duration_rule().shrt(),
+                        details.circ.duration_rule().normal(),
+                        details.circ.duration_rule().extended(),
+                        details.circ.duration_rule().max_renewals()
+                    ]
+                )); 
+                set("max_fine_rule", document.getElementById('circStrings').getFormattedString(
+                    'staff.circ.copy_details.max_fine_rule_format',
+                    [
+                        details.circ.max_fine_rule().name(),
+                        details.circ.max_fine_rule().id(),
+                        details.circ.max_fine_rule().amount(),
+                        details.circ.max_fine_rule().is_percent()
+                    ]
+                ));
+                set_tooltip("max_fine_rule", document.getElementById('circStrings').getFormattedString(
+                    'staff.circ.copy_details.max_fine_rule_tooltip_format',
+                    [
+                        details.circ.max_fine_rule().name(),
+                        details.circ.max_fine_rule().id(),
+                        details.circ.max_fine_rule().amount(),
+                        details.circ.max_fine_rule().is_percent()
+                    ]
+                ));
+            }
         }
 
         set("status", '');
index b6edcdf..7367bd1 100644 (file)
@@ -96,8 +96,8 @@
                                 <textbox name="isbn" readonly="true" context="clipboard"/>
                                 <label value="&staff.circ.alternate_copy_summary.Loan_Duration.label;" />
                                 <textbox name="loan_duration" readonly="true" context="clipboard"/>
-                                <spacer />
-                                <spacer />
+                                <label value="&staff.circ.alternate_copy_summary.Total_Circs.label;" />
+                                <textbox name="total_circ_count" readonly="true" context="clipboard"/>
                                 <label value="&staff.circ.alternate_copy_summary.Checkout_Date.label;" />
                                 <textbox name="xact_start" readonly="true" context="clipboard"/>
                             </row>
                                 <textbox name="copy_create_date" readonly="true" context="clipboard"/>
                                 <label value="&staff.circ.alternate_copy_summary.Reference.label;" />
                                 <textbox name="reference" readonly="true" context="clipboard"/>
-                                <label value="&staff.circ.alternate_copy_summary.Total_Circs.label;" />
-                                <textbox name="total_circ_count" readonly="true" context="clipboard"/>
+                                <label value="&staff.circ.alternate_copy_summary.Total_Circs___Current_Year.label;" />
+                                <textbox name="total_circ_count_curr_year" readonly="true" context="clipboard"/>
                                 <label value="&staff.circ.alternate_copy_summary.Checkout_Workstation.label;" />
                                 <textbox name="checkout_workstation" readonly="true" context="clipboard"/>
                             </row>
                                 <textbox name="status_changed_time" readonly="true" context="clipboard"/>
                                 <label value="&staff.circ.alternate_copy_summary.OPAC_Visible.label;" />
                                 <textbox name="opac_visible" readonly="true" context="clipboard"/>
-                                <label value="&staff.circ.alternate_copy_summary.Total_Circs___Current_Year.label;" />
-                                <textbox name="total_circ_count_curr_year" readonly="true" context="clipboard"/>
-                                <label value="&staff.circ.alternate_copy_summary.Renewal_Workstation.label;" />
-                                <textbox name="renewal_workstation" readonly="true" context="clipboard"/>
+                                <label value="&staff.circ.alternate_copy_summary.Total_Circs___Prev_Year.label;" />
+                                <textbox name="total_circ_count_prev_year" readonly="true" context="clipboard"/>
+                                <label value="&staff.circ.alternate_copy_summary.Duration_Rule.label;" />
+                                <textbox name="duration_rule" readonly="true" context="clipboard"/>
                             </row>
                             <row>
                                 <label value="&staff.circ.alternate_copy_summary.Copy_ID.label;" />
                                 <textbox name="copy_id" readonly="true" context="clipboard"/>
                                 <label value="&staff.circ.alternate_copy_summary.Holdable.label;" />
                                 <textbox name="holdable" readonly="true" context="clipboard"/>
-                                <label value="&staff.circ.alternate_copy_summary.Total_Circs___Prev_Year.label;" />
-                                <textbox name="total_circ_count_prev_year" readonly="true" context="clipboard"/>
-                                <label value="&staff.circ.alternate_copy_summary.Checkin_Time.label;" />
-                                <textbox name="checkin_time" readonly="true" context="clipboard"/>
+                                <label value="&staff.circ.alternate_copy_summary.Rolling_Counter.label;" />
+                                <textbox name="rolling_counter" readonly="true" context="clipboard"/>
+                                <label value="&staff.circ.alternate_copy_summary.Recurring_Fine_Rule.label;" />
+                                <textbox name="recurring_fine_rule" readonly="true" context="clipboard"/>
                             </row>
                             <row>
                                 <label value="&staff.circ.alternate_copy_summary.TCN.label;" />
                                 <textbox name="tcn" readonly="true" context="clipboard"/>
                                 <label value="&staff.circ.alternate_copy_summary.Circ_Modifier.label;" />
                                 <textbox name="circ_mod" readonly="true" context="clipboard"/>
-                                <label value="&staff.circ.alternate_copy_summary.Rolling_Counter.label;" />
-                                <textbox name="rolling_counter" readonly="true" context="clipboard"/>
-                                <label value="&staff.circ.alternate_copy_summary.Checkin_Scan_Time.label;" />
-                                <textbox name="checkin_scan_time" readonly="true" context="clipboard"/>
+                                <label value="&staff.circ.alternate_copy_summary.Renewal_Workstation.label;" />
+                                <textbox name="renewal_workstation" readonly="true" context="clipboard"/>
+                                <label value="&staff.circ.alternate_copy_summary.Max_Fine_Rule.label;" />
+                                <textbox name="max_fine_rule" readonly="true" context="clipboard"/>
                             </row>
                             <row>
                                 <spacer />
                                 <textbox name="hold_shelf_loc" readonly="true" context="clipboard"/>
                                 <label value="&staff.circ.alternate_copy_summary.Remaining_Renewals.label;" />
                                 <textbox name="remaining_renewals" readonly="true" context="clipboard"/>
+                                <label value="&staff.circ.alternate_copy_summary.Checkin_Time.label;" />
+                                <textbox name="checkin_time" readonly="true" context="clipboard"/>
+                            </row>
+                            <row>
+                                <spacer /><spacer />
+                                <spacer /><spacer />
+                                <spacer /><spacer />
+                                <label value="&staff.circ.alternate_copy_summary.Checkin_Scan_Time.label;" />
+                                <textbox name="checkin_scan_time" readonly="true" context="clipboard"/>
+                            </row>
+                            <row>
+                                <spacer /><spacer />
+                                <spacer /><spacer />
+                                <spacer /><spacer />
                                 <label value="&staff.circ.alternate_copy_summary.Checkin_Workstation.label;" />
                                 <textbox name="checkin_workstation" readonly="true" context="clipboard"/>
                             </row>
index d790086..3bd2f33 100644 (file)
@@ -88,6 +88,18 @@ staff.circ.copy_details.bad_hold_status=This item is not captured for a hold, ho
 staff.circ.copy_details.no_hold=This item is not captured for a hold.
 staff.circ.copy_details.circ_count_by_year=%1$s : %2$s
 staff.circ.copy_details.circ_count_by_year.legacy_label=Legacy/Not Dated
+# From Config::rules::circ_duration, 1 - Name, 2 - ID, 3 - Short, 4 - Normal, 5 - Extended, 6 - Max Renewals
+staff.circ.copy_details.duration_rule_format=%1$s
+# From Config::rules::circ_duration, 1 - Name, 2 - ID, 3 - Short, 4 - Normal, 5 - Extended, 6 - Max Renewals
+staff.circ.copy_details.duration_rule_tooltip_format=%3$s/%4$s/%5$s - %6$s renewals
+# From Config::rules::recurring_fine, 1 - Name, 2 - ID, 3 - Low, 4 - Normal, 5 - High, 6 - Recurrence Interval
+staff.circ.copy_details.recurring_fine_rule_format=%1$s
+# From Config::rules::recurring_fine, 1 - Name, 2 - ID, 3 - Low, 4 - Normal, 5 - High, 6 - Recurrence Interval
+staff.circ.copy_details.recurring_fine_rule_tooltip_format=%3$s/%4$s/%5$s - %6$s
+# From Config::rules::max_fine, 1 - Name, 2 - ID, 3 - Amount, 4 - Is Percent
+staff.circ.copy_details.max_fine_rule_format=%1$s
+# From Config::rules::max_fine, 1 - Name, 2 - ID, 3 - Amount, 4 - Is Percent
+staff.circ.copy_details.max_fine_rule_tooltip_format=%3$s Is Precent? %4$s
 staff.circ.copy_status.tab_name=Item Status
 staff.circ.copy_status.action.complete=Action complete.
 staff.circ.copy_status.sel_checkin.error=Checkin did not likely happen.