public static int updateProdBraQty(String pb_prod_id, String pb_bra_id, String prod_qty, String action){
        ProdBra pb = new ProdBra();
        
        ArrayList<QueryCriteria> qcSrcProdBra = new ArrayList<QueryCriteria>();
        qcSrcProdBra.add(new QueryCriteria("pb_bra_id", pb_bra_id, QueryCriteria.Operand.EQUALS));
        qcSrcProdBra.add(new QueryCriteria("pb_prod_id", pb_prod_id, QueryCriteria.Operand.EQUALS));
        
        ArrayList<String> field = new ArrayList<String>();
        field.add("pb_qty");
        
        ArrayList<QueryOrder> order = new ArrayList<QueryOrder>();
        
        try {
            pb = pb.Read(qcSrcProdBra, field, order).get(0);
        } catch (SQLException ex) {
            Logger.getLogger(Func.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        int curQty = Integer.parseInt(pb.getPb_qty());
        int updatedQty;
        
        if(action.equals("add")){
            updatedQty = curQty + Integer.parseInt(prod_qty);
        }
        else{
            updatedQty = curQty - Integer.parseInt(prod_qty);
        }
        
        if(updatedQty < 0){
            return -1;
        }
        else{       
            HashMap<String,String> fields = new HashMap<String,String>();
            fields.put("pb_qty", String.valueOf(updatedQty));
            pb.Update(qcSrcProdBra, fields);

            return updatedQty;            
        }
    }