Changed supplier payment to accept amount in foreign currency instead of exchange...
[fa-stable.git] / js / payalloc.js
index a1cbc09ec3334f9c8cf548a69c42c2473f42d5c5..1bd818c1864fc27859e0ae86c1f9f0dd7fb821c9 100644 (file)
@@ -56,12 +56,20 @@ function allocate_none(doc) {
 
 var allocations = {
        '.amount': function(e) {
-               e.onblur = function() {
-                       blur_alloc(this);
+               if(e.name == 'allocated_amount')
+               {
+                 e.onblur = function() {
+                       var dec = this.getAttribute("dec");
+                       price_format(this.name, get_amount(this.name), dec);
                  };
-               e.onfocus = function() {
-                       focus_alloc(this);
-               };
+               } else {
+                       e.onblur = function() {
+                               blur_alloc(this);
+                       };
+                       e.onfocus = function() {
+                               focus_alloc(this);
+                       };
+               }
        }
 }