issue #23402: bubble error if no base currency
authorSteve Hackbarth <stephenhackbarth@gmail.com>
Thu, 17 Apr 2014 16:27:41 +0000 (12:27 -0400)
committerSteve Hackbarth <stephenhackbarth@gmail.com>
Thu, 17 Apr 2014 16:27:41 +0000 (12:27 -0400)
enyo-client/application/source/en/strings.js
enyo-client/application/source/widgets/money.js

index 22b8673..3c28228 100644 (file)
     "_accountExists": "This number is currently assigned to an Account.",
     "_automaticFreight": "Manually clearing the freight will enable automatic " +
       "Freight recalculations.",
+    "_baseCurrencyMustBeSet": "You must first set a base currency",
     "_closeLine?": "Are you sure you want to close this line?",
     "_continue?": " Do you want to continue?",
     "_convertAccount": "Convert this Account to a Customer?",
index bf9c9ae..86053f5 100644 (file)
@@ -83,6 +83,9 @@ regexp:true, undef:true, trailing:true, white:true */
       this.inherited(arguments);
 
       var baseCurrency = XT.baseCurrency();
+      if (!baseCurrency) {
+        this.bubble("onNotify", {message: "_baseCurrencyMustBeSet".loc()});
+      }
 
       this.setEffective(new Date());
       this.setCurrency(baseCurrency);