Subversion Repositories SmartDukaan

Rev

Rev 2427 | Rev 2489 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2427 Rev 2431
Line 113... Line 113...
113
    /**
113
    /**
114
     * validates item object. ProductGroup, brand, modelNumber, modelName should not be empty or null.
114
     * validates item object. ProductGroup, brand, modelNumber, modelName should not be empty or null.
115
     * Also does item and vendor prices validations (MRP >= SP, MRP >= MOP, TP <= MOP)
115
     * Also does item and vendor prices validations (MRP >= SP, MRP >= MOP, TP <= MOP)
116
     * Vendor Item Key should not be empty or null
116
     * Vendor Item Key should not be empty or null
117
     * @param item
117
     * @param item
118
     * @return
118
     * @return true if validation is successful, false otherwise
119
     */
119
     */
120
    public static boolean validateItem(Item item) {
120
    public static boolean validateItem(Item item) {
121
        if(item.getProductGroup() == null || item.getProductGroup().isEmpty()) {
121
        if(item.getProductGroup() == null || item.getProductGroup().isEmpty()) {
122
            Window.alert("Product Group cannot be empty.");
122
            Window.alert("Product Group cannot be empty.");
123
            return false;
123
            return false;