Treat the Cost field like the other money fields in the copy editor, user/mmorgan/LP_1659006_Fix_error_saving_blank_Cost_field
authorMichele Morgan <mmorgan@noblenet.org>
Tue, 24 Jan 2017 14:17:58 +0000 (09:17 -0500)
committerMichele Morgan <mmorgan@noblenet.org>
Tue, 24 Jan 2017 14:17:58 +0000 (09:17 -0500)
reverting to null if blanked.

Open-ILS/xul/staff_client/server/cat/copy_editor.js

index f4537a2..3d7a189 100644 (file)
@@ -567,7 +567,7 @@ g.apply = function(field,value) {
         value = null;
     }
     if (field == 'alert_message') { value = value.replace(/^\W+$/g,''); }
-    if (field == 'price' || field == 'deposit_amount'{
+    if (field == 'price' || field == 'deposit_amount' || field == 'cost'){
         if (value == '') {
             value = null;
         } else {