
/**
 * Order Types Schema
 */
Core.Schemas.PayGroup = new SimpleSchema({
    _id: {
        type: String,
        optional: true
    },
    code: {
        type: String
    },
    name: {
        type: String
    },
    businessId: {
        type: String
    },
    tax: {
        type: String,
        optional: true
    },
    pension: {
        type: String,
        optional: true
    },
    status: {
        type: String,
        defaultValue: "Active"
    },
    createdAt: {
        type: Date,
        autoValue: function () {
            if (this.isInsert) {
                return new Date;
            } else if (this.isUpsert) {
                return {
                    $setOnInsert: new Date
                };
            }
        },
        denyUpdate: true,
        optional: true
    }
});


/**
 * Order Types Schema
 */
Core.Schemas.PayGroup = new SimpleSchema({
    _id: {
        type: String,
        optional: true
    },
    code: {
        type: String
    },
    name: {
        type: String
    },
    businessId: {
        type: String
    },
    tax: {
        type: String
    },
    pension: {
        type: String,
        optional: true
    },
    status: {
        type: String,
        defaultValue: "Active"
    },
    createdAt: {
        type: Date,
        autoValue: function () {
            if (this.isInsert) {
                return new Date;
            } else if (this.isUpsert) {
                return {
                    $setOnInsert: new Date
                };
            }
        },
        denyUpdate: true,
        optional: true
    }
});

--- 
+++ 
@@ -17,7 +17,8 @@
         type: String
     },
     tax: {
-        type: String
+        type: String,
+        optional: true
     },
     pension: {
         type: String,
Fix for creating paygroup without tax rule
