1 /*jshint indent:2, curly:true, eqeqeq:true, immed:true, latedef:true,
2 newcap:true, noarg:true, regexp:true, undef:true, strict:true, trailing:true,
4 /*global XV:true, XT:true, _:true, console:true, XM:true, Backbone:true, require:true, assert:true,
5 setTimeout:true, before:true, clearTimeout:true, exports:true, it:true, describe:true, beforeEach:true */
13 @property {String} abbreviation
14 @property {String} name
15 @property {String} CurrencyName
16 @property {String} CurrencySymbol
17 @property {String} CurrencyAbbreviation
18 @property {Number} CurrencyNumber
21 recordType: "XM.Country",
22 collectionType: "XM.CountryCollection",
25 @memberof Country.prototype
26 @description The country collection is cached.
28 cacheName: "XM.countries",
29 listKind: "XV.CountryList",
30 instanceOf: "XM.Document",
33 @memberof Country.prototype
34 @description Countries are lockable.
39 @memberof Country.prototype
40 @description The ID attribute is "abbreviation", which will be automatically uppercased.
42 idAttribute: "abbreviation",
43 enforceUpperKey: true,
44 attributes: ["id", "abbreviation", "name", "currencyName", "currencySymbol", "currencyAbbreviation", "currencyNumber"],
45 requiredAttributes: ["abbreviation", "name", "currencyAbbreviation"],
48 @memberof Country.prototype
49 @description Used in the crm and project modules
51 extensions: ["crm", "project"], //add purchasing
54 @memberof Country.prototype
55 @description Countries can be read by anyone but can only be created, updated,
56 or deleted by users with the "MaintainCountries" privilege.
59 createUpdateDelete: "MaintainCountries",
63 name: "DQ Islands" + Math.random(),
64 abbreviation: "X" + Math.random().toString(36).slice(3, 4),
65 currencyName: "US Dollar",
67 currencyAbbreviation: "USD",
70 updatableField: "name"
72 var additionalTests = function () {
75 @memberof Country.prototype
76 @description Length of Abbreviation field should not exceed 2, Currency Abbreviation
77 and Currency Number should not exceed 3 and Currency Number value should be an integer
79 it.skip("Abbreviation length should not exceed 2", function () {
81 it.skip("Length of Currency Abbreviation should not exceed 3", function () {
83 it.skip("Currency Number value should be an integer and its length should not" +
84 " exceed 3 ", function () {
88 exports.additionalTests = additionalTests;